WO2018159526A1 - Moving picture coding device and moving picture decoding device - Google Patents

Moving picture coding device and moving picture decoding device Download PDF

Info

Publication number
WO2018159526A1
WO2018159526A1 PCT/JP2018/006937 JP2018006937W WO2018159526A1 WO 2018159526 A1 WO2018159526 A1 WO 2018159526A1 JP 2018006937 W JP2018006937 W JP 2018006937W WO 2018159526 A1 WO2018159526 A1 WO 2018159526A1
Authority
WO
WIPO (PCT)
Prior art keywords
unit
encoding
decoding
last
flag
Prior art date
Application number
PCT/JP2018/006937
Other languages
French (fr)
Japanese (ja)
Inventor
友子 青野
知宏 猪飼
Original Assignee
シャープ株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by シャープ株式会社 filed Critical シャープ株式会社
Publication of WO2018159526A1 publication Critical patent/WO2018159526A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/61Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding in combination with predictive coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/91Entropy coding, e.g. variable length coding [VLC] or arithmetic coding

Definitions

  • One embodiment of the present invention relates to an image decoding device and an image encoding device.
  • an image encoding device that generates encoded data by encoding the moving image, and image decoding that generates a decoded image by decoding the encoded data The device is used.
  • the moving image encoding method include a method proposed in H.264 / AVC and HEVC (High-Efficiency Video Coding).
  • an image (picture) constituting a moving image is a slice obtained by dividing the image, a coding unit obtained by dividing the slice (coding unit (Coding Unit : CU)), and a hierarchical structure consisting of a prediction unit (PU) and a transform unit (TU) that are obtained by dividing a coding unit. Decrypted.
  • a predicted image is usually generated based on a local decoded image obtained by encoding / decoding an input image, and the predicted image is generated from the input image (original image).
  • a prediction residual obtained by subtraction (sometimes referred to as “difference image” or “residual image”) is encoded. Examples of methods for generating a predicted image include inter-screen prediction (inter prediction) and intra-screen prediction (intra prediction).
  • the moving image encoding device encodes the quantized transform coefficient obtained by performing orthogonal transform and quantization on the prediction residual, and the moving image decoding device decodes the quantized transform coefficient from the encoded data, and performs inverse quantization and Inverse orthogonal transformation is performed to restore the prediction error (Non-Patent Document 1).
  • processing is divided into position information and level information of each quantized transform coefficient in the CU, thereby removing redundancy and reducing the amount of codes (Non-Patent Document) 2).
  • each quantized transform coefficient in the CU is a first flag indicating the presence or absence of a non-zero quantized transform coefficient in the CU, and indicates the position of the last non-zero quantized transform coefficient in the scan order.
  • LAST second flag indicating presence / absence of non-zero quantized transform coefficient for each sub-block obtained by dividing CU, third flag indicating whether each quantized transform coefficient in the sub-block is non-zero
  • each non-zero Encoding is performed by dividing into a plurality of syntaxes indicating levels (magnitudes) of quantized transform coefficients.
  • the quantization transform coefficient is not directly encoded, but is divided into a plurality of pieces of information, thereby reducing the amount of codes.
  • LAST indicating the position of the last non-zero quantized transform coefficient in the scan order is a single coordinate, it does not depend much on the quantization parameter and has a large code amount.
  • One aspect of the present invention has been made in view of the above-described problems, and its purpose is to reduce the code amount of LAST indicating the position of the last non-zero quantized transform coefficient in scan order,
  • An object of the present invention is to provide an image decoding apparatus and an image encoding apparatus capable of improving encoding efficiency.
  • An image encoding device includes a dividing unit that divides one screen of an input moving image into encoding units (CU) including a plurality of pixels, and performs predetermined conversion using the CU as a unit to perform conversion coefficients. And a variable-length coding unit that performs variable-length coding on the transform coefficient, and the variable-length coding unit indicates whether a non-zero transform coefficient exists in the CU.
  • a first determination unit for determining a value of one flag, and a second value for determining a second flag value indicating whether or not a non-zero conversion coefficient exists only in a limited region of the CU.
  • the derivation unit that derives the syntax indicating the farthest position (LAST) and non-zero coefficient value (LEVEL) by scanning the transform coefficient from the DC component in the scan order in the CU, and the encoding parameter Switching between the first flag and the second flag to be variable-length encoded.
  • the variable length coding is performed on the first encoding unit that performs variable length encoding and the first flag, and there is a non-zero transform coefficient in the CU
  • the syntax indicating LAST and LEVEL is encoded.
  • the variable length coding of the second encoding unit and the second flag is performed, if a non-zero transform coefficient exists only in a limited region of the CU, the syntax indicating LEVEL is encoded.
  • a third encoding unit that encodes syntax indicating LAST and LEVEL is provided.
  • An image decoding apparatus includes a variable length decoding unit, an output unit that performs variable length decoding of encoded data using a coding unit (CU) including a plurality of pixels as a processing unit, and outputs a syntax.
  • CU coding unit
  • variable length decoding unit refers to an encoding parameter and indicates whether or not a non-zero transform coefficient exists in the CU
  • first decoding unit that performs variable-length decoding by switching which of the second flags indicating whether or not non-zero transform coefficients exist only in a limited region of the CU
  • Variable length decoding the second flag and the CU limitation To indicate that non-zero transform coefficients exist only in the specified area, set the value indicating the highest frequency component in the limited area to LAST, decode the variable length code indicating LEVEL, and limit the CU
  • a third decoding unit that performs variable-length decoding on the syntax indicating LAST and LEVEL is provided.
  • FIG. 1 is a schematic diagram illustrating a configuration of an image transmission system according to an embodiment of the present invention. It is a figure which shows the hierarchical structure of the data of the encoding stream which concerns on one Embodiment of this invention. It is a figure which shows the pattern of PU division
  • 10 is another flowchart showing the operation of transform coefficient decoding processing when the definition of cbf is changed. It is a flowchart which shows the operation
  • 10 is another flowchart showing the operation of transform coefficient encoding processing when the definition of cbf is switched. It is a figure explaining the expression method of LAST. It is a figure which shows the code amount required for encoding of LAST. It is a flowchart which shows the operation
  • FIG. 1 is a schematic diagram showing a configuration of an image transmission system 1 according to the present embodiment.
  • the image transmission system 1 is a system that transmits a code obtained by encoding an encoding target image, decodes the transmitted code, and displays an image.
  • the image transmission system 1 includes an image encoding device 11, a network 21, an image decoding device 31, and an image display device 41.
  • the image encoding device 11 receives an image T indicating a single layer image or a plurality of layers.
  • a layer is a concept used to distinguish a plurality of pictures when there are one or more pictures constituting a certain time. For example, when the same picture is encoded with a plurality of layers having different image quality and resolution, scalable encoding is performed, and when a picture of a different viewpoint is encoded with a plurality of layers, view scalable encoding is performed.
  • inter-layer prediction, inter-view prediction When prediction is performed between pictures of a plurality of layers (inter-layer prediction, inter-view prediction), encoding efficiency is greatly improved. Further, even when prediction is not performed (simultaneous casting), encoded data can be collected.
  • the network 21 transmits the encoded stream Te generated by the image encoding device 11 to the image decoding device 31.
  • the network 21 is the Internet, a wide area network (WAN: Wide Area Network), a small network (LAN: Local Area Network), or a combination thereof.
  • 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 be replaced with a storage medium that records an encoded stream Te such as a DVD (Digital Versatile Disc) or a BD (Blue-ray Disc).
  • the image decoding device 31 decodes each of the encoded streams Te transmitted by the network 21, and generates one or a plurality of decoded images Td decoded.
  • the image display device 41 displays all or part of one or more decoded images Td generated by the image decoding device 31.
  • the image display device 41 includes, for example, a display device such as a liquid crystal display or an organic EL (Electro-luminescence) display.
  • a display device such as a liquid crystal display or an organic EL (Electro-luminescence) display.
  • a high-quality enhancement layer image is displayed and only a lower processing capability is provided. Displays a base layer image that does not require higher processing capability and display capability as an extension layer.
  • X? Y: z is a ternary operator that takes y when x is true (non-zero) and takes z when x is false (0).
  • FIG. 2 is a diagram showing a hierarchical structure of data in the encoded stream Te.
  • the encoded stream Te illustratively includes a sequence and a plurality of pictures constituting the sequence.
  • (A) to (f) of FIG. 2 respectively show an encoded video sequence defining a sequence SEQ, an encoded picture defining a picture PICT, an encoded slice defining a slice S, and an encoded slice defining a slice data
  • the encoded video sequence In the encoded video sequence, a set of data referred to by the image decoding device 31 for decoding the sequence SEQ to be processed is defined. As shown in FIG. 2A, 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 an addition. Includes SEI (Supplemental Enhancement Information). Here, the value indicated after # indicates the layer ID.
  • FIG. 2 shows an example in which encoded data of # 0 and # 1, that is, layer 0 and layer 1, exists, but the type of layer and the number of layers are not dependent on this.
  • the video parameter set VPS is a set of coding parameters common to a plurality of moving images, a plurality of layers included in the moving image, and coding parameters related to individual layers in a moving image composed of a plurality of layers.
  • a set is defined.
  • the sequence parameter set SPS defines a set of encoding parameters that the image decoding device 31 refers to in order to decode the target sequence. For example, the width and height of the picture are defined. A plurality of SPSs may exist. In that case, one of a plurality of SPSs is selected from the PPS.
  • a set of encoding parameters referred to by the image decoding device 31 in order to decode each picture in the target sequence is defined.
  • a quantization width reference value (pic_init_qp_minus26) used for picture decoding and a flag (weighted_pred_flag) indicating application of weighted prediction are included.
  • the picture PICT includes slices S0 to S NS-1 (NS is the total number of slices included in the picture PICT).
  • the coded slice In the coded slice, a set of data referred to by the image decoding device 31 for decoding the slice S to be processed is defined. As shown in FIG. 2C, the slice S includes a slice header SH and slice data SDATA.
  • the slice header SH includes an encoding parameter group that is referred to by the image decoding device 31 in order to determine a decoding method of the target slice.
  • Slice type designation information (slice_type) for designating a slice type is an example of an encoding parameter included in the slice header SH.
  • I slice using only intra prediction at the time of encoding (2) P slice using unidirectional prediction or intra prediction at the time of encoding, (3) B-slice using unidirectional prediction, bidirectional prediction, or intra prediction at the time of encoding may be used.
  • inter prediction is not limited to single prediction and bi-prediction, and a predicted image may be generated using more reference pictures.
  • the P, PB slice refers to a slice including a block that can use inter prediction.
  • the slice header SH may include a reference (pic_parameter_set_id) to the picture parameter set PPS included in the encoded video sequence.
  • the slice data SDATA includes a coding tree unit (CTU).
  • a CTU is a block of a fixed size (for example, 64x64) that constitutes a slice, and is sometimes called a maximum coding unit (LCU: Large Coding Unit).
  • Encoding tree unit As shown in (e) of FIG. 2, a set of data referred to by the image decoding device 31 in order to decode the processing target coding tree unit is defined.
  • the coding tree unit is divided into coding units (CU: Coding Unit) which is a basic unit of coding processing by recursive quadtree division (QT division) or binary tree division (BT division). .
  • a tree structure obtained by recursive quadtree partitioning or binary tree partitioning is called a coding tree (CT), and a node of the tree structure is called a coding node (CN).
  • CT coding tree
  • CN coding node
  • the intermediate nodes of the quadtree and the binary tree are coding nodes, and the coding tree unit itself is defined as the highest coding node.
  • CT includes, as CT information, a QT split flag (cu_split_flag) indicating whether or not to perform QT split, and a BT split mode (split_bt_mode) indicating a split method of BT split.
  • cu_split_flag and / or split_bt_mode are transmitted for each coding node CN.
  • cu_split_flag is 1, the encoding node CN is divided into four encoding nodes CN.
  • split_bt_mode is 1, the encoding node CN is horizontally divided into two encoding nodes CN.
  • split_bt_mode When split_bt_mode is 2, the encoding node CN is vertically divided into two encoding nodes CN. When split_bt_mode is 0, the encoding node CN is not divided and has one encoding unit CU as a node.
  • the encoding unit CU is a terminal node (leaf node) of the encoding node and is not further divided.
  • the size of the coding unit is 64x64 pixels, 64x32 pixels, 32x64 pixels, 32x32 pixels, 64x16 pixels, 16x64 pixels, 32x16 Pixel, 16x32 pixel, 16x16 pixel, 64x8 pixel, 8x64 pixel, 32x8 pixel, 8x32 pixel, 16x8 pixel, 8x16 pixel, 8x8 pixel, 64x4 pixel, 4x64 pixel, 32x4 pixel, 4x32 pixel, 16x4 pixel, 4x16 pixel, 8x4 pixel, It can take either 4x8 pixels or 4x4 pixels.
  • the encoding unit As shown in (f) of FIG. 2, a set of data referred to by the image decoding device 31 in order to decode the encoding unit to be processed is defined.
  • the encoding unit includes a prediction tree, a conversion tree, and a CU header CUH.
  • the CU header defines a prediction mode, a division method (PU division mode), and the like.
  • the prediction parameters (reference picture index, motion vector, etc.) of each prediction unit (PU) obtained by dividing the coding unit into one or a plurality are defined.
  • the prediction unit is one or a plurality of non-overlapping areas constituting the encoding unit.
  • the prediction tree includes one or a plurality of prediction units obtained by the above-described division.
  • a prediction unit obtained by further dividing the prediction unit is referred to as a “sub-block”.
  • the sub block is composed of a plurality of pixels.
  • the number of sub-blocks in the prediction unit is one.
  • the prediction unit is larger than the size of the sub-block, the prediction unit is divided into sub-blocks. For example, when the prediction unit is 8 ⁇ 8 and the sub-block is 4 ⁇ 4, the prediction unit is divided into four sub-blocks that are divided into two horizontally and two vertically.
  • the prediction process may be performed for each prediction unit (sub block).
  • Intra prediction is prediction within the same picture
  • inter prediction refers to prediction processing performed between different pictures (for example, between display times and between layer images).
  • the division method is encoded by the PU division mode (part_mode) of encoded data, and 2Nx2N (the same size as the encoding unit), 2NxN, 2NxnU, 2NxnD, Nx2N, nLx2N, nRx2N, and NxN etc.
  • 2NxN and Nx2N indicate 1: 1 symmetrical division
  • nRx2N indicate 1: 3, 3: 1 asymmetric partitioning.
  • the PUs included in the CU are expressed as PU0, PU1, PU2, and PU3 in this order.
  • FIG. 3 specifically show the partition shape (the position of the boundary of the PU partition) in each PU partition mode.
  • 3A shows a 2Nx2N partition
  • FIGS. 3B, 3C, and 2D show 2NxN, 2NxnU, and 2NxnD partitions (horizontal partitions), respectively.
  • E), (f), and (g) show partitions (vertical partitions) in the case of Nx2N, nLx2N, and nRx2N, respectively, and (h) shows an NxN partition.
  • the horizontal partition and the vertical partition are collectively referred to as a rectangular partition
  • 2Nx2N and NxN are collectively referred to as a square partition.
  • the encoding unit is divided into one or a plurality of conversion units, and the position and size of each conversion unit are defined.
  • a transform unit is one or more non-overlapping areas that make up a coding unit.
  • the conversion tree includes one or a plurality of conversion units obtained by the above division.
  • the division in the conversion tree includes a case where an area having the same size as that of the encoding unit is assigned as a conversion unit, and a case where recursive quadtree division is used, as in the case of the CU division described above.
  • Conversion processing is performed for each conversion unit.
  • the prediction parameter includes prediction list use flags predFlagL0 and predFlagL1, reference picture indexes refIdxL0 and refIdxL1, and motion vectors mvL0 and mvL1.
  • the prediction list use flags predFlagL0 and predFlagL1 are flags indicating whether or not reference picture lists called L0 list and L1 list are used, respectively, and a reference picture list corresponding to a value of 1 is used.
  • flag indicating whether or not it is XX when “flag indicating whether or not it is XX” is described, when the flag is not 0 (for example, 1) is XX, 0 is not XX, and logical negation, logical product, etc. 1 is treated as true and 0 is treated as false (the same applies hereinafter).
  • flag when the flag is not 0 (for example, 1) is XX, 0 is not XX, and logical negation, logical product, etc. 1 is treated as true and 0 is treated as false (the same applies hereinafter).
  • other values can be used as true values and false values in an actual apparatus or method.
  • Syntax elements for deriving inter prediction parameters included in the encoded data include, for example, PU partition mode part_mode, merge flag merge_flag, merge index merge_idx, inter prediction identifier inter_pred_idc, reference picture index refIdxLX, prediction vector index mvp_LX_idx, There is a difference vector mvdLX.
  • the reference picture list is a list including reference pictures stored in the reference picture memory 306.
  • FIG. 4 is a conceptual diagram illustrating an example of a reference picture and a reference picture list.
  • a rectangle is a picture
  • an arrow is a reference relationship of the picture
  • a horizontal axis is time
  • I, P, and B in the rectangle are an intra picture
  • a single prediction picture a bi-prediction picture
  • numbers in the rectangle are Indicates the decoding order.
  • the decoding order of pictures is I0, P1, B2, B3, and B4
  • the display order is I0, B3, B2, B4, and P1.
  • FIG. 4B shows an example of the reference picture list.
  • the reference picture list is a list representing candidate reference pictures, and one picture (slice) may have one or more reference picture lists.
  • the target picture B3 has two reference picture lists, an L0 list RefPicList0 and an L1 list RefPicList1.
  • the reference pictures are I0, P1, and B2, and the reference picture has these pictures as elements.
  • refIdxLX the reference picture index
  • the figure shows an example in which reference pictures P1 and B2 are referred to by refIdxL0 and refIdxL1.
  • the prediction parameter decoding (encoding) method includes a merge prediction (merge) mode and an AMVP (Adaptive Motion Vector Prediction) mode.
  • the merge flag merge_flag is a flag for identifying these.
  • the merge mode is a mode in which the prediction list use flag predFlagLX (or inter prediction identifier inter_pred_idc), the reference picture index refIdxLX, and the motion vector mvLX are not included in the encoded data and are derived from the prediction parameters of already processed neighboring PUs.
  • the AMVP mode is a mode in which the inter prediction identifier inter_pred_idc, the reference picture index refIdxLX, and the motion vector mvLX are included in the encoded data.
  • the motion vector mvLX is encoded as a prediction vector index mvp_LX_idx for identifying the prediction vector mvpLX and a difference vector mvdLX.
  • the inter prediction identifier inter_pred_idc is a value indicating the type and number of reference pictures, and takes one of PRED_L0, PRED_L1, and PRED_BI.
  • PRED_L0 and PRED_L1 indicate that reference pictures managed by the reference picture lists of the L0 list and the L1 list are used, respectively, and that one reference picture is used (single prediction).
  • PRED_BI indicates that two reference pictures are used (bi-prediction BiPred), and reference pictures managed by the L0 list and the L1 list are used.
  • the prediction vector index mvp_LX_idx is an index indicating a prediction vector
  • the reference picture index refIdxLX is an index indicating a reference picture managed in the reference picture list.
  • LX is a description method used when L0 prediction and L1 prediction are not distinguished from each other. By replacing LX with L0 and L1, parameters for the L0 list and parameters for the L1 list are distinguished.
  • the merge index merge_idx is an index that indicates whether one of the prediction parameter candidates (merge candidates) derived from the processed PU is used as the prediction parameter of the decoding target PU.
  • the motion vector mvLX indicates a shift amount between blocks on two different pictures.
  • a prediction vector and a difference vector related to the motion vector mvLX are referred to as a prediction vector mvpLX and a difference vector mvdLX, respectively.
  • Inter prediction identifier inter_pred_idc and prediction list use flag predFlagLX The relationship between the inter prediction identifier inter_pred_idc and the prediction list use flags predFlagL0 and predFlagL1 is as follows and can be converted into each other.
  • the flag biPred as to whether it is a bi-prediction BiPred can be derived depending on whether the two prediction list use flags are both 1. For example, it can be derived by the following formula.
  • the flag biPred can also be derived depending on whether or not the inter prediction identifier is a value indicating that two prediction lists (reference pictures) are used. For example, it can be derived by the following formula.
  • the luminance intra prediction mode IntraPredModeY is 67 mode and corresponds to planar prediction (0), DC prediction (1), and direction prediction (2 to 66).
  • the color difference intra prediction mode IntraPredModeC is a 68 mode obtained by adding a Color Component Linear Mode (CCLM) to the above 67 mode.
  • CCLM is a mode in which the pixel value of the target pixel in the target color component is derived by linear prediction with reference to the pixel value of another color component encoded before the target color component.
  • the color component includes luminance Y, color difference Cb, and color difference Cr.
  • Different intra prediction modes may be assigned depending on luminance and color difference, and the prediction mode is encoded and decoded in units of CU or PU.
  • FIG. 5 is a schematic diagram illustrating a configuration of the image decoding device 31 according to the present embodiment.
  • the image decoding device 31 includes an entropy decoding unit 301, a prediction parameter decoding unit (prediction image decoding device) 302, a loop filter 305, a reference picture memory 306, a prediction parameter memory 307, a prediction image generation unit (prediction image generation device) 308, and inversely.
  • a quantization / inverse DCT unit 311 and an addition unit 312 are included.
  • the prediction parameter decoding unit 302 includes an inter prediction parameter decoding unit 303 and an intra prediction parameter decoding unit 304.
  • the predicted image generation unit 308 includes an inter predicted image generation unit 309 and an intra predicted image generation unit 310.
  • the entropy decoding unit 301 performs entropy decoding on the coded stream Te input from the outside, and separates and decodes individual codes (syntax elements).
  • the separated code includes a prediction parameter for generating a prediction image and residual information for generating a difference image.
  • the entropy decoding unit 301 outputs a part of the separated code to the prediction parameter decoding unit 302. Some of the separated codes are, for example, the prediction mode predMode, the PU partition mode part_mode, the merge flag merge_flag, the merge index merge_idx, the inter prediction identifier inter_pred_idc, the reference picture index ref_Idx_lX, the prediction vector index mvp_LX_idx, and the difference vector mvdLX. Control of which code is decoded is performed based on an instruction from the prediction parameter decoding unit 302.
  • the entropy decoding unit 301 outputs the quantization coefficient to the inverse quantization / inverse DCT unit 311.
  • the quantization coefficient is a coefficient obtained by performing quantization by performing DCT (Discrete Cosine Transform) on the residual signal in the encoding process.
  • the entropy decoding unit 301 includes a header decoding unit 1001, a CT information decoding unit 1002, a CU decoding unit 1003, and a decoding module 1004.
  • the decoding module 1004 performs a decoding process for decoding the syntax value from the encoded data. Based on the encoded data and syntax type supplied from the header decoding unit 1001, CT information decoding unit 1002, and CU decoding unit 1003, the decoding module 1004 uses a fixed-length encoding method or an entropy encoding method such as CABAC. Decodes the encoded syntax value and returns the decoded syntax value to the supplier.
  • the header decoding unit 1001 uses the decoding module 1004 to decode the VPS, SPS, PPS, and slice header of the encoded data input from the image encoding device 11.
  • the CT information decoding unit 1002 uses the decoding module 1004 to perform decoding processing of the encoding tree unit and the encoding tree from the encoded data input from the image encoding device 11.
  • the CT information decoding unit 1002 uses the decoding module 1004 to decode the tree unit header CTUH as CTU information included in the CTU.
  • the CT information decoding unit 1002 indicates, as CT information, a QT division flag indicating whether or not the target CT is QT-divided, and whether or not the target CT is BT-divided, and in the case of BT division, indicates a BT division method
  • the BT division mode is decoded, and the target CT is recursively divided and decoded until the QT division flag and the BT division mode no longer notify further division.
  • the tree unit footer CTUF is further decoded as CTU information.
  • the tree unit header CTUH and the tree unit footer CTUF include coding parameters referred to by the image decoding device 31 in order to determine a decoding method of the target coding tree unit.
  • the CT information may include parameters applied in the target CT and lower coding nodes.
  • the CU decoding unit 1003 includes PUI information (merge flag (merge_flag), merge index (merge_idx), prediction motion vector index (mvp_idx), reference image index (ref_idx_lX), and inter prediction of the lowest coding node CN (ie, CU) Identifier (inter_pred_flag), difference vector (mvdLX, etc.), quantization transform coefficient (residual_coding), and TTI information (TU partition flag SP_TU (split_transform_flag), CU residual flag CBP_TU (cbf_cb, cbf_cr, cbf_luma), etc.) Decryption is performed using the decryption module 1004.
  • PUI information merge flag (merge_flag), merge index (merge_idx), prediction motion vector index (mvp_idx), reference image index (ref_idx_lX), and inter prediction of the lowest coding node CN (i
  • Quantized residuals are CU residual flags CBP_TU (cbf_luma, cbf_cb, cbf_cr) and non-zero quantized transform coefficient positions (last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, last_sig_coefficient_coded_coefficient_coded_coefficients It is expressed by the syntax to be expressed (coeff_abs_level_greater1, coeff_abs_level_greater2, coeff_abs_level_remaining, coeff_sign_flag).
  • the quantized transform coefficient is referred to as a transform coefficient.
  • CBP_TU is a flag indicating whether a non-zero conversion coefficient is included in the luminance component and color difference component (Cb, Cr) of a certain CU.
  • cbf_luma 1, a non-zero conversion coefficient is included in the luminance component of the CU.
  • cbf_luma is 0, a non-zero conversion coefficient is not included.
  • cbf_cb and cbf_cr are each 1
  • a non-zero conversion coefficient is included in the Cb component and Cr component of the CU
  • cbf_cb and cbf_cr are each 0, the Cb component and Cr component of the CU are each non-zero. Does not include conversion factor.
  • the CU size is 128x128 to 4x4, and there are three types of scan directions (diagonal direction, horizontal direction, vertical direction), but the same processing is performed for different CU sizes and scan directions.
  • the luminance component and the color difference component are not distinguished.
  • LAST is the position of the last non-zero transform coefficient when the upper left coordinate of the CU is (0,0) and scanned in the specified scan direction, and is the four variable-length encoded syntaxes (last_sig_coeff_x_prefix, last_sig_coeff_y_prefix , Last_sig_coeff_y_suffix, last_sig_coeff_y_suffix).
  • variable length code table is FIG.
  • the part represented by “1” or “0” is a prefix
  • the part represented by “X” is a suffix.
  • “X” represents “1” or “0”.
  • the CU is divided into fixed-size sub-blocks (for example, 4x4).
  • the CU decoding unit 1003 sets all transform coefficients in the CU to 0.
  • the CU decoding unit 1003 decodes the cbf using the decoding module 1004.
  • the CU decoding unit 1003 checks whether cbf is 1. When cbf is not 1, the CU decoding unit 1003 ends the process. When cbf is 1, the process proceeds to S1304, where the CU decoding unit 1003 decodes the syntax representing LAST and derives the LAST position.
  • the CU decoding unit 1003 decodes the coded_sub_block_flag of each subblock using the subblock including the position of LAST as a starting point.
  • the CU decoding unit 1003 performs S1306 to S1308 for all subblocks before the subblock including LAST.
  • the CU decoding unit 1003 refers to coded_sub_block_flag to check whether each subblock has a non-zero transform coefficient.
  • coded_sub_block_flag 1
  • the process proceeds to S1307
  • the CU decoding unit 1003 decodes all the sig_coeff_flags of the subblock.
  • coded_sub_block_flag 0, the process proceeds to S1308, and the CU decoding unit 1003 sets all sig_coeff_flags of the subblock to 0.
  • the CU decoding unit 1003 performs S1309 to S1311 for all sig_coeff_flags.
  • sig_coeff_flag 1
  • the CU decoding unit 1003 decodes the syntax (coeff_abs_level_greater1, coeff_abs_level_greater2, coeff_abs_level_remaining, coeff_sign_flag) expressing the coefficient level in S1310, and derives the transform coefficient value by referring to the decoding result in S1311.
  • the inter prediction parameter decoding unit 303 decodes the inter prediction parameter with reference to the prediction parameter stored in the prediction parameter memory 307 based on the code input from the entropy decoding unit 301.
  • the inter prediction parameter decoding unit 303 outputs the decoded inter prediction parameter to the prediction image generation unit 308 and stores it in the prediction parameter memory 307.
  • the intra prediction parameter decoding unit 304 refers to the prediction parameter stored in the prediction parameter memory 307 on the basis of the code input from the entropy decoding unit 301 and decodes the intra prediction parameter.
  • the intra prediction parameter is a parameter used in a process of predicting a CU within one picture, for example, an intra prediction mode IntraPredMode.
  • the intra prediction parameter decoding unit 304 outputs the decoded intra prediction parameter to the prediction image generation unit 308 and stores it in the prediction parameter memory 307.
  • the loop filter 305 applies filters 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 adding unit 312.
  • filters 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 adding unit 312.
  • the reference picture memory 306 stores the decoded image of the CU generated by the adding unit 312 at a predetermined position for each decoding target picture and CU.
  • the prediction parameter memory 307 stores the prediction parameter in a predetermined position for each decoding target picture and prediction unit (or sub-block, fixed-size block, pixel). Specifically, the prediction parameter memory 307 stores the inter prediction parameter decoded by the inter prediction parameter decoding unit 303, the intra prediction parameter decoded by the intra prediction parameter decoding unit 304, and the prediction mode predMode separated by the entropy decoding unit 301. .
  • the stored inter prediction parameters include, for example, a prediction list utilization flag predFlagLX (inter prediction identifier inter_pred_idc), a reference picture index refIdxLX, and a motion vector mvLX.
  • the prediction image generation unit 308 receives the prediction mode predMode input from the entropy decoding unit 301 and the prediction parameter from the prediction parameter decoding unit 302. Further, the predicted image generation unit 308 reads a reference picture from the reference picture memory 306. The prediction image generation unit 308 generates a prediction image of the PU using the input prediction parameter and the read reference picture in the prediction mode indicated by the prediction mode predMode.
  • the inter prediction image generation unit 309 uses the inter prediction parameter input from the inter prediction parameter decoding unit 303 and the read reference picture to perform prediction of the PU by inter prediction. Is generated.
  • the inter prediction image generation unit 309 performs a motion vector on the basis of the decoding target PU from the reference picture indicated by the reference picture index refIdxLX for a reference picture list (L0 list or L1 list) having a prediction list use flag predFlagLX of 1.
  • the reference picture block at the position indicated by mvLX is read from the reference picture memory 306.
  • the inter prediction image generation unit 309 performs prediction based on the read reference picture block to generate a prediction image of the PU.
  • the inter prediction image generation unit 309 outputs the generated prediction image of the PU to the addition unit 312.
  • the intra predicted image generation unit 310 When the prediction mode predMode indicates the intra prediction mode, the intra predicted image generation unit 310 performs intra prediction using the intra prediction parameter input from the intra prediction parameter decoding unit 304 and the read reference picture. Specifically, the intra predicted image generation unit 310 reads, from the reference picture memory 306, neighboring PUs that are pictures to be decoded and are in a predetermined range from the decoding target PUs among the PUs that have already been decoded.
  • the predetermined range is, for example, one of the left, upper left, upper, and upper right adjacent PUs when the decoding target PU sequentially moves in the so-called raster scan order, and differs depending on the intra prediction mode.
  • the raster scan order is an order in which each row is sequentially moved from the left end to the right end in each picture from the upper end to the lower end.
  • the intra predicted image generation unit 310 performs prediction in the prediction mode indicated by the intra prediction mode IntraPredMode for the read adjacent PU, and generates a predicted image of the PU.
  • the intra predicted image generation unit 310 outputs the generated predicted image of the PU to the adding unit 312.
  • the intra prediction image generation unit 310 performs planar prediction (0), DC prediction (1), direction according to the luminance prediction mode IntraPredModeY.
  • Prediction image of luminance PU is generated by any one of prediction (2 to 66), and planar prediction (0), DC prediction (1), direction prediction (2 to 66), LM mode according to color difference prediction mode IntraPredModeC
  • a prediction image of a color difference PU is generated according to any one of (67).
  • the inverse quantization / inverse DCT unit 311 inversely quantizes the quantization coefficient input from the entropy decoding unit 301 to obtain a DCT coefficient.
  • the inverse quantization / inverse DCT unit 311 performs inverse DCT (Inverse Discrete Cosine Transform) on the obtained DCT coefficient to calculate a residual signal.
  • the inverse quantization / inverse DCT unit 311 outputs the calculated residual signal to the addition unit 312.
  • the addition unit 312 adds the prediction image of the PU input from the inter prediction image generation unit 309 or the intra prediction image generation unit 310 and the residual signal input from the inverse quantization / inverse DCT unit 311 for each pixel, Generate a decoded PU image.
  • the adding unit 312 stores the generated decoded image of the PU in the reference picture memory 306, and outputs a decoded image Td in which the generated decoded image of the PU is integrated for each picture to the outside.
  • FIG. 6 is a block diagram illustrating a configuration of the image encoding device 11 according to the present embodiment.
  • the image encoding device 11 includes a prediction image generation unit 101, a subtraction unit 102, a DCT / quantization unit 103, an entropy encoding unit 104, an inverse quantization / inverse DCT unit 105, an addition unit 106, a loop filter 107, and a prediction parameter memory.
  • the prediction parameter encoding unit 111 includes an inter prediction parameter encoding unit 112 and an intra prediction parameter encoding unit 113.
  • the predicted image generation unit 101 generates, for each picture of the image T, a predicted image P of the prediction unit PU for each encoding unit CU that is an area obtained by dividing the picture.
  • the predicted image generation unit 101 reads a decoded block from the reference picture memory 109 based on the prediction parameter input from the prediction parameter encoding unit 111.
  • the prediction parameter input from the prediction parameter encoding unit 111 is, for example, a motion vector in the case of inter prediction.
  • the predicted image generation unit 101 reads a block at a position on the reference image indicated by the motion vector with the target PU as a starting point.
  • the prediction parameter is, for example, an intra prediction mode.
  • a pixel value of an adjacent PU used in the intra prediction mode is read from the reference picture memory 109, and a predicted image P of the PU is generated.
  • the predicted image generation unit 101 generates a predicted image P of the PU using one prediction method among a plurality of prediction methods for the read reference picture block.
  • the predicted image generation unit 101 outputs the generated predicted image P of the PU to the subtraction unit 102.
  • predicted image generation unit 101 has the same operation as that of the predicted image generation unit 308 already described, and therefore description thereof is omitted here.
  • the prediction image generation unit 101 generates a prediction image P of the PU based on the pixel value of the reference block read from the reference picture memory, using the parameter input from the prediction parameter encoding unit.
  • the predicted image generated by the predicted image generation unit 101 is output to the subtraction unit 102 and the addition unit 106.
  • the subtraction unit 102 subtracts the signal value of the predicted image P of the PU input from the predicted image generation unit 101 from the pixel value of the corresponding PU of the image T, and generates a residual signal.
  • the subtraction unit 102 outputs the generated residual signal to the DCT / quantization unit 103.
  • the DCT / quantization unit 103 performs DCT on the residual signal input from the subtraction unit 102 and calculates a DCT coefficient.
  • the DCT / quantization unit 103 quantizes the calculated DCT coefficient to obtain a quantization coefficient.
  • the DCT / quantization unit 103 outputs the obtained quantization coefficient to the entropy coding unit 104 and the inverse quantization / inverse DCT unit 105.
  • the entropy encoding unit 104 receives a quantization coefficient from the DCT / quantization unit 103 and receives a prediction parameter from the prediction parameter encoding unit 111.
  • the input prediction parameters include, for example, codes such as a reference picture index ref_Idx_lX, a prediction vector index mvp_LX_idx, a difference vector mvdLX, a prediction mode pred_mode_flag, and a merge index merge_idx.
  • the entropy encoding unit 104 entropy-encodes the input division information, prediction parameters, quantization transform coefficients, and the like to generate an encoded stream Te, and outputs the generated encoded stream Te to the outside.
  • the entropy encoding unit 104 includes a header encoding unit 1101, a CT information encoding unit 1102, a CU encoding unit 1103, and an encoding module 1104.
  • the entropy encoding unit 104 encodes the header information supplied from the prediction parameter encoding unit 111, the prediction parameter, and the quantized transform coefficient supplied from the DCT / quantization unit 103, and outputs encoded data.
  • the header encoding unit 1101 encodes the VPS, SPS, PPS, and slice header using the encoding module 1104.
  • the CT information encoding unit 1102 uses the encoding module 1104 to perform CTU and CT encoding processing.
  • the CT information encoding unit 1102 uses the encoding module 1104 to encode the tree unit header CTUH as CTU information included in the CTU.
  • the CT information encoding unit 1102 uses, as CT information, a QT division flag indicating whether or not to subject the target CT to QT division, whether or not to subject the target CT to BT division, and a division method in the case of BT division.
  • the BT division mode shown is encoded, and the target CT is recursively divided and encoded until the QT division flag and the BT division mode no longer notify further division.
  • the tree unit footer CTUF is further encoded as CTU information.
  • the tree unit header CTUH and the tree unit footer CTUF include coding parameters referred to by the image decoding device 31 in order to determine a decoding method of the target coding tree unit.
  • the CT information may include parameters applied in the target CT and lower coding nodes.
  • the CU encoding unit 1103 includes PUI information (merge flag (merge_flag), merge index (merge_idx), prediction motion vector index (mvp_idx), reference image index (ref_idx_lX), interlaced encoding node CN (ie, CU) Prediction identifier (inter_pred_flag), difference vector (mvdLX, etc.), quantization transform coefficient (residual_coding), and TTI information (TU partition flag SP_TU (split_transform_flag), CU residual flag CBP_TU (cbf_cb, cbf_cr, cbf_luma), etc.) Encoding is performed using the encoding module 1104.
  • PUI information merge flag (merge_flag), merge index (merge_idx), prediction motion vector index (mvp_idx), reference image index (ref_idx_lX), interlaced encoding node CN (ie, CU
  • the encoding module 1104 performs an encoding process for encoding various prediction parameters, quantization transform coefficients, and the like in a fixed-length encoding method or entropy encoding. More specifically, the encoding module 1104 encodes the header encoding unit 1101, the CTU information encoding unit 1102, and the CU encoding unit 1103 using a fixed-length encoding or an entropy encoding scheme such as CABAC, and performs encoding. Output data.
  • the operation of the encoding process of the quantized transform coefficient (transform coefficient) will be described using the flowchart of FIG. In S1401, the CU encoding unit 1103 counts the number of non-zero transform coefficients in the CU.
  • the CU encoding unit 1103 derives the syntax representing LAST in S1407 and encodes the syntax representing LAST in S1408. Next, CU encoding section 1103 performs S1409 to S1413 for the subblocks before the subblock including LAST. In S1409, the CU encoding unit 1103 counts the number of non-zero transform coefficients in the sub-block.
  • coded_sub_block_flag 1
  • the process proceeds to S1415, and S1415 to S1418 are performed on each transform coefficient in the subblock.
  • coded_sub_block_flag 1
  • the CU encoding unit 1103 proceeds to S1419 and sets all sig_coeff_flags in the sub-block to 0.
  • the CU encoding unit 1103 checks whether or not the transform coefficient value is 0 in S1415. If the transform coefficient value is 0, the process proceeds to S1416, sets sig_coeff_flag to 0, and if the transform coefficient value is 1, the process proceeds to S1417. Then, sig_coeff_flag is set to 1, and sig_coeff_flag is encoded in S1418.
  • the CU encoding unit 1103 performs S1420 to S1421 for all transform coefficients.
  • the inverse quantization / inverse DCT unit 105 inversely quantizes the quantization coefficient input from the DCT / quantization unit 103 to obtain a DCT coefficient.
  • the inverse quantization / inverse DCT unit 105 performs inverse DCT on the obtained DCT coefficient to calculate a residual signal.
  • the inverse quantization / inverse DCT unit 105 outputs the calculated residual signal to the addition unit 106.
  • the addition unit 106 adds the signal value of the prediction image P of the PU input from the prediction image generation unit 101 and the signal value of the residual signal input from the inverse quantization / inverse DCT unit 105 for each pixel, and performs decoding. Generate an image.
  • the adding unit 106 stores the generated decoded image in the reference picture memory 109.
  • the loop filter 107 performs a deblocking filter, a sample adaptive offset (SAO), and an adaptive loop filter (ALF) on the decoded image generated by the adding unit 106.
  • SAO sample adaptive offset
  • ALF adaptive loop filter
  • the prediction parameter memory 108 stores the prediction parameter generated by the encoding parameter determination unit 110 at a predetermined position for each encoding target picture and CU.
  • the reference picture memory 109 stores the decoded image generated by the loop filter 107 at a predetermined position for each picture to be encoded and each CU.
  • the encoding parameter determination unit 110 selects one set from among a plurality of sets of encoding parameters.
  • the encoding parameter is a parameter to be encoded that is generated in association with the above-described QTBT division parameter and prediction parameter.
  • the predicted image generation unit 101 generates a predicted image P of the PU using each of these encoding parameter sets.
  • the encoding parameter determination unit 110 calculates an RD cost value indicating the amount of information and the encoding error for each of a plurality of sets.
  • the RD cost value is, for example, the sum of a code amount and a square error multiplied by a coefficient ⁇ .
  • the code amount is the information amount of the encoded stream Te obtained by entropy encoding the quantization error and the encoding parameter.
  • the square error is the sum between pixels regarding the square value of the residual value of the residual signal calculated by the subtracting unit 102.
  • the coefficient ⁇ is a real number larger than a preset zero.
  • the encoding parameter determination unit 110 selects a set of encoding parameters that minimizes the calculated RD cost value.
  • the entropy encoding unit 104 outputs the selected set of encoding parameters to the outside as the encoded stream Te, and does not output the set of unselected encoding parameters.
  • the encoding parameter determination unit 110 stores the determined encoding parameter in the prediction parameter memory 108.
  • the prediction parameter encoding unit 111 derives a format for encoding from the parameters input from the encoding parameter determination unit 110 and outputs the format to the entropy encoding unit 104. Deriving the format for encoding is, for example, deriving a difference vector from a motion vector and a prediction vector. Also, the prediction parameter encoding unit 111 derives parameters necessary for generating a prediction image from the parameters input from the encoding parameter determination unit 110 and outputs the parameters to the prediction image generation unit 101.
  • the parameter necessary for generating the predicted image is, for example, a motion vector in units of sub-blocks.
  • the inter prediction parameter encoding unit 112 derives an inter prediction parameter such as a difference vector based on the prediction parameter input from the encoding parameter determination unit 110.
  • the inter prediction parameter encoding unit 112 derives parameters necessary for generating a prediction image to be output to the prediction image generating unit 101, and an inter prediction parameter decoding unit 303 (see FIG. 5 and the like) derives inter prediction parameters.
  • Some of the configurations are the same as the configuration to be performed.
  • the intra prediction parameter encoding unit 113 derives a prediction parameter necessary for generating a prediction image to be output to the prediction image generation unit 101, and the intra prediction parameter decoding unit 304 (see FIG. 5 and the like) And a part of the same structure as that for deriving.
  • the intra prediction parameter encoding unit 113 derives a format (for example, MPM_idx, rem_intra_luma_pred_mode) for encoding from the intra prediction mode IntraPredMode input from the encoding parameter determination unit 110.
  • a format for example, MPM_idx, rem_intra_luma_pred_mode
  • CBP_TU and LAST In the image coding apparatus and the image decoding apparatus according to Embodiment 1, the transform coefficient level is limited by using CBP_TU (cbf_luma, cbf_cb, cbf_cr), LAST, coded_sub_block_flag, and sig_coeff_flag as the transform coefficient, and the code amount Have reduced.
  • FIG. 15 is a graph showing a breakdown of the code amount. From FIG.
  • FIG. 16 shows the result of aggregating the average value of the number of non-zero transform coefficients for each CU size and quantization parameter in 5 types of HD resolution sequences.
  • width and height are the width and height of the CU, and 22 and 27 are quantization parameters.
  • (1) is luminance
  • (2) is color difference (Cb)
  • (3) is the average number of non-zero transform coefficients included in 1CU in intra coding and inter coding of color difference (Cr).
  • the average number of non-zero coefficients per CU is often less than 3. Since the energy is concentrated on the low frequency component by the conversion, the non-zero conversion coefficient is considered to be concentrated on the DC component and one or two AC low frequency components.
  • cbf_luma, cbf_cb, and cbf_cr are represented as cbf.
  • FIGS. 17 (1) to (4) respectively show codes and code amounts of the syntaxes related to decoding.
  • the coded_sub_block_flag and the syntax representing the transform coefficient level are omitted because there is no change in the code amount in (1) to (4), and only cbf, LAST, and sig_coeff_flag are shown.
  • the variable length code table of LAST uses FIG.
  • cbf 2 bits
  • Fig. 17 (1) shows the syntax and code amount for (1) above.
  • the 1-bit code amount is increased as compared with the above (1). Therefore, the code amount can be efficiently reduced if the non-zero transform coefficient is used under the condition where the majority of the non-zero transform coefficients are concentrated near the DC component.
  • one of the above methods (2) to (4) is used for the inter coding of the color difference component
  • the above method (1) is used for the intra / inter coding of the luminance component and the intra coding of the color difference component.
  • Which of the above (2) to (4) is used in the inter-coding of the color difference component may be defined in advance between the image encoding device and the image decoding device, or among the SPS, PPS, and slice headers. You may be notified of how to use.
  • FIGS. 18 and 19 are flowcharts showing operations of the entropy decoding unit 301 (CU decoding unit 1003) and the entropy encoding unit 104 (CU encoding unit 1103) when the methods (2) to (4) are used. It is.
  • FIG. 18 (2) is a flowchart showing the decoding process of (2) above.
  • the CU decoding unit 1003 sets all transform coefficients in the CU to 0.
  • the CU decoding unit 1003 decodes cbf.
  • S1805 is the same as S1304 in FIG. 13
  • S1806 is the same as S1305 in FIG. 13
  • S1807 is the same as S1306 to S1308 in FIG.
  • the process proceeds to S1808, and the CU decoding unit 1003 sets (0, 0) to LAST.
  • the CU decoding unit 1003 sets 1 to sig_coeff_flag of the DC component and 0 to sig_coeff_flag of other AC components.
  • the CU decoding unit 1003 decodes the transform coefficient level, but this process is the same as S1309 to S1311 in FIG.
  • FIG. 18 (3) is a flowchart showing the decoding process (3) above.
  • FIG. 18 (2) is the same as FIG. 18 (2) except that the processing of S1808 and S1809 is changed to S18081 and S18091.
  • the CU decoding unit 1003 sets (0, 1) to LAST.
  • the CU decoding unit 1003 decodes sig_coeff_flag of the DC component and the AC0 component, and sets 0 to sig_coeff_flag of the other AC components.
  • FIG. 18 (4) is a flowchart showing the decoding process (4) above.
  • 18 (2) is the same as FIG. 18 (2) except that the processing of S1808 and S1809 in FIG. 18 (2) is changed to S18082 and S18092.
  • the CU decoding unit 1003 sets (1,0) to LAST.
  • the CU decoding unit 1003 decodes the DC component, sig_coeff_flag of the AC0 and AC1 components, and sets 0 to the sig_coeff_flag of the other AC components.
  • FIG. 19 (2) is a flowchart showing the encoding process of (2) above.
  • the CU encoding unit 1103 counts the number of non-zero transform coefficients in the CU.
  • the CU encoding unit 1103 checks whether or not there is a non-zero transform coefficient in the CU. When there is no non-zero transform coefficient, the process proceeds to S1903, and the CU encoding unit 1103 sets cbf to 0. If there is a non-zero transform coefficient, the process proceeds to S1904, where the CU encoder 1103 checks whether the non-zero transform coefficient is only a DC component. If the non-zero transform coefficient is only the DC component, the process proceeds to S1905, where cbf is set to 10.
  • the process proceeds to S1906, and cbf is set to 11.
  • the CU encoding unit 1103 encodes cbf.
  • S1911 is the same as S1409 to S1413 in FIG. 14, and S1912 is the same as S1414 to S1419 in FIG.
  • cbf 11
  • 1 is set to sig_coeff_flag of the DC component and 0 is set to sig_coeff_flag of the other AC components in S1914.
  • the CU encoding unit 1103 encodes a syntax expressing the coefficient level of the non-zero transform coefficient.
  • S1913 is the same as S1420 to S1421 in FIG.
  • FIG. 19 (3) is a flowchart showing the encoding process (3) above.
  • FIG. 19 (2) is the same as FIG. 19 (2) except that the processing of S1904 and S1914 is changed to S19041 and S19141.
  • the CU encoding unit 1103 checks whether there are non-zero transform coefficients other than DC and AC0 components.
  • the CU encoding unit 1103 encodes sig_coeff_flag of the DC component and the AC0 component, and sets 0 to sig_coeff_flag of the other AC components.
  • FIG. 19 (4) is a flowchart showing the encoding process (4) above.
  • FIG. 19 (2) is the same as FIG. 19 (2) except that the processes of S1904 and S1914 in FIG. 19 (2) are changed to S19042 and S19142.
  • the CU encoding unit 1103 checks whether there are non-zero transform coefficients other than DC, AC0, and AC1 components.
  • the CU encoding unit 1103 encodes the DC component, sig_coeff_flag of the AC0 and AC1 components, and sets sig_coeff_flag of the other AC components to 0.
  • the code amount of LAST is reduced by changing the definition of cbf.
  • the number of non-zero transform coefficients depends on the CU size and the quantization parameter (QP) in addition to intra coding and inter coding.
  • CUmax max (CUwidth, CUheight).
  • (1) of Embodiment 1 is used. Note that THQ1 ⁇ THQ2 and THC1> THC2> THC3.
  • color difference Cr as shown in FIG. 20 (4), different threshold values may be set for Cb (example in FIG. 20 (3)) and Cr.
  • 21 and 22 are flowcharts showing operations of the entropy decoding unit 301 (CU decoding unit 1003) and the entropy encoding unit 104 (CU encoding unit 1103) when the method of the second embodiment is used. Steps denoted by the same numbers as in FIGS. 18 and 19 are the same processes as in FIGS.
  • the CU decoding unit 1003 determines the definition of cbf from the CU size and the quantization parameter.
  • the definition of cbf is as shown in FIG. 21 (2).
  • LAST and sig_coeff_flag are extracted from the encoded data, so no non-zero transform coefficient is set.
  • Fig. 23 shows an example where LAST is at the position (14, 6). If the LAST coordinates in the CU are expressed directly (in one step), they are expressed in 17 bits (1111111010, 1111100) using the variable length code table of FIG.
  • the LAST coordinates in the CU in addition to directly expressing the LAST coordinates in the CU, it can also be expressed in stages using the LAST sub-block position and the position in the sub-block.
  • the position of the subblock included in LAST is (3,1)
  • the position of LAST in the subblock at position (3,1) is (2,2). It is expressed by 12 bits (1110,10) and (110,110) using a long code table. Therefore, if the position of LAST is far away from (0,0), rather than directly encoding the coordinates of the LAST in the CU, it is divided into 2 sub-block positions containing the LAST and 2 LAST positions in the sub-block. The amount of code can be reduced by encoding in stages.
  • LAST is expressed in two-dimensional coordinates, but the encoding method is the same in both the horizontal and vertical directions, so the following description is based on one dimension (either horizontal or vertical).
  • FIG. 24 is a diagram showing the LAST position and the code amount necessary to express the LAST position.
  • the code table shown in FIG. 12 was used.
  • Fig. 24 (1) shows the case where the LAST coordinates in the CU are directly encoded
  • Fig. 24 (2) shows the case where the encoding is performed in two stages: the position of the LAST in the sub-block and the position of the LAST in the sub-block. It is.
  • the code amount is less if the LAST coordinates in the CU are directly encoded, but in other cases, the LAST is included It can be seen that the amount of code is smaller when encoding is performed in two stages, the sub-block position and the LAST position in the sub-block.
  • FIG. 25 is a flowchart showing the operation when S1304 in FIG. 13 and S1805 in FIG. 18 are replaced by the method of the third embodiment.
  • the CU decoding unit 1003 decodes the position of the sub block including the LAST and the position of the LAST in the sub block. In S2502, the CU decoding unit 1003 derives the coordinates of the LAST in the CU from the position of the subblock including the decoded LAST and the position of the LAST in the subblock.
  • FIG. 26 is a flowchart showing the operation when S1407 to S1408 in FIG. 14 and S1910 in FIG. 19 are replaced by the method of the third embodiment.
  • the CU encoding unit 1103 derives the LAST position in the CU.
  • the CU encoding unit 1103 derives the position of the subblock including LAST in S2602, derives the position of LAST in the subblock in S2603, and positions of the subblock including LAST and the position of LAST in the subblock in S2604. Is encoded.
  • the amount of LAST code can be reduced by encoding LAST in two stages in intra encoding and directly encoding LAST in inter encoding.
  • different threshold values may be set for Cb and Cr.
  • encoding is performed in two stages: the position of the subblock including LAST and the position of LAST within the subblock, only when there is a high possibility that LAST is included in other than the upper left subblock of CU. As a result, the LAST code amount reduction effect can be enhanced.
  • the variable length code table A in FIG. 12 is used.
  • the variable-length code table A in FIG. 12 has an advantage that the code amount is small when LAST is small. However, since the rate of increase in the code amount increases as LAST increases, there is a disadvantage when there are many large values of LAST.
  • the code amount when the LAST is small is larger than the variable length code of FIG. A variable length code table that does not become too large will be described.
  • variable length code tables 28 (1) to (4) are examples of variable length code tables that are effective when LAST is large (the code amount does not become so large).
  • the portion indicated by “1” and “0” is last_sig_coeff_Z_prefix (Z is x or y)
  • the portion indicated by “X” is last_sig_coeff_Z_suffix (Z is x or y).
  • “X” is “1” or “0”.
  • the code amount when LAST is “3” is 4 bits when using the variable length code table A of FIG. 12, 4 bits when using the variable length code table B of FIG. 28 (1), and the variable length of FIG. 28 (2).
  • the code table C is 3 bits
  • the variable length code table D in FIG. 28 (3) is 3 bits
  • the variable length code table E in FIG. 28 (4) is 4 bits.
  • the code amount when LAST is “7” is 7 bits when using the variable length code table A in FIG. 12, 6 bits when using the variable length code table B in FIG. 28 (1), and the variable length code in FIG. 28 (2). If Table C is used, it will be 5 bits, if variable length code table D of FIG. 28 (3) is used, it will be 4 bits, and if variable length code table E of FIG. 28 (4) is used, it will be 4 bits.
  • the code amount when LAST is “15” is 10 bits when using the variable length code table A of FIG. 12, 8 bits when using the variable length code table B of FIG. 28 (1), and the variable length code of FIG. 28 (2). If Table C is used, it will be 8 bits, if variable length code table D of FIG. 28 (3) is used, it will be 6 bits, and if variable length code table E of FIG. 28 (4) is used, it will be 5 bits.
  • variable length code tables of FIGS. 28 (1) to (4) are used, and in other cases (inter coding and By encoding the color difference component using the variable length code table of FIG. 12, the amount of LAST code can be reduced.
  • the intra coding of the luminance component has been described as a condition that the non-zero transform coefficient exists in the high frequency region and the LAST coordinate becomes large.
  • the CU size (CUwidth: CU width, CUheight: CU height) and quantization parameter (QP) are set under the condition that the non-zero transform coefficient exists in the high frequency region and the LAST coordinate becomes large.
  • QP quantization parameter
  • FIG. 29 is a table showing a code amount necessary for LAST encoding when the variable length code tables A to E of FIGS. 12 and 28 are used.
  • 29A is a variable length code table of FIG. 12
  • B is a variable length code table of FIG. 28 (1)
  • C is FIG. 28 (2)
  • D is FIG. 28 (3)
  • E is FIG.
  • a variable length code table B close to fixed length coding is preferable.
  • the code amount of LAST can be further reduced by switching the variable-length code tables C, D, and E depending on the concentrated location. For example, when a large number of non-zero transform coefficients exist in high frequency components, the variable length code table E is used.
  • the long code table D (FIG. 28 (3)) is used.
  • Code table D (FIG. 28 (3)) is used.
  • A, D, and E are used for the variable length code table, but B and C may be used instead of D and E.
  • FIG. 31 (1) is a flowchart showing a process of determining a variable length code table based on a quantization parameter and a CU size, and encoding or decoding LAST.
  • the CU decoding unit 1003 refers to the quantization parameter and the CU size to determine a variable length code table used for LAST encoding or decoding.
  • the CU decoding unit 1003 encodes or decodes LAST using the variable length code table determined in S3101.
  • the encoding process of LAST is the same as the process shown in FIG. 14 and the decoding process is the same as the process shown in FIG.
  • variable length code table used for the LAST encoding As described above, when the non-zero transform coefficient exists in the high frequency region and the LAST coordinate becomes large, by switching the variable length code table used for the LAST encoding according to the CU size and the quantization parameter, The code amount can be further reduced by taking advantage of the characteristics of the variable length code table.
  • Modification 2 In the first modification, the variable length code table to be used is switched depending on the quantization parameter and the CU size. In the second modification, a method for switching the variable length code table used for LAST encoding according to the scan direction will be described.
  • FIG. 32 shows the scan order (reverse order) of diagonal scan, horizontal scan, and vertical scan when the CU size is 16x16.
  • the number of bits required for LAST encoding increases at an earlier stage of the scan order than in the oblique scan.
  • FIG. 33 (1) shows the code amount of LAST at the time of oblique scanning and horizontal / vertical scanning when the variable length code table A of FIG. 12 is used. In the horizontal and vertical scans, it can be seen that the code amount of LAST increases at an early stage of the scan.
  • FIG. 33 (2) shows an example of using the variable length code table of FIG. 28 in the horizontal direction and the variable length code table of FIG. (3) is an example in which the variable length code table of FIG.
  • FIG. 33 (4) shows the code amount of LAST in this case. It can be seen that the code amount in the high frequency region can be reduced as compared with the case where only the variable length code table of FIG. 12 shown in FIG. 33 (1) is used.
  • FIG. 31 (2) is a flowchart showing a process of determining a variable length code table according to the scan direction and encoding or decoding LAST.
  • the difference from FIG. 31 (1) is that S3101 in FIG. 31 (1) is changed to S31011 in FIG. 31 (2), and the other processes are the same, and thus the description thereof is omitted.
  • the CU decoding unit 1003 determines a variable length code table to be used for LAST encoding or decoding with reference to the scan direction.
  • variable length code table is switched by switching the variable length code table used for LAST encoding according to the scan direction.
  • the amount of codes can be further reduced by taking advantage of the above characteristics.
  • Modification 3 a method of switching the variable-length code table used for LAST encoding according to the number of non-zero transform coefficients of adjacent CUs of the target CU will be described.
  • the number of non-zero transform coefficients included in the upper adjacent CU (CU_A) and left adjacent CU (CU_L) of the target CU (CU_C) shown in FIG. 34 is NA and NL, and the estimated values of the non-zero transform coefficients of the target CU N is derived.
  • the target CU is inter-prediction
  • the number of non-zero transform coefficients of adjacent CUs of inter prediction is the number of transform coefficients N of the target CU, and both CU_A and CU_L are inter-predicted.
  • the average value of NA and NL is N.
  • the number of non-zero transform coefficients may be scaled. If the areas of CU_A, CU_B, and CU_C are AA, AB, and AC, scaling according to the following formula is performed first.
  • an estimated value N of the number of non-zero conversion coefficients of the target CU is derived according to the above description.
  • LAST may be encoded using the variable length code table E.
  • FIG. 31 (3) is a flowchart showing a process of determining a variable-length coding table based on the estimated value of the number of non-zero transform coefficients of the target CU and coding or decoding LAST.
  • the difference from FIG. 31 (1) is that S3101 in FIG. 31 (1) is changed to S31012 in FIG. 31 (2), and the other processes are the same, and the description thereof is omitted.
  • the CU decoding unit 1003 refers to the estimated value of the number of non-zero transform coefficients of the target CU to determine a variable length code table used for LAST encoding or decoding.
  • variable-length code table used for LAST encoding is switched depending on the number of non-zero coefficients of adjacent CUs.
  • the code amount can be further reduced by taking advantage of the characteristics of the variable-length code table.
  • An image encoding apparatus includes a unit that divides one screen of an input moving image into encoding units (CU) including a plurality of pixels, and performs a predetermined conversion using the CU as a unit to obtain a conversion coefficient.
  • Means for determining the value of the flag and non-zero conversion only within a limited region of the CU Means for determining the value of the second flag indicating whether or not a coefficient exists, and the most distant position (LAST) and non-zero coefficient value (LEVEL) by scanning the conversion coefficient from the DC component in the scan order in the CU
  • Means for deriving the syntax indicating the encoding parameter prediction mode (intra Or inter), quantization parameter, CU size), variable length encoding means by switching which one of the first flag and the second flag is variable length encoded, and the first When variable-length coding is performed on the flag, and there is a non-zero transform coefficient in the CU, means for encoding syntax indicating LAST and LEVEL, and variable-length coding of the second flag If the non-zero transform coefficient exists only in the limited region of CU, the LEVEL syntax is encoded.If the non-zero transform coefficient exists outside the
  • An image decoding apparatus includes a unit that performs variable length decoding of encoded data using a coding unit (CU) including a plurality of pixels as a processing unit and outputs a syntax, and a transform coefficient from the syntax.
  • the variable length decoding means refers to a coding parameter (prediction mode (intra or inter), quantization parameter, CU size), and whether a non-zero transform coefficient exists in the CU.
  • Non-zero only in the first flag indicating whether or not in a limited region of the CU (DC component only, DC component and first AC component, or DC component and first and second AC components) Means for variable length decoding by switching which of the second flags indicating whether or not a transform coefficient exists, variable length decoding; variable length decoding of the first flag; wherein the first flag is CU Must have nonzero transform coefficients
  • An image encoding apparatus includes a unit that divides one screen of the input moving image into encoding units (CU) including a plurality of pixels, and performs a predetermined conversion using the CU as a unit to perform a conversion coefficient.
  • variable length coding means for variable length coding the transform coefficient indicates whether or not there is a non-zero transform coefficient in the CU.
  • Means for determining the value of the first flag means for variable-length coding the first flag, the farthest position (CU LAST) and the non-zero position in the CU by scanning the transform coefficient from the DC component in the scan order
  • Means for deriving syntax indicating coefficient value (LEVEL) means for dividing CU into sub-blocks, position of sub-block including LAST, and position of LAST within sub-block (LAST of sub-block) And the first flag is non-zero in the CU.
  • variable-length encoding Whether to perform variable-length encoding of CU LAST or sub-block LAST with reference to encoding parameter prediction mode (intra or inter), quantization parameter, CU size) And a variable length coding means for switching and a means for coding a syntax indicating LEVEL.
  • An image decoding apparatus includes a unit that performs variable length decoding of encoded data using a coding unit (CU) including a plurality of pixels as a processing unit and outputs a syntax, and a transform coefficient from the syntax.
  • a means for decoding one of LAST of CU and LAST of sub-block with reference to encoding parameter prediction mode (intra or inter), quantization parameter, CU size), and sub-block In the case of decoding LAST, a means for deriving LAST of CU and a means for decoding syntax indicating LEVEL are provided.
  • An image encoding apparatus includes a unit that divides one screen of the input moving image into encoding units (CU) including a plurality of pixels, and performs a predetermined conversion using the CU as a unit to perform a conversion coefficient.
  • variable length coding means for variable length coding the transform coefficient indicates whether or not there is a non-zero transform coefficient in the CU.
  • An image decoding apparatus includes a unit that performs variable length decoding of encoded data using a coding unit (CU) including a plurality of pixels as a processing unit and outputs a syntax, and a transform coefficient from the syntax.
  • coding parameters prediction mode (intra or inter), quantization parameter, CU size, number of non-zero coefficients of adjacent CUs, scan direction
  • variable used for LAST decoding It is characterized by comprising means for variable length decoding by switching the long code table and means for decoding the syntax indicating LEVEL.
  • a part of the image encoding device 11 and the image decoding device 31 in the above-described embodiment for example, the entropy decoding unit 301, the prediction parameter decoding unit 302, the loop filter 305, the predicted image generation unit 308, the inverse quantization / inverse DCT.
  • the prediction parameter encoding unit 111 may be realized by a computer.
  • the program for realizing the control function may be recorded on a computer-readable recording medium, and the program recorded on the recording medium may be read by a computer system and executed.
  • the “computer system” is a computer system built in either the image encoding device 11 or the image decoding device 31 and includes hardware such as an OS and peripheral devices.
  • the “computer-readable recording medium” refers to a storage device such as a portable medium such as a flexible disk, a magneto-optical disk, a ROM, a CD-ROM, or a hard disk built in a computer system.
  • the “computer-readable recording medium” is a medium that dynamically holds a program for a short 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,
  • a volatile memory inside a computer system serving as a server or a client may be included and a program that holds a program for a certain period of time.
  • the program may be a program for realizing a part of the functions described above, and may be a program capable of realizing the functions described above in combination with a program already recorded in a computer system.
  • part or all of the image encoding device 11 and the image decoding device 31 in the above-described embodiment may be realized as an integrated circuit such as an LSI (Large Scale Integration).
  • LSI Large Scale Integration
  • Each functional block of the image encoding device 11 and the image decoding device 31 may be individually made into a processor, or a part or all of them may be integrated into a processor.
  • the method of circuit integration is not limited to LSI, and may be realized by a dedicated circuit or a general-purpose processor. Further, in the case where an integrated circuit technology that replaces LSI appears due to progress in semiconductor technology, an integrated circuit based on the technology may be used.
  • the image encoding device 11 and the image decoding device 31 described above can be used by being mounted on various devices that perform transmission, reception, recording, and reproduction of moving images.
  • the moving image may be a natural moving image captured by a camera or the like, or may be an artificial moving image (including CG and GUI) generated by a computer or the like.
  • FIG. 8 is a block diagram showing a configuration of a transmission device PROD_A in which the image encoding device 11 is mounted.
  • the transmission apparatus PROD_A modulates a carrier wave with an encoding unit PROD_A1 that obtains encoded data by encoding a moving image, and with the encoded data obtained by the encoding unit PROD_A1.
  • a modulation unit PROD_A2 that obtains a modulation signal and a transmission unit PROD_A3 that transmits the modulation signal obtained by the modulation unit PROD_A2 are provided.
  • the above-described image encoding device 11 is used as the encoding unit PROD_A1.
  • Transmission device PROD_A as a source of moving images to be input to the encoding unit PROD_A1, a camera PROD_A4 that captures moving images, a recording medium PROD_A5 that records moving images, an input terminal PROD_A6 for inputting moving images from the outside, and An image processing unit A7 that generates or processes an image may be further provided.
  • FIG. 8A illustrates a configuration in which the transmission apparatus PROD_A includes all of these, but some of them may be omitted.
  • the recording medium PROD_A5 may be a recording of a non-encoded moving image, or a recording of a moving image encoded by a recording encoding scheme different from the transmission encoding scheme. It may be a thing. In the latter case, a decoding unit (not shown) for decoding the encoded data read from the recording medium PROD_A5 in accordance with the recording encoding method may be interposed between the recording medium PROD_A5 and the encoding unit PROD_A1.
  • FIG. 8 is a block diagram showing a configuration of a receiving device PROD_B in which the image decoding device 31 is mounted.
  • the receiving device PROD_B includes a receiving unit PROD_B1 that receives the modulated signal, a demodulating unit PROD_B2 that obtains encoded data by demodulating the modulated signal received by the receiving unit PROD_B1, and a demodulator.
  • a decoding unit PROD_B3 that obtains a moving image by decoding the encoded data obtained by the unit PROD_B2.
  • the above-described image decoding device 31 is used as the decoding unit PROD_B3.
  • the receiving device PROD_B is a display destination PROD_B4 for displaying a moving image, a recording medium PROD_B5 for recording a moving image, and an output terminal for outputting the moving image to the outside as a supply destination of the moving image output by the decoding unit PROD_B3 PROD_B6 may be further provided.
  • FIG. 8B illustrates a configuration in which all of these are provided in the receiving device PROD_B, but some of them may be omitted.
  • the recording medium PROD_B5 may be used for recording a non-encoded moving image, or is encoded using a recording encoding method different from the transmission encoding method. May be. In the latter case, an encoding unit (not shown) for encoding the moving image acquired from the decoding unit PROD_B3 according to the recording encoding method may be interposed between the decoding unit PROD_B3 and the recording medium PROD_B5.
  • the transmission medium for transmitting the modulation signal may be wireless or wired.
  • the transmission mode for transmitting the modulated signal may be broadcasting (here, a transmission mode in which the transmission destination is not specified in advance) or communication (here, transmission in which the transmission destination is specified in advance). Refers to the embodiment). That is, the transmission of the modulation signal may be realized by any of wireless broadcasting, wired broadcasting, wireless communication, and wired communication.
  • a terrestrial digital broadcast broadcasting station (broadcasting equipment, etc.) / Receiving station (such as a television receiver) is an example of a transmitting device PROD_A / receiving device PROD_B that transmits and receives a modulated signal by wireless broadcasting.
  • a broadcasting station (such as broadcasting equipment) / receiving station (such as a television receiver) of cable television broadcasting is an example of a transmitting device PROD_A / receiving device PROD_B that transmits and receives a modulated signal by cable broadcasting.
  • a server workstation, etc.
  • Client television receiver, personal computer, smartphone, etc.
  • VOD Video On Demand
  • video sharing service using the Internet is a transmission device that transmits and receives modulated signals via communication.
  • PROD_A / receiving device PROD_B normally, either a wireless or wired transmission medium is used in a LAN, and a wired transmission medium is used in a WAN.
  • the personal computer includes a desktop PC, a laptop PC, and a tablet PC.
  • the smartphone also includes a multi-function mobile phone terminal.
  • the video sharing service client has a function of encoding a moving image captured by the camera and uploading it to the server. That is, the client of the video sharing service functions as both the transmission device PROD_A and the reception device PROD_B.
  • FIG. 9A is a block diagram showing a configuration of a recording apparatus PROD_C equipped with the image encoding device 11 described above.
  • the recording apparatus PROD_C includes an encoding unit PROD_C1 that obtains encoded data by encoding a moving image, and the encoded data obtained by the encoding unit PROD_C1 on a recording medium PROD_M.
  • the above-described image encoding device 11 is used as the encoding unit PROD_C1.
  • the recording medium PROD_M may be of a type built into the recording device PROD_C, such as (1) HDD (Hard Disk Drive) or SSD (Solid State Drive), or (2) SD memory. It may be of the type connected to the recording device PROD_C, such as a card or USB (Universal Serial Bus) flash memory, or (3) DVD (Digital Versatile Disc) or BD (Blu-ray Disc: registration) Or a drive device (not shown) built in the recording device PROD_C.
  • HDD Hard Disk Drive
  • SSD Solid State Drive
  • SD memory such as a card or USB (Universal Serial Bus) flash memory, or (3) DVD (Digital Versatile Disc) or BD (Blu-ray Disc: registration) Or a drive device (not shown) built in the recording device PROD_C.
  • the recording device PROD_C is a camera PROD_C3 that captures moving images as a source of moving images to be input to the encoding unit PROD_C1, an input terminal PROD_C4 for inputting moving images from the outside, and a reception for receiving moving images
  • a unit PROD_C5 and an image processing unit PROD_C6 for generating or processing an image may be further provided.
  • FIG. 9A illustrates a configuration in which the recording apparatus PROD_C includes all of these, but some of them may be omitted.
  • the receiving unit PROD_C5 may receive a non-encoded moving image, or may receive encoded data encoded by a transmission encoding scheme different from the recording encoding scheme. You may do. In the latter case, a transmission decoding unit (not shown) that decodes encoded data encoded by the transmission encoding method may be interposed between the reception unit PROD_C5 and the encoding unit PROD_C1.
  • Examples of such a recording device PROD_C include a DVD recorder, a BD recorder, an HDD (Hard Disk Drive) recorder, and the like (in this case, the input terminal PROD_C4 or the receiver PROD_C5 is a main source of moving images). .
  • a camcorder in this case, the camera PROD_C3 is a main source of moving images
  • a personal computer in this case, the receiving unit PROD_C5 or the image processing unit C6 is a main source of moving images
  • a smartphone this In this case, the camera PROD_C3 or the reception unit PROD_C5 is a main source of moving images
  • the like is also an example of such a recording apparatus PROD_C.
  • FIG. 9 is a block showing a configuration of a playback device PROD_D in which the above-described image decoding device 31 is mounted.
  • the playback device PROD_D reads a moving image by decoding a read unit PROD_D1 that reads encoded data written to the recording medium PROD_M and a read unit PROD_D1 that reads the encoded data. And a decoding unit PROD_D2 to obtain.
  • the above-described image decoding device 31 is used as the decoding unit PROD_D2.
  • the recording medium PROD_M may be of the type built into the playback device PROD_D, such as (1) HDD or SSD, or (2) such as an SD memory card or USB flash memory. It may be of the type connected to the playback device PROD_D, or (3) may be loaded into a drive device (not shown) built in the playback device PROD_D, such as a DVD or BD. Good.
  • the playback device PROD_D has a display unit PROD_D3 that displays a moving image as a supply destination of the moving image output by the decoding unit PROD_D2, an output terminal PROD_D4 that outputs the moving image to the outside, and a transmission unit that transmits the moving image.
  • PROD_D5 may be further provided.
  • FIG. 9B illustrates a configuration in which the playback apparatus PROD_D includes all of these, but some of them may be omitted.
  • the transmission unit PROD_D5 may transmit a non-encoded moving image, or transmits encoded data encoded by a transmission encoding scheme different from the recording encoding scheme. You may do. In the latter case, it is preferable to interpose an encoding unit (not shown) that encodes a moving image using a transmission encoding method between the decoding unit PROD_D2 and the transmission unit PROD_D5.
  • Examples of such a playback device PROD_D include a DVD player, a BD player, and an HDD player (in this case, an output terminal PROD_D4 to which a television receiver or the like is connected is a main moving image supply destination). .
  • a television receiver in this case, the display PROD_D3 is a main supply destination of moving images
  • a digital signage also referred to as an electronic signboard or an electronic bulletin board
  • the display PROD_D3 or the transmission unit PROD_D5 is the main supply of moving images
  • Desktop PC in this case, output terminal PROD_D4 or transmission unit PROD_D5 is the main video source
  • laptop or tablet PC in this case, display PROD_D3 or transmission unit PROD_D5 is video
  • a smartphone which is a main image supply destination
  • a smartphone in this case, the display PROD_D3 or the transmission unit PROD_D5 is a main moving image supply destination
  • the like are also examples of such a playback device PROD_D.
  • Each block of the image decoding device 31 and the image encoding device 11 described above may be realized in hardware by a logic circuit formed on an integrated circuit (IC chip), or may be a CPU (Central Processing Unit). You may implement
  • IC chip integrated circuit
  • CPU Central Processing Unit
  • each of the above devices includes a CPU that executes instructions of a program that realizes each function, a ROM (Read Memory) that stores the program, a RAM (RandomAccess Memory) that expands the program, the program, and various data
  • a storage device such as a memory for storing the.
  • the object of the embodiment of the present invention is a record in which the program code (execution format program, intermediate code program, source program) of the control program for each of the above devices, which is software that realizes the above-described functions, is recorded in a computer-readable manner This can also be achieved by supplying a medium to each of the above devices, and reading and executing the program code recorded on the recording medium by the computer (or CPU or MPU).
  • Examples of the recording medium include tapes such as magnetic tapes and cassette tapes, magnetic disks such as floppy (registered trademark) disks / hard disks, CD-ROMs (Compact Disc Read-Only Memory) / MO discs (Magneto-Optical discs).
  • tapes such as magnetic tapes and cassette tapes
  • magnetic disks such as floppy (registered trademark) disks / hard disks
  • CD-ROMs Compact Disc Read-Only Memory
  • MO discs Magnetic-Optical discs
  • IC cards including memory cards
  • Cards such as optical cards
  • Semiconductor memories such as flash ROM, or PLD (Programmable logic device ) Or FPGA (Field Programmable Gate Gate Array) or the like.
  • each of the above devices may be configured to be connectable to a communication network, and the program code may be supplied via the communication network.
  • the communication network is not particularly limited as long as it can transmit the program code.
  • Internet intranet, extranet, LAN (Local Area Network), ISDN (Integrated Services Digital Network), VAN (Value-Added Network), CATV (Community Area Antenna / television / Cable Television), Virtual Private Network (Virtual Private Network) Network), telephone line network, mobile communication network, satellite communication network, and the like.
  • the transmission medium constituting the communication network may be any medium that can transmit the program code, and is not limited to a specific configuration or type.
  • IEEE Institute of Electrical and Electronic Engineers 1394, USB, power line carrier, cable TV line, telephone line, ADSL (Asymmetric Digital Subscriber Line) line, etc. wired 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. It can also be used wirelessly.
  • 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.
  • Embodiments of the present invention are preferably applied to an image decoding apparatus that decodes encoded data in which image data is encoded, and an image encoding apparatus that generates encoded data in which image data is encoded. it can. Further, the present invention can be suitably applied to the data structure of encoded data generated by an image encoding device and referenced by the image decoding device.
  • CT information decoding unit 11 Image encoding device 20
  • CU decoding unit 31 Image decoding device 41

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The definition of a flag that indicates the number of non-zero conversion coefficients in a coding unit (CU) is changed to reduce the amount of code for LAST, which indicates the position of the last non-zero conversion coefficient in the CU.

Description

動画像符号化装置及び動画像復号装置Video encoding apparatus and video decoding apparatus
 本発明の一態様は、画像復号装置、及び画像符号化装置に関する。 One embodiment of the present invention relates to an image decoding device and an image encoding device.
 動画像を効率的に伝送または記録するために、動画像を符号化することによって符号化データを生成する画像符号化装置、及び、当該符号化データを復号することによって復号画像を生成する画像復号装置が用いられている。 In order to efficiently transmit or record a moving image, an image encoding device that generates encoded data by encoding the moving image, and image decoding that generates a decoded image by decoding the encoded data The device is used.
 具体的な動画像符号化方式としては、例えば、H.264/AVCやHEVC(High-Efficiency Video Coding)にて提案されている方式などが挙げられる。 Specific examples of the moving image encoding method include a method proposed in H.264 / AVC and HEVC (High-Efficiency Video Coding).
 このような動画像符号化方式においては、動画像を構成する画像(ピクチャ)は、画像を分割することにより得られるスライス、スライスを分割することにより得られる符号化単位(符号化ユニット(Coding Unit:CU)と呼ばれることもある)、及び、符号化単位を分割することより得られるブロックである予測ユニット(PU)、変換ユニット(TU)からなる階層構造により管理され、CUごとに符号化/復号される。 In such a moving image coding system, an image (picture) constituting a moving image is a slice obtained by dividing the image, a coding unit obtained by dividing the slice (coding unit (Coding Unit : CU)), and a hierarchical structure consisting of a prediction unit (PU) and a transform unit (TU) that are obtained by dividing a coding unit. Decrypted.
 また、このような動画像符号化方式においては、通常、入力画像を符号化/復号することによって得られる局所復号画像に基づいて予測画像が生成され、当該予測画像を入力画像(原画像)から減算して得られる予測残差(「差分画像」または「残差画像」と呼ぶこともある)が符号化される。予測画像の生成方法としては、画面間予測(インター予測)、及び、画面内予測(イントラ予測)が挙げられる。 In such a moving image coding method, a predicted image is usually generated based on a local decoded image obtained by encoding / decoding an input image, and the predicted image is generated from the input image (original image). A prediction residual obtained by subtraction (sometimes referred to as “difference image” or “residual image”) is encoded. Examples of methods for generating a predicted image include inter-screen prediction (inter prediction) and intra-screen prediction (intra prediction).
 動画像符号化装置では、この予測残差に直交変換および量子化を施した量子化変換係数を符号化し、動画像復号装置では、符号化データから量子化変換係数を復号し、逆量子化および逆直交変換を施して、予測誤差を復元する(非特許文献1)。量子化変換係数の符号化および復号では、CU内の各量子化変換係数の位置情報とレベルの情報に分けて処理することで、冗長性を除去し符号量を削減している(非特許文献2)。 The moving image encoding device encodes the quantized transform coefficient obtained by performing orthogonal transform and quantization on the prediction residual, and the moving image decoding device decodes the quantized transform coefficient from the encoded data, and performs inverse quantization and Inverse orthogonal transformation is performed to restore the prediction error (Non-Patent Document 1). In encoding and decoding of quantized transform coefficients, processing is divided into position information and level information of each quantized transform coefficient in the CU, thereby removing redundancy and reducing the amount of codes (Non-Patent Document) 2).
 非特許文献2において、CU内の各量子化変換係数は、CU内に非ゼロの量子化変換係数の有無を示す第1のフラグ、スキャン順で最後の非ゼロ量子化変換係数の位置を示すLAST、CUを分割したサブブロック毎に非ゼロ量子化変換係数の有無を示す第2のフラグ、サブブロック内の各量子化変換係数が非ゼロか否かを示す第3のフラグ、各非ゼロ量子化変換係数のレベル(大きさ)を示す複数のシンタックスに分けて符号化される。このように量子化変換係数を直接符号化せず、複数の情報に分けて符号化することで、符号量を削減している。しかしながら、スキャン順で最後の非ゼロ量子化変換係数の位置を示すLASTは単一の座標であるにもかかわらず、量子化パラメータにあまり依存せず、符号量が多い。 In Non-Patent Document 2, each quantized transform coefficient in the CU is a first flag indicating the presence or absence of a non-zero quantized transform coefficient in the CU, and indicates the position of the last non-zero quantized transform coefficient in the scan order. LAST, second flag indicating presence / absence of non-zero quantized transform coefficient for each sub-block obtained by dividing CU, third flag indicating whether each quantized transform coefficient in the sub-block is non-zero, each non-zero Encoding is performed by dividing into a plurality of syntaxes indicating levels (magnitudes) of quantized transform coefficients. As described above, the quantization transform coefficient is not directly encoded, but is divided into a plurality of pieces of information, thereby reducing the amount of codes. However, although LAST indicating the position of the last non-zero quantized transform coefficient in the scan order is a single coordinate, it does not depend much on the quantization parameter and has a large code amount.
 そこで、本発明の一態様は、上記の課題に鑑みてなされたものであり、その目的は、スキャン順で最後の非ゼロ量子化変換係数の位置を示すLASTの符号量を削減することで、符号化効率を向上させることができる画像復号装置及び画像符号化装置を提供することにある。 Therefore, one aspect of the present invention has been made in view of the above-described problems, and its purpose is to reduce the code amount of LAST indicating the position of the last non-zero quantized transform coefficient in scan order, An object of the present invention is to provide an image decoding apparatus and an image encoding apparatus capable of improving encoding efficiency.
 本発明の一態様に係る画像符号化装置は、入力動画像の1画面を複数の画素からなる符号化単位(CU)に分割する分割部と、前記CUを単位として所定の変換を行い変換係数を出力する出力部と、前記変換係数を可変長符号化する可変長符号化部とを備え、前記可変長符号化部は、前記CUに非ゼロの変換係数が存在するか否かを示す第1のフラグの値を決定する第1の決定部と、前記CUの限定された領域内のみに非ゼロの変換係数が存在するか否かを示す第2のフラグの値を決定する第2の決定部と、CU内でDC成分からスキャン順に変換係数を走査して最も離れた位置(LAST)と非ゼロ係数値(LEVEL)を示すシンタックスを導出する導出部と、符号化パラメータを参照して、前記第1のフラグと第2のフラグのいずれを可変長符号化するかを切替えて可変長符号化する第1の符号化部と、前記第1のフラグを可変長符号化する場合に、CU内に非ゼロ変換係数が存在する場合は、LASTとLEVELを示すシンタックスを符号化する第2の符号化部と、前記第2のフラグを可変長符号化する場合に、CUの限定された領域内のみに非ゼロ変換係数が存在する場合は、LEVELを示すシンタックスを符号化し、CUの限定された領域外に非ゼロ変換係数が存在する場合は、LASTとLEVELを示すシンタックスを符号化する第3の符号化部とを備えることを特徴とする。 An image encoding device according to an aspect of the present invention includes a dividing unit that divides one screen of an input moving image into encoding units (CU) including a plurality of pixels, and performs predetermined conversion using the CU as a unit to perform conversion coefficients. And a variable-length coding unit that performs variable-length coding on the transform coefficient, and the variable-length coding unit indicates whether a non-zero transform coefficient exists in the CU. A first determination unit for determining a value of one flag, and a second value for determining a second flag value indicating whether or not a non-zero conversion coefficient exists only in a limited region of the CU. Refers to the determination unit, the derivation unit that derives the syntax indicating the farthest position (LAST) and non-zero coefficient value (LEVEL) by scanning the transform coefficient from the DC component in the scan order in the CU, and the encoding parameter Switching between the first flag and the second flag to be variable-length encoded. When the variable length coding is performed on the first encoding unit that performs variable length encoding and the first flag, and there is a non-zero transform coefficient in the CU, the syntax indicating LAST and LEVEL is encoded. When the variable length coding of the second encoding unit and the second flag is performed, if a non-zero transform coefficient exists only in a limited region of the CU, the syntax indicating LEVEL is encoded. When a non-zero transform coefficient is present outside the limited region of CU, a third encoding unit that encodes syntax indicating LAST and LEVEL is provided.
 本発明の一態様に係る画像復号装置は、可変長復号部と、複数の画素からなる符号化単位(CU)を処理単位として符号化データを可変長復号してシンタックスを出力する出力部と、シンタックスから変換係数を導出する導出部とを備え、前記可変長復号部は、符号化パラメータを参照して、前記CUに非ゼロの変換係数が存在するか否かを示す第1のフラグと、前記CUの限定された領域内のみに非ゼロの変換係数が存在するか否かを示す第2のフラグのいずれを可変復号するかを切替えて可変長復号する第1の復号部と、前記第1のフラグを可変長復号し、前記第1のフラグがCU内に非ゼロ変換係数が存在することを示す場合は、さらにLASTとLEVELを示すシンタックスを可変長復号する第2の復号部と、前記第2のフラグを可変長復号し、CUの限定された領域内のみに非ゼロ変換係数が存在することを示す場合は、限定された領域内の最高周波数成分を示す値をLASTにセットし、LEVELを示す可変長符号を復号し、CUの限定された領域外に非ゼロ変換係数が存在する場合は、LASTとLEVELを示すシンタックスを可変長復号する第3の復号部とを備えることを特徴とする。 An image decoding apparatus according to an aspect of the present invention includes a variable length decoding unit, an output unit that performs variable length decoding of encoded data using a coding unit (CU) including a plurality of pixels as a processing unit, and outputs a syntax. And a derivation unit for deriving a transform coefficient from the syntax, wherein the variable length decoding unit refers to an encoding parameter and indicates whether or not a non-zero transform coefficient exists in the CU And a first decoding unit that performs variable-length decoding by switching which of the second flags indicating whether or not non-zero transform coefficients exist only in a limited region of the CU, Second decoding for variable-length decoding the syntax indicating LAST and LEVEL when the first flag indicates variable-length decoding and the first flag indicates that a non-zero transform coefficient exists in the CU Variable length decoding the second flag and the CU limitation To indicate that non-zero transform coefficients exist only in the specified area, set the value indicating the highest frequency component in the limited area to LAST, decode the variable length code indicating LEVEL, and limit the CU When a non-zero transform coefficient is present outside the region, a third decoding unit that performs variable-length decoding on the syntax indicating LAST and LEVEL is provided.
 本発明の一態様によれば、動画像の画質を向上させ、かつ符号化効率を向上させることができる。 According to one aspect of the present invention, it is possible to improve the image quality of moving images and improve the encoding efficiency.
