Prediction image generation device, moving image decoding device, and moving image coding device

JP2024006522A5Active Publication Date: 2025-07-04SHARP KK
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
JP2022107511
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2022-07-04
Publication Date
2025-07-04
Estimated Expiration
2042-07-04

AI Technical Summary

Technical Problem

The existing CCCM prediction methods in video encoding and decoding require extensive computational resources due to the derivation of multiple polynomial linear models, particularly with seven parameters, leading to a significant increase in calculation complexity.

Method used

A CCLM prediction unit that generates a predicted image of a color difference image using a luminance image, with a CCLM prediction parameter derivation unit that uses a fixed number of parameters regardless of the index, switching the positions of adjacent pixels to derive the predicted image, and an entropy decoding unit that decodes an index from encoded data to facilitate this process.

Benefits of technology

This approach simplifies the derivation of linear prediction parameters in CCCM prediction, reducing computational complexity while maintaining image quality by fixing the number of CCLM prediction parameters and switching pixel positions based on the decoded index.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
  • Figure 00000000_0001_ABST
    Figure 00000000_0001_ABST
Patent Text Reader

Abstract

To provide a moving image decoding device that reduces a memory amount required for a CCLM prediction, and provide a moving image coding device.SOLUTION: In an image transmission system including a moving image coding device, a network, a moving image decoding device, and a moving image display device, the moving image decoding device comprises a CCLM prediction part that generates a prediction image of a color difference image by using an illumination image. The CCLM prediction part comprises: a CCLM prediction parameter conductive part that introduces a CCLM prediction parameter formed by a first weight, a second weight, and a first off-set value by using a reference pixel and a pixel adjacent to the reference pixel in a reference region adjacent to an object block; and a CCLM prediction filter part that generates a color difference prediction image by using an object pixel of the object block, two illumination pixels of the pixel adjacent to the object pixel, and the CCLM prediction parameter. The CCLM prediction filter part introduces a pixel value of a prediction pixel from the object pixel and a first weight integration, the pixel adjacent to the object pixel and a second weight integration, and a sum of the first off-set values.SELECTED DRAWING: Figure 8
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] An embodiment of the present invention relates to a predicted image generating device, a video decoding device, and a video encoding device. [Background technology]

[0002] In order to efficiently transmit or record moving images, a moving image encoding device is used that generates encoded data by encoding moving images, and a moving image decoding device is used that generates a decoded image by decoding the encoded data.

[0003] Specific examples of video coding methods include H.264 / AVC, High-Efficiency Video Coding (HEVC), and Versatile Video Coding (VVC).

[0004] In such a video coding method, images (pictures) constituting a video are divided into slices obtained by dividing the images, coding tree units (CTUs) obtained by dividing the slices, coding tree units (CTUs) obtained by dividing the coding tree units, and so on. The coding unit (sometimes called a coding unit (CU)) that is to be encoded, and The coding unit is divided into transform units (TUs), which are managed in a hierarchical structure, and the coding unit is encoded / decoded for each CU.

[0005] In such video coding methods, a predicted image is usually generated based on a locally 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 coded. Methods for generating a predicted image include inter-frame prediction (inter prediction) and intra-frame prediction (intra prediction). Non-Patent Document 1 is an example of a recent video coding and decoding technology.

[0006] In recent video coding and decoding technologies, CCLM (Cross-component linear model) is used to generate a predicted image of chrominance pixels from luminance pixels. CCCM (Convolutional cross-component model) prediction using adjacent images has been disclosed. In CCCM prediction, linear prediction parameters are derived using multiple decoded images adjacent to the target block, and the chrominance of the target block is predicted from the linear prediction model (CCLM model). [Prior art documents] [Non-patent literature]

[0007] [Non-Patent Document 1] "AHG12: Convolutional cross-component model (CCCM) for intra prediction", Joint Video Exploration Team (JVET) of ITU-T SG 16 WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11, JVET-Z0064 Summary of the Invention [Problem to be solved by the invention]

[0008] CCCM processing has the problem that the amount of calculation required to derive parameters is very large because it uses multiple polynomial linear models. In addition, the amount of calculation is inevitably large because a linear model with seven parameters, consisting of one target pixel, four adjacent pixels, one nonlinear element of the target pixel, and one bias, is derived. [Means for solving the problem]

[0009] A CCLM prediction unit that generates a predicted image of a color difference image using a luminance image, The image processing apparatus includes a CCLM prediction parameter derivation unit that derives CCLM prediction parameters consisting of a first weight, a second weight, and a first offset value using a reference pixel in an adjacent reference area and an adjacent pixel of the reference pixel, and a CCLM prediction filter unit that generates a chrominance predicted image using two luminance pixels, a target pixel in a target block and an adjacent pixel of the target pixel, and the CCLM prediction parameters, wherein the CCLM prediction filter unit derives a pixel value of a predicted pixel from the sum of a product of the target pixel and the first weight, a product of the adjacent pixel of the target pixel and the second weight, and the first offset value.

[0010] The position of the adjacent pixel in the reference image and the target image is characterized by being the pixel (x+1, y) to the right of the target pixel (x, y).

[0011] A video decoding device comprising the CCLM prediction unit according to claim 1 and a parameter decoding unit that decodes an index indicating a position of an adjacent pixel from encoded data, wherein the CCLM prediction parameter derivation unit fixes the number of CCLM prediction parameters regardless of the index, and derives the CCLM prediction parameter by switching positions of adjacent pixels of the reference pixel in accordance with the index, and the CCLM filter unit derives a predicted image by switching the adjacent pixels in accordance with the index.

[0012] A video encoding device comprising the CCLM prediction unit according to claim 1 and a parameter encoding unit that decodes an index indicating a position of an adjacent pixel from encoded data, wherein the CCLM prediction parameter derivation unit fixes a number of CCLM prediction parameters regardless of the index, and derives the CCLM prediction parameter by switching positions of adjacent pixels of the reference pixel in accordance with the index, and the CCLM filter unit derives a predicted image by switching the adjacent pixels in accordance with the index.

[0013] The entropy decoding unit decodes the index from any one of encoded data of a sequence header, a slice header, and a CTU header, and the parameter decoding unit decodes the index from the encoded data of the target block. In the present invention, a flag indicating whether or not to perform the CCLM prediction is derived from the encoded data, and the CCLM filter unit derives a predicted image of the target block.

[0014] The CCLM prediction unit generates a predicted image of a chrominance image using a luminance image, and includes a CCLM prediction parameter derivation unit capable of deriving three or more parameters as CCLM prediction parameters, and a CCLM prediction filter unit generates a chrominance predicted image using a luminance reference image and the CCLM prediction parameters, and the CCLM prediction parameter derivation unit is characterized in that it changes the number of parameters to be derived.

[0015] A CCLM prediction unit that generates a predicted image of a chrominance image using a luminance image includes a CCLM prediction parameter derivation unit that classifies into groups according to luminance pixel values ​​and is capable of deriving a plurality of CCLM prediction parameters for each group, and a CCLM prediction filter unit that generates a chrominance predicted image using a luminance reference image and the CCLM prediction parameters, and the CCLM prediction parameter derivation unit changes the number of parameters for the CCLM prediction depending on whether or not the pixel values ​​of the luminance image are classified into two or more groups.

[0016] The CCLM prediction parameter derivation unit is characterized in that it derives CCLM prediction parameters using the number of parameters of two-parameter CCLM prediction when classifying into two or more groups according to the pixel values ​​of the luminance image, and derives the number of parameters using the number of parameters of three-parameter CCLM prediction when using one group otherwise.

[0017] An entropy decoding unit that decodes a CCLM flag indicating whether to perform three-parameter CCLM prediction and a CCLM flag indicating whether to perform two-parameter CCLM prediction from the encoded data, and the CCLM prediction unit The video decoding device is characterized in that, when the CCLM flag is 1, one CCLM prediction parameter is derived, and in other cases, two or more CCLM prediction parameters are derived.

[0018] When the CCLM flag is 0, the CCLM flag is decoded; when the CCLM flag is 1, the MMLM flag indicating whether to perform multi-parameter prediction is decoded from the encoded data; when the MMLM flag is 1, two CCLM prediction parameters are derived; when the MMLM flag is 0, one CCLM prediction parameter is derived. Effect of the Invention

[0019] According to one aspect of the present invention, there is an effect that derivation of linear prediction parameters in CCCM prediction is simplified. [Brief description of the drawings]

[0020] [Figure 1] 1 is a schematic diagram showing a configuration of an image transmission system according to an embodiment of the present invention. [Diagram 2] FIG. 2 is a diagram showing a hierarchical structure of data in an encoded stream. [Diagram 3] FIG. 13 is a schematic diagram showing types of intra-prediction modes (mode numbers). [Figure 4] FIG. 1 is a schematic diagram showing a configuration of a video decoding device. [Diagram 5] 13 is a schematic diagram showing a configuration of an intra-prediction parameter derivation unit. [Figure 6] FIG. 13 is a diagram showing reference regions used for intra prediction. [Figure 7] FIG. 13 is a diagram illustrating a configuration of an intra-prediction image generating unit. [Figure 8] FIG. 2A is a block diagram showing an example of the configuration of a CCLM prediction unit according to one embodiment of the present invention, and FIG. 2B is a diagram showing a method of deriving IntraPredModeC. [Figure 9] 5(a) to 5(e) are diagrams illustrating pixels to be referred to when deriving CCLM prediction parameters according to an embodiment of the present invention. [Figure 10] 1A is a diagram showing an example of a (luminance, chrominance) combination used in CCLM prediction in one model according to the present embodiment, and FIG. 1B is a diagram showing an example of CCLM prediction (MMLM prediction) in two models according to the present embodiment. [Figure 11] FIG. 1 is a block diagram showing a configuration of a video encoding device. [Figure 12] 13 is a schematic diagram showing a configuration of an intra-prediction parameter derivation unit. [Figure 13] FIG. 4 is a diagram showing positions of reference pixels according to an embodiment of the present invention. [Figure 14] FIG. 2 is a diagram showing a syntax configuration according to an embodiment of the present invention. [Figure 15] FIG. 2 is a diagram showing a syntax configuration according to an embodiment of the present invention. [Figure 16] FIG. 2 is a diagram showing a syntax configuration according to an embodiment of the present invention. [Figure 17] FIG. 2 is a diagram showing a syntax configuration according to an embodiment of the present invention. [Figure 18] 11 is a flowchart showing an operation of a CCLM prediction unit according to an embodiment of the present invention. [Figure 19] 11 is a flowchart showing an operation of a CCLM prediction unit according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0021] (First embodiment) Hereinafter, an embodiment of the present invention will be described with reference to the drawings.

[0022] FIG. 1 is a schematic diagram showing the configuration of an image transmission system 1 according to this embodiment.

[0023] The image transmission system 1 is a system that transmits an encoded stream obtained by encoding an image to be encoded, decodes the transmitted encoded stream, and displays an image. The image transmission system 1 includes a video encoding device (image encoding device) 11, a network 21, a video decoding device (image decoding device) 31, and a video display device (image display device) 41.

