Moving image decoder and moving image encoder

The CCLM prediction unit addresses memory and complexity issues in video coding by using a reciprocal table and right-shifting to derive CCLM prediction parameters, enhancing processing efficiency in video decoding devices.

JP2025078763AActive Publication Date: 2025-05-20SHARP KK
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
JP2025034292
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Priority Date
2018-12-20
Filing Date
2025-03-05
Publication Date
2025-05-20
Estimated Expiration
2039-12-17

AI Technical Summary

Technical Problem

Existing video coding methods, such as CCLM prediction, require large memory for table lookup and complex multiplication operations due to large bit widths of linear prediction parameters, leading to increased hardware complexity.

Method used

A CCLM prediction unit that derives CCLM prediction parameters using a reciprocal table composed of single-digit integer values and employs right-shifting to limit bit width, simplifying multiplication operations.

Benefits of technology

This approach reduces memory requirements and simplifies multiplication, thereby reducing hardware complexity and improving processing efficiency in video decoding devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025078763000001_ABST
    Figure 2025078763000001_ABST
Patent Text Reader

Abstract

To reduce the amount of memory required for CCLM prediction.SOLUTION: A CCLM prediction parameter derivation part executes the steps of: deriving an index for referring to a reciprocal table and a variable for limiting a bit width of a first CCLM prediction parameter; deriving the first CCLM prediction parameter by right shifting a value calculated from the reciprocal table specified by the index by the variable; and deriving a second CCLM prediction parameter using the first CCLM prediction parameter. The reciprocal table starts from 0 and contains a plurality of single-digit integers.SELECTED DRAWING: Figure 11
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] An embodiment of the present invention relates to 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 the 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 encoding methods include H.264 / AVC and High-Efficiency Video Coding (HEVC).

[0004] In such a video coding method, images (pictures) constituting a video are managed in a hierarchical structure consisting of slices obtained by dividing images, coding tree units (CTUs) obtained by dividing slices, coding units (sometimes called coding units: CUs) obtained by dividing coding tree units, and transform units (TUs) obtained by dividing coding units, and are coded / 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 techniques, CCLM (Cross-Component Linear Model) prediction is known, which generates a predicted image of a chrominance image from a luminance image. In CCLM prediction, linear prediction parameters are derived using decoded images adjacent to a target block, and the chrominance of the target block is predicted from the linear prediction model (CCLM model) (Non-Patent Document 2). [Prior art documents] [Non-patent literature]

[0007] [Non-Patent Document 1] "Versatile Video Coding (Draft 3)", JVET-L1001, Joint Video Exploration Team (JVET) of ITU-T SG 16 WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11, 2018-11-08 17:06:06 [Non-Patent Document 2] "CE3-5.1: On cross-component linear model simplification", JVETL0191,Joint Video Exploration Team (JVET) of ITU-T SG 16 WP 3 and ISO / IEC JTC 1 / SC 29 / WG 11, 2018-10-03 Summary of the Invention [Problem to be solved by the invention]

[0008] As described above, in CCLM processing, linear prediction parameters are derived and a predicted image is generated using a linear prediction model. The linear prediction parameters are derived using integer arithmetic and table lookup, but this table requires a large amount of memory.

[0009] Furthermore, when deriving a predicted value using the product of the slope term of the linear prediction parameter (CCLM prediction parameter a) and the pixel value, the method of Non-Patent Document 1 has a problem that the complexity of the product is large because the bit width of the CCLM prediction parameter a becomes large. Non-Patent Document 1 also uses a product to derive the slope term of the linear prediction parameter (CCLM prediction parameter a) and the offset term of the linear prediction parameter (CCLM prediction parameter b), but this product is also complex because it is a product of values ​​with a large bit width. Note that the product of values ​​with a large bit width increases the hardware scale. [Means for solving the problem]

[0010] In order to solve the above problem, a CCLM prediction unit according to one embodiment of the present invention includes a CCLM prediction parameter derivation unit that derives (i) a first CCLM (Cross-Component Linear Model) prediction parameter and (ii) a second CCLM (Cross-Component Linear Model) prediction parameter, wherein the CCLM prediction parameter derivation unit derives an index for referencing a reciprocal table and a variable for limiting a bit width of the first CCLM prediction parameter, derives the first CCLM prediction parameter by right-shifting a value calculated from a value of the reciprocal table identified by the index by the variable, and derives the second CCLM prediction parameter using the first CCLM prediction parameter, wherein the reciprocal table starts from 0 and is composed of a plurality of single-digit integer values. Moreover, a CCLM prediction unit according to one embodiment of the present invention is a CCLM prediction unit that generates a predicted image by CCLM prediction, and includes a CCLM prediction parameter derivation unit that derives CCLM prediction parameters (a, b) using a luminance difference value, a chrominance difference value, and a table, and a CCLM prediction filter unit that generates a chrominance predicted image using a luminance reference image and the CCLM prediction parameters (a, b), wherein the CCLM prediction parameter derivation unit derives the CCLM prediction parameter a by right-shifting a value obtained by multiplying a value of a reciprocal table referenced using the luminance difference value by the chrominance difference value by a first shift value shift_a, and the CCLM prediction filter unit derives the chrominance predicted image by right-shifting the product of the parameter a and luminance by a second predetermined shift value shiftA. Effect of the Invention

[0011] According to one aspect of the present invention, there is an advantage that multiplication with linear prediction parameters in CCLM prediction is simplified. [Brief description of the drawings]

[0012] [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] 1 is a diagram showing the configuration of a transmitting device equipped with a video encoding device according to the present embodiment, and a receiving device equipped with a video decoding device, where (a) shows the transmitting device equipped with the video encoding device, and (b) shows the receiving device equipped with the video decoding device. [Diagram 3] 1 is a diagram showing the configuration of a recording device equipped with a video encoding device according to the present embodiment, and a playback device equipped with a video decoding device, where (a) shows the configuration of a recording device equipped with a video encoding device, and (b) shows the configuration of a playback device equipped with a video decoding device. [Figure 4] FIG. 2 is a diagram showing a hierarchical structure of data in an encoded stream. [Diagram 5] FIG. 13 is a diagram illustrating an example of division of a CTU. [Figure 6]FIG. 13 is a schematic diagram showing types of intra-prediction modes (mode numbers). [Figure 7] FIG. 1 is a schematic diagram showing a configuration of a video decoding device. [Figure 8] FIG. 13 is a schematic diagram showing a configuration of an intra-prediction parameter decoding unit. [Figure 9] FIG. 13 is a diagram showing reference regions used for intra prediction. [Figure 10] FIG. 13 is a diagram illustrating a configuration of an intra-prediction image generating unit. [Figure 11] 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 12] 2 is a block diagram showing an example of the configuration of a CCLM prediction filter unit according to an embodiment of the present invention. FIG. [Figure 13] 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 14] FIG. 1 is a diagram showing an example of a combination of (luminance, chrominance) used in CCLM prediction according to the present embodiment. [Figure 15] FIG. 1 is a block diagram showing a configuration of a video encoding device. [Figure 16] 13 is a schematic diagram showing a configuration of an intra-prediction parameter encoding unit. [Figure 17] FIG. 13 is a diagram for explaining an example of calculating a value of an element not held in a table. [Figure 18] FIG. 13 is a diagram for explaining an example of calculating a value of an element not held in a table. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

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

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

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

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

[0017] 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).

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

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

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

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

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

[0023] Clip3(a, b, c) is a function that clips c to a value between a and b (inclusive). If c < a, it returns a; if c > b, it returns b; otherwise, it returns c (where a <= b).

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

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

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

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

[0028] a / d represents the division of a by d (truncating the fractional part).

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

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

[0031] Fig. 4 is a diagram showing a hierarchical structure of data in an encoded stream Te. The encoded stream Te illustratively includes a sequence and a plurality of pictures constituting the sequence. (a) to (f) of Fig. 4 show an encoded video sequence that defines a sequence SEQ, an encoded picture that defines a picture PICT, an encoded slice that defines a slice S, encoded slice data that defines slice data, an encoding tree unit included in the encoded slice data, and an encoding unit included in the encoding tree unit, respectively.

[0032] (Coded Video Sequence) In the coded video sequence, a set of data that the video decoding device 31 refers to in order to decode the sequence SEQ to be processed is specified. As shown in Fig. 4(a), the sequence SEQ includes a video parameter set (Video Parameter Set), a sequence parameter set SPS (Sequence Parameter Set), a picture parameter set PPS (Picture Parameter Set), a picture PICT, and supplemental enhancement information SEI (Supplemental Enhancement Information).

[0033] The video parameter set VPS specifies a set of coding parameters common to multiple videos composed of multiple layers, as well as a set of coding parameters related to multiple layers and each individual layer included in the video.

[0034] The sequence parameter set SPS specifies a set of coding parameters that the video decoding device 31 refers to in order to decode the target sequence. 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 is selected from the PPS.

[0035] The picture parameter set PPS specifies a set of coding parameters that the video decoding device 31 refers to in order to decode each picture in the target sequence. For example, the picture parameter set PPS includes a reference value of the quantization width (pic_init_qp_minus26) used in decoding the picture and a flag (weighted_pred_flag) indicating the application of weighted prediction. Note that there may be multiple PPSs. In that case, one of the multiple PPSs is selected for each picture in the target sequence.