本発明の一実施形態に係る画像伝送システムの構成を示す概略図である。1 is a schematic diagram illustrating a configuration of an image transmission system according to an embodiment of the present invention. 本発明の一実施形態に係る符号化ストリームのデータの階層構造を示す図である。It is a figure which shows the hierarchical structure of the data of the encoding stream which concerns on one Embodiment of this invention. PU分割モードのパターンを示す図である。(a)~(h)は、それぞれ、PU分割モードが、2Nx2N、2NxN、2NxnU、2NxnD、Nx2N、nLx2N、nRx2N、及び、NxNの場合のパーティション形状について示している。It is a figure which shows the pattern of PU division | segmentation mode. (A) to (h) respectively show the partition shapes when the PU partitioning modes are 2Nx2N, 2NxN, 2NxnU, 2NxnD, Nx2N, nLx2N, nRx2N, and NxN. 参照ピクチャ及び参照ピクチャリストの一例を示す概念図である。It is a conceptual diagram which shows an example of a reference picture and a reference picture list. 本発明の一実施形態に係る画像復号装置の構成を示すブロック図である。It is a block diagram which shows the structure of the image decoding apparatus which concerns on one Embodiment of this invention. 本発明の一実施形態に係る画像符号化装置の構成を示すブロック図である。It is a block diagram which shows the structure of the image coding apparatus which concerns on one Embodiment of this invention. 変換係数のシンタックスと復号処理を示す図である。It is a figure which shows the syntax of a conversion factor, and a decoding process. 本発明の一実施形態に係る画像符号化装置を搭載した送信装置、及び、画像復号装置を搭載した受信装置の構成について示した図である。(a)は、画像符号化装置を搭載した送信装置を示しており、(b)は、画像復号装置を搭載した受信装置を示している。It is the figure shown about the structure of the transmitter which mounts the image coding apparatus which concerns on one Embodiment of this invention, and the receiver which mounts an image decoding apparatus. (A) shows a transmission device equipped with an image encoding device, and (b) shows a reception device equipped with an image decoding device. 本発明の一実施形態に係る画像符号化装置を搭載した記録装置、及び、画像復号装置を搭載した再生装置の構成について示した図である。(a)は、画像符号化装置を搭載した記録装置を示しており、(b)は、画像復号装置を搭載した再生装置を示している。It is the figure which showed about the structure of the recording device carrying the image coding apparatus which concerns on one Embodiment of this invention, and the reproducing | regenerating apparatus carrying an image decoding apparatus. (A) shows a recording device equipped with an image encoding device, and (b) shows a playback device equipped with an image decoding device. 本発明の一実施形態に係るエントロピー復号部を説明するブロック図である。It is a block diagram explaining the entropy decoding part which concerns on one Embodiment of this invention. 本発明の一実施形態に係るエントロピー符号化部を説明するブロック図である。It is a block diagram explaining the entropy encoding part which concerns on one Embodiment of this invention. 可変長符号表の一例である。It is an example of a variable length code table. 変換係数の復号処理の動作を示すフローチャートである。It is a flowchart which shows the operation | movement of the decoding process of a transform coefficient. 変換係数の符号化処理の動作を示すフローチャートである。It is a flowchart which shows the operation | movement of the encoding process of a transform coefficient. 変換係数の符号化処理の動作を示すフローチャートである。It is a flowchart which shows the operation | movement of the encoding process of a transform coefficient. LASTの符号量全体に占める割合を示す図である。It is a figure which shows the ratio for the whole code amount of LAST. 量子化パラメータおよびCUサイズと、非ゼロ変換係数の個数の関係を示す図である。It is a figure which shows the relationship between a quantization parameter, CU size, and the number of nonzero transform coefficients. cbfの定義を示す図である。It is a figure which shows the definition of cbf. cbfの定義を変更した場合に、変換係数の復号処理の動作を示すフローチャートである。It is a flowchart which shows the operation | movement of the decoding process of a transform coefficient when the definition of cbf is changed. cbfの定義を変更した場合に、変換係数の復号処理の動作を示す別のフローチャートである。10 is another flowchart showing the operation of transform coefficient decoding processing when the definition of cbf is changed. cbfの定義を変更した場合に、変換係数の復号処理の動作を示す別のフローチャートである。10 is another flowchart showing the operation of transform coefficient decoding processing when the definition of cbf is changed. cbfの定義を変更した場合に、変換係数の符号化処理の動作を示すフローチャートである。It is a flowchart which shows the operation | movement of the encoding process of a transform coefficient when the definition of cbf is changed. cbfの定義を変更した場合に、変換係数の符号化処理の動作を示す別のフローチャートである。10 is another flowchart showing the operation of transform coefficient encoding processing when the definition of cbf is changed. cbfの定義を変更した場合に、変換係数の符号化処理の動作を示す別のフローチャートである。10 is another flowchart showing the operation of transform coefficient encoding processing when the definition of cbf is changed. 量子化パラメータおよびCUサイズによってcbfの定義を切替える例である。In this example, the definition of cbf is switched depending on the quantization parameter and the CU size. cbfの定義を切替えた場合に、変換係数の復号処理の動作を示す別のフローチャートである。10 is another flowchart showing the operation of transform coefficient decoding processing when the definition of cbf is switched. cbfの定義を切替えた場合に、変換係数の符号化処理の動作を示す別のフローチャートである。10 is another flowchart showing the operation of transform coefficient encoding processing when the definition of cbf is switched. LASTの表現方法を説明する図である。It is a figure explaining the expression method of LAST. LASTの符号化に必要な符号量を示す図である。It is a figure which shows the code amount required for encoding of LAST. LASTの復号処理の動作を示すフローチャートである。It is a flowchart which shows the operation | movement of the decoding process of LAST. LASTの符号化処理の動作を示すフローチャートである。It is a flowchart which shows the operation | movement of the encoding process of LAST. 量子化パラメータおよびCUサイズによって、LASTの符号化方法を切り替える例である。This is an example of switching the encoding method of LAST depending on the quantization parameter and the CU size. 可変長符号表の別の一例である。It is another example of a variable-length code table. 可変長符号表の別の一例である。It is another example of a variable-length code table. 可変長符号表を比較した図である。It is the figure which compared the variable length code table. 量子化パラメータおよびCUサイズによって、可変長符号表を切り替える例である。This is an example of switching a variable length code table according to a quantization parameter and a CU size. 可変長符号表を決定し、LASTの符号化および復号処理を実施する動作を示すフローチャートである。It is a flowchart which shows the operation | movement which determines a variable-length code table and implements the encoding and decoding process of LAST. スキャン方向を示す図である。It is a figure which shows a scanning direction. スキャン方向とLASTの符号化に必要な符号量を示す図である。It is a figure which shows the code amount required for the encoding of a scanning direction and LAST. 対象CUとその隣接CUを示す図である。It is a figure which shows object CU and its adjacent CU. 対象CUの非ゼロ変換係数の個数の推定値と、選択する可変長符号表の対応関係を示す図である。It is a figure which shows the correspondence of the estimated value of the number of the non-zero conversion coefficients of the object CU, and the variable length code table to select.
  (実施形態1)
 以下、図面を参照しながら本発明の実施形態について説明する。