[0024] An image T is input to the video encoding device 11 .

[0025] The network 21 transmits the encoded stream Te generated by the video encoding device 11 to the video decoding device 31. The network 21 is the Internet, a wide area network (WAN), a local area network (LAN), or a combination of these. The network 21 is not necessarily limited to a bidirectional communication network, and may be a unidirectional communication network that transmits broadcast waves such as terrestrial digital broadcasting and satellite broadcasting. The network 21 may also be replaced by a storage medium on which the encoded stream Te is recorded, such as a DVD (Digital Versatile Disc: registered trademark) or a BD (Blue-ray Disc: registered trademark).

[0026] The video decoding device 31 decodes each of the coded streams Te transmitted by the network 21, and generates one or more decoded images Td.

[0027] 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. The display may be in the form of a stationary display, a mobile display, an HMD, or the like. When the video decoding device 31 has high processing power, it displays high quality images, and when it has only low processing power, it displays images that do not require high processing power or display power.

[0028] <Operator> The operators used in this specification are described below.

[0029] >> is a right bit shift, << is a left bit shift, & is a bitwise AND, and | is a bitwise OR |= is an OR assignment operator, and || represents a logical OR.

[0030] x?y:z is a ternary operator that takes y when x is true (non-zero) and z when x is false (0).

[0031] Clip3(a, b, c) is a function that clips c to a value between a and b, inclusive. It returns a if c < a, b if c > b, and c otherwise (assuming a <= b).

[0032] abs(a) is a function that returns the absolute value of a.

[0033] Int(a) is a function that returns the integer value of a.

[0034] floor(a) is a function that returns the largest integer less than or equal to a.

[0035] ceil(a) is a function that returns the smallest integer greater than or equal to a.

[0036] a / d represents the division of a by d, rounded down to the nearest integer.

[0037] a^b represents a to the power of b.

[0038] <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.

[0039] FIG. 2 is a diagram showing a hierarchical structure of data in the coded stream Te. The frame Te illustratively includes a sequence and a plurality of pictures constituting the sequence. (a) to (f) of Fig. 2 are diagrams showing a coded video sequence that defines the sequence SEQ, a coded picture that defines the picture PICT, a coded slice that defines the slice S, coded slice data that defines the slice data, a coding tree unit included in the coded slice data, and a coding unit included in the coding tree unit, respectively.

[0040] (Coded Video Sequence) In the case of a coded video sequence, a video decoder is used to decode the sequence SEQ to be processed. A set of data to be referred to by device 31 is defined. The sequence SEQ is as shown in FIG. The video parameter set includes a video parameter set, a sequence parameter set (SPS), a picture parameter set (PPS), a picture PICT, and supplemental enhancement information (SEI).

[0041] The video parameter set VPS is used to determine the number of layers of a video image. A set of coding parameters common to multiple video images and a set of coding parameters related to multiple layers and individual layers included in the video images are defined.

[0042] The sequence parameter set SPS is used to decode the target sequence. A set of coding parameters to be referenced by the PPS is specified. For example, the width and height of a picture are specified. Note that there may be multiple SPSs. In that case, one of the multiple SPSs can be selected from the PPS. Select .

[0043] The picture parameter set PPS specifies the number of pictures to be decoded for each picture in the target sequence. A set of coding parameters to be referred to by the video decoding device 31 is specified. For example, the reference value of the quantization width (pic_init_qp_minus26) used for decoding a picture is included. Note that there may be multiple PPSs. In that case, one of the multiple PPSs is selected for each picture in the target sequence.

[0044] (Encoded Picture) A coded picture defines a set of data to be referenced by the video decoding device 31 in order to decode a picture PICT to be processed. As shown in FIG. 2(b), the picture PICT includes slices 0 to NS-1 (NS is the total number of slices included in the picture PICT).

[0045] In the following, when there is no need to distinguish between slices 0 to NS-1, the symbols are The subscripts may be omitted in the description, and the same applies to other data to which subscripts are added that are included in the coded stream Te described below.

[0046] (Coded Slice) In the case of the coded slice, the video decoding device 31 refers to the slice S to be processed in order to decode the slice S. As shown in FIG. 2(c), a slice includes a slice header and slice data.

[0047] The slice header includes a group of coding parameters to be referred to by the video decoding device 31 in order to determine a decoding method for the current slice. Slice type designation information (slice_type) that designates the slice type is an example of a coding parameter included in the slice header.

[0048] The slice types that can be specified by the slice type specification information include (1) an I slice that uses only intra prediction during encoding, (2) a P slice that uses unidirectional prediction or intra prediction during encoding, and (3) a P slice that uses unidirectional prediction, bidirectional prediction, or intra prediction during encoding. Examples of inter prediction include B slices using intra prediction. Note that inter prediction is not limited to single prediction and bi-prediction, and a predicted image may be generated using more reference pictures. When called a B slice, it is a slice that includes blocks that can use inter prediction. This refers to the s.

[0049] In addition, the slice header may include a reference to a picture parameter set PPS (pic_parameter_set_id).

[0050] (Encoded slice data) The coded slice data specifies a set of data to be referenced by the video decoding device 31 in order to decode the slice data to be processed. As shown in Fig. 2(d), the slice data includes a CTU. A CTU is a block of a fixed size (e.g., 64x64) that constitutes a slice, and is also called a Largest Coding Unit (LCU).

[0051] (coding tree unit) FIG. 2(e) shows a collection of data to be referenced by the video decoding device 31 in order to decode the CTU to be processed. CTU is coded by recursive quad tree (QT), binary tree (BT) or ternary tree (TT) partitioning. The image is divided into coding units (CU), which are the basic units of encoding processing. BT division and TT division are collectively called multi-tree division (MT (Multi Tree) division). A node in the tree structure obtained by recursive quadtree division is called a coding node. The intermediate nodes of the ternary tree are coding nodes, and the CTU itself is also regulated as the top coding node. It is determined.

[0052] The CT includes, as CT information, a division flag indicating whether or not division is to be performed.

[0053] Also, when the size of the CTU is 64x64 pixels, the size of the CU can be any of the following: 64x64 pixels, 64x32 pixels, 32x64 pixels, 32x32 pixels, 64x16 pixels, 16x64 pixels, 32x16 pixels, 16x32 pixels, 16x16 pixels, 64x8 pixels, 8x64 pixels, 32x8 pixels, 8x32 pixels, 16x8 pixels, 8x16 pixels, 8x8 pixels, 64x4 pixels, 4x64 pixels, 32x4 pixels, 4x32 pixels, 16x4 pixels, 4x16 pixels, 8x4 pixels, 4x8 pixels, and 4x4 pixels.

[0054] (Encoding Unit) As shown in FIG. 2(f), a set of data to be referenced by the video decoding device 31 in order to decode the coding unit to be processed is defined. Specifically, a CU includes a CU header CUH, prediction parameters, and The CU header includes information such as prediction mode, transformation parameters, and quantized transformation coefficients.

[0055] The prediction process may be performed in units of CUs, or in units of sub-CUs obtained by further dividing a CU. When the size of a CU and a sub-CU are equal, there is one sub-CU in the CU. When the size of a CU is larger than that of a sub-CU, the CU is divided into sub-CUs. For example, when a CU is 8x8 and a sub-CU is 4x4, the CU is divided into 2 parts horizontally and 2 parts vertically, into 4 sub-CUs.

[0056] There are two types of prediction (prediction modes): intra prediction and inter prediction. Intra prediction is a prediction within the same picture, while inter prediction refers to a prediction process performed between different pictures (for example, between display times).

[0057] Transformation and quantization are performed in units of CUs, but quantization coefficients are stored in units of subblocks such as 4x4. It may be entropy coded.

[0058] (Prediction parameters) The predicted image is derived from prediction parameters associated with the block, which include intra-prediction and inter-prediction parameters.

[0059] The prediction parameters of the intra prediction are explained below. The intra prediction parameters are composed of a luminance prediction mode IntraPredModeY and a color difference prediction mode IntraPredModeC. FIG. 1 is a schematic diagram showing types of intra prediction modes (mode numbers). As shown in the diagram, there are, for example, 67 types of intra prediction modes (0 to 66). For example, they are planar prediction (0), DC prediction (1), and angular prediction (2 to 66). In addition, CCLM modes (81 to 83) have been added for color difference. You may do so.

[0060] Syntax elements for deriving intra prediction parameters include, for example, intra_luma_mpm_flag, mpm_idx, and mpm_remainder.

[0061] (MPM) The intra_luma_mpm_flag is a flag indicating whether the luminance prediction mode IntraPredModeY of the target block matches the MPM (Most Probable Mode). The MPM is a prediction mode included in the MPM candidate list mpmCandList[]. The MPM candidate list is a list that stores candidates that are estimated to have a high probability of being applied to the target block from the intra prediction modes of adjacent blocks and a predetermined intra prediction mode. When the intra_luma_mpm_flag is 1, the luminance prediction mode IntraPredModeY of the target block is derived using the MPM candidate list and the index mpm_idx.

[0062] IntraPredModeY = mpmCandList[mpm_idx] (REM) When intra_luma_mpm_flag is 0, a luminance prediction mode IntraPredModeY is derived using mpm_remainder. Specifically, an intra prediction mode is selected from the remaining modes RemIntraPredMode obtained by excluding the intra prediction modes included in the MPM candidate list from all intra prediction modes.

[0063] (Configuration of a video decoding device) The configuration of a video decoding device 31 (FIG. 4) according to this embodiment will be described.