[0036] (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. 4(b), the picture PICT includes slices 0 to NS-1 (NS is the total number of slices included in the picture PICT).

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

[0038] (Coded Slice) A coded slice defines a set of data to be referenced by the video decoding device 31 in order to decode a target slice S. As shown in Fig. 4(c), a slice includes a slice header and slice data.

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

[0040] Slice types that can be specified by the slice type specification information include (1) an I slice that uses only intra prediction when encoding, (2) a P slice that uses unidirectional prediction or intra prediction when encoding, and (3) a B slice that uses unidirectional prediction, bidirectional prediction, or intra prediction when encoding. Note that inter prediction is not limited to uni-prediction or bi-prediction, and a predicted image may be generated using more reference pictures. Hereinafter, when referring to P or B slice, it refers to a slice including a block that can use inter prediction.

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

[0042] (Encoded slice data) The coded slice data defines 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. 4(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).

[0043] (coding tree unit) 4(e) specifies a set of data that the video decoding device 31 refers to in order to decode the CTU to be processed. The CTU is divided into coding units CU, which are basic units of the encoding process, by recursive quad tree division (QT (Quad Tree) division), binary tree division (BT (Binary Tree) division), or ternary tree division (TT (Ternary Tree) division). BT division and TT division are collectively called multi tree division (MT (Multi Tree) division). A node of a tree structure obtained by recursive quad tree division is called a coding node. Intermediate nodes of the quad tree, binary tree, and ternary tree are coding nodes, and the CTU itself is specified as the top coding node.

[0044] CT includes, as CT information, a QT split flag (qt_split_cu_flag) indicating whether or not QT split is performed, an MT split flag (mtt_split_cu_flag) indicating the presence or absence of MT split, an MT split direction (mtt_split_cu_vertical_flag) indicating the split direction of MT split, and an MT split type (mtt_split_cu_binary_flag) indicating the split type of MT split. qt_split_cu_flag, mtt_split_cu_flag, mtt_split_cu_vertical_flag, and mtt_split_cu_binary_flag are transmitted for each encoding node.

[0045] 5 is a diagram showing an example of division of a CTU. When qt_split_cu_flag is 1, the coding node is divided into four coding nodes (FIG. 5(b)).

[0046] When qt_split_cu_flag is 0, and mtt_split_cu_flag is 0, the coding node is not split and has one CU as a node (Figure 5(a)). A CU is the terminal node of a coding node and is not split any further. A CU is the basic unit of coding processing.

[0047] When mtt_split_cu_flag is 1, the coding node is MT-split as follows: When mtt_split_cu_vertical_flag is 0 and mtt_split_cu_binary_flag is 1, the coding node is split horizontally into two coding nodes (Fig. 5(d)), and when mtt_split_cu_vertical_flag is 1 and mtt_split_cu_binary_flag is 1, the coding node is split vertically into two coding nodes (Fig. 5(c)). When mtt_split_cu_vertical_flag is 0 and mtt_split_cu_binary_flag is 0, the coding node is split horizontally into three coding nodes (Fig. 5(f)), and when mtt_split_cu_vertical_flag is 1 and mtt_split_cu_binary_flag is 0, the coding node is split vertically into three coding nodes (Fig. 5(e)). These are shown in Fig. 5(g).

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

[0049] (Encoding Unit) As shown in Fig. 4(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 is composed of a CU header CUH, prediction parameters, transformation parameters, quantization transformation coefficients, etc. The CU header defines a prediction mode, etc.

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

[0051] 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).

[0052] The transform and quantization processes are performed in units of CUs, but the quantized transform coefficients may be entropy coded in units of sub-blocks such as 4x4.

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

[0054] The prediction parameters of intra prediction will be described below. The intra prediction parameters are composed of a luminance prediction mode IntraPredModeY and a color difference prediction mode IntraPredModeC. FIG. 6 is a schematic diagram showing types of intra prediction modes (mode numbers). As shown in the figure, there are, for example, 67 types (0 to 66) of intra prediction modes. For example, they are planar prediction (0), DC prediction (1), and angular prediction (2 to 66). Furthermore, for color difference, CCLM modes (81 to 83) may be added.

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

[0056] (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.

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

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

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

[0060] The parameter decoding unit 302 further includes a header decoding unit 3020, a CT information decoding unit 3021, and a CU decoding unit 3022 (prediction mode decoding unit), and the CU decoding unit 3022 further 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.

[0061] The parameter decoding unit 302 includes an inter prediction parameter decoding unit 303 and an intra prediction parameter decoding unit 304. The predicted image generating unit 308 includes an inter prediction image generating unit 309 and an intra prediction image generating unit 310.

[0062] In the following, an example will be described in which CTU and CU are used as processing units, but this is not limiting, and processing may be performed in sub-CU units. Alternatively, CTU and CU may be read as blocks, and sub-CU as sub-blocks, and processing may be performed in block or sub-block units.

[0063] The entropy decoding unit 301 performs entropy decoding on the externally input coded stream Te 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.

[0064] (Configuration of the intra prediction parameter decoding unit 304) The intra prediction parameter decoding unit 304 decodes intra prediction parameters, for example, an intra prediction mode IntraPredMode, by referring to prediction parameters stored in a prediction parameter memory 307 based on the code input from the entropy decoding unit 301. The intra prediction parameter decoding unit 304 outputs the decoded intra prediction parameters to a predicted image generating unit 308, and also stores them in the prediction parameter memory 307. The intra prediction parameter decoding unit 304 may derive different intra prediction modes for luminance and chrominance.

[0065] 8 is a schematic diagram showing a configuration of the intra prediction parameter decoding unit 304 of the parameter decoding unit 302. As shown in the figure, the intra prediction parameter decoding unit 304 includes a parameter decoding control unit 3041, a luma intra prediction parameter decoding unit 3042, and a chroma intra prediction parameter decoding unit 3043.

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

[0067] The luma intra prediction parameter decoding unit 3042 includes an MPM candidate list derivation unit 30421, an MPM parameter decoding unit 30422, and a non-MPM parameter decoding unit 30423 (decoding unit, derivation unit).

[0068] The MPM parameter decoding unit 30422 references the MPM candidate list mpmCandList[ ] and mpm_idx derived by the MPM candidate list derivation unit 30421, derives the luminance prediction mode IntraPredModeY, and outputs it to the intra-prediction image generation unit 310.

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

[0070] The color difference intra-prediction parameter decoding 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-prediction image generation unit 310.

[0071] The loop filter 305 is a filter provided in the encoding loop, which removes block distortion and ringing distortion to improve image quality. The loop filter 305 applies a filter such as a deblocking filter, a sample adaptive offset (SAO), and an adaptive loop filter (ALF) to the decoded image of the CU generated by the adder 312.

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

[0073] 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 the parameters decoded by the parameter decoding unit 302 and the prediction mode predMode separated by the entropy decoding unit 301.

[0074] The prediction image generating unit 308 receives a prediction mode predMode, prediction parameters, and the like. The prediction image generating unit 308 also reads a reference picture from the reference picture memory 306. The prediction image generating unit 308 generates a prediction image of a block or sub-block using the prediction parameters and the read reference picture (reference picture block) in the prediction mode indicated by the prediction mode predMode. Here, the reference picture block is a set of pixels on the reference picture (usually rectangular, so called a block), and is an area to be referenced for generating a prediction image.

[0075] (Intra-prediction image generation unit 310) When the prediction mode predMode indicates an intra prediction mode, the intra prediction image generation unit 310 performs intra prediction using the intra prediction parameters input from the intra prediction parameter decoding unit 304 and reference pixels read from the reference picture memory 306 .

[0076] Specifically, the intra-prediction image generation unit 310 reads adjacent blocks in a predetermined range from a target block on a target picture from the reference picture memory 306. The predetermined range refers to adjacent blocks to the left, upper left, upper, and upper right of the target block, and the area to be referenced differs depending on the intra-prediction mode.

[0077] The intra-prediction image generation 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 intra-prediction image generation unit 310 outputs the generated prediction image of the block to the addition unit 312.

[0078] The generation of a predicted image based on an intra prediction mode will be described below. In planar prediction, DC prediction, and angular prediction, a decoded surrounding area adjacent (close) to the prediction target block is set as a reference area R. Then, a predicted image is generated by extrapolating pixels in the reference area R in a specific direction. For example, the reference area R may be set as an L-shaped area (for example, an area indicated by pixels marked with a diagonal line in FIG. 9(a)) including the left and top of the prediction target block (or further, the top left, top right, and bottom left).

[0079] (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. 10. The intra-prediction image generation unit 310 includes a prediction target block setting unit 3101, an unfiltered reference image setting unit 3102 (first reference image setting unit), a filtered reference image setting unit 3103 (second reference image setting unit), a prediction unit 3104, and a prediction image correction unit 3105 (prediction image correction unit, filter switching unit, weighting coefficient changing unit).

[0080] 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).

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

[0082] (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.

[0083] (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 the reference area R. Then, for each pixel value (unfiltered reference image, boundary pixel) in the reference area R, each decoded pixel value at a corresponding position on the reference picture memory 306 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. 9(a) are the unfiltered reference images.

[0084] (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 derive a filtered reference image s[x][y] at each position (x, y) on the reference region R. Specifically, 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. 9(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 referred to as a "reference pixel filter (first filter)", whereas a filter that corrects a tentative predicted image in the predicted image correction unit 3105 described later is referred to as a "boundary filter (second filter)".

[0085] (Configuration of the intra prediction unit 3104) The intra prediction unit 3104 generates a provisional predicted image (provisional predicted pixel value, pre-corrected predicted image) of a block to be predicted based on an intra prediction mode, an unfiltered reference image, and a filtered reference pixel value, and outputs the generated image to a predicted image correction unit 3105. The prediction unit 3104 includes a planar prediction unit 31041, a DC 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 the unfiltered reference image and the filtered reference image. The relationship between the intra prediction mode and the corresponding prediction unit is as follows. ·Planar prediction ···Planar prediction 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 generates a provisional predicted image by linearly adding a plurality of filtered reference images according to the distance between the prediction target pixel position and the reference pixel position, and outputs the provisional predicted image to the predicted image correction unit 3105 .

[0086] (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.

[0087] (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.

[0088] (CCLM (Cross-Component Linear Model) prediction) The CCLM prediction unit 31044 predicts pixel values ​​of chrominance based on pixel values ​​of luminance. Specifically, this is a method of generating a predicted image of a chrominance image (Cb, Cr) using a linear model based on a decoded luminance image.

[0089] (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 in some intra prediction modes (for example, planar prediction, DC prediction, etc.), the predicted image correction unit 3105 does not correct the temporary predicted image, and the output of the prediction unit 3104 may be used as the predicted image as it is.

[0090] 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 in the encoding process by performing frequency transform such as DCT (Discrete Cosine Transform) or DST (Discrete Sine Transform) on the prediction error and quantizing the transform coefficients. The inverse quantization and inverse transform unit 311 performs inverse frequency transform such as inverse DCT or inverse DST on the obtained transform coefficients to calculate prediction errors. The inverse quantization and inverse transform unit 311 outputs the prediction errors to the adder unit 312.

[0091] The adder 312 generates a decoded image of the block by adding, 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. 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.

[0092] (Configuration of a video encoding device) Next, the configuration of the video encoding device 11 according to this embodiment will be described. Fig. 14 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, and an entropy encoding unit 104.

[0093] 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 therefore a description thereof will be omitted.

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

[0095] The transform / quantization unit 103 calculates transform coefficients by frequency transforming the prediction errors input from the subtraction unit 102, and derives quantized transform coefficients by quantizing the prediction errors. The transform / quantization unit 103 outputs the quantized transform coefficients to the entropy coding unit 104 and the inverse quantization / inverse transform unit 105.

[0096] The inverse quantization and inverse transform unit 105 is the same as the inverse quantization and inverse transform unit 311 (FIG. 7) in the video decoding device 31, and a description thereof will be omitted. The calculated prediction error is output to the addition unit .

[0097] The entropy coding unit 104 receives the quantized transform coefficients from the transform / quantization unit 103 and the coding parameters from the parameter coding unit 111. The coding parameters include, for example, codes of a reference picture index refIdxLX, a prediction vector index mvp_LX_idx, a difference vector mvdLX, a motion vector precision mode amvr_mode, a prediction mode predMode, and a merge index merge_idx.

[0098] The entropy coding unit 104 entropy codes the division information, the prediction parameters, the quantized transformation coefficients, etc. to generate a coded stream Te, and outputs it.

[0099] The parameter coding unit 111 includes a header coding unit 1110, a CT information coding unit 1111, a CU coding unit 1112 (prediction mode coding unit), an inter prediction parameter coding unit 112, and an intra prediction parameter coding unit 113. The CU coding unit 1112 further includes a TU coding unit 1114.

[0100] (Configuration of the intra-prediction parameter encoding 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 encoding unit 113 includes a part of a configuration that is the same as the configuration in which the intra prediction parameter decoding unit 304 derives intra prediction parameters.

[0101] 15 is a schematic diagram showing a configuration of the intra-prediction parameter coding unit 113 of the parameter coding unit 111. The intra-prediction parameter coding unit 113 includes a parameter coding control unit 1131, a luma intra-prediction parameter derivation unit 1132, and a chroma intra-prediction parameter derivation unit 1133.

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

[0103] 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).

[0104] The MPM candidate list derivation unit 30421 derives the MPM candidate list mpmCandList[] by referring to the intra prediction modes of adjacent blocks stored in the prediction parameter memory 108. When intra_luma_mpm_flag is 1, the MPM parameter derivation unit 11322 derives mpm_idx from IntraPredModeY and mpmCandList[], and outputs it to the entropy coding unit 104. When 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.

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

[0106] The adder 106 generates a decoded image by adding, 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. The adder 106 stores the generated decoded image in the reference picture memory 109.

[0107] 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 have to include the above three types of filters, and may be configured, for example, as only a deblocking filter.

[0108] The prediction parameter memory 108 stores the prediction parameters generated by the coding parameter determination unit 110 in a predetermined location for each current picture and CU.

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

[0110] The coding parameter determination unit 110 selects one set from among a plurality of sets of coding 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 generation unit 101 generates a predicted image using these coding parameters.

[0111] The coding parameter determination unit 110 calculates an RD cost value indicating the amount of information and the coding error for each of the multiple sets. The RD cost value is, for example, the sum of the code amount and the value obtained by multiplying the squared error by a coefficient λ. The coding parameter determination unit 110 selects the set of coding parameters that minimizes the calculated cost value. As a result, the entropy coding unit 104 outputs the selected set of coding parameters as a coded stream Te. The coding parameter determination unit 110 stores the determined coding parameters in the predicted parameter memory 108.

[0112] In addition, a part of the video encoding device 11 and the video decoding device 31 in the above-mentioned embodiment, for example, the entropy decoding unit 301, the parameter decoding unit 302, the loop filter 305, the predicted image generating unit 308, the inverse quantization and inverse transform unit 311, the addition unit 312, the predicted image generating unit 101, the subtraction unit 102, the transform and quantization unit 103, the entropy encoding unit 104, the inverse quantization and inverse transform unit 105, the loop filter 107, the encoding parameter determination unit 110, and the parameter encoding unit 111 may be realized by a computer. In this case, a program for realizing this control function may be recorded in a computer-readable recording medium, and the program recorded in the recording medium may be read into and executed by a computer system. In addition, the "computer system" referred to here is a computer system built into either the video encoding device 11 or the video decoding device 31, and includes hardware such as an OS and peripheral devices. In addition, "computer-readable recording medium" refers to portable media such as flexible disks, optical magnetic disks, ROMs, and CD-ROMs, and storage devices such as hard disks built into computer systems. Furthermore, "computer-readable recording medium" may also include devices that dynamically hold 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 devices that hold a program for a certain period of time, such as volatile memory inside a computer system that serves as a server or client in such cases. Furthermore, 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.

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

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

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

[0116] First, it will be described with reference to FIG. 2 that the above-mentioned video encoding device 11 and video decoding device 31 can be used for transmitting and receiving videos.

[0117] Fig. 2(a) is a block diagram showing the configuration of a transmitting device PROD_A equipped with a video encoding device 11. As shown in the figure, the transmitting device PROD_A includes an encoding unit PROD_A1 that obtains encoded data by encoding a video, a modulation unit PROD_A2 that obtains a modulated signal by modulating a carrier wave with the encoded data obtained by the encoding unit PROD_A1, and a transmitting unit PROD_A3 that transmits the modulated signal obtained by the modulation unit PROD_A2. The above-mentioned video encoding device 11 is used as this encoding unit PROD_A1.

[0118] The transmitting device PROD_A may further include a camera PROD_A4 for capturing moving images, a recording medium PROD_A5 for recording moving images, an input terminal PROD_A6 for inputting moving images from the outside, and an image processing unit A7 for generating or processing images, as a source of moving images to be input to the encoding unit PROD_A1. In the figure, the transmitting device PROD_A is illustrated as having all of these components, but some of them may be omitted.

[0119] The recording medium PROD_A5 may record unencoded video, or may record video encoded by an encoding method for recording that is different from the encoding method for transmission. In the latter case, a decoding unit (not shown) that decodes the encoded data read from the recording medium PROD_A5 according to the encoding method for recording may be interposed between the recording medium PROD_A5 and the encoding unit PROD_A1.

[0120] 2(b) is a block diagram showing the configuration of a receiving device PROD_B equipped with a video decoding device 31. As shown in the figure, the receiving device PROD_B includes a receiving unit PROD_B1 that receives a modulated signal, a demodulation unit PROD_B2 that obtains coded data by demodulating the modulated signal received by the receiving unit PROD_B1, and a decoding unit PROD_B3 that obtains a video by decoding the coded data obtained by the demodulation unit PROD_B2. The above-mentioned video decoding device 31 is used as this decoding unit PROD_B3.

[0121] The receiving device PROD_B may further include, as destinations of the moving image output by the decoding unit PROD_B3, a display PROD_B4 for displaying the moving image, a recording medium PROD_B5 for recording the moving image, and an output terminal PROD_B6 for outputting the moving image to the outside. In the figure, the receiving device PROD_B is illustrated as having all of these components, but some of them may be omitted.

[0122] The recording medium PROD_B5 may be for recording unencoded video, or may be encoded by an encoding method for recording that is different from the encoding method for transmission. In the latter case, it is preferable to interpose an encoding unit (not shown) between the decoding unit PROD_B3 and the recording medium PROD_B5, which encodes the video acquired from the decoding unit PROD_B3 according to the encoding method for recording.

[0123] The transmission medium for transmitting the modulated signal may be wireless or wired. The transmission mode for transmitting the modulated signal may be broadcast (here, this refers to a transmission mode in which the destination is not specified in advance) or communication (here, this refers to a transmission mode in which the destination is specified in advance). In other words, the transmission of the modulated signal may be realized by any of wireless broadcast, wired broadcast, wireless communication, and wired communication.

[0124] For example, a broadcasting station (such as a broadcasting facility) / receiving station (such as a television receiver) for terrestrial digital broadcasting is an example of a transmitting device PROD_A / receiving device PROD_B that transmits and receives modulated signals by wireless broadcasting. Also, a broadcasting station (such as a broadcasting facility) / receiving station (such as a television receiver) for cable television broadcasting is an example of a transmitting device PROD_A / receiving device PROD_B that transmits and receives modulated signals by cable broadcasting.

[0125] Also, a server (such as a workstation) / client (such as a television receiver, a personal computer, a smartphone, etc.) of a VOD (Video On Demand) service or a video sharing service using the Internet is an example of a transmitting device PROD_A / receiving device PROD_B that transmits and receives modulated signals by communication (usually, in a LAN, either wireless or wired is used as a transmission medium, and in a WAN, wired is used as a transmission medium). Here, personal computers include desktop PCs, laptop PCs, and tablet PCs. Also, smartphones include multi-function mobile phone terminals.

[0126] The client of the video hosting service has a function to decode the encoded data downloaded from the server and display it on a display, as well as a function to encode the video captured by the camera and upload it to the server. That is, the client of the video hosting service functions as both the transmitting device PROD_A and the receiving device PROD_B.

[0127] Next, it will be described with reference to FIG. 3 that the above-mentioned video encoding device 11 and video decoding device 31 can be used for recording and reproducing videos.

[0128] 3(a) is a block diagram showing the configuration of a recording device PROD_C equipped with the above-mentioned video encoding device 11. As shown in the figure, the recording device PROD_C includes an encoding unit PROD_C1 that obtains encoded data by encoding a video, and a writing unit PROD_C2 that writes the encoded data obtained by the encoding unit PROD_C1 onto a recording medium PROD_M. The above-mentioned video encoding device 11 is used as this encoding unit PROD_C1.

[0129] The recording medium PROD_M may be (1) a type built into the recording device PROD_C, such as an HDD (Hard Disk Drive) or SSD (Solid State Drive), (2) a type connected to the recording device PROD_C, such as an SD memory card or USB (Universal Serial Bus) flash memory, or (3) a type loaded into a drive device (not shown) built into the recording device PROD_C, such as a DVD (Digital Versatile Disc: registered trademark) or BD (Blu-ray Disc: registered trademark).

[0130] The recording device PROD_C may further include a camera PROD_C3 for capturing moving images, an input terminal PROD_C4 for inputting moving images from the outside, a receiving unit PROD_C5 for receiving moving images, and an image processing unit PROD_C6 for generating or processing images, as a supply source of moving images to be input to the encoding unit PROD_C1. Although the figure illustrates a configuration in which the recording device PROD_C includes all of these, some of them may be omitted.

[0131] The receiving unit PROD_C5 may receive unencoded video, or may receive encoded data encoded by an encoding method for transmission that is different from the encoding method for recording. In the latter case, a transmission decoding unit (not shown) that decodes the encoded data encoded by the encoding method for transmission may be interposed between the receiving unit PROD_C5 and the encoding unit PROD_C1.

[0132] Examples of such a recording device PROD_C include a DVD recorder, a BD recorder, and an HDD (Hard Disk Drive) recorder (in this case, the input terminal PROD_C4 or the receiving unit PROD_C5 is the main source of the moving image). Other examples of such a recording device PROD_C include a camcorder (in this case, the camera PROD_C3 is the main source of the moving image), a personal computer (in this case, the receiving unit PROD_C5 or the image processing unit C6 is the main source of the moving image), and a smartphone (in this case, the camera PROD_C3 or the receiving unit PROD_C5 is the main source of the moving image).

[0133] 3(b) is a block diagram showing the configuration of a playback device PROD_D equipped with the above-mentioned video decoding device 31. As shown in the figure, the playback device PROD_D includes a reading unit PROD_D1 that reads out coded data written to a recording medium PROD_M, and a decoding unit PROD_D2 that obtains video by decoding the coded data read by the reading unit PROD_D1. The above-mentioned video decoding device 31 is used as this decoding unit PROD_D2.

[0134] The recording medium PROD_M may be (1) a type that is built into the playback device PROD_D, such as an HDD or SSD, (2) a type that is connected to the playback device PROD_D, such as an SD memory card or USB flash memory, or (3) a type that is loaded into a drive device (not shown) built into the playback device PROD_D, such as a DVD or BD.

[0135] The playback device PROD_D may further include, as destinations of the video output by the decoding unit PROD_D2, a display PROD_D3 for displaying the video, an output terminal PROD_D4 for outputting the video to the outside, and a transmission unit PROD_D5 for transmitting the video. In the figure, the playback device PROD_D is illustrated as having all of these components, but some of them may be omitted.

[0136] The transmission unit PROD_D5 may transmit unencoded video, or may transmit encoded data encoded by an encoding method for transmission different from the encoding method for recording. In the latter case, it is preferable to interpose an encoding unit (not shown) between the decoding unit PROD_D2 and the transmission unit PROD_D5, which encodes the video by the encoding method for transmission.

[0137] Examples of such a playback device PROD_D include a DVD player, a BD player, and an HDD player (in this case, the output terminal PROD_D4 to which a television receiver or the like is connected is the main destination of the video image). Other examples of such a playback device PROD_D include a television receiver (in this case, the display PROD_D3 is the main destination of the video image), a digital signage (also called an electronic billboard or electronic bulletin board, and the display PROD_D3 or the transmission unit PROD_D5 is the main destination of the video image), a desktop PC (in this case, the output terminal PROD_D4 or the transmission unit PROD_D5 is the main destination of the video image), a laptop or tablet PC (in this case, the display PROD_D3 or the transmission unit PROD_D5 is the main destination of the video image), and a smartphone (in this case, the display PROD_D3 or the transmission unit PROD_D5 is the main destination of the video image).

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

[0139] The intra prediction parameter decoding unit 304 refers to the luminance prediction mode IntraPredModeY, intra_chroma_pred_mode, and the table of FIG. 11(b) when deriving the above-mentioned color difference prediction mode IntraPredModeC. The figure shows a method of deriving IntraPredModeC. When intra_chroma_pred_mode is 0 to 3 and 7, IntraPredModeC is derived 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. 6. When intra_chroma_pred_mode is 4 to 6, IntraPredModeC is derived without depending on the value of IntraPredModeY. intra_chroma_pred_mode=81 (INTRA_LT_CCLM), 82 (INTRA_L_CCLM), 83 (INTRA_T_CCLM) are a mode for generating a predicted image of a chrominance image based on the luminance images of the upper and left adjacent blocks, a mode for generating a predicted image of a chrominance image based on the luminance image of the left adjacent block, and a mode for generating a predicted image of a chrominance image based on the luminance image of the upper adjacent block, respectively.

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

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

[0142] When intra_chroma_pred_mode is 81 (INTRA_LT_CCLM), 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 intra_chroma_pred_mode is 82 (INTRA_L_CCLM), the CCLM prediction parameters are derived using pixel values ​​of the left adjacent block as shown in (b). When intra_chroma_pred_mode is 83 (INTRA_T_CCLM), 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 has a width bW and a height refH (refH>1), and the left side of the target block has a height bH and a 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 according to the number of taps of the downsampling filter. In addition, 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.

[0143] (CCLM Forecasting Department) The CCLM prediction unit 31044 will be described with reference to Fig. 11. Fig. 11 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.

[0144] The downsampling unit 310441 downsamples pRefY[][] and pY[][] to match the size of the chrominance image. When the chrominance format is 4:2:0, the number of pixels in the horizontal and vertical directions of pRefY[][] and pY[][] are sampled at 2:1, and the results are stored in pRefDsY[][] and pDsY[][] in FIG. 13(d). Note that bW / 2 and bH / 2 are equal to bWC and bHC, respectively. When the chrominance format is 4:2:2, the number of pixels in the horizontal direction of pRefY[][] and pY[][] are sampled at 2:1, and the results are stored in pRefDsY[][] and pDsY[][]. When 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 following formula.

[0145] 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 The CCLM prediction filter unit 310443 receives the reference image refSamples[][] as an input signal, and outputs a predicted image predSamples[][] using CCLM prediction parameters (a, b).

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

[0147] Fig. 12 shows the configuration of the CCLM prediction filter unit 310443 that predicts chrominance from luminance. As shown in Fig. 12, the CCLM prediction filter unit 310443 includes a linear prediction unit 310444. The linear prediction unit 310444 receives refSamples[][] as an input signal, and outputs predSamples[][] using CCLM prediction parameters (a, b).

[0148] More specifically, the linear prediction unit 310444 derives chrominance Cb or Cr from luminance Y according to the following equation using CCLM prediction parameters (a, b), and uses this to output predSamples[][].

[0149] Cb (or Cr) = aY + b The CCLM prediction parameter derivation unit 310442 derives CCLM prediction parameters using the downsampled luminance adjacent block pRefY (pRefDsY[][] in FIG. 13(d)) and the chrominance adjacent block pRefC[][] (pRefC[][] in FIG. 13(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.

[0150] (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 current block from the reference block refSamples[][].

[0151] In deriving the CCLM prediction parameters (a, b), the CCLM prediction parameter derivation unit 310442 derives 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) from a pair of adjacent blocks (luminance value Y, color difference value C). 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. 14, 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 by the following formula.

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

[0153] Since division has a high calculation cost, the CCLM prediction parameters (a, b) are derived by integer arithmetic and table reference instead of division. Specifically, the following formula is used. In the following embodiment, a reciprocal table required for division of 1 / d is used, which excludes the case of d=0 (a table with d=diff-1 as an argument), but of course a table with d=diff as an argument may be used.

[0154] ChromaDelta = C_MAX-C_MIN low=(ChrmaDelta*LMDivTableLow[diff-1]+2^15)>>16 a=(ChromaDelta*LMDivTable[diff-1]+low+add)>>shiftB b=C_MIN-((a*Y_MIN)>>shiftA) diff=(Y_MAX-Y_MIN+add)>>shiftB shiftB =(BitDepthC>8)?(BitDepthC-9):0 add= (shiftB > 0) ? 1<<(shiftB-1) : 0 However, if diff=0, a=0 is set. Here, LMDivTableLow[] and LMDivTable[] are tables (reciprocal, reciprocal table) for performing division by table reference, and are derived in advance by the following formula. In other words, the values ​​stored in the table are derived values ​​(values ​​corresponding to the reciprocal of the divisor). That is, the table stores difference values ​​and derived values ​​in correspondence with each other. Also, shiftB is a shift value used to quantize the value range of diff, which differs depending on the bit depth, so that it is 2^9=512 or less. Note that, if the bit depth BitDepthC of the color difference image is 10 bits or more, diff is quantized in advance so that it is in the range from 0 to 512. shiftB is not limited to the above. For example, it may be as follows, using a predetermined constant Q (for example, 2 or 6). The same applies to other embodiments.

[0155] shiftB = BitDepthC-Q LMDivTable[diff-1]=floor(2^16 / diff) LMDivTableLow[diff-1]= floor((2^16*2^16) / diff)-floor(2^16 / diff)*2^16 LMDivTable[diff-1] represents the integer part of (1 / diff * 2^16). LMDivTableLow[diff-1] represents 2^16 times the decimal part of (1 / diff * 2^16). Additionally, a and b are 2^16 times (2 to the 16th power) the value of the above formula (C=a*Y+b).

[0156] For example, if diff=7, then:

[0157] LMDivTable[7-1] = floor(2^16 / 7)=9362 LMDivTableLow[7-1] = floor((2^16*2^16) / 7)-floor(2^16 / 7)*2^16=18724 When using the (a, b) derived above, shiftA in equation (CCLM-1) is 16.

[0158] (Specific processing in the CCLM prediction section) (Processing example 1) In the above-described embodiment, the CCLM prediction parameter derivation unit 310442 uses the table LMDivTable representing the integer part of 1 / diff and the table LMDivTableLow representing the decimal part of 1 / diff to derive the CCLM prediction parameters. Here, the maximum value of the table LMDivTable is 65536 (17 bits), and the maximum value of the table LMDivTableLow is 65140 (16 bits). Since the number of elements in each table is 512, a very large memory size of 17*512+16*512=16896 (bits) is required to store the table LMDivTable and the table LMDivTableLow.

[0159] In this processing example, the CCLM prediction parameter derivation unit 310442 derives CCLM prediction parameters without using the table LMDivTableLow that expresses the decimal part of 1 / diff out of the two tables. That is, the CCLM prediction parameter derivation unit 310442 derives CCLM prediction parameters (a, b) by the following formula.

[0160] a=(ChromaDelta*LMDivTable[diff-1]+add)>>shiftB b=C_MIN-((a*Y_MIN)>>shiftA) add= (shiftB > 0) ? 1<<(shiftB-1) : 0 The inventors have confirmed through experiments that a single table, LMDivTable, provides sufficient performance for CCLM prediction.

[0161] This eliminates the need to store the table LMDivTableLow, and reduces the amount of memory required to store the table by approximately half. In addition, the processing load can be reduced because the calculation for deriving div is no longer necessary.

[0162] As described above, the CCLM prediction unit 31044 related to this processing generates a predicted image by CCLM prediction, and includes a CCLM prediction parameter derivation unit 310442 that derives CCLM prediction parameters using a table LMDivTable that associates difference values ​​between a plurality of luminance reference pixels with derived values ​​for deriving CCLM prediction parameters from the difference values, and the table LMDivTable holds the integer part of a value obtained by multiplying the reciprocal of the difference value by a predetermined number.

[0163] This makes it possible to reduce the amount of memory required for the tables required to derive the CCLM prediction parameters.

[0164] (Processing example 2) In this processing example, the number of bits (bit width) of the table LMDivTable used by the CCLM prediction parameter derivation unit 310442 is reduced.

[0165] In the embodiment described above, the value of the table LMDivTable is the integer part of (1 / diff)*65536, and is therefore as follows: 65536, 32768, 21845, 16384, 13107, 10922, 9362, 8192, 7281, 6553, 5957, 5461, 5041, 4681, 4369, 4096, 3855, 3640, 3449, 3276, 3120, 2978, 2849, 2730, 2621, 2520, 2427, 2340, 2259, 2184, 2114, 2048, … In this processing example, the mantissa (mantissa, m) of each of the above values ​​is approximated by an exponential representation (m*2^exp) expressed in P bits, and only the mantissa is stored in the table DivTableM. For example, if P=5, the value of the reciprocal table is as follows: 16*2^12, 16*2^11, 21*2^10, 16*2^10, 26*2^9, 21*2^9, 18*2^9, 16*2^9, 28*2^8, 26*2^8, 23*2^8, 21*2^8, 20*2^8, 18*2^8, 17*2^8, 16*2^8, 30*2^7, 28*2^7, 27*2^7, 26*2^7,24*2^7, 23*2^7, 22*2^7, 21*2^7, 20*2^7, 20*2^7, 19*2^7, 18*2^7, 18*2^7, 17*2^7, 17*2^7, 16*2^7,… In the table DivTableM, we only store the mantissas of these values, i.e. DivTableM[] = {16, 16, 21, 16, 26, 21, 18, 16, 28, 26, 23, 21, 20, 18, 17, 16, 30, 28, 27, 26, 24, 23, 22, 21, 20, 20, 19, 18, 18, 17, 17, 16, …} As a result, each value that required a maximum of 17 bits in the above embodiment can be expressed in 5 bits, and the amount of memory required to store the table DivTableM can be reduced.

[0166] Note that when the number of items to be stored is 2^N from the beginning of the table, the minimum value of table DivTableM is 2^(P-1), so the value obtained by subtracting 2^(P-1) from each value can be stored in table DivTableM, and the above value can be derived by adding 2^(P-1) to the value obtained from this table. In this case, the required memory can be reduced by an additional bit for each value. Below, the offset value of table DivTableM when the number of items to be stored is 2^N from the beginning of the table is referred to as offsetM. When a table with an offset subtracted is used, offsetM = 2^(P-1). In all other cases, offsetM = 0.

[0167] In addition, when the integer part of (1 / diff)*(2^16) is expressed as an exponent and only the mantissa part of the reciprocal table is held, it is necessary to derive the value of the exponent. In this processing example, the CCLM prediction parameter derivation unit 310442 derives the value of the exponent according to the following formula.

[0168] exp=clz(d,N)+(16-N-(P-1)) Here, d=diff-1 (brightness difference), exp represents the exponent, and N represents the number of elements to be held as a table. For example, if N=9, 512 elements are held, and if N=5, 32 elements are held. Also, "16" is the precision of 1 / diff, that is, the number of bits of the multiplier for converting 1 / diff into an integer representation. In the above-mentioned embodiment, the value of 1 / diff was calculated by multiplying by 65536 (=2^16) to derive it with integer precision. Note that the precision of 1 / diff is arbitrary, and if another value is used, "16" must be changed accordingly.

[0169] The clz (count leading zeros) function consists of two arguments (d, mw) and returns the number of consecutive zeros starting from the most significant bit (MSB) of the first argument d, which is expressed in binary. The second argument mw indicates the maximum number of digits (number of bits). For example, if P=5, then when d=1 (0b00001, diff=2) (0b is the prefix indicating binary), clz(1,mw)=4, and when d=2 (0b00010, diff=3), clz(2,mw)=3. Also, when d=16 (0b10000, diff=17), clz(16,mw)=0. Note that when the first argument d is 0, the second argument mw is returned. In other words, when d=0 (0b00000, diff=1), clz(0,mw)=mw.

[0170] Note that many CPUs are equipped with dedicated instructions for the clz function. In the dedicated instructions, the maximum number of digits may be limited to values ​​such as 8, 16, or 32, but for example, if mw<=8, then clz(d,mw)=clz(d,8)-(8-mw). Also, the dedicated instructions are not essential; for example, in the case of clz(d,4), the following formula may be used instead.

[0171] clz(d,4)=(d&0x08)?1:(d&0x04)?2:(d&0x02)?3:(d&0x01)?4:5 The CCLM prediction unit 31044 derives the CCLM prediction parameter a by shifting the product of DivTableM[d] referenced by the luminance difference d (=diff-1) and the color difference ChromaDelta using exp derived from d.

[0172] a=(ChromaDelta*DivTableM[d]<<exp)+add)> >shiftB b=C_MIN-((a*Y_MIN)>>shiftA) where exp = clz(d,N)+(16-N-(P-1)) = 16-(P-1)-(N-clz(d,N)) In (Processing Example 1), the following relationship holds between LMDivTable[d], DivTableM[d], and exp.

[0173] LMDivTable[d] = DivTableM[d]< <exp Note that the CCLM prediction parameter a may be derived after deriving the shift number (shiftB-exp) using the exponent part exp as follows. However, for simplicity, in the following, when the shift value of the right bit shift operation and the left bit shift operation becomes negative, the sign and shift direction of the shift value are inverted. This is the same for other examples.

[0174] a=(ChromaDelta*DivTableM[d]+add)>>(shiftB-exp) where add = (shiftB-exp>0) ? 1<<(shiftB-exp-1) : 0 Alternatively, the CCLM prediction parameter derivation unit 310442 may derive the value of the exponent part according to the following formula:

[0175] exp = 16-(P-1)-ceil(log2(diff)) Also, only the exponent part may be stored as a table ShiftTableE. For example, when P=5, the table ShiftTableE[] is ShiftTableE[] = {12,11,10,10, 9, 9, 9, 9, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,…} Or, using the following table ShiftTableE'[], ShiftTableE'[] = { 0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5,5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,…} The exponent part exp = 16-(P-1) - ShiftTableE'[d] It may be calculated as:

[0176] If the maximum number of digits mw is equal to or less than N, the tables ShiftTableE and ShiftTableE' can be used in place of the clz function.

[0177] clz(d,mw) = mw - ShiftTableE'[d] = mw - (16-(P-1) - ShiftTableE[d])) The CCLM prediction unit 31044 derives the CCLM parameters using the table DivTableM and the shift table ShiftTableE as follows.

[0178] a=(ChromaDelta*DivTableM[d]<<ShiftTableE[d])+add)> >shiftB b=C_MIN-((a*Y_MIN)>>shiftA) Note that the CCLM prediction parameter a may be derived after deriving the shift number (shiftB-exp) using the exponent part exp as follows:

[0179] a=(ChromaDelta*DivTableM[d]+add)>>(shiftB-exp) where add = (shiftB-exp>0) ? 1<<(shiftB-exp-1) : 0, exp = ShiftTableE[d] As described above, the CCLM prediction unit 31044 in this processing example generates a predicted image by CCLM prediction, and includes a CCLM prediction parameter derivation unit 310442 that derives a CCLM prediction parameter a using a luminance difference value (d), a chrominance difference value (ChromaDelta), and the reciprocal table DivTableM, and the CCLM prediction parameter derivation unit 310442 derives an exponent part exp corresponding to the reciprocal of the luminance difference value (d), multiplies an element of the table DivTableM by the chrominance difference value, and derives a CCLM prediction parameter by shifting by the number of shifts derived by the exponent part exp.

[0180] With the above configuration, the number of bits of the values ​​stored in the reciprocal table required for deriving the CCLM prediction parameters can be reduced, thereby reducing the required memory amount. As described in processing example 1, the table LMDivTableLow does not need to be used, but in the case where the table LMDivTableLow is stored, a table in which each element of LMDivTableLow is divided into a mantissa part and an exponent part may be created in the same manner.

[0181] (Additional information on the number of bits in the product) As described above, in CCLM, the product of ChromaDelta*LMDivTable[diff-1], a*Y_MIN, and a*refSamples[][] is required to derive the CCLM prediction parameters a and b and to generate a predicted image using a and b.

[0182] a=(ChromaDelta*LMDivTable[diff-1]+low+add)>>shiftB / / 11bit * 17 bit = 28 b=C_MIN-((a*Y_MIN)>>shiftA) / / 27bit * 10 bit = 37 predSamples[][] = ((a*refSamples[][])>>shiftA)+b / / 27bit * 10 bit = 37 (Bit width of parameter a) For example, in the calculations up to the above processing example 1, in a 10-bit image, the bit widths of ChromaDelta, a, Y_MIN, and refSamples[][] are 11 bits, 10 bits, 10 bits, and 10 bits, respectively, and the bit widths of LMDivTable[diff-1] and a are 16 bits and 27 bits (=11 bits * 16 bits) respectively when shiftA=16. As a result, the products in the derivation of a, the derivation of b, and the prediction using a are 11 bits * 17 bits, 27 bits * 10 bits, and 27 bits * 10 bits, respectively, which are products of large bit widths, and the hardware becomes complex.

[0183] In the processing example 2, the product of ChromaDelta*DivTableM[d] in deriving a is reduced to a bit width that is smaller by exp(=ShiftTableE[d]) compared to the processing example 1, which has the effect of simplifying the product.

[0184] (Processing example 3) In the above-described embodiment, the table LMDivTable (and LMDivTableLow) required for CCLM prediction stores values ​​for 512 elements, which is the possible range of the luminance difference value diff, from 1 to 512. In this processing example, the number of elements stored in the table is reduced, and elements that are not held are derived by calculation, thereby reducing the required memory.

[0185] For example, the CCLM prediction parameter derivation unit 310442 derives the CCLM prediction parameters (a, b) using a table LMDivTable_2N having 2^N elements. The CCLM prediction parameter derivation unit 310442 calculates values ​​of elements not stored in the table LMDivTable_2N by dividing the stored values ​​by k. LMDivTable_2N[] is a table that stores the first 2^N elements of LMDivTable[].

[0186] A specific description will be given with reference to FIG. 17. FIG. 17 is a diagram for explaining an example of calculating values ​​of elements not held in a table. In this example, N=3. As shown in FIG. 17, the CCLM prediction parameter derivation unit 310442 uses the values ​​of table LMDivTable_2N as is for the interval D0[0..2^N-1] (eg. 0..7) of d held by the values ​​of table LMDivTable_2N, and uses a value obtained by dividing the value of the latter half of the interval D0'[2^N / 2..2^(N+1)-1] (eg. 4..7) of D0 of table LMDivTable_2N for the next interval D1[2^N..2^(N+1)-1] (eg. 8..15), and uses the value of the interval D0'[2^N / 2..2^(N+1)-1] (eg. 4..7) of D0 of table LMDivTable_2N for the further next interval D2[2^(N+1)..2^(N+2)-1] (eg. 16..31) of table LMDivTable_2N. For the next interval D3[2^(N+2)..2^(N+3)-1] (eg. 32..63), the values ​​of interval D0' (eg. 4..7) in the table LMDivTable_2N are divided by 8. The width of interval D1 is twice that of interval D0', the width of interval D2 is four times that of interval D0', and the width of interval D3 is eight times that of interval D0'. In other words, each value in interval Dsc[2^(N+sc-1)..2^(N+sc)-1] is 1 / k times the value of interval D0'[2^N / 2..2^(N+1)-1] (where K=2^sc), and the same value is stored in every k bits from the beginning of interval Dsc. However, 1<=sc<=6. The number 6 is derived from 9-3, where 9 is the precision of the diff and 3 comes from the fact that D1 starts at 8 (=2^3).

[0187] For example, if N=3, then d(=diff-1)=8 and onwards are calculated by multiplying the values ​​in the section D0'[4..7] by 1 / k as follows:

[0188] Section [8..15] → 1 / 2 Section [16..31] → 1 / 4 Section [32..63] → 1 / 8 Section [64..127] → 1 / 16 Section [128..255] → 1 / 32 Section [256..511] → 1 / 64

[0189] [Table 1] More specifically, as shown in Fig. 18, d=8,9 is 1 / 2 of d=4, d=10,11 is 1 / 2 of d=5, d=12,13 is 1 / 2 of d=6, d=14,15 is 1 / 2 of d=7, d=16,17,18,19 is 1 / 4 of d=4, d=20,21,22,23 is 1 / 4 of d=5... (and so on), and so on. In the range where the value is reduced to 1 / k, the calculation is performed by referring to LMDivTable_2N so that the same value continues k times. That is, LMDivTable_2N is referred to using d / k. Hereinafter, k is called the scale, and sc=log2(k) is called the scale shift value.

[0190] Specifically, expressed as an equation, the derived k is used to reference the reciprocal table LMDivTable_2N as LMDivTable_2N[d / k] / k (=LMDivTable_2N[d>>sc]>>sc) as shown below.

[0191] sc=(9-N)-clz(d>>N,9-N) k=2^(sc) Note that the number "9" is chosen because the precision (number of bits) of diff is 512 elements (9 bits); different precisions assign different values.

[0192] The CCLM prediction unit 31044 derives the CCLM prediction parameter a using the color difference ChromaDelta and the value of table DivTableM referenced by the value (d>>sc) obtained by shifting the luminance difference d (=diff-1) by a predetermined scale shift value sc that depends on d, and further shifting the value by sc.

[0193] a=(ChromaDelta*(LMDivTable_2N[d>>sc]>>sc)+add)>>shiftB b=C_MIN-((a*Y_MIN)>>shiftA) Here add = (shiftB>0) ? 1<<(shiftB-1) : 0 Alternatively, if a configuration in which a 1-bit right shift is always performed in deriving the round correction term add as shown below is used, a simplification effect can be obtained in which the branch as to whether the shift number is positive or not can be eliminated.

[0194] add = (1 << shiftB) >> 1 Note that the position where the shift by sc is applied is not limited to the above. The CCLM prediction parameter a may be derived as follows.

[0195] a=(ChromaDelta*(LMDivTable_2N[d>>sc]+add)>>(shiftB+sc) b=C_MIN-((a*Y_MIN)>>shiftA) Here add = (shiftB+sc>0) ? 1<<(shiftB+sc-1) : 0 or add = (1<<(shiftB+sc)) >>1 In the above, the case of d=0 in the division of 1 / d was excluded, and only tables for d>=1 were used. In other words, a table for d=diff-1 was used instead of a table for d=diff, but a table for d=diff may also be used.

[0196] In other words, as shown in the above LMDivTable_2N[d>>sc], by referencing the reciprocal table LMDivTable_2N with an index (d>>sc) whose value has been reduced in magnitude by shifting, the number of elements in LMDivTable_2N is reduced, and the table size is reduced. Also, by further right-shifting the reciprocal table value LMDivTable_2N, such as LMDivTable_2N[d>>sc]>>sc or (LMDivTable_2N[d>>sc]+add)>>(shiftB+sc), the size is adjusted, and the table size is reduced without reducing performance.

[0197] (Modification of Processing Example 3) In the above embodiment, a table for d=diff-1 is set, the number of elements stored in the table is reduced, and elements that are not held are derived by calculation to reduce the required memory. In this modified example, an example is described in which a table for diff (0<=diff<=511) is set and the required memory is reduced. The following describes the difference for processing example 3.

[0198] For example, if the number of elements in a table is 2^N, where N=5, Table 1 can be associated as shown in Table 2.

[0199] [Table 2] Specifically, expressed as a formula, the reciprocal table LMDivTable_2N' is referenced as LMDivTable_2N'[d / k] / k (=LMDivTable_2N'[d>>sc]>>sc) using the derived k as shown below. LMDivTable_2N'[] is a table obtained by inserting a "0" at the beginning of LMDivTable_2N[] and deleting the last element.

[0200] range = diff >> N sc = ShiftTableE''_2N[range+1] k=2^(sc) ShiftTableE''_2N[] is a table with a “0” inserted at the beginning of ShiftTableE'_2N[].

[0201] ShiftTableE''_2N[] = { 0, 0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5,5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,…} The CCLM prediction unit 31044 derives the CCLM prediction parameter a by using the value of table LMDivTable_2N', which is referenced by the value obtained by shifting the luminance difference diff by a predetermined scale shift value sc that depends on diff (diff>>sc), and the color difference ChromaDelta, which is further shifted by sc.

[0202] a=(ChromaDelta*(LMDivTable_2N'[diff>>sc]>>sc)+add)>>shiftB b=C_MIN-((a*Y_MIN)>>shiftA) where add = (shiftB>0) ? 1<<(shiftB-1) : 0 or add = (1 << shiftB) >> 1 LMDivTable_2N'[] is a table in which "0" is inserted at the beginning of LMDivTable_2N'[] and the last element is deleted.

[0203] The effect of the processing example 3 is the same as that of this modified example.

[0204] (Processing example 4) The CCLM prediction parameter derivation unit 310442 may perform processing by combining the above-mentioned processing examples 1 to 3. In this case, the CCLM prediction parameter derivation unit 310442 derives a scale shift value sc corresponding to the luminance difference value (d), derives a value of the table DivTableM_2N (DivTableM_2N[d>>sc]) referenced by using the value d>>sc obtained by right-shifting the luminance difference value (d) with sc as an index (element position), and further derives the CCLM prediction parameters by multiplying the value r obtained by shifting using the value exp corresponding to the exponent part corresponding to the above d>>sc and the chrominance difference value. The CCLM prediction parameters (a, b) are derived according to the following formula.

[0205] a=(ChromaDelta*r+add)>>shiftB <h2 style=";text-align:left;direction:ltr">b=MinChromaValue-((a*MinLumaValue)>>shiftA)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> d=diff-1<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> sc=(DN)-clz(d>>N,DN)<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> exp=clz(d>>sc,N)+(16-NP-1))<h2 style=";text-align:left;direction:ltr"> <h2 style=";text-align:left;direction:ltr"> r=(DivTableM_2N[d><sc]+offsetM)<<h2 style=";text-align:left;direction:ltr"> <exp>>sc add=(shiftB>0)?1<<(shiftB-1):0 If offset is used (2^N items are to be stored from the top of the table), offsetM=2^(P-1). If offset is not used, offsetM=0. Where: D: indicates the range of diff values ​​(1..2^D). In (Processing Example 1) to (Processing Example 3), D=9 is used. N: An integer indicating the log2 of the number of elements in the DivTable, 0 <N<=D P: The number of bits in the mantissa of the exponential representation of the integer multiple (2^16) of 1 / diff, 0<=P-1<=16-N Note that the order of application of the scale shift value sc and the exponential shift value exp is not limited to the above. For example, the CCLM prediction parameter derivation unit 310442 derives sc corresponding to the luminance difference value (d), and shifts the value obtained by multiplying the luminance difference value (d) by sc to the right using the value d>>sc obtained by table reference DivTableM_2N[d>>sc] as an index (element position) by the chrominance difference value, using a shift value (shiftB+sc-exp) derived from exp and sc to derive the CCLM prediction parameters.

[0206] a=(ChromaDelta*r+add)>>(shiftB+sc-exp) b=MinChromaValue-((a*MinLumaValue)>>shiftA) d=diff-1 sc=(DN)-clz(d>>N,DN) exp=clz(d>>sc,N)+(16-N-(P-1)) r=(DivTableM_2N[d>>sc]+ offsetM) add = (shiftB+sc-exp>0) ? 1<<(shiftB+sc-exp-1) : 0 offsetM = 2^(P-1), or 0 Also, the value of ChromaDelta may be normalized first using the shift value shiftB.

[0207] a = ( (ChromaDelta+add)>>shiftB )*r >> (sc-exp) (Table value example) Below is an example of a table value: <Example 1> N=6, P=5, with offset M of 2^(P-1) DivTableM_2N

[64] = { 0, 0, 5, 0,10, 5, 2, 0, 12,10, 7, 5, 4, 2, 1, 0, 14,12,11,10, 8, 7, 6, 5, 4, 4, 3, 2, 2, 1, 1, 0, 15,14,13,12,12,11,10,10, 9, 8, 8, 7,7, 6, 6, 5, 5, 4, 4, 4, 3, 3, 3, 2, 2, 2, 1, 1, 1, 1, 0, 0} ShiftTableE_2N

[64] = { 12, 11, 10, 10, 9, 9, 9, 9, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6,6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6} <Modification of Example 1> If the method for rounding to integers is different, the following table may be used.

[0208] DivTableM_2N

[64] = { 0, 0, 5, 0,10, 5, 2, 0, 12, 10, 7, 5, 4, 2, 1, 0, 14,12,11,10, 8, 7, 6, 5, 4, 4, 3, 2, 2, 1, 1, 0, 15,14,14,13,12,11,11,10, 9, 9, 8, 8,7, 7, 6, 6, 5, 5, 4, 4, 4, 3, 3, 3, 2, 2, 2, 1, 1, 1, 1, 0} ShiftTableE_2N is common with <Example 1>.

[0209] If N=6 and P=5, the memory size required to store the table is (5-1)*2^6=4*64=256 (bits). Compared to the above-mentioned embodiment, this is 256 / 16896=1.515%, which is a significant reduction in memory size. <Example 2> N=5, P=5, with an offset of 2^(P-1) DivTableM_2N

[32] = { 0, 0, 5, 0,10, 5, 2, 0, 12, 10, 7, 5, 4, 2, 1, 0, 14, 12, 11,10, 8, 7, 6, 5, 4, 4, 3, 2, 2, 1, 1, 0} ShiftTableE_2N

[32] = { 12, 11, 10, 10, 9, 9, 9, 9, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7} In this case (N=5, P=5, D=9, with offset), the derivation formulas for a and b can be summarized as follows:

[0210] d = diff-1 sc = (DN)-clz(d>>N,DN) = (9-5)-clz(d>>5,9-5) = 4-clz(d>>5,4) exp = clz(d>>sc,N)+(16-N-(P-1)) = clz(d>>sc,5)+(16-5-(5-1)=clz(d>>sc,5)+7 offsetM = 2^(P-1) = 2^(5-1) = 16 r = (DivTableM_2N[d>>sc]+ offsetM) = DivTableM_2N[d>>sc] + 16 add = (shiftB+sc-exp>0) ? 1<<(shiftB+sc-exp-1) : 0 As, a = (ChromaDelta*r+add)>>(shiftB+sc-exp) b = MinChromaValue-((a*MinLumaValue)>>shiftA) In this case, if ShiftTableE_2N is used instead of clz, a and b can be calculated as follows:

[0211] d = diff-1 sc = (DN)-clz(d>>N,DN) = (DN)-((DN)-(16-(P-1)-ShiftTableE_2N[d>>5])) = 4-(4-(16-4)-ShiftTableE_2N[d>>5])) = 12-ShiftTableE_2N[d>>5] exp = ShiftTableE_2N[d>>5] offsetM = 2^(P-1) = 2^(5-1) = 16 r = (DivTableM_2N[d>>sc]+ offsetM) = DivTableM_2N[d>>sc] + 16 add = (shiftB+sc-exp>0) ? 1<<(shiftB+sc-exp-1) : 0 As, a = (ChromaDelta*r+add)>>(shiftB+sc-exp) b = MinChromaValue-((a*MinLumaValue)>>shiftA) <Modification of Example 2> If the method for rounding to integers is different, the following table may be used.

[0212] DivTableM_2N

[32] = { 0, 0, 5, 0,10, 5, 2, 0, 12,10, 7, 5, 4, 2, 1, 0, 14, 13 , 11, 10, 9, 8, 7, 6, 5, 4, 3, 3, 2, 1, 1, 0} ShiftTableE_2N is common with <Example 2>.

[0213] When there is no offset (offsetM = 0), the values ​​obtained by adding 2^(P-1) to each element of the DivTableM_2N with the offset are stored and used. <Example 3> N=6, P=4, with an offset of 2^(P-1) DivTableM_2N

[64] = { 0, 0, 3, 0, 5, 3, 1, 0, 6, 5, 4, 3, 2, 1, 1, 0, 7, 6, 5, 5, 4, 4, 3, 3, 2, 2, 1, 1, 1, 1, 0, 0, 7, 7, 7, 6, 6, 5, 5, 5, 4, 4, 4, 4, 3,3, 3, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0} ShiftTableE_2N

[64] = { 13, 12, 11, 11, 10, 10, 10, 10, 9, 9, 9, 9, 9, 9, 9,9, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7,7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7} <Modification of Example 3> If the method for rounding to integers is different, the following table may be used.

[0214] DivTableM_2N

[32] = { 0, 0, 3, 0, 5, 3, 1, 0, 6, 5, 4, 3, 2, 1, 1, 0, 7, 6, 6, 5, 4, 4, 3, 3, 2, 2, 2, 1, 1, 1, 1, 0} ShiftTableE_2N is common with <Example 3>. <Example 4> N=5, P=4, with an offset of 2^(P-1) DivTableM_2N

[32] = { 0, 0, 3, 0, 5, 3, 1, 0, 6, 5, 4, 3, 2, 1, 1, 0, 7, 6, 5, 5, 4, 4, 3, 3, 2, 2, 1, 1, 1, 1, 0, 0} ShiftTableE_2N

[32] = { 13, 12, 11, 11, 10, 10, 10, 10, 9, 9, 9, 9, 9, 9, 9, 9, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,} <Example 4 Variation> When the method of rounding to an integer is different, the following table may be used.

[0215] DivTableM_2N

[32] = { 0, 0, 3, 0, 5, 3, 1, 0, 6, 5, 4, 3, 2, 1, 1, 0, 7, 6, 6, 5, 4, 4, 3, 3, 2, 2, 2, 1, 1, 1, 1, 0} ShiftTableE_2N is common to <Example 4>.

[0216] Note that if N = 5 and P = 4, the amount of memory required to store the table is (4 - 1) * 2^5 = 3 * 32 = 96 (bit). Compared with the case described in the above-described embodiment, it becomes 96 / 16896 = 0.568%, and the amount of memory can be significantly reduced.

[0217] In Processing Examples 5 and 6 of the following description, the above table may be used.

[0218] (Processing Example 5) In Processing Example 5, an example in which the precision shiftA of the parameter a is variable in the formula (CCLM-1) will be described. Specifically, the precision shiftA of the parameter a is derived according to the shift value exp derived from the luminance difference value diff.

[0219] Hereinafter, the CCLM prediction parameter derivation unit 310442 derives, as the parameter a, a term (diffC / diff) corresponding to the slope of the linear prediction from the luminance difference value diff and the color difference difference value diffC (here, the parameter a is a value multiplied by 2^shiftA (= 1 << shiftA) for integerization.

[0220] First, the CCLM prediction parameter derivation unit 310442 derives a number v corresponding to the imaginary part of the reciprocal of diff by the method already described.

[0221] idx = diff >> sc exp = 16 - (P-1) - ceil(log2(idx)) - sc msb = 1 << (P-1) v = DivTable_2N'[idx] | msb Here, P is a predetermined constant corresponding to the number of bits of the imaginary part of the reciprocal table (1 / diff) (for example, P = 4). Also, exp is a variable that becomes smaller as the luminance difference diff increases (a variable that becomes smaller in proportion to the logarithmic value of diff), and it may be derived from a table. When idx = 0, log2(idx) is set to 0. Here, subtracting other values from 16 to obtain the value of exp is because the reciprocal table is created based on (2^16) / diff. Hereinafter, the bit width serving as the reference of the reciprocal table is denoted as baseA. When not restricting the bit width of the parameter a, shiftA = baseA. Note that the maximum value of v is (1<<P)-1, and the number of bits of v is P bits.

[0222] exp = 16-(P-1)-ShiftTableE''_2N[idx]-sc When the CCLM prediction parameter derivation unit 310442 derives the parameter a by the product of diffC and v, it further adjusts the number of bits of the parameter a by shifting right by shift_a as follows.

[0223] add = (1 << shift_a) >> 1 a = (diffC*v+add) >> shift_a b = C_Y_MIN-((a*Y_MIN) >> shift_a) Here, shift_a is a value derived from the bit depth of the image. expC is a constant that limits the bit width of parameter a, and is, for example, 0 to 3. The bit width of parameter a is the bit width of diffC + the bit width of v - shift_a, and bitDepth + P - (bitDepth - 8 - expC) = P + 8 - expC, and is reduced to a small value that is not dependent on the bit depth of the image. For example, when P = 4 and expC = 3, the bit width of a is 9 bits.

[0224] shift_a = bitDepth - 8 - expC The CCLM prediction parameter derivation unit 310442 adjusts the value of shiftA by subtracting values ​​exp and expC derived using the luminance difference diff from the initial value of shiftA (=baseA, for example 16).

[0225] shiftA = 16 - (exp+expC) The CCLM prediction filter unit 310443 uses the CCLM prediction parameters (a, b) and the adjusted shiftA described above, in accordance with equation (CCLM-1), to output a predicted image predSamples[][].

[0226] In this way, by adaptively deriving the shift amount of a using the luminance difference diff and the bit depth bitDepth, it is possible to reduce the bit width of a used to derive b or generate the predicted image predSamples[][]. This has the effect of simplifying the product of a and the luminance value refSamples[][] in equation (CCLM-1).

[0227] In the processing example 5, the product of diffC*v in the derivation of a is reduced from 11 bit*16 bit in the processing example 1 to 11 bit*P bit, so that the product is simplified. When P=4, it is 11 bit*4 bit=15 bit.

[0228] In Processing Example 5, since the product of a * Y_MIN in the derivation of b is reduced from 27 bits * 10 bits in Processing Example 1 to P + 8 - expC bits * 10 bits, there is an effect of simplifying the product. When P = 4 and expC = 3, 9 bits * 4 bits = 13 bits.

[0229] In Processing Example 5, since the product in Expression (CCLM-1) is reduced from 27 bits * 10 bits in Processing Example 1 to P + 8 - expC bits * 10 bits, there is an effect of simplifying the product. When P = 4 and expC = 3, 9 bits * 4 bits = 13 bits.

[0230] Note that since expC in Processing Example 5 is a constant that does not depend on the difference in color difference, it may be called expConst or the like instead of expC.

[0231] (Processing Example 6) In Processing Example 6, an example is described in which the precision shiftA of parameter a used for the product with the luminance value is made variable in Expression (CCLM-1). Specifically, the upper limit of the number of bits of a (the range value of a) is set to max_a_bits, and the precision shiftA of parameter a is derived according to diff which is the difference in color difference (C_Y_MAX - C_Y_MIN). Note that it may also be interpreted as an example in which parameter a is expressed as a mantissa with a fixed number of bits and a power of 2. Hereinafter, the number of bits of the mantissa part of a is represented by max_a_bits, and the number of bits of the exponent part is represented by expC.

[0232] Hereinafter, the CCLM prediction parameter derivation unit 310442 derives (diffC / diff * 2^shiftA), which corresponds to the slope, as parameter a from the denominator (luminance difference value) diff and the numerator (color difference difference value) diffC. Hereinafter, parameter a is multiplied by 2^shiftA (that is, 1 << shiftA) for integerization.

[0233] The CCLM prediction parameter derivation unit 310442 first derives an idx for referring to the compressed reciprocal table DivTable_2N' from diff, and further derives a number v corresponding to the reciprocal of diff.

[0234] diff=Y_MAX-Y_MIN range = (diff >> N)+1 sc = ceil(log2(range)) idx = diff >> sc Here, N is a predetermined constant, for example, 5.

[0235] msb = 1 << (P-1) v = DivTable_2N'[idx] | msb Here, P is the number of bits of the mantissa of the reciprocal table (1 / diff) (the part stored in the DivTable_2N' table), and msb is offsetM.

[0236] The CCLM prediction parameter derivation unit 310442 derives a shift value exp corresponding to the luminance difference value diff.

[0237] exp = 16-(P-1)-ceil(log2(diff+1)) = 16-(P-1)-ceil(log2(idx))-sc Moreover, exp may be derived by referring to a table.

[0238] exp = 16-(P-1)-ShiftTableE''_2N[idx]-sc The CCLM prediction parameter derivation unit 310442 derives a shift value expC according to the logarithm of the absolute value absDiffC of the color difference value diffC.

[0239] diffC = C_Y_MAX - C_Y_MIN absDiffC = (diffC<0 ? -diffC:diffC) rangeDiffC = (absDiffC >> (max_a_bits-P-1)) expC = ceil(log2(rangeDiffC+1)) Here, a configuration in which the value of max_a_bits is set to P+1 is also preferable. In this case, rangeDiffC=absDiffC, so the CCLM prediction parameter derivation unit 310442 omits rangeDiffC and derives expC as follows.

[0240] expC = ceil(log2(absDiffC+1)) When the CCLM prediction parameter derivation unit 310442 derives the parameter a from the product of diffC and v, it further shifts diffC*v to the right by expC as shown below to derive the parameter a with a limited number of bits.

[0241] add = (1 << expC) >> 1 a = (diffC*v+add) >> expC b = C_Y_MIN-((a*Y_MIN) >> expC) / / shift_a = expC The CCLM prediction parameter derivation unit 310442 adjusts the value of shiftA by subtracting exp derived using the denominator (luminance difference value diff) and expC derived using the numerator (color difference difference value diffC) from the initial value of shiftA (e.g., 16).

[0242] shiftA = 16 - (exp+expC) For example, if max_a_bits=5, a is expressed with 5-bit precision (-16 to 15). Also, expC is a variable that increases as the absolute value of the color difference diffC increases (a variable that increases in proportion to the logarithm of absDiffC).

[0243] expC = ceil(log2(rangeDiffC)) When rangeDiffC = 0, expC is set to 0. expC may be derived by referring to a table.

[0244] expC = ShiftTableE''_2N[rangeDiffC+1] The CCLM prediction filter unit 310443 uses the CCLM prediction parameters (a, b) and the adjusted shiftA described above, in accordance with equation (CCLM-1), to output a predicted image predSamples[][].

[0245] In this way, the bit depth of a can be reduced by adaptively deriving the shift amount of a from the chrominance difference diffC. This has the effect of simplifying the product of a and the luminance value refSamples[][] in equation (CCLM-1) while suppressing deterioration of accuracy.

[0246] In the processing example 6, the product of diffC*v in the derivation of a is reduced from 11 bit*16 bit in the processing example 1 to 11 bit*P bit, which has the effect of simplifying the product. When P=4, it is 11 bit*4 bit=15 bit.

[0247] In the processing example 6, the product of a*Y_MIN in the derivation of b is reduced from 27 bits*10 bits in the processing example 1 to max_a_bits bits*10 bits, so that the product is simplified. When max_a_bits=5, 5 bits*10 bits=15 bits.

[0248] In the process 6, the product of the formula (CCLM-1) is reduced from 27 bits*10 bits in the process example 1 to max_a_bits bits*10 bits, so that the product is simplified. When max_a_bits=5, 5 bits*10 bits=15 bits.

[0249] (Processing Example 7) Below, processing example 7 will be explained as a combination of processing examples 1 to 3 (processing example 4) which are primarily intended to reduce the table, and processing examples 2, 5, and 6 which are primarily intended to reduce the bit width. Some of the content that has already been explained will be omitted and an explanation will be given briefly. Also, shiftB, which limits diff to a specified number of bits, is set to 0. The method for deriving CCLM prediction parameters a and b is shown below. However, if C_Y_MAX=C_Y_MIN, set a=0 and b=C_Y_MIN.

[0250] The CCLM prediction parameter derivation unit 310442 derives an index idx for referencing the inverse table DivTableM_2N' and a variable exp for adjusting accuracy from the luminance difference value diff, and derives a value v equivalent to the inverse of diff.

[0251] shiftA = baseA = 16 diff = Y_MAX-Y_MIN range = diff >> N sc = ceil(log2(range+1)) idx = diff >> sc exp = baseA -(P-1)- ceil(log2(idx))-sc msb = 1 << (P-1) v = (DivTableM_2N'[idx] | msb) Here, baseA is the number of bits (e.g., 16) used as a reference when deriving the reciprocal table DivTableM_2N'[idx], N is a constant corresponding to the number of elements in DivTableM_2N' (2^N), P is a constant corresponding to the number of bits of the mantissa of (2^16 / diff) in exponential notation with a base of 2, and max_a_bits is a constant corresponding to the number of bits of the mantissa of a in exponential notation with a base of 2. msb is also a constant. For example, N=5, P=4, max_a_bits=5, and msb=2^(P-1)=8 may be used. An example of DivTableM_2N'[] when msb=2^(P-1) (with offset) is shown below.

[0252] DivTableM_2N'

[32] = { 0, 0, 0, 3, 0, 5, 3, 1, 0, 6, 5, 4, 3, 2, 1, 1, 0, 7, 6, 5, 5, 4, 4, 3, 3, 2, 2, 1, 1, 1, 1, 0} The CCLM prediction parameter derivation unit 310442 derives a variable expC for limiting the bit width of the parameter a from the chrominance difference value diffC.

[0253] max_a_bits = 5 diffC = C_Y_MAX - C_Y_MIN absDiffC = (diffC<0 ? -diffC:diffC) rangeDiffC = (absDiffC >> (max_a_bits-P-1)) expC = ceil(log2(rangeDiffC+1)) shift_a = expC The CCLM prediction parameter derivation unit 310442 further shifts diffC*v to the right by shift_a as follows, to derive parameter a with a limited number of bits.

[0254] add = 1 << shift_a >> 1 a = (diffC*v+add) >> shift_a In this configuration, since shift_a=expC, the derivation of a and b can be replaced with the following equation.

[0255] add = (1 << expC) >> 1 a = (diffC*v+add) >> expC This makes it possible to keep the bit width (precision) of a constant, regardless of the size of diffC.

[0256] The CCLM prediction parameter derivation unit 310442 adjusts the value of shiftA by subtracting exp derived using diff and expC derived using diffC from the initial value of shiftA (for example, 16).

[0257] shiftA -= exp+expC Furthermore, when the initial value of shiftA is 16, it may also be derived as follows.

[0258] shiftA = 16 - exp - expC Incidentally, the initial value baseA of shiftA is also used to derive expC, and the two values ​​cancel each other out. As a result, shiftA may be derived directly using the constants P, idx, and rangeDiffC.

[0259] shiftA =baseA - (baseA-(P-1)-ceil(log2(idx))-sc) - ceil(log2(rangeDiffC+1)) = P-1 + ceil(log2(idx)) + sc - ceil(log2(rangeDiffC+1)) The CCLM prediction parameter derivation unit 310442 derives the parameter b using the parameter a with a limited bit width.

[0260] b = C_Y_MIN-((a*Y_MIN) >> shiftA) The CCLM prediction filter unit 310443 uses the CCLM prediction parameters (a, b) and the adjusted shiftA described above, in accordance with equation (CCLM-1), to output a predicted image predSamples[][].

[0261] As shown in processing example 6, expC may be a predetermined constant, independent of diffC. However, expC is less than the value obtained by adding P (the number of bits in the mantissa in exponential notation with a base of 2 of (2^16 / diff)) to the bit depth of the image. For example, when bitDepth=10 and P=4, expC is less than 14.

[0262] expC < bitDepth+P This makes it possible to simplify the processing, although the accuracy of a is somewhat reduced.

[0263] The above configuration can provide the effects described in the processing examples 1 to 3, 5, and 6. To reiterate the main effects, at least the following effects can be obtained.

[0264] As explained in Processing Example 3, by referencing a table using diff >> sc, it is possible to obtain the simplification effect of reducing the table size.

[0265] As explained in the processing examples 5 and 6, the effect of simplifying the product by reducing the bit width can be obtained.

[0266] (More examples) In the above processing example, an example of reducing the memory size for storing tables used in CCLM processing has been described, but the technical concept of the present invention can also be used to reduce the memory size for storing other information and the bit width of multiplication. For example, it can be applied to tables used to derive scaled motion vectors.

[0267] A CCLM prediction unit according to one embodiment of the present invention is a CCLM prediction unit that generates a predicted image by CCLM prediction, and includes a CCLM prediction parameter derivation unit that derives CCLM prediction parameters (a, b) using a luminance difference value, a chrominance difference value, and a table, and a CCLM prediction filter unit that generates a chrominance predicted image using a luminance reference image and the CCLM prediction parameters (a, b), and is characterized in that the CCLM prediction parameter derivation unit derives the CCLM prediction parameter a by shifting a value obtained by multiplying an element of the table referenced by the luminance difference value by the chrominance difference value.

[0268] In a CCLM prediction unit according to one aspect of the present invention, the CCLM prediction parameter derivation unit derives a luminance difference value from a first pixel having a maximum luminance value and a second pixel having a minimum luminance value of adjacent blocks, derives a chrominance difference value from chrominance pixel values ​​of the first pixel and the second pixel, derives a scale shift value sc corresponding to the luminance difference value, multiplies the chrominance difference value by a value in a table referenced by an index idx obtained by shifting the luminance difference value to the right by sc, and further shifts the value obtained by the multiplication, thereby deriving a CCLM prediction parameter a.

[0269] In a CCLM prediction unit according to one aspect of the present invention, the CCLM prediction parameter derivation unit multiplies a value obtained by adding an offset to a value in a table referenced by the idx by a color difference value.

[0270] In a CCLM prediction unit according to one aspect of the present invention, the CCLM prediction parameter derivation unit derives a first shift value corresponding to a logarithm of an absolute color difference value, multiplies the color difference value by a value in a table referenced by idx, and further shifts the value obtained by the multiplication by a shift value expC, thereby deriving the CCLM prediction parameter a.

[0271] In a CCLM prediction unit according to one embodiment of the present invention, the CCLM prediction parameter derivation unit derives a second shift value corresponding to a logarithm of a luminance difference value diff, and derives a CCLM prediction parameter b using a color difference value of the second pixel, a CCLM prediction parameter a, a luminance value of the second pixel, and the first and second shift values.

[0272] In the CCLM prediction unit according to one aspect of the present invention, the first shift value and the second shift value are derived by referring to a table.

[0273] (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 in software by using a CPU (Central Processing Unit).

[0274] In the latter case, each of the above devices includes a CPU that executes the commands of a program that realizes each function, a ROM (Read Only Memory) that stores the above program, a RAM (Random Access Memory) that expands the above program, a storage device (recording medium) such as a memory that stores the above program and various data, etc. The object of the embodiment of the present invention can also be achieved by supplying each of the above devices with a recording medium on which the program code (executable program, intermediate code program, source program) of the control program of each of the above devices, which is software that realizes the above-mentioned functions, is recorded in a computer-readable manner, and the computer (or CPU or MPU) reads and executes the program code recorded on the recording medium.

[0275] 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).

[0276] 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. Note that 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.

[0277] 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. (CROSS REFERENCE TO RELATED APPLICATIONS) This application claims the benefit of priority to Japanese Patent Application No. 2018-238526, filed on December 20, 2018, the entire contents of which are incorporated herein by reference. [Explanation of symbols]

[0278] 31 Image Decoding Device 301 Entropy Decoding Unit 302 Parameter Decoding Unit 303 Inter-prediction parameter decoding unit 304 Intra prediction parameter decoding unit 308 Prediction Image Generation Unit 309 Inter-prediction image generation unit 310 Intra-prediction image generation unit 3104 Prediction Department 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 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 coding unit 113 Intra prediction parameter coding unit< / exp>

Claims

1. 2. A video decoding device that decodes encoded data to generate a decoded image, (i) a CCLM prediction parameter derivation unit that derives a first CCLM (Cross-Component Linear Model) prediction parameter and (ii) a second CCLM (Cross-Component Linear Model) prediction parameter; The CCLM prediction parameter derivation unit includes: An index for referencing the reciprocal table; A variable for limiting the bit width of the first CCLM prediction parameter; deriving said first CCLM prediction parameter by right shifting a value calculated from a value in a reciprocal table identified by said index by said variable; deriving the second CCLM prediction parameter using the first CCLM prediction parameter; The video decoding device, wherein the reciprocal table is composed of a plurality of single-digit integer values ​​starting from 0.

2. 1. A video encoding device for generating encoded data, comprising: (i) a CCLM prediction parameter derivation unit that derives a first CCLM (Cross-Component Linear Model) prediction parameter and (ii) a second CCLM (Cross-Component Linear Model) prediction parameter; The CCLM prediction parameter derivation unit includes: An index for referencing the reciprocal table; A variable for limiting the bit width of the first CCLM prediction parameter; deriving said first CCLM prediction parameter by right shifting a value calculated from a value in a reciprocal table identified by said index by said variable; deriving the second CCLM prediction parameter using the first CCLM prediction parameter; The video encoding device according to the present invention, wherein the reciprocal table is composed of a plurality of single-digit integer values ​​starting from 0.

Citation Information

Patent Citations

  • Illumination compensation device, image decoding device, and image encoding device

    JP2018174567A

  • Image predicting device for image decoding device or image encoding device

    WO2017061189A1