(Embodiment 1)
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
 図1は、本実施形態に係る画像伝送システム1の構成を示す概略図である。 FIG. 1 is a schematic diagram showing a configuration of an image transmission system 1 according to the present embodiment.
 画像伝送システム1は、符号化対象画像を符号化した符号を伝送し、伝送された符号を復号し画像を表示するシステムである。画像伝送システム1は、画像符号化装置11、ネットワーク21、画像復号装置31及び画像表示装置41を含んで構成される。 The image transmission system 1 is a system that transmits a code obtained by encoding an encoding target image, decodes the transmitted code, and displays an image. The image transmission system 1 includes an image encoding device 11, a network 21, an image decoding device 31, and an image display device 41.
 画像符号化装置11には、単一レイヤもしくは複数レイヤの画像を示す画像Tが入力される。レイヤとは、ある時間を構成するピクチャが1つ以上ある場合に、複数のピクチャを区別するために用いられる概念である。たとえば、同一ピクチャを、画質や解像度の異なる複数のレイヤで符号化するとスケーラブル符号化になり、異なる視点のピクチャを複数のレイヤで符号化するとビュースケーラブル符号化となる。複数のレイヤのピクチャ間で予測(インターレイヤ予測、インタービュー予測)を行う場合には、符号化効率が大きく向上する。また予測を行わない場合(サイマルキャスト)の場合にも、符号化データをまとめることができる。 The image encoding device 11 receives an image T indicating a single layer image or a plurality of layers. A layer is a concept used to distinguish a plurality of pictures when there are one or more pictures constituting a certain time. For example, when the same picture is encoded with a plurality of layers having different image quality and resolution, scalable encoding is performed, and when a picture of a different viewpoint is encoded with a plurality of layers, view scalable encoding is performed. When prediction is performed between pictures of a plurality of layers (inter-layer prediction, inter-view prediction), encoding efficiency is greatly improved. Further, even when prediction is not performed (simultaneous casting), encoded data can be collected.
 ネットワーク21は、画像符号化装置11が生成した符号化ストリームTeを画像復号装置31に伝送する。ネットワーク21は、インターネット(internet)、広域ネットワーク(WAN:Wide Area Network)、小規模ネットワーク(LAN:Local Area Network)またはこれらの組み合わせである。ネットワーク21は、必ずしも双方向の通信網に限らず、地上デジタル放送、衛星放送等の放送波を伝送する一方向の通信網であっても良い。また、ネットワーク21は、DVD(Digital Versatile Disc)、BD(Blue-ray Disc)等の符号化ストリームTeを記録した記憶媒体で代替されても良い。 The network 21 transmits the encoded stream Te generated by the image encoding device 11 to the image decoding device 31. The network 21 is the Internet, a wide area network (WAN: Wide Area Network), a small network (LAN: Local Area Network), or a combination thereof. 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 be replaced with a storage medium that records an encoded stream Te such as a DVD (Digital Versatile Disc) or a BD (Blue-ray Disc).
 画像復号装置31は、ネットワーク21が伝送した符号化ストリームTeのそれぞれを復号し、それぞれ復号した1または複数の復号画像Tdを生成する。 The image decoding device 31 decodes each of the encoded streams Te transmitted by the network 21, and generates one or a plurality of decoded images Td decoded.
 画像表示装置41は、画像復号装置31が生成した1または複数の復号画像Tdの全部または一部を表示する。画像表示装置41は、例えば、液晶ディスプレイ、有機EL(Electro-luminescence)ディスプレイ等の表示デバイスを備える。また、空間スケーラブル符号化、SNRスケーラブル符号化では、画像復号装置31、画像表示装置41が高い処理能力を有する場合には、画質の高い拡張レイヤ画像を表示し、より低い処理能力しか有しない場合には、拡張レイヤほど高い処理能力、表示能力を必要としないベースレイヤ画像を表示する。 The image display device 41 displays all or part of one or more decoded images Td generated by the image decoding device 31. The image display device 41 includes, for example, a display device such as a liquid crystal display or an organic EL (Electro-luminescence) display. In addition, in the spatial scalable coding and SNR scalable coding, when the image decoding device 31 and the image display device 41 have a high processing capability, a high-quality enhancement layer image is displayed and only a lower processing capability is provided. Displays a base layer image that does not require higher processing capability and display capability as an extension layer.
  <演算子>
 本明細書で用いる演算子を以下に記載する。
<Operator>
The operators used in this specification are described below.
 >>は右ビットシフト、<<は左ビットシフト、&はビットワイズAND、|はビットワイズOR、|=は別の条件との和演算(OR)である。 >> is right bit shift, << is left bit shift, & is bitwise AND, | is bitwise OR, | = is sum operation (OR) with another condition.
 x ? y : zは、xが真(0以外)の場合にy、xが偽(0)の場合にzをとる3項演算子である。 X? Y: z is a ternary operator that takes y when x is true (non-zero) and takes z when x is false (0).
 Clip3(a, b, c) は、cをa以上b以下の値にクリップする関数であり、c<aの場合にはaを返し、c>bの場合にはbを返し、その他の場合にはcを返す関数である(ただし、a<=b)。 Clip3 (a, b, c) is a function that clips c to a value between a and b, but returns a if c <a, returns b if c> b, otherwise Is a function that returns c (where a <= b).
  <符号化ストリームTeの構造>
 本実施形態に係る画像符号化装置11及び画像復号装置31の詳細な説明に先立って、画像符号化装置11によって生成され、画像復号装置31によって復号される符号化ストリームTeのデータ構造について説明する。
<Structure of encoded stream Te>
Prior to detailed description of the image encoding device 11 and the image decoding device 31 according to the present embodiment, a data structure of an encoded stream Te generated by the image encoding device 11 and decoded by the image decoding device 31 will be described. .
 図2は、符号化ストリームTeにおけるデータの階層構造を示す図である。符号化ストリームTeは、例示的に、シーケンス、及びシーケンスを構成する複数のピクチャを含む。図2の(a)~(f)は、それぞれ、シーケンスSEQを既定する符号化ビデオシーケンス、ピクチャPICTを規定する符号化ピクチャ、スライスSを規定する符号化スライス、スライスデータを規定する符号化スライスデータ、符号化スライスデータに含まれる符号化ツリーユニット、符号化ツリーユニットに含まれる符号化ユニット(Coding Unit;CU)を示す図である。 FIG. 2 is a diagram showing a hierarchical structure of data in the encoded stream Te. The encoded stream Te illustratively includes a sequence and a plurality of pictures constituting the sequence. (A) to (f) of FIG. 2 respectively show an encoded video sequence defining a sequence SEQ, an encoded picture defining a picture PICT, an encoded slice defining a slice S, and an encoded slice defining a slice data It is a figure which shows the coding unit (Coding | unit: CU) contained in the coding tree unit contained in data and coding slice data, and a coding tree unit.
  (符号化ビデオシーケンス)
 符号化ビデオシーケンスでは、処理対象のシーケンスSEQを復号するために画像復号装置31が参照するデータの集合が規定されている。シーケンスSEQは、図2の(a)に示すように、ビデオパラメータセット(Video Parameter Set)、シーケンスパラメータセットSPS(Sequence Parameter Set)、ピクチャパラメータセットPPS(Picture Parameter Set)、ピクチャPICT、及び、付加拡張情報SEI(Supplemental Enhancement Information)を含んでいる。ここで#の後に示される値はレイヤIDを示す。図2では、#0と#1すなわちレイヤ0とレイヤ1の符号化データが存在する例を示すが、レイヤの種類及びレイヤの数はこれによらない。
(Encoded video sequence)
In the encoded video sequence, a set of data referred to by the image decoding device 31 for decoding the sequence SEQ to be processed is defined. As shown in FIG. 2A, 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 an addition. Includes SEI (Supplemental Enhancement Information). Here, the value indicated after # indicates the layer ID. FIG. 2 shows an example in which encoded data of # 0 and # 1, that is, layer 0 and layer 1, exists, but the type of layer and the number of layers are not dependent on this.
 ビデオパラメータセットVPSは、複数のレイヤから構成されている動画像において、複数の動画像に共通する符号化パラメータの集合及び動画像に含まれる複数のレイヤ及び個々のレイヤに関連する符号化パラメータの集合が規定されている。 The video parameter set VPS is a set of coding parameters common to a plurality of moving images, a plurality of layers included in the moving image, and coding parameters related to individual layers in a moving image composed of a plurality of layers. A set is defined.
 シーケンスパラメータセットSPSでは、対象シーケンスを復号するために画像復号装置31が参照する符号化パラメータの集合が規定されている。例えば、ピクチャの幅や高さが規定される。なお、SPSは複数存在してもよい。その場合、PPSから複数のSPSの何れかを選択する。 The sequence parameter set SPS defines a set of encoding parameters that the image decoding device 31 refers to in order to decode the target sequence. For example, the width and height of the picture are defined. A plurality of SPSs may exist. In that case, one of a plurality of SPSs is selected from the PPS.
 ピクチャパラメータセットPPSでは、対象シーケンス内の各ピクチャを復号するために画像復号装置31が参照する符号化パラメータの集合が規定されている。例えば、ピクチャの復号に用いられる量子化幅の基準値(pic_init_qp_minus26)や重み付き予測の適用を示すフラグ(weighted_pred_flag)が含まれる。なお、PPSは複数存在してもよい。その場合、対象シーケンス内の各ピクチャから複数のPPSの何れかを選択する。 In the picture parameter set PPS, a set of encoding parameters referred to by the image decoding device 31 in order to decode each picture in the target sequence is defined. For example, a quantization width reference value (pic_init_qp_minus26) used for picture decoding and a flag (weighted_pred_flag) indicating application of weighted prediction are included. There may be a plurality of PPSs. In that case, one of a plurality of PPSs is selected from each picture in the target sequence.
  (符号化ピクチャ)
 符号化ピクチャでは、処理対象のピクチャPICTを復号するために画像復号装置31が参照するデータの集合が規定されている。ピクチャPICTは、図2の(b)に示すように、スライスS0~SNS-1を含んでいる(NSはピクチャPICTに含まれるスライスの総数)。
(Encoded picture)
In the coded picture, a set of data referred to by the image decoding device 31 in order to decode the picture PICT to be processed is defined. As shown in FIG. 2B, the picture PICT includes slices S0 to S NS-1 (NS is the total number of slices included in the picture PICT).
 なお、以下、スライスS0~SNS-1のそれぞれを区別する必要が無い場合、符号の添え字を省略して記述することがある。また、以下に説明する符号化ストリームTeに含まれるデータであって、添え字を付している他のデータについても同様である。 In the following description, if it is not necessary to distinguish each of the slices S0 to SNS-1 , the subscripts may be omitted. The same applies to data included in an encoded stream Te described below and to which other subscripts are attached.
  (符号化スライス)
 符号化スライスでは、処理対象のスライスSを復号するために画像復号装置31が参照するデータの集合が規定されている。スライスSは、図2の(c)に示すように、スライスヘッダSH、及び、スライスデータSDATAを含んでいる。
(Encoded slice)
In the coded slice, a set of data referred to by the image decoding device 31 for decoding the slice S to be processed is defined. As shown in FIG. 2C, the slice S includes a slice header SH and slice data SDATA.
 スライスヘッダSHには、対象スライスの復号方法を決定するために画像復号装置31が参照する符号化パラメータ群が含まれる。スライスタイプを指定するスライスタイプ指定情報(slice_type)は、スライスヘッダSHに含まれる符号化パラメータの一例である。 The slice header SH includes an encoding parameter group that is referred to by the image decoding device 31 in order to determine a decoding method of the target slice. Slice type designation information (slice_type) for designating a slice type is an example of an encoding parameter included in the slice header SH.
 スライスタイプ指定情報により指定可能なスライスタイプとしては、(1)符号化の際にイントラ予測のみを用いるIスライス、(2)符号化の際に単方向予測、または、イントラ予測を用いるPスライス、(3)符号化の際に単方向予測、双方向予測、または、イントラ予測を用いるBスライスなどが挙げられる。なお、インター予測は、単予測、双予測に限定されず、より多くの参照ピクチャを用いて予測画像を生成してもよい。以下、P, Bスライスと呼ぶ場合には、インター予測を用いることができるブロックを含むスライスを指す。 As slice types that can be specified by the slice type specification information, (1) I slice using only intra prediction at the time of encoding, (2) P slice using unidirectional prediction or intra prediction at the time of encoding, (3) B-slice using unidirectional prediction, bidirectional prediction, or intra prediction at the time of encoding may be used. Note that inter prediction is not limited to single prediction and bi-prediction, and a predicted image may be generated using more reference pictures. Hereinafter, the P, PB slice refers to a slice including a block that can use inter prediction.
 なお、スライスヘッダSHには、上記符号化ビデオシーケンスに含まれる、ピクチャパラメータセットPPSへの参照(pic_parameter_set_id)を含んでいても良い。 Note that the slice header SH may include a reference (pic_parameter_set_id) to the picture parameter set PPS included in the encoded video sequence.
  (符号化スライスデータ)
 符号化スライスデータでは、処理対象のスライスデータSDATAを復号するために画像復号装置31が参照するデータの集合が規定されている。スライスデータSDATAは、図2の(d)に示すように、符号化ツリーユニット(CTU:Coding Tree Unit)を含んでいる。CTUは、スライスを構成する固定サイズ(例えば64x64)のブロックであり、最大符号化単位(LCU:Largest Coding Unit)と呼ぶこともある。
(Encoded slice data)
In the encoded slice data, a set of data referred to by the image decoding device 31 for decoding the slice data SDATA to be processed is defined. As shown in FIG. 2D, the slice data SDATA includes a coding tree unit (CTU). A CTU is a block of a fixed size (for example, 64x64) that constitutes a slice, and is sometimes called a maximum coding unit (LCU: Large Coding Unit).
  (符号化ツリーユニット)
 図2の(e)に示すように、処理対象の符号化ツリーユニットを復号するために画像復号装置31が参照するデータの集合が規定されている。符号化ツリーユニットは、再帰的な4分木分割(QT分割)または2分木分割(BT分割)により符号化処理の基本的な単位である符号化ユニット(CU:Coding Unit)に分割される。再帰的な4分木分割または2分木分割により得られる木構造を符号化ツリー(CT:Coding Tree)、木構造のノードのことを符号化ノード(CN:Coding Node)と称する。4分木及び2分木の中間ノードは、符号化ノードであり、符号化ツリーユニット自身も最上位の符号化ノードとして規定される。
(Encoding tree unit)
As shown in (e) of FIG. 2, a set of data referred to by the image decoding device 31 in order to decode the processing target coding tree unit is defined. The coding tree unit is divided into coding units (CU: Coding Unit) which is a basic unit of coding processing by recursive quadtree division (QT division) or binary tree division (BT division). . A tree structure obtained by recursive quadtree partitioning or binary tree partitioning is called a coding tree (CT), and a node of the tree structure is called a coding node (CN). The intermediate nodes of the quadtree and the binary tree are coding nodes, and the coding tree unit itself is defined as the highest coding node.
 CTは、CT情報として、QT分割を行うか否かを示すQT分割フラグ(cu_split_flag)、及びBT分割の分割方法を示すBT分割モード(split_bt_mode)を含む。cu_split_flag及び/又はsplit_bt_modeは符号化ノードCNごとに伝送される。cu_split_flagが1の場合には、符号化ノードCNは4つの符号化ノードCNに分割される。cu_split_flagが0の場合、split_bt_modeが1の場合には、符号化ノードCNは2つの符号化ノードCNに水平分割される。split_bt_modeが2の場合には、符号化ノードCNは2つの符号化ノードCNに垂直分割される。split_bt_modeが0の場合には、符号化ノードCNは分割されず、1つの符号化ユニットCUをノードとして持つ。符号化ユニットCUは符号化ノードの末端ノード(リーフノード)であり、これ以上分割されない。 CT includes, as CT information, a QT split flag (cu_split_flag) indicating whether or not to perform QT split, and a BT split mode (split_bt_mode) indicating a split method of BT split. cu_split_flag and / or split_bt_mode are transmitted for each coding node CN. When cu_split_flag is 1, the encoding node CN is divided into four encoding nodes CN. When cu_split_flag is 0 and split_bt_mode is 1, the encoding node CN is horizontally divided into two encoding nodes CN. When split_bt_mode is 2, the encoding node CN is vertically divided into two encoding nodes CN. When split_bt_mode is 0, the encoding node CN is not divided and has one encoding unit CU as a node. The encoding unit CU is a terminal node (leaf node) of the encoding node and is not further divided.
 また、符号化ツリーユニットCTUのサイズが64x64画素の場合には、符号化ユニットのサイズは、64x64画素、64x32画素、32x64画素、32x32画素、64x16画素、16x64画素、32x16
画素、16x32画素、16x16画素、64x8画素、8x64画素、32x8画素、8x32画素、16x8画素、8x16画素、8x8画素、64x4画素、4x64画素、32x4画素、4x32画素、16x4画素、4x16画素、8x4画素、4x8画素、及び、4x4画素の何れかをとり得る。
Also, when the size of the coding tree unit CTU is 64x64 pixels, the size of the coding unit is 64x64 pixels, 64x32 pixels, 32x64 pixels, 32x32 pixels, 64x16 pixels, 16x64 pixels, 32x16
Pixel, 16x32 pixel, 16x16 pixel, 64x8 pixel, 8x64 pixel, 32x8 pixel, 8x32 pixel, 16x8 pixel, 8x16 pixel, 8x8 pixel, 64x4 pixel, 4x64 pixel, 32x4 pixel, 4x32 pixel, 16x4 pixel, 4x16 pixel, 8x4 pixel, It can take either 4x8 pixels or 4x4 pixels.
  (符号化ユニット)
 図2の(f)に示すように、処理対象の符号化ユニットを復号するために画像復号装置31が参照するデータの集合が規定されている。具体的には、符号化ユニットは、予測ツリー、変換ツリー、CUヘッダCUHから構成される。CUヘッダでは予測モード、分割方法(PU分割モード)等が規定される。
(Encoding unit)
As shown in (f) of FIG. 2, a set of data referred to by the image decoding device 31 in order to decode the encoding unit to be processed is defined. Specifically, the encoding unit includes a prediction tree, a conversion tree, and a CU header CUH. The CU header defines a prediction mode, a division method (PU division mode), and the like.
 予測ツリーでは、符号化ユニットを1または複数に分割した各予測ユニット(PU)の予測パラメータ(参照ピクチャインデックス、動きベクトル等)が規定される。別の表現でいえば、予測ユニットは、符号化ユニットを構成する1または複数の重複しない領域である。また、予測ツリーは、上述の分割により得られた1または複数の予測ユニットを含む。なお、以下では、予測ユニットをさらに分割した予測単位を「サブブロック」と呼ぶ。サブブロックは、複数の画素によって構成されている。予測ユニットとサブブロックのサイズが等しい場合には、予測ユニット中のサブブロックは1つである。予測ユニットがサブブロックのサイズよりも大きい場合には、予測ユニットは、サブブロックに分割される。たとえば予測ユニットが8x8、サブブロックが4x4の場合には、予測ユニットは水平に2分割、垂直に2分割からなる、4つのサブブロックに分割される。 In the prediction tree, the prediction parameters (reference picture index, motion vector, etc.) of each prediction unit (PU) obtained by dividing the coding unit into one or a plurality are defined. In other words, the prediction unit is one or a plurality of non-overlapping areas constituting the encoding unit. The prediction tree includes one or a plurality of prediction units obtained by the above-described division. Hereinafter, a prediction unit obtained by further dividing the prediction unit is referred to as a “sub-block”. The sub block is composed of a plurality of pixels. When the sizes of the prediction unit and the sub-block are equal, the number of sub-blocks in the prediction unit is one. If the prediction unit is larger than the size of the sub-block, the prediction unit is divided into sub-blocks. For example, when the prediction unit is 8 × 8 and the sub-block is 4 × 4, the prediction unit is divided into four sub-blocks that are divided into two horizontally and two vertically.
 予測処理は、この予測ユニット(サブブロック)ごとに行ってもよい。 The prediction process may be performed for each prediction unit (sub block).
 予測ツリーにおける分割の種類は、大まかにいえば、イントラ予測の場合と、インター予測の場合との2つがある。イントラ予測とは、同一ピクチャ内の予測であり、インター予測とは、互いに異なるピクチャ間(例えば、表示時刻間、レイヤ画像間)で行われる予測処理を指す。 There are roughly two types of division in the prediction tree: intra prediction and inter prediction. Intra prediction is prediction within the same picture, and inter prediction refers to prediction processing performed between different pictures (for example, between display times and between layer images).
 イントラ予測の場合、分割方法は、2Nx2N(符号化ユニットと同一サイズ)と、NxNとがある。 In the case of intra prediction, there are 2Nx2N (the same size as the encoding unit) and NxN division methods.
 また、インター予測の場合、分割方法は、符号化データのPU分割モード(part_mode)により符号化され、2Nx2N(符号化ユニットと同一サイズ)、2NxN、2NxnU、2NxnD、Nx2N、nLx2N、nRx2N、及び、NxNなどがある。なお、2NxN、Nx2Nは1:1の対称分割を示し、