[0064] The video decoding device 31 includes an entropy decoding unit 301, a parameter decoding unit (prediction image decoding device 3. The video decoding device 31 includes a loop filter 302, a loop filter 305, a reference picture memory 306, a prediction parameter memory 307, a prediction image generation unit 308, an inverse quantization and inverse transformation unit 311, an adder 312, and a prediction parameter derivation unit 320. Note that, in accordance with a video encoding device 11 described later, the video decoding device 31 may also be configured not to include the loop filter 305.

[0065] The parameter decoding unit 302 further includes a header decoding unit 3020, a CT information decoding unit 3021, and a CU decoding unit 3022. The CU decoding unit 3022 further includes 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, and PPS, and slice header (slice information) from the encoded data. The CT information decoding unit 3021 decodes the CT from the encoded data. The CU decoding unit 3022 decodes the 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 when a prediction error is included in the TU.

[0066] 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 .

[0067] The predicted image generating unit 308 includes an inter predicted image generating unit 309 and an intra predicted image generating unit 310. It is composed of:

[0068] In the following, we will describe an example in which CTU and CU are used as processing units, but this is not limiting. Alternatively, the processing may be performed in units of sub-CUs. The block may be replaced with a block, and processing may be performed in units of blocks or subblocks.

[0069] The entropy decoding unit 301 performs entropy decoding on the encoded stream Te input from the outside. The entropy decoding unit 301 performs piecewise decoding to separate and decode individual codes (syntax elements). The separated codes include prediction information for generating a predicted image and prediction errors for generating a difference image. The entropy decoding unit 301 outputs the separated codes to the parameter decoding unit 302.

[0070] (Configuration of the intra prediction parameter derivation unit 304) The intra prediction parameter derivation unit 304 performs intra prediction by referring to prediction parameters stored in the prediction parameter memory 307 based on the code input from the entropy decoding unit 301. The intra prediction parameters, for example, the intra prediction mode IntraPredMode, are derived. The meter derivation unit 304 outputs the derived intra prediction parameters to the predicted 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 for luminance and chrominance.

[0071] FIG. 5 is a schematic diagram showing the configuration of the intra-prediction parameter derivation unit 304 of the prediction parameter derivation unit 320. As shown in the figure, the intra prediction parameter derivation unit 304 performs parameter decoding control. The image processing unit 304 includes a pixel value control unit 3041, a luma intra prediction parameter derivation unit 3042, and a chroma intra prediction parameter derivation unit 3043.

[0072] The parameter decoding control unit 3041 instructs the entropy decoding unit 301 to decode the syntax elements. and receives syntax elements from the entropy decoding unit 301. When intra_luma_mpm_flag in the syntax elements is 1, the parameter decoding control unit 3041 outputs mpm_idx to the MPM parameter derivation unit 30422 in the luma intra prediction parameter derivation unit 3042. When intra_luma_mpm_flag is 0, the parameter decoding control unit 3041 outputs mpm_remainder to the non-MPM parameter derivation unit 30423 of the luma intra prediction parameter derivation unit 3042. Furthermore, the parameter decoding control unit 3041 outputs a chrominance intra prediction parameter intra_chroma_pred_mode to the chrominance intra prediction parameter derivation unit 3043.

[0073] The luminance intra prediction parameter derivation unit 3042 is a MPM candidate list derivation unit 30421 and an MPM parameter The MPM parameter derivation unit 30422 and the non-MPM parameter derivation unit 30423 (derivation unit).

[0074] The MPM parameter derivation unit 30422 outputs the MPM candidate list derived by the MPM candidate list derivation unit 30421. The luminance prediction mode IntraPredModeY is derived by referring to the lists mpmCandList[ ] and mpm_idx, and is output to the intra-prediction image generation unit 310 .

[0075] The non-MPM parameter derivation unit 30423 derives IntraPredModeY from the MPM candidate list mpmCandList[ ] and mpm_remainder, and outputs it to the intra-predicted image generation unit 310.

[0076] The color difference intra prediction parameter derivation unit 3043 derives a color difference prediction mode IntraPredModeC from intra_chroma_pred_mode, and outputs the color difference prediction mode IntraPredModeC to the intra predicted image generation unit 310.

[0077] The loop filter 305 is a filter provided in the coding loop, and is used to remove block distortion and ringing. The loop filter 305 is a filter that removes distortion and improves image quality. The decoded image of the CU is subjected to deblocking filter, sample adaptive offset (SAO), and adaptive Apply a filter such as an automatic loop filter (ALF).

[0078] The reference picture memory 306 stores the decoded image of the CU generated by the adder 312 in a location that is determined in advance for each current picture and current CU.

[0079] The prediction parameter memory 307 stores prediction parameters at a predetermined position for each CTU or CU to be decoded. Specifically, the prediction parameter memory 307 stores parameters decoded by the parameter decoding unit 302, parameters derived by the prediction parameter derivation unit 320, and the like.

[0080] The predicted image generating unit 308 receives the parameters derived by the prediction parameter derivation unit 320 and the like. The predicted image generating unit 308 also reads a reference picture from the reference picture memory 306. The predicted image generating unit 308 generates the predicted parameters and the read picture in a prediction mode indicated by the prediction mode predMode. A predicted image of a block or subblock is generated using the extracted reference picture (reference picture block). Here, a reference picture block is a set of pixels on the reference picture (usually rectangular, so called a block), which is an area to be referenced in order to generate a predicted image.

[0081] (Intra-prediction image generation unit 310) When the prediction mode predMode indicates an intra prediction mode, the intra prediction image generation unit 310 The intra-prediction parameters and the reference picture input from the intra-prediction parameter derivation unit 304 are The intra prediction is performed using reference pixels read from the frame memory 306.

[0082] Specifically, the intra-prediction image generating unit 310 generates a prediction image from a current block in a current picture. The adjacent blocks within the predetermined range are read from the reference picture memory 306. The surrounding blocks are adjacent blocks to the left, upper left, upper, and upper right of the current block, and the area to be referenced differs depending on the intra prediction mode.

[0083] The intra-prediction image generating unit 310 generates a prediction image of the current block by referring to the read decoded pixel values ​​and the prediction mode indicated by IntraPredMode. The prediction image of the block thus obtained is output to the adder 312.

[0084] The generation of predicted images based on intra prediction modes is explained below. In planar prediction, DC prediction, and angular prediction, the prediction image is generated by referring to the decoded surrounding area adjacent (close) to the prediction target block. A pixel in the reference region R is set as a reference region R. A predicted image is then generated by extrapolating pixels in 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 further, the top left, top right, and bottom left) of the block to be predicted (for example, the region indicated by the pixels marked with a diagonal line in FIG. 6(a)).

[0085] (Details of predicted image generation unit) Next, the configuration of the intra-prediction image generation unit 310 will be described in detail with reference to FIG. 7. The intra-prediction image generation unit 310 includes a prediction target block setting unit 3101, an unfiltered reference image setting unit 3102 (first The image processing unit 3102 includes a first reference image setting unit), a filtered reference image setting unit 3103 (second reference image setting unit), a prediction unit 3104 (intra prediction unit 3104), and a predicted image correction unit 3105 (predicted image correction unit, filter switching unit, weighting coefficient changing unit).

[0086] Based on each reference pixel (unfiltered reference image) in the reference region R, a filtered reference image generated by applying a reference pixel filter (first filter), and the intra prediction mode, the prediction unit 3104 generates a temporary predicted image (pre-corrected predicted image) of the block to be predicted, and outputs it to the predicted image correction unit 3105. The predicted image correction unit 3105 corrects the temporary predicted image in accordance with the intra prediction mode, and generates and outputs a predicted image (corrected predicted image).

[0087] Below, each unit included in the intra-predicted image generation unit 310 will be described.

[0088] (Prediction target block setting unit 3101) The prediction target block setting unit 3101 sets the target CU as the prediction target block, and outputs information on the prediction target block (prediction target block information). The prediction target block information includes at least an index indicating the size, position, and whether the prediction target block is luminance or chrominance.

[0089] (Unfiltered reference image setting unit 3102) Based on the size and position of the prediction target block, the unfiltered reference image setting unit 3102 sets the neighboring surrounding area of ​​the prediction target block as a reference area R. Next, the unfiltered reference image setting unit 3102 sets the pixel values ​​(unfiltered reference image, boundary pixels) in the reference area R at the corresponding positions on the reference picture memory 306. Each decoded pixel value is set. The line r[x][−1] of decoded pixels adjacent to the top side of the prediction target block and the column r[−1][y] of decoded pixels adjacent to the left side of the prediction target block shown in FIG. 6(a) are unfiltered reference images.

[0090] (Filtered reference image setting unit 3103) The filtered reference image setting unit 3103 applies a reference pixel filter (first filter) to the unfiltered reference image according to the intra prediction mode to obtain a filter for each position (x, y) in the reference region R. In particular, a low-pass filter is applied to the unfiltered reference image at the position (x, y) and its surroundings to derive a filtered reference image (FIG. 6(b)). Note that it is not necessary to apply a low-pass filter to all intra prediction modes, and a low-pass filter may be applied to some intra prediction modes. Note that the filter applied to the unfiltered reference image on the reference region R in the filtered reference pixel setting unit 3103 is called a "reference pixel filter (first filter)", whereas the filter that corrects the tentative predicted image in the predicted image correction unit 3105 described later is called a "boundary filter (second filter)".

[0091] (Configuration of the intra prediction unit 3104) The intra prediction unit 3104 generates a temporary predicted image (temporary predicted pixel value, uncorrected predicted image) of the block to be predicted based on the intra prediction mode, the unfiltered reference image, and the filtered reference pixel value, and outputs the temporary predicted image to the predicted image correction unit 3105. The prediction unit 3104 includes a planar prediction unit 31041 and a DC prediction unit 31042. The prediction unit 3104 includes a prediction unit 31042, an angular prediction unit 31043, and a CCLM prediction unit (predicted image generating device) 31044. The prediction unit 3104 selects a specific prediction unit according to the intra prediction mode, and inputs an unfiltered reference image and a filtered reference image. The relationship between the intra prediction mode and the corresponding prediction unit is as follows. ·Planar prediction ···Planar prediction section 31041 ·DC prediction ···DC prediction section 31042 ·Angular Prediction ··Angular Prediction Part 31043 · CCLM forecast · CCLM forecast section 31044 (Planar forecast) The planar prediction unit 31041 performs multiple predictions according to the distance between the prediction target pixel position and the reference pixel position. The filtered reference images s[x][y] are linearly added to generate a tentative predicted image q[x][y], and output to the predicted image correction unit 3105.

[0092] (DC forecast) The DC prediction unit 31042 derives a DC predicted value equivalent to the average value of the filtered reference image s[x][y], and outputs a temporary predicted image q[x][y] whose pixel values ​​are the DC predicted values.

[0093] (Angular prediction) The angular prediction unit 31043 generates a temporary predicted image q[x][y] using the filtered reference image 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.

[0094] (CCLM (Cross-Component Linear Model) prediction) The CCLM prediction unit 31044 predicts the pixel values ​​of the chrominance based on the pixel values ​​of the luminance. This is a method to generate a predicted image of the color difference image (Cb, Cr) using a linear model based on the decoded luminance image. CCLM prediction will be described later.

[0095] (Configuration of predicted image correction unit 3105) The predicted image correction unit 3105 corrects the temporary predicted image output from the prediction unit 3104 according to the intra prediction mode. Specifically, the predicted image correction unit 3105 performs weighted addition (weighted average) of the unfiltered reference image and the temporary predicted image for each pixel of the temporary predicted image according to the distance between the reference region R and the target predicted pixel, thereby deriving a predicted image (corrected predicted image) Pred in which the temporary predicted image is corrected. Note that, for some intra prediction modes (for example, planar prediction, DC prediction, etc.), the predicted image correction unit 3105 may not correct the temporary predicted image, and the output of the prediction unit 3104 may be used as the predicted image.

[0096] The inverse quantization and inverse transform unit 311 inverse quantizes the quantized transform coefficients input from the entropy decoding unit 301 to obtain transform coefficients. The quantized transform coefficients are coefficients obtained by performing frequency transform such as DCT (Discrete Cosine Transform) and DST (Discrete Sine Transform) on prediction errors in the encoding process and quantizing them. The inverse quantization and inverse transform unit 311 performs inverse frequency transform such as inverse DCT and inverse DST on the obtained transform coefficients to obtain the predicted errors. The inverse quantization and inverse transform unit 311 outputs the prediction error to the adder 312.

[0097] The adder 312 adds, for each pixel, the predicted image of the block input from the predicted image generation unit 308 and the prediction error input from the inverse quantization and inverse transform unit 311 to generate a decoded image of the block. The adder 312 stores the decoded image of the block in the reference picture memory 306 , and also outputs it to the loop filter 305 .

[0098] (Configuration of a video encoding device) Next, the configuration of the video encoding device 11 according to this embodiment will be described. Fig. 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 generating unit 101, a subtraction unit 102, a transformation and quantization unit 103, an inverse quantization and 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 determining unit 110, a parameter encoding unit 111, a prediction parameter derivation unit 120, and an entropy encoding unit 104.

[0099] The predicted image generating unit 101 generates a predicted image for each CU, which is an area obtained by dividing each picture of the image T. The predicted image generating unit 101 operates in the same manner as the predicted image generating unit 308 already described, and so a description thereof will be omitted.

[0100] The subtraction unit 102 generates a prediction error by subtracting the pixel values ​​of the predicted image of the block input from the predicted image generation unit 101 from the pixel values ​​of the image T. The subtraction unit 102 outputs the prediction error to the transformation and quantization unit 103.

[0101] 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 quantizing the prediction error. The quantized transform coefficients are output to the entropy coding unit 104 and the inverse quantization and inverse transform unit 105 .

[0102] The inverse quantization and inverse transform unit 105 corresponds to the inverse quantization and inverse transform unit 311 (FIG. 4) in the video decoding device 31. The calculated prediction error is output to the adder 106.

[0103] 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. For example, the parameters of the intra prediction mode (intra_luma_mpm_flag, mpm_idx, mpm_remainder ), prediction mode predMode, etc.

[0104] The entropy coding unit 104 encodes the division information, the coding parameters, the quantization transformation coefficients, etc. The encoded stream Te is generated and output by performing tropy encoding.

[0105] The parameter encoding unit 111 includes a header encoding unit 1110, a CT information encoding unit 1111, and a CU The CU encoding unit 1112 further includes a TU encoding unit 1114.

[0106] The prediction parameter derivation unit 120 derives inter prediction parameters and intra prediction parameters from the inter prediction parameter derivation unit 112 and the intra prediction parameter derivation unit 113. The derived inter prediction parameters and intra prediction parameters are output to the parameter coding unit 111.

[0107] (Configuration of the intra prediction parameter derivation unit 113) The intra prediction parameter encoding unit 113 derives a format for encoding (for example, mpm_idx, mpm_remainder, etc.) from the intra prediction mode IntraPredMode input from the encoding parameter determination unit 110. The intra prediction parameter derivation unit 113 includes a part of the same configuration as the configuration in which the intra prediction parameter derivation unit 304 derives intra prediction parameters.

[0108] 12 is a schematic diagram showing a configuration of the intra-prediction parameter derivation unit 113 of the prediction parameter derivation unit 120. The intra-prediction parameter derivation unit 113 includes a parameter encoding control unit 1131, a luminance The intra prediction parameter derivation unit 1132 and a color difference intra prediction parameter derivation unit 1133 are included.

[0109] The parameter coding control unit 1131 receives the luminance prediction mode IntraPredModeY and the chrominance prediction mode IntraPredModeC from the coding parameter determination unit 110. The parameter coding control unit 1131 determines intra_luma_mpm_flag by referring to the MPM candidate list mpmCandList[ ] of the reference candidate list derivation unit 30421. Then, the parameter coding control unit 1131 outputs intra_luma_mpm_flag and IntraPredModeY to the luminance intra prediction parameter derivation unit 1132. Also, the parameter coding control unit 1131 outputs IntraPredModeC to the chrominance intra prediction parameter derivation unit 1133.

[0110] The luma intra prediction parameter derivation unit 1132 is configured to include an MPM candidate list derivation unit 30421 (candidate list derivation unit), an MPM parameter derivation unit 11322, and a non-MPM parameter derivation unit 11323 (encoding unit, derivation unit).

[0111] The MPM candidate list derivation unit 30421 determines the number of adjacent blocks stored in the prediction parameter memory 108. The MPM candidate list mpmCandList[] is derived by referring to the intra-prediction mode. When intra_luma_mpm_flag is 1, the data derivation unit 11322 and outputs it to the entropy coding unit 104. If intra_luma_mpm_flag is 0, the non-MPM parameter derivation unit 11323 derives mpm_remainder from IntraPredModeY and mpmCandList[ ], and outputs it to the entropy coding unit 104.

[0112] The color difference intra prediction parameter derivation unit 1133 derives and outputs intra_chroma_pred_mode from IntraPredModeY and IntraPredModeC.

[0113] The adder 106 adds, for each pixel, the pixel value of the predicted image of the block input from the predicted image generation unit 101 and the prediction error input from the inverse quantization and inverse transform unit 105 to generate a decoded image. The unit 106 stores the generated decoded image in a reference picture memory 109 .

[0114] The loop filter 107 performs deblocking filtering, SAO, and ALF on the decoded image generated by the adder 106. Note that the loop filter 107 does not necessarily include the above three types of filters. For example, the filter may be configured with only a deblocking filter.

[0115] The prediction parameter memory 108 stores the prediction parameters generated by the coding parameter derivation unit 120 at a predetermined position for each target picture and CU. The prediction parameter memory 108 may also store the transform coefficients generated by the transform / quantization unit 103.

[0116] The reference picture memory 109 stores the decoded image generated by the loop filter 107 at a predetermined position for each current picture and CU.

[0117] The encoding parameter determination unit 110 determines one of the multiple sets of encoding parameters. The coding parameters are the above-mentioned QT, BT or TT division information, prediction parameters, or parameters to be coded that are generated in relation to these. The predicted image generating unit 101 generates a predicted image using these coding parameters.

[0118] The coding parameter determination unit 110 determines the size of the amount of information and the coding parameter for each of the plurality of sets. The coding parameter determination unit 110 calculates an RD cost value indicating an error. The RD cost value is, for example, the sum of the code amount and a value obtained by multiplying the square error by a coefficient λ. The entropy coding unit 104 selects a set of coding parameters. The coding parameter determination unit 110 outputs the determined coding parameters to the parameter coding unit 111, the prediction parameter derivation unit 120, and the prediction image generation unit 101.

[0119] In addition, in the above-described embodiment, a part of the video encoding device 11 and the video decoding device 31, for example, the entropy decoding unit 301, the parameter decoding unit 302, the loop filter 305, the predicted image generating unit 306, The control unit 308, the inverse quantization and inverse transform unit 311, the addition unit 312, the prediction parameter derivation unit 320, the prediction image generation unit 101, the subtraction unit 102, the transformation and quantization unit 103, the entropy coding unit 104, the inverse quantization and inverse transform unit 105, the loop filter 107, the coding parameter determination unit 110, the parameter coding unit 111, and the prediction parameter derivation unit 120 may be realized by a computer. In this case, the control functions may be realized by recording a program for realizing the control functions in a computer-readable recording medium, reading the program recorded in the recording medium into a computer system, and executing the program. Note that the "computer system" here refers to a computer system built into either the video coding device 11 or the video decoding device 31, and includes hardware such as an OS and peripheral devices. Also, the "computer-readable recording medium" refers to a portable medium such as a flexible disk, a magneto-optical disk, a ROM, a CD-ROM, and a storage device such as a hard disk built into a computer system. Furthermore, the term "computer-readable recording medium" may include a medium that dynamically stores a program for a short period of time, such as a communication line when transmitting a program via a network such as the Internet or a communication line such as a telephone line, and a medium that stores a program for a certain period of time, such as a volatile memory inside a computer system that serves as a server or client in such a case. The above program may be one that realizes part of the above-mentioned functions, or may be one that can realize the above-mentioned functions in combination with a program already recorded in the computer system.

[0120] In addition, a part or the whole of the video encoding device 11 and the video decoding device 31 in the above-mentioned embodiment may be realized as an integrated circuit such as an LSI (Large Scale Integration). Each functional block of the video encoding device 11 and the video decoding device 31 may be individually made into a processor, or a part or the whole may be integrated into a processor. The integrated circuit method is not limited to LSI, and may be realized by a dedicated circuit or a general-purpose processor. Furthermore, when an integrated circuit technology that replaces LSI appears due to the progress of semiconductor technology, an integrated circuit based on that technology may be used.

[0121] Although one embodiment of the present invention has been described in detail above with reference to the drawings, the specific configuration is not limited to the above, and various design changes, etc. are possible within the scope that does not deviate from the gist of the present invention.

[0122] [Application example] The above-mentioned video encoding device 11 and video decoding device 31 can be mounted on various devices that transmit, receive, record, and play videos. The video may be a natural video captured by a camera or the like, or an artificial video (including CG and GUI) generated by a computer or the like.

[0123] (Color difference intra prediction mode) Next, CCLM prediction will be described with reference to FIGS.

[0124] FIG. 10 is a diagram showing an overview of luminance and chrominance prediction. In luminance and chrominance prediction, chrominance is linearly predicted from luminance. (a) shows a case where one prediction model is used for a target block. (b) is a case where multiple prediction models are used for the target block. This shows the case where a CCLM prediction model is used, and two or more (here, two) CCLM prediction parameters are derived for the target block. Luminance and chrominance prediction with multiple prediction models is called MMLM (Multi Mode Linear Model). Linear prediction using two parameters consisting of one weighting coefficient a and one offset coefficient b (bias) is called CCLM in the narrow sense, and linear prediction using N parameters (N>2) consisting of two or more weighting coefficients a k and one offset coefficient b (bias) is called CCCM (Convolutional cross-component model). a and b, and a k and b are called CCLM prediction parameters, and are derived using adjacent images of the target block. Note that a shift value may be derived in addition to the weighting and bias values ​​in the CCLM prediction parameters, such as shiftA, which will be described later. However, the number of CCLM prediction parameters in this specification does not include the shift value. That is, it is defined as follows:

[0125] Linear prediction with parameters a, b, and shiftA is a two-parameter linear prediction. Linear prediction with parameters a0, a1, b, shiftA is a three-parameter linear prediction This is because the derivation process of shiftA and the shift process by shiftA are negligible in the amount of calculation involved in deriving CCLM prediction parameters and the amount of calculation involved in linear prediction in CCLM prediction, and therefore shiftA is not included in the number of parameters.

[0126] Furthermore, the following prediction may be used as luminance and color difference prediction.

[0127] INTRA_LT_CCLM(81) Left and top reference, 1 model, 2 parameters INTRA_L_CCLM(82) Left reference, 1 model, 2 parameters INTRA_T_CCLM(83) See above, 1 model, 2 parameters INTRA_LT_MMLM(84) Left and top reference, 2 models, 2 parameters INTRA_L_MMLM(85) Left reference, 2 models, 2 parameters INTRA_T_MMLM(86) See above, 2 models, 2 parameters INTRA_LT_CCCM_SINGLE(87) Left and top reference, 2 models, 3 parameters INTRA_L_CCCM_SINGLE(88) Left reference, 2 models, 3 parameters INTRA_T_CCCM_SINGLE(89) See above, 2 models, 3 parameters INTRA_LT_MMLM_CCCM(90) Left and top reference, 2 models, 3 parameters INTRA_L_MMLM_CCCM(91) Left reference, 2 models, 3 parameters INTRA_T_MMLM_CCCM(92) See above, 2 models, 3 parameters The value in parentheses is the corresponding IntraPredModeC value. However, this is not limited to this value. Also, a configuration may be used in which only a part of the above predictions are used, rather than all of them. In particular, the exclusive configuration described later does not use the multiple model multiple adjacent parameters (the above two models and three parameters) indicated by INTRA_{LT,L,T}_MMLM_CCCM.