2NxnU、2NxnD及びnLx2N、nRx2Nは、1:3、3:1の非対称分割を示す。CUに含まれるPUを順にPU0、PU1、PU2、PU3と表現する。
Also, in the case of inter prediction, the division method is encoded by the PU division mode (part_mode) of encoded data, and 2Nx2N (the same size as the encoding unit), 2NxN, 2NxnU, 2NxnD, Nx2N, nLx2N, nRx2N, and NxN etc. 2NxN and Nx2N indicate 1: 1 symmetrical division,
2NxnU, 2NxnD and nLx2N, nRx2N indicate 1: 3, 3: 1 asymmetric partitioning. The PUs included in the CU are expressed as PU0, PU1, PU2, and PU3 in this order.
 図3の(a)~(h)に、それぞれのPU分割モードにおけるパーティションの形状(PU分割の境界の位置)を具体的に図示している。図3の(a)は、2Nx2Nのパーティションを示し、(b)、(c)、(d)は、それぞれ、2NxN、2NxnU、及び、2NxnDのパーティション(横長パーティション)を示す。(e)、(f)、(g)は、それぞれ、Nx2N、nLx2N、nRx2Nである場合のパーティション(縦長パーティション)を示し、(h)は、NxNのパーティションを示す。なお、横長パーティションと縦長パーティションを総称して長方形パーティション、2Nx2N、NxNを総称して正方形パーティションと呼ぶ。 3 (a) to (h) in FIG. 3 specifically show the partition shape (the position of the boundary of the PU partition) in each PU partition mode. 3A shows a 2Nx2N partition, and FIGS. 3B, 3C, and 2D show 2NxN, 2NxnU, and 2NxnD partitions (horizontal partitions), respectively. (E), (f), and (g) show partitions (vertical partitions) in the case of Nx2N, nLx2N, and nRx2N, respectively, and (h) shows an NxN partition. The horizontal partition and the vertical partition are collectively referred to as a rectangular partition, and 2Nx2N and NxN are collectively referred to as a square partition.
 また、変換ツリーにおいては、符号化ユニットが1または複数の変換ユニットに分割され、各変換ユニットの位置とサイズとが規定される。別の表現でいえば、変換ユニットは、符号化ユニットを構成する1または複数の重複しない領域のことである。また、変換ツリーは、上述の分割より得られた1または複数の変換ユニットを含む。 Also, in the conversion tree, the encoding unit is divided into one or a plurality of conversion units, and the position and size of each conversion unit are defined. In other words, a transform unit is one or more non-overlapping areas that make up a coding unit. The conversion tree includes one or a plurality of conversion units obtained by the above division.
 変換ツリーにおける分割には、符号化ユニットと同一のサイズの領域を変換ユニットとして割り付けるものと、上述したCUの分割と同様、再帰的な4分木分割によるものがある。 The division in the conversion tree includes a case where an area having the same size as that of the encoding unit is assigned as a conversion unit, and a case where recursive quadtree division is used, as in the case of the CU division described above.
 変換処理は、この変換ユニットごとに行われる。 Conversion processing is performed for each conversion unit.
  (予測パラメータ)
 予測ユニット(PU:Prediction Unit)の予測画像は、PUに付随する予測パラメータによって導出される。予測パラメータには、イントラ予測の予測パラメータもしくはインター予測の予測パラメータがある。以下、インター予測の予測パラメータ(インター予測パラメータ)について説明する。インター予測パラメータは、予測リスト利用フラグpredFlagL0、predFlagL1と、参照ピクチャインデックスrefIdxL0、refIdxL1と、動きベクトルmvL0、mvL1から構成される。予測リスト利用フラグpredFlagL0、predFlagL1は、各々L0リスト、L1リストと呼ばれる参照ピクチャリストが用いられるか否かを示すフラグであり、値が1の場合に対応する参照ピクチャリストが用いられる。なお、本明細書中「XXであるか否かを示すフラグ」と記す場合、フラグが0以外(たとえば1)をXXである場合、0をXXではない場合とし、論理否定、論理積などでは1を真、0を偽と扱う(以下同様)。但し、実際の装置や方法では真値、偽値として他の値を用いることもできる。
(Prediction parameter)
A prediction image of a prediction unit (PU: Prediction Unit) is derived from a prediction parameter associated with the PU. The prediction parameters include a prediction parameter for intra prediction or a prediction parameter for inter prediction. Hereinafter, prediction parameters for inter prediction (inter prediction parameters) will be described. The inter prediction parameter includes prediction list use flags predFlagL0 and predFlagL1, reference picture indexes refIdxL0 and refIdxL1, and motion vectors mvL0 and mvL1. The prediction list use flags predFlagL0 and predFlagL1 are flags indicating whether or not reference picture lists called L0 list and L1 list are used, respectively, and a reference picture list corresponding to a value of 1 is used. In this specification, when “flag indicating whether or not it is XX” is described, when the flag is not 0 (for example, 1) is XX, 0 is not XX, and logical negation, logical product, etc. 1 is treated as true and 0 is treated as false (the same applies hereinafter). However, other values can be used as true values and false values in an actual apparatus or method.
 符号化データに含まれるインター予測パラメータを導出するためのシンタックス要素には、例えば、PU分割モードpart_mode、マージフラグmerge_flag、マージインデックスmerge_idx、インター予測識別子inter_pred_idc、参照ピクチャインデックスrefIdxLX、予測ベクトルインデックスmvp_LX_idx、差分ベクトルmvdLXがある。 Syntax elements for deriving inter prediction parameters included in the encoded data include, for example, PU partition mode part_mode, merge flag merge_flag, merge index merge_idx, inter prediction identifier inter_pred_idc, reference picture index refIdxLX, prediction vector index mvp_LX_idx, There is a difference vector mvdLX.
  (参照ピクチャリスト)
 参照ピクチャリストは、参照ピクチャメモリ306に記憶された参照ピクチャからなるリストである。図4は、参照ピクチャ及び参照ピクチャリストの一例を示す概念図である。図4の(a)において、矩形はピクチャ、矢印はピクチャの参照関係、横軸は時間、矩形中のI、P、Bは各々イントラピクチャ、単予測ピクチャ、双予測ピクチャ、矩形中の数字は復号順を示す。図に示すように、ピクチャの復号順は、I0、P1、B2、B3、B4であり、表示順は、I0、B3、B2、B4、P1である。図4の(b)に、参照ピクチャリストの例を示す。参照ピクチャリストは、参照ピクチャの候補を表すリストであり、1つのピクチャ(スライス)が1つ以上の参照ピクチャリストを有してもよい。図の例では、対象ピクチャB3は、L0リストRefPicList0及びL1リストRefPicList1の2つの参照ピクチャリストを持つ。対象ピクチャがB3の場合の参照ピクチャは、I0、P1、B2であり、参照ピクチャはこれらのピクチャを要素として持つ。個々の予測ユニットでは、参照ピクチャリストRefPicListX中のどのピクチャを実際に参照するかを参照ピクチャインデックスrefIdxLXで指定する。図では、refIdxL0及びrefIdxL1により参照ピクチャP1とB2が参照される例を示す。
(Reference picture list)
The reference picture list is a list including reference pictures stored in the reference picture memory 306. FIG. 4 is a conceptual diagram illustrating an example of a reference picture and a reference picture list. In FIG. 4A, a rectangle is a picture, an arrow is a reference relationship of the picture, a horizontal axis is time, I, P, and B in the rectangle are an intra picture, a single prediction picture, a bi-prediction picture, and numbers in the rectangle are Indicates the decoding order. As shown in the figure, the decoding order of pictures is I0, P1, B2, B3, and B4, and the display order is I0, B3, B2, B4, and P1. FIG. 4B shows an example of the reference picture list. The reference picture list is a list representing candidate reference pictures, and one picture (slice) may have one or more reference picture lists. In the illustrated example, the target picture B3 has two reference picture lists, an L0 list RefPicList0 and an L1 list RefPicList1. When the target picture is B3, the reference pictures are I0, P1, and B2, and the reference picture has these pictures as elements. In each prediction unit, which picture in the reference picture list RefPicListX is actually referred to is specified by the reference picture index refIdxLX. The figure shows an example in which reference pictures P1 and B2 are referred to by refIdxL0 and refIdxL1.
  (マージ予測とAMVP予測)
 予測パラメータの復号(符号化)方法には、マージ予測(merge)モードとAMVP(Adaptive Motion Vector Prediction、適応動きベクトル予測)モードがある、マージフラグmerge_flagは、これらを識別するためのフラグである。マージモードは、予測リスト利用フラグpredFlagLX(またはインター予測識別子inter_pred_idc)、参照ピクチャインデックスrefIdxLX、動きベクトルmvLXを符号化データに含めずに、既に処理した近傍PUの予測パラメータから導出する用いるモードである。AMVPモードは、インター予測識別子inter_pred_idc、参照ピクチャインデックスrefIdxLX、動きベクトルmvLXを符号化データに含めるモードである。なお、動きベクトルmvLXは、予測ベクトルmvpLXを識別する予測ベクトルインデックスmvp_LX_idxと差分ベクトルmvdLXとして符号化される。
(Merge prediction and AMVP prediction)
The prediction parameter decoding (encoding) method includes a merge prediction (merge) mode and an AMVP (Adaptive Motion Vector Prediction) mode. The merge flag merge_flag is a flag for identifying these. The merge mode is a mode in which the prediction list use flag predFlagLX (or inter prediction identifier inter_pred_idc), the reference picture index refIdxLX, and the motion vector mvLX are not included in the encoded data and are derived from the prediction parameters of already processed neighboring PUs. The AMVP mode is a mode in which the inter prediction identifier inter_pred_idc, the reference picture index refIdxLX, and the motion vector mvLX are included in the encoded data. The motion vector mvLX is encoded as a prediction vector index mvp_LX_idx for identifying the prediction vector mvpLX and a difference vector mvdLX.
 インター予測識別子inter_pred_idcは、参照ピクチャの種類及び数を示す値であり、PRED_L0、PRED_L1、PRED_BIの何れかの値をとる。PRED_L0、PRED_L1は、各々L0リスト、L1リストの参照ピクチャリストで管理された参照ピクチャを用いることを示し、1枚の参照ピクチャを用いること(単予測)を示す。PRED_BIは2枚の参照ピクチャを用いること(双予測BiPred)を示し、L0リストとL1リストで管理された参照ピクチャを用いる。予測ベクトルインデックスmvp_LX_idxは予測ベクトルを示すインデックスであり、参照ピクチャインデックスrefIdxLXは、参照ピクチャリストで管理された参照ピクチャを示すインデックスである。なお、LXは、L0予測とL1予測を区別しない場合に用いられる記述方法であり、LXをL0、L1に置き換えることでL0リストに対するパラメータとL1リストに対するパラメータを区別する。 The inter prediction identifier inter_pred_idc is a value indicating the type and number of reference pictures, and takes one of PRED_L0, PRED_L1, and PRED_BI. PRED_L0 and PRED_L1 indicate that reference pictures managed by the reference picture lists of the L0 list and the L1 list are used, respectively, and that one reference picture is used (single prediction). PRED_BI indicates that two reference pictures are used (bi-prediction BiPred), and reference pictures managed by the L0 list and the L1 list are used. The prediction vector index mvp_LX_idx is an index indicating a prediction vector, and the reference picture index refIdxLX is an index indicating a reference picture managed in the reference picture list. Note that LX is a description method used when L0 prediction and L1 prediction are not distinguished from each other. By replacing LX with L0 and L1, parameters for the L0 list and parameters for the L1 list are distinguished.
 マージインデックスmerge_idxは、処理が完了したPUから導出される予測パラメータ候補(マージ候補)のうち、いずれかの予測パラメータを復号対象PUの予測パラメータとして用いるかを示すインデックスである。 The merge index merge_idx is an index that indicates whether one of the prediction parameter candidates (merge candidates) derived from the processed PU is used as the prediction parameter of the decoding target PU.
  (動きベクトル)
 動きベクトルmvLXは、異なる2つのピクチャ上のブロック間のずれ量を示す。動きベクトルmvLXに関する予測ベクトル、差分ベクトルを、それぞれ予測ベクトルmvpLX、差分ベクトルmvdLXと呼ぶ。
(Motion vector)
The motion vector mvLX indicates a shift amount between blocks on two different pictures. A prediction vector and a difference vector related to the motion vector mvLX are referred to as a prediction vector mvpLX and a difference vector mvdLX, respectively.
  (インター予測識別子inter_pred_idcと予測リスト利用フラグpredFlagLX)
 インター予測識別子inter_pred_idcと、予測リスト利用フラグpredFlagL0、predFlagL1の関係は以下のとおりであり、相互に変換可能である。
(Inter prediction identifier inter_pred_idc and prediction list use flag predFlagLX)
The relationship between the inter prediction identifier inter_pred_idc and the prediction list use flags predFlagL0 and predFlagL1 is as follows and can be converted into each other.
 inter_pred_idc = (predFlagL1<<1) + predFlagL0
 predFlagL0 = inter_pred_idc & 1
 predFlagL1 = inter_pred_idc >> 1
 なお、インター予測パラメータは、予測リスト利用フラグを用いても良いし、インター予測識別子を用いてもよい。また、予測リスト利用フラグを用いた判定は、インター予測識別子を用いた判定に置き替えてもよい。逆に、インター予測識別子を用いた判定は、予測リスト利用フラグを用いた判定に置き替えてもよい。
inter_pred_idc = (predFlagL1 << 1) + predFlagL0
predFlagL0 = inter_pred_idc & 1
predFlagL1 = inter_pred_idc >> 1
Note that a prediction list use flag or an inter prediction identifier may be used as the inter prediction parameter. Further, the determination using the prediction list use flag may be replaced with the determination using the inter prediction identifier. Conversely, the determination using the inter prediction identifier may be replaced with the determination using the prediction list use flag.
  (双予測biPredの判定)
 双予測BiPredであるかのフラグbiPredは、2つの予測リスト利用フラグがともに1であるかによって導出できる。たとえば以下の式で導出できる。
(Determination of bi-prediction biPred)
The flag biPred as to whether it is a bi-prediction BiPred can be derived depending on whether the two prediction list use flags are both 1. For example, it can be derived by the following formula.
 biPred = (predFlagL0 == 1 && predFlagL1 == 1)
 フラグbiPredは、インター予測識別子が2つの予測リスト(参照ピクチャ)を使うことを示す値であるか否かによっても導出できる。たとえば以下の式で導出できる。
biPred = (predFlagL0 == 1 && predFlagL1 == 1)
The flag biPred can also be derived depending on whether or not the inter prediction identifier is a value indicating that two prediction lists (reference pictures) are used. For example, it can be derived by the following formula.
 biPred = (inter_pred_idc == PRED_BI) ? 1 : 0
上記式は、以下の式でも表現できる。
biPred = (inter_pred_idc == PRED_BI)? 1: 0
The above formula can also be expressed by the following formula.
 biPred = (inter_pred_idc == PRED_BI)
 なお、PRED_BIはたとえば3の値を用いることができる。
biPred = (inter_pred_idc == PRED_BI)
For example, a value of 3 can be used for PRED_BI.
  (イントラ予測モード)
 輝度イントラ予測モードIntraPredModeYは67モードであり、プレーナ予測(0)、DC予測(1)、方向予測(2~66)が対応する。色差イントラ予測モードIntraPredModeCは上記の67モードにCCLM(Colour Component Linear Mode)を加えた68モードである。CCLMは、対象色成分における対象画素の画素値を、対象色成分よりも前に符号化された別の色成分の画素値を参照した線形予測によって導出するモードである。なお、色成分には輝度Y、色差Cb、色差Crが含まれる。輝度と色差で異なるイントラ予測モードを割り当ててもよく、CUあるいはPU単位で予測モードを符号化、復号する。
(Intra prediction mode)
The luminance intra prediction mode IntraPredModeY is 67 mode and corresponds to planar prediction (0), DC prediction (1), and direction prediction (2 to 66). The color difference intra prediction mode IntraPredModeC is a 68 mode obtained by adding a Color Component Linear Mode (CCLM) to the above 67 mode. CCLM is a mode in which the pixel value of the target pixel in the target color component is derived by linear prediction with reference to the pixel value of another color component encoded before the target color component. The color component includes luminance Y, color difference Cb, and color difference Cr. Different intra prediction modes may be assigned depending on luminance and color difference, and the prediction mode is encoded and decoded in units of CU or PU.
  (画像復号装置の構成)
 次に、本実施形態に係る画像復号装置31の構成について説明する。図5は、本実施形態に係る画像復号装置31の構成を示す概略図である。画像復号装置31は、エントロピー復号部301、予測パラメータ復号部(予測画像復号装置)302、ループフィルタ305、参照ピクチャメモリ306、予測パラメータメモリ307、予測画像生成部(予測画像生成装置)308、逆量子化・逆DCT部311、及び加算部312を含んで構成される。
(Configuration of image decoding device)
Next, the configuration of the image decoding device 31 according to the present embodiment will be described. FIG. 5 is a schematic diagram illustrating a configuration of the image decoding device 31 according to the present embodiment. The image decoding device 31 includes an entropy decoding unit 301, a prediction parameter decoding unit (prediction image decoding device) 302, a loop filter 305, a reference picture memory 306, a prediction parameter memory 307, a prediction image generation unit (prediction image generation device) 308, and inversely. A quantization / inverse DCT unit 311 and an addition unit 312 are included.
 また、予測パラメータ復号部302は、インター予測パラメータ復号部303及びイントラ予測パラメータ復号部304を含んで構成される。予測画像生成部308は、インター予測画像生成部309及びイントラ予測画像生成部310を含んで構成される。 The prediction parameter decoding unit 302 includes an inter prediction parameter decoding unit 303 and an intra prediction parameter decoding unit 304. The predicted image generation unit 308 includes an inter predicted image generation unit 309 and an intra predicted image generation unit 310.
 エントロピー復号部301は、外部から入力された符号化ストリームTeに対してエントロピー復号を行って、個々の符号(シンタックス要素)を分離し復号する。分離された符号には、予測画像を生成するための予測パラメータ及び、差分画像を生成するための残差情報などがある。 The entropy decoding unit 301 performs entropy decoding on the coded stream Te input from the outside, and separates and decodes individual codes (syntax elements). The separated code includes a prediction parameter for generating a prediction image and residual information for generating a difference image.
 エントロピー復号部301は、分離した符号の一部を予測パラメータ復号部302に出力する。分離した符号の一部とは、例えば、予測モードpredMode、PU分割モードpart_mode、マージフラグmerge_flag、マージインデックスmerge_idx、インター予測識別子inter_pred_idc、参照ピクチャインデックスref_Idx_lX、予測ベクトルインデックスmvp_LX_idx、差分ベクトルmvdLXである。どの符号を復号するかの制御は、予測パラメータ復号部302の指示に基づいて行われる。エントロピー復号部301は、量子化係数を逆量子化・逆DCT部311に出力する。この量子化係数は、符号化処理において、残差信号に対してDCT(Discrete Cosine Transform、離散コサイン変換)を行い量子化して得られる係数である。 The entropy decoding unit 301 outputs a part of the separated code to the prediction parameter decoding unit 302. Some of the separated codes are, for example, the prediction mode predMode, the PU partition mode part_mode, the merge flag merge_flag, the merge index merge_idx, the inter prediction identifier inter_pred_idc, the reference picture index ref_Idx_lX, the prediction vector index mvp_LX_idx, and the difference vector mvdLX. Control of which code is decoded is performed based on an instruction from the prediction parameter decoding unit 302. The entropy decoding unit 301 outputs the quantization coefficient to the inverse quantization / inverse DCT unit 311. The quantization coefficient is a coefficient obtained by performing quantization by performing DCT (Discrete Cosine Transform) on the residual signal in the encoding process.
 エントロピー復号部301の詳細なブロック図を図10に示す。エントロピー復号部301は、ヘッダ復号部1001、CT情報復号部1002、CU復号部1003、復号モジュール1004からなる。 A detailed block diagram of the entropy decoding unit 301 is shown in FIG. The entropy decoding unit 301 includes a header decoding unit 1001, a CT information decoding unit 1002, a CU decoding unit 1003, and a decoding module 1004.
  (復号モジュール)
 以下、各モジュールの概略動作を説明する。復号モジュール1004は、符号化データからシンタックス値を復号する復号処理を行う。復号モジュール1004は、ヘッダ復号部1001、CT情報復号部1002、CU復号部1003から供給される符号化データ及びシンタックス種別に基づいて、固定長符号化方式、あるいはCABAC等のエントロピー符号化方式により符号化されているシンタックス値を復号し、復号したシンタックス値を供給元に返す。
(Decryption module)
Hereinafter, the schematic operation of each module will be described. The decoding module 1004 performs a decoding process for decoding the syntax value from the encoded data. Based on the encoded data and syntax type supplied from the header decoding unit 1001, CT information decoding unit 1002, and CU decoding unit 1003, the decoding module 1004 uses a fixed-length encoding method or an entropy encoding method such as CABAC. Decodes the encoded syntax value and returns the decoded syntax value to the supplier.
  (ヘッダ復号部)
 ヘッダ復号部1001は、復号モジュール1004を用いて、画像符号化装置11から入力された符号化データのVPS、SPS、PPS、スライスヘッダを復号する。
(Header decoding part)
The header decoding unit 1001 uses the decoding module 1004 to decode the VPS, SPS, PPS, and slice header of the encoded data input from the image encoding device 11.
  (CT情報復号部) 
 CT情報復号部1002は、復号モジュール1004を用いて、画像符号化装置11から入力された符号化データから、符号化ツリーユニット及び符号化ツリーの復号処理を行う。CT情報復号部1002は、復号モジュール1004を用いて、CTUに含まれるCTU情報として、ツリーユニットヘッダCTUHを復号する。次に、CT情報復号部1002は、CT情報として、対象CTをQT分割するか否かを示すQT分割フラグ、及び対象CTをBT分割するか否か、BT分割する場合はBT分割方法を示すBT分割モードを復号し、QT分割フラグ及びBT分割モードがさらなる分割を通知しなくなるまで対象CTを再帰的に分割し復号する。最後に、CTU情報として、さらに、ツリーユニットフッタCTUFを復号する。
(CT information decoding unit)
The CT information decoding unit 1002 uses the decoding module 1004 to perform decoding processing of the encoding tree unit and the encoding tree from the encoded data input from the image encoding device 11. The CT information decoding unit 1002 uses the decoding module 1004 to decode the tree unit header CTUH as CTU information included in the CTU. Next, the CT information decoding unit 1002 indicates, as CT information, a QT division flag indicating whether or not the target CT is QT-divided, and whether or not the target CT is BT-divided, and in the case of BT division, indicates a BT division method The BT division mode is decoded, and the target CT is recursively divided and decoded until the QT division flag and the BT division mode no longer notify further division. Finally, the tree unit footer CTUF is further decoded as CTU information.
 ツリーユニットヘッダCTUH及びツリーユニットフッタCTUFには、対象符号化ツリーユニットの復号方法を決定するために画像復号装置31が参照する符号化パラメータが含まれる。また、CT情報には、QT分割フラグ及びBT分割モードの他、対象CT及び下位の符号化ノードで適用されるパラメータを含んでいてもよい。 The tree unit header CTUH and the tree unit footer CTUF include coding parameters referred to by the image decoding device 31 in order to determine a decoding method of the target coding tree unit. In addition to the QT division flag and the BT division mode, the CT information may include parameters applied in the target CT and lower coding nodes.
  (CU復号部) 
 CU復号部1003は、最下位の符号化ノードCN(すなわちCU)のPUI情報(マージフラグ(merge_flag)、マージインデックス(merge_idx)、予測動きベクトルインデックス(mvp_idx)、参照画像インデックス(ref_idx_lX)、インター予測識別子(inter_pred_flag)、及び差分ベクトル(mvdLX)等)、量子化変換係数(residual_coding)、及びTTI情報(TU分割フラグSP_TU(split_transform_flag)、CU残差フラグCBP_TU(cbf_cb、cbf_cr、cbf_luma)等)を、復号モジュール1004を用いて復号する。  
 ここで、量子化残差の復号について説明する。量子化残差はCU残差フラグCBP_TU(cbf_luma、cbf_cb、cbf_cr)と非ゼロ量子化変換係数の位置(last_sig_coeff_x_prefix、last_sig_coeff_y_prefix、last_sig_coeff_x_suffix、last_sig_coeff_y_suffix、coded_sub_block_flag、sig_coeff_flag)、非ゼロ量子化変換係数の係数レベルを表現するシンタックス(coeff_abs_level_greater1、coeff_abs_level_greater2、coeff_abs_level_remaining、coeff_sign_flag)で表現される。以降では量子化変換係数を変換係数と呼ぶ。