[0128] The intra prediction parameter derivation unit 304 derives the above-mentioned color difference prediction mode IntraPredModeC. For each of the above, the luminance prediction modes IntraPredModeY, intra_chroma_pred_mode, and the table of FIG. 8(b) are referenced. The figure shows a method of deriving IntraPredModeC. When intra_chroma_pred_mode is 0 to 3 and 4, the intra prediction parameter derivation unit 304 derives IntraPredModeC depending on the value of IntraPredModeY. For example, when intra_chroma_pred_mode is 0 and IntraPredModeY is 0, IntraPredModeC is 66. Also, when intra_chroma_pred_mode is 3 and IntraPredModeY is 50, IntraPredModeC is 1. Note that the values ​​of IntraPredModeY and IntraPredModeC represent the intra prediction modes in FIG. 3.

[0129] As shown in FIG. 8( a ), the CCLM prediction unit 31044 includes a downsampling unit 310441 and a CCLM prediction parameter. The CCLM prediction filter unit 310443 includes a parameter derivation unit 310442 .

[0130] <Example 1 of 3-parameter configuration> 13 is a diagram showing the positional relationship between a target pixel and adjacent pixels according to this embodiment. The CCLM prediction filter unit 310443 of this configuration performs CCLM prediction using a luminance target pixel refSamples[x*SubWidthC][y*SubHeightC] corresponding to the chrominance pixel position (x, y) to be predicted and its adjacent pixels refSamples[x*SubWidthC+dX][y*SubHeightC+dY]. Then, a predicted image predSamples[x][y] of the chrominance pixel position (x, y) is generated. The figure shows the following four examples. SubWidthC and SubHeightC are the sampling ratios of luminance pixels to chrominance pixels. (a) Target pixel (x, y) and its right adjacent pixel (x+1, y) predSamples[x][y] =(a0*refSamples[x*SubWidthC][y*SubHeightC]+a1*refSamples[x*SubWidthC+1][y*SubHeightC])>>shiftA)+b (b) Target pixel (x, y) and the lower adjacent pixel (x, y+1) predSamples[x][y] =(a0*refSamples[x*SubWidthC][y*SubHeightC]+a1*refSamples[x*SubWidthC][y*SubHeightC+1])>>shiftA)+b (c) Target pixel (x, y) and its left adjacent pixel (x-1, y) predSamples[x][y] =(a0*refSamples[x*SubWidthC][y*SubHeightC]+a1*refSamples[x*SubWidthC-1][y*SubHeightC])>>shiftA)+b (d) Target pixel (x, y) and the upper adjacent pixel (x, y-1) predSamples[x][y] =(a0*refSamples[x*SubWidthC][y*SubHeightC]+a1*refSamples[x*SubWidthC][y*SubHeightC-1])>>shiftA)+b In the simulation, configuration (a) frequently produced the most accurate predicted images. Therefore, the CCLM prediction filter unit 310443 in this configuration derives CCLM prediction parameters in the configuration (a) having at least the adjacent pixel position (dX, dY)=(1, 0) and performs CCLM filtering.

[0131] In addition, the CCLM prediction parameter derivation unit 310442 derives the following temporary reference arrays refX[][], refY[] using a reference pixel pRefY(x,y) included in a reference area of ​​an adjacent block (for example, the left, upper, or upper right of the target block) and its adjacent pixel pRefY(x+dX,y+dY). Here, the bias term is the last term, but it may be the first term.

[0132] for ((x,y) in reference area) { refX[0][cnt]=pRefY[x][y] refX[1][cnt]=pRefY[x+dX][y+dY] refX[2][cnt]=1 refY[cnt] = pRefC[x / SubWidthC][y / SubHeightC] cnt=cnt+1 } Here, (x,y), (dX,dY) are the luminance coordinates, x=-3..-1, y=0..cbHeight-1 and x=-0..cbWidth-1, y=-1..-3, (dX,dY)=(1,0), (0,1), (-1,0), (0,-1).

[0133] Repeatedly set refX and refY for the (x, y) of the reference region, and increment cnt by 1 each time.

[0134] The CCLM prediction parameter derivation unit 310442 derives the following matrix sumXX and vector from the reference images pRefY and pRefC. Derive the vector sumXY.

[0135] for (i=0; i<3; i++) { for (j=0; j<3; j++) { sumXX[i][j] = ΣrefX[i][cnt]*refX[j][cnt] sumXY[i] = ΣrefX[i][cnt]*refY[cnt] } } Here, Σ represents the sum over cnt. Note that refX[][] and refY[] are not used, but pRefY and pRefC are used. sumXX and sumXY may be derived directly from

[0136] sumXX[i][j] = sumXY[j] = 0, i=0..2,j=0..2 for ((x,y) in reference area) { sumXX[0][0] = sumXY[0][0] + pRefY[x][y]*pRefY[x][y] sumXX[0][1] = sumXX[0][1] + pRefY[x][y]*pRefY[x+dX][y+dY] sumXX[1][1] = sumXY[1][1] + pRefY[x+dX][y+dY]* pRefY[x+dX][y+dY] sumXX[0][2] = sumXY[0][2] + pRefY[x][y] sumXX[1][2] = sumXX[1][2] + pRefY[x+dX][y+dY] sumXX[2][2] = sumXY[2][2] + 1 sumXY[0] = sumXY[0] + pRefY[x][y]*pRefC[x / SubWidthC][y / SubHeightC] sumXY[1] = sumXY[1] + pRefY[x+dX][y+dY]*pRefC[x / SubWidthC][y / SubHeightC] sumXY[2] = sumXY[2] + pRefC[x / SubWidthC][y / SubHeightC] } sumXX[1][0] = sumXX[0][1] sumXX[2][1] = sumXX[1][2] In addition, add regularization terms to the diagonal elements. sumXX[i][i] = sumXX[i][i] + (1<<(bitDepth-1)) The CCLM prediction parameter derivation unit 310442 performs linear arithmetic corresponding to cparam=sumXY*inverse(sumXX). Calculate cparam[k], k = 0..2, where inverse(X) is the inverse matrix of X.

[0137] a0 = cparam[0] a1 = cparam[1] b = cparam[2] The CCLM prediction filter unit generates a chrominance predicted image using a luminance target pixel corresponding to a chrominance pixel of a target block, its adjacent pixels, and CCLM prediction parameters. The intra parameter derivation unit 304 decodes cclm_mode_flag, which indicates whether to perform CCLM prediction for predicting chrominance from luminance. When cclm_mode_flag is a value (here, 1) indicating that CCLM prediction is to be performed, a flag cccm_mode_flag indicating whether luminance and chrominance prediction is to be performed using two luminance pixels is decoded. When cclm_mode_flag is a value (here, 1) indicating that CCLM prediction is to be performed, the CCLM prediction unit generates a predicted image of a chrominance image using a luminance image. At this time, the CCLM prediction parameter derivation unit 310442 derives CCLM prediction parameters consisting of a first weight a0, a second weight a1, and a first offset value b using a reference pixel pRef[x][y] of a luminance reference area adjacent to the target block and an adjacent pixel pRef[x+dX][y+dY] of the reference pixel. Furthermore, the CCLM prediction filter unit 310443 derives the pixel value of the chrominance predicted pixel predSamples from the sum of the product of the luminance reference pixel refSamples[x][y] and a first weight a0, the product of the luminance adjacent pixel prefSamples[x+dX][y+dY] and a second weight a1, and the first offset value b.

[0138] Here, the position of the adjacent pixel in the reference image and the target image is the pixel to the right of the target pixel (x, y). It is characterized by being (x+1, y).

[0139] According to the above, by using only reference pixels, adjacent pixels, and bias, it is possible to obtain a high-quality predicted image while reducing the amount of calculation.

[0140] <Example 2 of 3-parameter configuration> The intra prediction parameter derivation unit 304 determines whether or not cclm_mode_flag is a value indicating that CCLM prediction is to be performed. In the case of (1 here), the index cclm_nei_idx, which indicates the position of the neighboring pixel with respect to the target pixel, is further decoded. The neighboring pixel is selected based on cclm_nei_idx. If cclm_nei_idx is 0, then (dX,dY) = (1,0) If cclm_nei_idx is 1, then (dX,dY) = (0,1) In other words, the CCLM prediction parameters are calculated using the neighboring pixels at the relative positions (dX, dY) of the reference pixel. The CCLM prediction filter unit 310443 derives the luminance reference pixel and the adjacent luminance pixel at the relative position (dX, dY). The chrominance pixels are predicted using the dX pixels. The (dX,dY) position always includes the reference pixel (dX,dY)=(1,0) to the right.

[0141] According to the above, it is possible to generate a high-quality predicted image while reducing the amount of calculation by using only reference pixels, adjacent pixels, and bias.

[0142] The number of options is not limited to two, but may be four, above, below, left and right of the reference pixel. The neighboring pixel is selected by cclm_nei_idx. If cclm_nei_idx is 0, then (dX,dY) = (1,0) If cclm_nei_idx is 1, then (dX,dY) = (0,1) When cclm_nei_idx is 2, (dX,dY) = (-1,0) When cclm_nei_idx is 3, (dX,dY) = (0,-1) According to the above, it is possible to generate a suitable predicted image while reducing the amount of calculation by using only reference pixels, adjacent pixels, and bias. The CCLM prediction parameter derivation unit fixes the number of CCLM prediction parameters regardless of the index, and derives the CCLM prediction parameters by switching positions of neighboring pixels of the reference pixel according to the index, and the CCLM filter unit derives a predicted image by switching the neighboring pixels according to the decoded index.

[0143] When multi-model (MMLM) luminance / chrominance prediction and multi-parameter (CCCM) luminance / chrominance prediction are used together, the derivation process of the multi-parameters related to the above matrix is ​​required for each model of the multi-model, and the amount of calculation increases. Below, we will explain several examples of exclusive configurations that do not use both at the same time.

[0144] <Exclusive configuration example 1> FIG. 14 is a diagram showing a syntax configuration according to an embodiment of the present invention. Thus, the intra prediction parameter derivation unit 304 performs CCLM prediction, which predicts chrominance from luminance. If cclm_mode_flag is a value (here, 1) indicating that CCLM prediction is to be performed, multiple models (CCCM prediction parameters) are derived, and a flag mmlm_mode_flag indicating whether CCLM prediction is to be performed is decoded. If mmlm_mode_flag is a value (here, 0) indicating that multiple models are not used (mmlm_mode_flag==0), luminance and chrominance prediction is performed using multiple luminance pixels. The flag cccm_mode_flag indicating whether to use CCCM mode is decoded. If cccm_mode_flag does not appear (in the case of MMLM mode), cccm_mode_flag is derived as a value (here, 0) indicating that multiple target images are not used. In CCCM mode, the number of parameters required for the filter that generates the predicted pixels is large.

[0145] Furthermore, the intra prediction parameter derivation unit 304 may decode an index cclm_ref_idx indicating the position of the reference pixel. FIG. 3B shows the relationship between IntraPredModeC and each flag and index. When cclm_ref_idx is 0, the reference pixel is located in the area above and to the left of the target block. When cclm_ref_idx is 1, the reference pixel is located in the area to the left of the target block. When cclm_ref_idx is 2, the reference pixel is located in the area above the target block. Here, "-" indicates that the syntax element cccm_mode_flag is not to be decoded, and in the case of "-", cccm_mode_flag=0 is inferred.

[0146] According to this configuration, when multiple models (multi-models) are used, the flag (cccm_mode_flag) indicating whether or not to predict chrominance pixels using multiple luminance pixels is not decoded but is estimated to be 0. In other words, the MMLM mode and the CCCM mode can be mutually exclusive. Therefore, it is possible to avoid complex processing such as deriving multiple CCLM prediction parameters for each of the multiple models, and it is possible to reduce complexity while maintaining performance.

[0147] <Exclusive configuration example 2> FIG. 15 is a diagram showing a syntax configuration according to an embodiment of the present invention. As shown in FIG. 15(a), the intra prediction parameters are The data derivation unit 304 decodes cclm_mode_flag, which indicates whether to perform CCLM prediction, which predicts chrominance from luminance. If cclm_mode_flag is a value indicating that CCLM prediction is to be performed (here, 1), the flag cccm_mode_flag indicating whether to perform filtering of luminance and chrominance prediction using multiple luminance pixels is decoded. If multiple reference pixels are not used (cccm_mode_flag==0), multiple models (CCCM prediction patterns) are used. The mmlm_mode_flag parameter is derived, and the flag mmlm_mode_flag indicating whether to perform CCLM prediction is decoded. If mmlm_mode_flag does not appear, mmlm_mode_flag is derived as 0 indicating that multi-model is not used.

[0148] Furthermore, the intra prediction parameter derivation unit 304 may decode an index cclm_ref_idx indicating the position of the reference pixel. FIG. 1B shows the relationship between IntraPredModeC and each flag and index. When cclm_ref_idx is 0, the reference pixel is located in the upper and left areas of the target block. When cclm_ref_idx is 1, the reference pixel is located in the left area of ​​the target block. When cclm_ref_idx is 2, the reference pixel is located in the upper area of ​​the target block. Here, "-" indicates that the syntax element mmlm_mode_flag is not decoded, and in the case of "-", mmlm_mode_flag=0 is inferred.

[0149] According to this configuration, when multiple reference pixels are referenced in a filter for predicting chrominance (CCCM mode), the flag indicating multi-model (MMLM mode) is not decoded but is estimated to be 0. In other words, MMLM mode and CCCM mode can be made exclusive. Therefore, it is possible to avoid complex processing such as deriving CCLM prediction parameters for CCCM mode, which has a large number of parameters, by placing them in each of multiple models, thereby achieving a reduction in complexity while maintaining performance.

[0150] <Exclusive configuration example 3> FIG. 16 is a diagram showing a syntax configuration according to an embodiment of the present invention. Thus, the intra prediction parameter derivation unit 304 performs CCLM prediction, which predicts chrominance from luminance. If cclm_mode_flag is a value indicating that CCLM prediction is to be performed (here, 1), the decoder decodes an index cclm_mode_idx indicating whether MMLM prediction is to be performed and the reference pixels for CCLM prediction. MMLM prediction is CCLM prediction that uses multiple models (CCCM prediction parameters). CCCM prediction uses multiple luminance reference pixels to predict chrominance pixels. When cclm_mode_idx is 0, 2, or 3, CCLM prediction is not in MMLM mode, and the reference pixels are located in the upper and left regions, left region, and upper region of the current block, respectively. When cclm_mode_idx is 1, 4, or 5, CCLM prediction is in MMLM mode, and the reference pixels are located in the upper and left regions, left region, and upper region of the current block, respectively.

[0151] If cclm_mode_idx is one of the values ​​(specific values, 0, 2, 3 in FIG. 16) indicating that multi-model is not used (IsMMLM(cclm_mode_idx)==0), cccm_mode_flag is decoded. cccm_mode_flag is a flag indicating whether to filter luminance and chrominance predicted pixels using multiple luminance pixels. If cccm_mode_flag does not appear, cccm_mode_flag is derived as a value (0) indicating that multiple target images are not used. Here, IsMMLM is 1 (TRUE) if cclm_mode_idx is any of INTRA_LT_MMLM (e.g. 1), INTRA_L_MMLM (e.g. 4), and INTRA_T_MMLM (e.g. 5), and is 0 (FALSE) otherwise. IsMMLM(cclm_mode_idx) = (cclm_mode_idx == 1) + (cclm_mode_idx == 4) + (cclm_mode_idx == 5). Here, "+" may be a logical sum "|". Figure (b) shows the relationship between IntraPredModeC and each flag and index. Here, "-" indicates that the syntax element cccm_mode_flag is not decoded, and in the case of "-", it is inferred that cccm_mode_flag = 0.

[0152] According to this configuration, when multiple models (multi-models) are used, a flag indicating whether or not multiple reference pixels are used in a filter for predicting chrominance is not decoded but is estimated to be 0. In other words, MMLM mode and CCCM mode are mutually exclusive. Therefore, it is possible to avoid complex processing such as deriving multiple CCLM prediction parameters for CCCM mode in each of the multiple models, thereby achieving a reduction in complexity while maintaining performance.

[0153] <Exclusive configuration example 4> FIG. 17 is a diagram showing a syntax configuration according to an embodiment of the present invention. Then, the intra prediction parameter derivation unit 304 determines whether to perform CCLM prediction, which predicts color difference from luminance. If cclm_mode_flag is a value indicating that CCLM prediction is to be performed (here, 1), cccm_mode_flag is decoded, which indicates whether luminance and chrominance prediction filtering of chrominance pixels is to be performed using multiple luminance pixels. Furthermore, an index cclm_mode_idx is decoded, which indicates whether the mode is MMLM mode or not and indicates the reference pixel position for CCLM prediction. MMLM mode is a mode in which CCLM prediction is performed using multiple models (CCCM prediction parameters). The value of cclm_mode_idx is as explained in <Exclusion Configuration Example 3>.

[0154] Here, the maximum value cMax of cclm_mode_idx is changed according to the value of cccm_mode_flag. is the maximum value when the input value is within the specified range. When cccm_mode_flag==0, MMLM Set cMax=5 so that the mode can be used, and decode cclm_mode_idx using the truncated binary (TB, Truncated Binary) of the maximum value cMax. When cccm_mode_flag==1 In order to disable the use of MMMLM mode, cMax=2 (a value smaller than that when cccm_mode_flag==0) is set, and cclm_mode_idx is decrypted using the TB of cMax. A truncated rice binary (TR) of the same cMax may be used instead of the TB.

[0155] Figure (b) shows the relationship between IntraPredModeC and each flag and index. As mentioned above, ccc When m_mode_flag=1, the value range of cccm_mode_idx is restricted and a small cMax is set, thereby preventing multi-mode from being selected in CCLM mode.

[0156] According to this configuration, when multiple models (multi-models) are used, the flag indicating whether or not to use the CCCM mode is not decoded and is estimated to be 0. In other words, the MMLM mode and the CCCM mode can be made exclusive. Therefore, it is possible to avoid complex processing such as deriving multiple CCLM prediction parameters for the CCCM mode in each of the multiple models, and it is possible to reduce complexity while maintaining performance.

[0157] Furthermore, in <Exclusive Configuration Example 1> to <Exclusive Configuration Example 4>, the cclm_nei_idx described in <Three-parameter Configuration Example 1> may be further signaled. cclm_nei_idx is an index indicating the position of an adjacent pixel with respect to the target pixel. In Fig. 14(a) to Fig. 17(a), when cccm_mode_flag indicates CCCM prediction (1 in this application), cclm_nei_idx is signaled. Otherwise, cclm_nei_idx is not signaled and cclm_nei_idx=0 is inferred.

[0158] if (cccm_mode_flag) { cclm_nei_idx } <Example of exclusive configuration> FIG. 18 is a flowchart showing the operation of the CCLM prediction unit according to one embodiment of the present invention. (S3501) The intra prediction parameter derivation unit 304 decodes cclm_mode_flag from the encoded data. (S3502) If CCLM prediction is to be used, the process proceeds to S3503. Otherwise, the intra prediction unit 3104 performs prediction other than CCLM prediction. (S3503) The intra prediction parameter derivation unit 304 derives information on the type of CCLM prediction from the CU information of the encoded data. For example, The decoder derives whether the target block is in MMLM mode, CCCM mode, or another mode, as well as the reference position and the positions of adjacent pixels. (S3504) If the information about the type of CCLM forecast indicates that multi-model is not used, ,When the CCCM prediction of three or more parameters is used, it transitions to S3507.,On the other hand, when multi-mode is used, CCCM prediction of two parameters is used. (S3506) The intra prediction unit 3104 does not perform CCCM prediction. Instead of performing luminance and chrominance prediction using the CCLM prediction parameters, two parameters, a weighting coefficient for luminance pixels and a bias, are derived and luminance and chrominance prediction is performed using these two parameters. For example, prediction is performed using the formula (MMLM-1). (S3507) The intra prediction unit 3104 performs CCCM prediction. The measurement parameters are derived, and luminance and color difference prediction is performed using CCLM prediction parameters of three or more parameters. For example, predictions are made using the formulas (CCCM-1) and (CCCM-2).

[0159] According to the above configuration, a CCLM prediction unit that generates a predicted image of a color difference image using a luminance image, the CCLM prediction parameter derivation unit that classifies into groups according to luminance pixel values and can derive a plurality of CCLM prediction parameters for each group, and a CCLM prediction filter unit 310443 that generates a predicted color difference image using a luminance reference image and the CCLM prediction parameters. The CCLM prediction parameter derivation unit changes the number of parameters of the CCLM prediction according to whether it divides into two or more groups according to the pixel values of the luminance image. Further, the CCLM prediction parameter derivation unit 310442 derives CCLM prediction parameters using the number of parameters of the 2-parameter CCLM prediction when classifying into two or more groups according to the pixel values of the luminance image, and otherwise, when using one group, derives the number of parameters using the number of parameters of the 3-parameter CCLM prediction. Further, a parameter decoding unit 302 that decodes a CCLM flag indicating whether to perform 3-parameter CCLM prediction and a CCLM flag indicating whether to perform 2-parameter CCLM prediction from the encoded data, and a moving image decoding device including a CCLM prediction unit, wherein when the CCLM flag is 1, one CCLM prediction parameter is derived, and in other cases, two or more CCLM prediction parameters are derived.