(CU decoding unit)
The CU decoding unit 1003 includes PUI information (merge flag (merge_flag), merge index (merge_idx), prediction motion vector index (mvp_idx), reference image index (ref_idx_lX), and inter prediction of the lowest coding node CN (ie, CU) Identifier (inter_pred_flag), difference vector (mvdLX, etc.), quantization transform coefficient (residual_coding), and TTI information (TU partition flag SP_TU (split_transform_flag), CU residual flag CBP_TU (cbf_cb, cbf_cr, cbf_luma), etc.) Decryption is performed using the decryption module 1004.
Here, decoding of the quantization residual will be described. Quantized residuals are CU residual flags CBP_TU (cbf_luma, cbf_cb, cbf_cr) and non-zero quantized transform coefficient positions (last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, last_sig_coefficient_coded_coefficient_coded_coefficients It is expressed by the syntax to be expressed (coeff_abs_level_greater1, coeff_abs_level_greater2, coeff_abs_level_remaining, coeff_sign_flag). Hereinafter, the quantized transform coefficient is referred to as a transform coefficient.
 CBP_TUはあるCUの輝度成分および色差成分(Cb、Cr)に非ゼロ変換係数が含まれるかどうかを示すフラグである。cbf_lumaが1の場合、当該CUの輝度成分に非ゼロ変換係数が含まれ、cbf_lumaが0の場合、非ゼロ変換係数が含まれない。同様にcbf_cbとcbf_crが各々1の場合、当該CUのCb成分とCr成分に非ゼロ変換係数が含まれ、cbf_cbとcbf_crが各々0の場合、当該CUのCb成分とCr成分には各々非ゼロ変換係数が含まれない。cbf_luma、cbf_cb、cbf_crが0の場合、当該CUにおいて、対応する成分の変換係数は全て0なので、変換係数を示す他のシンタックスは符号化あるいは復号しない。 CBP_TU is a flag indicating whether a non-zero conversion coefficient is included in the luminance component and color difference component (Cb, Cr) of a certain CU. When cbf_luma is 1, a non-zero conversion coefficient is included in the luminance component of the CU. When cbf_luma is 0, a non-zero conversion coefficient is not included. Similarly, when cbf_cb and cbf_cr are each 1, a non-zero conversion coefficient is included in the Cb component and Cr component of the CU, and when cbf_cb and cbf_cr are each 0, the Cb component and Cr component of the CU are each non-zero. Does not include conversion factor. When cbf_luma, cbf_cb, and cbf_cr are 0, since the conversion coefficients of the corresponding components are all 0 in the CU, other syntaxes indicating the conversion coefficients are not encoded or decoded.
 図7(1)はCBP_TU=1(CUに非ゼロ変換係数が存在する場合)において、CUサイズが8x8、スキャン方向が斜め方向の場合のシンタックスの一例である。CUサイズは128x128~4x4、スキャン方向は3種類(斜め方向、水平方向、垂直方向)があるが、異なるCUサイズやスキャン方向の場合も同様の処理を実施する。なお、以降では特に記載がない限り、輝度成分と色差成分の区別はしない。 Fig. 7 (1) shows an example of syntax when CBP_TU = 1 (when non-zero transform coefficient exists in CU), CU size is 8x8, and scan direction is diagonal. The CU size is 128x128 to 4x4, and there are three types of scan directions (diagonal direction, horizontal direction, vertical direction), but the same processing is performed for different CU sizes and scan directions. Hereinafter, unless otherwise specified, the luminance component and the color difference component are not distinguished.
 まず図7に示すシンタックスを順に復号する。LASTは、CUの左上座標を(0,0)として、指定されたスキャン方向に走査した場合の最後の非ゼロ変換係数の位置であり、可変長符号化された4つのシンタックス(last_sig_coeff_x_prefix、last_sig_coeff_y_prefix、last_sig_coeff_y_suffix、last_sig_coeff_y_suffix)からなる。可変長符号表が図12の場合、last_sig_coeff_x_prefix=”11111”、 last_sig_coeff_x_suffix=”01”、last_sig_coeff_y_prefix=”11111”、last_sig_coeff_y_suffix=”00”は座標(7,6)を表す(図7(2))。なお、図12の可変長符号表において”1”または”0”で表された部分はprefixであり、”X”で表された部分はsuffixである。ここで”X”は”1”または”0”を表す。次にCUを固定サイズのサブブロック(例えば4x4)に分割する。LASTの位置を含むサブブロックを起点とし、各サブブロックの非ゼロ変換係数の有無を示すフラグcoded_sub_block_flagを復号する(図7(3))。ただし、LASTの存在するサブブロックとDC成分が存在する左上のサブブロックは非ゼロ係数が存在するので、coded_sub_block_flagは符号化せず、常に1とする。coded_sub_block_flag=0の場合、サブブロックは非ゼロ変換係数を含まないので、サブブロックの全ての変換係数値は0である。coded_sub_block_flag=1の場合、サブブロックには非ゼロ変換係数が存在するので、サブブロックの各変換係数が非ゼロか否かを示すsig_coeff_flagを復号する(図7(4))。sig_coeff_flag=0の場合、変換係数は0なので変換係数値は0である。sig_coeff_flag=1の場合、係数レベルを表現するシンタックス(coeff_abs_level_greater1、coeff_abs_level_greater2、coeff_abs_level_remaining、coeff_sign_flag)を復号し、これらの値をもとに各変換係数値を導出する(図7(5))。 First, the syntax shown in FIG. 7 is decoded in order. LAST is the position of the last non-zero transform coefficient when the upper left coordinate of the CU is (0,0) and scanned in the specified scan direction, and is the four variable-length encoded syntaxes (last_sig_coeff_x_prefix, last_sig_coeff_y_prefix , Last_sig_coeff_y_suffix, last_sig_coeff_y_suffix). When the variable length code table is FIG. 12, last_sig_coeff_x_prefix = “11111”, last_sig_coeff_x_suffix = “01”, last_sig_coeff_y_prefix = “11111”, last_sig_coeff_y_suffix = “00” represents coordinates (7, 6) (FIG. 7 (2)). In the variable length code table of FIG. 12, the part represented by “1” or “0” is a prefix, and the part represented by “X” is a suffix. Here, “X” represents “1” or “0”. Next, the CU is divided into fixed-size sub-blocks (for example, 4x4). The flag coded_sub_block_flag indicating the presence or absence of the non-zero transform coefficient of each sub-block is decoded starting from the sub-block including the position of LAST (FIG. 7 (3)). However, since the non-zero coefficient exists in the sub-block in which LAST exists and the upper left sub-block in which DC component exists, coded_sub_block_flag is not encoded and is always set to 1. When coded_sub_block_flag = 0, the sub-block does not include a non-zero transform coefficient, so all transform coefficient values of the sub-block are 0. When coded_sub_block_flag = 1, since there are non-zero transform coefficients in the sub-block, sig_coeff_flag indicating whether each transform coefficient of the sub-block is non-zero is decoded (FIG. 7 (4)). When sig_coeff_flag = 0, since the conversion coefficient is 0, the conversion coefficient value is 0. When sig_coeff_flag = 1, the syntax expressing the coefficient level (coeff_abs_level_greater1, coeff_abs_level_greater2, coeff_abs_level_remaining, coeff_sign_flag) is decoded, and each conversion coefficient value is derived based on these values (FIG. 7 (5)).
 以上の動作を図13のフローチャートを用いて説明する。 The above operation will be described with reference to the flowchart of FIG.
 S1301では、CU復号部1003はCU内の全変換係数を0にセットする。S1302では、CU復号部1003は、復号モジュール1004を用いてcbfを復号する。S1303では、CU復号部1003はcbfが1か否かをチェックする。cbfが1でない場合、CU復号部1003は処理を終了する。cbfが1の場合、S1304に進み、CU復号部1003はLASTを表すシンタックスを復号し、LAST位置を導出する。S1305では、CU復号部1003はLASTの位置を含むサブブロックを起点とし、各サブブロックのcoded_sub_block_flagを復号する。次にCU復号部1003は、LASTを含むサブブロック以前の全てのサブブロックに対しS1306~S1308を実施する。S1306では、CU復号部1003は、coded_sub_block_flagを参照して、各サブブロックに非ゼロ変換係数があるかをチェックする。coded_sub_block_flag=1の場合、S1307に進み、CU復号部1003はサブブロックの全てのsig_coeff_flagを復号する。coded_sub_block_flag=0の場合、S1308に進み、CU復号部1003はサブブロックの全てのsig_coeff_flagを0にセットする。次にCU復号部1003は、全てのsig_coeff_flagに対しS1309~S1311を実施する。S1309では、CU復号部1003はsig_coeff_flag=1か否かをチェックする。sig_coeff_flag=1の場合、CU復号部1003は、S1310で係数レベルを表現するシンタックス(coeff_abs_level_greater1、coeff_abs_level_greater2、coeff_abs_level_remaining、coeff_sign_flag)を復号し、S1311で復号結果を参照して変換係数値を導出する。 In S1301, the CU decoding unit 1003 sets all transform coefficients in the CU to 0. In S1302, the CU decoding unit 1003 decodes the cbf using the decoding module 1004. In S1303, the CU decoding unit 1003 checks whether cbf is 1. When cbf is not 1, the CU decoding unit 1003 ends the process. When cbf is 1, the process proceeds to S1304, where the CU decoding unit 1003 decodes the syntax representing LAST and derives the LAST position. In S1305, the CU decoding unit 1003 decodes the coded_sub_block_flag of each subblock using the subblock including the position of LAST as a starting point. Next, the CU decoding unit 1003 performs S1306 to S1308 for all subblocks before the subblock including LAST. In S1306, the CU decoding unit 1003 refers to coded_sub_block_flag to check whether each subblock has a non-zero transform coefficient. When coded_sub_block_flag = 1, the process proceeds to S1307, and the CU decoding unit 1003 decodes all the sig_coeff_flags of the subblock. When coded_sub_block_flag = 0, the process proceeds to S1308, and the CU decoding unit 1003 sets all sig_coeff_flags of the subblock to 0. Next, the CU decoding unit 1003 performs S1309 to S1311 for all sig_coeff_flags. In S1309, the CU decoding unit 1003 checks whether sig_coeff_flag = 1. When sig_coeff_flag = 1, the CU decoding unit 1003 decodes the syntax (coeff_abs_level_greater1, coeff_abs_level_greater2, coeff_abs_level_remaining, coeff_sign_flag) expressing the coefficient level in S1310, and derives the transform coefficient value by referring to the decoding result in S1311.
 インター予測パラメータ復号部303は、エントロピー復号部301から入力された符号に基づいて、予測パラメータメモリ307に記憶された予測パラメータを参照してインター予測パラメータを復号する。インター予測パラメータ復号部303は、復号したインター予測パラメータを予測画像生成部308に出力し、また予測パラメータメモリ307に記憶する。 The inter prediction parameter decoding unit 303 decodes the inter prediction parameter with reference to the prediction parameter stored in the prediction parameter memory 307 based on the code input from the entropy decoding unit 301. The inter prediction parameter decoding unit 303 outputs the decoded inter prediction parameter to the prediction image generation unit 308 and stores it in the prediction parameter memory 307.
 イントラ予測パラメータ復号部304は、エントロピー復号部301から入力された符号に基づいて、予測パラメータメモリ307に記憶された予測パラメータを参照してイントラ予測パラメータを復号する。イントラ予測パラメータとは、CUを1つのピクチャ内で予測する処理で用いるパラメータ、例えば、イントラ予測モードIntraPredModeである。イントラ予測パラメータ復号部304は、復号したイントラ予測パラメータを予測画像生成部308に出力し、また予測パラメータメモリ307に記憶する。 The intra prediction parameter decoding unit 304 refers to the prediction parameter stored in the prediction parameter memory 307 on the basis of the code input from the entropy decoding unit 301 and decodes the intra prediction parameter. The intra prediction parameter is a parameter used in a process of predicting a CU within one picture, for example, an intra prediction mode IntraPredMode. The intra prediction parameter decoding unit 304 outputs the decoded intra prediction parameter to the prediction image generation unit 308 and stores it in the prediction parameter memory 307.
 ループフィルタ305は、加算部312が生成したCUの復号画像に対し、デブロッキングフィルタ、サンプル適応オフセット(SAO)、適応ループフィルタ(ALF)等のフィルタを施す。 The loop filter 305 applies filters 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 adding unit 312.
 参照ピクチャメモリ306は、加算部312が生成したCUの復号画像を、復号対象のピクチャ及びCU毎に予め定めた位置に記憶する。 The reference picture memory 306 stores the decoded image of the CU generated by the adding unit 312 at a predetermined position for each decoding target picture and CU.
 予測パラメータメモリ307は、予測パラメータを、復号対象のピクチャ及び予測ユニット(もしくはサブブロック、固定サイズブロック、ピクセル)毎に予め定めた位置に記憶する。具体的には、予測パラメータメモリ307は、インター予測パラメータ復号部303が復号したインター予測パラメータ、イントラ予測パラメータ復号部304が復号したイントラ予測パラメータ及びエントロピー復号部301が分離した予測モードpredModeを記憶する。記憶されるインター予測パラメータには、例えば、予測リスト利用フラグpredFlagLX(インター予測識別子inter_pred_idc)、参照ピクチャインデックスrefIdxLX、動きベクトルmvLXがある。 The prediction parameter memory 307 stores the prediction parameter in a predetermined position for each decoding target picture and prediction unit (or sub-block, fixed-size block, pixel). Specifically, the prediction parameter memory 307 stores the inter prediction parameter decoded by the inter prediction parameter decoding unit 303, the intra prediction parameter decoded by the intra prediction parameter decoding unit 304, and the prediction mode predMode separated by the entropy decoding unit 301. . The stored inter prediction parameters include, for example, a prediction list utilization flag predFlagLX (inter prediction identifier inter_pred_idc), a reference picture index refIdxLX, and a motion vector mvLX.
 予測画像生成部308には、エントロピー復号部301から入力された予測モードpredModeが入力され、また予測パラメータ復号部302から予測パラメータが入力される。また、予測画像生成部308は、参照ピクチャメモリ306から参照ピクチャを読み出す。予測画像生成部308は、予測モードpredModeが示す予測モードで、入力された予測パラメータと読み出した参照ピクチャを用いてPUの予測画像を生成する。 The prediction image generation unit 308 receives the prediction mode predMode input from the entropy decoding unit 301 and the prediction parameter from the prediction parameter decoding unit 302. Further, the predicted image generation unit 308 reads a reference picture from the reference picture memory 306. The prediction image generation unit 308 generates a prediction image of the PU using the input prediction parameter and the read reference picture in the prediction mode indicated by the prediction mode predMode.
 ここで、予測モードpredModeがインター予測モードを示す場合、インター予測画像生成部309は、インター予測パラメータ復号部303から入力されたインター予測パラメータと読み出した参照ピクチャを用いてインター予測によりPUの予測画像を生成する。 Here, when the prediction mode predMode indicates the inter prediction mode, the inter prediction image generation unit 309 uses the inter prediction parameter input from the inter prediction parameter decoding unit 303 and the read reference picture to perform prediction of the PU by inter prediction. Is generated.
 インター予測画像生成部309は、予測リスト利用フラグpredFlagLXが1である参照ピクチャリスト(L0リスト、もしくはL1リスト)に対し、参照ピクチャインデックスrefIdxLXで示される参照ピクチャから、復号対象PUを基準として動きベクトルmvLXが示す位置にある参照ピクチャブロックを参照ピクチャメモリ306から読み出す。インター予測画像生成部309は、読み出した参照ピクチャブロックをもとに予測を行ってPUの予測画像を生成する。インター予測画像生成部309は、生成したPUの予測画像を加算部312に出力する。 The inter prediction image generation unit 309 performs a motion vector on the basis of the decoding target PU from the reference picture indicated by the reference picture index refIdxLX for a reference picture list (L0 list or L1 list) having a prediction list use flag predFlagLX of 1. The reference picture block at the position indicated by mvLX is read from the reference picture memory 306. The inter prediction image generation unit 309 performs prediction based on the read reference picture block to generate a prediction image of the PU. The inter prediction image generation unit 309 outputs the generated prediction image of the PU to the addition unit 312.
 予測モードpredModeがイントラ予測モードを示す場合、イントラ予測画像生成部310は、イントラ予測パラメータ復号部304から入力されたイントラ予測パラメータと読み出した参照ピクチャを用いてイントラ予測を行う。具体的には、イントラ予測画像生成部310は、復号対象のピクチャであって、既に復号されたPUのうち、復号対象PUから予め定めた範囲にある隣接PUを参照ピクチャメモリ306から読み出す。予め定めた範囲とは、復号対象PUがいわゆるラスタースキャンの順序で順次移動する場合、例えば、左、左上、上、右上の隣接PUのうちのいずれかであり、イントラ予測モードによって異なる。ラスタースキャンの順序とは、各ピクチャにおいて、上端から下端まで各行について、順次左端から右端まで移動させる順序である。 When the prediction mode predMode indicates the intra prediction mode, the intra predicted image generation unit 310 performs intra prediction using the intra prediction parameter input from the intra prediction parameter decoding unit 304 and the read reference picture. Specifically, the intra predicted image generation unit 310 reads, from the reference picture memory 306, neighboring PUs that are pictures to be decoded and are in a predetermined range from the decoding target PUs among the PUs that have already been decoded. The predetermined range is, for example, one of the left, upper left, upper, and upper right adjacent PUs when the decoding target PU sequentially moves in the so-called raster scan order, and differs depending on the intra prediction mode. The raster scan order is an order in which each row is sequentially moved from the left end to the right end in each picture from the upper end to the lower end.
 イントラ予測画像生成部310は、読み出した隣接PUについてイントラ予測モードIntraPredModeが示す予測モードで予測を行ってPUの予測画像を生成する。イントラ予測画像生成部310は、生成したPUの予測画像を加算部312に出力する。 The intra predicted image generation unit 310 performs prediction in the prediction mode indicated by the intra prediction mode IntraPredMode for the read adjacent PU, and generates a predicted image of the PU. The intra predicted image generation unit 310 outputs the generated predicted image of the PU to the adding unit 312.
 イントラ予測パラメータ復号部304において、輝度と色差で異なるイントラ予測モードを導出する場合、イントラ予測画像生成部310は、輝度予測モードIntraPredModeYに応じて、プレーナ予測(0)、DC予測(1)、方向予測(2~66)の何れかによって輝度のPUの予測画像を生成し、色差予測モードIntraPredModeCに応じて、プレーナ予測(0)、DC予測(1)、方向予測(2~66)、LMモード(67)の何れかによって色差のPUの予測画像を生成する。 When the intra prediction parameter decoding unit 304 derives an intra prediction mode different in luminance and color difference, the intra prediction image generation unit 310 performs planar prediction (0), DC prediction (1), direction according to the luminance prediction mode IntraPredModeY. Prediction image of luminance PU is generated by any one of prediction (2 to 66), and planar prediction (0), DC prediction (1), direction prediction (2 to 66), LM mode according to color difference prediction mode IntraPredModeC A prediction image of a color difference PU is generated according to any one of (67).
 逆量子化・逆DCT部311は、エントロピー復号部301から入力された量子化係数を逆量子化してDCT係数を求める。逆量子化・逆DCT部311は、求めたDCT係数について逆DCT(Inverse Discrete Cosine Transform、逆離散コサイン変換)を行い、残差信号を算出する。逆量子化・逆DCT部311は、算出した残差信号を加算部312に出力する。 The inverse quantization / inverse DCT unit 311 inversely quantizes the quantization coefficient input from the entropy decoding unit 301 to obtain a DCT coefficient. The inverse quantization / inverse DCT unit 311 performs inverse DCT (Inverse Discrete Cosine Transform) on the obtained DCT coefficient to calculate a residual signal. The inverse quantization / inverse DCT unit 311 outputs the calculated residual signal to the addition unit 312.
 加算部312は、インター予測画像生成部309またはイントラ予測画像生成部310から入力されたPUの予測画像と逆量子化・逆DCT部311から入力された残差信号を画素毎に加算して、PUの復号画像を生成する。加算部312は、生成したPUの復号画像を参照ピクチャメモリ306に記憶し、生成したPUの復号画像をピクチャ毎に統合した復号画像Tdを外部に出力する。 The addition unit 312 adds the prediction image of the PU input from the inter prediction image generation unit 309 or the intra prediction image generation unit 310 and the residual signal input from the inverse quantization / inverse DCT unit 311 for each pixel, Generate a decoded PU image. The adding unit 312 stores the generated decoded image of the PU in the reference picture memory 306, and outputs a decoded image Td in which the generated decoded image of the PU is integrated for each picture to the outside.
  (画像符号化装置の構成)
 次に、本実施形態に係る画像符号化装置11の構成について説明する。図6は、本実施形態に係る画像符号化装置11の構成を示すブロック図である。画像符号化装置11は、予測画像生成部101、減算部102、DCT・量子化部103、エントロピー符号化部104、逆量子化・逆DCT部105、加算部106、ループフィルタ107、予測パラメータメモリ(予測パラメータ記憶部、フレームメモリ)108、参照ピクチャメモリ(参照画像記憶部、フレームメモリ)109、符号化パラメータ決定部110、予測パラメータ符号化部111を含んで構成される。予測パラメータ符号化部111は、インター予測パラメータ符号化部112及びイントラ予測パラメータ符号化部113を含んで構成される。
(Configuration of image encoding device)
Next, the configuration of the image encoding device 11 according to the present embodiment will be described. FIG. 6 is a block diagram illustrating a configuration of the image encoding device 11 according to the present embodiment. The image encoding device 11 includes a prediction image generation unit 101, a subtraction unit 102, a DCT / quantization unit 103, an entropy encoding unit 104, an inverse quantization / inverse DCT unit 105, an addition unit 106, a loop filter 107, and a prediction parameter memory. (Prediction parameter storage unit, frame memory) 108, reference picture memory (reference image storage unit, frame memory) 109, encoding parameter determination unit 110, and prediction parameter encoding unit 111. The prediction parameter encoding unit 111 includes an inter prediction parameter encoding unit 112 and an intra prediction parameter encoding unit 113.
 予測画像生成部101は画像Tの各ピクチャについて、そのピクチャを分割した領域である符号化ユニットCU毎に予測ユニットPUの予測画像Pを生成する。ここで、予測画像生成部101は、予測パラメータ符号化部111から入力された予測パラメータに基づいて参照ピクチャメモリ109から復号済のブロックを読み出す。予測パラメータ符号化部111から入力された予測パラメータとは、例えばインター予測の場合、動きベクトルである。予測画像生成部101は、対象PUを起点として動きベクトルが示す参照画像上の位置にあるブロックを読み出す。またイントラ予測の場合、予測パラメータとは例えばイントラ予測モードである。イントラ予測モードで使用する隣接PUの画素値を参照ピクチャメモリ109から読み出し、PUの予測画像Pを生成する。予測画像生成部101は、読み出した参照ピクチャブロックについて複数の予測方式のうちの1つの予測方式を用いてPUの予測画像Pを生成する。予測画像生成部101は、生成したPUの予測画像Pを減算部102に出力する。 The predicted image generation unit 101 generates, for each picture of the image T, a predicted image P of the prediction unit PU for each encoding unit CU that is an area obtained by dividing the picture. Here, the predicted image generation unit 101 reads a decoded block from the reference picture memory 109 based on the prediction parameter input from the prediction parameter encoding unit 111. The prediction parameter input from the prediction parameter encoding unit 111 is, for example, a motion vector in the case of inter prediction. The predicted image generation unit 101 reads a block at a position on the reference image indicated by the motion vector with the target PU as a starting point. In the case of intra prediction, the prediction parameter is, for example, an intra prediction mode. A pixel value of an adjacent PU used in the intra prediction mode is read from the reference picture memory 109, and a predicted image P of the PU is generated. The predicted image generation unit 101 generates a predicted image P of the PU using one prediction method among a plurality of prediction methods for the read reference picture block. The predicted image generation unit 101 outputs the generated predicted image P of the PU to the subtraction unit 102.
 なお、予測画像生成部101は、既に説明した予測画像生成部308と同じ動作であるためここでの説明を省略する。 Note that the predicted image generation unit 101 has the same operation as that of the predicted image generation unit 308 already described, and therefore description thereof is omitted here.
 予測画像生成部101は、予測パラメータ符号化部から入力されたパラメータを用いて、参照ピクチャメモリから読み出した参照ブロックの画素値をもとにPUの予測画像Pを生成する。予測画像生成部101で生成した予測画像は減算部102、加算部106に出力される。 The prediction image generation unit 101 generates a prediction image P of the PU based on the pixel value of the reference block read from the reference picture memory, using the parameter input from the prediction parameter encoding unit. The predicted image generated by the predicted image generation unit 101 is output to the subtraction unit 102 and the addition unit 106.
 減算部102は、予測画像生成部101から入力されたPUの予測画像Pの信号値を、画像Tの対応するPUの画素値から減算して、残差信号を生成する。減算部102は、生成した残差信号をDCT・量子化部103に出力する。 The subtraction unit 102 subtracts the signal value of the predicted image P of the PU input from the predicted image generation unit 101 from the pixel value of the corresponding PU of the image T, and generates a residual signal. The subtraction unit 102 outputs the generated residual signal to the DCT / quantization unit 103.
 DCT・量子化部103は、減算部102から入力された残差信号についてDCTを行い、DCT係数を算出する。DCT・量子化部103は、算出したDCT係数を量子化して量子化係数を求める。DCT・量子化部103は、求めた量子化係数をエントロピー符号化部104及び逆量子化・逆DCT部105に出力する。 The DCT / quantization unit 103 performs DCT on the residual signal input from the subtraction unit 102 and calculates a DCT coefficient. The DCT / quantization unit 103 quantizes the calculated DCT coefficient to obtain a quantization coefficient. The DCT / quantization unit 103 outputs the obtained quantization coefficient to the entropy coding unit 104 and the inverse quantization / inverse DCT unit 105.
 エントロピー符号化部104には、DCT・量子化部103から量子化係数が入力され、予測パラメータ符号化部111から予測パラメータが入力される。入力される予測パラメータには、例えば、参照ピクチャインデックスref_Idx_lX、予測ベクトルインデックスmvp_LX_idx、差分ベクトルmvdLX、予測モードpred_mode_flag、及びマージインデックスmerge_idx等の符号がある。 The entropy encoding unit 104 receives a quantization coefficient from the DCT / quantization unit 103 and receives a prediction parameter from the prediction parameter encoding unit 111. The input prediction parameters include, for example, codes such as a reference picture index ref_Idx_lX, a prediction vector index mvp_LX_idx, a difference vector mvdLX, a prediction mode pred_mode_flag, and a merge index merge_idx.
 エントロピー符号化部104は、入力された分割情報、予測パラメータ、量子化変換係数等をエントロピー符号化して符号化ストリームTeを生成し、生成した符号化ストリームTeを外部に出力する。 The entropy encoding unit 104 entropy-encodes the input division information, prediction parameters, quantization transform coefficients, and the like to generate an encoded stream Te, and outputs the generated encoded stream Te to the outside.
 エントロピー符号化部104の詳細なブロック図を図11に示す。エントロピー符号化部104は、ヘッダ符号化部1101、CT情報符号化部1102、CU符号化部1103、符号化モジュール1104からなる。エントロピー符号化部104は、予測パラメータ符号化部111から供給されるヘッダ情報、予測パラメータ及びDCT・量子化部103から供給される量子化変換係数を符号化し、符号化データを出力する。 A detailed block diagram of the entropy encoding unit 104 is shown in FIG. The entropy encoding unit 104 includes a header encoding unit 1101, a CT information encoding unit 1102, a CU encoding unit 1103, and an encoding module 1104. The entropy encoding unit 104 encodes the header information supplied from the prediction parameter encoding unit 111, the prediction parameter, and the quantized transform coefficient supplied from the DCT / quantization unit 103, and outputs encoded data.
  (ヘッダ符号化部)
 ヘッダ符号化部1101は、符号化モジュール1104を用いてVPS、SPS、PPS、スライスヘッダを符号化する。
(Header encoding part)
The header encoding unit 1101 encodes the VPS, SPS, PPS, and slice header using the encoding module 1104.
  (CT情報符号化部)
 CT情報符号化部1102は、符号化モジュール1104を用いてCTUおよびCTの符号化処理を行う。CT情報符号化部1102は、符号化モジュール1104を用いて、CTUに含まれるCTU情報として、ツリーユニットヘッダCTUHを符号化する。次に、CT情報符号化部1102は、CT情報として、対象CTをQT分割するか否かを示すQT分割フラグ、及び対象CTをBT分割するか否か、およびBT分割する場合は分割方法を示すBT分割モードを符号化し、QT分割フラグ及びBT分割モードがさらなる分割を通知しなくなるまで対象CTを再帰的に分割し符号化する。最後に、CTU情報として、さらに、ツリーユニットフッタCTUFを符号化する。
(CT information encoding unit)
The CT information encoding unit 1102 uses the encoding module 1104 to perform CTU and CT encoding processing. The CT information encoding unit 1102 uses the encoding module 1104 to encode the tree unit header CTUH as CTU information included in the CTU. Next, the CT information encoding unit 1102 uses, as CT information, a QT division flag indicating whether or not to subject the target CT to QT division, whether or not to subject the target CT to BT division, and a division method in the case of BT division. The BT division mode shown is encoded, and the target CT is recursively divided and encoded until the QT division flag and the BT division mode no longer notify further division. Finally, the tree unit footer CTUF is further encoded as CTU information.
 ツリーユニットヘッダCTUH及びツリーユニットフッタCTUFには、対象符号化ツリーユニットの復号方法を決定するために画像復号装置31が参照する符号化パラメータが含まれる。また、CT情報には、QT分割フラグ及びBT分割モードの他、対象CT及び下位の符号化ノードで適用されるパラメータを含んでいてもよい。 The tree unit header CTUH and the tree unit footer CTUF include coding parameters referred to by the image decoding device 31 in order to determine a decoding method of the target coding tree unit. In addition to the QT division flag and the BT division mode, the CT information may include parameters applied in the target CT and lower coding nodes.
  (CU符号化部)
 CU符号化部1103は、最下位の符号化ノードCN(すなわちCU)のPUI情報(マージフラグ(merge_flag)、マージインデックス(merge_idx)、予測動きベクトルインデックス(mvp_idx)、参照画像インデックス(ref_idx_lX)、インター予測識別子(inter_pred_flag)、及び差分ベクトル(mvdLX)等)、量子化変換係数(residual_coding)、及びTTI情報(TU分割フラグSP_TU(split_transform_flag)、CU残差フラグCBP_TU(cbf_cb、cbf_cr、cbf_luma)等)を、符号化モジュール1104を用いて符号化する。
(CU encoding part)
The CU encoding unit 1103 includes PUI information (merge flag (merge_flag), merge index (merge_idx), prediction motion vector index (mvp_idx), reference image index (ref_idx_lX), interlaced encoding node CN (ie, CU) Prediction identifier (inter_pred_flag), difference vector (mvdLX, etc.), quantization transform coefficient (residual_coding), and TTI information (TU partition flag SP_TU (split_transform_flag), CU residual flag CBP_TU (cbf_cb, cbf_cr, cbf_luma), etc.) Encoding is performed using the encoding module 1104.
  (符号化モジュール)
 符号化モジュール1104は、各種予測パラメータ、量子化変換係数等を固定長符号化方式、あるいはエントロピー符号化する符号化処理を行う。符号化モジュール1104は、より具体的には、ヘッダ符号化部1101、CTU情報符号化部1102、CU符号化部1103を固定長符号化、あるいはCABAC等のエントロピー符号化方式により符号化し、符号化データを出力する。ここで、図14のフローチャートを用いて量子化変換係数(変換係数)の符号化処理の動作を説明する。S1401では、CU符号化部1103は、CU内の非ゼロ変換係数の個数をカウントする。S1402では、CU符号化部1103は、CU内の非ゼロ変換係数の有無をチェックする。非ゼロ変換係数がない場合、S1403に進み、CU符号化部1103はcbfを0にセットする。非ゼロ変換係数がある場合、S1404に進み、CU符号化部1103はcbfを1にセットする。S1405で、CU符号化部1103はcbfを符号化する。S1406で、CU符号化部1103はcbfが0か否かをチェックする。cbf=0の場合、CU符号化部1103は処理を終了する。cbf=1の場合、CU符号化部1103は、S1407でLASTを表すシンタックスを導出し、S1408でLASTを表すシンタックスを符号化する。次にCU符号化部1103は、LASTを含むサブブロック以前のサブブロックに対し、S1409~S1413を実施する。S1409では、CU符号化部1103はサブブロック内の非ゼロ変換係数の個数をカウントする。S1410では、CU符号化部1103は非ゼロ変換係数の有無をチェックし、非ゼロ変換係数がなければS1411に進み、coded_sub_block_flagに0をセットし、非ゼロ変換係数があればS1412に進み、coded_sub_block_flagに1をセットする。S1413では、CU符号化部1103はcoded_sub_block_flagを符号化する。次にCU符号化部1103は、各サブブロックに対しS1414~S1418の処理を実施する。S1414では、CU符号化部1103はcoded_sub_block_flag=1か否かをチェックし、coded_sub_block_flag=1ならば、S1415に進み、サブブロック内の各変換係数に対しS1415~S1418を実施する。coded_sub_block_flag=1ならば、CU符号化部1103はS1419に進み、サブブロック内の全てのsig_coeff_flagを0にセットする。CU符号化部1103は、S1415では変換係数値が0か否かをチェックし、変換係数値が0の場合、S1416に進み、sig_coeff_flagを0にセットし、変換係数値が1の場合、S1417に進み、sig_coeff_flagを1にセットし、S1418で、sig_coeff_flagを符号化する。次にCU符号化部1103は、全ての変換係数に対しS1420~S1421を実施する。S1420では、CU符号化部1103はsig_coeff_flag=1か否かをチェックし、sig_coeff_flag=1の場合、S1421に進み、変換係数値から係数レベルを表現するシンタックス(coeff_abs_level_greater1、coeff_abs_level_greater2、coeff_abs_level_remaining、coeff_sign_flag)を導出し、符号化する。以上がエントロピー符号化部104の詳細な説明である。
(Encoding module)
The encoding module 1104 performs an encoding process for encoding various prediction parameters, quantization transform coefficients, and the like in a fixed-length encoding method or entropy encoding. More specifically, the encoding module 1104 encodes the header encoding unit 1101, the CTU information encoding unit 1102, and the CU encoding unit 1103 using a fixed-length encoding or an entropy encoding scheme such as CABAC, and performs encoding. Output data. Here, the operation of the encoding process of the quantized transform coefficient (transform coefficient) will be described using the flowchart of FIG. In S1401, the CU encoding unit 1103 counts the number of non-zero transform coefficients in the CU. In S1402, the CU encoding unit 1103 checks the presence / absence of a non-zero transform coefficient in the CU. When there is no non-zero transform coefficient, the process proceeds to S1403, and the CU encoding unit 1103 sets cbf to 0. When there is a non-zero transform coefficient, the process proceeds to S1404, and the CU encoding unit 1103 sets cbf to 1. In S1405, the CU encoding unit 1103 encodes cbf. In S1406, the CU encoding unit 1103 checks whether cbf is 0 or not. When cbf = 0, the CU encoding unit 1103 ends the process. When cbf = 1, the CU encoding unit 1103 derives the syntax representing LAST in S1407 and encodes the syntax representing LAST in S1408. Next, CU encoding section 1103 performs S1409 to S1413 for the subblocks before the subblock including LAST. In S1409, the CU encoding unit 1103 counts the number of non-zero transform coefficients in the sub-block. In S1410, the CU encoding unit 1103 checks whether or not there is a non-zero transform coefficient, and if there is no non-zero transform coefficient, proceeds to S1411, sets 0 to coded_sub_block_flag, proceeds to S1412 if there is a non-zero transform coefficient, and sets coded_sub_block_flag Set 1 In S1413, the CU encoding unit 1103 encodes coded_sub_block_flag. Next, the CU encoding unit 1103 performs the processing of S1414 to S1418 for each sub-block. In S1414, the CU encoding unit 1103 checks whether or not coded_sub_block_flag = 1. If coded_sub_block_flag = 1, the process proceeds to S1415, and S1415 to S1418 are performed on each transform coefficient in the subblock. If coded_sub_block_flag = 1, the CU encoding unit 1103 proceeds to S1419 and sets all sig_coeff_flags in the sub-block to 0. The CU encoding unit 1103 checks whether or not the transform coefficient value is 0 in S1415.If the transform coefficient value is 0, the process proceeds to S1416, sets sig_coeff_flag to 0, and if the transform coefficient value is 1, the process proceeds to S1417. Then, sig_coeff_flag is set to 1, and sig_coeff_flag is encoded in S1418. Next, the CU encoding unit 1103 performs S1420 to S1421 for all transform coefficients. In S1420, the CU encoding unit 1103 checks whether or not sig_coeff_flag = 1. Derived and encoded. The above is the detailed description of the entropy encoding unit 104.
 逆量子化・逆DCT部105は、DCT・量子化部103から入力された量子化係数を逆量子化してDCT係数を求める。逆量子化・逆DCT部105は、求めたDCT係数について逆DCTを行い、残差信号を算出する。逆量子化・逆DCT部105は、算出した残差信号を加算部106に出力する。 The inverse quantization / inverse DCT unit 105 inversely quantizes the quantization coefficient input from the DCT / quantization unit 103 to obtain a DCT coefficient. The inverse quantization / inverse DCT unit 105 performs inverse DCT on the obtained DCT coefficient to calculate a residual signal. The inverse quantization / inverse DCT unit 105 outputs the calculated residual signal to the addition unit 106.
 加算部106は、予測画像生成部101から入力されたPUの予測画像Pの信号値と逆量子化・逆DCT部105から入力された残差信号の信号値を画素毎に加算して、復号画像を生成する。加算部106は、生成した復号画像を参照ピクチャメモリ109に記憶する。 The addition unit 106 adds the signal value of the prediction image P of the PU input from the prediction image generation unit 101 and the signal value of the residual signal input from the inverse quantization / inverse DCT unit 105 for each pixel, and performs decoding. Generate an image. The adding unit 106 stores the generated decoded image in the reference picture memory 109.
 ループフィルタ107は加算部106が生成した復号画像に対し、デブロッキングフィルタ、サンプル適応オフセット(SAO)、適応ループフィルタ(ALF)を施す。 The loop filter 107 performs a deblocking filter, a sample adaptive offset (SAO), and an adaptive loop filter (ALF) on the decoded image generated by the adding unit 106.
 予測パラメータメモリ108は、符号化パラメータ決定部110が生成した予測パラメータを、符号化対象のピクチャ及びCU毎に予め定めた位置に記憶する。 The prediction parameter memory 108 stores the prediction parameter generated by the encoding parameter determination unit 110 at a predetermined position for each encoding target picture and CU.
 参照ピクチャメモリ109は、ループフィルタ107が生成した復号画像を、符号化対象のピクチャ及びCU毎に予め定めた位置に記憶する。 The reference picture memory 109 stores the decoded image generated by the loop filter 107 at a predetermined position for each picture to be encoded and each CU.
 符号化パラメータ決定部110は、符号化パラメータの複数のセットのうち、1つのセットを選択する。符号化パラメータとは、上述したQTBT分割パラメータや予測パラメータやこれらに関連して生成される符号化の対象となるパラメータである。予測画像生成部101は、これらの符号化パラメータのセットの各々を用いてPUの予測画像Pを生成する。 The encoding parameter determination unit 110 selects one set from among a plurality of sets of encoding parameters. The encoding parameter is a parameter to be encoded that is generated in association with the above-described QTBT division parameter and prediction parameter. The predicted image generation unit 101 generates a predicted image P of the PU using each of these encoding parameter sets.
 符号化パラメータ決定部110は、複数のセットの各々について情報量の大きさと符号化誤差を示すRDコスト値を算出する。RDコスト値は、例えば、符号量と二乗誤差に係数λを乗じた値との和である。符号量は、量子化誤差と符号化パラメータをエントロピー符号化して得られる符号化ストリームTeの情報量である。二乗誤差は、減算部102において算出された残差信号の残差値の二乗値についての画素間の総和である。係数λは、予め設定されたゼロよりも大きい実数である。符号化パラメータ決定部110は、算出したRDコスト値が最小となる符号化パラメータのセットを選択する。これにより、エントロピー符号化部104は、選択した符号化パラメータのセットを符号化ストリームTeとして外部に出力し、選択されなかった符号化パラメータのセットを出力しない。符号化パラメータ決定部110は決定した符号化パラメータを予測パラメータメモリ108に記憶する。 The encoding parameter determination unit 110 calculates an RD cost value indicating the amount of information and the encoding error for each of a plurality of sets. The RD cost value is, for example, the sum of a code amount and a square error multiplied by a coefficient λ. The code amount is the information amount of the encoded stream Te obtained by entropy encoding the quantization error and the encoding parameter. The square error is the sum between pixels regarding the square value of the residual value of the residual signal calculated by the subtracting unit 102. The coefficient λ is a real number larger than a preset zero. The encoding parameter determination unit 110 selects a set of encoding parameters that minimizes the calculated RD cost value. As a result, the entropy encoding unit 104 outputs the selected set of encoding parameters to the outside as the encoded stream Te, and does not output the set of unselected encoding parameters. The encoding parameter determination unit 110 stores the determined encoding parameter in the prediction parameter memory 108.
 予測パラメータ符号化部111は、符号化パラメータ決定部110から入力されたパラメータから、符号化するための形式を導出し、エントロピー符号化部104に出力する。符号化するための形式の導出とは、例えば動きベクトルと予測ベクトルから差分ベクトルを導出することである。また予測パラメータ符号化部111は、符号化パラメータ決定部110から入力されたパラメータから予測画像を生成するために必要なパラメータを導出し、予測画像生成部101に出力する。予測画像を生成するために必要なパラメータとは、例えばサブブロック単位の動きベクトルである。 The prediction parameter encoding unit 111 derives a format for encoding from the parameters input from the encoding parameter determination unit 110 and outputs the format to the entropy encoding unit 104. Deriving the format for encoding is, for example, deriving a difference vector from a motion vector and a prediction vector. Also, the prediction parameter encoding unit 111 derives parameters necessary for generating a prediction image from the parameters input from the encoding parameter determination unit 110 and outputs the parameters to the prediction image generation unit 101. The parameter necessary for generating the predicted image is, for example, a motion vector in units of sub-blocks.
 インター予測パラメータ符号化部112は、符号化パラメータ決定部110から入力された予測パラメータに基づいて、差分ベクトルのようなインター予測パラメータを導出する。インター予測パラメータ符号化部112は、予測画像生成部101に出力する予測画像の生成に必要なパラメータを導出する構成として、インター予測パラメータ復号部303(図5等、参照)がインター予測パラメータを導出する構成と一部同一の構成を含む。また、イントラ予測パラメータ符号化部113は、予測画像生成部101に出力する予測画像の生成に必要な予測パラメータを導出する構成として、イントラ予測パラメータ復号部304(図5等参照)がイントラ予測パラメータを導出する構成と、一部同一の構成を含む。 The inter prediction parameter encoding unit 112 derives an inter prediction parameter such as a difference vector based on the prediction parameter input from the encoding parameter determination unit 110. The inter prediction parameter encoding unit 112 derives parameters necessary for generating a prediction image to be output to the prediction image generating unit 101, and an inter prediction parameter decoding unit 303 (see FIG. 5 and the like) derives inter prediction parameters. Some of the configurations are the same as the configuration to be performed. In addition, the intra prediction parameter encoding unit 113 derives a prediction parameter necessary for generating a prediction image to be output to the prediction image generation unit 101, and the intra prediction parameter decoding unit 304 (see FIG. 5 and the like) And a part of the same structure as that for deriving.
 イントラ予測パラメータ符号化部113は、符号化パラメータ決定部110から入力されたイントラ予測モードIntraPredModeから、符号化するための形式(例えばMPM_idx、rem_intra_luma_pred_mode等)を導出する。 The intra prediction parameter encoding unit 113 derives a format (for example, MPM_idx, rem_intra_luma_pred_mode) for encoding from the intra prediction mode IntraPredMode input from the encoding parameter determination unit 110.
  (CBP_TUとLAST)
 実施形態1の画像符号化装置、画像復号装置では、変換係数をCBP_TU(cbf_luma、cbf_cb、cbf_cr)、LAST、coded_sub_block_flag、sig_coeff_flagを用いることにより、符号化あるいは復号する変換係数レベルを限定し、符号量を削減している。図15は符号量の内訳を示すグラフである。図15から、LASTの表現に用いるlast_sig_coeff_x_prefix、last_sig_coeff_y_prefix、last_sig_coeff_x_suffix、last_sig_coeff_y_suffixの合計は符号量の約10%に達し、1つの座標を表すシンタックスとしてはかなり多いことがわかる。
(CBP_TU and LAST)
In the image coding apparatus and the image decoding apparatus according to Embodiment 1, the transform coefficient level is limited by using CBP_TU (cbf_luma, cbf_cb, cbf_cr), LAST, coded_sub_block_flag, and sig_coeff_flag as the transform coefficient, and the code amount Have reduced. FIG. 15 is a graph showing a breakdown of the code amount. From FIG. 15, it can be seen that the sum of last_sig_coeff_x_prefix, last_sig_coeff_y_prefix, last_sig_coeff_x_suffix, and last_sig_coeff_y_suffix used for the expression of LAST reaches about 10% of the code amount, and it is understood that the syntax representing one coordinate is considerably large.
 また、図16はHD解像度の5種類のシーケンスにおいて、非ゼロ変換係数の個数の平均値をCUサイズと量子化パラメータ毎に集計した結果である。ここでwidthとheightはCUの幅と高さであり、22と27は量子化パラメータである。図16の(1)は輝度、(2)は色差(Cb)、(3)は色差(Cr)のイントラ符号化およびインター符号化における、1CUに含まれる非ゼロ変換係数の平均個数である。色差成分や一部の輝度成分のインター予測では、CUあたりの非ゼロ係数の個数の平均値は3未満であることが多い。変換により、エネルギーが低周波数成分に集中していることから、非ゼロ変換係数はDC成分と、1~2個のAC低周波数成分に集中していると考えられる。 Also, FIG. 16 shows the result of aggregating the average value of the number of non-zero transform coefficients for each CU size and quantization parameter in 5 types of HD resolution sequences. Here, width and height are the width and height of the CU, and 22 and 27 are quantization parameters. In FIG. 16, (1) is luminance, (2) is color difference (Cb), and (3) is the average number of non-zero transform coefficients included in 1CU in intra coding and inter coding of color difference (Cr). In inter prediction of color difference components and some luminance components, the average number of non-zero coefficients per CU is often less than 3. Since the energy is concentrated on the low frequency component by the conversion, the non-zero conversion coefficient is considered to be concentrated on the DC component and one or two AC low frequency components.
 これらを考慮して、以下では、CU内の非ゼロ変換係数の有無を示すというCBP_TUの定義を変更し、LASTの符号量を削減する方法を説明する。また、以下ではcbf_luma、cbf_cb、cbf_crを代表してcbfと記す。 Considering these, the following describes a method for reducing the code amount of LAST by changing the definition of CBP_TU to indicate the presence or absence of non-zero transform coefficients in the CU. Hereinafter, cbf_luma, cbf_cb, and cbf_cr are represented as cbf.
 まず下記4種類(1)~(4)のcbfを定義する。これらは非ゼロ変換係数がDCのみ、AC0のみ、AC1のみ、DCとAC0のみ、DCとAC1のみ、AC0とAC1のみ、DCとAC0とAC1のみ、それ以外の場合において、変換係数の符号化、復号に関する各シンタックスの符号と符号量を示した、各々図17(1)~(4)に対応する。ただし、coded_sub_block_flagと変換係数レベルを表すシンタックスは(1)~(4)において符号量の変化がないので省略しており、cbf、LAST、sig_coeff_flagのみを図示した。なおLASTの可変長符号表は図12を用いている。 First, the following four types (1) to (4) of cbf are defined. These are non-zero transform coefficients DC only, AC0 only, AC1 only, DC and AC0 only, DC and AC1 only, AC0 and AC1 only, DC and AC0 and AC1 only, otherwise encoding of the transform coefficient, FIGS. 17 (1) to (4) respectively show codes and code amounts of the syntaxes related to decoding. However, the coded_sub_block_flag and the syntax representing the transform coefficient level are omitted because there is no change in the code amount in (1) to (4), and only cbf, LAST, and sig_coeff_flag are shown. The variable length code table of LAST uses FIG.
 (1)cbfを1bitとし、cbf=0はCUに非ゼロ変換係数がない場合、cbf=1はCUに非ゼロ変換係数がある場合を示す(上記の方法)。 (1) When cbf is 1 bit, cbf = 0 indicates that the CU has no non-zero conversion coefficient, and cbf = 1 indicates the case where the CU has a non-zero conversion coefficient (the above method).
 (2)cbfを2bitとし、cbf=0はCUに非ゼロ変換係数がない場合、cbf=10は非ゼロ変換係数がDC成分のみの場合、cbf=11は非ゼロ変換係数がDC成分以外に存在する場合を示す。 (2) cbf is 2 bits, cbf = 0 is CU has no non-zero conversion coefficient, cbf = 10 is non-zero conversion coefficient only DC component, cbf = 11 is non-zero conversion coefficient other than DC component Indicates the case where it exists.
 (3)cbfを2bitとし、cbf=0はCUに非ゼロ変換係数がない場合、cbf=10は非ゼロ変換係数がDCおよびAC0成分以外にない場合、cbf=11は非ゼロ変換係数がDCおよびAC0成分以外に存在する場合を示す。 (3) cbf is 2 bits, cbf = 0 is CU has no non-zero conversion coefficient, cbf = 10 is non-zero conversion coefficient other than DC and AC0 component, cbf = 11 is non-zero conversion coefficient is DC And the case where it exists other than AC0 component is shown.
 (4)cbfを2bitとし、cbf=0はCUに非ゼロ変換係数がない場合、cbf=10は非ゼロ変換係数がDC、AC0およびAC1成分以外にない場合、cbf=11は非ゼロ変換係数がDC、AC0およびAC1成分以外に存在する場合を示す。 (4) When cbf is 2 bits, cbf = 0 is a non-zero conversion coefficient in the CU, cbf = 10 is a nonzero conversion coefficient other than DC, AC0, and AC1 components, cbf = 11 is a nonzero conversion coefficient Shows a case where is present in addition to DC, AC0 and AC1 components.
 図17(1)は上記(1)に関するシンタックスとその符号量を示す。上記(2)~(4)はcbf=10で表現できない場合(cbp=11)に上記(1)に比べて1bit符号量が増加する。従って、非ゼロ変換係数がDC成分付近に集中する場合が大部分を占める条件下で使用すると、効率的に符号量を削減することができる。例えば、色差成分のインター符号化では上記(2)~(4)の方法のいずれかを使用し、輝度成分のイントラおよびインター符号化と色差成分のイントラ符号化では上記(1)の方法を使用する。色差成分のインター符号化で上記(2)~(4)のいずれを使用するかは、あらかじめ画像符号化装置と画像復号装置の間で規定してもよいし、SPS、PPS、スライスヘッダの中で使用する方法を通知してもよい。 Fig. 17 (1) shows the syntax and code amount for (1) above. When the above (2) to (4) cannot be expressed by cbf = 10 (cbp = 11), the 1-bit code amount is increased as compared with the above (1). Therefore, the code amount can be efficiently reduced if the non-zero transform coefficient is used under the condition where the majority of the non-zero transform coefficients are concentrated near the DC component. For example, one of the above methods (2) to (4) is used for the inter coding of the color difference component, and the above method (1) is used for the intra / inter coding of the luminance component and the intra coding of the color difference component. To do. Which of the above (2) to (4) is used in the inter-coding of the color difference component may be defined in advance between the image encoding device and the image decoding device, or among the SPS, PPS, and slice headers. You may be notified of how to use.
 図18、図19は上記(2)~(4)の方法を用いた場合のエントロピー復号部301(CU復号部1003)、およびエントロピー符号化部104(CU符号化部1103)の動作を示すフローチャートである。 FIGS. 18 and 19 are flowcharts showing operations of the entropy decoding unit 301 (CU decoding unit 1003) and the entropy encoding unit 104 (CU encoding unit 1103) when the methods (2) to (4) are used. It is.
 図18(2)は上記(2)の復号処理を示すフローチャートである。S1801では、CU復号部1003はCU内の全変換係数を0にセットする。S1802では、CU復号部1003はcbfを復号する。S1803では、CU復号部1003はcbfが0か否かをチェックする。cbfが0の場合、CU復号部1003は処理を終了する。cbfが1の場合、S1804に進み、cbf=10か否かをチェックする。cbf=10でない場合、S1805~S1807を実施する。S1805は図13のS1304、S1806は図13のS1305、S1807は図13のS1306~S1308と同じであり説明を省略する。cbf=10の場合、S1808に進み、CU復号部1003はLASTに(0,0)をセットする。S1809では、CU復号部1003はDC成分のsig_coeff_flagに1を、それ以外のAC成分のsig_coeff_flagに0をセットする。S1810では、CU復号部1003は変換係数レベルを復号するが、この処理は図13のS1309~S1311と同じであり、説明を省略する。 FIG. 18 (2) is a flowchart showing the decoding process of (2) above. In S1801, the CU decoding unit 1003 sets all transform coefficients in the CU to 0. In S1802, the CU decoding unit 1003 decodes cbf. In S1803, the CU decoding unit 1003 checks whether cbf is 0 or not. When cbf is 0, the CU decoding unit 1003 ends the process. If cbf is 1, the process advances to step S1804 to check whether cbf = 10. If cbf = 10, S1805 to S1807 are executed. S1805 is the same as S1304 in FIG. 13, S1806 is the same as S1305 in FIG. 13, and S1807 is the same as S1306 to S1308 in FIG. When cbf = 10, the process proceeds to S1808, and the CU decoding unit 1003 sets (0, 0) to LAST. In S1809, the CU decoding unit 1003 sets 1 to sig_coeff_flag of the DC component and 0 to sig_coeff_flag of other AC components. In S1810, the CU decoding unit 1003 decodes the transform coefficient level, but this process is the same as S1309 to S1311 in FIG.
 図18(3)は上記(3)の復号処理を示すフローチャートである。図18(2)のS1808とS1809の処理がS18081とS18091に変更される以外は図18(2)と同じである。図18(3)のS18081では、CU復号部1003はLASTに(0,1)をセットする。S18091では、CU復号部1003はDC成分とAC0成分のsig_coeff_flagを復号し、それ以外のAC成分のsig_coeff_flagに0をセットする。 FIG. 18 (3) is a flowchart showing the decoding process (3) above. FIG. 18 (2) is the same as FIG. 18 (2) except that the processing of S1808 and S1809 is changed to S18081 and S18091. In S18081 of FIG. 18 (3), the CU decoding unit 1003 sets (0, 1) to LAST. In S18091, the CU decoding unit 1003 decodes sig_coeff_flag of the DC component and the AC0 component, and sets 0 to sig_coeff_flag of the other AC components.
 図18(4)は上記(4)の復号処理を示すフローチャートである。図18(2)のS1808とS1809の処理がS18082とS18092に変更される以外は図18(2)と同じである。図18(4)のS18082では、CU復号部1003はLASTに(1,0)をセットする。S18092では、CU復号部1003はDC成分とAC0およびAC1成分のsig_coeff_flagを復号し、それ以外のAC成分のsig_coeff_flagに0をセットする。 FIG. 18 (4) is a flowchart showing the decoding process (4) above. 18 (2) is the same as FIG. 18 (2) except that the processing of S1808 and S1809 in FIG. 18 (2) is changed to S18082 and S18092. In S18082 of FIG. 18 (4), the CU decoding unit 1003 sets (1,0) to LAST. In S18092, the CU decoding unit 1003 decodes the DC component, sig_coeff_flag of the AC0 and AC1 components, and sets 0 to the sig_coeff_flag of the other AC components.
 図19(2)は上記(2)の符号化処理を示すフローチャートである。S1901では、CU符号化部1103は、CU内の非ゼロ変換係数の個数をカウントする。S1902では、CU符号化部1103は、CU内の非ゼロ変換係数の有無をチェックする。非ゼロ変換係数がない場合、S1903に進み、CU符号化部1103はcbfを0にセットする。非ゼロ変換係数がある場合、S1904に進み、CU符号化部1103は非ゼロ変換係数がDC成分のみか否かをチェックする。非ゼロ変換係数がDC成分のみの場合、S1905に進みcbfを10にセットし、非ゼロ変換係数がDC成分以外にも存在する場合、S1906に進みcbfを11にセットする。S1907で、CU符号化部1103はcbfを符号化する。S1908で、CU符号化部1103はcbfが0か否かをチェックする。cbf=0の場合、CU符号化部1103は処理を終了する。cbf=0でない場合、S1909に進み、CU符号化部1103はcbf=11か否かをチェックする。cbf=11の場合、CU符号化部1103はS1910~S1912の処理を実施する。S1910は図14のS1407~S1408、S1911は図14のS1409~S1413、S1912は図14のS1414~S1419と同じであり説明を省略する。cbf=11の場合、S1914でDC成分のsig_coeff_flagに1を、それ以外のAC成分のsig_coeff_flagに0をセットする。S1913で、CU符号化部1103は非ゼロ変換係数の係数レベルを表現するシンタックスを符号化する。S1913は図14のS1420~S1421と同じであり、説明を省略する。 FIG. 19 (2) is a flowchart showing the encoding process of (2) above. In S1901, the CU encoding unit 1103 counts the number of non-zero transform coefficients in the CU. In S1902, the CU encoding unit 1103 checks whether or not there is a non-zero transform coefficient in the CU. When there is no non-zero transform coefficient, the process proceeds to S1903, and the CU encoding unit 1103 sets cbf to 0. If there is a non-zero transform coefficient, the process proceeds to S1904, where the CU encoder 1103 checks whether the non-zero transform coefficient is only a DC component. If the non-zero transform coefficient is only the DC component, the process proceeds to S1905, where cbf is set to 10. If the non-zero transform coefficient exists in addition to the DC component, the process proceeds to S1906, and cbf is set to 11. In S1907, the CU encoding unit 1103 encodes cbf. In S1908, the CU encoding unit 1103 checks whether cbf is 0 or not. When cbf = 0, the CU encoding unit 1103 ends the process. If cbf = 0 is not satisfied, the process proceeds to S1909, where the CU encoding unit 1103 checks whether cbf = 11. When cbf = 11, the CU encoding unit 1103 performs the processing of S1910 to S1912. S1910 is the same as S1407 to S1408 in FIG. 14, S1911 is the same as S1409 to S1413 in FIG. 14, and S1912 is the same as S1414 to S1419 in FIG. When cbf = 11, 1 is set to sig_coeff_flag of the DC component and 0 is set to sig_coeff_flag of the other AC components in S1914. In S1913, the CU encoding unit 1103 encodes a syntax expressing the coefficient level of the non-zero transform coefficient. S1913 is the same as S1420 to S1421 in FIG.
 図19(3)は上記(3)の符号化処理を示すフローチャートである。図19(2)のS1904とS1914の処理がS19041とS19141に変更される以外は図19(2)と同じである。図19(3)のS19041では、CU符号化部1103は、非ゼロ変換係数はDCとAC0成分以外に存在しないかをチェックする。S19141では、CU符号化部1103はDC成分とAC0成分のsig_coeff_flagを符号化し、それ以外のAC成分のsig_coeff_flagに0をセットする。 FIG. 19 (3) is a flowchart showing the encoding process (3) above. FIG. 19 (2) is the same as FIG. 19 (2) except that the processing of S1904 and S1914 is changed to S19041 and S19141. In S19041 of FIG. 19 (3), the CU encoding unit 1103 checks whether there are non-zero transform coefficients other than DC and AC0 components. In S19141, the CU encoding unit 1103 encodes sig_coeff_flag of the DC component and the AC0 component, and sets 0 to sig_coeff_flag of the other AC components.
 図19(4)は上記(4)の符号化処理を示すフローチャートである。図19(2)のS1904とS1914の処理がS19042とS19142に変更される以外は図19(2)と同じである。図19(4)のS19042では、CU符号化部1103は、非ゼロ変換係数はDCとAC0およびAC1成分以外に存在しないかをチェックする。S19142では、CU符号化部1103はDC成分とAC0およびAC1成分のsig_coeff_flagを符号化し、それ以外のAC成分のsig_coeff_flagに0をセットする。 FIG. 19 (4) is a flowchart showing the encoding process (4) above. FIG. 19 (2) is the same as FIG. 19 (2) except that the processes of S1904 and S1914 in FIG. 19 (2) are changed to S19042 and S19142. In S19042 of FIG. 19 (4), the CU encoding unit 1103 checks whether there are non-zero transform coefficients other than DC, AC0, and AC1 components. In S19142, the CU encoding unit 1103 encodes the DC component, sig_coeff_flag of the AC0 and AC1 components, and sets sig_coeff_flag of the other AC components to 0.
 以上説明したように、実施形態1では、cbfの定義を変更することでLASTの符号量を削減する。非ゼロ変換係数がDC成分付近に集中する場合が大部分を占める条件下でこの方法を使用することで、符号量を削減することができる。 As described above, in the first embodiment, the code amount of LAST is reduced by changing the definition of cbf. By using this method under conditions where the majority of non-zero transform coefficients are concentrated near the DC component, the amount of codes can be reduced.
  (実施形態2)
 本願の実施形態1では、非ゼロ変換係数がDC成分付近に集中する場合が大部分を占める条件として色差成分のインター符号化を挙げて説明した。実施形態2では、非ゼロ変換係数がDC成分付近に集中する場合が大部分を占める条件として、CUサイズ(CUwidth:CUの幅、CUheight:CUの高さ)と量子化パラメータを追加して説明する。
(Embodiment 2)
In the first embodiment of the present application, the inter-coding of the color difference component has been described as a condition that occupies most cases where the non-zero transform coefficients are concentrated in the vicinity of the DC component. In the second embodiment, the CU size (CUwidth: CU width, CUheight: CU height) and a quantization parameter are added as a condition that the majority of cases where non-zero transform coefficients are concentrated near the DC component are described. To do.
 図16に示すように、非ゼロ変換係数の個数は、イントラ符号化およびインター符号化以外に、CUサイズと量子化パラメータ(QP)に依存する。QP<=THQ1では実施形態1の(1)の方法を使用するが、THQ1<QPでは特定のCUサイズで実施形態1の(2)の方法を使用する。例えばTHQ1<QP<=THQ2では、CUmax>=THC1の場合に実施形態1の(2)を使用し、CUmax<THC1の場合に実施形態1の(1)を使用する。ここでCUmax=max(CUwidth,CUheight)である。さらにTHQ2<=QPでは、CUmax>=THC2の場合に実施形態1の(2)を使用し、THC3<=CUmax<THC2の場合に実施形態1の(3)を使用し、CUmax<THC3の場合に実施形態1の(1)を使用する。なお、THQ1<THQ2であり、THC1>THC2>THC3である。 As shown in FIG. 16, the number of non-zero transform coefficients depends on the CU size and the quantization parameter (QP) in addition to intra coding and inter coding. In QP <= THQ1, the method (1) of the first embodiment is used, but in THQ1 <QP, the method (2) of the first embodiment is used with a specific CU size. For example, in THQ1 <QP <= THQ2, (2) of the first embodiment is used when CUmax> = THC1, and (1) of the first embodiment is used when CUmax <THC1. Here, CUmax = max (CUwidth, CUheight). Further, in THQ2 <= QP, (2) of the first embodiment is used when CUmax> = THC2, (3) of the first embodiment is used when THC3 <= CUmax <THC2, and CUmax <THC3. (1) of Embodiment 1 is used. Note that THQ1 <THQ2 and THC1> THC2> THC3.
 例えば図20(1)は輝度成分のインター符号化の例であるが、THQ1=22、THQ2=32、THC1=128、THC2=64、THC3=32である。 For example, FIG. 20 (1) is an example of inter coding of luminance components, but THQ1 = 22, THQ2 = 32, THC1 = 128, THC2 = 64, and THC3 = 32.
 また別の例として、QP<=THQ1ではTHC2<=CUmax<THC1、かつminCU>=THC3の場合に実施形態1の(1)を使用し、それ以外の場合は実施形態1の(2)を使用する。ここでCUmin=min(CUwidth,CUheight)である。さらにQP>THQ1では、CUサイズに関わらず実施形態1の(2)を使用する。 As another example, when QP <= THQ1, THC2 <= CUmax <THC1 and minCU> = THC3, (1) of the first embodiment is used. Otherwise, (2) of the first embodiment is used. use. Here, CUmin = min (CUwidth, CUheight). Furthermore, when QP> THQ1, (2) of the first embodiment is used regardless of the CU size.
 例えば図20(2)は色差成分のインター符号化の例であるが、THQ1=22、THC1=64、THC2=32、TUC3=16である。 For example, FIG. 20 (2) is an example of inter-coding of color difference components, and THQ1 = 22, THC1 = 64, THC2 = 32, and TUC3 = 16.
 また別の例として、QP<=THQ1では、CUmax>=THC1の場合に実施形態1の(1)を使用し、CUmax<=THC2の場合に実施形態1の(2)を使用し、それ以外の場合に実施例1の(3)を使用する。さらにTHQ1<QPでは、CUmax>=THC1の場合に実施形態1の(1)を使用し、それ以外の場合に実施形態1の(2)を使用する。 As another example, in QP <= THQ1, (1) of Embodiment 1 is used when CUmax> = THC1, (2) of Embodiment 1 is used when CUmax <= THC2, and otherwise In this case, (3) of Example 1 is used. Further, in THQ1 <QP, (1) of the first embodiment is used when CUmax> = THC1, and (2) of the first embodiment is used otherwise.
 例えば図20(3)は色差成分のイントラ符号化の例であるが、THQ1=27、THC1=32、THC2=2である。 For example, FIG. 20 (3) is an example of intra coding of the color difference component, and THQ1 = 27, THC1 = 32, and THC2 = 2.
 さらに色差Crでは、図20(4)に示すように、Cb(図20(3)の例)とCrで異なる閾値を設定してもよい。 Furthermore, for color difference Cr, as shown in FIG. 20 (4), different threshold values may be set for Cb (example in FIG. 20 (3)) and Cr.
 図21、図22は実施形態2の方法を用いた場合のエントロピー復号部301(CU復号部1003)、およびエントロピー符号化部104(CU符号化部1103)の動作を示すフローチャートである。図18および図19と同じ番号を付けたステップは、図18および図19と同じ処理であるので、説明を省略する。 21 and 22 are flowcharts showing operations of the entropy decoding unit 301 (CU decoding unit 1003) and the entropy encoding unit 104 (CU encoding unit 1103) when the method of the second embodiment is used. Steps denoted by the same numbers as in FIGS. 18 and 19 are the same processes as in FIGS.
 図21において、S2101では、CU復号部1003は、CUサイズと量子化パラメータからcbfの定義を決定する。cbfの定義は図21(2)に示すように、cbfの定義が実施形態1の(1)の場合はLAST、sig_coeff_flagを符号化データから抽出するため、非ゼロ変換係数は設定しない。cbfの定義が実施形態1の(2)の場合はLASTに(0,0)、cbf=10の場合の非ゼロ変換係数にDC成分を設定する。cbfの定義が実施形態1の(3)の場合はLASTに(0,1)、DCおよびAC0成分のsig_coeff_flagを符号化/復号し、cbf=10の場合の非ゼロ変換係数にDCおよびAC0成分を設定する。cbfの定義が実施形態1の(4)の場合はLASTに(1,0)、DC、AC0およびAC1成分のsig_coeff_flagを符号化/復号し、cbf=10の場合の非ゼロ変換係数にDC、AC0およびAC1成分を設定する。S2102では、CU復号部1003は、cbfの定義からLAST、復号するsig_coeff_flag、cbf=10時の非ゼロ変換係数を決定する。S2108では、CU復号部1003はS2102で決定したLASTをセットする。S2109では、CU復号部1003は、S2102で決定した変換係数のsig_coeff_flagを復号し、それ以外の変換係数のsig_coeff_flagを0にセットする。 In FIG. 21, in S2101, the CU decoding unit 1003 determines the definition of cbf from the CU size and the quantization parameter. The definition of cbf is as shown in FIG. 21 (2). When the definition of cbf is (1) of the first embodiment, LAST and sig_coeff_flag are extracted from the encoded data, so no non-zero transform coefficient is set. When the definition of cbf is (2) of the first embodiment, DC component is set to (0, 0) in LAST and non-zero conversion coefficient in the case of cbf = 10. When the definition of cbf is (3) of the first embodiment, sig_coeff_flag of DC and AC0 components is encoded / decoded into LAST, and DC and AC0 components are converted into non-zero transform coefficients when cbf = 10 Set. When the definition of cbf is (4) of the first embodiment, (1,0) is encoded in LAST, sig_coeff_flag of DC, AC0, and AC1 components is encoded / decoded, and DC is converted into a non-zero transform coefficient when cbf = 10, Set the AC0 and AC1 components. In S2102, the CU decoding unit 1003 determines LAST, sig_coeff_flag to be decoded, and non-zero transform coefficient when cbf = 10 from the definition of cbf. In S2108, the CU decoding unit 1003 sets LAST determined in S2102. In S2109, the CU decoding unit 1003 decodes sig_coeff_flag of the transform coefficient determined in S2102, and sets sig_coeff_flag of other transform coefficients to 0.
 図22において、S2204では、CU符号化部1103は、CU内の非ゼロ変換係数がS2102で決定したcbf=10の定義によるものか否かをチェックする。S2214では、CU符号化部1103は、S2102で決定した変換係数のsig_coeff_flagを符号化し、それ以外の変換係数のsig_coeff_flagを0にセットする。 22, in S2204, the CU encoding unit 1103 checks whether the non-zero transform coefficient in the CU is based on the definition of cbf = 10 determined in S2102. In S2214, the CU encoding unit 1103 encodes sig_coeff_flag of the transform coefficient determined in S2102 and sets sig_coeff_flag of other transform coefficients to 0.
 以上説明したように、実施形態2では、cbfの定義を変更することでLASTの符号量を削減する時に、非ゼロ変換係数がDC成分付近に集中する場合が大部分を占める条件にCUサイズや量子化パラメータを加えることで、変更されたcbfの定義を適用する範囲を拡張し、符号量削減幅を大きくすることができる。 As described above, in the second embodiment, when the code amount of LAST is reduced by changing the definition of cbf, CU size or By adding the quantization parameter, it is possible to extend the range to which the changed definition of cbf is applied and to increase the code amount reduction range.
  (実施形態3)
 本願の実施形態1、2では、非ゼロ変換係数がDC成分付近に集中する場合のLASTの符号量削減方法を説明した。実施形態3では、非ゼロ変換係数が高周波数領域に存在し、LASTの座標が大きくなる場合の符号量削減方法を説明する。
(Embodiment 3)
In the first and second embodiments of the present application, the LAST code amount reduction method in the case where the non-zero transform coefficients are concentrated near the DC component has been described. In the third embodiment, a code amount reduction method in the case where a non-zero transform coefficient exists in a high frequency region and the LAST coordinate becomes large will be described.
 図23ではLASTが(14,6)の位置にある例を示す。CU内のLASTの座標を直接(1段階で)表現すると、図12の可変長符号表を用いて(1111111010,1111100)の17bitで表現される。 Fig. 23 shows an example where LAST is at the position (14, 6). If the LAST coordinates in the CU are expressed directly (in one step), they are expressed in 17 bits (1111111010, 1111100) using the variable length code table of FIG.
 図23に示すように、CU内のLASTの座標を直接表現する以外に、LASTのサブブロック位置とサブブロック内の位置を用いて段階的に表現することもできる。この場合、LASTの含まれるサブブロックの位置は(3,1)であり、位置(3,1)のサブブロックの中でのLASTの位置は(2,2)であるので、図12の可変長符号表を用いて(1110,10)、(110,110)の12bitで表現される。従ってLASTの位置が(0,0)から大きく離れた場合は、CU内のLASTの座標を直接符号化するよりも、LASTが含まれるサブブロック位置とサブブロック内のLASTの位置に分けて2段階で符号化する方が符号量を削減することができる。 As shown in FIG. 23, in addition to directly expressing the LAST coordinates in the CU, it can also be expressed in stages using the LAST sub-block position and the position in the sub-block. In this case, the position of the subblock included in LAST is (3,1), and the position of LAST in the subblock at position (3,1) is (2,2). It is expressed by 12 bits (1110,10) and (110,110) using a long code table. Therefore, if the position of LAST is far away from (0,0), rather than directly encoding the coordinates of the LAST in the CU, it is divided into 2 sub-block positions containing the LAST and 2 LAST positions in the sub-block. The amount of code can be reduced by encoding in stages.
 LASTは2次元の座標で表されるが、水平・垂直方向とも符号化方法は同じであるので、以下では1次元(水平方向か垂直方向のいずれか)で説明する。 LAST is expressed in two-dimensional coordinates, but the encoding method is the same in both the horizontal and vertical directions, so the following description is based on one dimension (either horizontal or vertical).
 図24はLAST位置と、LAST位置を表現するために必要な符号量を示した図である。可変長符号表は図12に示す符号表を使用した。図24(1)はCU内のLASTの座標を直接符号化した場合であり、図24(2)はLASTが含まれるサブブロック位置とサブブロック内のLASTの位置の2段階で符号化した場合である。LAST位置が0~3、つまりCU内の左上のサブブロックに含まれる場合は、CU内のLASTの座標を直接符号化した方が符号量は少ないが、それ以外の場合は、LASTが含まれるサブブロック位置とサブブロック内のLASTの位置の2段階で符号化した方が符号量は少ないことがわかる。 FIG. 24 is a diagram showing the LAST position and the code amount necessary to express the LAST position. As the variable length code table, the code table shown in FIG. 12 was used. Fig. 24 (1) shows the case where the LAST coordinates in the CU are directly encoded, and Fig. 24 (2) shows the case where the encoding is performed in two stages: the position of the LAST in the sub-block and the position of the LAST in the sub-block. It is. If the LAST position is 0 to 3, that is, included in the upper left sub-block in the CU, the code amount is less if the LAST coordinates in the CU are directly encoded, but in other cases, the LAST is included It can be seen that the amount of code is smaller when encoding is performed in two stages, the sub-block position and the LAST position in the sub-block.
 図25は、図13のS1304および図18のS1805を実施形態3の方法で置き換えた時の動作を示すフローチャートである。 FIG. 25 is a flowchart showing the operation when S1304 in FIG. 13 and S1805 in FIG. 18 are replaced by the method of the third embodiment.
 S2501では、CU復号部1003は、LASTを含むサブブロックの位置とサブブロック内のLASTの位置を復号する。S2502では、CU復号部1003は、復号したLASTを含むサブブロックの位置とサブブロック内のLASTの位置からCU内のLASTの座標を導出する。 In S2501, the CU decoding unit 1003 decodes the position of the sub block including the LAST and the position of the LAST in the sub block. In S2502, the CU decoding unit 1003 derives the coordinates of the LAST in the CU from the position of the subblock including the decoded LAST and the position of the LAST in the subblock.
 図26は、図14のS1407~S1408および図19のS1910を実施形態3の方法で置き換えた時の動作を示すフローチャートである。 FIG. 26 is a flowchart showing the operation when S1407 to S1408 in FIG. 14 and S1910 in FIG. 19 are replaced by the method of the third embodiment.
 S2601では、CU符号化部1103はCU内のLAST位置を導出する。CU符号化部1103は、S2602ではLASTを含むサブブロックの位置を導出し、S2603ではサブブロック内のLASTの位置を導出し、S2604ではLASTを含むサブブロックの位置とサブブロック内のLASTの位置を符号化する。 In S2601, the CU encoding unit 1103 derives the LAST position in the CU. The CU encoding unit 1103 derives the position of the subblock including LAST in S2602, derives the position of LAST in the subblock in S2603, and positions of the subblock including LAST and the position of LAST in the subblock in S2604. Is encoded.
 さらに図16に示すように、輝度成分および色差成分のイントラ符号化ではCUに含まれる非ゼロ変換係数の個数が多い。つまり、LASTは高周波数領域にある可能性が高いと考えられる。従ってイントラ符号化ではLASTを2段階で符号化し、インター符号化ではLASTを直接符号化することで、LASTの符号量を削減することができる。 Furthermore, as shown in FIG. 16, in the intra coding of the luminance component and the color difference component, the number of non-zero transform coefficients included in the CU is large. In other words, LAST is likely to be in the high frequency region. Therefore, the amount of LAST code can be reduced by encoding LAST in two stages in intra encoding and directly encoding LAST in inter encoding.
 また、図16に示すように、輝度成分および色差成分のイントラ符号化であっても、CUに含まれる非ゼロ変換係数の個数は量子化パラメータ(QP)とCUブロックサイズに依存する。従って、量子化パラメータとCUサイズによって、LASTの座標を直接符号化する場合と、LASTの座標をサブブロックの位置とサブブロック内の位置の2段階で符号化する場合とを切り替えることにより、LASTの符号量をさらに削減することができる。例えば、QP<THQ1の場合、CUmax>=THC1ならばLASTを2段階で符号化し、CUmax<THC1ならばLASTを直接符号化する。QP>=THQ1の場合、CUmax>=THC2ならばLASTを2段階で符号化し、CUmax<THC2ならばLASTを直接符号化する。図27(1)は、輝度成分のイントラ符号化においてTHQ1=32、THC1=32、THC2=64とした例である。また別の例として、QP=<THQ2、かつ、CUmax>=THC3かつCUmin>=THC4ならばLASTを2段階で符号化し、それ以外はLASTを直接符号化することもできる。図27(2)は色差成分のイントラ符号化において、THQ2=22、THC3=32、THC4=16とした例である。また別の例として、CbとCrで異なる閾値を設定してもよい。例えばCbよりも画素値の変化の小さいCrはLASTを2段階で符号化する効果が限られるため、QP<=THQ2、かつ、CUmax=Cumin=THC5ならばLASTを2段階で符号化し、それ以外はLASTを直接符号化する等、CbとCrとに別途閾値を設定することもできる。図27(3)はCbのイントラ符号化において、THQ2=22、THC5=32とした例である。以上説明したように、LASTがCUの左上のサブブロック以外に含まれる可能性が高い場合に限定して、LASTを含むサブブロックの位置とサブブロック内のLASTの位置の2段階で符号化することにより、LASTの符号量削減効果を高めることができる。 Also, as shown in FIG. 16, even in the case of intra coding of luminance components and color difference components, the number of non-zero transform coefficients included in the CU depends on the quantization parameter (QP) and the CU block size. Therefore, by switching between the case where the LAST coordinates are directly encoded according to the quantization parameter and the CU size, and the case where the LAST coordinates are encoded in two stages, the position of the sub-block and the position within the sub-block, the LAST Can be further reduced. For example, in the case of QP <THQ1, if CUmax> = THC1, LAST is encoded in two stages, and if CUmax <THC1, LAST is encoded directly. In the case of QP> = THQ1, if CUmax> = THC2, LAST is encoded in two stages, and if CUmax <THC2, LAST is directly encoded. FIG. 27 (1) is an example in which THQ1 = 32, THC1 = 32, and THC2 = 64 in the luminance component intra coding. As another example, if QP = <THQ2, CUmax> = THC3 and CUmin> = THC4, LAST can be encoded in two stages, otherwise LAST can be encoded directly. FIG. 27 (2) shows an example in which THQ2 = 22, THC3 = 32, and THC4 = 16 in the intra coding of the color difference component. As another example, different threshold values may be set for Cb and Cr. For example, Cr, which has a smaller pixel value change than Cb, has a limited effect in encoding LAST in two stages. Therefore, if QP <= THQ2 and CUmax = Cumin = THC5, LAST is encoded in two stages. Can also set a separate threshold for Cb and Cr, such as by encoding LAST directly. FIG. 27 (3) shows an example in which THQ2 = 22 and THC5 = 32 in Cb intra coding. As described above, encoding is performed in two stages: the position of the subblock including LAST and the position of LAST within the subblock, only when there is a high possibility that LAST is included in other than the upper left subblock of CU. As a result, the LAST code amount reduction effect can be enhanced.
  (実施形態4)
 本願の実施形態3では、非ゼロ変換係数が高周波数領域に存在し、LASTの座標が大きくなる場合の符号量削減方法として、LASTを2段階で符号化する方法を説明した。本願の実施形態4では、非ゼロ変換係数が高周波数領域に存在し、LASTの座標が大きくなる場合の別の符号量削減方法として、LASTの符号化に使用する可変長符号表の切替を説明する。
(Embodiment 4)
In the third embodiment of the present application, a method of encoding LAST in two stages has been described as a code amount reduction method in the case where non-zero transform coefficients exist in the high frequency region and the coordinates of LAST become large. In Embodiment 4 of the present application, switching of a variable-length code table used for LAST coding is described as another code amount reduction method when non-zero transform coefficients exist in the high frequency region and the LAST coordinates become large. To do.
 実施形態1~3では図12の可変長符号表Aを用いた。図12の可変長符号表AはLASTが小さい時に符号量が小さいメリットがあるが、LASTが大きくなるにつれ符号量の増加の割合が大きいので、大きな値のLASTが多い場合はデメリットとなる。実施形態4では、大きなLASTが発生しやすい場合、例えば輝度成分のイントラ符号化において、LASTが小さい時の符号量は図12の可変長符号よりも大きいが、LASTが大きくなっても符号量があまり大きくならない可変長符号表を説明する。 In Embodiments 1 to 3, the variable length code table A in FIG. 12 is used. The variable-length code table A in FIG. 12 has an advantage that the code amount is small when LAST is small. However, since the rate of increase in the code amount increases as LAST increases, there is a disadvantage when there are many large values of LAST. In the fourth embodiment, when a large LAST is likely to occur, for example, in the intra coding of the luminance component, the code amount when the LAST is small is larger than the variable length code of FIG. A variable length code table that does not become too large will be described.
 図28(1)~(4)はLASTが大きい時に効果のある(符号量があまり大きくならない)可変長符号表の例である。図12と同様、”1”と”0”で示される部分はlast_sig_coeff_Z_prefix(Zはxまたはy)であり、”X”で示される部分はlast_sig_coeff_Z_suffix(Zはxまたはy)である。ここで”X”は”1”または”0”である。例えばLASTが”3”の場合の符号量は、図12の可変長符号表Aを使用すると4bit、図28(1)の可変長符号表Bを使用すると4bit、図28(2)の可変長符号表Cを使用すると3bit、図28(3)の可変長符号表Dを使用すると3bit、図28(4)の可変長符号表Eを使用すると4bitである。 28 (1) to (4) are examples of variable length code tables that are effective when LAST is large (the code amount does not become so large). As in FIG. 12, the portion indicated by “1” and “0” is last_sig_coeff_Z_prefix (Z is x or y), and the portion indicated by “X” is last_sig_coeff_Z_suffix (Z is x or y). Here, “X” is “1” or “0”. For example, the code amount when LAST is “3” is 4 bits when using the variable length code table A of FIG. 12, 4 bits when using the variable length code table B of FIG. 28 (1), and the variable length of FIG. 28 (2). The code table C is 3 bits, the variable length code table D in FIG. 28 (3) is 3 bits, and the variable length code table E in FIG. 28 (4) is 4 bits.
 LASTが”7”の場合の符号量は、図12の可変長符号表Aを使用すると7bit、図28(1)の可変長符号表Bを使用すると6bit、図28(2)の可変長符号表Cを使用すると5bit、図28(3)の可変長符号表Dを使用すると4bit、図28(4)の可変長符号表Eを使用すると4bitである。 The code amount when LAST is “7” is 7 bits when using the variable length code table A in FIG. 12, 6 bits when using the variable length code table B in FIG. 28 (1), and the variable length code in FIG. 28 (2). If Table C is used, it will be 5 bits, if variable length code table D of FIG. 28 (3) is used, it will be 4 bits, and if variable length code table E of FIG. 28 (4) is used, it will be 4 bits.
 LASTが”15”の場合の符号量は、図12の可変長符号表Aを使用すると10bit、図28(1)の可変長符号表Bを使用すると8bit、図28(2)の可変長符号表Cを使用すると8bit、図28(3)の可変長符号表Dを使用すると6bit、図28(4)の可変長符号表Eを使用すると5bitである。 The code amount when LAST is “15” is 10 bits when using the variable length code table A of FIG. 12, 8 bits when using the variable length code table B of FIG. 28 (1), and the variable length code of FIG. 28 (2). If Table C is used, it will be 8 bits, if variable length code table D of FIG. 28 (3) is used, it will be 6 bits, and if variable length code table E of FIG. 28 (4) is used, it will be 5 bits.
 以上説明したように、大きなLASTが発生しやすい輝度成分のイントラ符号化では、図28(1)~(4)の可変長符号表のいずれかを使用し、それ以外の場合(インター符号化と色差成分のイントラ符号化)は図12の可変長符号表を使用して符号化することで、LASTの符号量を削減することができる。 As described above, in the intra coding of the luminance component in which a large LAST is likely to occur, one of the variable length code tables of FIGS. 28 (1) to (4) is used, and in other cases (inter coding and By encoding the color difference component using the variable length code table of FIG. 12, the amount of LAST code can be reduced.
 (変形例1)
 本願の実施形態4では、非ゼロ変換係数が高周波数領域に存在し、LASTの座標が大きくなる条件として輝度成分のイントラ符号化を挙げて説明した。変形例1では、非ゼロ変換係数が高周波数領域に存在し、LASTの座標が大きくなる条件に、CUサイズ(CUwidth:CUの幅、CUheight:CUの高さ)、量子化パラメータ(QP)に加え、LASTの符号化に使用する可変長符号表を切り替える方法を説明する。
(Modification 1)
In the fourth embodiment of the present application, the intra coding of the luminance component has been described as a condition that the non-zero transform coefficient exists in the high frequency region and the LAST coordinate becomes large. In the first modification, the CU size (CUwidth: CU width, CUheight: CU height) and quantization parameter (QP) are set under the condition that the non-zero transform coefficient exists in the high frequency region and the LAST coordinate becomes large. In addition, a method for switching the variable-length code table used for LAST encoding will be described.
 図29は、図12および図28の可変長符号表A~Eを用いた場合に、LASTの符号化に必要な符号量を示した表である。図29のAは図12、Bは図28(1)、Cは図28(2)、Dは図28(3)、Eは図28(4)の可変長符号表である。高周波数成分全体にわたってLASTが存在する場合は固定長符号化に近い可変長符号表Bがよい。特定の高周波数成分にLASTが集中する場合は、集中する場所によって可変長符号表C、D、Eを切替えることで、さらにLASTの符号量を削減することができる。例えば、高い周波数成分に非ゼロ変換係数が多数存在する場合は可変長符号表Eを使用する。 FIG. 29 is a table showing a code amount necessary for LAST encoding when the variable length code tables A to E of FIGS. 12 and 28 are used. 29A is a variable length code table of FIG. 12, B is a variable length code table of FIG. 28 (1), C is FIG. 28 (2), D is FIG. 28 (3), and E is FIG. When LAST exists over the entire high frequency component, a variable length code table B close to fixed length coding is preferable. When LAST concentrates on a specific high frequency component, the code amount of LAST can be further reduced by switching the variable-length code tables C, D, and E depending on the concentrated location. For example, when a large number of non-zero transform coefficients exist in high frequency components, the variable length code table E is used.
 図16に示すように、CU内の非ゼロ変換係数の個数は量子化パラメータやCUサイズに依存する。QP<=THQ1の場合、CUmin>=THC2では可変長符号表E(図28(4))を使用し、CUmax<=THC3では可変長符号表A(図12)を使用し、それ以外では可変長符号表D(図28(3))を使用する。QP>THQ1の場合、CUmin>=THC1では可変長符号表E(図28(4))を使用し、CUmax<=THC3では可変長符号表A(図12)を使用し、それ以外では可変長符号表D(図28(3))を使用する。ここでCUmax=max(CUwidth,CUheight)、CUmin=min(CUwidth,CUheight)である。図30(1)は輝度成分のイントラ符号化におけるTHQ1=22、THC1=64、THC2=32、THC3=4の例である。 As shown in FIG. 16, the number of non-zero transform coefficients in the CU depends on the quantization parameter and the CU size. When QP <= THQ1, variable length code table E (Fig. 28 (4)) is used when CUmin> = THC2, variable length code table A (Fig. 12) is used when CUmax <= THC3, otherwise variable The long code table D (FIG. 28 (3)) is used. When QP> THQ1, variable length code table E (Fig. 28 (4)) is used when CUmin> = THC1, variable length code table A (Fig. 12) is used when CUmax <= THC3, and variable length otherwise. Code table D (FIG. 28 (3)) is used. Here, CUmax = max (CUwidth, CUheight) and CUmin = min (CUwidth, CUheight). FIG. 30 (1) is an example of THQ1 = 22, THC1 = 64, THC2 = 32, and THC3 = 4 in the luminance component intra coding.
 別の一例として、QP<=THQ1の場合、CUmin>=THC1では可変長符号表D(図28(3))を使用し、それ以外は可変長符号表A(図12)を使用する。図30(2)に色差成分のイントラ符号化において、THQ1=22、THC1=16の例を示す。 As another example, when QP <= THQ1, CUmin> = THC1 uses variable-length code table D (FIG. 28 (3)), and otherwise uses variable-length code table A (FIG. 12). FIG. 30 (2) shows an example of THQ1 = 22 and THC1 = 16 in the intra coding of color difference components.
 別の一例として、QP<=THQ1の場合、CUmax<=THC1かつCUmin>=THC2では可変長符号表D(図28(3))を使用し、それ以外は可変長符号表A(図12)を使用する。図30(3)に輝度成分のインター符号化において、THQ1=22、THC1=64かつTHC2=32の例を示す。 As another example, when QP <= THQ1, variable length code table D (Fig. 28 (3)) is used when CUmax <= THC1 and CUmin> = THC2, otherwise variable length code table A (Fig. 12) Is used. FIG. 30 (3) shows an example in which THQ1 = 22, THC1 = 64, and THC2 = 32 in the luminance component inter-coding.
 上記では可変長符号表はA、D、Eを用いたが、D、Eに替えてB、Cを用いてもよい。 In the above, A, D, and E are used for the variable length code table, but B and C may be used instead of D and E.
 図31(1)は、量子化パラメータとCUサイズによって可変長符号表を決定し、LASTを符号化あるいは復号する処理を示すフローチャートである。S3101では、CU復号部1003は量子化パラメータとCUサイズを参照してLASTの符号化あるいは復号に使用する可変長符号表を決定する。S3102では、CU復号部1003は、S3101で決定した可変長符号表を用いてLASTを符号化あるいは復号する。ここでLASTの符号化処理は図14、復号処理は図13に示す処理と同じであり、説明を省略する。 FIG. 31 (1) is a flowchart showing a process of determining a variable length code table based on a quantization parameter and a CU size, and encoding or decoding LAST. In S3101, the CU decoding unit 1003 refers to the quantization parameter and the CU size to determine a variable length code table used for LAST encoding or decoding. In S3102, the CU decoding unit 1003 encodes or decodes LAST using the variable length code table determined in S3101. Here, the encoding process of LAST is the same as the process shown in FIG. 14 and the decoding process is the same as the process shown in FIG.
 以上説明したように、非ゼロ変換係数が高周波数領域に存在し、LASTの座標が大きくなる場合に、CUサイズ、量子化パラメータによってLASTの符号化に使用する可変長符号表を切り替えることにより、可変長符号表の特性を活かしてさらに符号量を削減することができる。 As described above, when the non-zero transform coefficient exists in the high frequency region and the LAST coordinate becomes large, by switching the variable length code table used for the LAST encoding according to the CU size and the quantization parameter, The code amount can be further reduced by taking advantage of the characteristics of the variable length code table.
 (変形例2)
 変形例1では、量子化パラメータとCUサイズによって使用する可変長符号表を切り替えた。変形例2では、スキャン方向によってLASTの符号化に使用する可変長符号表を切り替える方法を説明する。
(Modification 2)
In the first modification, the variable length code table to be used is switched depending on the quantization parameter and the CU size. In the second modification, a method for switching the variable length code table used for LAST encoding according to the scan direction will be described.
 図32にCUサイズが16x16の場合の、斜め方向スキャン、水平方向スキャン、垂直方向スキャンのスキャン順序(の逆順)を示す。水平および垂直方向スキャンでは、斜め方向スキャンに比べ、スキャン順序の早い段階でLASTの符号化に必要なビット数が増加する。図33(1)に図12の可変長符号表Aを用いた場合の斜め方向スキャンおよび水平/垂直方向スキャン時のLASTの符号量を示す。水平および垂直方向スキャンでは、スキャンの早い段階でLASTの符号量が大きくなることが分かる。図33(2)はLASTの符号化に用いる可変長符号として、水平方向スキャンでは水平方向は図28の可変長符号表を用い、垂直方向は図12の可変長符号表を用いる例、図33(3)は、垂直方向スキャンでは垂直方向は図28の可変長符号表を用い、水平方向は図12の可変長符号表を用いる例である。この場合のLASTの符号量を図33(4)に示す。図33(1)に示した図12の可変長符号表だけを用いた場合より、高周波数領域での符号量を削減することができることが分かる。 Fig. 32 shows the scan order (reverse order) of diagonal scan, horizontal scan, and vertical scan when the CU size is 16x16. In the horizontal and vertical scans, the number of bits required for LAST encoding increases at an earlier stage of the scan order than in the oblique scan. FIG. 33 (1) shows the code amount of LAST at the time of oblique scanning and horizontal / vertical scanning when the variable length code table A of FIG. 12 is used. In the horizontal and vertical scans, it can be seen that the code amount of LAST increases at an early stage of the scan. FIG. 33 (2) shows an example of using the variable length code table of FIG. 28 in the horizontal direction and the variable length code table of FIG. (3) is an example in which the variable length code table of FIG. 28 is used in the vertical direction and the variable length code table of FIG. 12 is used in the horizontal direction in the vertical scan. FIG. 33 (4) shows the code amount of LAST in this case. It can be seen that the code amount in the high frequency region can be reduced as compared with the case where only the variable length code table of FIG. 12 shown in FIG. 33 (1) is used.
 図31(2)は、スキャン方向によって可変長符号表を決定し、LASTを符号化あるいは復号する処理を示すフローチャートである。図31(1)との違いは、図31(1)のS3101が図31(2)ではS31011に変更されたことであり、その他の処理は同じであるため説明を省略する。S31011では、CU復号部1003はスキャン方向を参照してLASTの符号化あるいは復号に使用する可変長符号表を決定する。 FIG. 31 (2) is a flowchart showing a process of determining a variable length code table according to the scan direction and encoding or decoding LAST. The difference from FIG. 31 (1) is that S3101 in FIG. 31 (1) is changed to S31011 in FIG. 31 (2), and the other processes are the same, and thus the description thereof is omitted. In S31011, the CU decoding unit 1003 determines a variable length code table to be used for LAST encoding or decoding with reference to the scan direction.
 以上説明したように、非ゼロ変換係数が高周波数領域に存在し、LASTの座標が大きくなる場合に、スキャン方向によってLASTの符号化に使用する可変長符号表を切り替えることにより、可変長符号表の特性を活かしてさらに符号量を削減することができる。 As described above, when the non-zero transform coefficient exists in the high frequency region and the LAST coordinate becomes large, the variable length code table is switched by switching the variable length code table used for LAST encoding according to the scan direction. The amount of codes can be further reduced by taking advantage of the above characteristics.
 (変形例3)
 変形例3では、対象CUの隣接CUの非ゼロ変換係数の個数に応じて、LASTの符号化に使用する可変長符号表を切り替える方法を説明する。
(Modification 3)
In the third modification, a method of switching the variable-length code table used for LAST encoding according to the number of non-zero transform coefficients of adjacent CUs of the target CU will be described.
 図34に示す対象CU(CU_C)の上側の隣接CU(CU_A)、左側の隣接CU(CU_L)に含まれる非ゼロ変換係数の個数をNA、NLとし、対象CUの非ゼロ変換係数の推定値Nを導出する。対象CUがインター予測の場合、CU_AとCU_Lのいずれかがインター予測の場合、インター予測の隣接CUの非ゼロ変換係数の個数を対象CUの変換係数の個数Nとし、CU_A、CU_Lともにインター予測の場合、NAとNLの平均値をNとする。 The number of non-zero transform coefficients included in the upper adjacent CU (CU_A) and left adjacent CU (CU_L) of the target CU (CU_C) shown in FIG. 34 is NA and NL, and the estimated values of the non-zero transform coefficients of the target CU N is derived. When the target CU is inter-prediction, when either CU_A or CU_L is inter-prediction, the number of non-zero transform coefficients of adjacent CUs of inter prediction is the number of transform coefficients N of the target CU, and both CU_A and CU_L are inter-predicted. In this case, the average value of NA and NL is N.
 if (pred. mode of CU_C == “inter”) {
  if (pred. mode of CU_A == “inter” && pred. mode of CU_B == “inter”)
   N=(NA+NB)>>1
  else if (pred. mode of CU_A == “inter”)
   N=NA
  else
   N=NB
 }
 対象CUがイントラ予測の場合、CU_AとCU_Lのいずれかがイントラ予測の場合、イントラ予測の隣接CUの非ゼロ変換係数の個数を対象CUの変換係数の個数Nとし、CU_A、CU_Lともにイントラ予測の場合、NAとNLの平均値をNとする。
if (pred. mode of CU_C == “inter”) {
if (pred. mode of CU_A == “inter” && pred. mode of CU_B == “inter”)
N = (NA + NB) >> 1
else if (pred. mode of CU_A == “inter”)
N = NA
else
N = NB
}
When the target CU is intra prediction, if either CU_A or CU_L is intra prediction, the number of non-zero transform coefficients of adjacent CUs in the intra prediction is the number N of transform coefficients of the target CU, and both CU_A and CU_L In this case, the average value of NA and NL is N.
 if (pred. mode of CU_C == “intra”) {
  if (pred. mode of CU_A == “intra” && pred. mode of CU_B == “intra”)
   N=(NA+NB)>>1
  else if (pred. mode of CU_A == “intra”)
   N=NA
  else
   N=NB
 }
 あるいはCU_A、CU_B、CU_Cが全てイントラ予測の場合、CU_AとCU_Lのうち、イントラ予測方向がCU_Cのイントラ予測方向と近い方のCUの非ゼロ変換係数の個数を、対象CUの非ゼロ変換係数の推定値Nとしてもよい。
if (pred. mode of CU_C == “intra”) {
if (pred. mode of CU_A == “intra” && pred. mode of CU_B == “intra”)
N = (NA + NB) >> 1
else if (pred. mode of CU_A == “intra”)
N = NA
else
N = NB
}
Alternatively, when all of CU_A, CU_B, and CU_C are intra predictions, the number of non-zero conversion coefficients of the CU whose CU_A and CU_L have an intra prediction direction closer to the intra prediction direction of the CU_C The estimated value N may be used.
 if (pred. mode of CU_C == “intra”) {
  if (pred. mode of CU_A == “intra” && pred. mode of CU_B == “intra”) {
   if (diff(CU_C,CU_A)>=diff(CU_C,CU_B))
    N=NB
   else
    N=NA
   }
 }
ここで
 diff(A,B)=max(A,B)-min(A,B)
とする。
if (pred. mode of CU_C == “intra”) {
if (pred. mode of CU_A == “intra” && pred. mode of CU_B == “intra”) {
if (diff (CU_C, CU_A)> = diff (CU_C, CU_B))
N = NB
else
N = NA
}
}
Where diff (A, B) = max (A, B) -min (A, B)
And
 また、対象CUと隣接CUの大きさが異なる場合、非ゼロ変換係数の個数をスケーリングしてもよい。CU_A、CU_B、CU_Cの面積をAA、AB、ACとすると、まず下式によるスケーリングを施す。 Also, when the size of the target CU and the adjacent CU is different, the number of non-zero transform coefficients may be scaled. If the areas of CU_A, CU_B, and CU_C are AA, AB, and AC, scaling according to the following formula is performed first.
 NA=NA*AC/AA
 NB=NB*AC/AB
次に上述の説明に従って、対象CUの非ゼロ換係数の個数の推定値Nを導出する。推定値Nをもとに、対象CUで使用するLASTの可変長符号表を選択する。N<=TH1ならば図12の可変長符号表Aを用い、N>TH1ならば図28の可変長符号表Eを用いてLASTを符号化する。図35(1)はTH1=7の例である。あるいはN<=TH1ならば図12の可変長符号表Aを用い、TH1<N<=TH2ならば図28(3)の可変長符号表Dを用い、N>TH2ならば図28(4)の可変長符号表Eを用いてLASTを符号化してもよい。図35(2)はTH1=3、TH2=7の例である。
NA = NA * AC / AA
NB = NB * AC / AB
Next, an estimated value N of the number of non-zero conversion coefficients of the target CU is derived according to the above description. Based on the estimated value N, the LAST variable length code table used in the target CU is selected. If N <= TH1, the variable length code table A in FIG. 12 is used, and if N> TH1, the LAST is encoded using the variable length code table E in FIG. FIG. 35 (1) is an example of TH1 = 7. Alternatively, if N <= TH1, the variable-length code table A of FIG. 12 is used, if TH1 <N <= TH2, the variable-length code table D of FIG. 28 (3) is used, and if N> TH2, the variable-length code table D of FIG. 28 (4) is used. LAST may be encoded using the variable length code table E. FIG. 35 (2) is an example of TH1 = 3 and TH2 = 7.
 図31(3)は、対象CUの非ゼロ変換係数の個数の推定値によって可変長符号化表を決定し、LASTを符号化あるいは復号する処理を示すフローチャートである。図31(1)との違いは、図31(1)のS3101が図31(2)ではS31012に変更されたことであり、その他の処理は同じであるため説明を省略する。S31012では、CU復号部1003は、対象CUの非ゼロ変換係数の個数の推定値を参照してLASTの符号化あるいは復号に使用する可変長符号表を決定する。 FIG. 31 (3) is a flowchart showing a process of determining a variable-length coding table based on the estimated value of the number of non-zero transform coefficients of the target CU and coding or decoding LAST. The difference from FIG. 31 (1) is that S3101 in FIG. 31 (1) is changed to S31012 in FIG. 31 (2), and the other processes are the same, and the description thereof is omitted. In S31012, the CU decoding unit 1003 refers to the estimated value of the number of non-zero transform coefficients of the target CU to determine a variable length code table used for LAST encoding or decoding.
 以上説明したように、非ゼロ変換係数が高周波数領域に存在し、LASTの座標が大きくなる場合に、隣接CUの非ゼロ係数の個数によってLASTの符号化に使用する可変長符号表を切り替えることにより、可変長符号表の特性を活かしてさらに符号量を削減することができる。 As described above, when non-zero transform coefficients exist in the high frequency range and the LAST coordinates become large, the variable-length code table used for LAST encoding is switched depending on the number of non-zero coefficients of adjacent CUs. Thus, the code amount can be further reduced by taking advantage of the characteristics of the variable-length code table.
 本発明の一態様に係る画像符号化装置は、入力動画像の1画面を複数の画素からなる符号化単位(CU)に分割する手段と、前記CUを単位として所定の変換を行い変換係数を出力する手段と、前記変換係数を可変長符号化する可変長符号化手段とを備え、前記可変長符号化手段は、前記CUに非ゼロの変換係数が存在するか否かを示す第1のフラグの値を決定する手段と、前記CUの限定された領域(DC成分のみ、DC成分と第1のAC成分、あるいはDC成分と第1および第2のAC成分)内のみに非ゼロの変換係数が存在するか否かを示す第2のフラグの値を決定する手段と、CU内でDC成分からスキャン順に変換係数を走査して最も離れた位置(LAST)と非ゼロ係数値(LEVEL)を示すシンタックスを導出する手段と、符号化パラメータ(予測モード(イントラあるいはインター)、量子化パラメータ、CUサイズ)を参照して、前記第1のフラグと第2のフラグのいずれを可変長符号化するかを切替えて可変長符号化する手段と、前記第1のフラグを可変長符号化する場合に、CU内に非ゼロ変換係数が存在する場合は、LASTとLEVELを示すシンタックスを符号化する手段と、前記第2のフラグを可変長符号化する場合に、CUの限定された領域内のみに非ゼロ変換係数が存在する場合は、LEVELを示すシンタックスを符号化し、CUの限定された領域外に非ゼロ変換係数が存在する場合は、LASTとLEVELを示すシンタックスを符号化する手段とを備えることを特徴とする。 An image encoding apparatus according to an aspect of the present invention includes a unit that divides one screen of an input moving image into encoding units (CU) including a plurality of pixels, and performs a predetermined conversion using the CU as a unit to obtain a conversion coefficient. Means for outputting and variable length coding means for variable length coding the transform coefficient, wherein the variable length coding means indicates whether or not a non-zero transform coefficient exists in the CU. Means for determining the value of the flag and non-zero conversion only within a limited region of the CU (DC component only, DC component and first AC component, or DC component and first and second AC components) Means for determining the value of the second flag indicating whether or not a coefficient exists, and the most distant position (LAST) and non-zero coefficient value (LEVEL) by scanning the conversion coefficient from the DC component in the scan order in the CU Means for deriving the syntax indicating the encoding parameter (prediction mode (intra Or inter), quantization parameter, CU size), variable length encoding means by switching which one of the first flag and the second flag is variable length encoded, and the first When variable-length coding is performed on the flag, and there is a non-zero transform coefficient in the CU, means for encoding syntax indicating LAST and LEVEL, and variable-length coding of the second flag If the non-zero transform coefficient exists only in the limited region of CU, the LEVEL syntax is encoded.If the non-zero transform coefficient exists outside the limited region of CU, LAST and And a means for encoding a syntax indicating LEVEL.
 本発明の一態様に係る画像復号装置は、複数の画素からなる符号化単位(CU)を処理単位として符号化データを可変長復号してシンタックスを出力する手段と、シンタックスから変換係数を導出する手段とを備え、前記可変長復号手段は、符号化パラメータ(予測モード(イントラあるいはインター)、量子化パラメータ、CUサイズ)を参照して、前記CUに非ゼロの変換係数が存在するか否かを示す第1のフラグと、前記CUの限定された領域(DC成分のみ、DC成分と第1のAC成分、あるいはDC成分と第1および第2のAC成分)内のみに非ゼロの変換係数が存在するか否かを示す第2のフラグのいずれを可変長復号するかを切替えて可変長復号する手段と、前記第1のフラグを可変長復号し、前記第1のフラグがCU内に非ゼロ変換係数が存在することを示す場合は、さらにLASTとLEVELを示すシンタックスを可変長復号する手段と、前記第2のフラグを可変長復号し、CUの限定された領域内のみに非ゼロ変換係数が存在することを示す場合は、限定された領域内の最高周波数成分を示す位置をLASTにセットし、LEVELを示す可変長符号を復号し、CUの限定された領域外に非ゼロ変換係数が存在する場合は、LASTとLEVELを示すシンタックスを可変長復号する手段とを備えることを特徴とする。 An image decoding apparatus according to an aspect of the present invention includes a unit that performs variable length decoding of encoded data using a coding unit (CU) including a plurality of pixels as a processing unit and outputs a syntax, and a transform coefficient from the syntax. The variable length decoding means refers to a coding parameter (prediction mode (intra or inter), quantization parameter, CU size), and whether a non-zero transform coefficient exists in the CU. Non-zero only in the first flag indicating whether or not in a limited region of the CU (DC component only, DC component and first AC component, or DC component and first and second AC components) Means for variable length decoding by switching which of the second flags indicating whether or not a transform coefficient exists, variable length decoding; variable length decoding of the first flag; wherein the first flag is CU Must have nonzero transform coefficients In the case shown, means for variable-length decoding the syntax indicating LAST and LEVEL, and variable-length decoding the second flag, indicating that a non-zero transform coefficient exists only in a limited area of the CU. Set the position indicating the highest frequency component in the limited area to LAST, decode the variable length code indicating LEVEL, and if there is a non-zero transform coefficient outside the limited area of CU, LAST And means for variable-length decoding the syntax indicating LEVEL.
 本発明の一態様に係る画像符号化装置は、上記入力動画像の1画面を複数の画素からなる符号化単位(CU)に分割する手段と、前記CUを単位として所定の変換を行い変換係数を出力する手段と、前記変換係数を可変長符号化する可変長符号化手段とを備え、前記可変長符号化手段は、前記CUに非ゼロの変換係数が存在するか否かを示す第1のフラグの値を決定する手段と、前記第1のフラグを可変長符号化する手段と、CU内でDC成分からスキャン順に変換係数を走査して最も離れた位置(CUのLAST)と非ゼロ係数値(LEVEL)を示すシンタックスを導出する手段と、CUをサブブロックに分割する手段と、LASTが含まれるサブブロックの位置および前記サブブロック内のLASTの位置(サブブロックのLAST)を導出する手段と、前記第1のフラグがCU内の非ゼロ変換係数の存在を示す場合に、符号化パラメータ予測モード(イントラあるいはインター)、量子化パラメータ、CUサイズ)を参照して、CUのLASTとサブブロックのLASTのいずれを可変長符号化するかを切替えて可変長符号化する手段と、LEVELを示すシンタックスを符号化する手段とを備えることを特徴とする。 An image encoding apparatus according to an aspect of the present invention includes a unit that divides one screen of the input moving image into encoding units (CU) including a plurality of pixels, and performs a predetermined conversion using the CU as a unit to perform a conversion coefficient. And variable length coding means for variable length coding the transform coefficient, the variable length coding means indicates whether or not there is a non-zero transform coefficient in the CU. Means for determining the value of the first flag, means for variable-length coding the first flag, the farthest position (CU LAST) and the non-zero position in the CU by scanning the transform coefficient from the DC component in the scan order Means for deriving syntax indicating coefficient value (LEVEL), means for dividing CU into sub-blocks, position of sub-block including LAST, and position of LAST within sub-block (LAST of sub-block) And the first flag is non-zero in the CU. Whether to perform variable-length encoding of CU LAST or sub-block LAST with reference to encoding parameter prediction mode (intra or inter), quantization parameter, CU size) And a variable length coding means for switching and a means for coding a syntax indicating LEVEL.
 本発明の一態様に係る画像復号装置は、複数の画素からなる符号化単位(CU)を処理単位として符号化データを可変長復号してシンタックスを出力する手段と、シンタックスから変換係数を導出する手段とを備え、前記可変長復号手段は、前記CUに非ゼロの変換係数が存在するか否かを示す第1のフラグを復号する手段と、前記第1のフラグがCUの非ゼロ変換係数の存在を示す場合、符号化パラメータ予測モード(イントラあるいはインター)、量子化パラメータ、CUサイズ)を参照して、CUのLASTとサブブロックのLASTのいずれかを復号する手段と、サブブロックのLASTを復号した場合、CUのLASTを導出する手段と、LEVELを示すシンタックスを復号する手段とを備えることを特徴とする。 An image decoding apparatus according to an aspect of the present invention includes a unit that performs variable length decoding of encoded data using a coding unit (CU) including a plurality of pixels as a processing unit and outputs a syntax, and a transform coefficient from the syntax. Means for deriving, wherein the variable length decoding means decodes a first flag indicating whether or not a non-zero transform coefficient exists in the CU; and the first flag is a non-zero of the CU. A means for decoding one of LAST of CU and LAST of sub-block with reference to encoding parameter prediction mode (intra or inter), quantization parameter, CU size), and sub-block In the case of decoding LAST, a means for deriving LAST of CU and a means for decoding syntax indicating LEVEL are provided.
 本発明の一態様に係る画像符号化装置は、上記入力動画像の1画面を複数の画素からなる符号化単位(CU)に分割する手段と、前記CUを単位として所定の変換を行い変換係数を出力する手段と、前記変換係数を可変長符号化する可変長符号化手段とを備え、前記可変長符号化手段は、前記CUに非ゼロの変換係数が存在するか否かを示す第1のフラグの値を決定する手段と、前記第1のフラグを可変長符号化する手段と、CU内でDC成分からスキャン順に変換係数を走査して最も離れた位置(LAST)と非ゼロ係数値(LEVEL)を示すシンタックスを導出する手段と、前記第1のフラグがCU内の非ゼロ変換係数の存在を示す場合は、符号化パラメータ(予測モード(イントラあるいはインター)、量子化パラメータ、CUサイズ、隣接CUの非ゼロ係数の個数、スキャン方向)を参照して、LASTの符号化に用いる可変長符号表を切替えて可変長符号化する手段と、LEVELを示すシンタックスを符号化する手段とを備えることを特徴とする。 An image encoding apparatus according to an aspect of the present invention includes a unit that divides one screen of the input moving image into encoding units (CU) including a plurality of pixels, and performs a predetermined conversion using the CU as a unit to perform a conversion coefficient. And variable length coding means for variable length coding the transform coefficient, the variable length coding means indicates whether or not there is a non-zero transform coefficient in the CU. Means for determining the value of the flag, means for variable-length encoding the first flag, and the most distant position (LAST) and non-zero coefficient value by scanning the transform coefficient from the DC component in the scan order in the CU Means for deriving a syntax indicating (LEVEL), and when the first flag indicates the presence of a non-zero transform coefficient in the CU, the encoding parameter (prediction mode (intra or inter), quantization parameter, CU Size, number of non-zero coefficients of adjacent CUs, Referring to (scan direction), it comprises means for switching a variable length code table used for LAST encoding and variable length encoding, and means for encoding a syntax indicating LEVEL.
 本発明の一態様に係る画像復号装置は、複数の画素からなる符号化単位(CU)を処理単位として符号化データを可変長復号してシンタックスを出力する手段と、シンタックスから変換係数を導出する手段とを備え、前記可変長復号手段は、前記CUに非ゼロの変換係数が存在するか否かを示す第1のフラグを復号する手段と、前記第1のフラグがCUの非ゼロ変換係数の存在を示す場合、符号化パラメータ(予測モード(イントラあるいはインター)、量子化パラメータ、CUサイズ、隣接CUの非ゼロ係数の個数、スキャン方向)を参照して、LASTの復号に用いる可変長符号表を切替えて可変長復号する手段と、LEVELを示すシンタックスを復号する手段とを備えることを特徴とする。 An image decoding apparatus according to an aspect of the present invention includes a unit that performs variable length decoding of encoded data using a coding unit (CU) including a plurality of pixels as a processing unit and outputs a syntax, and a transform coefficient from the syntax. Means for deriving, wherein the variable length decoding means decodes a first flag indicating whether or not a non-zero transform coefficient exists in the CU; and the first flag is a non-zero of the CU. When indicating the presence of transform coefficients, refer to coding parameters (prediction mode (intra or inter), quantization parameter, CU size, number of non-zero coefficients of adjacent CUs, scan direction), and variable used for LAST decoding It is characterized by comprising means for variable length decoding by switching the long code table and means for decoding the syntax indicating LEVEL.
  (ソフトウェアによる実現例)
 なお、上述した実施形態における画像符号化装置11、画像復号装置31の一部、例えば、エントロピー復号部301、予測パラメータ復号部302、ループフィルタ305、予測画像生成部308、逆量子化・逆DCT部311、加算部312、予測画像生成部101、減算部102、DCT・量子化部103、エントロピー符号化部104、逆量子化・逆DCT部105、ループフィルタ107、符号化パラメータ決定部110、予測パラメータ符号化部111をコンピュータで実現するようにしても良い。その場合、この制御機能を実現するためのプログラムをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行することによって実現しても良い。なお、ここでいう「コンピュータシステム」とは、画像符号化装置11、画像復号装置31のいずれかに内蔵されたコンピュータシステムであって、OSや周辺機器等のハードウェアを含むものとする。また、「コンピュータ読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM、CD-ROM等の可搬媒体、コンピュータシステムに内蔵されるハードディスク等の記憶装置のことをいう。さらに「コンピュータ読み取り可能な記録媒体」とは、インターネット等のネットワークや電話回線等の通信回線を介してプログラムを送信する場合の通信線のように、短時間、動的にプログラムを保持するもの、その場合のサーバやクライアントとなるコンピュータシステム内部の揮発性メモリのように、一定時間プログラムを保持しているものも含んでも良い。また上記プログラムは、前述した機能の一部を実現するためのものであっても良く、さらに前述した機能をコンピュータシステムにすでに記録されているプログラムとの組み合わせで実現できるものであっても良い。
(Example of software implementation)
Note that a part of the image encoding device 11 and the image decoding device 31 in the above-described embodiment, for example, the entropy decoding unit 301, the prediction parameter decoding unit 302, the loop filter 305, the predicted image generation unit 308, the inverse quantization / inverse DCT. Unit 311, addition unit 312, predicted image generation unit 101, subtraction unit 102, DCT / quantization unit 103, entropy encoding unit 104, inverse quantization / inverse DCT unit 105, loop filter 107, encoding parameter determination unit 110, The prediction parameter encoding unit 111 may be realized by a computer. In that case, the program for realizing the control function may be recorded on a computer-readable recording medium, and the program recorded on the recording medium may be read by a computer system and executed. Here, the “computer system” is a computer system built in either the image encoding device 11 or the image decoding device 31 and includes hardware such as an OS and peripheral devices. The “computer-readable recording medium” refers to a storage device such as a portable medium such as a flexible disk, a magneto-optical disk, a ROM, a CD-ROM, or a hard disk built in a computer system. Furthermore, the “computer-readable recording medium” is a medium that dynamically holds a program for a short 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, In such a case, a volatile memory inside a computer system serving as a server or a client may be included and a program that holds a program for a certain period of time. The program may be a program for realizing a part of the functions described above, and may be a program capable of realizing the functions described above in combination with a program already recorded in a computer system.
 また、上述した実施形態における画像符号化装置11、画像復号装置31の一部、または全部を、LSI(Large Scale Integration)等の集積回路として実現しても良い。画像符号化装置11、画像復号装置31の各機能ブロックは個別にプロセッサ化しても良いし、一部、または全部を集積してプロセッサ化しても良い。また、集積回路化の手法はLSIに限らず専用回路、または汎用プロセッサで実現しても良い。また、半導体技術の進歩によりLSIに代替する集積回路化の技術が出現した場合、当該技術による集積回路を用いても良い。 Further, part or all of the image encoding device 11 and the image decoding device 31 in the above-described embodiment may be realized as an integrated circuit such as an LSI (Large Scale Integration). Each functional block of the image encoding device 11 and the image decoding device 31 may be individually made into a processor, or a part or all of them may be integrated into a processor. Further, the method of circuit integration is not limited to LSI, and may be realized by a dedicated circuit or a general-purpose processor. Further, in the case where an integrated circuit technology that replaces LSI appears due to progress in semiconductor technology, an integrated circuit based on the technology may be used.
  (応用例)
 上述した画像符号化装置11及び画像復号装置31は、動画像の送信、受信、記録、再生を行う各種装置に搭載して利用することができる。なお、動画像は、カメラ等により撮像された自然動画像であってもよいし、コンピュータ等により生成された人工動画像(CG及びGUIを含む)であってもよい。
(Application examples)
The image encoding device 11 and the image decoding device 31 described above can be used by being mounted on various devices that perform transmission, reception, recording, and reproduction of moving images. The moving image may be a natural moving image captured by a camera or the like, or may be an artificial moving image (including CG and GUI) generated by a computer or the like.
 まず、上述した画像符号化装置11及び画像復号装置31を、動画像の送信及び受信に利用できることを、図8を参照して説明する。 First, it will be described with reference to FIG. 8 that the above-described image encoding device 11 and image decoding device 31 can be used for transmission and reception of moving images.
 図8の(a)は、画像符号化装置11を搭載した送信装置PROD_Aの構成を示したブロック図である。図8の(a)に示すように、送信装置PROD_Aは、動画像を符号化することによって符号化データを得る符号化部PROD_A1と、符号化部PROD_A1が得た符号化データで搬送波を変調することによって変調信号を得る変調部PROD_A2と、変調部PROD_A2が得た変調信号を送信する送信部PROD_A3と、を備えている。上述した画像符号化装置11は、この符号化部PROD_A1として利用される。 (A) of FIG. 8 is a block diagram showing a configuration of a transmission device PROD_A in which the image encoding device 11 is mounted. As illustrated in FIG. 8A, the transmission apparatus PROD_A modulates a carrier wave with an encoding unit PROD_A1 that obtains encoded data by encoding a moving image, and with the encoded data obtained by the encoding unit PROD_A1. Thus, a modulation unit PROD_A2 that obtains a modulation signal and a transmission unit PROD_A3 that transmits the modulation signal obtained by the modulation unit PROD_A2 are provided. The above-described image encoding device 11 is used as the encoding unit PROD_A1.
 送信装置PROD_Aは、符号化部PROD_A1に入力する動画像の供給源として、動画像を撮像するカメラPROD_A4、動画像を記録した記録媒体PROD_A5、動画像を外部から入力するための入力端子PROD_A6、及び、画像を生成または加工する画像処理部A7を更に備えていてもよい。図8の(a)においては、これら全てを送信装置PROD_Aが備えた構成を例示しているが、一部を省略しても構わない。 Transmission device PROD_A, as a source of moving images to be input to the encoding unit PROD_A1, a camera PROD_A4 that captures moving images, a recording medium PROD_A5 that records moving images, an input terminal PROD_A6 for inputting moving images from the outside, and An image processing unit A7 that generates or processes an image may be further provided. FIG. 8A illustrates a configuration in which the transmission apparatus PROD_A includes all of these, but some of them may be omitted.
 なお、記録媒体PROD_A5は、符号化されていない動画像を記録したものであってもよいし、伝送用の符号化方式とは異なる記録用の符号化方式で符号化された動画像を記録したものであってもよい。後者の場合、記録媒体PROD_A5と符号化部PROD_A1との間に、記録媒体PROD_A5から読み出した符号化データを記録用の符号化方式に従って復号する復号部(不図示)を介在させるとよい。 Note that the recording medium PROD_A5 may be a recording of a non-encoded moving image, or a recording of a moving image encoded by a recording encoding scheme different from the transmission encoding scheme. It may be a thing. In the latter case, a decoding unit (not shown) for decoding the encoded data read from the recording medium PROD_A5 in accordance with the recording encoding method may be interposed between the recording medium PROD_A5 and the encoding unit PROD_A1.
 図8の(b)は、画像復号装置31を搭載した受信装置PROD_Bの構成を示したブロック図である。図8の(b)に示すように、受信装置PROD_Bは、変調信号を受信する受信部PROD_B1と、受信部PROD_B1が受信した変調信号を復調することによって符号化データを得る復調部PROD_B2と、復調部PROD_B2が得た符号化データを復号することによって動画像を得る復号部PROD_B3と、を備えている。上述した画像復号装置31は、この復号部PROD_B3として利用される。 (B) of FIG. 8 is a block diagram showing a configuration of a receiving device PROD_B in which the image decoding device 31 is mounted. As shown in FIG. 8B, the receiving device PROD_B includes a receiving unit PROD_B1 that receives the modulated signal, a demodulating unit PROD_B2 that obtains encoded data by demodulating the modulated signal received by the receiving unit PROD_B1, and a demodulator. A decoding unit PROD_B3 that obtains a moving image by decoding the encoded data obtained by the unit PROD_B2. The above-described image decoding device 31 is used as the decoding unit PROD_B3.
 受信装置PROD_Bは、復号部PROD_B3が出力する動画像の供給先として、動画像を表示するディスプレイPROD_B4、動画像を記録するための記録媒体PROD_B5、及び、動画像を外部に出力するための出力端子PROD_B6を更に備えていてもよい。図8の(b)においては、これら全てを受信装置PROD_Bが備えた構成を例示しているが、一部を省略しても構わない。 The receiving device PROD_B is a display destination PROD_B4 for displaying a moving image, a recording medium PROD_B5 for recording a moving image, and an output terminal for outputting the moving image to the outside as a supply destination of the moving image output by the decoding unit PROD_B3 PROD_B6 may be further provided. FIG. 8B illustrates a configuration in which all of these are provided in the receiving device PROD_B, but some of them may be omitted.
 なお、記録媒体PROD_B5は、符号化されていない動画像を記録するためのものであってもよいし、伝送用の符号化方式とは異なる記録用の符号化方式で符号化されたものであってもよい。後者の場合、復号部PROD_B3と記録媒体PROD_B5との間に、復号部PROD_B3から取得した動画像を記録用の符号化方式に従って符号化する符号化部(不図示)を介在させるとよい。 Note that the recording medium PROD_B5 may be used for recording a non-encoded moving image, or is encoded using a recording encoding method different from the transmission encoding method. May be. In the latter case, an encoding unit (not shown) for encoding the moving image acquired from the decoding unit PROD_B3 according to the recording encoding method may be interposed between the decoding unit PROD_B3 and the recording medium PROD_B5.
 なお、変調信号を伝送する伝送媒体は、無線であってもよいし、有線であってもよい。また、変調信号を伝送する伝送態様は、放送(ここでは、送信先が予め特定されていない送信態様を指す)であってもよいし、通信(ここでは、送信先が予め特定されている送信態様を指す)であってもよい。すなわち、変調信号の伝送は、無線放送、有線放送、無線通信、及び有線通信の何れによって実現してもよい。 Note that the transmission medium for transmitting the modulation signal may be wireless or wired. Further, the transmission mode for transmitting the modulated signal may be broadcasting (here, a transmission mode in which the transmission destination is not specified in advance) or communication (here, transmission in which the transmission destination is specified in advance). Refers to the embodiment). That is, the transmission of the modulation signal may be realized by any of wireless broadcasting, wired broadcasting, wireless communication, and wired communication.
 例えば、地上デジタル放送の放送局(放送設備など)/受信局(テレビジョン受像機など)は、変調信号を無線放送で送受信する送信装置PROD_A/受信装置PROD_Bの一例である。また、ケーブルテレビ放送の放送局(放送設備など)/受信局(テレビジョン受像機など)は、変調信号を有線放送で送受信する送信装置PROD_A/受信装置PROD_Bの一例である。 For example, a terrestrial digital broadcast broadcasting station (broadcasting equipment, etc.) / Receiving station (such as a television receiver) is an example of a transmitting device PROD_A / receiving device PROD_B that transmits and receives a modulated signal by wireless broadcasting. A broadcasting station (such as broadcasting equipment) / receiving station (such as a television receiver) of cable television broadcasting is an example of a transmitting device PROD_A / receiving device PROD_B that transmits and receives a modulated signal by cable broadcasting.
 また、インターネットを用いたVOD(Video On Demand)サービスや動画共有サービスなどのサーバ(ワークステーションなど)/クライアント(テレビジョン受像機、パーソナルコンピュータ、スマートフォンなど)は、変調信号を通信で送受信する送信装置PROD_A/受信装置PROD_Bの一例である(通常、LANにおいては伝送媒体として無線または有線の何れかが用いられ、WANにおいては伝送媒体として有線が用いられる)。ここで、パーソナルコンピュータには、デスクトップ型PC、ラップトップ型PC、及びタブレット型PCが含まれる。また、スマートフォンには、多機能携帯電話端末も含まれる。 In addition, a server (workstation, etc.) / Client (television receiver, personal computer, smartphone, etc.) such as a VOD (Video On Demand) service or a video sharing service using the Internet is a transmission device that transmits and receives modulated signals via communication. This is an example of PROD_A / receiving device PROD_B (normally, either a wireless or wired transmission medium is used in a LAN, and a wired transmission medium is used in a WAN). Here, the personal computer includes a desktop PC, a laptop PC, and a tablet PC. The smartphone also includes a multi-function mobile phone terminal.
 なお、動画共有サービスのクライアントは、サーバからダウンロードした符号化データを復号してディスプレイに表示する機能に加え、カメラで撮像した動画像を符号化してサーバにアップロードする機能を有している。すなわち、動画共有サービスのクライアントは、送信装置PROD_A及び受信装置PROD_Bの双方として機能する。 In addition to the function of decoding the encoded data downloaded from the server and displaying it on the display, the video sharing service client has a function of encoding a moving image captured by the camera and uploading it to the server. That is, the client of the video sharing service functions as both the transmission device PROD_A and the reception device PROD_B.
 次に、上述した画像符号化装置11及び画像復号装置31を、動画像の記録及び再生に利用できることを、図9を参照して説明する。 Next, the fact that the above-described image encoding device 11 and image decoding device 31 can be used for recording and reproduction of moving images will be described with reference to FIG.
 図9の(a)は、上述した画像符号化装置11を搭載した記録装置PROD_Cの構成を示したブロック図である。図9の(a)に示すように、記録装置PROD_Cは、動画像を符号化することによって符号化データを得る符号化部PROD_C1と、符号化部PROD_C1が得た符号化データを記録媒体PROD_Mに書き込む書込部PROD_C2と、を備えている。上述した画像符号化装置11は、この符号化部PROD_C1として利用される。 FIG. 9A is a block diagram showing a configuration of a recording apparatus PROD_C equipped with the image encoding device 11 described above. As shown in FIG. 9A, the recording apparatus PROD_C includes an encoding unit PROD_C1 that obtains encoded data by encoding a moving image, and the encoded data obtained by the encoding unit PROD_C1 on a recording medium PROD_M. A writing unit PROD_C2 for writing. The above-described image encoding device 11 is used as the encoding unit PROD_C1.
 なお、記録媒体PROD_Mは、(1)HDD(Hard Disk Drive)やSSD(Solid State Drive)などのように、記録装置PROD_Cに内蔵されるタイプのものであってもよいし、(2)SDメモリカードやUSB(Universal Serial Bus)フラッシュメモリなどのように、記録装置PROD_Cに接続されるタイプのものであってもよいし、(3)DVD(Digital Versatile Disc)やBD(Blu-ray Disc:登録商標)などのように、記録装置PROD_Cに内蔵されたドライブ装置(不図示)に装填されるものであってもよい。 The recording medium PROD_M may be of a type built into the recording device PROD_C, such as (1) HDD (Hard Disk Drive) or SSD (Solid State Drive), or (2) SD memory. It may be of the type connected to the recording device PROD_C, such as a card or USB (Universal Serial Bus) flash memory, or (3) DVD (Digital Versatile Disc) or BD (Blu-ray Disc: registration) Or a drive device (not shown) built in the recording device PROD_C.
 また、記録装置PROD_Cは、符号化部PROD_C1に入力する動画像の供給源として、動画像を撮像するカメラPROD_C3、動画像を外部から入力するための入力端子PROD_C4、動画像を受信するための受信部PROD_C5、及び、画像を生成または加工する画像処理部PROD_C6を更に備えていてもよい。図9の(a)においては、これら全てを記録装置PROD_Cが備えた構成を例示しているが、一部を省略しても構わない。 In addition, the recording device PROD_C is a camera PROD_C3 that captures moving images as a source of moving images to be input to the encoding unit PROD_C1, an input terminal PROD_C4 for inputting moving images from the outside, and a reception for receiving moving images A unit PROD_C5 and an image processing unit PROD_C6 for generating or processing an image may be further provided. FIG. 9A illustrates a configuration in which the recording apparatus PROD_C includes all of these, but some of them may be omitted.
 なお、受信部PROD_C5は、符号化されていない動画像を受信するものであってもよいし、記録用の符号化方式とは異なる伝送用の符号化方式で符号化された符号化データを受信するものであってもよい。後者の場合、受信部PROD_C5と符号化部PROD_C1との間に、伝送用の符号化方式で符号化された符号化データを復号する伝送用復号部(不図示)を介在させるとよい。 The receiving unit PROD_C5 may receive a non-encoded moving image, or may receive encoded data encoded by a transmission encoding scheme different from the recording encoding scheme. You may do. In the latter case, a transmission decoding unit (not shown) that decodes encoded data encoded by the transmission encoding method may be interposed between the reception unit PROD_C5 and the encoding unit PROD_C1.
 このような記録装置PROD_Cとしては、例えば、DVDレコーダ、BDレコーダ、HDD(Hard Disk Drive)レコーダなどが挙げられる(この場合、入力端子PROD_C4または受信部PROD_C5が動画像の主な供給源となる)。また、カムコーダ(この場合、カメラPROD_C3が動画像の主な供給源となる)、パーソナルコンピュータ(この場合、受信部PROD_C5または画像処理部C6が動画像の主な供給源となる)、スマートフォン(この場合、カメラPROD_C3または受信部PROD_C5が動画像の主な供給源となる)なども、このような記録装置PROD_Cの一例である。 Examples of such a recording device PROD_C include a DVD recorder, a BD recorder, an HDD (Hard Disk Drive) recorder, and the like (in this case, the input terminal PROD_C4 or the receiver PROD_C5 is a main source of moving images). . In addition, a camcorder (in this case, the camera PROD_C3 is a main source of moving images), a personal computer (in this case, the receiving unit PROD_C5 or the image processing unit C6 is a main source of moving images), a smartphone (this In this case, the camera PROD_C3 or the reception unit PROD_C5 is a main source of moving images), and the like is also an example of such a recording apparatus PROD_C.
 図9の(b)は、上述した画像復号装置31を搭載した再生装置PROD_Dの構成を示したブロックである。図9の(b)に示すように、再生装置PROD_Dは、記録媒体PROD_Mに書き込まれた符号化データを読み出す読出部PROD_D1と、読出部PROD_D1が読み出した符号化データを復号することによって動画像を得る復号部PROD_D2と、を備えている。上述した画像復号装置31は、この復号部PROD_D2として利用される。 (B) of FIG. 9 is a block showing a configuration of a playback device PROD_D in which the above-described image decoding device 31 is mounted. As shown in FIG. 9 (b), the playback device PROD_D reads a moving image by decoding a read unit PROD_D1 that reads encoded data written to the recording medium PROD_M and a read unit PROD_D1 that reads the encoded data. And a decoding unit PROD_D2 to obtain. The above-described image decoding device 31 is used as the decoding unit PROD_D2.
 なお、記録媒体PROD_Mは、(1)HDDやSSDなどのように、再生装置PROD_Dに内蔵されるタイプのものであってもよいし、(2)SDメモリカードやUSBフラッシュメモリなどのように、再生装置PROD_Dに接続されるタイプのものであってもよいし、(3)DVDやBDなどのように、再生装置PROD_Dに内蔵されたドライブ装置(不図示)に装填されるものであってもよい。 The recording medium PROD_M may be of the type built into the playback device PROD_D, such as (1) HDD or SSD, or (2) such as an SD memory card or USB flash memory. It may be of the type connected to the playback device PROD_D, or (3) may be loaded into a drive device (not shown) built in the playback device PROD_D, such as a DVD or BD. Good.
 また、再生装置PROD_Dは、復号部PROD_D2が出力する動画像の供給先として、動画像を表示するディスプレイPROD_D3、動画像を外部に出力するための出力端子PROD_D4、及び、動画像を送信する送信部PROD_D5を更に備えていてもよい。図9の(b)においては、これら全てを再生装置PROD_Dが備えた構成を例示しているが、一部を省略しても構わない。 In addition, the playback device PROD_D has a display unit PROD_D3 that displays a moving image as a supply destination of the moving image output by the decoding unit PROD_D2, an output terminal PROD_D4 that outputs the moving image to the outside, and a transmission unit that transmits the moving image. PROD_D5 may be further provided. FIG. 9B illustrates a configuration in which the playback apparatus PROD_D includes all of these, but some of them may be omitted.
 なお、送信部PROD_D5は、符号化されていない動画像を送信するものであってもよいし、記録用の符号化方式とは異なる伝送用の符号化方式で符号化された符号化データを送信するものであってもよい。後者の場合、復号部PROD_D2と送信部PROD_D5との間に、動画像を伝送用の符号化方式で符号化する符号化部(不図示)を介在させるとよい。 The transmission unit PROD_D5 may transmit a non-encoded moving image, or transmits encoded data encoded by a transmission encoding scheme different from the recording encoding scheme. You may do. In the latter case, it is preferable to interpose an encoding unit (not shown) that encodes a moving image using a transmission encoding method between the decoding unit PROD_D2 and the transmission unit PROD_D5.
 このような再生装置PROD_Dとしては、例えば、DVDプレイヤ、BDプレイヤ、HDDプレイヤなどが挙げられる(この場合、テレビジョン受像機等が接続される出力端子PROD_D4が動画像の主な供給先となる)。また、テレビジョン受像機(この場合、ディスプレイPROD_D3が動画像の主な供給先となる)、デジタルサイネージ(電子看板や電子掲示板等とも称され、ディスプレイPROD_D3または送信部PROD_D5が動画像の主な供給先となる)、デスクトップ型PC(この場合、出力端子PROD_D4または送信部PROD_D5が動画像の主な供給先となる)、ラップトップ型またはタブレット型PC(この場合、ディスプレイPROD_D3または送信部PROD_D5が動画像の主な供給先となる)、スマートフォン(この場合、ディスプレイPROD_D3または送信部PROD_D5が動画像の主な供給先となる)なども、このような再生装置PROD_Dの一例である。 Examples of such a playback device PROD_D include a DVD player, a BD player, and an HDD player (in this case, an output terminal PROD_D4 to which a television receiver or the like is connected is a main moving image supply destination). . In addition, a television receiver (in this case, the display PROD_D3 is a main supply destination of moving images), a digital signage (also referred to as an electronic signboard or an electronic bulletin board), and the display PROD_D3 or the transmission unit PROD_D5 is the main supply of moving images Desktop PC (in this case, output terminal PROD_D4 or transmission unit PROD_D5 is the main video source), laptop or tablet PC (in this case, display PROD_D3 or transmission unit PROD_D5 is video) A smartphone (which is a main image supply destination), a smartphone (in this case, the display PROD_D3 or the transmission unit PROD_D5 is a main moving image supply destination), and the like are also examples of such a playback device PROD_D.
  (ハードウェア的実現及びソフトウェア的実現)
 また、上述した画像復号装置31及び画像符号化装置11の各ブロックは、集積回路(ICチップ)上に形成された論理回路によってハードウェア的に実現してもよいし、CPU(Central Processing Unit)を用いてソフトウェア的に実現してもよい。