[0160] FIG. 19 is a flowchart showing the operation of the CCLM prediction unit according to an embodiment of the present invention. (S3501) to (S3503) have already been described with reference to FIG. 18, so the description is omitted. (S3504) When information regarding the type of CCLM prediction indicates that a multi-model is used, the process proceeds to S3506 and CCCM prediction is not used. Conversely, when a multi-model is not used, the process proceeds to S3505. Transition. (S3505) When the size of the target block is smaller than a predetermined size, for example, when cbWidth * cbHeight < TH, the process proceeds to S3506 and 2-parameter multi-model prediction is used without using CCCM prediction. When the size of the target block is equal to or larger than the predetermined size, the process proceeds to S3507 and CCCM prediction is used. The above can also be derived as follows using cccm_mode_flag:

[0161] cccm_mode_flag = ((cbWidth * cbHeight) >= TH ? 1 : 0) && cclm_mode_flag (S3506) to (S3507) This has already been explained using FIG. 18, so the explanation will be omitted.

[0162] According to the above configuration, whether or not to use the CCCM mode is selected depending on the block size without decoding the syntax from the encoded data, thereby achieving the effect of reducing complexity while maintaining performance.

[0163] CCLM prediction is explained below. In the figure, the target block and adjacent blocks in the luminance image are represented by pY[][] and pRefY[][]. The target block has width bW and height bH.

[0164] The CCLM prediction unit 31044 (unfiltered reference image setting unit 3102) derives CCLM prediction parameters using the luminance adjacent image pRefY[][] in Fig. 9(a) to (c) and the chrominance adjacent image pRefC[][] in Fig. 9(e) as reference regions. The CCLM prediction unit 31044 derives a chrominance predicted image using the luminance target image pRef[].