(Hardware implementation and software implementation)
Each block of the image decoding device 31 and the image encoding device 11 described above may be realized in hardware by a logic circuit formed on an integrated circuit (IC chip), or may be a CPU (Central Processing Unit). You may implement | achieve by software using.
 後者の場合、上記各装置は、各機能を実現するプログラムの命令を実行するCPU、上記プログラムを格納したROM(Read Only Memory)、上記プログラムを展開するRAM(RandomAccess Memory)、上記プログラム及び各種データを格納するメモリ等の記憶装置(記録媒体)などを備えている。そして、本発明の実施形態の目的は、上述した機能を実現するソフトウェアである上記各装置の制御プログラムのプログラムコード(実行形式プログラム、中間コードプログラム、ソースプログラム)をコンピュータで読み取り可能に記録した記録媒体を、上記各装置に供給し、そのコンピュータ(またはCPUやMPU)が記録媒体に記録されているプログラムコードを読み出し実行することによっても、達成可能である。 In the latter case, each of the above devices includes a CPU that executes instructions of a program that realizes each function, a ROM (Read Memory) that stores the program, a RAM (RandomAccess Memory) that expands the program, the program, and various data A storage device (recording medium) such as a memory for storing the. The object of the embodiment of the present invention is a record in which the program code (execution format program, intermediate code program, source program) of the control program for each of the above devices, which is software that realizes the above-described functions, is recorded in a computer-readable manner This can also be achieved by supplying a medium to each of the above devices, and reading and executing the program code recorded on the recording medium by the computer (or CPU or MPU).
 上記記録媒体としては、例えば、磁気テープやカセットテープ等のテープ類、フロッピー(登録商標)ディスク/ハードディスク等の磁気ディスクやCD-ROM(Compact Disc Read-Only Memory)/MOディスク(Magneto-Optical disc)/MD(Mini Disc)/DVD(Digital Versatile Disc)/CD-R(CD Recordable)/ブルーレイディスク(Blu-ray Disc:登録商標)等の光ディスクを含むディスク類、ICカード(メモリカードを含む)/光カード等のカード類、マスクROM/EPROM(Erasable Programmable Read-Only Memory)/EEPROM(Electrically Erasable and Programmable Read-Only Memory:登録商標)/フラッシュROM等の半導体メモリ類、あるいはPLD(Programmable logic device)やFPGA(Field Programmable Gate Array)等の論理回路類などを用いることができる。 Examples of the recording medium include tapes such as magnetic tapes and cassette tapes, magnetic disks such as floppy (registered trademark) disks / hard disks, CD-ROMs (Compact Disc Read-Only Memory) / MO discs (Magneto-Optical discs). ) / MD (Mini Disc) / DVD (Digital Versatile Disc) / CD-R (CD Recordable) / Blu-ray Disc (Blu-ray Disc: registered trademark) and other optical disks, IC cards (including memory cards) / Cards such as optical cards, Mask ROM / EPROM (Erasable Programmable Read-Only Memory) / EEPROM (Electrically Erasable and Programmable Read-Only Memory: registered trademark) / Semiconductor memories such as flash ROM, or PLD (Programmable logic device ) Or FPGA (Field Programmable Gate Gate Array) or the like.
 また、上記各装置を通信ネットワークと接続可能に構成し、上記プログラムコードを通信ネットワークを介して供給してもよい。この通信ネットワークは、プログラムコードを伝送可能であればよく、特に限定されない。例えば、インターネット、イントラネット、エキストラネット、LAN(Local Area Network)、ISDN(Integrated Services Digital Network)、VAN(Value-Added Network)、CATV(Community Antenna television/Cable Television)通信網、仮想専用網(Virtual Private Network)、電話回線網、移動体通信網、衛星通信網等が利用可能である。また、この通信ネットワークを構成する伝送媒体も、プログラムコードを伝送可能な媒体であればよく、特定の構成または種類のものに限定されない。例えば、IEEE(Institute of Electrical and Electronic Engineers)1394、USB、電力線搬送、ケーブルTV回線、電話線、ADSL(Asymmetric Digital Subscriber Line)回線等の有線でも、IrDA(Infrared Data Association)やリモコンのような赤外線、BlueTooth(登録商標)、IEEE802.11無線、HDR(High Data Rate)、NFC(Near Field Communication)、DLNA(Digital Living Network Alliance:登録商標)、携帯電話網、衛星回線、地上デジタル放送網等の無線でも利用可能である。なお、本発明の実施形態は、上記プログラムコードが電子的な伝送で具現化された、搬送波に埋め込まれたコンピュータデータ信号の形態でも実現され得る。 Further, each of the above devices may be configured to be connectable to a communication network, and the program code may be supplied via the communication network. The communication network is not particularly limited as long as it can transmit the program code. For example, Internet, intranet, extranet, LAN (Local Area Network), ISDN (Integrated Services Digital Network), VAN (Value-Added Network), CATV (Community Area Antenna / television / Cable Television), Virtual Private Network (Virtual Private Network) Network), telephone line network, mobile communication network, satellite communication network, and the like. The transmission medium constituting the communication network may be any medium that can transmit the program code, and is not limited to a specific configuration or type. For example, IEEE (Institute of Electrical and Electronic Engineers) 1394, USB, power line carrier, cable TV line, telephone line, ADSL (Asymmetric Digital Subscriber Line) line, etc. wired 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. It can also be used wirelessly. 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.
 本発明の実施形態は上述した実施形態に限定されるものではなく、請求項に示した範囲で種々の変更が可能であり、異なる実施形態にそれぞれ開示された技術的手段を適宜組み合わせて得られる実施形態についても本発明の技術的範囲に含まれる。さらに、各実施形態にそれぞれ開示された技術的手段を組み合わせることにより、新しい技術的特徴を形成することができる。 The embodiments of the present invention are not limited to the above-described embodiments, and various modifications are possible within the scope shown in the claims, and the embodiments can be obtained by appropriately combining technical means disclosed in different embodiments. Embodiments are also included in the technical scope of the present invention. Furthermore, a new technical feature can be formed by combining the technical means disclosed in each embodiment.
 (関連出願の相互参照)
 本出願は、2017年3月3日に出願された日本国特許出願:特願2017-040322に対して優先権の利益を主張するものであり、それを参照することにより、その内容の全てが本書に含まれる。