[0165] When IntraPredModeC is INTRA_LT_CCLM, INTRA_LT_MMLM, or INTRA_LT_CCCM_SINGLE, the CCLM prediction unit 31044 derives CCLM prediction parameters using pixel values ​​of the upper and left adjacent blocks of the target block as shown in (a). When IntraPredModeC is 82(INTRA_L_CCLM, INTRA_L_MMLM, or INTRA_L_CCCM_SINGLE, the CCLM prediction parameters are derived using pixel values ​​of the left adjacent block as shown in (b). When IntraPredModeC is 83(INTRA_T_CCLM, INTRA_T_MMLM, or INTRA_T_CCCM_SINGLE, the CCLM prediction parameters are derived using pixel values ​​of the upper adjacent block as shown in (c). The size of each region may be as follows. In (a), the upper side of the target block is The width is bW and the height is refH (refH>1), and the left side of the target block has height bH and width refW (refW>1). In (b), the height is 2*bH and the width is refW. In (c), the width is 2*bW and the height is refH. To perform downsampling processing, refW and refH may be set to values ​​greater than 1 to match the number of taps of the downsampling filter. Also, in (e), the target block and adjacent blocks of the color difference image (Cb, Cr) are represented by pC[][] and pRefC[][]. The target block has width bWC and height bHC.

[0166] (CCLM Forecasting Department) The CCLM prediction unit 31044 will be described with reference to Fig. 8. Fig. 8 is a block diagram showing an example of the configuration of the CCLM prediction unit 31044. The CCLM prediction unit 31044 includes a downsampling unit 310441, a CCLM prediction parameter derivation unit (parameter derivation unit) 310442, and a CCLM prediction filter unit 310443.

[0167] The downsampling unit 310441 downsamples pRefY[][] and p Downsample Y[][]. If the chrominance format is 4:2:0, pRefY[][] and pY[][] The number of pixels in the horizontal and vertical directions is sampled at a ratio of 2:1, and the results are stored in pRefDsY[][] and pDsY[][] in Figure 9(d). Note that bW / 2 and bH / 2 are equal to bWC and bHC, respectively. If the chrominance format is 4:4:4, sampling is not performed and pRefY[][] and pY[][] are stored in pRefDsY[][] and pDsY[][]. An example of sampling is shown in the formula below.

[0168] pDsY[x][y] = (pY[2*x-1][2*y]+pY[2*x-1][2*y+1]+2*pY[2*x][2*y]+2*pY[2*x][2*y+1]+pY[2*x+1][2*y]+pY[2*x+1][2*y+1]+4)>>3 pRefDsY[x][y] = (pRefY[2*x-1][2*y]+pRefY[2*x-1][2*y+1]+2*pRefY[2*x][2*y]+2*pRefY[2*x][2*y+1]+pRefY[2*x+1][2*y]+pRefY[2*x+1][2*y+1]+4)>>3 When cccm_mode_flag==0, the CCLM prediction filter unit 310443 receives one reference pixel refSamples[x][y] as an input signal and generates a predicted image predSamples[x][y] using CCLM prediction parameters (a, b). Output.

[0169] predSamples[x][y] = ((a*refSamples[x][y])>>shiftA)+b (CCLM-1) Here, refSamples is pDsY in FIG. 9(d), and (a, b) are the CCLM prediction parameter derivation unit 310442. are the derived CCLM prediction parameters, and predSamples[][] is the color difference predicted image (pC in Fig. 9(e)). Note that (a, b) are derived for Cb and Cr, respectively. Also, shiftA is the normalization shift number that indicates the accuracy of the a value, and if the slope of the decimal precision is af, then a = af << shiftA. For example, shiftA=16.

[0170] (Multi-adjacent) When cccm_mode_flag==1, the CCLM prediction filter unit 310443 uses the reference image refSamples[x][y] and its adjacent pixels refSamples[x+dX][y+dY] are used as input signals, and the CCLM prediction parameters (a, b) are The predicted image predSamples[x][y] is output using the dX,dY. For example, (-1,0),(1,0),(0,-1),(0,1), etc. predSamples[x][y] =((a0*refSamples[x][y]+Σak*refSamples[x+dXk][y+dYk])>>shiftA)+b (CCCM-1) Here, Σ is the sum with respect to k, where k=1 and (dX1, dY1) may be any one of (-1, 0), (1, 0), (0, -1), or (0, 1).

[0171] Furthermore, the weighting coefficients ak of the neighboring pixels may be multi-parameter.

[0172] For example, k=1..2, (dX1,dY1)=(1,0), (dX2,dY2)=(0,1). Written out, this can be expressed as the following equation.

[0173] predSamples[x][y] =((a0*refSamples[x][y]+a1*refSamples[x+1][y]+a2*refSamples[x][y+1])>>shiftA)+b (CCCM-1) In addition, when generating the chrominance predicted image predSamples, if cclm_mode_flag==0, the downsampled luminance image is used, and if cccm_mode_flag==1, the downsampled luminance image is used. For example, when cccm_mode_flag==1, predSamples may be derived as follows:

[0174] predSamples[x][y] =(a0*refSamples[x*SubWidthC][y*SubHeightC]+Σak*refSamples[x*SubWidthC+dXk][y*SubHeightC+dYk])>>shiftA)+b (CCCM-2) Derive as follows according to the syntax element sps_chroma_format_idc in the encoded data: Good too.

[0175] When sps_chroma_format_idc=0(Monochrome), SubWidthC=1, SubHeightC=1 When sps_chroma_format_idc=1(4:2:0), SubWidthC=2, SubHeightC=2 When sps_chroma_format_idc=2(4:2:2), SubWidthC=2, SubHeightC=1 When sps_chroma_format_idc=3(4:4:4), SubWidthC=1, SubHeightC=1 Furthermore, filtering may be performed using multiple models.

[0176] (Multiple models) IntraPredModeC==INTRA_LT_MMLM, INTRA_L_MMLM, INTRA_T_MMLM (multi-mode) In this case, the luminance signal may be classified according to its magnitude, multiple CCLM prediction parameters may be derived according to the classification, and a predicted image may be derived according to the prediction parameters. For example, a certain threshold thVal may be used to classify pixels into modeId according to the magnitude of refSamples as follows. Then, filtering is performed using CCLM prediction parameters a[modelId] and b[modelId] determined according to modeId.

[0177] if (refSamples[x][y] > thVal) modelId=0 else modelId=1 predSamples[x][y] =((a0[modeId]*refSamples[x][y])>>shiftA)+b (MMLM-1) (Multi-model and multi-adjacent) If IntraPredModeC==INTRA_LT_MMLM_CM _CCCM, INTRA_L_MMLM, INTRA_T_MMLM_CCCM In other words, when using MMLM and CCCM together, the following process is performed.

[0178] predSamples[x][y] =((a0[modelId]*refSamples[x][y]+ Σak[modelId]*refSamples[x+1][y])>>shiftA)+b (CCCM-1) Note that this configuration is not used in the above-mentioned exclusive configuration.

[0179] As shown in FIG. 8B, the CCLM prediction filter unit 310443 includes a linear prediction unit 310444. The linear prediction unit 310444 receives refSamples[][] as an input signal and performs a linear prediction using CCLM prediction parameters (a, b). and output predSamples[][].

[0180] More specifically, the linear prediction unit 310444 calculates the following equation using CCLM prediction parameters (a, b): Then, chrominance Cb or Cr is derived from luminance Y, and used to output predSamples[][].

[0181] Cb (or Cr) = aY + b The CCLM prediction parameter derivation unit 310442 derives CCLM prediction parameters using the downsampled luminance block pRefY (pRefDsY[][] in FIG. 9(d)) and the chrominance block pRefC[][] (pRefC[][] in FIG. 9(e)) as input signals. The CCLM prediction parameter derivation unit 310442 outputs the derived CCLM prediction parameters (a, b) to the CCLM prediction filter unit 310443.

[0182] (CCLM prediction parameter derivation part) The CCLM prediction parameter derivation unit 310442 derives CCLM prediction parameters (a, b) when linearly predicting the prediction block predSamples[][] of the target block from the reference block refSamples[][] for two parameters (if cccm_mode_flag == 0, IntraPredModeC = INTRA_LT_CCLM, INTRA_L_CCLM, INTRA_T_CCLM, INTRA_LT_MMLM, INTRA_L_MMLM, INTRA_T_MMLM).

[0183] In deriving the CCLM prediction parameters (a, b), the CCLM prediction parameter derivation unit 310442 From a set of blocks (luminance value Y, color difference value C), the point (x1, y1) where the luminance value Y is maximum (Y_MAX) and the point (x2, y2) where the luminance value Y is minimum (Y_MIN) are derived. Next, the pixel values ​​(x1, y1) and (x2, y2) on pRefC corresponding to (x1, y1) and (x2, y2) on pRefDsY are set as C_MAX (or C_Y_MAX) and C_MIN (or C_Y_MIN), respectively. Then, as shown in FIG. 10(a), a straight line is obtained connecting (Y_MAX, C_MAX) and (Y_MIN, C_MIN) on a graph with Y and C on the x and y axes, respectively. The CCLM prediction parameters (a, b) of this straight line can be derived using the following formula.

[0184] a=(C_MAX-C_MIN) / (Y_MAX-Y_MIN) b = C_MIN-(a*Y_MIN) When this (a, b) is used, shiftA=0 in equation (CCLM-1). Here, if the color difference is Cb, (C_MAX, C_MIN) are the pixel values ​​(x1, y1) and (x2, y2) of the Cb adjacent block pRefCb[][], and if the color difference is Cr, (C_MAX, C_MIN) are the pixel values ​​(x1, y1) and (x2, y2) of the Cr adjacent block pRefCr[][].

[0185] The CCLM prediction parameter derivation unit 310442 calculates the inverse Derive the CCLM prediction parameters a, b, and shiftA using the divSigTable function. .

[0186] diff = maxY - minY If diff !=0, diffC = maxC ? minC x = Floor(Log2(diff)) normDiff = ((diff << 4) >> x) & 15 x += (normDiff != 0) ? 1 : 0 y = Abs(diffC)>0 ? Floor(Log2(Abs(diffC))) + 1 : 0 a = (diffC * (divSigTable[normDiff] | 8) + 2 * y ? 1) >> y shiftA = ((3 + x ? y) < 1) ? 1 : 3 + x ? y a = ((3 + x ? y ) < 1) ? Sign(a) * 15 : a b = minC ? ((a * minY) >> k) divSigTable[ ] = { 0, 7, 6, 5, 5, 4, 4, 3, 3, 2, 2, 1, 1, 1, 1, 0} If diff == 0, shiftA = 0 a = 0 b = minC In the case of three or more parameters (when cccm_mode_flag==1, IntraPredModeC=INTRA_LT_CCCM_SINGLE, INTRA_L_CCCM_SINGLE, or INTRA_T_CCCM_SINGLE), the CCLM prediction parameter derivation unit 310442 derives CCLM prediction parameters (a0, a1, . . . aN-2, b) consisting of N elements. good.

[0187] The CCLM prediction parameter derivation unit 310442 derives the following temporary reference arrays refX[][], refY[] from the reference images pRefY and pRefC.

[0188] refX[0][cnt]=pRefY[x][y] refX[1][cnt]=pRefY[x+dX1][y+dY1] refX[2][cnt]=pRefY[x+dX2][y+dY2] … refX[N-2][cnt]=pRefY[x+dXN-2][y+dYN-2] refX[N-1][cnt]=1 refY[cnt] = pRefC[x / SubWidthC][y / SubHeightC] cnt=cnt+1 The above iterates over the (x,y) of the reference region of the target block, incrementing cnt by 1 each time.

[0189] The CCLM prediction parameter derivation unit 310442 derives the following matrix sumXX and vector from the reference images pRefY and pRefC. Derive the vector sumXY.

[0190] sumXX[i][j] = ΣrefX[i][cnt]*refX[j][cnt] sumXY[i] = ΣrefX[i][cnt]*refY[cnt] Here, Σ is the sum with respect to cnt. It is also possible to derive sumXX and sumXY directly from pRefY and pRefC without using refX[][] and refY[]. In addition, add regularization terms to the diagonal elements. sumXX[i][i] = sumXX[i][i] + (1<<(bitDepth-1)) The CCLM prediction parameter derivation unit 310442 performs linear arithmetic corresponding to cparam=sumXY*inverse(sumXX). Here, inverse(X) is the inverse matrix of X. N is the number of parameters. The number of pixels, where N>=3. The number of neighboring pixels + 1.

[0191] a0 = cparam[0] a1 = cparam[2] … b = cparam[N-1] (Derivation of CCLM prediction parameters in the case of MMLM) In the case of MMLM, multiple CCLM prediction parameters are derived for the target block. Then, as shown in Fig. 10(b), a straight line is found connecting (Y_MAX, C_MAX) and (Y_MIN, C_MIN) on a graph with Y and C on the x and y axes, respectively. However, unlike Fig. 10(a), there are multiple luminance and chrominance models, and a straight line is found connecting (Y_MAX, C_MAX) and (Y_MIN, C_MIN) for each model. Here, classification is performed according to the luminance value of the reference region, and modelId is derived.

[0192] if (pRefY[x][y] > thVal) modelId=0 else modelId=1 Here, thVal is the threshold for classification, and is the average (or may be used.

[0193] For each value of modelId, set refX[modelId][N][cnt] and refY[modelId][N][cnt] as described above. Derivation,sumXX[modelId][i][i],sumXX[modelId][i][i] may be derived to derive CCLM prediction parameters.

[0194] a0[modelId] = cparam[0] a1[modelId] = cparam[1] … b[modelId] = cparam[N-1] (Hardware and Software Realizations) Furthermore, each block of the above-mentioned video decoding device 31 and video encoding device 11 may be realized in hardware by a logic circuit formed on an integrated circuit (IC chip), or may be realized by a CPU. This may be realized in software using a Central Processing Unit (Central Processing Unit).

[0195] In the latter case, each of the above devices includes a CPU that executes the instructions of a program that realizes each function, ROM (Read Only Memory) stores the program, and RAM (Random Access Memory) expands the program. The object of the embodiment of the present invention is to provide a storage device (recording medium) such as a control program for each of the above-mentioned devices, which is software for implementing the above-mentioned functions, and a program code (executable program) for the control program for each of the above-mentioned devices. This can also be achieved by supplying a recording medium on which the program code (program, intermediate code program, source program) is recorded in a computer-readable manner to each of the above-mentioned devices, and having the computer (or CPU or MPU) read and execute the program code recorded on the recording medium.

[0196] Examples of the recording medium that can be used include tapes such as magnetic tapes and cassette tapes, magnetic disks such as floppy disks (registered trademark) and hard disks, disks including optical disks such as CD-ROMs (Compact Disc Read-Only Memory), MO disks (Magneto-Optical discs), MDs (Mini Discs), DVDs (Digital Versatile Discs: registered trademark), CD-Rs (CD Recordable), and Blu-ray Discs (registered trademark), cards such as IC cards (including memory cards) and optical cards, semiconductor memories such as mask ROMs, EPROMs (Erasable Programmable Read-Only Memory), EEPROMs (Electrically Erasable and Programmable Read-Only Memory: registered trademark), and flash ROMs, and logic circuits such as PLDs (Programmable logic devices) and FPGAs (Field Programmable Gate Arrays).

[0197] Moreover, each of the above devices may be configured to be connectable to a communication network, and the above program code may be supplied via the communication network. This communication network is not particularly limited as long as it is capable of transmitting the program code. For example, the Internet, an intranet, an extranet, a LAN (Local Area Network), an ISDN (Integrated Services Digital Network), a VAN (Value-Added Network), a CATV (Community Antenna television / Cable Television) communication network, a virtual private network, a telephone line network, a mobile communication network, a satellite communication network, etc. may be used. Moreover, the transmission medium constituting this communication network is not limited to a specific configuration or type as long as it is a medium capable of transmitting the program code. For example, it can be used in wired communication such as IEEE (Institute of Electrical and Electronic Engineers) 1394, USB, power line carrier, cable TV line, telephone line, ADSL (Asymmetric Digital Subscriber Line) line, etc., or in wireless communication such as infrared such as IrDA (Infrared Data Association) or remote control, BlueTooth (registered trademark), IEEE802.11 wireless, HDR (High Data Rate), NFC (Near Field Communication), DLNA (Digital Living Network Alliance: registered trademark), mobile phone network, satellite line, terrestrial digital broadcasting network, etc. The embodiment of the present invention can also be realized in the form of a computer data signal embedded in a carrier wave in which the program code is embodied by electronic transmission.

[0198] The present invention is not limited to the above-described embodiment, and various modifications are possible within the scope of the claims. In other words, the technical scope of the present invention also includes embodiments obtained by combining technical means that are appropriately modified within the scope of the claims. [Explanation of symbols]

[0199] 31 Image Decoding Device 301 Entropy Decoding Unit 302 Parameter Decoding Unit 303 Inter-prediction parameter derivation unit 304 Intra prediction parameter derivation unit 308 Prediction Image Generation Unit 309 Inter-prediction image generation unit 310 Intra-prediction image generation unit 3104 Prediction unit (intra prediction unit) 31044 CCLM prediction unit (prediction image generation device) 310441 Downsampling section 310442 CCLM prediction parameter derivation part (parameter derivation part) 310443 CCLM prediction filter part 311 Inverse quantization and inverse transformation unit 312 Addition section 320 Prediction Parameter Derivation Unit 11 Image encoding device 101 Prediction image generation unit 102 Subtraction section 103 Transformation and Quantization Section 104 Entropy coding unit 105 Inverse quantization and inverse transformation unit 107 Loop Filter 110 Encoding parameter determination unit 111 Parameter Encoding Unit 112 Inter-prediction parameter derivation unit 113 Intra prediction parameter derivation unit 120 Prediction parameter derivation part

Claims

1. A predicted image generation device that generates a predicted image of a color difference image using a luminance image, comprising: a CCLM prediction parameter derivation unit that derives CCLM prediction parameters; a CCLM prediction filter unit that generates a color difference predicted image using a luminance reference image and the CCLM prediction parameters, wherein the CCLM prediction parameter derivation unit derives CCLM prediction parameters consisting of a first weight, a second weight, and a first offset value using reference pixels in a reference region adjacent to a target block and adjacent pixels of the reference pixels; the CCLM prediction filter unit is characterized in that it derives a pixel value of a predicted pixel from the product of the target pixel and the first weight, the product of the adjacent pixel of the target pixel and the second weight, and the sum of the first offset value.

2. The predicted image generation device according to claim 1, wherein the positions of adjacent pixels in the reference image and the target image are pixels to the right of the target pixel (x, y), i.e., (x + 1, y).

3. A moving image decoding device comprising the predicted image generation device according to claim 1, and a parameter derivation unit that decodes an index indicating the position of an adjacent pixel, wherein the number of CCLM prediction parameters is fixed regardless of the index, the position of the adjacent pixel of the reference pixel is switched according to the index to derive the CCLM prediction parameters, and a predicted image is derived by switching the adjacent pixels according to the index.

4. A moving image encoding device comprising the predicted image generation device according to claim 1, and a parameter derivation unit that encodes an index indicating the position of an adjacent pixel, wherein the number of CCLM prediction parameters is fixed regardless of the index, the position of the adjacent pixel of the reference pixel is switched according to the index to derive the CCLM prediction parameters, and a predicted image is derived by switching the adjacent pixels according to the index.

5. The moving image decoding device according to claim 3, wherein the index and a flag indicating whether to perform CCLM prediction are decoded from encoded data of a sequence header, a slice header, or a CTU header.

6. A linear prediction unit that derives parameters as coefficients of multiplication and coefficients of bias is provided. A prediction image generation device according to claim 1, characterized in that, when it is the multi-model that classifies the luminance signal into groups using the magnitude of the luminance signal and derives a plurality of types of CCLM prediction parameters thus classified, or the single-model that derives one type of CCLM prediction parameter, it does not derive three or more parameters.

7. Decoding a syntax element including whether to classify into two groups, The prediction image generation device according to claim 6, further comprising decoding a syntax element indicating whether to derive three or more parameters when the syntax element indicates using one group.

8. Decoding a syntax element indicating whether to derive three or more parameters, The prediction image generation device according to claim 6, further comprising decoding a syntax element including whether to classify into two groups when the syntax element indicates two parameters.