(Cross-reference of related applications)
This application claims the benefit of priority over Japanese patent application: Japanese Patent Application No. 2017-040322 filed on March 3, 2017, and all of its contents are referred to Included in this document.
 本発明の実施形態は、画像データが符号化された符号化データを復号する画像復号装置、及び、画像データが符号化された符号化データを生成する画像符号化装置に好適に適用することができる。また、画像符号化装置によって生成され、画像復号装置によって参照される符号化データのデータ構造に好適に適用することができる。 Embodiments of the present invention are preferably applied to an image decoding apparatus that decodes encoded data in which image data is encoded, and an image encoding apparatus that generates encoded data in which image data is encoded. it can. Further, the present invention can be suitably applied to the data structure of encoded data generated by an image encoding device and referenced by the image decoding device.
10 CT情報復号部
11 画像符号化装置
20 CU復号部
31 画像復号装置
41 画像表示装置
10 CT information decoding unit 11 Image encoding device 20 CU decoding unit 31 Image decoding device 41 Image display device

Claims (11)

  1.  入力動画像を符号化する動画像符号化装置において、
     上記入力動画像の1画面を複数の画素からなる符号化単位(CU)に分割する分割部と、
     前記CUを単位として所定の変換を行い変換係数を出力する出力部と、
     前記変換係数を可変長符号化する可変長符号化部とを備え、
     前記可変長符号化部は、
     前記CUに非ゼロの変換係数が存在するか否かを示す第1のフラグの値を決定する第1の決定部と、前記CUの限定された領域内のみに非ゼロの変換係数が存在するか否かを示す第2のフラグの値を決定する第2の決定部と、
     CU内でDC成分からスキャン順に変換係数を走査して最も離れた位置(LAST)と非ゼロ係数値(LEVEL)を示すシンタックスを導出する導出部と、
     符号化パラメータを参照して、前記第1のフラグと第2のフラグのいずれを可変長符号化するかを切替えて可変長符号化する第1の符号化部と、
     前記第1のフラグを可変長符号化する場合に、CU内に非ゼロ変換係数が存在する場合は、LASTとLEVELを示すシンタックスを符号化する第2の符号化部と、
     前記第2のフラグを可変長符号化する場合に、CUの限定された領域内のみに非ゼロ変換係数が存在する場合は、LEVELを示すシンタックスを符号化し、CUの限定された領域外に非ゼロ変換係数が存在する場合は、LASTとLEVELを示すシンタックスを符号化する第3の符号化部とを備えることを特徴とする動画像符号化装置。
    In a video encoding device that encodes an input video,
    A dividing unit that divides one screen of the input moving image into coding units (CU) including a plurality of pixels;
    An output unit that performs a predetermined conversion in units of the CU and outputs a conversion coefficient;
    A variable length coding unit for variable length coding the transform coefficient,
    The variable length encoding unit includes:
    A first determination unit that determines a value of a first flag indicating whether or not a non-zero transform coefficient exists in the CU; and a non-zero transform coefficient exists only in a limited region of the CU. A second determination unit for determining a value of a second flag indicating whether or not
    A derivation unit for deriving a syntax indicating a farthest position (LAST) and a non-zero coefficient value (LEVEL) by scanning conversion coefficients from the DC component in the scan order in the CU;
    A first encoding unit that refers to an encoding parameter and performs variable length encoding by switching which of the first flag and the second flag is variable length encoded;
    When the first flag is variable length encoded, if there is a non-zero transform coefficient in the CU, a second encoding unit that encodes syntax indicating LAST and LEVEL;
    When the second flag is variable-length encoded, if a non-zero transform coefficient exists only in a limited area of the CU, the syntax indicating LEVEL is encoded, and is outside the limited area of the CU. A moving image encoding apparatus comprising: a third encoding unit that encodes a syntax indicating LAST and LEVEL when a non-zero transform coefficient exists.
  2.  動画像を復号する動画像復号装置において、
     可変長復号部と、
     複数の画素からなる符号化単位(CU)を処理単位として符号化データを可変長復号してシンタックスを出力する出力部と、
     シンタックスから変換係数を導出する導出部とを備え、
     前記可変長復号部は、
     符号化パラメータを参照して、前記CUに非ゼロの変換係数が存在するか否かを示す第1のフラグと、前記CUの限定された領域内のみに非ゼロの変換係数が存在するか否かを示す第2のフラグのいずれを可変長復号するかを切替えて可変長復号する第1の復号部と、
     前記第1のフラグを可変長復号し、前記第1のフラグがCU内に非ゼロ変換係数が存在することを示す場合は、さらにLASTとLEVELを示すシンタックスを可変長復号する第2の復号部と、
     前記第2のフラグを可変長復号し、CUの限定された領域内のみに非ゼロ変換係数が存在することを示す場合は、限定された領域内の最高周波数成分を示す位置をLASTにセットし、LEVELを示す可変長符号を復号し、CUの限定された領域外に非ゼロ変換係数が存在する場合は、LASTとLEVELを示すシンタックスを可変長復号する第3の復号部とを備えることを特徴とする動画像復号装置。
    In a video decoding device for decoding a video,
    A variable length decoding unit;
    An output unit that performs variable-length decoding of encoded data using a coding unit (CU) composed of a plurality of pixels as a processing unit, and outputs a syntax;
    A derivation unit for deriving a transform coefficient from the syntax,
    The variable length decoding unit includes:
    A first flag indicating whether or not a non-zero transform coefficient exists in the CU with reference to an encoding parameter, and whether or not a non-zero transform coefficient exists only in a limited area of the CU. A first decoding unit that performs variable length decoding by switching which of the second flags to indicate variable length decoding;
    Second decoding for variable-length decoding the syntax indicating LAST and LEVEL when the first flag indicates variable-length decoding and the first flag indicates that a non-zero transform coefficient exists in the CU And
    If the second flag is variable-length decoded and indicates that a non-zero transform coefficient exists only in a limited area of the CU, the position indicating the highest frequency component in the limited area is set to LAST. And a third decoding unit that decodes the variable length code indicating LEVEL and variable length decoding the syntax indicating LAST when there is a non-zero transform coefficient outside the limited region of the CU. A video decoding apparatus characterized by the above.
  3.  前記CUの限定された領域は変換係数のDC成分の位置であることを特徴とする、請求項1あるいは2に記載の動画像符号化装置あるいは動画像復号装置。 The moving picture encoding apparatus or moving picture decoding apparatus according to claim 1 or 2, wherein the limited region of the CU is a position of a DC component of a transform coefficient.
  4.  前記CUの限定された領域は変換係数のDC成分および第1のAC成分の位置であることを特徴とする、請求項1あるいは2に記載の動画像符号化装置あるいは動画像復号装置。 The moving picture encoding apparatus or moving picture decoding apparatus according to claim 1 or 2, wherein the limited region of the CU is a position of a DC component and a first AC component of a transform coefficient.
  5.  前記符号化パラメータは予測モード(イントラあるいはインター)、量子化パラメータ、CUサイズのいずれかであることを特徴とする、請求項1あるいは2に記載の動画像符号化装置あるいは動画像復号装置。 3. The moving picture coding apparatus or moving picture decoding apparatus according to claim 1, wherein the coding parameter is one of a prediction mode (intra or inter), a quantization parameter, and a CU size.
  6.  入力動画像を符号化する動画像符号化装置において、
     上記入力動画像の1画面を複数の画素からなる符号化単位(CU)に分割する分割部と、
     前記CUを単位として所定の変換を行い変換係数を出力する出力部と、
     前記変換係数を可変長符号化する可変長符号化部とを備え、
     前記可変長符号化部は、
     前記CUに非ゼロの変換係数が存在するか否かを示す第1のフラグの値を決定する決定部と、
     前記第1のフラグを可変長符号化する第1の符号化部と、
     CU内でDC成分からスキャン順に変換係数を走査して最も離れた位置(CUのLAST)と非ゼロ係数値(LEVEL)を示すシンタックスを導出する第1の導出部と、
     CUをサブブロックに分割する分割部と、
     LASTが含まれるサブブロックの位置および前記サブブロック内のLASTの位置(サブブロックのLAST)を導出する第2の導出部と、
     前記第1のフラグがCU内の非ゼロ変換係数の存在を示す場合に、符号化パラメータを参照して、CUのLASTとサブブロックのLASTのいずれを可変長符号化するかを切替えて可変長符号化する第2の符号化部と、
     LEVELを示すシンタックスを符号化する第3の符号化部とを備えることを特徴とする動画像符号化装置。
    In a video encoding device that encodes an input video,
    A dividing unit that divides one screen of the input moving image into coding units (CU) including a plurality of pixels;
    An output unit that performs a predetermined conversion in units of the CU and outputs a conversion coefficient;
    A variable length coding unit for variable length coding the transform coefficient,
    The variable length encoding unit includes:
    A determination unit for determining a value of a first flag indicating whether or not a non-zero conversion coefficient exists in the CU;
    A first encoding unit for variable-length encoding the first flag;
    A first deriving unit for deriving a syntax indicating a farthest position (LAST of CU) and a non-zero coefficient value (LEVEL) by scanning conversion coefficients from the DC component in the scan order in the CU;
    A dividing unit for dividing the CU into sub-blocks;
    A second derivation unit for deriving a position of a subblock including LAST and a position of LAST in the subblock (LAST of the subblock);
    If the first flag indicates the presence of a non-zero transform coefficient in the CU, refer to the encoding parameter and switch between CU LAST and sub-block LAST variable-length encoding. A second encoding unit for encoding;
    And a third encoding unit that encodes syntax indicating LEVEL.
  7.  動画像を復号する動画像復号装置において、
     可変長復号部と、
     複数の画素からなる符号化単位(CU)を処理単位として符号化データを可変長復号してシンタックスを出力する出力部と、
     シンタックスから変換係数を導出する導出部とを備え、
     前記可変長復号部は、
     前記CUに非ゼロの変換係数が存在するか否かを示す第1のフラグを復号する第1の復号部と、
     前記第1のフラグがCUの非ゼロ変換係数の存在を示す場合、符号化パラメータを参照して、CUのLASTとサブブロックのLASTのいずれかを復号する第2の復号部と、
     サブブロックのLASTを復号した場合、CUのLASTを導出する導出部と、
     LEVELを示すシンタックスを復号する第3の復号部とを備えることを特徴とする動画像復号装置。
    In a video decoding device for decoding a video,
    A variable length decoding unit;
    An output unit that performs variable-length decoding of encoded data using a coding unit (CU) composed of a plurality of pixels as a processing unit, and outputs a syntax;
    A derivation unit for deriving a transform coefficient from the syntax,
    The variable length decoding unit includes:
    A first decoding unit for decoding a first flag indicating whether or not non-zero transform coefficients exist in the CU;
    If the first flag indicates the presence of a non-zero transform coefficient of the CU, a second decoding unit that decodes either the LAST of the CU or the LAST of the sub-block with reference to an encoding parameter;
    When the LAST of the sub-block is decoded, a derivation unit for deriving the LAST of the CU,
    And a third decoding unit for decoding a syntax indicating LEVEL.
  8.  前記符号化パラメータは予測モード(イントラあるいはインター)、量子化パラメータ、CUサイズのいずれかであることを特徴とする、請求項6あるいは7に記載の動画像符号化装置あるいは動画像復号装置。 8. The moving picture coding apparatus or moving picture decoding apparatus according to claim 6, wherein the coding parameter is one of a prediction mode (intra or inter), a quantization parameter, and a CU size.
  9.  入力動画像を符号化する動画像符号化装置において、
     上記入力動画像の1画面を複数の画素からなる符号化単位(CU)に分割する分割部と、
     前記CUを単位として所定の変換を行い変換係数を出力する出力部と、
     前記変換係数を可変長符号化する可変長符号化部とを備え、
     前記可変長符号化部は、
     前記CUに非ゼロの変換係数が存在するか否かを示す第1のフラグの値を決定する決定部と、
     前記第1のフラグを可変長符号化する第1の符号化部と、
     CU内でDC成分からスキャン順に変換係数を走査して最も離れた位置(LAST)と非ゼロ係数値(LEVEL)を示すシンタックスを導出する導出部と、
     前記第1のフラグがCU内の非ゼロ変換係数の存在を示す場合は、符号化パラメータを参照して、LASTの符号化に用いる可変長符号表を切替えて可変長符号化する第2の符号化部と、
     LEVELを示すシンタックスを符号化する第3の符号化部とを備えることを特徴とする動画像符号化装置。
    In a video encoding device that encodes an input video,
    A dividing unit that divides one screen of the input moving image into coding units (CU) including a plurality of pixels;
    An output unit that performs a predetermined conversion in units of the CU and outputs a conversion coefficient;
    A variable length coding unit for variable length coding the transform coefficient,
    The variable length encoding unit includes:
    A determination unit for determining a value of a first flag indicating whether or not a non-zero conversion coefficient exists in the CU;
    A first encoding unit for variable-length encoding the first flag;
    A derivation unit for deriving a syntax indicating a farthest position (LAST) and a non-zero coefficient value (LEVEL) by scanning conversion coefficients from the DC component in the scan order in the CU;
    When the first flag indicates the presence of a non-zero transform coefficient in the CU, a second code that performs variable length coding by switching a variable length code table used for LAST coding with reference to a coding parameter And
    And a third encoding unit that encodes syntax indicating LEVEL.
  10.  動画像を復号する動画像復号装置において、
     可変長復号部と、
     複数の画素からなる符号化単位(CU)を処理単位として符号化データを可変長復号してシンタックスを出力する出力部と、
     シンタックスから変換係数を導出する導出部とを備え、
     前記可変長復号部は、
     前記CUに非ゼロの変換係数が存在するか否かを示す第1のフラグを復号する第1の復号部と、
     前記第1のフラグがCUの非ゼロ変換係数の存在を示す場合、符号化パラメータを参照して、LASTの復号に用いる可変長符号表を切替えて可変長復号する第2の復号部と、
     LEVELを示すシンタックスを復号する第3の復号部とを備えることを特徴とする動画像復号装置。
    In a video decoding device for decoding a video,
    A variable length decoding unit;
    An output unit that performs variable-length decoding of encoded data using a coding unit (CU) composed of a plurality of pixels as a processing unit, and outputs a syntax;
    A derivation unit for deriving a transform coefficient from the syntax,
    The variable length decoding unit includes:
    A first decoding unit for decoding a first flag indicating whether or not non-zero transform coefficients exist in the CU;
    When the first flag indicates the presence of a non-zero transform coefficient of the CU, a second decoding unit that performs variable-length decoding by switching a variable-length code table used for decoding LAST with reference to an encoding parameter;
    And a third decoding unit for decoding a syntax indicating LEVEL.
  11.  前記符号化パラメータは予測モード(イントラあるいはインター)、量子化パラメータ、CUサイズ、隣接CUの非ゼロ係数の個数、スキャン方向のいずれかであることを特徴とする、請求項9あるいは10に記載の動画像符号化装置あるいは動画像復号装置。 The encoding parameter according to claim 9 or 10, wherein the encoding parameter is any one of a prediction mode (intra or inter), a quantization parameter, a CU size, the number of non-zero coefficients of adjacent CUs, and a scan direction. A video encoding device or a video decoding device.
PCT/JP2018/006937 2017-03-03 2018-02-26 Moving picture coding device and moving picture decoding device WO2018159526A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2017040322A JP2020072277A (en) 2017-03-03 2017-03-03 Video encoding device and video decoding device
JP2017-040322 2017-03-03

Publications (1)

Publication Number Publication Date
WO2018159526A1 true WO2018159526A1 (en) 2018-09-07

Family

ID=63370019

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2018/006937 WO2018159526A1 (en) 2017-03-03 2018-02-26 Moving picture coding device and moving picture decoding device

Country Status (2)

Country Link
JP (1) JP2020072277A (en)
WO (1) WO2018159526A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112753221A (en) * 2018-09-28 2021-05-04 松下电器(美国)知识产权公司 Encoding device, decoding device, encoding method, and decoding method
CN113039794A (en) * 2018-11-16 2021-06-25 索尼集团公司 Image processing apparatus and method
CN113196776A (en) * 2018-12-20 2021-07-30 夏普株式会社 Predictive image generation device, moving image decoding device, moving image encoding device, and predictive image generation method
CN114979641A (en) * 2021-02-21 2022-08-30 腾讯科技(深圳)有限公司 Video encoding and decoding method and device, computer readable medium and electronic equipment

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP4088465A4 (en) * 2020-02-04 2023-11-29 Huawei Technologies Co., Ltd. An encoder, a decoder and corresponding methods about signaling high level syntax

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013098988A (en) * 2011-11-01 2013-05-20 Research In Motion Ltd Multi-level validity map for encoding and decoding
WO2013099892A1 (en) * 2011-12-28 2013-07-04 シャープ株式会社 Arithmetic decoding device, image decoding device, and arithmetic encoding device
US20160080749A1 (en) * 2013-01-16 2016-03-17 Blackberry Limited Transform coefficient coding for context-adaptive binary entropy coding of video

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013098988A (en) * 2011-11-01 2013-05-20 Research In Motion Ltd Multi-level validity map for encoding and decoding
WO2013099892A1 (en) * 2011-12-28 2013-07-04 シャープ株式会社 Arithmetic decoding device, image decoding device, and arithmetic encoding device
US20160080749A1 (en) * 2013-01-16 2016-03-17 Blackberry Limited Transform coefficient coding for context-adaptive binary entropy coding of video

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
BENJAMIN, B. ET AL.: "High efficiency video coding(HEVC) text specification draft 7", JOINT COLLABORATIVE TEAM ON VIDEO CODING(JCT-VC) OF ITU- T SG 16 WP3 AND ISO/IEC JTCL/SC29/WG119TH MEETING, 27 April 2012 (2012-04-27), Geneva, Switzerland, pages 88 - 91 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112753221A (en) * 2018-09-28 2021-05-04 松下电器(美国)知识产权公司 Encoding device, decoding device, encoding method, and decoding method
CN112753221B (en) * 2018-09-28 2024-04-05 松下电器(美国)知识产权公司 Encoding device, decoding device, encoding method, and decoding method
CN113039794A (en) * 2018-11-16 2021-06-25 索尼集团公司 Image processing apparatus and method
CN113039794B (en) * 2018-11-16 2024-05-24 索尼集团公司 Image processing apparatus and method
CN113196776A (en) * 2018-12-20 2021-07-30 夏普株式会社 Predictive image generation device, moving image decoding device, moving image encoding device, and predictive image generation method
CN113196776B (en) * 2018-12-20 2023-12-19 夏普株式会社 Predictive image generation device, moving image decoding device, moving image encoding device, and predictive image generation method
CN114979641A (en) * 2021-02-21 2022-08-30 腾讯科技(深圳)有限公司 Video encoding and decoding method and device, computer readable medium and electronic equipment

Also Published As

Publication number Publication date
JP2020072277A (en) 2020-05-07

Similar Documents

Publication Publication Date Title
JP7223886B2 (en) Image decoding method
WO2018037853A1 (en) Image decoding apparatus and image coding apparatus
WO2018116925A1 (en) Intra prediction image generating device, image decoding device, and image coding device
WO2018199001A1 (en) Image decoding device and image coding device
WO2018116802A1 (en) Image decoding device, image coding device, and image predicting device
WO2018221368A1 (en) Moving image decoding device, and moving image encoding device
JP2021010046A (en) Image encoding device and image decoding device
EP3557873B1 (en) Image decoding device and image encoding device
WO2018037896A1 (en) Image decoding apparatus, image encoding apparatus, image decoding method, and image encoding method
WO2019221072A1 (en) Image encoding device, encoded stream extraction device, and image decoding device
WO2018159526A1 (en) Moving picture coding device and moving picture decoding device
WO2018110203A1 (en) Moving image decoding apparatus and moving image encoding apparatus
JPWO2019031410A1 (en) Image filter device, image decoding device, and image encoding device
JP7241153B2 (en) image decoding device
WO2018199002A1 (en) Moving picture encoding device and moving picture decoding device
WO2018216688A1 (en) Video encoding device, video decoding device, and filter device
JP2019201255A (en) Image filter device, image decoding device, and image encoding device
WO2019230904A1 (en) Image decoding device and image encoding device
WO2018143289A1 (en) Image encoding device and image decoding device
JP2019201256A (en) Image filter device
WO2019131349A1 (en) Image decoding device and image coding device
WO2018061550A1 (en) Image decoding device and image coding device
WO2018173862A1 (en) Image decoding device and image coding device
JP2020036101A (en) Image decoder, and image encoder
WO2020004277A1 (en) Image decoding device and image coding device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18760461

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18760461

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: JP