WO2019131400A1 - Image filter device, image decoding device, and image encoding device - Google Patents

Image filter device, image decoding device, and image encoding device Download PDF

Info

Publication number
WO2019131400A1
WO2019131400A1 PCT/JP2018/046859 JP2018046859W WO2019131400A1 WO 2019131400 A1 WO2019131400 A1 WO 2019131400A1 JP 2018046859 W JP2018046859 W JP 2018046859W WO 2019131400 A1 WO2019131400 A1 WO 2019131400A1
Authority
WO
WIPO (PCT)
Prior art keywords
filter
image
pixel
unit
boundary
Prior art date
Application number
PCT/JP2018/046859
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 WO2019131400A1 publication Critical patent/WO2019131400A1/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/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/80Details of filtering operations specially adapted for video compression, e.g. for pixel interpolation
    • H04N19/82Details of filtering operations specially adapted for video compression, e.g. for pixel interpolation involving filtering within a prediction loop

Definitions

  • Embodiments of the present invention relate to an image filter device, an image decoding device, and an image coding device.
  • a moving picture coding apparatus that generates coded data by coding a moving picture to efficiently transmit or record a moving picture, and a moving picture that generates a decoded picture by decoding the coded data.
  • An image decoding device is used.
  • HEVC High-Efficiency Video Coding
  • an image (picture) constituting a moving picture is a slice obtained by dividing the image, a coding unit obtained by dividing the slice (coding unit (coding unit (Coding Unit)).
  • coding unit Coding unit
  • CU coding unit
  • PU prediction unit
  • TU transform unit
  • a predicted picture is usually generated based on a locally decoded picture obtained by coding / decoding an input picture, and the predicted picture is generated from the input picture (original picture).
  • the prediction residual obtained by subtraction (sometimes referred to as "difference image” or "residual image") is encoded.
  • inter prediction inter prediction
  • intra-screen prediction intra prediction
  • Non-Patent Document 1 can be cited as a technology for moving picture encoding and decoding in recent years.
  • the present invention has been made in view of the above problems, and an object thereof is to realize application of a filter according to an image characteristic to input image data as compared with a conventional configuration.
  • an image filter device is an image filter device that generates an output image by acting on an input image composed of a plurality of basic unit regions, and the basic unit region And an adaptive filter unit, wherein the boundary filter unit is capable of turning on and off the boundary filter of the slice boundary or the tile boundary, and the adaptive filter unit includes the boundary filter unit.
  • Different virtual boundaries are set depending on whether the filtering process by the boundary filter unit is on or off at slice boundaries or tile boundaries, and filtering is performed with reference to pixel values located within the virtual boundaries. I do.
  • the image filter device concerning the present invention is provided with the filter part which generates an output picture by acting on an input image, and the object pixel in the above-mentioned input picture is processed by the filter processing by the above-mentioned filter part. And a process of multiplying each of the pixels around the target pixel and the activity calculated by referring to at least a part of the surrounding pixels by a weighting factor.
  • a filter according to image characteristics can be applied to input image data.
  • FIG. 1 It is a figure which shows the hierarchical structure of the data of the encoding stream which concerns on 1st Embodiment. It is a figure which shows the pattern of PU split mode. (A) to (h) show the partition shapes when the PU division mode is 2Nx2N, 2NxN, 2NxnU, 2NxnD, Nx2N, nLx2N, nRx2N, and NxN, respectively. 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 coding apparatus which concerns on 1st Embodiment. It is the schematic which shows the structure of the image decoding apparatus which concerns on 1st Embodiment.
  • the filter coefficients derived by the adaptive filter 305_2 are visualized in class units.
  • (A) is a figure which showed the residual reduction amount gain which is the difference of the quantity of the remainder before and behind applying the filter factor derived
  • (b) is adaptive filter 305_2 Indicates the frequency of appearance of classified classes. It is the figure shown about the composition of the transmitting device carrying the picture coding device concerning this embodiment, and the receiving device carrying a picture decoding device.
  • (A) shows a transmitting apparatus equipped with an image coding apparatus, and (b) shows a receiving apparatus equipped with an image decoding apparatus. It is the figure shown about the recording device carrying the picture coding device concerning this embodiment, and the composition of the reproduction device carrying a picture decoding device.
  • (A) shows a recording apparatus equipped with an image coding apparatus, and (b) shows a reproduction apparatus equipped with an image decoding apparatus. It is a schematic diagram showing composition of an image transmission system concerning this embodiment.
  • FIG. 29 is a schematic view showing the configuration of the image transmission system 1 according to the present embodiment.
  • the image transmission system 1 is a system that transmits a code obtained by coding an image to be coded, decodes the transmitted code, and displays the image.
  • the image transmission system 1 is configured to include an image encoding device (moving image encoding device) 11, a network 21, an image decoding device (moving image decoding device) 31, and an image display device 41.
  • An image T representing an image of a single layer or a plurality of layers is input to the image coding device 11.
  • a layer is a concept used to distinguish a plurality of pictures when there is one or more pictures that constitute a certain time. For example, if the same picture is encoded by a plurality of layers having different image quality and resolution, it becomes scalable coding, and if a picture of different viewpoints is encoded by a plurality of layers, it becomes view scalable coding.
  • prediction inter-layer prediction, inter-view prediction
  • encoded data can be summarized.
  • 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), a small area network (LAN), or a combination of these.
  • the network 21 is not necessarily limited to a two-way communication network, and may be a one-way communication network for transmitting broadcast waves such as terrestrial digital broadcasting and satellite broadcasting.
  • the network 21 may be replaced by a storage medium recording a coded stream Te such as a DVD (Digital Versatile Disc) or a BD (Blue-ray Disc).
  • the image decoding apparatus 31 decodes each of the encoded streams Te transmitted by the network 21 and generates one or more decoded images Td which are respectively decoded.
  • the image display device 41 displays all or a 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 display device such as a liquid crystal display or an organic EL (Electro-luminescence) display.
  • SNR scalable coding when the image decoding device 31 and the image display device 41 have high processing capabilities, they display enhancement layer images with high image quality and have only lower processing capabilities.
  • the base layer image which does not require the processing capability and the display capability as high as the enhancement layer.
  • X? Y: z is a ternary operator that takes y if x is true (other than 0) and z if x is false (0).
  • FIG. 1 is a diagram showing a hierarchical structure of data in a coded stream Te.
  • the coded stream Te illustratively includes a sequence and a plurality of pictures forming the sequence.
  • (A) to (f) in FIG. 1 respectively represent a coded video sequence defining the sequence SEQ, a coded picture defining the picture PICT, a coding slice defining the slice S, and a coding slice defining slice data.
  • It is a figure which shows a coding tree unit contained in data, coding slice data, and a coding unit (Coding Unit; CU) contained in a coding tree unit.
  • CU coding unit
  • the encoded video sequence In the encoded video sequence, a set of data to which the image decoding device 31 refers in order to decode the sequence SEQ to be processed is defined.
  • 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. It includes supplemental information SEI (Supplemental Enhancement Information).
  • SEI Supplemental Enhancement Information
  • the value shown after # indicates a layer ID.
  • FIG. 1 shows an example in which coded data of # 0 and # 1, that is, layer 0 and layer 1 exist, the type of layer and the number of layers do not depend on this.
  • a video parameter set VPS is a set of coding parameters common to a plurality of moving pictures and a set of coding parameters related to the plurality of layers included in the moving picture and each layer in a moving picture composed of a plurality of layers.
  • a set is defined.
  • sequence parameter set SPS a set of coding parameters to be referred to by the image decoding device 31 for decoding the target sequence is defined.
  • the width and height of the picture are defined.
  • multiple SPS may exist. In that case, one of a plurality of SPSs is selected from PPS.
  • a set of coding parameters to which the image decoding device 31 refers to to decode each picture in the target sequence is defined. For example, a reference value of quantization width (pic_init_qp_minus 26) used for decoding a picture and a flag (weighted_pred_flag) indicating application of weighted prediction are included.
  • multiple PPS may exist. In that case, one of a plurality of PPSs is selected from each picture in the target sequence.
  • the picture PICT includes slices S0 to SNS-1 (NS is the total number of slices included in the picture PICT), as shown in (b) of FIG.
  • the slice S includes a slice header SH and slice data SDATA as shown in (c) of FIG.
  • the slice header SH includes a coding parameter group to which the image decoding device 31 refers in order to determine the decoding method of the target slice.
  • the slice type specification information (slice_type) for specifying a slice type is an example of a coding parameter included in the slice header SH.
  • slice types that can be designated by slice type designation information, (1) I slice using only intra prediction at the time of encoding, (2) P slice using unidirectional prediction at the time of encoding or intra prediction, (3) B-slice using uni-directional prediction, bi-directional prediction, or intra prediction at the time of encoding.
  • 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: Coding Tree Unit, basic unit area) as shown in (d) of FIG.
  • the CTU is a block of a fixed size (for example, 32x32, 64x64, 128x128) that configures a slice, and may also be referred to as a largest coding unit (LCU: Largest Coding Unit).
  • Encoding tree unit As shown in (e) of FIG. 1, a set of data to which the image decoding device 31 refers in order to decode a coding tree unit to be processed is defined.
  • the coding tree unit is divided by recursive quadtree division.
  • a tree-structured node obtained by recursive quadtree division is called a coding node (CN).
  • the intermediate nodes of the quadtree are coding nodes, and the coding tree unit itself is also defined as the top coding node.
  • the CTU includes a split flag (cu_split_flag), and when cu_split_flag is 1, the CTU is split into four coding nodes CN.
  • the coding node CN is not split, and has one coding unit (CU: Coding Unit) as a node.
  • the coding unit CU is an end node of the coding node and is not further divided.
  • the coding unit CU is a basic unit of coding processing.
  • the size of the coding unit can be 64x64 pixels, 32x32 pixels, 16x16 pixels, or 8x8 pixels.
  • a set of data to which the image decoding device 31 refers in order to decode a coding unit to be processed is defined.
  • the coding unit is composed of a prediction tree, a transformation tree, and a CU header CUH.
  • a prediction mode, a division method (PU division mode), and the like are defined.
  • prediction information (reference picture index, motion vector, etc.) of each prediction unit (PU) obtained by dividing the coding unit into one or more is defined.
  • a prediction unit is one or more non-overlapping regions that make up a coding unit.
  • the prediction tree includes one or more prediction units obtained by the above-mentioned division.
  • segmented the prediction unit further is called a "subblock.”
  • the sub block is composed of a plurality of pixels. If the size of the prediction unit and the subblock is equal, there is one subblock in the prediction unit. If the prediction unit is larger than the size of the subblock, the prediction unit is divided into subblocks. For example, when the prediction unit is 8x8 and the subblock is 4x4, the prediction unit is divided into four subblocks, which are horizontally divided into two and vertically divided into two.
  • the prediction process may be performed for each prediction unit (sub block).
  • Intra prediction is prediction in the same picture
  • inter prediction refers to prediction processing performed between mutually different pictures (for example, between display times, between layer images).
  • the division method is encoded according to PU division mode (part_mode) of encoded data, 2Nx2N (the same size as the encoding unit), 2NxN, 2NxnU, 2NxnD, Nx2N, nLx2N, nRx2N, and There are NxN etc.
  • 2NxN and Nx2N indicate 1: 1 symmetric division
  • 2NxnU, 2NxnD and nLx2N and nRx2N indicate 1: 3 and 3: 1 asymmetric division.
  • the PUs included in the CU are expressed as PU0, PU1, PU2, PU3 in order.
  • FIG. 2 specifically illustrate the shapes of partitions (positions of boundaries of PU division) in respective PU division modes.
  • A) of FIG. 2 shows a 2Nx2N partition
  • (b) and (c) and (d) show 2NxN, 2NxnU, and 2NxnD partitions (horizontally long partitions), respectively.
  • (E), (f) and (g) show partitions (vertical partitions) in the case of Nx2N, nLx2N and nRx2N, respectively
  • (h) shows a partition of NxN. Note that the horizontally long partition and the vertically long partition are collectively referred to as a rectangular partition, and 2Nx2N and NxN are collectively referred to as a square partition.
  • the coding unit is divided into one or more transform units, and the position and size of each transform unit are defined.
  • a transform unit is one or more non-overlapping regions that make up a coding unit.
  • the transformation tree includes one or more transformation units obtained by the above-mentioned division.
  • Partitions in the transform tree may be allocated as a transform unit a region of the same size as the encoding unit, or may be based on recursive quadtree partitioning as in the case of CU partitioning described above.
  • a conversion process is performed for each conversion unit.
  • the prediction image of a prediction unit is derived by prediction parameters associated with PU.
  • the prediction parameters include intra prediction prediction parameters or inter prediction prediction parameters.
  • prediction parameters for inter prediction 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 a reference picture list called an L0 list or an L1 list is used, respectively, and a reference picture list corresponding to a value of 1 is used.
  • a flag indicating whether or not it is XX if the flag is other than 0 (for example, 1) is XX, it is assumed that 0 is not XX; Treat 1 as true, 0 as false, and so on. However, in an actual apparatus or method, other values may be used as true values or false values.
  • Syntax elements for deriving inter prediction parameters included in encoded data include, for example, PU split mode part_mode, merge flag merge_flag, merge index merge_idx, inter prediction identifier inter_pred_idc, reference picture index refIdxLX, predicted vector index mvp_LX_idx, There is a difference vector mvdLX.
  • the reference picture list is a list of reference pictures stored in the reference picture memory 306.
  • FIG. 3 is a conceptual diagram showing an example of a reference picture and a reference picture list.
  • the rectangle is a picture
  • the arrow is a reference of the picture
  • the horizontal axis is time
  • I, P and B in the rectangle are intra pictures, uni-predicted pictures, bi-predicted pictures, and numbers in the rectangle are decoded. Show the order.
  • the decoding order of pictures is I0, P1, B2, B3, B4, and the display order is I0, B3, B2, B4, B1, P1.
  • FIG. 3B shows an example of the reference picture list.
  • the reference picture list is a list representing reference picture candidates, 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.
  • Reference pictures when the target picture is B3 are I0, P1, and B2, and the reference pictures have these pictures as elements.
  • the reference picture index refIdxLX which picture in the reference picture list RefPicListX is actually referred to is designated by the reference picture index refIdxLX.
  • the figure shows an example in which reference pictures P1 and B2 are referenced 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 prediction mode is a mode used to be derived from the prediction parameter of the already processed neighboring PU without including the prediction list use flag predFlagLX (or inter prediction identifier inter_pred_idc), the reference picture index refIdxLX, and the motion vector mvLX in the encoded data.
  • 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 that identifies the prediction vector mvpLX and a difference vector mvdLX.
  • the inter prediction identifier inter_pred_idc is a value indicating the type and the number of reference pictures, and takes any one of PRED_L0, PRED_L1, and PRED_BI.
  • PRED_L0 and PRED_L1 indicate that reference pictures managed by reference pictures in the L0 list and the L1 list are used, respectively, and indicate that one reference picture is used (uniprediction).
  • PRED_BI indicates using two reference pictures (bi-prediction BiPred), and uses reference pictures managed by the L0 list and the L1 list.
  • the predicted vector index mvp_LX_idx is an index indicating a predicted 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, and parameters for L0 list and parameters for L1 list are distinguished by replacing LX with L0 and L1.
  • Merge index merge_idx is an index which shows whether any prediction parameter is used as a prediction parameter of decoding object PU among the prediction parameter candidates (merge candidate) derived
  • the motion vector mvLX indicates the amount of deviation between blocks on two different pictures.
  • the prediction vector and the difference vector relating 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 usage flag predFlagLX The relationship between the inter prediction identifier inter_pred_idc, and the prediction list use flag predFlagL0, predFlagL1 is as follows, and can be mutually converted.
  • the inter prediction parameter may use a prediction list use flag or may use an inter prediction identifier. 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 utilization flag.
  • the flag biPred of bi-prediction BiPred can be derived depending on whether both of the two prediction list use flags are 1. For example, it can be derived by the following equation.
  • the flag biPred can also be derived based 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 equation.
  • PRED_BI a value of 3
  • FIG. 5 is a schematic view showing the 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 an inverse A quantization / inverse DCT unit 311 and an addition unit 312 are included.
  • the prediction parameter decoding unit 302 is configured to include 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 encoded stream Te input from the outside to separate and decode individual codes (syntax elements).
  • the separated codes include prediction information 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.
  • the part of the separated code is, for example, prediction mode predMode, PU division 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, difference vector mvdLX. Control of which code to decode is performed based on an instruction of 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 DCT (Discrete Cosine Transform, discrete cosine transformation) on the residual signal in the encoding process and quantizing the coefficient.
  • 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 the inter prediction parameter in the prediction parameter memory 307. Details of the inter prediction parameter decoding unit 303 will be described later.
  • the intra prediction parameter decoding unit 304 decodes the intra 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 intra prediction parameter is a parameter used in a process of predicting a CU in 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 intra prediction parameter decoding unit 304 may derive different intra prediction modes for luminance and chrominance.
  • the intra prediction parameter decoding unit 304 decodes a luminance prediction mode IntraPredModeY as a luminance prediction parameter and a chrominance prediction mode IntraPredModeC as a chrominance prediction parameter.
  • the luminance prediction mode IntraPredModeY is a 35 mode, which corresponds to planar prediction (0), DC prediction (1), and directional prediction (2 to 34).
  • the color difference prediction mode IntraPredModeC uses one of planar prediction (0), DC prediction (1), direction prediction (2 to 34), and LM mode (35).
  • the intra prediction parameter decoding unit 304 decodes a flag indicating whether IntraPredModeC is the same mode as the luminance mode, and if it indicates that the flag is the same mode as the luminance mode, IntraPredModeY is assigned to IntraPredModeC, and the flag indicates the luminance If intra mode is different from the mode, planar prediction (0), DC prediction (1), direction prediction (2 to 34), or LM mode (35) may be decoded as IntraPredModeC.
  • the loop filter 305 applies a filter such as a deblocking filter, a sample adaptive offset (SAO), or an adaptive filter (ALF) to the decoded image of the CU generated by the adding unit 312.
  • a filter such as a deblocking filter, a sample adaptive offset (SAO), or an adaptive filter (ALF) to the decoded image of the CU generated by the adding unit 312.
  • SAO sample adaptive offset
  • ALF adaptive filter
  • the reference picture memory 306 stores the decoded image of the CU generated by the adding unit 312 in a predetermined position for each picture and CU to be decoded.
  • the prediction parameter memory 307 stores prediction parameters in a predetermined position for each picture to be decoded and each 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 inter prediction parameters to be stored include, for example, a prediction list use 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 also receives a prediction parameter from the prediction parameter decoding unit 302. Further, the predicted image generation unit 308 reads the reference picture from the reference picture memory 306. The prediction image generation unit 308 generates a PU prediction image using the input prediction parameters 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 interpolate the predicted image of the PU by inter prediction. Generate
  • the inter-predicted image generation unit 309 uses the reference picture index refIdxLX for the reference picture list (L0 list or L1 list) in which the prediction list use flag predFlagLX is 1, and the motion vector based on the PU to be decoded
  • the reference picture block at the position indicated by mvLX is read out 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 PU prediction image.
  • the inter prediction image generation unit 309 outputs the generated prediction image of PU to the addition unit 312.
  • the intra prediction image generation unit 310 When the prediction mode predMode indicates the intra prediction mode, the intra prediction 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 which are pictures to be decoded and which are in a predetermined range from the PU to be decoded among PUs already 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 varies depending on the intra prediction mode.
  • the order of raster scan is an order of sequentially moving from the left end to the right end for each row from the top to the bottom in each picture.
  • the intra predicted image generation unit 310 performs prediction on the read adjacent PU in the prediction mode indicated by the intra prediction mode IntraPredMode to generate a predicted image of PU.
  • the intra predicted image generation unit 310 outputs the generated predicted image of PU to the addition unit 312.
  • the intra prediction image generation unit 310 determines planar prediction (0), DC prediction (1), direction according to the luminance prediction mode IntraPredMode Y.
  • a prediction image of PU of luminance is generated by any of prediction (2 to 34), and planar prediction (0), DC prediction (1), direction prediction (2 to 34), LM mode according to color difference prediction mode IntraPredModeC.
  • the prediction image of color difference PU is generated by any of (35).
  • 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, for each pixel, the predicted image of the PU input from the inter predicted image generation unit 309 or the intra predicted image generation unit 310 and the residual signal input from the inverse quantization / inverse DCT unit 311, Generate a PU decoded image.
  • the addition unit 312 stores the generated PU decoded image in the reference picture memory 306, and externally outputs a decoded image Td in which the generated PU decoded image is integrated for each picture.
  • the loop filter 305 is an image filter device, and generates an output image by acting on an input image composed of a plurality of encoding tree units CTU (basic unit area which is a processing unit of a filter).
  • CTU basic unit area which is a processing unit of a filter
  • the loop filter 305 has (1) a function as a deblocking filter (DF: Deblocking Filter) that performs smoothing (deblocking processing) of an image around a block boundary in the input image P, and (2) a deblocking filter acts It has a function as an adaptive filter (ALF: Adaptive Loop Filter) that performs adaptive filter processing using the filter parameter FP on the captured image.
  • DF Deblocking Filter
  • ALF Adaptive Loop Filter
  • FIG. 7 is a block diagram showing the configuration of the loop filter 305.
  • the loop filter 305 includes a deblocking filter 305_1 operating as a boundary filter unit, an adaptive filter 305_2 operating as an adaptive filter unit, and an internal memory 305_3.
  • the deblocking filter 305_1 operates on the boundaries of blocks (coding tree unit CTU, coding unit CU, or partition).
  • the deblocking filter 305_1 generates the deblocked decoded image P_DB by performing smoothing of the image in the area around the block boundary in the input image P.
  • the loop filter 305 may perform filtering by the deblocking filter 305_1 (if it is on) or not (if it is off).
  • the deblocking filter 305_1 switches on and off according to a flag in the encoded data.
  • the flag to switch on / off is a flag (deblocking_filter_disabled_flag) for turning on / off the entire deblocking filter, and at least a flag (loop_filter_across_tiles_enabled_flag) indicating whether to apply a deblocking filter to tile boundaries or a deblocking filter to slice boundaries It has a flag (loop_filter_across_slices_enabled_flag) indicating whether or not it is.
  • the deblocking filter 305_1 derives a flag filterLeftCbEdgeFlag indicating whether or not to apply filtering to the left side of the block boundary.
  • filterLeftCbEdgeFlag is 0 when any of the following conditions are satisfied, and 1 otherwise.
  • -The left boundary of the target block (target CTU) is the left boundary of the picture.
  • -The left boundary of the target block (target CTU) is the left boundary of the tile
  • loop_filter_across_tiles_enabled_flag is 0.
  • the left boundary of the target block (target CTU) is the left boundary of the slice
  • loop_filter_across_slices_enabled_flag is 0.
  • the deblocking filter 305_1 performs filtering on the block left boundary in the vertical direction (the boundary divided by a line along the vertical direction, the boundary divided into left and right blocks) with reference to the flag filterLeftCbEdgeFlag.
  • the flag filterLeftCbEdgeFlag, the in-CTU coordinates of the target block, and the division flag are referred to, and a flag edgeFlags indicating whether to filter the boundary pixel is derived. If edgeFlags is 1, apply filtering to the block left boundary. For example, filter processing is performed using the following equation.
  • edgeFlags when the edgeFlags is 0, no filtering process is applied to the left boundary of the block. If the x coordinate of the in-CTU coordinate is 0, that is, if the target block left boundary is the left boundary of the CTU, set filterLeftCbEdgeFlag in edgeFlags. Accordingly, when the filterLeftCbEdgeFlag is 0, the deblocking filter 305_1 does not apply the filtering process to the left boundary of the CTU.
  • the deblocking filter 305_1 derives a flag filterTopCbEdgeFlag indicating whether or not the filtering process is performed above the block boundary of the target block.
  • filterTopCbEdgeFlag is 0 when any of the following conditions are satisfied, and 1 otherwise.
  • -The upper boundary of the target block (target CTU) is the upper boundary of the picture.
  • -The upper boundary of the target block (target CTU) is the upper boundary of the tile, and loop_filter_across_tiles_enabled_flag is 0.
  • -The upper boundary of the target block (target CTU) is the upper boundary of the slice, and loop_filter_across_slices_enabled_flag is 0.
  • the deblocking filter 305_1 performs filtering on the block upper boundary in the horizontal direction (the boundary divided by a line along the horizontal direction, the boundary divided into upper and lower blocks) with reference to the flag filterTopCbEdgeFlag.
  • the flag filterLeftCbEdgeFlag, the in-CTU coordinates of the target block, and the division flag are referred to, and a flag edgeFlags indicating whether to filter the boundary pixel is derived.
  • edgeFlags When edgeFlags is 1, filter processing is applied to the block upper boundary.
  • the application method is the same as the above block left boundary in the vertical direction.
  • edgeFlags no filtering is applied to the block upper boundary.
  • the deblocking filter 305_1 can turn on / off the boundary filter of slice boundaries or tile boundaries.
  • Adaptive filter 305_2 acts on the deblocked decoded image P_DB after the filtering by the deblocking filter 305_1 when the filtering by the deblocking filter 305_1 is on.
  • the adaptive filter 305_2 acts on the input image P when the filtering process by the deblocking filter 305_1 is off.
  • the adaptive filter 305_2 may operate on filtered decoded images other than the deblocking filter 305_1. For example, it may operate on the adaptive sample offset filter P_SAO.
  • the adaptive filter 305_2 includes a target pixel setting unit 305_2a, a reference area setting unit 305_2b, and a filter processing unit 305_2c.
  • the target pixel setting unit 305_2a sets each pixel included in the coding tree unit CTU as a target pixel for adaptive filter processing in raster scan order.
  • the target pixel position information indicating the position of the target pixel set by the target pixel setting unit 305_2a is supplied to the reference area setting unit 305_2b.
  • the reference area setting unit 305_2b sets the reference area of the target pixel, and the filter processing unit 305_2c calculates the pixel value of the target pixel.
  • the reference area setting unit 305_2b sets a reference area around the target pixel based on the position of the target pixel in the coding tree unit CTU.
  • the reference area is defined by virtually set reference restriction lines (virtual boundaries). That is, "outside reference area” indicates the outside of the target pixel beyond the reference restriction line, and "in reference area” indicates the inside of the reference restriction line from the target pixel.
  • the reference area setting unit 305_2b sets reference restriction lines with different positions depending on whether the filtering process by the deblocking filter 305_1 is on or off. Details of the process performed by the reference area setting unit 350_2b will be described later, with reference to the drawings being referred to.
  • the filter processing unit 305_ 2 c is a pixel of (1) a deblocked decoded image (also referred to as “pre-filter image”) of the pixel value of the adaptive-filtered decoded image P_ALF (also referred to as “filtered image”) of the target pixel.
  • the value or (2) the pixel value of the input image P which is calculated by reference to the pixel value of the pixel included in the reference region set for the target pixel by the reference region setting unit 305_2b.
  • the process of determining the pixel to be referred to by the filter processing unit 305_2c will be described later, with reference to the drawings being referred to.
  • the generated adaptive filtered decoded image P_ALF is temporarily stored in the internal memory 305_3, and then transferred to the reference picture memory 306.
  • FIG. 8 is a flowchart showing processing by the reference region setting unit 305_2b and the filter processing unit 305_2c of the loop filter 305 according to the present embodiment. The details of each process will be described later, with reference to the drawings.
  • Step S10 The reference area setting unit 305_2b sets a reference restriction boundary variable which is a variable for setting a reference restriction line.
  • the reference restriction boundary variable will be described with reference to FIG.
  • FIG. 9 is a diagram for describing a reference restriction line in the present embodiment.
  • the reference area setting unit 305_2b sets a reference restriction line extending in the horizontal direction.
  • the reference area setting unit 305_2b is a reference restriction boundary variable indicating how many lines the reference restriction line is to be set from the upper side (hereinafter also referred to as "upper CTU boundary") of the encoding tree unit CTU.
  • K1 and a reference restriction boundary variable K2 indicating how many reference restriction lines are to be set on the upper and lower sides of the lines from the lower side of the coding tree unit CTU (hereinafter also referred to as "lower CTU boundary").
  • the reference area setting unit 305_2b sets the reference restriction line according to the position of the target pixel set by the target pixel setting unit 305_2a.
  • the reference area setting unit 305_2b sets the reference restriction line vbLine2 from the lower side of the encoding tree unit CTU to the upper side of the reference restriction boundary variable K2 with reference to the set reference restriction boundary variable K2. Then, when the position of the target pixel set in the coding tree unit CTU is above the reference restriction line vbLine2, the reference area setting unit 305_2b refers to the reference restriction boundary variable K1 and sets the encoding tree unit CTU.
  • the reference restriction line vbLine1 is set from the upper side to the reference restriction boundary variable K1 line upper side.
  • the reference region setting unit 305_2b refers to the reference restriction boundary variable K2 and the coding tree unit CTU.
  • a reference restriction line vbLine3 may be set from the lower side to the lower side of the reference restriction boundary variable K2 line.
  • the area of the coding tree unit CTU between the upper CTU boundary and the reference restriction line vbLine2 is top part, and the coding tree between the reference restriction line vbLine2 and the lower CTU boundary
  • the area of the unit CTU is called bottom part.
  • an area between the reference restriction line vbLine1 and the reference restriction line vbLine2 is a reference area.
  • the area between the reference restriction line vbLine2 and the reference restriction line vbLine3 is a reference area.
  • the reference area setting unit 305_2b performs the filtering process with reference to the pixel values located in the virtual boundary.
  • the reference area setting unit 305_2b sets the position of a reference pixel which is a pixel to be referred to in order to calculate the pixel value of the target pixel.
  • the area where the reference pixel is located is called a "filter reference area".
  • the filter reference area is an area different from the reference area.
  • the processing of the reference area setting unit 305_2b differs depending on whether the pixel in the filter reference area is within the reference area or outside the reference area.
  • the reference region setting unit 305_2b does not refer to a pixel outside the reference region, and sets another pixel as the reference pixel.
  • Detailed processing of the reference area setting unit 305_2b in the case where the position of the reference pixel is outside the reference area will be described later, with reference to the drawings being referred to.
  • the filter processing unit 305_2c refers to the position of the reference pixel set in step S20, and calculates the pixel value of the target pixel.
  • FIG. 10 is a flowchart showing an outline of processing performed by the reference area setting unit 305_2b of the loop filter 305 according to the present embodiment.
  • Step S12 The reference area setting unit 305_2b sets different virtual boundaries depending on whether filtering by the deblocking filter 305_1 operating as a boundary filter unit is on or off at slice boundaries or tile boundaries.
  • the reference area setting unit 305_2b determines whether the filtering process by the deblocking filter 305_1 is off. When the filtering process by the deblocking filter 305_1 is off, the process proceeds to step S14. On the other hand, when the filtering process by the deblocking filter 305_1 is on, the process proceeds to step S16.
  • Step S14 The reference area setting unit 305_2b is “K1” when the reference restriction line on the upper side of the reference restriction boundary variable K (the encoding tree unit CTU is set, “K1”, and the reference restriction line on the lower side of the encoding tree unit CTU Is set “0” to “K2”.
  • the reference area setting unit 305_2b sets “NDF” to the reference restriction boundary variable K.
  • the NDF is, for example, four.
  • FIG. 11 is a flowchart showing details of processing executed by the reference region setting unit 305_2b of the loop filter 305 according to the present embodiment.
  • a specific example of the determination as to whether or not the filtering process by the deblocking filter 305_1 is off will be described with reference to FIG.
  • a case will be described with reference to FIG. 11 in which reference restriction boundary variables on the upper side of the encoding tree unit CTU and reference restriction boundary variables on the lower side of the encoding tree unit CTU are individually set.
  • step S14a If the reference area setting unit 305_2b determines that the filtering process by the deblocking filter 305_1 is off, the process proceeds to step S14a, while the reference area setting unit 305_2b determines that the filtering process by the deblocking filter 305_1 is off. If not, the process proceeds to step S16a.
  • Step S14a The reference area setting unit 305_2b sets “0” to the reference restriction boundary variable K1.
  • Step S16a The reference area setting unit 305_2b sets “NDB” to the reference restriction boundary variable K1.
  • NDB is four, for example.
  • step S14b If the reference area setting unit 305_2b determines that the filtering process by the deblocking filter 305_1 is off, the process proceeds to step S14b, while the reference area setting unit 305_2b determines that the filtering process by the deblocking filter 305_1 is off. If not determined, the process proceeds to step S16b.
  • Step S14b The reference area setting unit 305_2b sets “0” to the reference restriction boundary variable K2.
  • Step S16b The reference area setting unit 305_2b sets “NDB” to the reference restriction boundary variable K2.
  • NDB is four, for example.
  • FIG. 12 is a diagram for describing the details of the reference area in the present embodiment.
  • the reference area setting unit 305_2b derives the reference area according to the position of the target pixel and the reference restriction line.
  • FIG. 12A shows a reference area when the target pixel is located at the top part.
  • the reference area setting unit 305_2b sets the area between the first reference restriction line vbLine1 and the second reference restriction line vbLine2 as a reference area.
  • the reference area setting unit 305_2b sets the pixel position yMin at the lower limit in the vertical direction in the reference area to a position separated from the upper CTU boundary by the reference restriction boundary variable K1 pixel.
  • the reference area setting unit 305_2b sets the pixel position yMax at the upper limit in the vertical direction in the reference area to a position away from the lower CTU boundary by (reference restriction boundary variable K2-1) pixels.
  • (B) of FIG. 12 shows a reference area when the target pixel is located in the bottom part.
  • the reference area setting unit 305_2b sets the area between the second reference restriction line vbLine2 and the third reference restriction line vbLine3 as a reference area.
  • the reference area setting unit 305_2b sets the pixel position yMin at the lower limit in the vertical direction in the reference area to a position away from the lower CTU boundary by the reference restriction boundary variable K2 pixels.
  • the reference area setting unit 305_2b sets the pixel position yMax at the upper limit in the vertical direction in the reference area to a position away from the lower CTU boundary by (reference restriction boundary variable K2-1) pixels.
  • FIG. 13 is a flowchart showing details of processing executed by the reference region setting unit 305_2b of the loop filter 305 according to the present embodiment.
  • Step S22 The reference area setting unit 305_2b determines whether the target pixel is positioned at the top part or the bottom part. If it is determined that the target pixel is located at the top part, the process proceeds to step S24. On the other hand, if it is determined that the target pixel is located at the bottom part, the process proceeds to step S26.
  • Step S24 The reference area setting unit 305_2b sets the pixel position yMin at the lower limit in the vertical direction in the reference area to the first reference restriction line vbLine1 and sets the pixel position yMax at the upper limit in the vertical direction in the reference area to the second reference restriction line vbLine2. Set to the value obtained by subtracting 1 from.
  • Step S26 The reference area setting unit 305_2b sets the pixel position yMin at the lower limit in the vertical direction in the reference area to the second reference restriction line vbLine2, and the pixel position yMax at the upper limit in the vertical direction in the reference area to the third reference restriction line vbLine3. Set to the value obtained by subtracting 1 from.
  • Step S28 The reference area setting unit 305_2b corrects the position of the reference pixel when the position of the reference pixel is out of the reference area.
  • FIG. 16 is a diagram showing an example of reference pixel position setting processing by the reference region setting unit 305_2b of the loop filter 305 according to the present embodiment.
  • the target pixel tp is located at the top part. Also, in the CTU shown in FIG. 16, the filter reference area is a diamond. Since the target pixel tp is located at top part, the upper limit in the vertical direction in the reference area is set to yMax.
  • FIG. 16 shows the case where the pixel on the second reference restriction line vbLine2 is used.
  • the reference area setting unit 305_2b replaces the pixel value of the reference pixel outside the reference area with the pixel value of the reference pixel on yMax at the same horizontal position.
  • FIG. 16 shows the case where the central pixel of the reference pixel group is used.
  • the reference area setting unit 305_2b replaces the pixel value of the reference pixel outside the reference area with the pixel value of the central pixel of the reference pixel group.
  • the central pixel of the reference pixel group is a target pixel.
  • the reference area setting unit 305_2b adds the value of the weighting factor of the reference pixel outside the reference area to the weighting factor of the central pixel within the filter reference area.
  • the weighting factor of the reference pixel is set to 0.
  • the reference region setting unit 305_2b is After setting the weight coefficient of the central pixel to WC + WA + WB, the weight coefficients WA and WB are set to 0.
  • FIG. 16C shows the case where a pixel group (also referred to as “center line pixel”) having the same position in the vertical direction as the central pixel of the reference pixel group is used.
  • the reference area setting unit 305_2b replaces the pixel values of the reference pixels outside the reference area with the pixel values of the center line pixels at the same horizontal position.
  • FIG. 16 shows the case where the pixel of the position which becomes line symmetry (mirror symmetry) is made centering on the 2nd reference restriction line vbLine2.
  • the reference area setting unit 305_2b sets the pixel values of the reference pixels outside the reference area to the pixel values of the pixels at positions that are line symmetrical with respect to the second reference limit line vbLine2. replace.
  • the upper left of the picture is not limited to the picture but may be the upper left of the slice or the upper left of the tile.
  • NALF_FLT_TAP is a parameter indicating the number of taps of the adaptive filter ALF, in other words, the number of pixels on one side of the filter reference area to which the adaptive filter ALF refers.
  • the target pixel setting unit 305_2a calculates the x coordinate xx based on the upper left of the picture by adding x to the x coordinate xCB on the upper left of the CU. Further, y is added to the y coordinate yCB at the upper left of CU to calculate the y coordinate yy based on the upper left of the picture.
  • Step S1-2 the target pixel setting unit 305_2a derives coordinates (xInCTU, yInCTU) based on the CTU upper left as coordinates (xx, yy) based on the upper left of the picture. Specifically, the remainder obtained by dividing xx by the CTU size at step S1-1 is substituted into a variable xInCTU, and the remainder calculated by dividing y calculated at step S1-1 by the CTU size is substituted into a variable yInCTU.
  • the reference area setting unit 305_2b sets the horizontal and vertical positions horPos [i] and verPos [i] from the target pixel corresponding to the index i of the filter coefficient as reference pixels. Are substituted as the X coordinate xPos [i] of Y and the Y coordinate yPos [i] of the reference pixel.
  • the reference area setting unit 305_2b substitutes 0 for the reference restriction boundary variable K1 when the process of the deblock filter is off with respect to the upper CTU boundary for the CTU to which the target pixel belongs. When the process is on, NDF is substituted for the reference restriction boundary variable K1.
  • the reference limit boundary variable K2 is Substitute NDF.
  • the reference area setting unit 305_2b substitutes a value obtained by adding a minus sign to the reference restriction boundary variable K1 to the reference restriction line vbLine1.
  • the reference area setting unit 305_2b substitutes a value obtained by subtracting the reference restriction boundary variable K2 from the CTU size into the reference restriction line vbLine2.
  • the reference area setting unit 305_2b substitutes a value obtained by adding the reference restriction boundary variable K2 to the CTU size, to the reference restriction line vbLine3. (Step S1-6) Subsequently, when the Y coordinate yInCTU of the target pixel is less than the reference restriction line vbLine2, the reference area setting unit 305_2b substitutes the reference restriction line vbLine1 for the lower limit yMin of the reference area, and the upper limit of the reference area. Substitute the value obtained by subtracting 1 from the reference restriction line vbLine2 into yMax.
  • the reference area setting unit 305_2b substitutes the reference restriction line vbLine2 for the lower limit yMin of the reference area and starts the reference restriction line vbLine3 for the upper limit yMax of the reference area. Substitute 1 minus the value. (Step S1-7) Subsequently, the reference area setting unit 305_2b corrects the reference position by any of the following methods.
  • the reference area setting unit 305_2b uses a value obtained by clipping the sum of the Y coordinate yInCTU of the target pixel and the Y coordinate yPos [i] of the reference pixel between the lower limit yMin of the reference area and the upper limit yMax of the reference area.
  • the value obtained by subtracting the Y coordinate yInCTU of the target pixel is substituted into the Y coordinate yPos [i] of the reference pixel (see (a) in FIG. 16).
  • the reference region setting unit 305_2b calculates the target pixel from twice the lower limit yMin of the reference region. The value obtained by subtracting twice the Y coordinate yInCTU of and the Y coordinate yPos [i] of the reference pixel is substituted for the Y coordinate yPos [i] of the reference pixel.
  • the reference region setting unit 305_2b calculates twice the upper limit yMax of the reference region to the target pixel A value obtained by subtracting twice the Y coordinate yInCTU and the Y coordinate yPos [i] of the reference pixel is substituted for the Y coordinate yPos [i] of the reference pixel (see (d) in FIG. 16).
  • NDF K2 lower deblocking filter off?
  • NDF vbLine1 -K1
  • vbLine2 CtuSize-K2
  • yPos [i] Clip3 (yMin, yMax, yIn
  • the adaptive filter 305 _ 2 sets reference restriction lines at different positions depending on whether the filtering process by the deblocking filter 305 _ 1 is on or off, and the pixel values located in the reference area Can be filtered efficiently.
  • Second Embodiment A specific flow of correction of the position of the reference pixel by the adaptive filter 305_2 of the loop filter 305 according to the second embodiment will be described.
  • the second embodiment differs from the first embodiment in that the same reference restriction boundary variable is set in the upper CTU boundary and the lower CTU boundary.
  • Step S2-1 A process similar to the above (step S1-1) is performed.
  • Step S2-2 The same processing as the above (Step S1-2) is performed.
  • Step S2-3) The same processing as the above (Step S1-3) is performed.
  • Step S2-4 Subsequently, the reference area setting unit 305_2b substitutes 0 for the reference restriction boundary variable K when the process of the deblocking filter is off, and the reference restriction boundary variable K when the process is on.
  • the reference area setting unit 305_2b substitutes a value obtained by adding a minus sign to the reference restriction boundary variable K to the reference restriction line vbLine1.
  • the reference area setting unit 305_2b substitutes a value obtained by subtracting the reference restriction boundary variable K from the CTU size into the reference restriction line vbLine2.
  • the reference area setting unit 305_2b substitutes a value obtained by adding the reference restriction boundary variable K to the CTU size for the reference restriction line vbLine3.
  • Step S2-6) Subsequently, when the Y coordinate yInCTU of the target pixel is less than the reference restriction line vbLine2, the reference area setting unit 305_2b substitutes the reference restriction line vbLine1 for the lower limit yMin of the reference area, and the upper limit of the reference area. Substitute the value obtained by subtracting 1 from the reference restriction line vbLine2 into yMax.
  • Step S2b substitutes the reference restriction line vbLine2 for the lower limit yMin of the reference area and starts the reference restriction line vbLine3 for the upper limit yMax of the reference area. Substitute 1 minus the value.
  • Step S2-7) The same processing as the above (step S1-7) is performed.
  • Step S2-8) The same processing as the above (step S1-8) is performed.
  • Step S3-1 The same processing as the above (step S1-1) is performed.
  • Step S3-2 Subsequently, the target pixel setting unit 035_2a multiplies the CTU size by the value obtained by dividing the coordinates (xx, yy) based on the upper left of the picture by the CTU size, thereby setting the upper left coordinate of the CTU of the target picture. Calculate (xCTU, yCTU).
  • Step S3-3 The same processing as the above (step S1-2) is performed.
  • the reference region setting unit 305_2b sets values obtained by adding horPos [i] and verPos [i] as xxPos [i] and yPos [i], and xx and yy. .
  • Step S3-5 Subsequently, the reference area setting unit 305_2b substitutes a value obtained by subtracting the reference restriction boundary variable K1 from the x coordinate yCTU in the picture into the reference restriction line vbLine1.
  • the reference area setting unit 305_2b adds the CTU size to the CTU coordinates yCTU, and substitutes a value obtained by subtracting the reference restriction boundary variable K2 into the reference restriction line vbLine2.
  • the reference area setting unit 305_2b adds the CTU size to the CTU coordinates yCTU, and substitutes a value obtained by adding the reference restriction boundary variable K2 to the reference restriction line vbLine3. (Step S3-6) Subsequently, when the y coordinate yy of the target pixel is less than the reference limit line vbLine2, the reference area setting unit 305_2b substitutes the reference limit line vbLine1 for the lower limit yMin of the reference area, and the upper limit of the reference area. Substitute the value obtained by subtracting 1 from the reference restriction line vbLine2 into yMax.
  • the reference area setting unit 305_2b substitutes the reference restriction line vbLine2 for the lower limit yMin of the reference area, and the reference restriction line vbLine3 for the upper limit yMax of the reference area. Substitute 1 minus the value. (Step S3-7) Subsequently, the reference area setting unit 305_2b corrects the reference position by any of the following methods.
  • the reference area setting unit 305_2b clips a value obtained by clipping the Y coordinate yPos [i] of the reference pixel between the lower limit yMin of the reference area and the upper limit yMax of the reference area, and the Y coordinate yPos [i] of the reference pixel. (Refer to (a) of FIG. 16).
  • the reference area setting unit 305_2b refers to the case where the Y coordinate yPos [i] of the reference pixel is less than the lower limit yMin of the reference area or the Y coordinate yPos [i] of the reference pixel exceeds the upper limit yMax of the reference area.
  • the position xx of the target pixel is substituted into the X coordinate xPos [i] of the pixel, and the position yy of the target pixel is substituted into the position yPos [i] of the reference pixel in the y direction (see (b) in FIG. 16).
  • the reference area setting unit 305_2b refers to the case where the Y coordinate yPos [i] of the reference pixel is less than the lower limit yMin of the reference area or the Y coordinate yPos [i] of the reference pixel exceeds the upper limit yMax of the reference area.
  • Yy is substituted for the Y coordinate yPos [i] of the pixel (see (c) in FIG. 16).
  • the reference area setting unit 305_2b subtracts the Y coordinate yPos [i] of the reference pixel from twice the lower limit yMin of the reference area if the Y coordinate yPos [i] of the reference pixel is less than the lower limit yMin of the reference area. A value is substituted into the Y coordinate yPos [i] of the reference pixel. Further, when the Y coordinate yPos [i] of the reference pixel exceeds the upper limit yMax of the reference region, the reference region setting unit 305_2b subtracts the Y coordinate yPos [i] of the reference pixel from twice the upper limit yMax of the reference region. Is substituted into the Y coordinate yPos [i] of the reference pixel (see (d) in FIG. 16). (Step S3-8) The same processing as the above (step S1-8) is performed.
  • NDF K2 lower deblocking filter off?
  • yPos [i] Clip3 (yMin, yMax, yPos [i]) // (a) In the case of using boundary pixels if (yPos [i] ⁇ yMin
  • Step S4-1 A process similar to the above (step S1-1) is performed.
  • Step S4-2) The same processing as the above (Step S1-2) is performed.
  • Step S4-3) The reference area setting unit 305_2b sets values obtained by adding xInCTU and yInCTU to horPos [i] and verPos [i] as xPos [i] and yPos [i]. .
  • Step S4-4 The same processing as the above (step S1-4) is performed.
  • Step S4-5 The same processing as the above (step S1-5) is performed.
  • Step S4-6 Subsequently, the reference area setting unit 305_2b substitutes a value obtained by subtracting the reference restriction line vbLine2 from the remainder obtained by dividing y calculated in step S4-1 by the CTU size into the boundary distance dist2VB.
  • Step S4-7 Subsequently, when the boundary distance dist2VB is less than 0, the reference area setting unit 305_2b substitutes the reference restriction line vbLine1 into the lower limit yMin of the reference area, and the reference restriction line vbLine2 into the upper limit yMax of the reference area. Substitute 1 minus the value.
  • the reference area setting unit 305_2b substitutes the reference restriction line vbLine2 for the lower limit yMin of the reference area, and substitutes the value obtained by subtracting 1 from the reference restriction line vbLine3 for the upper limit yMax of the reference area. .
  • the reference region setting unit 305_2b substitutes the reference restriction line vbLine1 into the lower limit yMin of the reference region, and adds 1 to the value obtained by adding 1 to the upper limit yMax of the reference region. Assign the multiplied value.
  • the reference region setting unit 305_2b substitutes the boundary distance dist2VB for the lower limit yMin of the reference region, and substitutes a value obtained by subtracting 1 from the reference limit line vbLine3 for the upper limit yMax of the reference region.
  • the reference area setting unit 305_2b corrects the reference position by any one of the following methods.
  • the reference area setting unit 305_2b uses a value obtained by clipping the sum of the Y coordinate yInCTU of the target pixel and the Y coordinate yPos [i] of the reference pixel between the lower limit yMin of the reference area and the upper limit yMax of the reference area. The value obtained by subtracting the Y coordinate yInCTU of the target pixel is substituted into the Y coordinate yPos [i] of the reference pixel (see (a) in FIG. 16).
  • the reference region setting unit 305_2b determines that the reference pixel is twice as large as the lower limit yMin of the reference region.
  • the value obtained by subtracting the Y coordinate yPos [i] of is assigned to the Y coordinate yPos [i] of the reference pixel.
  • Step S4-9) The same processing as the above (step S1-8) is performed.
  • FIG. 14 is an example of a table referred to by the reference region setting unit 305_2b of the loop filter 305 according to the present embodiment.
  • the table shown in FIG. 14 is determined according to the boundary distance dist2VB.
  • Step S5-1 The same processing as the above (step S1-1) is performed.
  • Step S5-2 The same processing as the above (step S1-2) is performed.
  • Step S5-3) The same processing as the above (Step S1-4) is performed.
  • Step S5-4) The same processing as the above (step S1-5) is performed.
  • Step S5-5) The same processing as the above (step S4-6) is performed.
  • the sixth embodiment differs from the above embodiments in that the reference area is limited in the horizontal direction.
  • FIG. 15 is a diagram illustrating another example of the reference restriction line set by the reference region setting unit 305_2b of the loop filter 305 according to the sixth embodiment.
  • FIG. 15 shows the reference area in the case where the target pixel is located at the left part.
  • the target pixel lp is in the left part, it is between the reference restriction line vbCol1 located apart from the CTU boundary on the left by L1 pixels and the reference restriction line vbCol2 located apart from the CTU boundary on the right by L2 pixels on the left Is the reference area.
  • FIG. 15 shows a reference area when the target pixel is located in the right part.
  • the reference restriction line vbCol2 located on the left side from the CTU boundary on the right side by L2 pixels and the reference restriction line vbCol3 located on the right side from the CTU boundary on the right side by L2 pixels Is the reference area.
  • Step S6-1 A process similar to the above (step S1-1) is performed.
  • Step S6-2 The same processing as the above (Step S1-2) is performed.
  • Step S6-3 The same processing as the above (step S4-3) is performed.
  • Step S6-4 The same processing as the above (Step S1-4) is performed.
  • Step S6-5) The same processing as the above (Step S1-5) is performed.
  • Step S6-6) Subsequently, the reference area setting unit 305_2b substitutes 0 for the reference restriction boundary variable L1 when the process of the deblock filter is off with respect to the left CTU boundary, and the process is ON.
  • the NDF is substituted for the reference restriction boundary variable L1.
  • 0 is substituted into the reference restriction boundary variable L2
  • NDF is substituted into the reference restriction boundary variable L2.
  • Step S6-7 Subsequently, the reference area setting unit 305_2b substitutes a value obtained by adding a minus sign to the reference restriction boundary variable L1 to the reference restriction line vbCol1.
  • the reference area setting unit 305_2b substitutes a value obtained by subtracting the reference restriction boundary variable L2 from the CTU size into the reference restriction line vbCol2.
  • the reference area setting unit 305_2b substitutes a value obtained by adding the reference restriction boundary variable L2 to the CTU size, to the reference restriction line vbCol3.
  • Step S6-9) Subsequently, when the X coordinate xInCTU of the target pixel is less than the reference restriction line vbCol2, the reference area setting unit 305_2b substitutes the reference restriction line vbCol1 for the left end xMin of the reference area, and the reference area The value obtained by subtracting 1 from the reference restriction line vbCol2 is assigned to the right end xMax of.
  • the reference area setting unit 305_2b substitutes the reference restriction line vbCol2 for the left end xMin of the reference area and refers to the end xMax for the right side of the reference area.
  • the reference area setting unit 305_2b corrects the reference position by any of the following methods.
  • the reference area setting unit 305_2b adds the sum of the X coordinate xInCTU of the target pixel and the X coordinate xPos [i] of the reference pixel to the left end xMin of the reference area and the right end xMax of the reference area.
  • a value obtained by subtracting the X coordinate xInCTU of the target pixel from the clipped value is substituted for the X coordinate xPos [i] of the reference pixel.
  • the reference area setting unit 305_2b is a target based on a value obtained by clipping the sum of the Y coordinate yInCTU of the target pixel and the Y coordinate yPos [i] of the reference pixel between the lower limit yMin of the reference area and the upper limit yMax of the reference area.
  • the value obtained by subtracting the Y coordinate yInCTU of the pixel is substituted for the Y coordinate yPos [i] of the reference pixel (see (a) in FIG. 16).
  • the reference region setting unit 305_2b determines the X coordinate xInCTU of the target pixel and the reference pixel If the sum of the x coordinate xPos [i] of the x exceeds the upper limit xMax on the right side of the reference area, the sum of the Y coordinate yInCTU of the target pixel and the y coordinate yPos [i] of the reference pixel is less than the lower limit yMin of the reference area Or when the sum of the Y coordinate yInCTU of the target pixel and the Y coordinate yPos [i] of the reference pixel exceeds the upper limit yMax of the reference area, 0 in the X coordinate xPos [i] and the Y coordinate yPos [i] of the reference pixel Is substitute
  • the reference region setting unit 305_2b determines the X coordinate xInCTU of the target pixel and the reference pixel The sum of the Y coordinate yInCTU of the target pixel and the Y coordinate yPos [i] of the reference pixel is less than the lower limit yMin of the reference area, when the sum of the X coordinate xPos [i] of x exceeds the right end xMax of the reference area Or, if the sum of the Y coordinate yInCTU of the target pixel and the Y coordinate yPos [i] of the reference pixel exceeds the upper limit yMax of the reference area, 0 is substituted for the Y coordinate yPos [i] of the reference pixel (see FIG.
  • the reference area setting unit 305_2b doubles the right end xMax of the reference area.
  • a value obtained by subtracting twice the X coordinate xInCTU of the target pixel and the X coordinate xPos [i] of the reference pixel from is substituted into the X coordinate xPos [i] of the reference pixel.
  • the reference region setting unit 305_2b determines that the target pixel is twice the lower limit yMin of the reference region. A value obtained by subtracting twice the Y coordinate yInCTU and the Y coordinate yPos [i] of the reference pixel is substituted for the Y coordinate yPos [i] of the reference pixel.
  • the reference region setting unit 305_2b calculates twice the upper limit yMax of the reference region to the target pixel A value obtained by subtracting twice the Y coordinate yInCTU and the Y coordinate yPos [i] of the reference pixel is substituted for the Y coordinate yPos [i] of the reference pixel (see (d) in FIG. 16). (Step S6-11) The same processing as the above (step S1-8) is performed.
  • NDF K2 lower deblocking filter off?
  • NDF L2 Right deblocking filter off?
  • xPos [i] Clip3 (xMin, xMax, xInCTU + xPos [i])-xInCTU //
  • Step S7-1 The same processing as the above (step S6-1) is performed.
  • Step S7-2) The same processing as the above (step S6-2) is performed.
  • Step S7-3) The same processing as the above (step S6-3) is performed.
  • Step S7-4) The same processing as the above (step S6-4) is performed.
  • Step S7-5) The same processing as the above (Step S6-5) is performed.
  • Step S7-6) The same processing as the above (Step S6-6) is performed.
  • Step S7-7) The same processing as the above (Step S6-7) is performed.
  • Step S7-8 The same processing as the above (Step S6-8) is performed.
  • Step S7-9 Subsequently, the reference area setting unit 305_2b substitutes the reference restriction line vbCol1 into the left end xMin of the reference area, and subtracts 1 from the reference restriction line vbCol3 into the right end xMax of the reference area. substitute.
  • Step S7-10) The same processing as the above (Step S6-10) is performed.
  • Step S7-11 A process similar to the above (step S6-11) is performed.
  • NDF K2 lower deblocking filter off?
  • NDF L2 Right deblocking filter off?
  • a virtual boundary technique will be described in which referring to pixels outside the boundary as reference pixels with a virtual boundary line (VB line) several pixels away from the boundary of the target CTU as the boundary is used.
  • VB line virtual boundary line
  • the adaptive filter ALF is applied to pixels that have been filtered (also referred to as DF-completed) by the deblocking filter DF. For this reason, it is necessary to know the range of the DF completed area.
  • the entire target CTU is not necessarily DF-completed.
  • the top of the CTU may be DFed and the bottom may not yet be DFed. Therefore, the “lower VB line” is set at the boundary of the range of the DF-completed area in the target CTU.
  • access to the area below the lower VB line is also possible.
  • the area between the upper VB line and the lower VB line is a DF-finished area.
  • processing delay, memory band and line memory can be reduced by providing the VB line.
  • FIG. 18 is a diagram illustrating a reference region in the second comparative example.
  • FIG. 18 is a diagram showing a reference region according to on or off of the deblocking filter in the second comparative example.
  • FIG. 18 shows the reference area when the deblocking filter is on.
  • the upper VB line is set to a line K above the CTU line, and the area below the upper VB line is set as the reference area of the adaptive filter.
  • FIG. 18 shows the reference area when the deblocking filter is off.
  • the upper VB line is set to the CTU line
  • the area below the upper VB line is set as the reference area of the adaptive filter.
  • FIG. 19 is a block diagram showing the configuration of the loop filter 305a. As shown in FIG. 19, the loop filter 305a includes a deblocking filter 305_1, an adaptive filter 305a_2, and an internal memory 305_3.
  • the adaptive filter 305a_2 includes a target pixel setting unit 305_2a, a reference area setting unit 305_2b, and a filter processing unit 305a_2c.
  • the filter processing unit 305a_2c multiplies each of the target pixel in the input image P, the pixels around the target pixel, and the activity calculated by referring to at least a part of the peripheral pixels, by a weighting factor. The point is different from the above embodiment.
  • the pixel value of the target pixel is s (N / 2), and the pixel values of its peripheral pixels are (s (0) to s (N / 2-1), s (N / 2 + 1) to s (N)
  • the filtering process can be expressed by the following equation.
  • sflt ( ⁇ a (i) * (s (i) + s (Ni)) + a (N / 2) * s (N / 2) + o)
  • a (i) is a filter coefficient
  • o is an offset
  • shift is a coefficient for normalization.
  • prodFlt a0 * (s0 + s24) + a1 * (s1 + s23) +... + a11 * (s11 + s13) + a12 * s12
  • sflt can be expressed by the following equation.
  • sflt (prodFlt + o) >> shift
  • SAD Sud of Absolute Difference, difference absolute value sum
  • the pixel value of the target pixel (s12) and pixels around the target pixel Can be calculated by the sum of the absolute values of the difference between each of the pixel values of at least a part of (s7, s11, s13, s17, and also referred to as a set S of pixels).
  • act (s7, s11, s13, s17)
  • act () can be represented by the following formula.
  • intermediate value d is introduced.
  • the intermediate value d is derived from the sum of the pixel values of the pixels around the target pixel, the pixel value of the target pixel, the activity act (x) of the pixel set S, and the predetermined constant KACT, as shown by the following equation can do.
  • the division can be implemented by combining multiplication processing of the table value table [i] for the divisor i and the dividend, and shift processing. For example, when dividing the dividend xxx by the divisor yyy, it can be processed as the following equation.
  • sflt (prodFlt + b0 * d + o) >> shift That is, in the filter processing units 305a_2c, processing for right bit shifting the result obtained by multiplying the weighting factor to the intermediate value derived from the activity is added.
  • the adaptive filter 305a_2 can adopt a set S of various pixels.
  • An example of the pixel set S will be described with reference to FIGS.
  • the adaptive filter 305a_2 can adopt, as a set S of pixels, pixels adjacent to the upper, lower, left, and right of the target pixel s12, as shown in FIG.
  • the intermediate value dN1 can be expressed by the following equation.
  • the adaptive filter 305a_2 can use the intermediate value dN1 as one of the terms of the adaptive filter ALF, as shown by the following equation.
  • the adaptive filter 305a_2 can adopt, as the set S of pixels, pixels adjacent to the upper, lower, left, and right of the target pixel s12 and diagonally as shown in FIG.
  • the intermediate value dN2 can be expressed by the following equation.
  • dN2 ⁇ (s6 + s7 + s8 + s11 + s13 + s16 + s17 + s18)-8 * s12 ⁇ / (KACT + act (s6, s7, s8, s11, s11, s12, s13, s16, s17, s18))
  • the adaptive filter 305a_2 can use the intermediate value dN2 as one of the terms of the adaptive filter ALF, as shown by the following equation.
  • the adaptive filter 305a_2 can adopt, as the set S of pixels, pixels adjacent to each other with a gap of one pixel above, below, to the left, and to the right of the target pixel s12.
  • the intermediate value dN3 can be expressed by the following equation.
  • dN3 ⁇ (s0 + s1 + s2 + s3 + s4 + s5 + s9 + s10 + s14 + s15 + s19 + s20 + s21 + s22 + s23 + s24)-16 * s12 ⁇ / (KACT + act (s0, s1) , s2, s3, ..., s24))
  • the adaptive filter 305a_2 can use the intermediate value dN3 as one of the terms of the adaptive filter ALF, as shown by the following equation.
  • the adaptive filter 305a_2 can use a plurality of different intermediate values d as a term of the adaptive filter ALF as indicated by the following equation.
  • an intermediate value dN1 in the case of adopting the pixel set S shown in FIG. 20 and an intermediate value dN2 in the case of adopting the pixel group S shown in FIG. 21 are used.
  • the filter processing units 305a_2c process the sum of the terms obtained by multiplying the weighting factor to the intermediate value derived from the activity. Furthermore, the filter processing units 305a_2c performs a process of right bit shifting the result obtained by taking the sum.
  • the adaptive filter 305a_2 may include pixels aligned in the horizontal direction, the vertical direction, and the diagonal direction in the set S of pixels (that is, the pixels referred to for calculating the activity).
  • the adaptive filter 305a_2 can adopt, as the set S of pixels, pixels aligned in the horizontal direction with the target pixel s12 in the CTU, as shown in FIG.
  • the intermediate value dH can be expressed by the following equation.
  • the adaptive filter 305a_2 adopts, as the pixel set S, pixels aligned in the vertical direction with the target pixel s12 in the CTU, the intermediate value dV can be expressed by the following equation.
  • the adaptive filter 305a_2 can use the intermediate values dH and dV as the terms of the adaptive filter ALF, as shown by the following equation.
  • the adaptive filter 305a_2 can adopt, as a set S of pixels, pixels that are diagonally aligned with the target pixel s12 in the CTU.
  • the intermediate value dD1 can be expressed by the following equation.
  • the adaptive filter 305a_2 adopts, in the CTU, pixels aligned in the vertical direction symmetrical to the target pixel s12 in the direction shown in FIG. 24 as the pixel set S, the intermediate value dD2 can be expressed by the following equation.
  • the adaptive filter 305a_2 can use the intermediate values dD1 and dD2 as the terms of the adaptive filter ALF, as shown by the following equation.
  • dD23 ⁇ (s1 + s23)-2 * s12 ⁇ / (KACT + act (s1, s12, s23))
  • dD21 ⁇ (s3 + s21)-2 * s12 ⁇ / (KACT + act (s3, s12, s21))
  • dD19 ⁇ (s5 + s19)-2 * s12 ⁇ / (KACT + act (s5, s12, s19))
  • dD15 ⁇ (s9 + s15)-2 * s12 ⁇ / (KACT + act (s9, s15, s21))
  • the adaptive filter 305a_2 can use the intermediate values dD23, dD21, dD19, and dD15 as the terms of the adaptive filter ALF, as indicated by the following equation.
  • the adaptive filter 305a_2 has an intermediate value dH derived from the set S of pixels horizontally aligned with the target pixel s12, an intermediate value dV derived from the set S of pixels vertically aligned with the target pixel s12, and Intermediate values dD1 and dD2 derived from a set S of pixels of pixels aligned in a diagonal direction with the target pixel s12 can be used as a term of the adaptive filter ALF as shown by the following equation.
  • the adaptive filter ALF has a term obtained by multiplying each of the activities calculated by referring to at least a part of surrounding pixels by a weighting factor.
  • the filter strength of the adaptive filter ALF can be adjusted in pixel units. Also, the filter strength of the adaptive filter ALF can be changed according to the sequence or block.
  • FIG. 4 is a block diagram showing the configuration of the image coding apparatus 11 according to the present embodiment.
  • the image coding device 11 includes a predicted image generation unit 101, a subtraction unit 102, a DCT / quantization unit 103, an entropy coding unit 104, an inverse quantization / inverse DCT unit 105, an addition unit 106, a loop filter 107, a prediction parameter memory (Prediction parameter storage unit, frame memory) 108, reference picture memory (reference image storage unit, frame memory) 109, coding parameter determination unit 110, and prediction parameter coding unit 111 are configured.
  • the prediction parameter coding unit 111 includes an inter prediction parameter coding unit 112 and an intra prediction parameter coding unit 113.
  • the prediction image generation unit 101 generates, for each picture of the image T, the prediction image P of the prediction unit PU for each coding unit CU, which 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 coding unit 111.
  • the prediction parameter input from the prediction parameter coding 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 starting from the target PU.
  • the prediction parameter is, for example, an intra prediction mode.
  • the pixel value of the adjacent PU used in the intra prediction mode is read from the reference picture memory 109, and a PU predicted image P is generated.
  • the prediction image generation unit 101 generates a PU prediction image P using one of a plurality of prediction methods for the read reference picture block.
  • the prediction image generation unit 101 outputs the generated prediction image P of PU to the subtraction unit 102.
  • FIG. 6 is a schematic diagram showing a configuration of the inter predicted image generation unit 1011 included in the predicted image generation unit 101.
  • the inter prediction image generation unit 1011 includes a motion compensation unit 10111 and a weight prediction unit 10112.
  • the motion compensation unit 10111 and the weight prediction unit 10112 have the same configuration as that of the above-described motion compensation unit 3091 and weight prediction unit 3094, and therefore the description thereof is omitted here.
  • the prediction image generation unit 101 generates a PU prediction image P based on the pixel value of the reference block read from the reference picture memory, using the parameter input from the prediction parameter coding 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 to generate 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 to calculate DCT coefficients.
  • 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 coding unit 104 receives the quantization coefficient from the DCT / quantization unit 103, and receives the coding parameter from the prediction parameter coding unit 111.
  • the coding parameters to be input include, for example, codes such as a reference picture index refIdxLX, a prediction vector index mvp_LX_idx, a difference vector mvdLX, a prediction mode predMode, and a merge index merge_idx.
  • the entropy coding unit 104 entropy-codes the input quantization coefficient and coding parameters to generate a coded stream Te, and outputs the generated coded stream Te to the outside.
  • 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 coefficients 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, for each pixel, the signal value of the predicted 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 decoding. Generate an image.
  • the addition unit 106 stores the generated decoded image in the reference picture memory 109.
  • the loop filter 107 applies a deblocking filter, a sample adaptive offset (SAO), and an adaptive filter (ALF) to the decoded image generated by the adding unit 106.
  • a deblocking filter a sample adaptive offset (SAO)
  • ALF adaptive filter
  • the prediction parameter memory 108 stores the prediction parameter generated by the coding parameter determination unit 110 in a predetermined position for each picture and CU to be coded.
  • the reference picture memory 109 stores the decoded image generated by the loop filter 107 in a predetermined position for each picture and CU to be encoded.
  • the coding parameter determination unit 110 selects one of a plurality of sets of coding parameters.
  • the coding parameter is a prediction parameter described above or a parameter to be coded that is generated in association with the prediction parameter.
  • the prediction image generation unit 101 generates a PU prediction image P using each of these sets of coding parameters.
  • the coding parameter determination unit 110 calculates, for each of the plurality of sets, a cost value indicating the size of the information amount and the coding error.
  • the cost value is, for example, the sum of the code amount and a value obtained by multiplying the square error by the coefficient ⁇ .
  • the code amount is the information amount of the coded stream Te obtained by entropy coding the quantization error and the coding parameter.
  • the squared error is a sum between pixels with respect to the square value of the residual value of the residual signal calculated by the subtraction unit 102.
  • the factor ⁇ is a real number greater than a preset zero.
  • the coding parameter determination unit 110 selects a set of coding parameters that minimize the calculated cost value.
  • the entropy coding unit 104 externally outputs the set of selected coding parameters as the coded stream Te, and does not output the set of non-selected coding parameters.
  • the coding parameter determination unit 110 stores the determined coding parameters in the prediction parameter memory 108.
  • the prediction parameter coding unit 111 derives a format for coding from the parameters input from the coding parameter determination unit 110, and outputs the format to the entropy coding unit 104. Derivation of a form for encoding is, for example, derivation of a difference vector from a motion vector and a prediction vector. Further, the prediction parameter coding unit 111 derives parameters necessary to generate a prediction image from the parameters input from the coding parameter determination unit 110, and outputs the parameters to the prediction image generation unit 101.
  • the parameters required to generate a predicted image are, for example, motion vectors in units of subblocks.
  • the inter prediction parameter coding unit 112 derives inter prediction parameters such as a difference vector based on the prediction parameters input from the coding parameter determination unit 110.
  • the inter prediction parameter coding unit 112 derives the inter prediction parameter by the inter prediction parameter decoding unit 303 (refer to FIG. 5 and the like) as a configuration for deriving the parameters necessary for generating the prediction image to be output to the prediction image generation unit 101. Partially include the same configuration as the configuration. The configuration of the inter prediction parameter coding unit 112 will be described later.
  • the intra prediction parameter coding unit 113 derives a format (for example, MPM_idx, rem_intra_luma_pred_mode, etc.) for coding from the intra prediction mode IntraPredMode input from the coding parameter determination unit 110.
  • a format for example, MPM_idx, rem_intra_luma_pred_mode, etc.
  • loop filter 107 has the same function as the loop filter 305 included in the image decoding device 31 described above. More specifically, an adaptive filter using a reference restriction line may be used. Also, the term of the adaptive loop filter may be changed on a pixel basis based on the activity.
  • the adaptive filter 305 _ 2 may classify small classes (eg, 2 ⁇ 2 or 4 ⁇ 4) into classes having the same property, and apply different filter coefficients to the classified classes.
  • small classes eg, 2 ⁇ 2 or 4 ⁇ 4
  • an identifier classid indicating a class may be derived from the directionality DIR of the small block and the activity ACT according to the following equation.
  • FIG. 25 is a diagram visualizing the values of the filter coefficients derived by the adaptive filter 305_2 in units of classes. Although FIG. 25 is plotted as a binary image, gradation is not represented, but it is actually a smooth figure. Two-dimensional values of filter coefficients (hereinafter, filter coefficient shapes) can be expressed for 25 classes corresponding to each DIR and ACT. In addition, it is possible to evaluate how much the filter coefficient shape differs depending on the class. As a result of the inventor's evaluation, it has been confirmed that the shape of the filter coefficient is greatly different for each sequence, each class, each frame, and each quantization step.
  • filter coefficient shapes Two-dimensional values of filter coefficients
  • FIG. 26 is a diagram showing the residual amount (residual reduction amount gain) which has changed before and after application of the filter coefficient derived by the adaptive filter 305_2 in units of classes.
  • fltin, fltout, and org are the pixel value before the filter, the pixel value after the filter, and the pixel value of the original image, respectively
  • (x, y) are the positions of the pixels belonging to the class classid.
  • the difference gain is large, the residual largely decreases before and after the adaptive filter.
  • (B) of FIG. 26 shows the appearance frequency of the class classified by the adaptive filter 305_2. It is a value obtained by dividing the number classified into each class by the total number of blocks when classifying into small blocks. It can be obtained by counting the classid at each position (x, y) as follows.
  • the adaptive filter 305 _ 2 is a filter coefficient based on the evaluation of the filter coefficient on a class basis, the residual reduction amount on a class basis, and the occurrence frequency on a class basis shown in FIG. 25 and FIGS. You may design.
  • the adaptive filter 305 _ 2 may turn off the adaptive filtering of the class “classid” when the residual reduction amount in units of classes is less than a predetermined threshold.
  • Whether to turn off the adaptive filter processing may encode syntax alf_class_flag [classidx] indicating whether the adaptive filter is turned on or off in the class classid.
  • the syntax alf_class_flag [classid] indicating whether the adaptive filter is turned on or off may be further encoded in an image area or in units of blocks (for example, in units of CUs). For example, alf_cu_flag [x] [y] indicates on / off.
  • alf_class_flag [classid] If alf_class_flag [classid] is 1, the loop filter 305 performs adaptive filter processing on the pixel of the class indicated by the classid of the target pixel using the filter coefficient indicated by the classid. Otherwise, adaptive filter processing is not performed.
  • the image decoding device 31 further decodes alf_cu_flag [x] [y] from the slice header, and the loop filter 305 determines that alf_cu_flag [x] [y] of the position (x, y) of the target pixel is 1. And if alf_class_flag [classid] is 1 for the classid of the position (x, y) of the target pixel, adaptive filter processing is performed on the target pixel using the filter coefficient indicated by the classid. Otherwise, adaptive filter processing is not performed.
  • the image encoding device 11 and a part of the image decoding device 31 in the embodiment described above for example, the entropy decoding unit 301, the prediction parameter decoding unit 302, the loop filter 305, the prediction 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 coding unit 104, inverse quantization / inverse DCT unit 105, loop filter 107, coding parameter determination unit 110,
  • the prediction parameter coding unit 111 may be realized by a computer.
  • a program for realizing the control function may be recorded in a computer readable recording medium, and the computer system may read and execute the program recorded in the recording medium.
  • the “computer system” is a computer system built in any of the image encoding device 11 and the image decoding device 31, and includes an OS and hardware such as peripheral devices.
  • the “computer-readable recording medium” means a portable medium such as a flexible disk, a magneto-optical disk, a ROM, a CD-ROM, or a storage device such as a hard disk built in a computer system.
  • the “computer-readable recording medium” is one that holds a program dynamically for a short time, like a communication line in the case of transmitting a program via a network such as the Internet or a communication line such as a telephone line.
  • a volatile memory in a computer system serving as a server or a client may be included, which holds a program for a predetermined time.
  • the program may be for realizing a part of the functions described above, or may be realized in combination with the program already recorded in the 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 a large scale integration (LSI).
  • LSI large scale integration
  • Each functional block of the image encoding device 11 and the image decoding device 31 may be individually processorized, or part or all may be integrated and processorized.
  • the method of circuit integration is not limited to LSI's, and implementation using dedicated circuitry or general purpose processors is also possible. In the case where an integrated circuit technology comes out to replace LSI's as a result of the advancement of semiconductor technology, integrated circuits based on such technology may also be used.
  • the image encoding device 11 and the image decoding device 31 described above can be mounted and used in various devices that transmit, receive, record, and reproduce moving images.
  • the moving image may be a natural moving image captured by a camera or the like, or an artificial moving image (including CG and GUI) generated by a computer or the like.
  • FIG. 27 is a block diagram showing a configuration of a transmission device PROD_A on which the image coding device 11 is mounted.
  • the transmission device PROD_A modulates a carrier wave with the coding unit PROD_A1 for obtaining coded data by coding a moving image, and the coding data obtained by the coding unit PROD_A1.
  • the image coding apparatus 11 described above is used as the coding unit PROD_A1.
  • the transmission device PROD_A is a camera PROD_A4 for capturing a moving image, a recording medium PROD_A5 for recording the moving image, an input terminal PROD_A6 for externally inputting the moving image, and a transmission source of the moving image input to the encoding unit PROD_A1. , And may further include an image processing unit A7 that generates or processes an image. In (a) of FIG. 27, although the configuration in which the transmission device PROD_A includes all of these is illustrated, a part of the configuration may be omitted.
  • the recording medium PROD_A5 may be a recording of a non-coded moving image, or a moving image encoded by a recording encoding method different from the transmission encoding method. It may be one. In the latter case, it is preferable to interpose, between the recording medium PROD_A5 and the encoding unit PROD_A1, a decoding unit (not shown) that decodes the encoded data read from the recording medium PROD_A5 according to the encoding scheme for recording.
  • FIG. 27 is a block diagram showing a configuration of a reception device PROD_B on which the image decoding device 31 is mounted.
  • the receiver PROD_B demodulates the modulated signal received by the receiver PROD_B1, which receives the modulated signal, and the demodulator PROD_B2, which obtains encoded data by demodulating the modulated signal received by the receiver PROD_B1, and And a decoding unit PROD_B3 for obtaining a moving image by decoding encoded data obtained by the unit PROD_B2.
  • the image decoding device 31 described above is used as the decoding unit PROD_B3.
  • the receiving device PROD_B is a display PROD_B4 for displaying a moving image, a recording medium PROD_B5 for recording the 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. It may further comprise PROD_B6. Although (b) of FIG. 27 illustrates the configuration in which the reception device PROD_B includes all of these, a part may be omitted.
  • the recording medium PROD_B5 may be for recording a moving image which has not been encoded, or is encoded by a recording encoding method different from the transmission encoding method. May be In the latter case, an encoding unit (not shown) may be interposed between the decoding unit PROD_B3 and the recording medium PROD_B5 to encode the moving image acquired from the decoding unit PROD_B3 according to the encoding method for recording.
  • the transmission medium for transmitting the modulation signal may be wireless or wired.
  • the transmission mode for transmitting the modulation signal may be broadcast (here, a transmission mode in which the transmission destination is not specified in advance), or communication (in this case, transmission in which the transmission destination is specified in advance) (Refer to an aspect). That is, transmission of the modulation signal may be realized by any of wireless broadcast, wired broadcast, wireless communication, and wired communication.
  • a broadcasting station (broadcasting facility etc.) / Receiving station (television receiver etc.) of terrestrial digital broadcasting is an example of a transmitting device PROD_A / receiving device PROD_B which transmits and receives a modulated signal by wireless broadcasting.
  • a cable television broadcast station (broadcasting facility or the like) / receiving station (television receiver or the like) is an example of a transmitting device PROD_A / receiving device PROD_B which transmits and receives a modulated signal by cable broadcasting.
  • a server such as a workstation
  • client such as a VOD (Video On Demand) service or a video sharing service using the Internet
  • PROD_A / receiving device PROD_B
  • the personal computer includes a desktop PC, a laptop PC, and a tablet PC.
  • the smartphone also includes a multifunctional mobile phone terminal.
  • the client of the moving image sharing service has a function of encoding a moving image captured by a camera and uploading it to the server. That is, the client of the moving image sharing service functions as both the transmitting device PROD_A and the receiving device PROD_B.
  • FIG. 28 is a block diagram showing a configuration of a recording device PROD_C on which the image coding device 11 described above is mounted.
  • the recording device PROD_C uses the encoding unit PROD_C1, which obtains encoded data by encoding a moving image, and the encoded data obtained by the encoding unit PROD_C1, to the recording medium PROD_M.
  • a writing unit PROD_C2 for writing.
  • the image coding device 11 described above is used as the coding unit PROD_C1.
  • the recording medium PROD_M may be (1) a type incorporated in the recording device PROD_C, such as a hard disk drive (HDD) or a solid state drive (SSD), or (2) an SD memory. It may be of a type connected to the recording device PROD_C, such as a card or a Universal Serial Bus (USB) flash memory, or (3) a DVD (Digital Versatile Disc) or a BD (Blu-ray Disc: Registration It may be loaded into a drive device (not shown) built in the recording device PROD_C, such as a trademark).
  • a type incorporated in the recording device PROD_C such as a hard disk drive (HDD) or a solid state drive (SSD), or (2) an SD memory. It may be of a type connected to the recording device PROD_C, such as a card or a Universal Serial Bus (USB) flash memory, or (3) a DVD (Digital Versatile Disc) or a BD (Blu-ray Disc: Registration It may be loaded into
  • the recording device PROD_C is a camera PROD_C3 for capturing a moving image as a supply source of the moving image input to the encoding unit PROD_C1, an input terminal PROD_C4 for inputting the moving image from the outside, and a reception for receiving the moving image
  • the image processing unit PROD_C5 may further include an image processing unit PROD_C6 that generates or processes an image.
  • FIG. 28 exemplifies a configuration in which the recording apparatus PROD_C includes all of these, a part may be omitted.
  • the receiving unit PROD_C5 may receive an uncoded moving image, and receives encoded data encoded by a transmission encoding scheme different from the recording encoding scheme. It may be In the latter case, it is preferable to interpose a transmission decoding unit (not shown) that decodes encoded data encoded by the transmission encoding scheme 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, etc.
  • the input terminal PROD_C4 or the receiving unit PROD_C5 is a main supply source of moving images).
  • a camcorder in this case, the camera PROD_C3 is the main supply source of moving images
  • a personal computer in this case, the receiving unit PROD_C5 or the image processing unit C6 is the main supply source of moving images
  • a smartphone this In this case, the camera PROD_C3 or the receiving unit PROD_C5 is a main supply source of moving images
  • the like are also examples of such a recording device PROD_C.
  • FIG. 28 is a block showing the configuration of the playback device PROD_D on which the image decoding device 31 described above is mounted.
  • the playback device PROD_D decodes the moving image by decoding the encoded data read by the reading unit PROD_D1 that reads the encoded data written to the recording medium PROD_M and the reading unit PROD_D1. And a decryption unit PROD_D2 to be obtained.
  • the image decoding device 31 described above is used as the decoding unit PROD_D2.
  • the recording medium PROD_M may be (1) a type incorporated in the playback device PROD_D such as an HDD or an SSD, or (2) such as an SD memory card or a USB flash memory. It may be of a type connected to the playback device PROD_D, or (3) it may be loaded into a drive device (not shown) built in the playback device PROD_D, such as DVD or BD. Good.
  • the playback device PROD_D is a display 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. It may further comprise PROD_D5. Although (b) of FIG. 28 exemplifies a configuration in which the playback device PROD_D includes all of these, a part may be omitted.
  • the transmission unit PROD_D5 may transmit a non-encoded moving image, or transmit encoded data encoded by a transmission encoding method different from the recording encoding method. It may be In the latter case, an encoding unit (not shown) may be interposed between the decoding unit PROD_D2 and the transmission unit PROD_D5 for encoding moving pictures according to a transmission encoding scheme.
  • a playback device PROD_D for example, a DVD player, a BD player, an HDD player, etc. may be mentioned (in this case, the output terminal PROD_D4 to which a television receiver etc. is connected is the main supply destination of moving images) .
  • the display PROD_D3 is the main supply destination of moving images
  • digital signage also referred to as an electronic signboard or electronic bulletin board, etc.
  • the display PROD_D3 or the transmission unit PROD_D5 is the main supply of moving images.
  • desktop type PC in this case, output terminal PROD_D4 or transmission unit PROD_D5 is the main supply destination of moving images
  • laptop type or tablet type PC in this case, display PROD_D3 or transmission unit PROD_D5 is moving image
  • the main supply destination of the image the smartphone (in this case, the display PROD_D3 or the transmission unit PROD_D5 is the main supply destination of the moving image), and the like are also examples of such a reproduction device PROD_D.
  • each block of the image decoding device 31 and the image encoding device 11 described above may be realized as hardware by a logic circuit formed on an integrated circuit (IC chip), or a CPU (Central Processing Unit) It may be realized as software using
  • each of the devices described above includes a CPU that executes instructions of a program that implements each function, a ROM (Read Only Memory) that stores the program, a RAM (Random Access Memory) that expands the program, the program, and various other methods.
  • a storage device such as a memory for storing data is provided.
  • the object of the embodiment of the present invention is to record computer program readable program codes (execution format program, intermediate code program, source program) of control programs of the above-mentioned respective devices which are software for realizing the functions described above.
  • the present invention can also be achieved by supplying a medium to each of the above-described devices, and a computer (or a CPU or an MPU) reading and executing a program code recorded on a recording medium.
  • Examples of the recording medium include tapes such as magnetic tapes and cassette tapes, magnetic disks such as floppy (registered trademark) disks / hard disks, CDs (Compact Disc Read-Only Memory) / MO disks (Magneto-Optical disc).
  • tapes such as magnetic tapes and cassette tapes
  • magnetic disks such as floppy (registered trademark) disks / hard disks
  • CDs Compact Disc Read-Only Memory
  • MO disks Magnetic-Optical disc
  • Disks including optical disks such as MD (Mini Disc) / DVD (Digital Versatile Disc) / CD-R (CD Recordable) / Blu-ray Disc (registered trademark), IC cards (including memory cards) Cards such as optical cards, mask ROMs / erasable programmable read-only memories (EPROMs) / electrically erasable and programmable read-only memories (EEPROMs) / semiconductor memories such as flash ROMs, or programmable logic devices (PLDs) And logic circuits such as FPGA (Field Programmable Gate Array) can be used.
  • MD Mini Disc
  • DVD Digital Versatile Disc
  • CD-R Compact Disc
  • Blu-ray Disc registered trademark
  • IC cards including memory cards
  • Cards such as optical cards
  • EPROMs erasable programmable read-only memories
  • EEPROMs electrically erasable and programmable read-only memories
  • semiconductor memories such as flash ROMs, or programmable logic devices (PLD
  • each device may be configured to be connectable to a communication network, and the program code may be supplied via the communication network.
  • This communication network is not particularly limited as long as the program code can be transmitted.
  • the Internet intranet, extranet, LAN (Local Area Network), ISDN (Integrated Services Digital Network), VAN (Value-Added Network), CATV (Community Antenna television / Cable Television) communication network, virtual private network (Virtual Private) Network), telephone network, mobile communication network, satellite communication network, etc.
  • the transmission medium that constitutes this communication network may be any medium that can transmit the program code, and is not limited to a specific configuration or type.
  • the embodiment of the present invention may 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 not limited to the above-described embodiments, and various modifications are possible within the scope of the claims. That is, an embodiment obtained by combining technical means appropriately modified within the scope of the claims is also included in the technical scope of the present invention.
  • An image filter device (loop filter 107, 305) according to aspect 1 of the present invention is an image filter device that generates an output image by acting on an input image composed of a plurality of basic unit areas, and the basic unit
  • a boundary filter unit (deblocking filter 305_1) acting on a block boundary including a boundary of a region and an adaptive filter unit (adaptive filter 305_2) are provided, and the boundary filter unit turns on / off the boundary filter of slice boundaries or tile boundaries.
  • the adaptive filter unit sets virtual boundaries different in position depending on whether the filtering process by the boundary filter unit is on or off at a slice boundary or a tile boundary, and the virtual boundary
  • the filter processing is performed with reference to the pixel value located inside.
  • the adaptive filter unit sets virtual boundaries different in position depending on whether the filtering process by the boundary filter unit is on or off at the slice boundary or tile boundary, so that the virtual boundary
  • the pixel values located inside can be referred to, and filtering can be performed efficiently.
  • the boundary filter unit refers to the pixel value of the pixel outside the virtual boundary
  • the pixel value is The pixel value of the pixel within the virtual boundary and adjacent to the virtual boundary may be replaced.
  • the boundary filter unit refers to the pixel value of the pixel outside the virtual boundary
  • the pixel value is It may be replaced with the pixel value of the central pixel of the filter reference area that is the pixel within the virtual boundary.
  • the average pixel value in the filter reference area can be replaced.
  • An image filter device (loop filter 305a) according to aspect 4 of the present invention includes a filter unit (filter processing units 305a_2c) that generates an output image by acting on an input image, and the filter processing by the filter unit A process of multiplying each of the target pixel in the input image, the pixels around the target pixel, and the activity calculated by referring to at least a part of the peripheral pixels may be included by multiplying the weighting factor .
  • a filter according to the image characteristic can be applied to the input image data.
  • pixels to which reference is made to calculate the activity include pixels lined in the horizontal direction, vertical direction, and diagonal direction. May be included.
  • An embodiment of the present invention is suitably applied to an image decoding apparatus that decodes encoded data obtained by encoding image data, and an image encoding apparatus that generates encoded data obtained by encoding image data. it can. Further, the present invention can be suitably applied to the data structure of encoded data generated by the image encoding device and referenced by the image decoding device.
  • Image Coding Device 31 Image Decoding Device 107, 305, 305a Loop Filter (Image Filter Device) 305_1 Deblocking filter (boundary filter part) 305_2 Adaptive filter (Adaptive filter section) 305a_2c Filter processing unit (filter unit)

Landscapes

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

Abstract

A filter corresponding to image characteristics is applied to input image data. A loop filter (305) which generates an output image by acting on an input image configured from multiple basic unit regions, is provided with: a de-blocking filter (305_1) which acts on block boundaries including the boundaries of basic unit regions; and an adaptive filter (305_2). A boundary filter of slice boundaries or tile boundaries can be turned on and off in the de-blocking filter (305_1). The adaptive filter (305_2) sets a virtual boundary in different positions depending on whether filter processing by the de-blocking filter (305_1) is on or is off in the slice boundaries or the tile boundaries, and performs filter processing referring to the pixel values located within said virtual boundary.

Description

画像フィルタ装置、画像復号装置、および画像符号化装置Image filter device, image decoding device, and image encoding device
 本発明の実施形態は、画像フィルタ装置、画像復号装置、および画像符号化装置に関する。 Embodiments of the present invention relate to an image filter device, an image decoding device, and an image coding device.
 動画像を効率的に伝送または記録するために、動画像を符号化することによって符号化データを生成する動画像符号化装置、および、当該符号化データを復号することによって復号画像を生成する動画像復号装置が用いられている。 A moving picture coding apparatus that generates coded data by coding a moving picture to efficiently transmit or record a moving picture, and a moving picture that generates a decoded picture by decoding the coded data. An image decoding device is used.
 具体的な動画像符号化方式としては、例えば、H.264/AVCやHEVC(High-Efficiency Video Coding)にて提案されている方式などが挙げられる。 As a specific moving picture coding method, for example, a method proposed in H.264 / AVC or High-Efficiency Video Coding (HEVC) may be mentioned.
 このような動画像符号化方式においては、動画像を構成する画像(ピクチャ)は、画像を分割することにより得られるスライス、スライスを分割することにより得られる符号化単位(符号化ユニット(Coding Unit:CU)と呼ばれることもある)、及び、符号化単位を分割することより得られるブロックである予測ユニット(PU)、変換ユニット(TU)からなる階層構造により管理され、CUごとに符号化/復号される。 In such a moving picture coding method, an image (picture) constituting a moving picture is a slice obtained by dividing the image, a coding unit obtained by dividing the slice (coding unit (coding unit (Coding Unit)). (Also referred to as CU) and a hierarchical structure including a prediction unit (PU) which is a block obtained by dividing a coding unit and a transform unit (TU), and coding / It is decoded.
 また、このような動画像符号化方式においては、通常、入力画像を符号化/復号することによって得られる局所復号画像に基づいて予測画像が生成され、当該予測画像を入力画像(原画像)から減算して得られる予測残差(「差分画像」または「残差画像」と呼ぶこともある)が符号化される。予測画像の生成方法としては、画面間予測(インター予測)、および、画面内予測(イントラ予測)が挙げられる。 Also, in such a moving picture coding method, a predicted picture is usually generated based on a locally decoded picture obtained by coding / decoding an input picture, and the predicted picture is generated from the input picture (original picture). The prediction residual obtained by subtraction (sometimes referred to as "difference image" or "residual image") is encoded. As a method of generating a prediction image, inter-screen prediction (inter prediction) and intra-screen prediction (intra prediction) can be mentioned.
 また、近年の動画像符号化及び復号の技術として非特許文献1が挙げられる。 In addition, Non-Patent Document 1 can be cited as a technology for moving picture encoding and decoding in recent years.
 本発明は、上記の問題に鑑みてなされたものであり、その目的は、従来の構成に比べて、入力画像データに対し、画像特性に応じたフィルタの適用を実現することにある。 The present invention has been made in view of the above problems, and an object thereof is to realize application of a filter according to an image characteristic to input image data as compared with a conventional configuration.
 上記の課題を解決するために、本発明に係る画像フィルタ装置は、複数の基本単位領域から構成される入力画像に作用することによって出力画像を生成する画像フィルタ装置であって、上記基本単位領域の境界を含むブロック境界に作用する境界フィルタ部と、適応フィルタ部とを備え、上記境界フィルタ部は、スライス境界もしくはタイル境界の境界フィルタのオンオフが可能であって、上記適応フィルタ部は、上記境界フィルタ部によるフィルタ処理がスライス境界もしくはタイル境界においてオンであるかオフであるかに応じて位置の異なる仮想的境界を設定し、当該仮想的境界内に位置する画素値を参照してフィルタ処理を行う。 In order to solve the above problems, an image filter device according to the present invention is an image filter device that generates an output image by acting on an input image composed of a plurality of basic unit regions, and the basic unit region And an adaptive filter unit, wherein the boundary filter unit is capable of turning on and off the boundary filter of the slice boundary or the tile boundary, and the adaptive filter unit includes the boundary filter unit. Different virtual boundaries are set depending on whether the filtering process by the boundary filter unit is on or off at slice boundaries or tile boundaries, and filtering is performed with reference to pixel values located within the virtual boundaries. I do.
 上記の課題を解決するために、本発明に係る画像フィルタ装置は、入力画像に作用することによって出力画像を生成するフィルタ部を備え、上記フィルタ部によるフィルタ処理には、上記入力画像における対象画素、上記対象画素の周囲の画素、及び、上記周囲の画素の少なくとも一部を参照することによって算出されたアクティビティのそれぞれに対して重み係数を乗算する処理が含まれる。 In order to solve the above-mentioned subject, the image filter device concerning the present invention is provided with the filter part which generates an output picture by acting on an input image, and the object pixel in the above-mentioned input picture is processed by the filter processing by the above-mentioned filter part. And a process of multiplying each of the pixels around the target pixel and the activity calculated by referring to at least a part of the surrounding pixels by a weighting factor.
 従来の構成に比べて、入力画像データに対し、画像特性に応じたフィルタを適用することができる。 Compared to the conventional configuration, a filter according to image characteristics can be applied to input image data.
第1の実施形態に係る符号化ストリームのデータの階層構造を示す図である。It is a figure which shows the hierarchical structure of the data of the encoding stream which concerns on 1st Embodiment. PU分割モードのパターンを示す図である。(a)~(h)は、それぞれ、PU分割モードが、2Nx2N、2NxN、2NxnU、2NxnD、Nx2N、nLx2N、nRx2N、および、NxNの場合のパーティション形状について示している。It is a figure which shows the pattern of PU split mode. (A) to (h) show the partition shapes when the PU division mode is 2Nx2N, 2NxN, 2NxnU, 2NxnD, Nx2N, nLx2N, nRx2N, and NxN, respectively. 参照ピクチャおよび参照ピクチャリストの一例を示す概念図である。It is a conceptual diagram which shows an example of a reference picture and a reference picture list. 第1の実施形態に係る画像符号化装置の構成を示すブロック図である。It is a block diagram which shows the structure of the image coding apparatus which concerns on 1st Embodiment. 第1の実施形態に係る画像復号装置の構成を示す概略図である。It is the schematic which shows the structure of the image decoding apparatus which concerns on 1st Embodiment. 第1の実施形態に係る画像符号化装置のインター予測画像生成部の構成を示す概略図である。It is the schematic which shows the structure of the inter estimated image generation part of the image coding apparatus concerning 1st Embodiment. 第1の実施形態に係る動画像復号装置の備えるループフィルタの構成を示すブロック図である。It is a block diagram which shows the structure of the loop filter with which the moving image decoding apparatus which concerns on 1st Embodiment is provided. 第1の実施形態に係るループフィルタの参照領域設定部およびフィルタ処理部による処理を示すフローチャートである。。It is a flowchart which shows the process by the reference area setting part of the loop filter which concerns on 1st Embodiment, and a filter process part. . 第1の実施形態における参照制限ラインについて説明するための図である。It is a figure for demonstrating the reference restriction line in 1st Embodiment. 第1の実施形態に係るループフィルタの参照領域設定部が実行する詳細な処理を示すフローチャートである。It is a flowchart which shows the detailed process which the reference area setting part of the loop filter which concerns on 1st Embodiment performs. 第1の実施形態に係るループフィルタの参照領域設定部が、デブロッキングフィルタによるフィルタ処理がオフの場合に実行する処理の詳細を示すフローチャートである。It is a flowchart which shows the detail of the process which the reference area setting part of the loop filter which concerns on 1st Embodiment performs when the filter processing by a deblocking filter is OFF. 第1の実施形態における参照領域の詳細について説明するための図であり、(a)は対象画素がtop partに位置する場合の参照領域を示し、(b)は対象画素がbottom partに位置する場合の参照領域を示す。It is a figure for demonstrating the detail of the reference area in 1st Embodiment, (a) shows a reference area in case an object pixel is located in top part, (b) is an object pixel located in bottom part Indicates the reference area of the case. 第1の実施形態に係るループフィルタのフィルタ処理部が実行する処理の詳細を示すフローチャートである。It is a flowchart which shows the detail of the process which the filter process part of the loop filter which concerns on 1st Embodiment performs. 第1の実施形態に係るループフィルタのフィルタ処理部が参照するテーブルの例である。It is an example of the table which the filter process part of the loop filter which concerns on 1st Embodiment refers. 第1の実施形態に係るループフィルタの参照領域設定部が設定する参照制限ラインの他の例を示す図である。It is a figure which shows the other example of the reference restriction line which the reference area setting part of the loop filter which concerns on 1st Embodiment sets. 第1の実施形態に係るループフィルタのフィルタ処理部による参照画素位置設定の処理の例を示す図である。It is a figure which shows the example of the process of the reference pixel position setting by the filter process part of the loop filter which concerns on 1st Embodiment. 比較例における参照領域を示す図である。It is a figure which shows the reference area | region in a comparative example. 比較例においてデブロッキングフィルタのオンまたはオフに応じた参照領域を示す図であり、(a)はデブロッキングフィルタがオンの場合の参照領域を示し、(b)はデブロッキングフィルタがオフの場合の参照領域を示す。It is a figure which shows the reference area according to on / off of the deblocking filter in a comparative example, (a) shows the reference area when the deblocking filter is on, (b) shows the case where the deblocking filter is off Indicates a reference area. 第8の実施形態に係る動画像復号装置の備えるループフィルタの構成を示すブロック図である。It is a block diagram which shows the structure of the loop filter with which the moving image decoding apparatus which concerns on 8th Embodiment is provided. 第9の実施形態における参照画素の一例を示す図である。It is a figure which shows an example of the reference pixel in 9th Embodiment. 第10の実施形態における参照画素の他の例を示す図である。It is a figure which shows the other example of the reference pixel in 10th Embodiment. 第11の実施形態における参照画素の他の例を示す図である。It is a figure which shows the other example of the reference pixel in 11th Embodiment. 第12の実施形態における参照画素の他の例を示す図である。It is a figure which shows the other example of the reference pixel in 12th Embodiment. 第13の実施形態における参照画素の他の例を示す図である。It is a figure which shows the other example of the reference pixel in 13th Embodiment. 適応フィルタ305_2で導出したフィルタ係数を、クラス単位で可視化したものを示す。The filter coefficients derived by the adaptive filter 305_2 are visualized in class units. (a)は、適応フィルタ305_2で導出したフィルタ係数を適応する前後の残差の量の差である残差削減量gainをクラス単位で示した図であり、(b)は、適応フィルタ305_2で分類したクラスの出現頻度frequencyを示す。(A) is a figure which showed the residual reduction amount gain which is the difference of the quantity of the remainder before and behind applying the filter factor derived | led-out by adaptive filter 305_2 in a class unit, (b) is adaptive filter 305_2 Indicates the frequency of appearance of classified classes. 本実施形態に係る画像符号化装置を搭載した送信装置、および、画像復号装置を搭載した受信装置の構成について示した図である。(a)は、画像符号化装置を搭載した送信装置を示しており、(b)は、画像復号装置を搭載した受信装置を示している。It is the figure shown about the composition of the transmitting device carrying the picture coding device concerning this embodiment, and the receiving device carrying a picture decoding device. (A) shows a transmitting apparatus equipped with an image coding apparatus, and (b) shows a receiving apparatus equipped with an image decoding apparatus. 本実施形態に係る画像符号化装置を搭載した記録装置、および、画像復号装置を搭載した再生装置の構成について示した図である。(a)は、画像符号化装置を搭載した記録装置を示しており、(b)は、画像復号装置を搭載した再生装置を示している。It is the figure shown about the recording device carrying the picture coding device concerning this embodiment, and the composition of the reproduction device carrying a picture decoding device. (A) shows a recording apparatus equipped with an image coding apparatus, and (b) shows a reproduction apparatus equipped with an image decoding apparatus. 本実施形態に係る画像伝送システムの構成を示す概略図である。It is a schematic diagram showing composition of an image transmission system concerning this embodiment.
  (第1の実施形態)
 以下、図面を参照しながら本発明の実施形態について説明する。
First Embodiment
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
 図29は、本実施形態に係る画像伝送システム1の構成を示す概略図である。 FIG. 29 is a schematic view showing the configuration of the 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 coding an image to be coded, decodes the transmitted code, and displays the image. The image transmission system 1 is configured to include an image encoding device (moving image encoding device) 11, a network 21, an image decoding device (moving image decoding device) 31, and an image display device 41.
 画像符号化装置11には、単一レイヤもしくは複数レイヤの画像を示す画像Tが入力される。レイヤとは、ある時間を構成するピクチャが1つ以上ある場合に、複数のピクチャを区別するために用いられる概念である。たとえば、同一ピクチャを、画質や解像度の異なる複数のレイヤで符号化するとスケーラブル符号化になり、異なる視点のピクチャを複数のレイヤで符号化するとビュースケーラブル符号化となる。複数のレイヤのピクチャ間で予測(インターレイヤ予測、インタービュー予測)を行う場合には、符号化効率が大きく向上する。また予測を行わない場合(サイマルキャスト)の場合にも、符号化データをまとめることができる。 An image T representing an image of a single layer or a plurality of layers is input to the image coding device 11. A layer is a concept used to distinguish a plurality of pictures when there is one or more pictures that constitute a certain time. For example, if the same picture is encoded by a plurality of layers having different image quality and resolution, it becomes scalable coding, and if a picture of different viewpoints is encoded by a plurality of layers, it becomes view scalable coding. When prediction (inter-layer prediction, inter-view prediction) is performed between pictures of a plurality of layers, coding efficiency is greatly improved. Also, even in the case where prediction is not performed (simulcast), encoded data can be summarized.
 ネットワーク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), a small area network (LAN), or a combination of these. The network 21 is not necessarily limited to a two-way communication network, and may be a one-way communication network for transmitting broadcast waves such as terrestrial digital broadcasting and satellite broadcasting. In addition, the network 21 may be replaced by a storage medium recording a coded stream Te such as a DVD (Digital Versatile Disc) or a BD (Blue-ray Disc).
 画像復号装置31は、ネットワーク21が伝送した符号化ストリームTeのそれぞれを復号し、それぞれ復号した1または複数の復号画像Tdを生成する。 The image decoding apparatus 31 decodes each of the encoded streams Te transmitted by the network 21 and generates one or more decoded images Td which are respectively decoded.
 画像表示装置41は、画像復号装置31が生成した1または複数の復号画像Tdの全部または一部を表示する。画像表示装置41は、例えば、液晶ディスプレイ、有機EL(Electro-luminescence)ディスプレイ等の表示デバイスを備える。また、空間スケーラブル符号化、SNRスケーラブル符号化では、画像復号装置31、画像表示装置41が高い処理能力を有する場合には、画質の高い拡張レイヤ画像を表示し、より低い処理能力しか有しない場合には、拡張レイヤほど高い処理能力、表示能力を必要としないベースレイヤ画像を表示する。 The image display device 41 displays all or a 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 spatial scalable coding and SNR scalable coding, when the image decoding device 31 and the image display device 41 have high processing capabilities, they display enhancement layer images with high image quality and have only lower processing capabilities. , The base layer image which does not require the processing capability and the display capability as high as the enhancement layer.
 <演算子>
 本明細書で用いる演算子を以下に記載する。
<Operator>
The operators used herein are described below.
 >>は右ビットシフト、<<は左ビットシフト、&はビットワイズAND、|はビットワイスOR、|=は別の条件との和演算(OR)である。 >> is a right bit shift, << is a left bit shift, & is a bitwise AND, | is a bitwise OR, and | = is a 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 if x is true (other than 0) and z if 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, and returns a if c <a, b if c> b, otherwise Is a function that returns c (where a <= b).
  <符号化ストリームTeの構造>
 本実施形態に係る画像符号化装置11および画像復号装置31の詳細な説明に先立って、画像符号化装置11によって生成され、画像復号装置31によって復号される符号化ストリームTeのデータ構造について説明する。
<Structure of Coded Stream Te>
Prior to detailed description of the image encoding device 11 and the image decoding device 31 according to the present embodiment, the data structure of the encoded stream Te generated by the image encoding device 11 and decoded by the image decoding device 31 will be described. .
 図1は、符号化ストリームTeにおけるデータの階層構造を示す図である。符号化ストリームTeは、例示的に、シーケンス、およびシーケンスを構成する複数のピクチャを含む。図1の(a)~(f)は、それぞれ、シーケンスSEQを既定する符号化ビデオシーケンス、ピクチャPICTを規定する符号化ピクチャ、スライスSを規定する符号化スライス、スライスデータを規定する符号化スライスデータ、符号化スライスデータに含まれる符号化ツリーユニット、符号化ツリーユニットに含まれる符号化ユニット(Coding Unit;CU)を示す図である。 FIG. 1 is a diagram showing a hierarchical structure of data in a coded stream Te. The coded stream Te illustratively includes a sequence and a plurality of pictures forming the sequence. (A) to (f) in FIG. 1 respectively represent a coded video sequence defining the sequence SEQ, a coded picture defining the picture PICT, a coding slice defining the slice S, and a coding slice defining slice data. It is a figure which shows a coding tree unit contained in data, coding slice data, and a coding unit (Coding Unit; CU) contained in a coding tree unit.
  (符号化ビデオシーケンス)
 符号化ビデオシーケンスでは、処理対象のシーケンスSEQを復号するために画像復号装置31が参照するデータの集合が規定されている。シーケンスSEQは、図1の(a)に示すように、ビデオパラメータセット(Video Parameter Set)、シーケンスパラメータセットSPS(Sequence Parameter Set)、ピクチャパラメータセットPPS(Picture Parameter Set)、ピクチャPICT、及び、付加拡張情報SEI(Supplemental Enhancement Information)を含んでいる。ここで#の後に示される値はレイヤIDを示す。図1では、#0と#1すなわちレイヤ0とレイヤ1の符号化データが存在する例を示すが、レイヤの種類およびレイヤの数はこれによらない。
(Encoded video sequence)
In the encoded video sequence, a set of data to which the image decoding device 31 refers in order to decode the sequence SEQ to be processed is defined. As shown in FIG. 1A, 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. It includes supplemental information SEI (Supplemental Enhancement Information). Here, the value shown after # indicates a layer ID. Although FIG. 1 shows an example in which coded data of # 0 and # 1, that is, layer 0 and layer 1 exist, the type of layer and the number of layers do not depend on this.
 ビデオパラメータセットVPSは、複数のレイヤから構成されている動画像において、複数の動画像に共通する符号化パラメータの集合および動画像に含まれる複数のレイヤおよび個々のレイヤに関連する符号化パラメータの集合が規定されている。 A video parameter set VPS is a set of coding parameters common to a plurality of moving pictures and a set of coding parameters related to the plurality of layers included in the moving picture and each layer in a moving picture composed of a plurality of layers. A set is defined.
 シーケンスパラメータセットSPSでは、対象シーケンスを復号するために画像復号装置31が参照する符号化パラメータの集合が規定されている。例えば、ピクチャの幅や高さが規定される。なお、SPSは複数存在してもよい。その場合、PPSから複数のSPSの何れかを選択する。 In the sequence parameter set SPS, a set of coding parameters to be referred to by the image decoding device 31 for decoding the target sequence is defined. For example, the width and height of the picture are defined. In addition, multiple SPS may exist. In that case, one of a plurality of SPSs is selected from PPS.
 ピクチャパラメータセットPPSでは、対象シーケンス内の各ピクチャを復号するために画像復号装置31が参照する符号化パラメータの集合が規定されている。例えば、ピクチャの復号に用いられる量子化幅の基準値(pic_init_qp_minus26)や重み付き予測の適用を示すフラグ(weighted_pred_flag)が含まれる。なお、PPSは複数存在してもよい。その場合、対象シーケンス内の各ピクチャから複数のPPSの何れかを選択する。 In the picture parameter set PPS, a set of coding parameters to which the image decoding device 31 refers to to decode each picture in the target sequence is defined. For example, a reference value of quantization width (pic_init_qp_minus 26) used for decoding a picture and a flag (weighted_pred_flag) indicating application of weighted prediction are included. In addition, multiple PPS may exist. In that case, one of a plurality of PPSs is selected from each picture in the target sequence.
  (符号化ピクチャ)
 符号化ピクチャでは、処理対象のピクチャPICTを復号するために画像復号装置31が参照するデータの集合が規定されている。ピクチャPICTは、図1の(b)に示すように、スライスS0~SNS-1を含んでいる(NSはピクチャPICTに含まれるスライスの総数)。
(Coded picture)
In the coded picture, a set of data to which the image decoding device 31 refers in order to decode the picture PICT to be processed is defined. The picture PICT includes slices S0 to SNS-1 (NS is the total number of slices included in the picture PICT), as shown in (b) of FIG.
 なお、以下、スライスS0~SNS-1のそれぞれを区別する必要が無い場合、符号の添え字を省略して記述することがある。また、以下に説明する符号化ストリームTeに含まれるデータであって、添え字を付している他のデータについても同様である。 In the following, when there is no need to distinguish between slices S0 to SNS-1 , suffixes of reference numerals may be omitted and described. Further, the same is true for other data that is included in the encoded stream Te described below and that is suffixed.
  (符号化スライス)
 符号化スライスでは、処理対象のスライスSを復号するために画像復号装置31が参照するデータの集合が規定されている。スライスSは、図1の(c)に示すように、スライスヘッダSH、および、スライスデータSDATAを含んでいる。
(Coding slice)
In the coding slice, a set of data to which the image decoding device 31 refers in order to decode the slice S to be processed is defined. The slice S includes a slice header SH and slice data SDATA as shown in (c) of FIG.
 スライスヘッダSHには、対象スライスの復号方法を決定するために画像復号装置31が参照する符号化パラメータ群が含まれる。スライスタイプを指定するスライスタイプ指定情報(slice_type)は、スライスヘッダSHに含まれる符号化パラメータの一例である。 The slice header SH includes a coding parameter group to which the image decoding device 31 refers in order to determine the decoding method of the target slice. The slice type specification information (slice_type) for specifying a slice type is an example of a coding parameter included in the slice header SH.
 スライスタイプ指定情報により指定可能なスライスタイプとしては、(1)符号化の際にイントラ予測のみを用いるIスライス、(2)符号化の際に単方向予測、または、イントラ予測を用いるPスライス、(3)符号化の際に単方向予測、双方向予測、または、イントラ予測を用いるBスライスなどが挙げられる。 As slice types that can be designated by slice type designation information, (1) I slice using only intra prediction at the time of encoding, (2) P slice using unidirectional prediction at the time of encoding or intra prediction, (3) B-slice using uni-directional prediction, bi-directional prediction, or intra prediction at the time of encoding.
 なお、スライスヘッダ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は、図1の(d)に示すように、符号化ツリーユニット(CTU:Coding Tree Unit、基本単位領域)を含んでいる。CTUは、スライスを構成する固定サイズ(例えば32x32、64x64、128x128)のブロックであり、最大符号化単位(LCU:Largest Coding Unit)と呼ぶこともある。
(Encoding slice data)
In the encoded slice data, a set of data to which the image decoding device 31 refers in order to decode the slice data SDATA to be processed is defined. The slice data SDATA includes a coding tree unit (CTU: Coding Tree Unit, basic unit area) as shown in (d) of FIG. The CTU is a block of a fixed size (for example, 32x32, 64x64, 128x128) that configures a slice, and may also be referred to as a largest coding unit (LCU: Largest Coding Unit).
  (符号化ツリーユニット)
 図1の(e)に示すように、処理対象の符号化ツリーユニットを復号するために画像復号装置31が参照するデータの集合が規定されている。符号化ツリーユニットは、再帰的な4分木分割により分割される。再帰的な4分木分割により得られる木構造のノードのことを符号化ノード(CN:Coding Node)と称する。4分木の中間ノードは、符号化ノードであり、符号化ツリーユニット自身も最上位の符号化ノードとして規定される。CTUは、分割フラグ(cu_split_flag)を含み、cu_split_flagが1の場合には、4つの符号化ノードCNに分割される。cu_split_flagが0の場合には、符号化ノードCNは分割されず、1つの符号化ユニット(CU:Coding Unit)をノードとして持つ。符号化ユニットCUは符号化ノードの末端ノードであり、これ以上分割されない。符号化ユニットCUは、符号化処理の基本的な単位となる。
(Encoding tree unit)
As shown in (e) of FIG. 1, a set of data to which the image decoding device 31 refers in order to decode a coding tree unit to be processed is defined. The coding tree unit is divided by recursive quadtree division. A tree-structured node obtained by recursive quadtree division is called a coding node (CN). The intermediate nodes of the quadtree are coding nodes, and the coding tree unit itself is also defined as the top coding node. The CTU includes a split flag (cu_split_flag), and when cu_split_flag is 1, the CTU is split into four coding nodes CN. When cu_split_flag is 0, the coding node CN is not split, and has one coding unit (CU: Coding Unit) as a node. The coding unit CU is an end node of the coding node and is not further divided. The coding unit CU is a basic unit of coding processing.
 また、符号化ツリーユニットCTUのサイズが64x64画素の場合には、符号化ユニットのサイズは、64x64画素、32x32画素、16x16画素、および、8x8画素の何れかをとり得る。 When the size of the coding tree unit CTU is 64x64 pixels, the size of the coding unit can be 64x64 pixels, 32x32 pixels, 16x16 pixels, or 8x8 pixels.
  (符号化ユニット)
 図1の(f)に示すように、処理対象の符号化ユニットを復号するために画像復号装置31が参照するデータの集合が規定されている。具体的には、符号化ユニットは、予測ツリー、変換ツリー、CUヘッダCUHから構成される。CUヘッダでは予測モード、分割方法(PU分割モード)等が規定される。
(Coding unit)
As shown in (f) of FIG. 1, a set of data to which the image decoding device 31 refers in order to decode a coding unit to be processed is defined. Specifically, the coding unit is composed of a prediction tree, a transformation tree, and a CU header CUH. In the CU header, a prediction mode, a division method (PU division mode), and the like are defined.
 予測ツリーでは、符号化ユニットを1または複数に分割した各予測ユニット(PU)の予測情報(参照ピクチャインデックス、動きベクトル等)が規定される。別の表現でいえば、予測ユニットは、符号化ユニットを構成する1または複数の重複しない領域である。また、予測ツリーは、上述の分割により得られた1または複数の予測ユニットを含む。なお、以下では、予測ユニットをさらに分割した予測単位を「サブブロック」と呼ぶ。サブブロックは、複数の画素によって構成されている。予測ユニットとサブブロックのサイズが等しい場合には、予測ユニット中のサブブロックは1つである。予測ユニットがサブブロックのサイズよりも大きい場合には、予測ユニットは、サブブロックに分割される。たとえば予測ユニットが8x8、サブブロックが4x4の場合には、予測ユニットは水平に2分割、垂直に2分割からなる、4つのサブブロックに分割される。 In the prediction tree, prediction information (reference picture index, motion vector, etc.) of each prediction unit (PU) obtained by dividing the coding unit into one or more is defined. Stated differently, a prediction unit is one or more non-overlapping regions that make up a coding unit. Also, the prediction tree includes one or more prediction units obtained by the above-mentioned division. In addition, below, the prediction unit which divided | segmented the prediction unit further is called a "subblock." The sub block is composed of a plurality of pixels. If the size of the prediction unit and the subblock is equal, there is one subblock in the prediction unit. If the prediction unit is larger than the size of the subblock, the prediction unit is divided into subblocks. For example, when the prediction unit is 8x8 and the subblock is 4x4, the prediction unit is divided into four subblocks, which are horizontally divided into two and vertically divided into two.
 予測処理は、この予測ユニット(サブブロック)ごとに行ってもよい。 The prediction process may be performed for each prediction unit (sub block).
 予測ツリーにおける分割の種類は、大まかにいえば、イントラ予測の場合と、インター予測の場合との2つがある。イントラ予測とは、同一ピクチャ内の予測であり、インター予測とは、互いに異なるピクチャ間(例えば、表示時刻間、レイヤ画像間)で行われる予測処理を指す。 Broadly speaking, there are two types of division in the prediction tree: intra prediction and inter prediction. Intra prediction is prediction in the same picture, and inter prediction refers to prediction processing performed between mutually different pictures (for example, between display times, between layer images).
 イントラ予測の場合、分割方法は、2Nx2N(符号化ユニットと同一サイズ)と、NxNとがある。 In the case of intra prediction, there are 2Nx2N (the same size as the coding unit) and NxN as a division method.
 また、インター予測の場合、分割方法は、符号化データの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 according to PU division mode (part_mode) of encoded data, 2Nx2N (the same size as the encoding unit), 2NxN, 2NxnU, 2NxnD, Nx2N, nLx2N, nRx2N, and There are NxN etc. Note that 2NxN and Nx2N indicate 1: 1 symmetric division, and 2NxnU, 2NxnD and nLx2N and nRx2N indicate 1: 3 and 3: 1 asymmetric division. The PUs included in the CU are expressed as PU0, PU1, PU2, PU3 in order.
 図2の(a)~(h)に、それぞれのPU分割モードにおけるパーティションの形状(PU分割の境界の位置)を具体的に図示している。図2の(a)は、2Nx2Nのパーティションを示し、(b)、(c)、(d)は、それぞれ、2NxN、2NxnU、および、2NxnDのパーティション(横長パーティション)を示す。(e)、(f)、(g)は、それぞれ、Nx2N、nLx2N、nRx2Nである場合のパーティション(縦長パーティション)を示し、(h)は、NxNのパーティションを示す。なお、横長パーティションと縦長パーティションを総称して長方形パーティション、2Nx2N、NxNを総称して正方形パーティションと呼ぶ。 (A) to (h) of FIG. 2 specifically illustrate the shapes of partitions (positions of boundaries of PU division) in respective PU division modes. (A) of FIG. 2 shows a 2Nx2N partition, and (b), (c) and (d) show 2NxN, 2NxnU, and 2NxnD partitions (horizontally long partitions), respectively. (E), (f) and (g) show partitions (vertical partitions) in the case of Nx2N, nLx2N and nRx2N, respectively, and (h) shows a partition of NxN. Note that the horizontally long partition and the vertically long 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 transform tree, the coding unit is divided into one or more transform units, and the position and size of each transform unit are defined. In other words, a transform unit is one or more non-overlapping regions that make up a coding unit. Also, the transformation tree includes one or more transformation units obtained by the above-mentioned division.
 変換ツリーにおける分割には、符号化ユニットと同一のサイズの領域を変換ユニットとして割り付けるものと、上述したCUの分割と同様、再帰的な4分木分割によるものがある。 Partitions in the transform tree may be allocated as a transform unit a region of the same size as the encoding unit, or may be based on recursive quadtree partitioning as in the case of CU partitioning described above.
 変換処理は、この変換ユニットごとに行われる。 A conversion process 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)
The prediction image of a prediction unit (PU: Prediction Unit) is derived by prediction parameters associated with PU. The prediction parameters include intra prediction prediction parameters or inter prediction prediction parameters. 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 a reference picture list called an L0 list or an L1 list is used, respectively, and a reference picture list corresponding to a value of 1 is used. In the present specification, when "a flag indicating whether or not it is XX", if the flag is other than 0 (for example, 1) is XX, it is assumed that 0 is not XX; Treat 1 as true, 0 as false, and so on. However, in an actual apparatus or method, other values may be used as true values or false values.
 符号化データに含まれるインター予測パラメータを導出するためのシンタックス要素には、例えば、PU分割モードpart_mode、マージフラグmerge_flag、マージインデックスmerge_idx、インター予測識別子inter_pred_idc、参照ピクチャインデックスrefIdxLX、予測ベクトルインデックスmvp_LX_idx、差分ベクトルmvdLXがある。 Syntax elements for deriving inter prediction parameters included in encoded data include, for example, PU split mode part_mode, merge flag merge_flag, merge index merge_idx, inter prediction identifier inter_pred_idc, reference picture index refIdxLX, predicted vector index mvp_LX_idx, There is a difference vector mvdLX.
  (参照ピクチャリスト)
 参照ピクチャリストは、参照ピクチャメモリ306に記憶された参照ピクチャからなるリストである。図3は、参照ピクチャおよび参照ピクチャリストの一例を示す概念図である。図3(a)において、矩形はピクチャ、矢印はピクチャの参照関係、横軸は時間、矩形中のI、P、Bは各々イントラピクチャ、単予測ピクチャ、双予測ピクチャ、矩形中の数字は復号順を示す。図に示すように、ピクチャの復号順は、I0、P1、B2、B3、B4であり、表示順は、I0、B3、B2、B4、P1である。図3(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 of reference pictures stored in the reference picture memory 306. FIG. 3 is a conceptual diagram showing an example of a reference picture and a reference picture list. In FIG. 3A, the rectangle is a picture, the arrow is a reference of the picture, the horizontal axis is time, and I, P and B in the rectangle are intra pictures, uni-predicted pictures, bi-predicted pictures, and numbers in the rectangle are decoded. Show the order. As shown in the figure, the decoding order of pictures is I0, P1, B2, B3, B4, and the display order is I0, B3, B2, B4, B1, P1. FIG. 3B shows an example of the reference picture list. The reference picture list is a list representing reference picture candidates, and one picture (slice) may have one or more reference picture lists. In the example of the figure, the target picture B3 has two reference picture lists, an L0 list RefPicList0 and an L1 list RefPicList1. Reference pictures when the target picture is B3 are I0, P1, and B2, and the reference pictures have these pictures as elements. In each prediction unit, which picture in the reference picture list RefPicListX is actually referred to is designated by the reference picture index refIdxLX. The figure shows an example in which reference pictures P1 and B2 are referenced 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 forecast and AMVP forecast)
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 prediction mode is a mode used to be derived from the prediction parameter of the already processed neighboring PU without including the prediction list use flag predFlagLX (or inter prediction identifier inter_pred_idc), the reference picture index refIdxLX, and the motion vector mvLX in the encoded data. 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 that identifies 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 the number of reference pictures, and takes any one of PRED_L0, PRED_L1, and PRED_BI. PRED_L0 and PRED_L1 indicate that reference pictures managed by reference pictures in the L0 list and the L1 list are used, respectively, and indicate that one reference picture is used (uniprediction). PRED_BI indicates using two reference pictures (bi-prediction BiPred), and uses reference pictures managed by the L0 list and the L1 list. The predicted vector index mvp_LX_idx is an index indicating a predicted vector, and 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, and parameters for L0 list and parameters for L1 list are distinguished by replacing LX with L0 and L1.
 マージインデックスmerge_idxは、処理が完了したPUから導出される予測パラメータ候補(マージ候補)のうち、いずれかの予測パラメータを復号対象PUの予測パラメータとして用いるかを示すインデックスである。 Merge index merge_idx is an index which shows whether any prediction parameter is used as a prediction parameter of decoding object PU among the prediction parameter candidates (merge candidate) derived | led-out from PU which processing completed.
  (動きベクトル)
 動きベクトルmvLXは、異なる2つのピクチャ上のブロック間のずれ量を示す。動きベクトルmvLXに関する予測ベクトル、差分ベクトルを、それぞれ予測ベクトルmvpLX、差分ベクトルmvdLXと呼ぶ。
(Motion vector)
The motion vector mvLX indicates the amount of deviation between blocks on two different pictures. The prediction vector and the difference vector relating 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 usage flag predFlagLX)
The relationship between the inter prediction identifier inter_pred_idc, and the prediction list use flag predFlagL0, predFlagL1 is as follows, and can be mutually converted.
 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
The inter prediction parameter may use a prediction list use flag or may use an inter prediction identifier. 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 utilization flag.
 (双予測biPredの判定)
 双予測BiPredであるかのフラグbiPredは、2つの予測リスト利用フラグがともに1であるかによって導出できる。たとえば以下の式で導出できる。
(Determination of bi-prediction biPred)
The flag biPred of bi-prediction BiPred can be derived depending on whether both of the two prediction list use flags are 1. For example, it can be derived by the following equation.
 biPred = (predFlagL0 == 1 && predFlagL1 == 1)
 フラグbiPredは、インター予測識別子が2つの予測リスト(参照ピクチャ)を使うことを示す値であるか否かによっても導出できる。たとえば以下の式で導出できる。
biPred = (predFlagL0 == 1 && predFlagL1 == 1)
The flag biPred can also be derived based 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 equation.
 biPred = (inter_pred_idc == PRED_BI) ? 1 : 0
上記式は、以下の式でも表現できる。
biPred = (inter_pred_idc == PRED_BI)? 1: 0
The above equation can also be expressed by the following equation.
 biPred = (inter_pred_idc == PRED_BI)
 なお、PRED_BIはたとえば3の値を用いることができる。
biPred = (inter_pred_idc == PRED_BI)
For example, a value of 3 can be used as PRED_BI.
  (画像復号装置の構成)
 次に、本実施形態に係る画像復号装置31の構成について説明する。図5は、本実施形態に係る画像復号装置31の構成を示す概略図である。画像復号装置31は、エントロピー復号部301、予測パラメータ復号部(予測画像復号装置)302、ループフィルタ305、参照ピクチャメモリ306、予測パラメータメモリ307、予測画像生成部(予測画像生成装置)308、逆量子化・逆DCT部311、及び加算部312を含んで構成される。
(Configuration of image decoding apparatus)
Next, the configuration of the image decoding apparatus 31 according to the present embodiment will be described. FIG. 5 is a schematic view showing the 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 an inverse A quantization / inverse DCT unit 311 and an addition unit 312 are included.
 また、予測パラメータ復号部302は、インター予測パラメータ復号部303及びイントラ予測パラメータ復号部304を含んで構成される。予測画像生成部308は、インター予測画像生成部309及びイントラ予測画像生成部310を含んで構成される。 Further, the prediction parameter decoding unit 302 is configured to include 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 encoded stream Te input from the outside to separate and decode individual codes (syntax elements). The separated codes include prediction information 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、参照ピクチャインデックスrefIdxLX、予測ベクトルインデックス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. The part of the separated code is, for example, prediction mode predMode, PU division 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, difference vector mvdLX. Control of which code to decode is performed based on an instruction of 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 DCT (Discrete Cosine Transform, discrete cosine transformation) on the residual signal in the encoding process and quantizing the coefficient.
 インター予測パラメータ復号部303は、エントロピー復号部301から入力された符号に基づいて、予測パラメータメモリ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.
 インター予測パラメータ復号部303は、復号したインター予測パラメータを予測画像生成部308に出力し、また予測パラメータメモリ307に記憶する。インター予測パラメータ復号部303の詳細については後述する。 The inter prediction parameter decoding unit 303 outputs the decoded inter prediction parameter to the prediction image generation unit 308, and stores the inter prediction parameter in the prediction parameter memory 307. Details of the inter prediction parameter decoding unit 303 will be described later.
 イントラ予測パラメータ復号部304は、エントロピー復号部301から入力された符号に基づいて、予測パラメータメモリ307に記憶された予測パラメータを参照してイントラ予測パラメータを復号する。イントラ予測パラメータとは、CUを1つのピクチャ内で予測する処理で用いるパラメータ、例えば、イントラ予測モードIntraPredModeである。イントラ予測パラメータ復号部304は、復号したイントラ予測パラメータを予測画像生成部308に出力し、また予測パラメータメモリ307に記憶する。 The intra prediction parameter decoding unit 304 decodes the intra 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 intra prediction parameter is a parameter used in a process of predicting a CU in 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.
 イントラ予測パラメータ復号部304は、輝度と色差で異なるイントラ予測モードを導出しても良い。この場合、イントラ予測パラメータ復号部304は、輝度の予測パラメータとして輝度予測モードIntraPredModeY、色差の予測パラメータとして、色差予測モードIntraPredModeCを復号する。輝度予測モードIntraPredModeYは、35モードであり、プレーナ予測(0)、DC予測(1)、方向予測(2~34)が対応する。色差予測モードIntraPredModeCは、プレーナ予測(0)、DC予測(1)、方向予測(2~34)、LMモード(35)の何れかを用いるものである。イントラ予測パラメータ復号部304は、IntraPredModeCは輝度モードと同じモードであるか否かを示すフラグを復号し、フラグが輝度モードと同じモードであることを示せば、IntraPredModeCにIntraPredModeYを割り当て、フラグが輝度モードと異なるモードであることを示せば、IntraPredModeCとして、プレーナ予測(0)、DC予測(1)、方向予測(2~34)、LMモード(35)を復号しても良い。 The intra prediction parameter decoding unit 304 may derive different intra prediction modes for luminance and chrominance. In this case, the intra prediction parameter decoding unit 304 decodes a luminance prediction mode IntraPredModeY as a luminance prediction parameter and a chrominance prediction mode IntraPredModeC as a chrominance prediction parameter. The luminance prediction mode IntraPredModeY is a 35 mode, which corresponds to planar prediction (0), DC prediction (1), and directional prediction (2 to 34). The color difference prediction mode IntraPredModeC uses one of planar prediction (0), DC prediction (1), direction prediction (2 to 34), and LM mode (35). The intra prediction parameter decoding unit 304 decodes a flag indicating whether IntraPredModeC is the same mode as the luminance mode, and if it indicates that the flag is the same mode as the luminance mode, IntraPredModeY is assigned to IntraPredModeC, and the flag indicates the luminance If intra mode is different from the mode, planar prediction (0), DC prediction (1), direction prediction (2 to 34), or LM mode (35) may be decoded as IntraPredModeC.
 ループフィルタ305は、加算部312が生成したCUの復号画像に対し、デブロッキングフィルタ、サンプル適応オフセット(SAO)、適応フィルタ(ALF)等のフィルタを施す。ループフィルタ305の詳細については、参照する図面を替えて後述する。 The loop filter 305 applies a filter such as a deblocking filter, a sample adaptive offset (SAO), or an adaptive filter (ALF) to the decoded image of the CU generated by the adding unit 312. The details of the loop filter 305 will be described later, changing the reference drawings.
 参照ピクチャメモリ306は、加算部312が生成したCUの復号画像を、復号対象のピクチャ及びCU毎に予め定めた位置に記憶する。 The reference picture memory 306 stores the decoded image of the CU generated by the adding unit 312 in a predetermined position for each picture and CU to be decoded.
 予測パラメータメモリ307は、予測パラメータを、復号対象のピクチャ及び予測ユニット(もしくはサブブロック、固定サイズブロック、ピクセル)毎に予め定めた位置に記憶する。具体的には、予測パラメータメモリ307は、インター予測パラメータ復号部303が復号したインター予測パラメータ、イントラ予測パラメータ復号部304が復号したイントラ予測パラメータ及びエントロピー復号部301が分離した予測モードpredModeを記憶する。記憶されるインター予測パラメータには、例えば、予測リスト利用フラグpredFlagLX(インター予測識別子inter_pred_idc)、参照ピクチャインデックスrefIdxLX、動きベクトルmvLXがある。 The prediction parameter memory 307 stores prediction parameters in a predetermined position for each picture to be decoded and each 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 inter prediction parameters to be stored include, for example, a prediction list use 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 also receives a prediction parameter from the prediction parameter decoding unit 302. Further, the predicted image generation unit 308 reads the reference picture from the reference picture memory 306. The prediction image generation unit 308 generates a PU prediction image using the input prediction parameters 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 interpolate the predicted image of the PU by inter prediction. Generate
 インター予測画像生成部309は、予測リスト利用フラグpredFlagLXが1である参照ピクチャリスト(L0リスト、もしくはL1リスト)に対し、参照ピクチャインデックスrefIdxLXで示される参照ピクチャから、復号対象PUを基準として動きベクトルmvLXが示す位置にある参照ピクチャブロックを参照ピクチャメモリ306から読み出す。インター予測画像生成部309は、読み出した参照ピクチャブロックをもとに予測を行ってPUの予測画像を生成する。インター予測画像生成部309は、生成したPUの予測画像を加算部312に出力する。 The inter-predicted image generation unit 309 uses the reference picture index refIdxLX for the reference picture list (L0 list or L1 list) in which the prediction list use flag predFlagLX is 1, and the motion vector based on the PU to be decoded The reference picture block at the position indicated by mvLX is read out 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 PU prediction image. The inter prediction image generation unit 309 outputs the generated prediction image of 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 prediction 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 which are pictures to be decoded and which are in a predetermined range from the PU to be decoded among PUs already 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 varies depending on the intra prediction mode. The order of raster scan is an order of sequentially moving from the left end to the right end for each row from the top to the bottom in each picture.
 イントラ予測画像生成部310は、読み出した隣接PUについてイントラ予測モードIntraPredModeが示す予測モードで予測を行ってPUの予測画像を生成する。イントラ予測画像生成部310は、生成したPUの予測画像を加算部312に出力する。 The intra predicted image generation unit 310 performs prediction on the read adjacent PU in the prediction mode indicated by the intra prediction mode IntraPredMode to generate a predicted image of PU. The intra predicted image generation unit 310 outputs the generated predicted image of PU to the addition unit 312.
 イントラ予測パラメータ復号部304において、輝度と色差で異なるイントラ予測モードを導出する場合、イントラ予測画像生成部310は、輝度予測モードIntraPredModeYに応じて、プレーナ予測(0)、DC予測(1)、方向予測(2~34)の何れかによって輝度のPUの予測画像を生成し、色差予測モードIntraPredModeCに応じて、プレーナ予測(0)、DC予測(1)、方向予測(2~34)、LMモード(35)の何れかによって色差の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 determines planar prediction (0), DC prediction (1), direction according to the luminance prediction mode IntraPredMode Y. A prediction image of PU of luminance is generated by any of prediction (2 to 34), and planar prediction (0), DC prediction (1), direction prediction (2 to 34), LM mode according to color difference prediction mode IntraPredModeC. The prediction image of color difference PU is generated by any of (35).
 逆量子化・逆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, for each pixel, the predicted image of the PU input from the inter predicted image generation unit 309 or the intra predicted image generation unit 310 and the residual signal input from the inverse quantization / inverse DCT unit 311, Generate a PU decoded image. The addition unit 312 stores the generated PU decoded image in the reference picture memory 306, and externally outputs a decoded image Td in which the generated PU decoded image is integrated for each picture.
 (ループフィルタ305の詳細)
 (ループフィルタ305)
 ループフィルタ305は、画像フィルタ装置であり、複数の符号化ツリーユニットCTU(フィルタの処理単位である基本単位領域)から構成される入力画像に作用することによって出力画像を生成する。
(Details of loop filter 305)
(Loop filter 305)
The loop filter 305 is an image filter device, and generates an output image by acting on an input image composed of a plurality of encoding tree units CTU (basic unit area which is a processing unit of a filter).
 ループフィルタ305は、(1)入力画像Pにおけるブロック境界の周辺の画像の平滑化(デブロック処理)を行うデブロッキングフィルタ(DF:Deblocking Filter)としての機能と、(2)デブロッキングフィルタが作用した画像に対して、フィルタパラメータFPを用いて適応フィルタ処理を行う適応フィルタ(ALF:Adaptive Loop Filter)としての機能を有している。 The loop filter 305 has (1) a function as a deblocking filter (DF: Deblocking Filter) that performs smoothing (deblocking processing) of an image around a block boundary in the input image P, and (2) a deblocking filter acts It has a function as an adaptive filter (ALF: Adaptive Loop Filter) that performs adaptive filter processing using the filter parameter FP on the captured image.
 図7は、ループフィルタ305の構成を示すブロック図である。図7に示すように、ループフィルタ305は、境界フィルタ部として動作するデブロッキングフィルタ305_1、適応フィルタ部として動作する適応フィルタ305_2、および、内部メモリ305_3を備えている。 FIG. 7 is a block diagram showing the configuration of the loop filter 305. As shown in FIG. As shown in FIG. 7, the loop filter 305 includes a deblocking filter 305_1 operating as a boundary filter unit, an adaptive filter 305_2 operating as an adaptive filter unit, and an internal memory 305_3.
 (デブロッキングフィルタ305_1)
 デブロッキングフィルタ305_1は、ブロック(符号化ツリーユニットCTU、あるいは符号化ユニットCU、あるいはパーティション)の境界に作用する。デブロッキングフィルタ305_1は、入力画像Pにおけるブロック境界の周辺の領域における画像の平滑化を行うことによって、デブロック済復号画像P_DBを生成する。ループフィルタ305は、デブロッキングフィルタ305_1によるフィルタ処理を実行する場合(オンである場合)と、実行しない場合(オフである場合)とがある。
(Deblocking filter 305_1)
The deblocking filter 305_1 operates on the boundaries of blocks (coding tree unit CTU, coding unit CU, or partition). The deblocking filter 305_1 generates the deblocked decoded image P_DB by performing smoothing of the image in the area around the block boundary in the input image P. The loop filter 305 may perform filtering by the deblocking filter 305_1 (if it is on) or not (if it is off).
 また、デブロッキングフィルタ305_1は、符号化データ中のフラグによってオンオフを切り替える。オンオフを切り替えるフラグは、デブロッキングフィルタ全体をオンオフするフラグ(deblocking_filter_disabled_flag)の他、少なくとも、タイル境界にデブロッキングフィルタを適用するか否かを示すフラグ(loop_filter_across_tiles_enabled_flag)もしくはスライス境界にデブロッキングフィルタを適用するか否かを示すフラグ(loop_filter_across_slices_enabled_flag)を有する。デブロッキングフィルタ305_1は、ブロック境界の左側にフィルタ処理を施すか否かを示すフラグfilterLeftCbEdgeFlagを導出する。filterLeftCbEdgeFlagは、以下の条件のいずれかが成り立つ場合には0、それ以外は1とする。
- 対象ブロック(対象CTU)の左境界がピクチャの左境界である。
- 対象ブロック(対象CTU)の左境界がタイルの左境界であり、かつ、loop_filter_across_tiles_enabled_flagが0である。
- 対象ブロック(対象CTU)の左境界がスライスの左境界であり、かつ、loop_filter_across_slices_enabled_flagが0である。
In addition, the deblocking filter 305_1 switches on and off according to a flag in the encoded data. The flag to switch on / off is a flag (deblocking_filter_disabled_flag) for turning on / off the entire deblocking filter, and at least a flag (loop_filter_across_tiles_enabled_flag) indicating whether to apply a deblocking filter to tile boundaries or a deblocking filter to slice boundaries It has a flag (loop_filter_across_slices_enabled_flag) indicating whether or not it is. The deblocking filter 305_1 derives a flag filterLeftCbEdgeFlag indicating whether or not to apply filtering to the left side of the block boundary. filterLeftCbEdgeFlag is 0 when any of the following conditions are satisfied, and 1 otherwise.
-The left boundary of the target block (target CTU) is the left boundary of the picture.
-The left boundary of the target block (target CTU) is the left boundary of the tile, and loop_filter_across_tiles_enabled_flag is 0.
-The left boundary of the target block (target CTU) is the left boundary of the slice, and loop_filter_across_slices_enabled_flag is 0.
 デブロッキングフィルタ305_1は、フラグfilterLeftCbEdgeFlagを参照して垂直方向のブロック左境界(上下方向に沿った線で分割する境界、左右のブロックに分割する境界)にフィルタ処理を行う。具体的には、フラグfilterLeftCbEdgeFlagと、対象ブロックのCTU内座標と、分割フラグを参照し、境界画素にフィルタ処理を行うか否かを示すフラグedgeFlagsを導出する。edgeFlagsが1の場合は、フィルタ処理をブロック左境界に適用する。例えば、以下の式でフィルタ処理を行う。 The deblocking filter 305_1 performs filtering on the block left boundary in the vertical direction (the boundary divided by a line along the vertical direction, the boundary divided into left and right blocks) with reference to the flag filterLeftCbEdgeFlag. Specifically, the flag filterLeftCbEdgeFlag, the in-CTU coordinates of the target block, and the division flag are referred to, and a flag edgeFlags indicating whether to filter the boundary pixel is derived. If edgeFlags is 1, apply filtering to the block left boundary. For example, filter processing is performed using the following equation.
 p2' = Clip3(p2 - 2*tc, p2 + 2*tc, (2*p3 + 3*p2 + p1 + p0 + q0 + 4)>>3)
 p1' = Clip3(p1 - 2*tc, p1 + 2*tc, (p2 + p1 + p0 + q0 + 2)>>2)
 p0' = Clip3(p0 - 2*tc, p0 + 2*tc, (p2 + 2*p1 + 2*p0 + 2*q0 + q1 + 4)>>3)
 q0' = Clip3(q0 - 2*tc, q0 + 2*tc, (p1 + 2*p0 + 2*q0 + 2*q1 + q2 +4)>>3)
 q1' = Clip3(q1 - 2*tc, q1 + 2*tc, (p0 + q0 + q1 + q2 + 2)>>2)
 q2' = Clip3(q2 - 2*tc, q2 + 2*tc, (p0 + q0 + q1 + 3*q2 + 2*q3 + 4)>>3)
 ここで、p2, p1, p0, q0, q1, q2は各々、境界からの距離2, 1, 0, 0, 1, 2の画素の列である。p2, p1, p0は境界を接するブロックP、ブロックQのうちブロックPに含まれる画素であり、q0, q1, q2はブロックQに含まれる画素である。tcは、フィルタ処理を抑制するための変数である。
p2 '= Clip 3 (p2-2 * tc, p2 + 2 * tc, (2 * p3 + 3 * p2 + p1 + p0 + q0 + 4) >> 3)
p1 '= Clip 3 (p1-2 * tc, p1 + 2 * tc, (p2 + p1 + p0 + q0 + 2) >> 2)
p0 '= Clip 3 (p0-2 * tc, p0 + 2 * tc, (p2 + 2 * p1 + 2 * p0 + 2 * q0 + q1 + 4) >> 3)
q0 '= Clip 3 (q0-2 * tc, q0 + 2 * tc, (p1 + 2 * p0 + 2 * q0 + 2 * q1 + q2 + 4) >> 3)
q1 '= Clip 3 (q1-2 * tc, q1 + 2 * tc, (p0 + q0 + q1 + q2 + 2) >> 2)
q2 '= Clip3 (q2-2 * tc, q2 + 2 * tc, (p0 + q0 + q1 + 3 * q2 + 2 * q3 + 4) >> 3)
Here, p 2, p 1, p 0, q 0, q 1, q 2 are columns of pixels of distances 2, 1, 0, 0, 1, 2 from the boundary, respectively. p2, p1 and p0 are pixels included in the block P of the block P and the block Q bordering the boundary, and q0, q1 and q2 are pixels included in the block Q. tc is a variable for suppressing filter processing.
 一方、edgeFlagsが0の場合は、ブロック左境界にフィルタ処理を適用しない。CTU内座標のx座標が0の場合、つまり、対象とするブロック左境界が、CTUの左境界である場合には、edgeFlagsにfilterLeftCbEdgeFlagを設定する。これにより、デブロッキングフィルタ305_1は、filterLeftCbEdgeFlagが0となる場合には、CTUの左境界にフィルタ処理を適用しない。 On the other hand, when the edgeFlags is 0, no filtering process is applied to the left boundary of the block. If the x coordinate of the in-CTU coordinate is 0, that is, if the target block left boundary is the left boundary of the CTU, set filterLeftCbEdgeFlag in edgeFlags. Accordingly, when the filterLeftCbEdgeFlag is 0, the deblocking filter 305_1 does not apply the filtering process to the left boundary of the CTU.
 デブロッキングフィルタ305_1は、対象ブロックのブロック境界の上側にフィルタ処理を施すか否かを示すフラグfilterTopCbEdgeFlagを導出する。filterTopCbEdgeFlagは、以下の条件のいずれかが成り立つ場合には0、それ以外は1とする。
- 対象ブロック(対象CTU)の上境界がピクチャの上境界である。
- 対象ブロック(対象CTU)の上境界がタイルの上境界であり、かつ、loop_filter_across_tiles_enabled_flagが0である。
- 対象ブロック(対象CTU)の上境界がスライスの上境界であり、かつ、loop_filter_across_slices_enabled_flagが0である。
The deblocking filter 305_1 derives a flag filterTopCbEdgeFlag indicating whether or not the filtering process is performed above the block boundary of the target block. filterTopCbEdgeFlag is 0 when any of the following conditions are satisfied, and 1 otherwise.
-The upper boundary of the target block (target CTU) is the upper boundary of the picture.
-The upper boundary of the target block (target CTU) is the upper boundary of the tile, and loop_filter_across_tiles_enabled_flag is 0.
-The upper boundary of the target block (target CTU) is the upper boundary of the slice, and loop_filter_across_slices_enabled_flag is 0.
 デブロッキングフィルタ305_1は、フラグfilterTopCbEdgeFlagを参照して水平方向のブロック上境界(左右方向に沿った線で分割する境界、上下のブロックに分割する境界)にフィルタ処理を行う。具体的には、フラグfilterLeftCbEdgeFlagと、対象ブロックのCTU内座標と、分割フラグを参照し、境界画素にフィルタ処理を行うか否かを示すフラグedgeFlagsを導出する。そして、edgeFlagsが1の場合は、ブロック上境界にフィルタ処理を適用する。適用方法は、上記垂直方向のブロック左境界と同様である。edgeFlagsが0の場合は、ブロック上境界にフィルタ処理を適用しない。CTU内座標のY座標が0の場合、つまり、対象とするブロック上境界が、CTUの上境界である場合には、edgeFlagsにfilterTopCbEdgeFlagを設定する。これにより、デブロッキングフィルタ305_1は、filterTopCbEdgeFlagが0となる場合には、CTUの上境界にフィルタ処理を適用しない。上記により、デブロッキングフィルタ305_1は、スライス境界もしくはタイル境界の境界フィルタのオンオフが可能である。 The deblocking filter 305_1 performs filtering on the block upper boundary in the horizontal direction (the boundary divided by a line along the horizontal direction, the boundary divided into upper and lower blocks) with reference to the flag filterTopCbEdgeFlag. Specifically, the flag filterLeftCbEdgeFlag, the in-CTU coordinates of the target block, and the division flag are referred to, and a flag edgeFlags indicating whether to filter the boundary pixel is derived. When edgeFlags is 1, filter processing is applied to the block upper boundary. The application method is the same as the above block left boundary in the vertical direction. When edgeFlags is 0, no filtering is applied to the block upper boundary. If the Y coordinate of the in-CTU coordinates is 0, that is, if the target block upper boundary is the upper boundary of the CTU, set filterTopCbEdgeFlag in edgeFlags. As a result, when the filterTopCbEdgeFlag is 0, the deblocking filter 305_1 does not apply the filtering process to the upper boundary of the CTU. According to the above, the deblocking filter 305 _ 1 can turn on / off the boundary filter of slice boundaries or tile boundaries.
 (適応フィルタ305_2)
 適応フィルタ305_2は、デブロッキングフィルタ305_1によるフィルタ処理がオンの場合、デブロッキングフィルタ305_1によるフィルタ後のデブロック済復号画像P_DBに作用する。一方、適応フィルタ305_2は、デブロッキングフィルタ305_1によるフィルタ処理がオフの場合、入力画像Pに作用する。また、適応フィルタ305_2は、デブロッキングフィルタ305_1以外のフィルタ済み復号画像に作用してもよい。例えば、適応サンプルオフセットフィルタP_SAOに作用してもよい。
(Adaptive filter 305_2)
The adaptive filter 305_2 acts on the deblocked decoded image P_DB after the filtering by the deblocking filter 305_1 when the filtering by the deblocking filter 305_1 is on. On the other hand, the adaptive filter 305_2 acts on the input image P when the filtering process by the deblocking filter 305_1 is off. Also, the adaptive filter 305_2 may operate on filtered decoded images other than the deblocking filter 305_1. For example, it may operate on the adaptive sample offset filter P_SAO.
 適応フィルタ305_2は、対象画素設定部305_2a、参照領域設定部305_2b、および、フィルタ処理部305_2cを備えている。 The adaptive filter 305_2 includes a target pixel setting unit 305_2a, a reference area setting unit 305_2b, and a filter processing unit 305_2c.
 (対象画素設定部305_2a)
 対象画素設定部305_2aは、符号化ツリーユニットCTUに含まれる各画素を、ラスタスキャン順に、適応フィルタ処理の対象画素に設定する。対象画素設定部305_2aによって設定された対象画素の位置を示す対象画素位置情報は、参照領域設定部305_2bに供給される。参照領域設定部305_2bにて対象画素の参照領域が設定され、フィルタ処理部305_2cにて対象画素の画素値が算出される。
(Target pixel setting unit 305_2a)
The target pixel setting unit 305_2a sets each pixel included in the coding tree unit CTU as a target pixel for adaptive filter processing in raster scan order. The target pixel position information indicating the position of the target pixel set by the target pixel setting unit 305_2a is supplied to the reference area setting unit 305_2b. The reference area setting unit 305_2b sets the reference area of the target pixel, and the filter processing unit 305_2c calculates the pixel value of the target pixel.
 (参照領域設定部305_2b)
 参照領域設定部305_2bは、符号化ツリーユニットCTU内の対象画素の位置に基づいて、対象画素の周辺に参照領域を設定する。参照領域は、仮想的に設定された参照制限ライン(仮想的境界)によって規定される。すなわち、「参照領域外」とは、対象画素から見て参照制限ラインを越えた外側を示し、「参照領域内」とは、対象画素から見て参照制限ラインの内側を示す。参照領域設定部305_2bは、デブロッキングフィルタ305_1によるフィルタ処理がオンであるかオフであるかに応じて位置の異なる参照制限ラインを設定する。参照領域設定部350_2bが実行する処理の詳細については、参照する図面を替えて後述する。
(Reference area setting unit 305_2b)
The reference area setting unit 305_2b sets a reference area around the target pixel based on the position of the target pixel in the coding tree unit CTU. The reference area is defined by virtually set reference restriction lines (virtual boundaries). That is, "outside reference area" indicates the outside of the target pixel beyond the reference restriction line, and "in reference area" indicates the inside of the reference restriction line from the target pixel. The reference area setting unit 305_2b sets reference restriction lines with different positions depending on whether the filtering process by the deblocking filter 305_1 is on or off. Details of the process performed by the reference area setting unit 350_2b will be described later, with reference to the drawings being referred to.
 (フィルタ処理部305_2c)
 フィルタ処理部305_2cは、対象画素の適応フィルタ済復号画像P_ALF(「フィルタ後画像」とも呼称する)の画素値を、(1)デブロック済復号画像(「フィルタ前画像」とも呼称する)の画素値、または(2)入力画像Pの画素値、であって、参照領域設定部305_2bにより該対象画素について設定された参照領域に含まれる画素の画素値を参照して算出する。フィルタ処理部305_2cが参照する画素を決定する処理については、参照する図面を替えて後述する。生成された適応フィルタ済復号画像P_ALFは、一旦内部メモリ305_3に格納された後、参照ピクチャメモリ306に転送される。
(Filter processing unit 305_2c)
The filter processing unit 305 _ 2 c is a pixel of (1) a deblocked decoded image (also referred to as “pre-filter image”) of the pixel value of the adaptive-filtered decoded image P_ALF (also referred to as “filtered image”) of the target pixel. The value or (2) the pixel value of the input image P, which is calculated by reference to the pixel value of the pixel included in the reference region set for the target pixel by the reference region setting unit 305_2b. The process of determining the pixel to be referred to by the filter processing unit 305_2c will be described later, with reference to the drawings being referred to. The generated adaptive filtered decoded image P_ALF is temporarily stored in the internal memory 305_3, and then transferred to the reference picture memory 306.
 (適応フィルタの処理)
 図8は、本実施形態に係るループフィルタ305の参照領域設定部305_2bおよびフィルタ処理部305_2cによる処理を示すフローチャートである。なお、各処理の詳細については、参照する図面を替えて後述する。
(Processing of adaptive filter)
FIG. 8 is a flowchart showing processing by the reference region setting unit 305_2b and the filter processing unit 305_2c of the loop filter 305 according to the present embodiment. The details of each process will be described later, with reference to the drawings.
 (ステップS10)
 参照領域設定部305_2bは、参照制限ラインを設定するための変数である参照制限バウンダリ変数を設定する。参照制限バウンダリ変数について、図9を用いて説明する。図9は、本実施形態における参照制限ラインについて説明するための図である。
(Step S10)
The reference area setting unit 305_2b sets a reference restriction boundary variable which is a variable for setting a reference restriction line. The reference restriction boundary variable will be described with reference to FIG. FIG. 9 is a diagram for describing a reference restriction line in the present embodiment.
 本実施形態では、参照領域設定部305_2bは、水平方向に延伸する参照制限ラインを設定する。具体的には、参照領域設定部305_2bは、符号化ツリーユニットCTUの上辺(以下、「上側のCTU境界」とも呼称する)から何ライン上側に参照制限ラインを設定するかを示す参照制限バウンダリ変数K1、および符号化ツリーユニットCTUの下辺(以下、「下側のCTU境界」とも呼称する)から何ライン上側および下側に参照制限ラインを設定するかを示す参照制限バウンダリ変数K2を設定する。 In the present embodiment, the reference area setting unit 305_2b sets a reference restriction line extending in the horizontal direction. Specifically, the reference area setting unit 305_2b is a reference restriction boundary variable indicating how many lines the reference restriction line is to be set from the upper side (hereinafter also referred to as "upper CTU boundary") of the encoding tree unit CTU. K1 and a reference restriction boundary variable K2 indicating how many reference restriction lines are to be set on the upper and lower sides of the lines from the lower side of the coding tree unit CTU (hereinafter also referred to as "lower CTU boundary").
 そして、参照領域設定部305_2bは、対象画素設定部305_2aによって設定された対象画素の位置に応じて、参照制限ラインを設定する。 Then, the reference area setting unit 305_2b sets the reference restriction line according to the position of the target pixel set by the target pixel setting unit 305_2a.
 まず、参照領域設定部305_2bは、設定した参照制限バウンダリ変数K2を参照して、符号化ツリーユニットCTUの下辺から参照制限バウンダリ変数K2ライン上側に、参照制限ラインvbLine2を設定する。そして、参照領域設定部305_2bは、符号化ツリーユニットCTU内に設定された対象画素の位置が、参照制限ラインvbLine2の上側にある場合、参照制限バウンダリ変数K1を参照し、符号化ツリーユニットCTUの上辺から参照制限バウンダリ変数K1ライン上側に、参照制限ラインvbLine1を設定する。 First, the reference area setting unit 305_2b sets the reference restriction line vbLine2 from the lower side of the encoding tree unit CTU to the upper side of the reference restriction boundary variable K2 with reference to the set reference restriction boundary variable K2. Then, when the position of the target pixel set in the coding tree unit CTU is above the reference restriction line vbLine2, the reference area setting unit 305_2b refers to the reference restriction boundary variable K1 and sets the encoding tree unit CTU. The reference restriction line vbLine1 is set from the upper side to the reference restriction boundary variable K1 line upper side.
 一方、符号化ツリーユニットCTU内に設定された対象画素の位置が、参照制限ラインvbLine2の下側にある場合、参照領域設定部305_2bは、参照制限バウンダリ変数K2を参照し、符号化ツリーユニットCTUの下辺から参照制限バウンダリ変数K2ライン下側に、参照制限ラインvbLine3を設定してもよい。 On the other hand, when the position of the target pixel set in the coding tree unit CTU is below the reference restriction line vbLine2, the reference region setting unit 305_2b refers to the reference restriction boundary variable K2 and the coding tree unit CTU. A reference restriction line vbLine3 may be set from the lower side to the lower side of the reference restriction boundary variable K2 line.
 なお、図9に示すように、上側のCTU境界と参照制限ラインvbLine2との間における符号化ツリーユニットCTUの領域をtop part、参照制限ラインvbLine2と下側のCTU境界との間における符号化ツリーユニットCTUの領域をbottom partと称する。対象画素がtop partに含まれる場合、参照制限ラインvbLine1と参照制限ラインvbLine2との間の領域が参照領域となる。また、対象画素がbottom partに含まれる場合、参照制限ラインvbLine2と参照制限ラインvbLine3との間の領域が参照領域となる。 As shown in FIG. 9, the area of the coding tree unit CTU between the upper CTU boundary and the reference restriction line vbLine2 is top part, and the coding tree between the reference restriction line vbLine2 and the lower CTU boundary The area of the unit CTU is called bottom part. When the target pixel is included in the top part, an area between the reference restriction line vbLine1 and the reference restriction line vbLine2 is a reference area. When the target pixel is included in the bottom part, the area between the reference restriction line vbLine2 and the reference restriction line vbLine3 is a reference area.
 参照領域設定部305_2bは、仮想的境界内に位置する画素値を参照してフィルタ処理を行う。 The reference area setting unit 305_2b performs the filtering process with reference to the pixel values located in the virtual boundary.
 (ステップS20)
 参照領域設定部305_2bは、対象画素の画素値を算出するため、参照する画素である参照画素の位置を設定する。参照画素が位置する領域を「フィルタ参照領域」とよぶ。フィルタ参照領域は参照領域とは異なる領域である。フィルタ参照領域内の画素が参照領域内である場合と参照領域外である場合とで、参照領域設定部305_2bの処理が異なる。参照領域設定部305_2bは、参照画素の位置が、ステップS10において設定された参照領域外であった場合、当該参照領域外の画素は参照せず、他の画素を参照画素として設定する。参照画素の位置が参照領域外であった場合の参照領域設定部305_2bの詳細な処理は、参照する図面を替えて後述する。
(Step S20)
The reference area setting unit 305_2b sets the position of a reference pixel which is a pixel to be referred to in order to calculate the pixel value of the target pixel. The area where the reference pixel is located is called a "filter reference area". The filter reference area is an area different from the reference area. The processing of the reference area setting unit 305_2b differs depending on whether the pixel in the filter reference area is within the reference area or outside the reference area. When the position of the reference pixel is outside the reference region set in step S10, the reference region setting unit 305_2b does not refer to a pixel outside the reference region, and sets another pixel as the reference pixel. Detailed processing of the reference area setting unit 305_2b in the case where the position of the reference pixel is outside the reference area will be described later, with reference to the drawings being referred to.
 (ステップ30)
 フィルタ処理部305_2cは、ステップS20において設定された参照画素の位置を参照し、対象画素の画素値を算出する。
(Step 30)
The filter processing unit 305_2c refers to the position of the reference pixel set in step S20, and calculates the pixel value of the target pixel.
 (参照領域設定部305_2bが実行する処理の詳細)
 図10は、本実施形態に係るループフィルタ305の参照領域設定部305_2bが実行する処理の概要を示すフローチャートである。
(Details of the process executed by the reference area setting unit 305_2b)
FIG. 10 is a flowchart showing an outline of processing performed by the reference area setting unit 305_2b of the loop filter 305 according to the present embodiment.
 (ステップS12)
 参照領域設定部305_2bは、境界フィルタ部として動作するデブロッキングフィルタ305_1によるフィルタ処理がスライス境界もしくはタイル境界においてオンであるかオフであるかに応じて位置の異なる仮想的境界を設定する。参照領域設定部305_2bは、デブロッキングフィルタ305_1によるフィルタ処理がオフであるか否かを判定する。デブロッキングフィルタ305_1によるフィルタ処理がオフである場合は、ステップS14に移行する。一方、デブロッキングフィルタ305_1によるフィルタ処理がオンである場合は、ステップS16に移行する。
(Step S12)
The reference area setting unit 305_2b sets different virtual boundaries depending on whether filtering by the deblocking filter 305_1 operating as a boundary filter unit is on or off at slice boundaries or tile boundaries. The reference area setting unit 305_2b determines whether the filtering process by the deblocking filter 305_1 is off. When the filtering process by the deblocking filter 305_1 is off, the process proceeds to step S14. On the other hand, when the filtering process by the deblocking filter 305_1 is on, the process proceeds to step S16.
 (ステップS14)
 参照領域設定部305_2bは、参照制限バウンダリ変数K(符号化ツリーユニットCTUの上辺側の参照制限ラインを設定している場合は「K1」であり、符号化ツリーユニットCTUの下辺側の参照制限ラインを設定している場合は「K2」である。)に「0」を設定する。
(Step S14)
The reference area setting unit 305_2b is “K1” when the reference restriction line on the upper side of the reference restriction boundary variable K (the encoding tree unit CTU is set, “K1”, and the reference restriction line on the lower side of the encoding tree unit CTU Is set “0” to “K2”.
 (ステップS16)
 参照領域設定部305_2bは、参照制限バウンダリ変数Kに「NDF」を設定する。NDFは、例えば4である。
(Step S16)
The reference area setting unit 305_2b sets “NDF” to the reference restriction boundary variable K. The NDF is, for example, four.
 (デブロッキングフィルタ305_1によるフィルタ処理がオフの場合)
 図11は、本実施形態に係るループフィルタ305の参照領域設定部305_2bが実行する処理の詳細を示すフローチャートである。図11を参照して、デブロッキングフィルタ305_1によるフィルタ処理がオフか否かの判定の具体例を説明する。また、図11を参照して、符号化ツリーユニットCTUの上辺側の参照制限バウンダリ変数と、符号化ツリーユニットCTUの下辺側の参照制限バウンダリ変数とを個別に設定する場合について説明する。
(When the filtering process by the deblocking filter 305_1 is off)
FIG. 11 is a flowchart showing details of processing executed by the reference region setting unit 305_2b of the loop filter 305 according to the present embodiment. A specific example of the determination as to whether or not the filtering process by the deblocking filter 305_1 is off will be described with reference to FIG. A case will be described with reference to FIG. 11 in which reference restriction boundary variables on the upper side of the encoding tree unit CTU and reference restriction boundary variables on the lower side of the encoding tree unit CTU are individually set.
 (ステップS12a)
 参照領域設定部305_2bは、
  (1)上側のCTU境界がピクチャの境界にある場合、または、
  (2)タイル境界に対するデブロッキングフィルタによるフィルタ処理がオフ(loop_filter_across_tiles_enabled_flag == 0)、かつ上側のCTU境界がタイルの境界にある場合、または、
  (3)スライス境界に対するデブロッキングフィルタによるフィルタ処理がオフ((slice_loop_filter_across_slices_enabled_flag == 0)、かつ上側のCTU境界がスライスの境界にある場合
  に、デブロッキングフィルタ305_1によるフィルタ処理がオフであると判定する。参照領域設定部305_2bがデブロッキングフィルタ305_1によるフィルタ処理がオフであると判定した場合、ステップS14aに移行する。一方、参照領域設定部305_2bがデブロッキングフィルタ305_1によるフィルタ処理がオフであると判定しない場合、ステップS16aに移行する。
(Step S12a)
The reference area setting unit 305_2b
(1) When the upper CTU boundary is at the boundary of a picture, or
(2) When filtering by the deblocking filter for tile boundaries is off (loop_filter_across_tiles_enabled_flag == 0) and the upper CTU boundary is at tile boundaries, or
(3) When the filtering process by the deblocking filter for the slice boundary is off ((slice_loop_filter_across_slices_enabled_flag == 0) and the upper CTU boundary is at the slice boundary, it is determined that the filtering process by the deblocking filter 305_1 is off. If the reference area setting unit 305_2b determines that the filtering process by the deblocking filter 305_1 is off, the process proceeds to step S14a, while the reference area setting unit 305_2b determines that the filtering process by the deblocking filter 305_1 is off. If not, the process proceeds to step S16a.
 (ステップS14a)
 参照領域設定部305_2bは、参照制限バウンダリ変数K1に「0」を設定する。
(Step S14a)
The reference area setting unit 305_2b sets “0” to the reference restriction boundary variable K1.
 (ステップS16a)
 参照領域設定部305_2bは、参照制限バウンダリ変数K1に「NDB」を設定する。NDBは例えば4である。
(Step S16a)
The reference area setting unit 305_2b sets “NDB” to the reference restriction boundary variable K1. NDB is four, for example.
 (ステップS12b)
 参照領域設定部305_2bは、
  (1)下側のCTU境界がピクチャの境界にある場合、または、
  (2)タイル境界に対するデブロッキングフィルタによるフィルタ処理がオフ(loop_filter_across_tiles_enabled_flag == 0)、かつ下側のCTU境界がタイルの境界にある場合、または、
  (3)スライス境界に対するデブロッキングフィルタによるフィルタ処理がオフ((slice_loop_filter_across_slices_enabled_flag == 0)、かつ下側のCTU境界がスライスの境界にある場合
  に、デブロッキングフィルタ305_1によるフィルタ処理がオフであると判定する。参照領域設定部305_2bがデブロッキングフィルタ305_1によるフィルタ処理がオフであると判定した場合、ステップS14bに移行する。一方、参照領域設定部305_2bがデブロッキングフィルタ305_1によるフィルタ処理がオフであると判定しない場合、ステップS16bに移行する。
(Step S12b)
The reference area setting unit 305_2b
(1) When the lower CTU boundary is at a picture boundary, or
(2) When filtering by the deblocking filter for tile boundaries is off (loop_filter_across_tiles_enabled_flag == 0) and the lower CTU boundary is at tile boundaries, or
(3) It is determined that the filtering by the deblocking filter 305_1 is off when the filtering by the deblocking filter for the slice boundary is off ((slice_loop_filter_across_slices_enabled_flag == 0) and the lower CTU boundary is at the boundary of the slice. If the reference area setting unit 305_2b determines that the filtering process by the deblocking filter 305_1 is off, the process proceeds to step S14b, while the reference area setting unit 305_2b determines that the filtering process by the deblocking filter 305_1 is off. If not determined, the process proceeds to step S16b.
 (ステップS14b)
 参照領域設定部305_2bは、参照制限バウンダリ変数K2に「0」を設定する。
(Step S14b)
The reference area setting unit 305_2b sets “0” to the reference restriction boundary variable K2.
 (ステップS16b)
 参照領域設定部305_2bは、参照制限バウンダリ変数K2に「NDB」を設定する。NDBは例えば4である。
(Step S16b)
The reference area setting unit 305_2b sets “NDB” to the reference restriction boundary variable K2. NDB is four, for example.
 (参照領域の詳細)
 図12は、本実施形態における参照領域の詳細について説明するための図である。参照領域設定部305_2bは、対象画素の位置と、参照制限ラインに応じた参照領域を導出する。
(Detail of reference area)
FIG. 12 is a diagram for describing the details of the reference area in the present embodiment. The reference area setting unit 305_2b derives the reference area according to the position of the target pixel and the reference restriction line.
 図12の(a)は対象画素がtop partに位置する場合の参照領域を示す。参照領域設定部305_2bは、対象画素tpがtop partにある場合、第1参照制限ラインvbLine1と第2参照制限ラインvbLine2の間を参照領域に設定する。参照領域設定部305_2bは、参照領域における垂直方向の下限の画素位置yMinを、上側のCTU境界から参照制限バウンダリ変数K1画素分だけ離れた位置に設定する。また、参照領域設定部305_2bは、参照領域における垂直方向の上限の画素位置yMaxを、下側のCTU境界から(参照制限バウンダリ変数K2-1)画素分だけ離れた位置に設定する。 FIG. 12A shows a reference area when the target pixel is located at the top part. When the target pixel tp is in the top part, the reference area setting unit 305_2b sets the area between the first reference restriction line vbLine1 and the second reference restriction line vbLine2 as a reference area. The reference area setting unit 305_2b sets the pixel position yMin at the lower limit in the vertical direction in the reference area to a position separated from the upper CTU boundary by the reference restriction boundary variable K1 pixel. In addition, the reference area setting unit 305_2b sets the pixel position yMax at the upper limit in the vertical direction in the reference area to a position away from the lower CTU boundary by (reference restriction boundary variable K2-1) pixels.
 図12の(b)は対象画素がbottom partに位置する場合の参照領域を示す。参照領域設定部305_2bは、対象画素bpがbottom partにある場合、第2参照制限ラインvbLine2と第3参照制限ラインvbLine3の間を参照領域に設定する。参照領域設定部305_2bは、参照領域における垂直方向の下限の画素位置yMinを、下側のCTU境界から参照制限バウンダリ変数K2画素分だけ離れた位置に設定する。また、参照領域設定部305_2bは、参照領域における垂直方向の上限の画素位置yMaxを、下側のCTU境界から(参照制限バウンダリ変数K2-1)画素分だけ離れた位置に設定する。 (B) of FIG. 12 shows a reference area when the target pixel is located in the bottom part. When the target pixel bp is in the bottom part, the reference area setting unit 305_2b sets the area between the second reference restriction line vbLine2 and the third reference restriction line vbLine3 as a reference area. The reference area setting unit 305_2b sets the pixel position yMin at the lower limit in the vertical direction in the reference area to a position away from the lower CTU boundary by the reference restriction boundary variable K2 pixels. In addition, the reference area setting unit 305_2b sets the pixel position yMax at the upper limit in the vertical direction in the reference area to a position away from the lower CTU boundary by (reference restriction boundary variable K2-1) pixels.
 図13は、本実施形態に係るループフィルタ305の参照領域設定部305_2bが実行する処理の詳細を示すフローチャートである。 FIG. 13 is a flowchart showing details of processing executed by the reference region setting unit 305_2b of the loop filter 305 according to the present embodiment.
 (ステップS22)
 参照領域設定部305_2bは、対象画素がtop partに位置するか、bottom partに位置するかを判定する。対象画素がtop partに位置すると判定した場合は、ステップS24に移行する。一方、対象画素がbottom partに位置すると判定した場合は、ステップS26に移行する。
(Step S22)
The reference area setting unit 305_2b determines whether the target pixel is positioned at the top part or the bottom part. If it is determined that the target pixel is located at the top part, the process proceeds to step S24. On the other hand, if it is determined that the target pixel is located at the bottom part, the process proceeds to step S26.
 (ステップS24)
 参照領域設定部305_2bは、参照領域における垂直方向の下限の画素位置yMinを、第1参照制限ラインvbLine1に設定すると共に、参照領域における垂直方向の上限の画素位置yMaxを、第2参照制限ラインvbLine2から1引いた値に設定する。
(Step S24)
The reference area setting unit 305_2b sets the pixel position yMin at the lower limit in the vertical direction in the reference area to the first reference restriction line vbLine1 and sets the pixel position yMax at the upper limit in the vertical direction in the reference area to the second reference restriction line vbLine2. Set to the value obtained by subtracting 1 from.
 (ステップS26)
 参照領域設定部305_2bは、参照領域における垂直方向の下限の画素位置yMinを、第2参照制限ラインvbLine2に設定すると共に、参照領域における垂直方向の上限の画素位置yMaxを、第3参照制限ラインvbLine3から1引いた値に設定する。
(Step S26)
The reference area setting unit 305_2b sets the pixel position yMin at the lower limit in the vertical direction in the reference area to the second reference restriction line vbLine2, and the pixel position yMax at the upper limit in the vertical direction in the reference area to the third reference restriction line vbLine3. Set to the value obtained by subtracting 1 from.
 (ステップS28)
 参照領域設定部305_2bは、参照画素の位置が参照領域外の場合、参照画素の位置を補正する。
(Step S28)
The reference area setting unit 305_2b corrects the position of the reference pixel when the position of the reference pixel is out of the reference area.
 また、図16は、本実施形態に係るループフィルタ305の参照領域設定部305_2bによる参照画素位置設定の処理の例を示す図である。 FIG. 16 is a diagram showing an example of reference pixel position setting processing by the reference region setting unit 305_2b of the loop filter 305 according to the present embodiment.
 図16に示すCTUにおいて、対象画素tpは、top partに位置する。また、図16に示すCTUにおいて、フィルタ参照領域はひし形である。対象画素tpは、top partに位置するので、参照領域における垂直方向の上限は、yMaxに設定される。 In the CTU shown in FIG. 16, the target pixel tp is located at the top part. Also, in the CTU shown in FIG. 16, the filter reference area is a diamond. Since the target pixel tp is located at top part, the upper limit in the vertical direction in the reference area is set to yMax.
 図16の(a)は、第2参照制限ラインvbLine2上の画素を利用する場合を示す。図16の(a)に示すように、参照領域設定部305_2bは、参照領域外の参照画素の画素値を、水平方向の位置が同じyMax上の参照画素の画素値に置き換える。 (A) of FIG. 16 shows the case where the pixel on the second reference restriction line vbLine2 is used. As illustrated in (a) of FIG. 16, the reference area setting unit 305_2b replaces the pixel value of the reference pixel outside the reference area with the pixel value of the reference pixel on yMax at the same horizontal position.
 図16の(b)は、参照画素群の中心の画素を利用する場合を示す。図16の(b)に示すように、参照領域設定部305_2bは、参照領域外の参照画素の画素値を、参照画素群の中心の画素の画素値に置き換える。図16の(b)に示す場合において、参照画素群の中心の画素は、対象画素である。図16の(b)に示す場合、参照領域設定部305_2bは、フィルタ参照領域内であって、参照領域外の参照画素の重み係数の値を中心画素の重み係数に加算し、参照領域外の参照画素の重み係数を0に設定する。より具体的には、フィルタ参照領域内であって、参照領域外の参照画素の重み係数をWA、WBと表現し、中心画素の重み係数をWCと表現した場合、参照領域設定部305_2bは、中心画素の重み係数をWC+WA+WBに設定したうえで、重み係数WA、WBを0にする。 (B) of FIG. 16 shows the case where the central pixel of the reference pixel group is used. As illustrated in (b) of FIG. 16, the reference area setting unit 305_2b replaces the pixel value of the reference pixel outside the reference area with the pixel value of the central pixel of the reference pixel group. In the case shown in (b) of FIG. 16, the central pixel of the reference pixel group is a target pixel. In the case shown in (b) of FIG. 16, the reference area setting unit 305_2b adds the value of the weighting factor of the reference pixel outside the reference area to the weighting factor of the central pixel within the filter reference area. The weighting factor of the reference pixel is set to 0. More specifically, when the weighting coefficients of reference pixels outside the reference region in the filter reference region are expressed as WA and WB, and the weighting coefficient of the central pixel is expressed as WC, the reference region setting unit 305_2b is After setting the weight coefficient of the central pixel to WC + WA + WB, the weight coefficients WA and WB are set to 0.
 図16の(c)は、参照画素群の中心の画素と垂直方向の位置が同じ画素群(「中心ライン画素」とも呼称する)を利用する場合を示す。図16の(c)に示すように、参照領域設定部305_2bは、参照領域外の参照画素の画素値を、水平方向の位置が同じ中心ライン画素の画素値に置き換える。 FIG. 16C shows the case where a pixel group (also referred to as “center line pixel”) having the same position in the vertical direction as the central pixel of the reference pixel group is used. As shown in (c) of FIG. 16, the reference area setting unit 305_2b replaces the pixel values of the reference pixels outside the reference area with the pixel values of the center line pixels at the same horizontal position.
 図16の(d)は、第2参照制限ラインvbLine2を中心線として線対称(鏡像対称)となる位置の画素を利用する場合を示す。図16の(d)に示すように、参照領域設定部305_2bは、参照領域外の参照画素の画素値を、第2参照制限ラインvbLine2を中心線として線対称となる位置の画素の画素値に置き換える。 (D) of FIG. 16 shows the case where the pixel of the position which becomes line symmetry (mirror symmetry) is made centering on the 2nd reference restriction line vbLine2. As shown in (d) of FIG. 16, the reference area setting unit 305_2b sets the pixel values of the reference pixels outside the reference area to the pixel values of the pixels at positions that are line symmetrical with respect to the second reference limit line vbLine2. replace.
 (参照画素の位置の補正の詳細)
 以下に、適応フィルタ305a_2による参照画素の位置の補正の具体的な流れを説明する。対象画素の座標(x, y)に対して、各フィルタ係数(i=0..NALF_FLT_TAP-1)について、ステップS1-1~ステップS1-7を実行し、参照画素の位置(xPos[i]、yPos[i])を導出する。導出された参照画素の位置(xPos[i]、yPos[i])(i=0.. NALF_FLT_TAP-1)を用いて、ステップS1-8を実行し、フィルタ処理を行う。以下、ピクチャ左上は、ピクチャに限らず、スライス左上やタイル左上でもよい。ここで、NALF_FLT_TAPは、適応フィルタALFのタップ数、換言すれば、適応フィルタALFが参照するフィルタ参照領域の一辺の画素数を示すパラメータである。
(ステップS1-1) 対象画素設定部305_2aは、CUの左上のx座標xCBにxを加えることにより、ピクチャ左上を基準としたx座標xxを算出する。また、CUの左上のy座標yCBにyを加えることにより、ピクチャ左上を基準としたy座標yyを算出する。
(ステップS1-2) 続いて、対象画素設定部305_2aは、ピクチャ左上を基準とした座標(xx、yy)からCTU左上を基準とした座標(xInCTU, yInCTU)を導出する。具体的には、ステップS1-1で算出したxxをCTUサイズで割った余りを変数xInCTUに代入し、ステップS1-1で算出したyをCTUサイズで割った余りを変数yInCTUに代入する。
(ステップS1-3) 続いて、参照領域設定部305_2bは、フィルタ係数のインデックスiに対応する対象画素からの水平方向の位置および垂直方向の位置horPos[i]、verPos[i]を、参照画素のX座標xPos[i]、参照画素のY座標yPos[i]として代入する。
(ステップS1-4) 続いて、参照領域設定部305_2bは、対象画素の属するCTUについて、上側のCTU境界に関しデブロックフィルタの処理がオフである場合、参照制限バウンダリ変数K1に0を代入し、処理がオンである場合、参照制限バウンダリ変数K1にNDFを代入する。また、対象画素の属するCTUについて、下側のCTU境界に関しデブロックフィルタの処理がオフである場合、参照制限バウンダリ変数K2に0を代入し、処理がオンである場合、参照制限バウンダリ変数K2にNDFを代入する。
(ステップS1-5) 続いて、参照領域設定部305_2bは、参照制限バウンダリ変数K1にマイナス符号をつけた値を、参照制限ラインvbLine1に代入する。また、参照領域設定部305_2bは、CTUサイズから参照制限バウンダリ変数K2を引いた値を、参照制限ラインvbLine2に代入する。また、参照領域設定部305_2bは、CTUサイズに参照制限バウンダリ変数K2を足した値を、参照制限ラインvbLine3に代入する。
(ステップS1-6) 続いて、参照領域設定部305_2bは、対象画素のY座標yInCTUが参照制限ラインvbLine2未満である場合、参照領域の下限yMinに参照制限ラインvbLine1を代入し、参照領域の上限yMaxに参照制限ラインvbLine2から1引いた値を代入する。一方、参照領域設定部305_2bは、対象画素のY座標yInCTUが参照制限ラインvbLine2以上である場合、参照領域の下限yMinに参照制限ラインvbLine2を代入し、参照領域の上限yMaxに参照制限ラインvbLine3から1引いた値を代入する。
(ステップS1-7) 続いて、参照領域設定部305_2bは、下記何れかの方法で参照位置を補正する。
(a) 参照領域設定部305_2bは、対象画素のY座標yInCTUと参照画素のY座標yPos [i]との和を、参照領域の下限yMinと参照領域の上限yMaxとの間にクリッピングした値から対象画素のY座標yInCTUを引いた値を参照画素のY座標yPos[i]に代入する(図16の(a)参照)。
(b) 参照領域設定部305_2bは、対象画素のY座標yInCTUと参照画素のY座標yPos [i]との和が参照領域の下限yMin未満の場合、または対象画素のY座標yInCTUと参照画素のY座標yPos[i]との和が参照領域の上限yMax超過の場合、参照画素のX座標xPos[i]およびY座標yPos[i]に0を代入する(図16の(b)参照)。
(c) 参照領域設定部305_2bは、対象画素のY座標yInCTUと参照画素のY座標yPos [i]との和が参照領域の下限yMin未満の場合、または対象画素のY座標yInCTUと参照画素のY座標yPos[i]との和が参照領域の上限yMax超過の場合、参照画素のY座標yPos[i]に0を代入する(図16の(c)参照)。
(d) 参照領域設定部305_2bは、対象画素のY座標yInCTUと参照画素のY座標yPos [i]との和が参照領域の下限yMin未満の場合、参照領域の下限yMinの2倍から対象画素のY座標yInCTUの2倍および参照画素のY座標yPos[i]を引いた値を、参照画素のY座標yPos[i]に代入する。また、参照領域設定部305_2bは、対象画素のY座標yInCTUと参照画素のY座標yPos[i]との和が参照領域の上限yMax超過の場合、参照領域の上限yMaxの2倍から対象画素のY座標yInCTUの2倍および参照画素のY座標yPos[i]を引いた値を、参照画素のY座標yPos[i]に代入する(図16の(d)参照)。
(ステップS1-8) 続いて、フィルタ処理部305_2cは、導出された参照画素位置xPos[i], yPos[i]の参照画素refSamples[xPos[i]][yPos[i]]とフィルタ係数flt[i]とに基づいてフィルタ処理をする。具体的には、各i(i=0.. NALF_FLT_TAP-1)について、参照画素とフィルタ係数の積の和を導出し、導出した積和をシフトすることで、フィルタ値画素値を導出する。なお、シフトする前にオフセット係数を加算してもよい。
(Details of correction of reference pixel position)
The specific flow of correction of the position of the reference pixel by the adaptive filter 305a_2 will be described below. Steps S1-1 to S1-7 are executed for each filter coefficient (i = 0..NALF_FLT_TAP-1) with respect to the coordinates (x, y) of the target pixel, and the position of the reference pixel (xPos [i] , YPos [i]). Step S1-8 is executed using the derived position (xPos [i], yPos [i]) (i = 0. NALF_FLT_TAP-1) of the reference pixel, and the filtering process is performed. Hereinafter, the upper left of the picture is not limited to the picture but may be the upper left of the slice or the upper left of the tile. Here, NALF_FLT_TAP is a parameter indicating the number of taps of the adaptive filter ALF, in other words, the number of pixels on one side of the filter reference area to which the adaptive filter ALF refers.
(Step S1-1) The target pixel setting unit 305_2a calculates the x coordinate xx based on the upper left of the picture by adding x to the x coordinate xCB on the upper left of the CU. Further, y is added to the y coordinate yCB at the upper left of CU to calculate the y coordinate yy based on the upper left of the picture.
(Step S1-2) Subsequently, the target pixel setting unit 305_2a derives coordinates (xInCTU, yInCTU) based on the CTU upper left as coordinates (xx, yy) based on the upper left of the picture. Specifically, the remainder obtained by dividing xx by the CTU size at step S1-1 is substituted into a variable xInCTU, and the remainder calculated by dividing y calculated at step S1-1 by the CTU size is substituted into a variable yInCTU.
(Step S1-3) Subsequently, the reference area setting unit 305_2b sets the horizontal and vertical positions horPos [i] and verPos [i] from the target pixel corresponding to the index i of the filter coefficient as reference pixels. Are substituted as the X coordinate xPos [i] of Y and the Y coordinate yPos [i] of the reference pixel.
(Step S1-4) Subsequently, the reference area setting unit 305_2b substitutes 0 for the reference restriction boundary variable K1 when the process of the deblock filter is off with respect to the upper CTU boundary for the CTU to which the target pixel belongs. When the process is on, NDF is substituted for the reference restriction boundary variable K1. Further, for the CTU to which the target pixel belongs, when the deblock filter processing is off with respect to the lower CTU boundary, 0 is substituted into the reference limit boundary variable K2, and when the processing is on, the reference limit boundary variable K2 is Substitute NDF.
(Step S1-5) Subsequently, the reference area setting unit 305_2b substitutes a value obtained by adding a minus sign to the reference restriction boundary variable K1 to the reference restriction line vbLine1. The reference area setting unit 305_2b substitutes a value obtained by subtracting the reference restriction boundary variable K2 from the CTU size into the reference restriction line vbLine2. The reference area setting unit 305_2b substitutes a value obtained by adding the reference restriction boundary variable K2 to the CTU size, to the reference restriction line vbLine3.
(Step S1-6) Subsequently, when the Y coordinate yInCTU of the target pixel is less than the reference restriction line vbLine2, the reference area setting unit 305_2b substitutes the reference restriction line vbLine1 for the lower limit yMin of the reference area, and the upper limit of the reference area. Substitute the value obtained by subtracting 1 from the reference restriction line vbLine2 into yMax. On the other hand, when the Y coordinate yInCTU of the target pixel is equal to or more than the reference restriction line vbLine2, the reference area setting unit 305_2b substitutes the reference restriction line vbLine2 for the lower limit yMin of the reference area and starts the reference restriction line vbLine3 for the upper limit yMax of the reference area. Substitute 1 minus the value.
(Step S1-7) Subsequently, the reference area setting unit 305_2b corrects the reference position by any of the following methods.
(A) The reference area setting unit 305_2b uses a value obtained by clipping the sum of the Y coordinate yInCTU of the target pixel and the Y coordinate yPos [i] of the reference pixel between the lower limit yMin of the reference area and the upper limit yMax of the reference area. The value obtained by subtracting the Y coordinate yInCTU of the target pixel is substituted into the Y coordinate yPos [i] of the reference pixel (see (a) in FIG. 16).
(B) If the sum of the Y coordinate yInCTU of the target pixel and the Y coordinate yPos [i] of the reference pixel is less than the lower limit yMin of the reference region, the reference region setting unit 305_2b, or the Y coordinate yInCTU of the target pixel and the reference pixel If the sum with the Y coordinate yPos [i] exceeds the upper limit yMax of the reference area, 0 is substituted for the X coordinate xPos [i] and the Y coordinate yPos [i] of the reference pixel (see (b) in FIG. 16).
(C) If the sum of the Y coordinate yInCTU of the target pixel and the Y coordinate yPos [i] of the reference pixel is less than the lower limit yMin of the reference region, the reference region setting unit 305_2b, or the Y coordinate yInCTU of the target pixel and the reference pixel If the sum with the Y coordinate yPos [i] exceeds the upper limit yMax of the reference area, 0 is substituted for the Y coordinate yPos [i] of the reference pixel (see (c) in FIG. 16).
(D) If the sum of the Y coordinate yInCTU of the target pixel and the Y coordinate yPos [i] of the reference pixel is less than the lower limit yMin of the reference region, the reference region setting unit 305_2b calculates the target pixel from twice the lower limit yMin of the reference region. The value obtained by subtracting twice the Y coordinate yInCTU of and the Y coordinate yPos [i] of the reference pixel is substituted for the Y coordinate yPos [i] of the reference pixel. In addition, when the sum of the Y coordinate yInCTU of the target pixel and the Y coordinate yPos [i] of the reference pixel exceeds the upper limit yMax of the reference region, the reference region setting unit 305_2b calculates twice the upper limit yMax of the reference region to the target pixel A value obtained by subtracting twice the Y coordinate yInCTU and the Y coordinate yPos [i] of the reference pixel is substituted for the Y coordinate yPos [i] of the reference pixel (see (d) in FIG. 16).
(Step S1-8) Subsequently, the filter processing unit 305_2c calculates the reference pixel refSamples [xPos [i]] [yPos [i]] of the derived reference pixel position xPos [i], yPos [i] and the filter coefficient flt. Filter based on [i]. Specifically, for each i (i = 0 .. NALF_FLT_TAP-1), the sum of products of reference pixels and filter coefficients is derived, and the derived product sum is shifted to derive the filter value pixel value. The offset coefficient may be added before shifting.
 上記の処理の流れを、疑似コードを例にして示せば、以下の通りである。
// (x,y)はCUの左上座標(xCb,yCb)を基準とした対象画素の座標
xx = xCb + x, yy = yCb + y
xInCTU = xx % CtuSize
yInCTU = yy % CtuSize
// 参照位置設定
xPos[i] = xx + horPos[i]
yPos[i] = yy + verPos[i]
//参照制限ライン設定
K1 =上デブロッキングフィルタオフ ? 0 : NDF
K2 =下デブロッキングフィルタオフ ? 0 : NDF
vbLine1 = -K1
vbLine2 = CtuSize - K2
vbLine3 = CtuSize + K2
// 対象画素の位置に応じて参照範囲設定
// 対象画素がtop partにある場合には、参照制限ラインvbLine1と参照制限ラインvbLine2の間に制限
// それ以外(対象画素がbottom partにある場合には)、参照制限ラインvbLine2と、次の第2の参照制限ラインvbLine3の間に制限
if (yInCTU < vbLine2) {yMin = vbLine1, yMax = vbLine2 - 1}
if (yInCTU >= vbLine2) {yMin = vbLine2, yMax = vbLine3 - 1}
// 参照位置補正(以下の(a),(b),(c),(d)のいずれかが利用可能)
yPos[i] = Clip3(yMin, yMax, yInCTU + yPos[i]) - yInCTU // (a)境界画素利用の場合
if (yPos[i] < yMin || yPos[i] > yMax) {xPos[i] = xInCTU, yPos[i] = yInCTU } // (b)中心画素利用の場合
if (yPos[i] < yMin || yPos[i] > yMax) {yPos[i] = yInCTU } // (c)中心ライン利用の場合
if (yPos[i] < yMin) {yPos[i] = 2*yMin - yPos[i]}  // (d)ミラー画素利用の場合
if (yPos[i] > yMax) {yPos[i] = 2*yMax - yPos[i]} // (d)ミラー画素利用の場合
// 導出された参照位置xPos[i], yPos[i]とフィルタ係数fltCoef[i]に基づいてフィルタ処理
fltSamples[xx][yy] = Σ refSamples[xPos[i]][yPos[i]] * fltCoeff[i]
 以下の疑似コードも上記と等価である。
// 各i = 0..NALF_FLT_TAP-1について、参照画素の位置xPos[i], yPos[i]を導出する
// CTU内位置計算
// (x,y)はCUの左上座標(xCB,yCB)を基準とした対象画素の座標
xx = xCB + x, yy = yCB + y
xInCTU = xx % CtuSize
yInCTU = yy % CtuSize
// 参照位置設定
xPos[i] = horPos[i]
yPos[i] = verPos[i]
//参照制限ライン設定
K1 =上デブロッキングフィルタオフ ? 0 : NDF
K2 =下デブロッキングフィルタオフ ? 0 : NDF
vbLine1 = -K1
vbLine2 = CtuSize - K2
vbLine3 = CtuSize + K2
// 対象画素の位置に応じて参照範囲設定
// 対象画素がtop partにある場合には、参照制限ラインvbLine1と参照制限ラインvbLine2の間に制限
// それ以外(対象画素がbottom partにある場合には)、参照制限ラインvbLine2と、次の第2の参照制限ラインvbLine3の間に制限
if (yInCTU < vbLine2) {yMin = vbLine1, yMax = vbLine2 - 1}
if (yInCTU >= vbLine2) {yMin = vbLine2, yMax = vbLine3 - 1}
// 参照位置補正(以下の(a),(b),(c),(d)のいずれかが利用可能)
yPos[i] = Clip3(yMin, yMax, yInCTU + yPos[i]) - yInCTU             
    // (a)境界画素利用の場合
if (yInCTU + yPos[i] < yMin || yInCTU + yPos[i] > yMax) {xPos[i] = 0, yPos[i] = 0 }   // (b)中心画素利用の場合
if (yInCTU + yPos[i] < yMin || yInCTU + yPos[i] > yMax) {yPos[i] = 0 }     
     // (c)中心ライン利用の場合
if (yInCTU + yPos[i] < yMin) {yPos[i] = 2*(yMin - yInCTU) - yPos[i]}
if (yInCTU + yPos[i] > yMax) {yPos[i] = 2*(yMax - yInCTU) - yPos[i]}      
    // (d)ミラー画素利用の場合
// 導出された参照位置xPos[i], yPos[i]とフィルタ係数fltCoef[i]に基づいてフィルタ処理
fltSamples[xx][yy] = Σ refSamples[xx + xPos[i]][yy + yPos[i]] * fltCoeff[i]
 ここで、refSamples[xPos][yPos]は、フィルタ対象画素(xx, yy)を基準とした座標(xPos,yPos)の参照画素である。参照画素は、適応フィルタの入力画素を用いる。
The above process flow is as follows, using pseudo code as an example.
// (x, y) is the coordinate of the target pixel based on the upper left coordinate (xCb, yCb) of the CU
xx = xCb + x, yy = yCb + y
xInCTU = xx% CtuSize
yInCTU = yy% CtuSize
// Reference position setting
xPos [i] = xx + horPos [i]
yPos [i] = yy + verPos [i]
// Reference restriction line setting
K1 = upper deblocking filter off? 0: NDF
K2 = lower deblocking filter off? 0: NDF
vbLine1 = -K1
vbLine2 = CtuSize-K2
vbLine3 = CtuSize + K2
// Set reference range according to target pixel position
// If the target pixel is in the top part, the restriction between the reference restriction line vbLine1 and the reference restriction line vbLine2
// Otherwise (if the target pixel is in the bottom part), limit between the reference limit line vbLine2 and the next second reference limit line vbLine3
if (yInCTU <vbLine2) {yMin = vbLine1, yMax = vbLine2-1}
if (yInCTU> = vbLine2) {yMin = vbLine2, yMax = vbLine3-1}
// Reference position correction (any one of (a), (b), (c) and (d) below can be used)
yPos [i] = Clip3 (yMin, yMax, yInCTU + yPos [i])-yInCTU // (a) In the case of boundary pixel use
if (yPos [i] <yMin | | yPos [i]> yMax) {xPos [i] = xInCTU, yPos [i] = yInCTU} // (b) When using center pixel
if (yPos [i] <yMin | | yPos [i]> yMax) {yPos [i] = yInCTU} // (c) When using center line
if (yPos [i] <yMin) {yPos [i] = 2 * yMin-yPos [i]} // (d) In the case of using mirror pixels
if (yPos [i]> yMax) {yPos [i] = 2 * yMax-yPos [i]} // (d) In the case of using mirror pixels
// Filter based on the derived reference position xPos [i], yPos [i] and the filter coefficient fltCoef [i]
fltSamples [xx] [yy] = ref refSamples [xPos [i]] [yPos [i]] * fltCoeff [i]
The following pseudo code is also equivalent to the above.
// For each i = 0..NALF_FLT_TAP-1, derive the position xPos [i], yPos [i] of the reference pixel
// CTU position calculation
// (x, y) is the coordinate of the target pixel based on the upper left coordinate (xCB, yCB) of CU
xx = xCB + x, yy = yCB + y
xInCTU = xx% CtuSize
yInCTU = yy% CtuSize
// Reference position setting
xPos [i] = horPos [i]
yPos [i] = verPos [i]
// Reference restriction line setting
K1 = upper deblocking filter off? 0: NDF
K2 = lower deblocking filter off? 0: NDF
vbLine1 = -K1
vbLine2 = CtuSize-K2
vbLine3 = CtuSize + K2
// Set reference range according to target pixel position
// If the target pixel is in the top part, the restriction between the reference restriction line vbLine1 and the reference restriction line vbLine2
// Otherwise (if the target pixel is in the bottom part), limit between the reference limit line vbLine2 and the next second reference limit line vbLine3
if (yInCTU <vbLine2) {yMin = vbLine1, yMax = vbLine2-1}
if (yInCTU> = vbLine2) {yMin = vbLine2, yMax = vbLine3-1}
// Reference position correction (any one of (a), (b), (c) and (d) below can be used)
yPos [i] = Clip3 (yMin, yMax, yInCTU + yPos [i])-yInCTU
// (a) In the case of boundary pixel use
if (yInCTU + yPos [i] <yMin || yInCTU + yPos [i]> yMax) {xPos [i] = 0, yPos [i] = 0} // (b) In the case of central pixel use
if (yInCTU + yPos [i] <yMin || yInCTU + yPos [i]> yMax) {yPos [i] = 0}
// (c) When using center line
if (yInCTU + yPos [i] <yMin) {yPos [i] = 2 * (yMin-yInCTU)-yPos [i]}
if (yInCTU + yPos [i]> yMax) {yPos [i] = 2 * (yMax-yInCTU)-yPos [i]}
// (d) In the case of using mirror pixel
// Filter based on the derived reference position xPos [i], yPos [i] and the filter coefficient fltCoef [i]
fltSamples [xx] [yy] = ref refSamples [xx + xPos [i]] [yy + yPos [i]] * fltCoeff [i]
Here, refSamples [xPos] [yPos] is a reference pixel of coordinates (xPos, yPos) based on the pixel to be filtered (xx, yy). The reference pixel uses the input pixel of the adaptive filter.
 本実施形態によれば、適応フィルタ305_2が、デブロッキングフィルタ305_1によるフィルタ処理がオンであるかオフであるかに応じて、位置の異なる参照制限ラインを設定し、参照領域内に位置する画素値を参照するので、効率よくフィルタ処理をすることができる。 According to the present embodiment, the adaptive filter 305 _ 2 sets reference restriction lines at different positions depending on whether the filtering process by the deblocking filter 305 _ 1 is on or off, and the pixel values located in the reference area Can be filtered efficiently.
  (第2の実施形態)
 第2の実施形態に係るループフィルタ305の適応フィルタ305_2による参照画素の位置の補正の具体的な流れを説明する。
Second Embodiment
A specific flow of correction of the position of the reference pixel by the adaptive filter 305_2 of the loop filter 305 according to the second embodiment will be described.
 第2の実施形態は、上側のCTU境界と下側のCTU境界とに同じ参照制限バウンダリ変数を設定する点において、第1の実施形態と異なる。
(ステップS2-1) 上記(ステップS1-1)と同様の処理をする。
(ステップS2-2) 上記(ステップS1-2)と同様の処理をする。
(ステップS2-3) 上記(ステップS1-3)と同様の処理をする。
(ステップS2-4) 続いて、参照領域設定部305_2bは、デブロックフィルタの処理がオフである場合、参照制限バウンダリ変数Kに0を代入し、処理がオンである場合、参照制限バウンダリ変数KにNDFを代入する。
(ステップS2-5) 続いて、参照領域設定部305_2bは、参照制限バウンダリ変数Kにマイナス符号をつけた値を、参照制限ラインvbLine1に代入する。また、参照領域設定部305_2bは、CTUサイズから参照制限バウンダリ変数Kを引いた値を、参照制限ラインvbLine2に代入する。また、参照領域設定部305_2bは、CTUサイズに参照制限バウンダリ変数Kを足した値を、参照制限ラインvbLine3に代入する。
(ステップS2-6) 続いて、参照領域設定部305_2bは、対象画素のY座標yInCTUが参照制限ラインvbLine2未満である場合、参照領域の下限yMinに参照制限ラインvbLine1を代入し、参照領域の上限yMaxに参照制限ラインvbLine2から1引いた値を代入する。一方、参照領域設定部305_2bは、対象画素のY座標yInCTUが参照制限ラインvbLine2以上である場合、参照領域の下限yMinに参照制限ラインvbLine2を代入し、参照領域の上限yMaxに参照制限ラインvbLine3から1引いた値を代入する。
(ステップS2-7) 上記(ステップS1-7)と同様の処理をする。
(ステップS2-8) 上記(ステップS1-8)と同様の処理をする。
The second embodiment differs from the first embodiment in that the same reference restriction boundary variable is set in the upper CTU boundary and the lower CTU boundary.
(Step S2-1) A process similar to the above (step S1-1) is performed.
(Step S2-2) The same processing as the above (Step S1-2) is performed.
(Step S2-3) The same processing as the above (Step S1-3) is performed.
(Step S2-4) Subsequently, the reference area setting unit 305_2b substitutes 0 for the reference restriction boundary variable K when the process of the deblocking filter is off, and the reference restriction boundary variable K when the process is on. Substitute NDF into
(Step S2-5) Subsequently, the reference area setting unit 305_2b substitutes a value obtained by adding a minus sign to the reference restriction boundary variable K to the reference restriction line vbLine1. In addition, the reference area setting unit 305_2b substitutes a value obtained by subtracting the reference restriction boundary variable K from the CTU size into the reference restriction line vbLine2. The reference area setting unit 305_2b substitutes a value obtained by adding the reference restriction boundary variable K to the CTU size for the reference restriction line vbLine3.
(Step S2-6) Subsequently, when the Y coordinate yInCTU of the target pixel is less than the reference restriction line vbLine2, the reference area setting unit 305_2b substitutes the reference restriction line vbLine1 for the lower limit yMin of the reference area, and the upper limit of the reference area. Substitute the value obtained by subtracting 1 from the reference restriction line vbLine2 into yMax. On the other hand, when the Y coordinate yInCTU of the target pixel is equal to or more than the reference restriction line vbLine2, the reference area setting unit 305_2b substitutes the reference restriction line vbLine2 for the lower limit yMin of the reference area and starts the reference restriction line vbLine3 for the upper limit yMax of the reference area. Substitute 1 minus the value.
(Step S2-7) The same processing as the above (step S1-7) is performed.
(Step S2-8) The same processing as the above (step S1-8) is performed.
 上記の処理の流れを、疑似コードを例にして示せば、以下の通りである。
// 各i = 0..NALF_FLT_TAP-1について、参照画素の位置xPos[i], yPos[i]を導出する
// CTU内位置計算
// (x,y)はCUの左上座標(xCB,yCB)を基準とした対象画素の座標
xx = xCB + x, yy = yCB + y
xInCTU = xx % CtuSize
yInCTU = yy % CtuSize
// 参照位置設定
xPos[i] = horPos[i]
yPos[i] = verPos[i]
//参照制限ライン設定
K =デブロッキングフィルタオフ ? 0 : NDF
vbLine1 = -K
vbLine2 = CtuSize - K
vbLine3 = CtuSize + K
// 対象画素の位置に応じて参照範囲設定
yMin = vbLine1, yMax = vbLine3 - 1
if (yInCTU < vbLine2) {yMax = vbLine2 - 1}
if (yInCTU >= vbLine2) {yMin = vbLine2}
// 参照位置補正(ステップS1-7の(a),(b),(c),(d)のいずれかが利用可能、ここでは (a)のみ表示)
yPos[i] = Clip3(yMin, yMax, yInCTU + yPos[i]) - yInCTU             
        // (a)境界画素利用の場合
// 導出された参照位置xPos[i], yPos[i]とフィルタ係数fltCoef[i]に基づいてフィルタ処理
fltSamples[xx][yy] = Σ refSamples[xx + xPos[i]][yy + yPos[i]] * fltCoeff[i]
  (第3の実施形態)
 第3の実施形態は、ピクチャ内の位置を算出する点において、第1の実施形態と異なる。
The above process flow is as follows, using pseudo code as an example.
// For each i = 0..NALF_FLT_TAP-1, derive the position xPos [i], yPos [i] of the reference pixel
// CTU position calculation
// (x, y) is the coordinate of the target pixel based on the upper left coordinate (xCB, yCB) of CU
xx = xCB + x, yy = yCB + y
xInCTU = xx% CtuSize
yInCTU = yy% CtuSize
// Reference position setting
xPos [i] = horPos [i]
yPos [i] = verPos [i]
// Reference restriction line setting
K = deblocking filter off? 0: NDF
vbLine1 = -K
vbLine2 = CtuSize-K
vbLine3 = CtuSize + K
// Set reference range according to target pixel position
yMin = vbLine1, yMax = vbLine3-1
if (yInCTU <vbLine2) {yMax = vbLine2-1}
if (yInCTU> = vbLine2) {yMin = vbLine2}
// Reference position correction (any one of (a), (b), (c) and (d) of step S1-7 can be used, only (a) is displayed here)
yPos [i] = Clip3 (yMin, yMax, yInCTU + yPos [i])-yInCTU
// (a) In the case of boundary pixel use
// Filter based on the derived reference position xPos [i], yPos [i] and the filter coefficient fltCoef [i]
fltSamples [xx] [yy] = ref refSamples [xx + xPos [i]] [yy + yPos [i]] * fltCoeff [i]
Third Embodiment
The third embodiment differs from the first embodiment in that the position in a picture is calculated.
 第3の実施形態に係るループフィルタ305の適応フィルタ305_2による参照画素の位置の補正の具体的な流れを説明する。
(ステップS3-1) 上記(ステップS1-1)と同様の処理をする。
(ステップS3-2) 続いて、対象画素設定部035_2aは、ピクチャ左上を基準とした座標(xx, yy)をCTUサイズで割った値にCTUサイズを掛けることにより、対象ピクチャのCTUの左上座標(xCTU, yCTU)を算出する。
(ステップS3-3) 上記(ステップS1-2)と同様の処理をする。
(ステップS3-4) 参照領域設定部305_2bは、xPos[i]、yPos[i]として、horPos[i]、verPos[i]にxx、yyを加算した値を設定する。。
(ステップS3-5) 続いて、参照領域設定部305_2bは、ピクチャ内のx座標yCTUから参照制限バウンダリ変数K1を引いた値を、参照制限ラインvbLine1に代入する。また、参照領域設定部305_2bは、CTU座標yCTUにCTUサイズを加え、参照制限バウンダリ変数K2を引いた値を、参照制限ラインvbLine2に代入する。また、参照領域設定部305_2bは、CTU座標yCTUにCTUサイズを加え、参照制限バウンダリ変数K2を足した値を、参照制限ラインvbLine3に代入する。
(ステップS3-6) 続いて、参照領域設定部305_2bは、対象画素のy座標yyが参照制限ラインvbLine2未満である場合、参照領域の下限yMinに参照制限ラインvbLine1を代入し、参照領域の上限yMaxに参照制限ラインvbLine2から1引いた値を代入する。一方、参照領域設定部305_2bは、対象画素のy座標yyが参照制限ラインvbLine2以上である場合、参照領域の下限yMinに参照制限ラインvbLine2を代入し、参照領域の上限yMaxに参照制限ラインvbLine3から1引いた値を代入する。
(ステップS3-7) 続いて、参照領域設定部305_2bは、下記何れかの方法で参照位置を補正する。
(a) 参照領域設定部305_2bは、参照画素のY座標yPos[i]を、参照領域の下限yMinと参照領域の上限yMaxとの間にクリッピングした値を、参照画素のY座標yPos[i]に代入する(図16の(a)参照)。
(b) 参照領域設定部305_2bは、参照画素のY座標yPos[i]が参照領域の下限yMin未満の場合、または参照画素のY座標yPos[i]が参照領域の上限yMax超過の場合、参照画素のX座標xPos[i]に対象画素の位置xxを代入し、参照画素のy方向の位置yPos[i]に対象画素の位置yyを代入する(図16の(b)参照)。
(c) 参照領域設定部305_2bは、参照画素のY座標yPos[i]が参照領域の下限yMin未満の場合、または参照画素のY座標yPos[i]が参照領域の上限yMax超過の場合、参照画素のY座標yPos[i]にyyを代入する(図16の(c)参照)。
(d) 参照領域設定部305_2bは、参照画素のY座標yPos[i]が参照領域の下限yMin未満の場合、参照領域の下限yMinの2倍から参照画素のY座標yPos[i]を引いた値を、参照画素のY座標yPos[i]に代入する。また、参照領域設定部305_2bは、参照画素のY座標yPos[i]が参照領域の上限yMax超過の場合、参照領域の上限yMaxの2倍から参照画素のY座標yPos[i]を引いた値を、参照画素のY座標yPos[i]に代入する(図16の(d)参照)。
(ステップS3-8) 上記(ステップS1-8)と同様の処理をする。
A specific flow of correction of the position of the reference pixel by the adaptive filter 305_2 of the loop filter 305 according to the third embodiment will be described.
(Step S3-1) The same processing as the above (step S1-1) is performed.
(Step S3-2) Subsequently, the target pixel setting unit 035_2a multiplies the CTU size by the value obtained by dividing the coordinates (xx, yy) based on the upper left of the picture by the CTU size, thereby setting the upper left coordinate of the CTU of the target picture. Calculate (xCTU, yCTU).
(Step S3-3) The same processing as the above (step S1-2) is performed.
(Step S3-4) The reference region setting unit 305_2b sets values obtained by adding horPos [i] and verPos [i] as xxPos [i] and yPos [i], and xx and yy. .
(Step S3-5) Subsequently, the reference area setting unit 305_2b substitutes a value obtained by subtracting the reference restriction boundary variable K1 from the x coordinate yCTU in the picture into the reference restriction line vbLine1. The reference area setting unit 305_2b adds the CTU size to the CTU coordinates yCTU, and substitutes a value obtained by subtracting the reference restriction boundary variable K2 into the reference restriction line vbLine2. The reference area setting unit 305_2b adds the CTU size to the CTU coordinates yCTU, and substitutes a value obtained by adding the reference restriction boundary variable K2 to the reference restriction line vbLine3.
(Step S3-6) Subsequently, when the y coordinate yy of the target pixel is less than the reference limit line vbLine2, the reference area setting unit 305_2b substitutes the reference limit line vbLine1 for the lower limit yMin of the reference area, and the upper limit of the reference area. Substitute the value obtained by subtracting 1 from the reference restriction line vbLine2 into yMax. On the other hand, when the y coordinate yy of the target pixel is equal to or more than the reference restriction line vbLine2, the reference area setting unit 305_2b substitutes the reference restriction line vbLine2 for the lower limit yMin of the reference area, and the reference restriction line vbLine3 for the upper limit yMax of the reference area. Substitute 1 minus the value.
(Step S3-7) Subsequently, the reference area setting unit 305_2b corrects the reference position by any of the following methods.
(A) The reference area setting unit 305_2b clips a value obtained by clipping the Y coordinate yPos [i] of the reference pixel between the lower limit yMin of the reference area and the upper limit yMax of the reference area, and the Y coordinate yPos [i] of the reference pixel. (Refer to (a) of FIG. 16).
(B) The reference area setting unit 305_2b refers to the case where the Y coordinate yPos [i] of the reference pixel is less than the lower limit yMin of the reference area or the Y coordinate yPos [i] of the reference pixel exceeds the upper limit yMax of the reference area. The position xx of the target pixel is substituted into the X coordinate xPos [i] of the pixel, and the position yy of the target pixel is substituted into the position yPos [i] of the reference pixel in the y direction (see (b) in FIG. 16).
(C) The reference area setting unit 305_2b refers to the case where the Y coordinate yPos [i] of the reference pixel is less than the lower limit yMin of the reference area or the Y coordinate yPos [i] of the reference pixel exceeds the upper limit yMax of the reference area. Yy is substituted for the Y coordinate yPos [i] of the pixel (see (c) in FIG. 16).
(D) The reference area setting unit 305_2b subtracts the Y coordinate yPos [i] of the reference pixel from twice the lower limit yMin of the reference area if the Y coordinate yPos [i] of the reference pixel is less than the lower limit yMin of the reference area. A value is substituted into the Y coordinate yPos [i] of the reference pixel. Further, when the Y coordinate yPos [i] of the reference pixel exceeds the upper limit yMax of the reference region, the reference region setting unit 305_2b subtracts the Y coordinate yPos [i] of the reference pixel from twice the upper limit yMax of the reference region. Is substituted into the Y coordinate yPos [i] of the reference pixel (see (d) in FIG. 16).
(Step S3-8) The same processing as the above (step S1-8) is performed.
 上記の処理の流れを、疑似コードを例にして示せば、以下の通りである。
// 各i = 0..NALF_FLT_TAP-1について、参照画素の位置xPos[i], yPos[i]を導出する
// CTU内位置計算
// (x,y)はCUの左上座標(xCB,yCB)を基準とした対象画素の座標
xx = xCB + x, yy = yCB + y
xCTU = (x / CtuSize) * CtuSize // = (x >> log2CtuSize) << log2CtuSize
yCTU = (y / CtuSize) * CtuSize // = (y >> log2CtuSize) << log2CtuSize
xInCTU = xx % CtuSize
yInCTU = yy % CtuSize
// 参照位置設定
xPos[i] = xx + horPos[i]
yPos[i] = yy + verPos[i]
//参照制限ライン設定
K1 =上デブロッキングフィルタオフ ? 0 : NDF
K2 =下デブロッキングフィルタオフ ? 0 : NDF
vbLine1 = yCTU - K1
vbLine2 = yCTU + CtuSize - K2
vbLine3 = yCTU + CtuSize + K2
// 対象画素の位置に応じて参照範囲設定
if (yy < vbLine2) {yMin = vbLine1, yMax = vbLine2 - 1} // 対象画素位置がtop partif (yy >= vbLine2) {yMin = vbLine2, yMax = vbLine3 - 1} // 対象画素位置がbottom part
// 参照位置補正(以下の(a),(b),(c),(d)のいずれかが利用可能)
yPos[i] = Clip3(yMin, yMax, yPos[i])                     // (a)境界画素利用の場合
if (yPos[i] < yMin || yPos[i] > yMax) {xPos[i] = xx, yPos[i] = yy} // (b)中心画素利用の場合
if (yPos[i] < yMin || yPos[i] > yMax) {yPos[i] = yy}          // (c)中心ライン利用の場合
if (yPos[i] < yMin) {yPos[i] = 2*yMin - yPos[i]} 
if (yPos[i] > yMax) {yPos[i] = 2*yMax - yPos[i]} // (d)ミラー画素利用の場合
// 導出された参照位置xPos[i], yPos[i]とフィルタ係数fltCoef[i]に基づいてフィルタ処理
fltSamples[xx][yy] = Σ refSamples[xPos[i]][yPos[i]] * fltCoeff[i]
  (第4の実施形態)
 第4の実施形態は、バウンダリ距離を算出する点において、第1の実施形態と異なる。バウンダリ距離とは、あるy座標から参照制限ラインまでの距離を指す。
The above process flow is as follows, using pseudo code as an example.
// For each i = 0..NALF_FLT_TAP-1, derive the position xPos [i], yPos [i] of the reference pixel
// CTU position calculation
// (x, y) is the coordinate of the target pixel based on the upper left coordinate (xCB, yCB) of CU
xx = xCB + x, yy = yCB + y
xCTU = (x / CtuSize) * CtuSize // = (x >> log2CtuSize) << log2CtuSize
yCTU = (y / CtuSize) * CtuSize // = (y >> log2CtuSize) << log2CtuSize
xInCTU = xx% CtuSize
yInCTU = yy% CtuSize
// Reference position setting
xPos [i] = xx + horPos [i]
yPos [i] = yy + verPos [i]
// Reference restriction line setting
K1 = upper deblocking filter off? 0: NDF
K2 = lower deblocking filter off? 0: NDF
vbLine1 = yCTU-K1
vbLine2 = yCTU + CtuSize-K2
vbLine3 = yCTU + CtuSize + K2
// Set reference range according to target pixel position
if (yy <vbLine2) {yMin = vbLine1, yMax = vbLine2-1} // target pixel position is top partif (yy> = vbLine2) {yMin = vbLine2, yMax = vbLine3-1} // target pixel position is bottom part
// Reference position correction (any one of (a), (b), (c) and (d) below can be used)
yPos [i] = Clip3 (yMin, yMax, yPos [i]) // (a) In the case of using boundary pixels
if (yPos [i] <yMin | | yPos [i]> yMax) {xPos [i] = xx, yPos [i] = yy} // (b) When using central pixel
if (yPos [i] <yMin | | yPos [i]> yMax) {yPos [i] = yy} // (c) When using center line
if (yPos [i] <yMin) {yPos [i] = 2 * yMin-yPos [i]}
if (yPos [i]> yMax) {yPos [i] = 2 * yMax-yPos [i]} // (d) In the case of using mirror pixels
// Filter based on the derived reference position xPos [i], yPos [i] and the filter coefficient fltCoef [i]
fltSamples [xx] [yy] = ref refSamples [xPos [i]] [yPos [i]] * fltCoeff [i]
Fourth Embodiment
The fourth embodiment differs from the first embodiment in that the boundary distance is calculated. Boundary distance refers to the distance from a certain y coordinate to a reference restriction line.
 第4の実施形態に係るループフィルタ305の適応フィルタ305_2による参照画素の位置の補正の具体的な流れを説明する。
(ステップS4-1) 上記(ステップS1-1)と同様の処理をする。
(ステップS4-2) 上記(ステップS1-2)と同様の処理をする。
(ステップS4-3) 参照領域設定部305_2bは、xPos[i]、yPos[i]として、horPos[i]、verPos[i]にxInCTU、yInCTUを加算した値を設定する。。
(ステップS4-4) 上記(ステップS1-4)と同様の処理をする。
(ステップS4-5) 上記(ステップS1-5)と同様の処理をする。
(ステップS4-6) 続いて、参照領域設定部305_2bは、ステップS4-1で算出したyをCTUサイズで割った余りから参照制限ラインvbLine2を引いた値を、バウンダリ距離dist2VBに代入する。
(ステップS4-7) 続いて、参照領域設定部305_2bは、バウンダリ距離dist2VBが0未満の場合、参照領域の下限yMinに参照制限ラインvbLine1を代入し、参照領域の上限yMaxに参照制限ラインvbLine2から1引いた値を代入する。一方、参照領域設定部305_2bは、バウンダリ距離dist2VBが0以上の場合、参照領域の下限yMinに参照制限ラインvbLine2を代入し、参照領域の上限yMaxに参照制限ラインvbLine3から1引いた値を代入する。
A specific flow of correction of the position of the reference pixel by the adaptive filter 305_2 of the loop filter 305 according to the fourth embodiment will be described.
(Step S4-1) A process similar to the above (step S1-1) is performed.
(Step S4-2) The same processing as the above (Step S1-2) is performed.
(Step S4-3) The reference area setting unit 305_2b sets values obtained by adding xInCTU and yInCTU to horPos [i] and verPos [i] as xPos [i] and yPos [i]. .
(Step S4-4) The same processing as the above (step S1-4) is performed.
(Step S4-5) The same processing as the above (step S1-5) is performed.
(Step S4-6) Subsequently, the reference area setting unit 305_2b substitutes a value obtained by subtracting the reference restriction line vbLine2 from the remainder obtained by dividing y calculated in step S4-1 by the CTU size into the boundary distance dist2VB.
(Step S4-7) Subsequently, when the boundary distance dist2VB is less than 0, the reference area setting unit 305_2b substitutes the reference restriction line vbLine1 into the lower limit yMin of the reference area, and the reference restriction line vbLine2 into the upper limit yMax of the reference area. Substitute 1 minus the value. On the other hand, when the boundary distance dist2VB is 0 or more, the reference area setting unit 305_2b substitutes the reference restriction line vbLine2 for the lower limit yMin of the reference area, and substitutes the value obtained by subtracting 1 from the reference restriction line vbLine3 for the upper limit yMax of the reference area. .
 または、参照領域設定部305_2bは、バウンダリ距離dist2VBが0未満の場合、参照領域の下限yMinに参照制限ラインvbLine1を代入し、参照領域の上限yMaxにバウンダリ距離dist2VBに1足した値に-1をかけた値を代入する。一方、参照領域設定部305_2bは、バウンダリ距離dist2VBが0以上の場合、参照領域の下限yMinにバウンダリ距離dist2VBを代入し、参照領域の上限yMaxに参照制限ラインvbLine3から1引いた値を代入する。
(ステップS4-8) 続いて、参照領域設定部305_2bは、下記何れかの方法で参照位置を補正する。
(a) 参照領域設定部305_2bは、対象画素のY座標yInCTUと参照画素のY座標yPos [i]との和を、参照領域の下限yMinと参照領域の上限yMaxとの間にクリッピングした値から対象画素のY座標yInCTUを引いた値を参照画素のY座標yPos[i]に代入する(図16の(a)参照)。
(b) 参照領域設定部305_2bは、対象画素のY座標yInCTUと参照画素のY座標yPos [i]との和が参照領域の下限yMin未満の場合、または対象画素のY座標yInCTUと参照画素の
Y座標yPos[i]との和が参照領域の上限yMax超過の場合、参照画素のX座標xPos[i]およびY座標yPos[i]に0を代入する(図16の(b)参照)。
(c) 参照領域設定部305_2bは、対象画素のY座標yInCTUと参照画素のY座標yPos [i]との和が参照領域の下限yMin未満の場合、または対象画素のY座標yInCTUと参照画素のY座標yPos[i]との和が参照領域の上限yMax超過の場合、参照画素のY座標yPos[i]に0を代入する(図16の(c)参照)。
(d) 参照領域設定部305_2bは、対象画素のY座標yInCTUと参照画素のY座標yPos [i]との和が参照領域の下限yMin未満の場合、参照領域の下限yMinの2倍から参照画素のY座標yPos[i]を引いた値を、参照画素のY座標yPos[i]に代入する。また、参照領域設定部305_2bは、対象画素のY座標yInCTUと参照画素のY座標yPos[i]との和が参照領域の上限yMax超過の場合、参照領域の上限yMaxの2倍から参照画素のY座標yPos[i]を引いた値を、参照画素のY座標yPos[i]に代入する(図16の(d)参照)。
(ステップS4-9) 上記(ステップS1-8)と同様の処理をする。
Alternatively, when the boundary distance dist2VB is less than 0, the reference region setting unit 305_2b substitutes the reference restriction line vbLine1 into the lower limit yMin of the reference region, and adds 1 to the value obtained by adding 1 to the upper limit yMax of the reference region. Assign the multiplied value. On the other hand, when the boundary distance dist2VB is 0 or more, the reference region setting unit 305_2b substitutes the boundary distance dist2VB for the lower limit yMin of the reference region, and substitutes a value obtained by subtracting 1 from the reference limit line vbLine3 for the upper limit yMax of the reference region.
(Step S4-8) Subsequently, the reference area setting unit 305_2b corrects the reference position by any one of the following methods.
(A) The reference area setting unit 305_2b uses a value obtained by clipping the sum of the Y coordinate yInCTU of the target pixel and the Y coordinate yPos [i] of the reference pixel between the lower limit yMin of the reference area and the upper limit yMax of the reference area. The value obtained by subtracting the Y coordinate yInCTU of the target pixel is substituted into the Y coordinate yPos [i] of the reference pixel (see (a) in FIG. 16).
(B) If the sum of the Y coordinate yInCTU of the target pixel and the Y coordinate yPos [i] of the reference pixel is less than the lower limit yMin of the reference region, the reference region setting unit 305_2b, or the Y coordinate yInCTU of the target pixel and the reference pixel
If the sum with the Y coordinate yPos [i] exceeds the upper limit yMax of the reference area, 0 is substituted for the X coordinate xPos [i] and the Y coordinate yPos [i] of the reference pixel (see (b) in FIG. 16).
(C) If the sum of the Y coordinate yInCTU of the target pixel and the Y coordinate yPos [i] of the reference pixel is less than the lower limit yMin of the reference region, the reference region setting unit 305_2b, or the Y coordinate yInCTU of the target pixel and the reference pixel If the sum with the Y coordinate yPos [i] exceeds the upper limit yMax of the reference area, 0 is substituted for the Y coordinate yPos [i] of the reference pixel (see (c) in FIG. 16).
(D) If the sum of the Y coordinate yInCTU of the target pixel and the Y coordinate yPos [i] of the reference pixel is less than the lower limit yMin of the reference region, the reference region setting unit 305_2b determines that the reference pixel is twice as large as the lower limit yMin of the reference region. The value obtained by subtracting the Y coordinate yPos [i] of is assigned to the Y coordinate yPos [i] of the reference pixel. Further, when the sum of the Y coordinate yInCTU of the target pixel and the Y coordinate yPos [i] of the reference pixel exceeds the upper limit yMax of the reference region, the reference region setting unit 305_2b starts at twice the upper limit yMax of the reference region The value obtained by subtracting the Y coordinate yPos [i] is substituted for the Y coordinate yPos [i] of the reference pixel (see (d) in FIG. 16).
(Step S4-9) The same processing as the above (step S1-8) is performed.
 上記の処理の流れを、疑似コードを例にして示せば、以下の通りである。
// 各i = 0..NALF_FLT_TAP-1について、参照画素の位置xPos[i], yPos[i]を導出する
// CTU内位置計算
// (x,y)はCUの左上座標(xCB,yCB)を基準とした対象画素の座標
xx = xCB + x, yy = yCB + y
xInCTU = xx % CtuSize
yInCTU = yy % CtuSize
// 参照位置設定
xPos[i] = horPos[i] +xInCTU
yPos[i] = verPos[i] +yInCTU
//参照制限ライン設定
K1 =上デブロッキングフィルタオフ ? 0 : NDF
K2 =下デブロッキングフィルタオフ ? 0 : NDF
vbLine1 = -K1
vbLine2 = CtuSize - K2
vbLine3 = CtuSize + K2
//バウンダリ距離算出
dist2VB = yInCTU - vbLine2
//バウンダリ距離に応じて参照範囲設定
if (dist2VB < 0) {yMin = vbLine1, yMax = vbLine2 - 1} // 対象画素位置がtop partif (dist2VB >= 0) {yMin = vbLine2, yMax = vbLine3 - 1} // 対象画素位置がbottom part
以下の式も可能
if (dist2VB < 0) {yMin = vbLine1, yMax = - dist2VB - 1}  // top part
if (dist2VB >= 0) {yMin = dist2VB, yMax = vbLine3 - 1}   // bottom part (otherwise)
// 参照位置補正(以下の(a),(b),(c),(d)のいずれかが利用可能)
yPos[i] = Clip3(yMin, yMax, yPos[i])                     // (a)境界画素利用の場合
if (yPos[i] < yMin || yPos[i] > yMax) {xPos[i] = 0, yPos[i] = 0 } // (b)中心画素利用の場合
if (yPos[i] < yMin || yPos[i] > yMax) {yPos[i] = 0 }          // (c)中心ライン利用の場合
if (yPos[i] < yMin) {yPos[i] = 2*yMin - yPos[i]} 
if (yPos[i] > yMax) {yPos[i] = 2*yMax - yPos[i]} // (d)ミラー画素利用の場合
// 導出された参照位置xPos[i], yPos[i]とフィルタ係数fltCoef[i]に基づいてフィルタ処理
fltSamples[xx][yy] = Σ refSamples[(xx/CtuSize)*CtuSize+xPos[i]][(yy/CtuSize)*CtuSize+yPos[i]] * fltCoeff[i]
  (第5の実施形態)
 第5の実施形態は、バウンダリ距離に応じて定まるテーブルを参照する点において、第1の実施形態と異なる。
The above process flow is as follows, using pseudo code as an example.
// For each i = 0..NALF_FLT_TAP-1, derive the position xPos [i], yPos [i] of the reference pixel
// CTU position calculation
// (x, y) is the coordinate of the target pixel based on the upper left coordinate (xCB, yCB) of CU
xx = xCB + x, yy = yCB + y
xInCTU = xx% CtuSize
yInCTU = yy% CtuSize
// Reference position setting
xPos [i] = horPos [i] + xInCTU
yPos [i] = verPos [i] + yInCTU
// Reference restriction line setting
K1 = upper deblocking filter off? 0: NDF
K2 = lower deblocking filter off? 0: NDF
vbLine1 = -K1
vbLine2 = CtuSize-K2
vbLine3 = CtuSize + K2
// Boundary distance calculation
dist2VB = yInCTU-vbLine2
// Reference range setting according to boundary distance
if (dist2VB <0) {yMin = vbLine1, yMax = vbLine2-1} // Target pixel position is top partif (dist2VB> = 0) {yMin = vbLine2, yMax = vbLine3-1} // Target pixel position is bottom part
The following expressions are also possible
if (dist2VB <0) {yMin = vbLine1, yMax =-dist2VB-1} // top part
if (dist2VB> = 0) {yMin = dist2VB, yMax = vbLine3-1} // bottom part (otherwise)
// Reference position correction (any one of (a), (b), (c) and (d) below can be used)
yPos [i] = Clip3 (yMin, yMax, yPos [i]) // (a) In the case of using boundary pixels
if (yPos [i] <yMin | | yPos [i]> yMax) {xPos [i] = 0, yPos [i] = 0} // (b) When using central pixel
if (yPos [i] <yMin || yPos [i]> yMax) {yPos [i] = 0} // (c) When using center line
if (yPos [i] <yMin) {yPos [i] = 2 * yMin-yPos [i]}
if (yPos [i]> yMax) {yPos [i] = 2 * yMax-yPos [i]} // (d) In the case of using mirror pixels
// Filter based on the derived reference position xPos [i], yPos [i] and the filter coefficient fltCoef [i]
fltSamples [xx] [yy] = ref refSamples [(xx / CtuSize) * CtuSize + xPos [i]] [(yy / CtuSize) * CtuSize + yPos [i]] * fltCoeff [i]
Fifth Embodiment
The fifth embodiment differs from the first embodiment in that a table determined according to the boundary distance is referred to.
 図14は、本実施形態に係るループフィルタ305の参照領域設定部305_2bが参照するテーブルの例である。図14に示すテーブルは、バウンダリ距離dist2VBに応じて定まる。 FIG. 14 is an example of a table referred to by the reference region setting unit 305_2b of the loop filter 305 according to the present embodiment. The table shown in FIG. 14 is determined according to the boundary distance dist2VB.
 第5の実施形態に係るループフィルタ305の適応フィルタ305_2による参照画素の位置の補正の具体的な流れを説明する。
(ステップS5-1) 上記(ステップS1-1)と同様の処理をする。
(ステップS5-2) 上記(ステップS1-2)と同様の処理をする。
(ステップS5-3) 上記(ステップS1-4)と同様の処理をする。
(ステップS5-4) 上記(ステップS1-5)と同様の処理をする。
(ステップS5-5) 上記(ステップS4-6)と同様の処理をする。
(ステップS5-6) 続いて、参照領域設定部305_2bは、i(i = 0..NALF_FLT_TAP-1)に対応する水平方向の位置horPos[i]を、図14に示すテーブルを参照して、参照画素のX座標xPos[i]に代入する。また、参照領域設定部305_2bは、i(i = 0..NALF_FLT_TAP-1)に対応する垂直方向の位置verPos[i]を、図14に示すテーブルを参照して、参照画素のY座標yPos[i]に代入する。
(ステップS5-7) 上記(ステップS1-8)と同様の処理をする。
A specific flow of correction of the position of the reference pixel by the adaptive filter 305_2 of the loop filter 305 according to the fifth embodiment will be described.
(Step S5-1) The same processing as the above (step S1-1) is performed.
(Step S5-2) The same processing as the above (step S1-2) is performed.
(Step S5-3) The same processing as the above (Step S1-4) is performed.
(Step S5-4) The same processing as the above (step S1-5) is performed.
(Step S5-5) The same processing as the above (step S4-6) is performed.
(Step S5-6) Subsequently, the reference area setting unit 305_2b refers to the horizontal position horPos [i] corresponding to i (i = 0..NALF_FLT_TAP-1) with reference to the table shown in FIG. Substitute into the X coordinate xPos [i] of the reference pixel. Further, the reference region setting unit 305_2b refers to the position verPos [i] in the vertical direction corresponding to i (i = 0..NALF_FLT_TAP-1) with reference to the table shown in FIG. Assign to i].
(Step S5-7) The same processing as the above (step S1-8) is performed.
 上記の処理の流れを、疑似コードを例にして示せば、以下の通りである。
// 各i = 0..NALF_FLT_TAP-1について、参照画素の位置xPos[i], yPos[i]を導出する
// CTU内位置計算
// (x,y)はCUの左上座標(xCb,yCb)を基準とした座標
xx = xCb + x, yy = yCb + y
xInCTU = xx % CtuSize
yInCTU = yy % CtuSize
//参照制限ライン設定
K1 =上デブロッキングフィルタオフ ? 0 : NDF
K2 =下デブロッキングフィルタオフ ? 0 : NDF
vbLine1 = -K1
vbLine2 = CtuSize - K2
vbLine3 = CtuSize + K2
//バウンダリ距離dist2VB算出
dist2VB = yInCTU - vbLine2
//バウンダリ距離dist2VBに応じて定まるテーブルに応じて参照位置設定
if (dist2VB<-3 || dist2VB>2) k=0
else if (dist2VB== -3 || dist2VB==2) k=1
else if (dist2VB== -2 || dist2VB==1) k=2
else k=3 // dist2VB== -1 || dist2VB ==0
xPos[i] = horPos[i]
yPos[i] = verPos[k][i]
// 導出された参照位置xPos[i], yPos[i]とフィルタ係数fltCoef[i]に基づいてフィルタ処理
fltSamples[xx][yy] = Σ refSamples[xx + xPos[i]][yy + yPos[i]] * fltCoeff[i]
 ここで、refSamples[xPos][yPos]は、フィルタ対象画素(xx, yy)を基準とした座標(xPos,yPos)の参照画素である。なお、(x,y)は対象画素の画面内位置、CTU内位置で表現すると(xInCTU,yInCTU)である。参照画素は、適応フィルタの入力画素を用いる。
The above process flow is as follows, using pseudo code as an example.
// For each i = 0..NALF_FLT_TAP-1, derive the position xPos [i], yPos [i] of the reference pixel
// CTU position calculation
// (x, y) is the coordinate based on the upper left coordinate (xCb, yCb) of CU
xx = xCb + x, yy = yCb + y
xInCTU = xx% CtuSize
yInCTU = yy% CtuSize
// Reference restriction line setting
K1 = upper deblocking filter off? 0: NDF
K2 = lower deblocking filter off? 0: NDF
vbLine1 = -K1
vbLine2 = CtuSize-K2
vbLine3 = CtuSize + K2
// Boundary distance dist2VB calculation
dist2VB = yInCTU-vbLine2
// Reference position setting according to the table determined according to boundary distance dist2VB
if (dist2VB <-3 || dist2VB> 2) k = 0
else if (dist2VB ==-3 || dist2VB == 2) k = 1
else if (dist2VB == -2 || dist2VB == 1) k = 2
else k = 3 // dist2VB ==-1 || dist2VB == 0
xPos [i] = horPos [i]
yPos [i] = verPos [k] [i]
// Filter based on the derived reference position xPos [i], yPos [i] and the filter coefficient fltCoef [i]
fltSamples [xx] [yy] = ref refSamples [xx + xPos [i]] [yy + yPos [i]] * fltCoeff [i]
Here, refSamples [xPos] [yPos] is a reference pixel of coordinates (xPos, yPos) based on the pixel to be filtered (xx, yy). Note that (x, y) is (xInCTU, yInCTU) in the in-screen position of the target pixel or in the CTU. The reference pixel uses the input pixel of the adaptive filter.
  (第6の実施形態)
 第6の実施形態は、参照領域を水平方向に制限する点で上記実施形態と異なる。
Sixth Embodiment
The sixth embodiment differs from the above embodiments in that the reference area is limited in the horizontal direction.
 図15は、第6の実施形態に係るループフィルタ305の参照領域設定部305_2bが設定する参照制限ラインの他の例を示す図である。 FIG. 15 is a diagram illustrating another example of the reference restriction line set by the reference region setting unit 305_2b of the loop filter 305 according to the sixth embodiment.
 図15の(a)は対象画素がleft partに位置する場合の参照領域を示す。対象画素lpがleft partにある場合、左側のCTU境界からL1画素分だけ離れて位置する参照制限ラインvbCol1と右側のCTU境界から左側にL2画素分だけ離れて位置する参照制限ラインvbCol2との間が参照領域である。 (A) of FIG. 15 shows the reference area in the case where the target pixel is located at the left part. When the target pixel lp is in the left part, it is between the reference restriction line vbCol1 located apart from the CTU boundary on the left by L1 pixels and the reference restriction line vbCol2 located apart from the CTU boundary on the right by L2 pixels on the left Is the reference area.
 図15の(b)は対象画素がright partに位置する場合の参照領域を示す。対象画素rpがright partにある場合、右側のCTU境界から左側にL2画素分だけ離れて位置する参照制限ラインvbCol2と右側のCTU境界から右側にL2画素分だけ離れて位置する参照制限ラインvbCol3との間が参照領域である。 (B) of FIG. 15 shows a reference area when the target pixel is located in the right part. When the target pixel rp is in the right part, the reference restriction line vbCol2 located on the left side from the CTU boundary on the right side by L2 pixels and the reference restriction line vbCol3 located on the right side from the CTU boundary on the right side by L2 pixels Is the reference area.
 第6の実施形態に係るループフィルタ305の適応フィルタ305_2による参照画素の位置の補正の具体的な流れを説明する。
(ステップS6-1) 上記(ステップS1-1)と同様の処理をする。
(ステップS6-2) 上記(ステップS1-2)と同様の処理をする。
(ステップS6-3) 上記(ステップS4-3)と同様の処理をする。
(ステップS6-4) 上記(ステップS1-4)と同様の処理をする。
(ステップS6-5) 上記(ステップS1-5)と同様の処理をする。
(ステップS6-6) 続いて、参照領域設定部305_2bは、左側のCTU境界に関しデブロックフィルタの処理がオフである場合、参照制限バウンダリ変数L1に0を代入し、処理がオンである場合、参照制限バウンダリ変数L1にNDFを代入する。また、右側のCTU境界に関しデブロックフィルタの処理がオフである場合、参照制限バウンダリ変数L2に0を代入し、処理がオンである場合、参照制限バウンダリ変数L2にNDFを代入する。
(ステップS6-7) 続いて、参照領域設定部305_2bは、参照制限バウンダリ変数L1にマイナス符号をつけた値を、参照制限ラインvbCol1に代入する。また、参照領域設定部305_2bは、CTUサイズから参照制限バウンダリ変数L2を引いた値を、参照制限ラインvbCol2に代入する。また、参照領域設定部305_2bは、CTUサイズに参照制限バウンダリ変数L2を足した値を、参照制限ラインvbCol3に代入する。
(ステップS6-8) 上記(ステップS1-6)と同様の処理をする。
(ステップS6-9) 続いて、参照領域設定部305_2bは、対象画素のX座標xInCTUが参照制限ラインvbCol2未満である場合、参照領域の左側の端xMinに参照制限ラインvbCol1を代入し、参照領域の右側の端xMaxに参照制限ラインvbCol2から1引いた値を代入する。一方、参照領域設定部305_2bは、対象画素のX座標xInCTUが参照制限ラインvbCol2以上である場合、参照領域の左側の端xMinに参照制限ラインvbCol2を代入し、参照領域の右側の端xMaxに参照制限ラインvbCol3から1引いた値を代入する。
(ステップS6-10) 続いて、参照領域設定部305_2bは、下記何れかの方法で参照位置を補正する。
(a) 参照領域設定部305_2bは、対象画素のX座標xInCTUと参照画素のX座標xPos [i]との和を、参照領域の左の端xMinと参照領域の右側の端xMaxとの間にクリッピングした値から対象画素のX座標xInCTUを引いた値を参照画素のX座標xPos[i]に代入する。
A specific flow of correction of the position of the reference pixel by the adaptive filter 305_2 of the loop filter 305 according to the sixth embodiment will be described.
(Step S6-1) A process similar to the above (step S1-1) is performed.
(Step S6-2) The same processing as the above (Step S1-2) is performed.
(Step S6-3) The same processing as the above (step S4-3) is performed.
(Step S6-4) The same processing as the above (Step S1-4) is performed.
(Step S6-5) The same processing as the above (Step S1-5) is performed.
(Step S6-6) Subsequently, the reference area setting unit 305_2b substitutes 0 for the reference restriction boundary variable L1 when the process of the deblock filter is off with respect to the left CTU boundary, and the process is ON. The NDF is substituted for the reference restriction boundary variable L1. When the deblocking filter process is off for the right CTU boundary, 0 is substituted into the reference restriction boundary variable L2, and when the process is on, NDF is substituted into the reference restriction boundary variable L2.
(Step S6-7) Subsequently, the reference area setting unit 305_2b substitutes a value obtained by adding a minus sign to the reference restriction boundary variable L1 to the reference restriction line vbCol1. In addition, the reference area setting unit 305_2b substitutes a value obtained by subtracting the reference restriction boundary variable L2 from the CTU size into the reference restriction line vbCol2. The reference area setting unit 305_2b substitutes a value obtained by adding the reference restriction boundary variable L2 to the CTU size, to the reference restriction line vbCol3.
(Step S6-8) The same processing as the above (Step S1-6) is performed.
(Step S6-9) Subsequently, when the X coordinate xInCTU of the target pixel is less than the reference restriction line vbCol2, the reference area setting unit 305_2b substitutes the reference restriction line vbCol1 for the left end xMin of the reference area, and the reference area The value obtained by subtracting 1 from the reference restriction line vbCol2 is assigned to the right end xMax of. On the other hand, when the X coordinate xInCTU of the target pixel is equal to or more than the reference restriction line vbCol2, the reference area setting unit 305_2b substitutes the reference restriction line vbCol2 for the left end xMin of the reference area and refers to the end xMax for the right side of the reference area. Substitute the value obtained by subtracting 1 from the limit line vbCol3.
(Step S6-10) Subsequently, the reference area setting unit 305_2b corrects the reference position by any of the following methods.
(A) The reference area setting unit 305_2b adds the sum of the X coordinate xInCTU of the target pixel and the X coordinate xPos [i] of the reference pixel to the left end xMin of the reference area and the right end xMax of the reference area. A value obtained by subtracting the X coordinate xInCTU of the target pixel from the clipped value is substituted for the X coordinate xPos [i] of the reference pixel.
 また、参照領域設定部305_2bは、対象画素のY座標yInCTUと参照画素のY座標yPos [i]との和を、参照領域の下限yMinと参照領域の上限yMaxとの間にクリッピングした値から対象画素のY座標yInCTUを引いた値を参照画素のY座標yPos[i]に代入する(図16の(a)参照)。
(b) 参照領域設定部305_2bは、対象画素のX座標xInCTUと参照画素のX座標xPos [i]との和が参照領域の左側の端xMin未満の場合、対象画素のX座標xInCTUと参照画素のX座標xPos[i]との和が参照領域の右側の端上限xMax超過の場合、対象画素のY座標yInCTUと参照画素のY座標yPos[i]との和が参照領域の下限yMin未満の場合、または対象画素のY座標yInCTUと参照画素のY座標yPos[i]との和が参照領域の上限yMax超過の場合、参照画素のX座標xPos[i]およびY座標yPos[i]に0を代入する(図16の(b)参照)。
(c) 参照領域設定部305_2bは、対象画素のX座標xInCTUと参照画素のX座標xPos [i]との和が参照領域の左側の端xMin未満の場合、対象画素のX座標xInCTUと参照画素のX座標xPos[i]との和が参照領域の右側の端xMax超過の場合、対象画素のY座標yInCTUと参照画素のY座標yPos[i]との和が参照領域の下限yMin未満の場合、または対象画素のY座標yInCTUと参照画素のY座標yPos[i]との和が参照領域の上限yMax超過の場合、参照画素のY座標yPos[i]に0を代入する(図16の(c)参照)。
(d) 参照領域設定部305_2bは、対象画素のX座標xInCTUと参照画素のX座標xPos [i]との和が参照領域の左側の端xMin未満の場合、参照領域の左側の端xMinの2倍から対象画素のX座標xInCTUの2倍および参照画素のX座標xPos[i]を引いた値を、参照画素のX座標xPos[i]に代入する。また、参照領域設定部305_2bは、対象画素のX座標xInCTUと参照画素のX座標xPos[i]との和が参照領域の右側の端xMax超過の場合、参照領域の右側の端xMaxの2倍から対象画素のX座標xInCTUの2倍および参照画素のX座標xPos[i]を引いた値を、参照画素のX座標xPos[i]に代入する。
In addition, the reference area setting unit 305_2b is a target based on a value obtained by clipping the sum of the Y coordinate yInCTU of the target pixel and the Y coordinate yPos [i] of the reference pixel between the lower limit yMin of the reference area and the upper limit yMax of the reference area. The value obtained by subtracting the Y coordinate yInCTU of the pixel is substituted for the Y coordinate yPos [i] of the reference pixel (see (a) in FIG. 16).
(B) If the sum of the X coordinate xInCTU of the target pixel and the X coordinate xPos [i] of the reference pixel is less than the left end xMin of the reference region, the reference region setting unit 305_2b determines the X coordinate xInCTU of the target pixel and the reference pixel If the sum of the x coordinate xPos [i] of the x exceeds the upper limit xMax on the right side of the reference area, the sum of the Y coordinate yInCTU of the target pixel and the y coordinate yPos [i] of the reference pixel is less than the lower limit yMin of the reference area Or when the sum of the Y coordinate yInCTU of the target pixel and the Y coordinate yPos [i] of the reference pixel exceeds the upper limit yMax of the reference area, 0 in the X coordinate xPos [i] and the Y coordinate yPos [i] of the reference pixel Is substituted (see (b) in FIG. 16).
(C) If the sum of the X coordinate xInCTU of the target pixel and the X coordinate xPos [i] of the reference pixel is less than the left end xMin of the reference region, the reference region setting unit 305_2b determines the X coordinate xInCTU of the target pixel and the reference pixel The sum of the Y coordinate yInCTU of the target pixel and the Y coordinate yPos [i] of the reference pixel is less than the lower limit yMin of the reference area, when the sum of the X coordinate xPos [i] of x exceeds the right end xMax of the reference area Or, if the sum of the Y coordinate yInCTU of the target pixel and the Y coordinate yPos [i] of the reference pixel exceeds the upper limit yMax of the reference area, 0 is substituted for the Y coordinate yPos [i] of the reference pixel (see FIG. c) see
(D) If the sum of the X coordinate xInCTU of the target pixel and the X coordinate xPos [i] of the reference pixel is less than the left end xMin of the reference area, the reference area setting unit 305_2b 2 of the left end xMin of the reference area A value obtained by subtracting the double of the X coordinate xInCTU of the target pixel and the X coordinate xPos [i] of the reference pixel from the double is substituted for the X coordinate xPos [i] of the reference pixel. Further, when the sum of the X coordinate xInCTU of the target pixel and the X coordinate xPos [i] of the reference pixel exceeds the right end xMax of the reference area, the reference area setting unit 305_2b doubles the right end xMax of the reference area. A value obtained by subtracting twice the X coordinate xInCTU of the target pixel and the X coordinate xPos [i] of the reference pixel from is substituted into the X coordinate xPos [i] of the reference pixel.
 また、参照領域設定部305_2bは、対象画素のY座標yInCTUと参照画素のY座標yPos [i]との和が参照領域の下限yMin未満の場合、参照領域の下限yMinの2倍から対象画素のY座標yInCTUの2倍および参照画素のY座標yPos[i]を引いた値を、参照画素のY座標yPos[i]に代入する。また、参照領域設定部305_2bは、対象画素のY座標yInCTUと参照画素のY座標yPos[i]との和が参照領域の上限yMax超過の場合、参照領域の上限yMaxの2倍から対象画素のY座標yInCTUの2倍および参照画素のY座標yPos[i]を引いた値を、参照画素のY座標yPos[i]に代入する(図16の(d)参照)。
(ステップS6-11) 上記(ステップS1-8)と同様の処理をする。
Further, when the sum of the Y coordinate yInCTU of the target pixel and the Y coordinate yPos [i] of the reference pixel is less than the lower limit yMin of the reference region, the reference region setting unit 305_2b determines that the target pixel is twice the lower limit yMin of the reference region. A value obtained by subtracting twice the Y coordinate yInCTU and the Y coordinate yPos [i] of the reference pixel is substituted for the Y coordinate yPos [i] of the reference pixel. In addition, when the sum of the Y coordinate yInCTU of the target pixel and the Y coordinate yPos [i] of the reference pixel exceeds the upper limit yMax of the reference region, the reference region setting unit 305_2b calculates twice the upper limit yMax of the reference region to the target pixel A value obtained by subtracting twice the Y coordinate yInCTU and the Y coordinate yPos [i] of the reference pixel is substituted for the Y coordinate yPos [i] of the reference pixel (see (d) in FIG. 16).
(Step S6-11) The same processing as the above (step S1-8) is performed.
 上記の処理の流れを、疑似コードを例にして示せば、以下の通りである。
// (x,y)はCUの左上座標(xCb,yCb)を基準とした対象画素の座標
xx = xCb + x, yy = yCb + y
xInCTU = xx % CtuSize
yInCTU = yy % CtuSize
// 参照位置設定
xPos[i] = horPos[i] + xInCTU
yPos[i] = verPos[i] + yInCTU
//参照制限ライン設定
K1 =上デブロッキングフィルタオフ ? 0 : NDF
K2 =下デブロッキングフィルタオフ ? 0 : NDF
vbLine1 = -K1
vbLine2 = CtuSize - K2
vbLine3 = CtuSize + K2
L1 =左デブロッキングフィルタオフ ? 0 : NDF
L2 =右デブロッキングフィルタオフ ? 0 : NDF
vbCol1 = -L1
vbCol2 = CtuSize - L2
vbCol3 = CtuSize + L2
// 対象画素の位置に応じて参照範囲設定
if (yInCTU < vbLine2) {yMin = vbLine1, yMax = vbLine2 - 1}
if (yInCTU >=vbLine2) {yMin = vbLine2, yMax = vbLine3 - 1}
if (xInCTU < vbCol2) {xMin = vbCol1, xMax = vbCol2 - 1}
if (xInCTU >= vbCol2) {xMin = vbCol2, xMax = vbCol3 - 1}
// 参照位置補正(以下の(a),(b),(c),(d)のいずれかが利用可能)
xPos[i] = Clip3(xMin, xMax, xPos[i])      // (a)
yPos[i] = Clip3(yMin, yMax, yPos[i])      // (a)
if (xPos[i] < xMin || xPos[i] > xMax || yPos[i] < yMin || yPos[i] > yMax) {xPos[i] = xInCTU, yPos[i] = yInCTU} // (b)
if (xPos[i] < xMin || xPos[i] > xMax) {xPos[i] = xInCTU }      // (c)
if (yPos[i] < yMin || yPos[i] > yMax) {yPos[i] = yInCTU }      // (c)
if (xPos[i] < xMin) {xPos[i] = 2*xMin - xPos[i]} if (xPos[i] > xMax) {xPos[i] = 2*xMax - xPos[i]}          // (d)
if (yPos[i] < yMin) {yPos[i] = 2*yMin - yPos[i]} if (yPos[i] > yMax) {yPos[i] = 2*yMax - yPos[i]}          // (d)
// 導出された参照位置xPos[i], yPos[i]とフィルタ係数fltCoef[i]に基づいてフィルタ処理
fltSamples[xx][yy] = Σ refSamples[xPos[i]][yPos[i]] * fltCoeff[i]
 上記は、以下と同等である。
// 各i = 0..NALF_FLT_TAP-1について、参照画素の位置xPos[i], yPos[i]を導出する
// CTU内位置計算
// (x,y)はCUの左上座標(xCB,yCB)を基準とした対象画素の座標
xx = xCB + x, yy = yCB + y
xInCTU = xx % CtuSize
yInCTU = yy % CtuSize
// 参照位置設定
xPos[i] = horPos[i] + xInCTU
yPos[i] = verPos[i] + yInCTU
//参照制限ライン設定
K1 =上デブロッキングフィルタオフ ? 0 : NDF
K2 =下デブロッキングフィルタオフ ? 0 : NDF
vbLine1 = -K1
vbLine2 = CtuSize - K2
vbLine3 = CtuSize + K2
L1 =左デブロッキングフィルタオフ ? 0 : NDF
L2 =右デブロッキングフィルタオフ ? 0 : NDF
vbCol1 = -L1
vbCol2 = CtuSize - L2
vbCol3 = CtuSize + L2
// 対象画素の位置に応じて参照範囲設定
if (yInCTU < vbLine2) {yMin = vbLine1, yMax = vbLine2 - 1}
if (yInCTU >= vbLine2) {yMin = vbLine2, yMax = vbLine3 - 1}
if (xInCTU < vbCol2) {xMin = vbCol1, xMax = vbCol2 - 1}
if (xInCTU >= vbCol2) {xMin = vbCol2, xMax = vbCol3 - 1}
// 参照位置補正(以下の(a),(b),(c),(d)のいずれかが利用可能)
xPos[i] = Clip3(xMin, xMax, xInCTU + xPos[i]) - xInCTU      // (a)
yPos[i] = Clip3(yMin, yMax, yInCTU + yPos[i]) - yInCTU      // (a)
if (xInCTU + xPos[i] < xMin || xInCTU + xPos[i] > xMax || yInCTU + yPos[i] < yMin || yInCTU + yPos[i] > yMax) {xPos[i] = 0, yPos[i] = 0} // (b)
if (xInCTU + xPos[i] < xMin || xInCTU + xPos[i] > xMax) {xPos[i] = 0 } // (c)
if (yInCTU + yPos[i] < yMin || yInCTU + yPos[i] > yMax) {yPos[i] = 0 } // (c)
if (xInCTU + xPos[i] < xMin) {xPos[i] = 2*(xMin-xInCTU) - xPos[i]} if (xInCTU + xPos[i] > xMax) {xPos[i] = 2*(xMax-xInCTU) - xPos[i]}        // (d)
if (yInCTU + yPos[i] < yMin) {yPos[i] = 2*(yMin-yInCTU) - yPos[i]} if (yInCTU + yPos[i] > yMax) {yPos[i] = 2*(yMax-yInCTU) - yPos[i]}        // (d)
// 導出された参照位置xPos[i], yPos[i]とフィルタ係数fltCoef[i]に基づいてフィルタ処理
fltSamples[xx][yy] = Σ refSamples[(xx/CtuSize)*CtuSize + xPos[i]][(yy/CtuSize)* CtuSize + yPos[i]] * fltCoeff[i]
  (第7の実施形態)
 第7の実施形態は、x方向を制限する参照制限ラインを、対象画素の位置を制限せずに設定する点において、第6の実施形態と異なる。
The above process flow is as follows, using pseudo code as an example.
// (x, y) is the coordinate of the target pixel based on the upper left coordinate (xCb, yCb) of the CU
xx = xCb + x, yy = yCb + y
xInCTU = xx% CtuSize
yInCTU = yy% CtuSize
// Reference position setting
xPos [i] = horPos [i] + xInCTU
yPos [i] = verPos [i] + yInCTU
// Reference restriction line setting
K1 = upper deblocking filter off? 0: NDF
K2 = lower deblocking filter off? 0: NDF
vbLine1 = -K1
vbLine2 = CtuSize-K2
vbLine3 = CtuSize + K2
L1 = left deblocking filter off? 0: NDF
L2 = Right deblocking filter off? 0: NDF
vbCol1 = -L1
vbCol2 = CtuSize-L2
vbCol3 = CtuSize + L2
// Set reference range according to target pixel position
if (yInCTU <vbLine2) {yMin = vbLine1, yMax = vbLine2-1}
if (yInCTU> = vbLine2) {yMin = vbLine2, yMax = vbLine3-1}
if (xInCTU <vbCol2) {xMin = vbCol1, xMax = vbCol2-1}
if (xInCTU> = vbCol2) {xMin = vbCol2, xMax = vbCol3-1}
// Reference position correction (any one of (a), (b), (c) and (d) below can be used)
xPos [i] = Clip3 (xMin, xMax, xPos [i]) // (a)
yPos [i] = Clip3 (yMin, yMax, yPos [i]) // (a)
yPos [i]> xMax | | yPos [i] <yMin | | yPos [i]> yMax) {xPos [i] = xInCTU, yPos [i] = yInCTU} // (b)
if (xPos [i] <xMin || xPos [i]> xMax) {xPos [i] = xInCTU} // (c)
if (yPos [i] <yMin || yPos [i]> yMax) {yPos [i] = yInCTU} // (c)
if (xPos [i] <xMin) {xPos [i] = 2 * xMin-xPos [i]} if (xPos [i]> xMax) {xPos [i] = 2 * xMax-xPos [i]} // (d)
if (yPos [i] <yMin) {yPos [i] = 2 * yMin-yPos [i]} if (yPos [i]> yMax) {yPos [i] = 2 * yMax-yPos [i]} // (d)
// Filter based on the derived reference position xPos [i], yPos [i] and the filter coefficient fltCoef [i]
fltSamples [xx] [yy] = ref refSamples [xPos [i]] [yPos [i]] * fltCoeff [i]
The above is equivalent to the following.
// For each i = 0..NALF_FLT_TAP-1, derive the position xPos [i], yPos [i] of the reference pixel
// CTU position calculation
// (x, y) is the coordinate of the target pixel based on the upper left coordinate (xCB, yCB) of CU
xx = xCB + x, yy = yCB + y
xInCTU = xx% CtuSize
yInCTU = yy% CtuSize
// Reference position setting
xPos [i] = horPos [i] + xInCTU
yPos [i] = verPos [i] + yInCTU
// Reference restriction line setting
K1 = upper deblocking filter off? 0: NDF
K2 = lower deblocking filter off? 0: NDF
vbLine1 = -K1
vbLine2 = CtuSize-K2
vbLine3 = CtuSize + K2
L1 = left deblocking filter off? 0: NDF
L2 = Right deblocking filter off? 0: NDF
vbCol1 = -L1
vbCol2 = CtuSize-L2
vbCol3 = CtuSize + L2
// Set reference range according to target pixel position
if (yInCTU <vbLine2) {yMin = vbLine1, yMax = vbLine2-1}
if (yInCTU> = vbLine2) {yMin = vbLine2, yMax = vbLine3-1}
if (xInCTU <vbCol2) {xMin = vbCol1, xMax = vbCol2-1}
if (xInCTU> = vbCol2) {xMin = vbCol2, xMax = vbCol3-1}
// Reference position correction (any one of (a), (b), (c) and (d) below can be used)
xPos [i] = Clip3 (xMin, xMax, xInCTU + xPos [i])-xInCTU // (a)
yPos [i] = Clip3 (yMin, yMax, yInCTU + yPos [i])-yInCTU // (a)
if (xInCTU + xPos [i] <xMin || xInCTU + xPos [i]> xMax || yInCTU + yPos [i] <yMin || yInCTU + yPos [i]> yMax) {xPos [i] = 0, yPos [i] = 0} // (b)
if (xInCTU + xPos [i] <xMin || xInCTU + xPos [i]> xMax) {xPos [i] = 0} // (c)
if (yInCTU + yPos [i] <yMin || yInCTU + yPos [i]> yMax) {yPos [i] = 0} // (c)
if (xInCTU + xPos [i] <xMin) {xPos [i] = 2 * (xMin-x InCTU)-xPos [i]} if (xInCTU + xPos [i]> xMax) {xPos [i] = 2 * ( xMax-xInCTU)-xPos [i]} // (d)
if (yInCTU + yPos [i] <yMin) {yPos [i] = 2 * (yMin-yInCTU)-yPos [i]} if (yInCTU + yPos [i]> yMax) {yPos [i] = 2 * ( yMax-yInCTU)-yPos [i]} // (d)
// Filter based on the derived reference position xPos [i], yPos [i] and the filter coefficient fltCoef [i]
fltSamples [xx] [yy] = ref refSamples [(xx / CtuSize) * CtuSize + xPos [i]] [(yy / CtuSize) * CtuSize + yPos [i]] * fltCoeff [i]
Seventh Embodiment
The seventh embodiment differs from the sixth embodiment in that a reference restriction line for restricting the x direction is set without restricting the position of the target pixel.
 第7の実施形態に係るループフィルタ305の適応フィルタ305_2による参照画素の位置の補正の具体的な流れを説明する。
(ステップS7-1) 上記(ステップS6-1)と同様の処理をする。
(ステップS7-2) 上記(ステップS6-2)と同様の処理をする。
(ステップS7-3) 上記(ステップS6-3)と同様の処理をする。
(ステップS7-4) 上記(ステップS6-4)と同様の処理をする。
(ステップS7-5) 上記(ステップS6-5)と同様の処理をする。
(ステップS7-6) 上記(ステップS6-6)と同様の処理をする。
(ステップS7-7) 上記(ステップS6-7)と同様の処理をする。
(ステップS7-8) 上記(ステップS6-8)と同様の処理をする。
(ステップS7-9) 続いて、参照領域設定部305_2bは、参照領域の左側の端xMinに参照制限ラインvbCol1を代入し、参照領域の右側の端xMaxに参照制限ラインvbCol3から1引いた値を代入する。
(ステップS7-10) 上記(ステップS6-10)と同様の処理をする。
(ステップS7-11) 上記(ステップS6-11)と同様の処理をする。
A specific flow of correction of the position of the reference pixel by the adaptive filter 305_2 of the loop filter 305 according to the seventh embodiment will be described.
(Step S7-1) The same processing as the above (step S6-1) is performed.
(Step S7-2) The same processing as the above (step S6-2) is performed.
(Step S7-3) The same processing as the above (step S6-3) is performed.
(Step S7-4) The same processing as the above (step S6-4) is performed.
(Step S7-5) The same processing as the above (Step S6-5) is performed.
(Step S7-6) The same processing as the above (Step S6-6) is performed.
(Step S7-7) The same processing as the above (Step S6-7) is performed.
(Step S7-8) The same processing as the above (Step S6-8) is performed.
(Step S7-9) Subsequently, the reference area setting unit 305_2b substitutes the reference restriction line vbCol1 into the left end xMin of the reference area, and subtracts 1 from the reference restriction line vbCol3 into the right end xMax of the reference area. substitute.
(Step S7-10) The same processing as the above (Step S6-10) is performed.
(Step S7-11) A process similar to the above (step S6-11) is performed.
 上記の処理の流れを、疑似コードを例にして示せば、以下の通りである。
// (x,y)はCUの左上座標(xCb,yCb)を基準とした対象画素の座標
xx = xCb + x, yy = yCb + y
xInCTU = xx % CtuSize
yInCTU = yy % CtuSize
// 参照位置設定
xPos[i] = horPos[i] + xInCTU
yPos[i] = verPos[i] + yInCTU
//参照制限ライン設定
K1 =上デブロッキングフィルタオフ ? 0 : NDF
K2 =下デブロッキングフィルタオフ ? 0 : NDF
vbLine1 = -K1
vbLine2 = CtuSize - K2
vbLine3 = CtuSize + K2
L1 =左デブロッキングフィルタオフ ? 0 : NDF
L2 =右デブロッキングフィルタオフ ? 0 : NDF
vbCol1 = -L1
vbCol2 = CtuSize - L2
vbCol3 = CtuSize + L2
// 対象画素の位置に応じて参照範囲設定
if (yInCTU < vbLine2) {yMin = vbLine1, yMax = vbLine2 - 1}
if (yInCTU >=vbLine2) {yMin = vbLine2, yMax = vbLine3 - 1}
// X方向は対象画素位置によらずに参照範囲を設定してもよい
xMin = vbCol1, xMax = vbCol3 - 1
// 参照位置補正(以下の(a),(b),(c),(d)のいずれかが利用可能、(d)は省略)
xPos[i] = Clip3(xMin, xMax, xPos[i])      // (a)
yPos[i] = Clip3(yMin, yMax, yPos[i])      // (a)
if (xPos[i] < xMin || xPos[i] > xMax || yPos[i] < yMin || yPos[i] > yMax) {xPos[i] = xInCTU, yPos[i] = yInCTU } // (b)
if (xPos[i] < xMin || xPos[i] > xMax) {xPos[i] = xInCTU }      // (c)
if (yPos[i] < yMin || yPos[i] > yMax) {yPos[i] = yInCTU }      // (c)
// 導出された参照位置xPos[i], yPos[i]とフィルタ係数fltCoef[i]に基づいてフィルタ処理
fltSamples[x][y] = Σ refSamples[xPos[i]][yPos[i]] * fltCoeff[i]
 上記は以下の処理と等価である。
// 各i = 0..NALF_FLT_TAP-1について、参照画素の位置xPos[i], yPos[i]を導出する
// CTU内位置計算
// (x,y)はCUの左上座標(xCb,yCb)を基準とした対象画素の座標
xx = xCb + x, yy = yCb + y
xInCTU = xx % CtuSize
yInCTU = yy % CtuSize
// 参照位置設定
xPos[i] = horPos[i]
yPos[i] = verPos[i]
//参照制限ライン設定
K1 =上デブロッキングフィルタオフ ? 0 : NDF
K2 =下デブロッキングフィルタオフ ? 0 : NDF
vbLine1 = -K1
vbLine2 = CtuSize - K2
vbLine3 = CtuSize + K2
L1 =左デブロッキングフィルタオフ ? 0 : NDF
L2 =右デブロッキングフィルタオフ ? 0 : NDF
vbCol1 = -L1
vbCol2 = CtuSize - L2
vbCol3 = CtuSize + L2
// 対象画素の位置に応じて参照範囲設定
if (yInCTU < vbLine2) {yMin = vbLine1, yMax = vbLine2 - 1}
if (yInCTU >= vbLine2) {yMin = vbLine2, yMax = vbLine3 - 1}
// X方向は対象画素位置によらずに参照範囲を設定してもよい
xMin = vbCol1, xMax = vbCol3 - 1
// 参照位置補正(以下の(a),(b),(c),(d)のいずれかが利用可能、(d)は省略)
xPos[i] = Clip3(xMin, xMax, xPos[i])-xInCTU      // (a)
yPos[i] = Clip3(yMin, yMax, yPos[i])-yInCTU      // (a)
if (xInCTU + xPos[i] < xMin || xInCTU + xPos[i] > xMax || yInCTU+yPos[i] < yMin || yInCTU+yPos[i] > yMax) {xPos[i] = 0, yPos[i] = 0 } // (b)
if (xInCTU + xPos[i] < xMin || xInCTU + xPos[i] > xMax) {xPos[i] = 0 } // (c)
if (yInCTU + yPos[i] < yMin || yInCTU + yPos[i] > yMax) {yPos[i] = 0 } // (c)
// 導出された参照位置xPos[i], yPos[i]とフィルタ係数fltCoef[i]に基づいてフィルタ処理
fltSamples[xx][yy] = Σ refSamples[xx + xPos[i]][yy + yPos[i]] * fltCoeff[i]
 (比較例1)
 図17は、比較例1における参照領域を示す図である。
The above process flow is as follows, using pseudo code as an example.
// (x, y) is the coordinate of the target pixel based on the upper left coordinate (xCb, yCb) of the CU
xx = xCb + x, yy = yCb + y
xInCTU = xx% CtuSize
yInCTU = yy% CtuSize
// Reference position setting
xPos [i] = horPos [i] + xInCTU
yPos [i] = verPos [i] + yInCTU
// Reference restriction line setting
K1 = upper deblocking filter off? 0: NDF
K2 = lower deblocking filter off? 0: NDF
vbLine1 = -K1
vbLine2 = CtuSize-K2
vbLine3 = CtuSize + K2
L1 = left deblocking filter off? 0: NDF
L2 = Right deblocking filter off? 0: NDF
vbCol1 = -L1
vbCol2 = CtuSize-L2
vbCol3 = CtuSize + L2
// Set reference range according to target pixel position
if (yInCTU <vbLine2) {yMin = vbLine1, yMax = vbLine2-1}
if (yInCTU> = vbLine2) {yMin = vbLine2, yMax = vbLine3-1}
// The reference range may be set in the X direction regardless of the target pixel position
xMin = vbCol1, xMax = vbCol3-1
// Reference position correction (any of the following (a), (b), (c), (d) can be used, (d) is omitted)
xPos [i] = Clip3 (xMin, xMax, xPos [i]) // (a)
yPos [i] = Clip3 (yMin, yMax, yPos [i]) // (a)
xPos [i]> xMax | | yPos [i] <yMin | | yPos [i]> yMax) {xPos [i] = xInCTU, yPos [i] = yInCTU} // (b)
if (xPos [i] <xMin || xPos [i]> xMax) {xPos [i] = xInCTU} // (c)
if (yPos [i] <yMin || yPos [i]> yMax) {yPos [i] = yInCTU} // (c)
// Filter based on the derived reference position xPos [i], yPos [i] and the filter coefficient fltCoef [i]
fltSamples [x] [y] = ref refSamples [xPos [i]] [yPos [i]] * fltCoeff [i]
The above is equivalent to the following processing.
// For each i = 0..NALF_FLT_TAP-1, derive the position xPos [i], yPos [i] of the reference pixel
// CTU position calculation
// (x, y) is the coordinate of the target pixel based on the upper left coordinate (xCb, yCb) of the CU
xx = xCb + x, yy = yCb + y
xInCTU = xx% CtuSize
yInCTU = yy% CtuSize
// Reference position setting
xPos [i] = horPos [i]
yPos [i] = verPos [i]
// Reference restriction line setting
K1 = upper deblocking filter off? 0: NDF
K2 = lower deblocking filter off? 0: NDF
vbLine1 = -K1
vbLine2 = CtuSize-K2
vbLine3 = CtuSize + K2
L1 = left deblocking filter off? 0: NDF
L2 = Right deblocking filter off? 0: NDF
vbCol1 = -L1
vbCol2 = CtuSize-L2
vbCol3 = CtuSize + L2
// Set reference range according to target pixel position
if (yInCTU <vbLine2) {yMin = vbLine1, yMax = vbLine2-1}
if (yInCTU> = vbLine2) {yMin = vbLine2, yMax = vbLine3-1}
// The reference range may be set in the X direction regardless of the target pixel position
xMin = vbCol1, xMax = vbCol3-1
// Reference position correction (any of the following (a), (b), (c), (d) can be used, (d) is omitted)
xPos [i] = Clip3 (xMin, xMax, xPos [i])-xInCTU // (a)
yPos [i] = Clip3 (yMin, yMax, yPos [i])-yInCTU // (a)
if (xInCTU + xPos [i] <xMin || xInCTU + xPos [i]> xMax || yInCTU + yPos [i] <yMin || yInCTU + yPos [i]> yMax) {xPos [i] = 0, yPos [i] = 0} // (b)
if (xInCTU + xPos [i] <xMin || xInCTU + xPos [i]> xMax) {xPos [i] = 0} // (c)
if (yInCTU + yPos [i] <yMin || yInCTU + yPos [i]> yMax) {yPos [i] = 0} // (c)
// Filter based on the derived reference position xPos [i], yPos [i] and the filter coefficient fltCoef [i]
fltSamples [xx] [yy] = ref refSamples [xx + xPos [i]] [yy + yPos [i]] * fltCoeff [i]
(Comparative example 1)
FIG. 17 is a diagram illustrating a reference region in the first comparative example.
 比較例1として、対象CTUの境界から数画素離れた仮想的な境界ライン(VBライン)を境界として、境界外の画素を参照画素として参照することを制限するバーチャルバウンダリの技術を挙げる。 As a first comparative example, a virtual boundary technique will be described in which referring to pixels outside the boundary as reference pixels with a virtual boundary line (VB line) several pixels away from the boundary of the target CTU as the boundary is used.
 バーチャルバウンダリの技術において、適応フィルタALFは、デブロッキングフィルタDFによるフィルタ処理済み(DF済みとも呼称する)の画素に適用される。このため、DF済み領域の範囲を知る必要がある。ここで、対象CTUに適応フィルタALFを適用する時点において、対象CTUの全体がDF済みであるわけではない。例えば、CTUの上部はDF済みであり、下部はまだDF済みではないという場合がある。このため、対象CTU内のDF済み領域の範囲の境界に「下VBライン」を設定する。なお、下VBラインより下の領域のDF処理を待った場合、下VBラインより下の領域のアクセスも可能になる。しかしながら、この場合、(1)処理遅延が大きくなる、(2)フレームバッファへの読み戻しが必要になり、メモリバンドが大きくなる、といった問題が生じる。 In the virtual boundary technology, the adaptive filter ALF is applied to pixels that have been filtered (also referred to as DF-completed) by the deblocking filter DF. For this reason, it is necessary to know the range of the DF completed area. Here, at the time of applying the adaptive filter ALF to the target CTU, the entire target CTU is not necessarily DF-completed. For example, the top of the CTU may be DFed and the bottom may not yet be DFed. Therefore, the “lower VB line” is set at the boundary of the range of the DF-completed area in the target CTU. When waiting for DF processing of the area below the lower VB line, access to the area below the lower VB line is also possible. However, in this case, (1) processing delay increases, (2) reading back to the frame buffer becomes necessary, and a memory band becomes large.
 一方、上側のCTU境界より上の領域はDF済みではあるが、ある境界よりも上の領域(「書出済領域」と呼称する)は既にフレームバッファに書き出しているので、書出済領域の画素の情報はラインメモリにはない。このため、この領域の画素の参照は、(1)フレームバッファから再度転送することで可能であるが、メモリバンドが大きくなる、また(2)ラインメモリに載せることで可能であるが、ラインメモリサイズを増加する必要がある。そこで、書出済領域との境界に「上VBライン」を設定する。 On the other hand, although the area above the upper CTU boundary is DF-completed, the area above the certain boundary (referred to as "written area") has already been written to the frame buffer, so There is no pixel information in the line memory. For this reason, reference to the pixels in this area is possible by (1) transferring again from the frame buffer, but the memory band becomes large, and (2) it is possible by loading in the line memory, but the line memory Need to increase the size. Therefore, "upper VB line" is set at the boundary with the written area.
 図17に示すように、上VBラインと下VBラインとの間の領域はDF済み領域である。バーチャルバウンダリの技術では、VBラインを設けることにより、処理遅延、メモリバンド、ラインメモリを減らすことができる。 As shown in FIG. 17, the area between the upper VB line and the lower VB line is a DF-finished area. In the virtual boundary technology, processing delay, memory band and line memory can be reduced by providing the VB line.
 (比較例2)
 図18は、比較例2における参照領域を示す図である。
(Comparative example 2)
FIG. 18 is a diagram illustrating a reference region in the second comparative example.
 比較例2として、デブロッキングフィルタによるフィルタ処理のオンオフに応じて参照領域の設定方法を変える技術を挙げる。図18は、比較例2においてデブロッキングフィルタのオンまたはオフに応じた参照領域を示す図である。 As Comparative Example 2, a technique of changing the setting method of the reference area according to on / off of the filtering process by the deblocking filter will be mentioned. FIG. 18 is a diagram showing a reference region according to on or off of the deblocking filter in the second comparative example.
 図18の(a)は、デブロッキングフィルタがオンの場合の参照領域を示す。デブロッキングフィルタによるフィルタ処理がオンの場合、上VBラインをCTUラインよりもKだけ上のラインに設定し、上VBライン以下の領域を、適応フィルタの参照領域とする。 (A) of FIG. 18 shows the reference area when the deblocking filter is on. When filtering by the deblocking filter is on, the upper VB line is set to a line K above the CTU line, and the area below the upper VB line is set as the reference area of the adaptive filter.
 図18の(b)は、デブロッキングフィルタがオフの場合の参照領域を示す。デブロッキングフィルタによるフィルタ処理がオフの場合、上VBラインをCTUラインに設定し、上VBライン以下の領域を、適応フィルタの参照領域とする。ここで、デブロッキングフィルタがオフであり、CTUより上側の領域のスライスとCTU内の領域のスライスとが異なる場合、適応フィルタによるフィルタ処理において、CTUより上側の領域を参照できない。このため、適応フィルタによるフィルタ処理において参照可能な領域を、上側のCTU境界以下に制限する。 (B) of FIG. 18 shows the reference area when the deblocking filter is off. When filtering by the deblocking filter is off, the upper VB line is set to the CTU line, and the area below the upper VB line is set as the reference area of the adaptive filter. Here, when the deblocking filter is off and the slice in the region above the CTU is different from the slice in the region in the CTU, the region above the CTU can not be referenced in the filtering process by the adaptive filter. Therefore, the area that can be referred to in the filtering process by the adaptive filter is limited to the upper CTU boundary or less.
  (第8の実施形態)
 本発明の他の実施形態について、図19に基づいて説明すれば、以下のとおりである。なお、説明の便宜上、前記実施形態にて説明した部材と同じ機能を有する部材については、その説明を省略する。
Eighth Embodiment
Another embodiment of the present invention is described below with reference to FIG. In addition, the description is abbreviate | omitted about the member which has the same function as the member demonstrated in the said embodiment for convenience of explanation.
 (ループフィルタ305a)
 図19は、ループフィルタ305aの構成を示すブロック図である。図19に示すように、ループフィルタ305aは、デブロッキングフィルタ305_1、適応フィルタ305a_2、および、内部メモリ305_3を備えている。
(Loop filter 305a)
FIG. 19 is a block diagram showing the configuration of the loop filter 305a. As shown in FIG. 19, the loop filter 305a includes a deblocking filter 305_1, an adaptive filter 305a_2, and an internal memory 305_3.
 (適応フィルタ305a_2)
 図19に示すように、適応フィルタ305a_2は、対象画素設定部305_2a、参照領域設定部305_2b、および、フィルタ処理部305a_2cを備えている。
(Adaptive filter 305a_2)
As shown in FIG. 19, the adaptive filter 305a_2 includes a target pixel setting unit 305_2a, a reference area setting unit 305_2b, and a filter processing unit 305a_2c.
 (フィルタ処理部305a_2c)
 フィルタ処理部305a_2cは、入力画像Pにおける対象画素、当該対象画素の周囲の画素、及び、当該周囲の画素の少なくとも一部を参照することによって算出されたアクティビティのそれぞれに対して重み係数を乗算する点において、上記実施形態と異なる。
(Filtering unit 305a_2c)
The filter processing unit 305a_2c multiplies each of the target pixel in the input image P, the pixels around the target pixel, and the activity calculated by referring to at least a part of the peripheral pixels, by a weighting factor. The point is different from the above embodiment.
 対象画素の画素値がs(N/2)であり、その周辺画素の画素値が(s(0)~s(N/2-1)、s(N/2+1)~s(N))の場合、フィルタ処理は下記の式で表すことができる。 The pixel value of the target pixel is s (N / 2), and the pixel values of its peripheral pixels are (s (0) to s (N / 2-1), s (N / 2 + 1) to s (N) In the case of), the filtering process can be expressed by the following equation.
 sflt = (Σa(i)*(s(i)+s(N-i))+a(N/2)*s(N/2)+o) >> shift 
 ここで、Σはi=0~N/2までの総和であり、a(i)はフィルタ係数であり、oはオフセットであり、shiftは正規化のための係数である。図20に示すようにN=24の場合、上記の式は、下記の式で表すことができる。
sflt = (Σa (i) * (s (i) + s (Ni)) + a (N / 2) * s (N / 2) + o) >> shift
Here, Σ is the sum of i = 0 to N / 2, a (i) is a filter coefficient, o is an offset, and shift is a coefficient for normalization. As shown in FIG. 20, in the case of N = 24, the above equation can be expressed by the following equation.
 sflt = (a0*(s0+s24)+ a1*(s1+s23)+…+ a11*(s11+s13)+a12*s12+o) >> shift
 上記の式ではフィルタ係数をa0…a12、画素値をs0…s24と記載した。
sflt = (a0 * (s0 + s24) + a1 * (s1 + s23) + ... + a11 * (s11 + s13) + a12 * s12 + o) >> shift
In the above equation, the filter coefficients are described as a0... A12, and the pixel values are described as s0.
 prodFlt = a0*(s0+s24)+ a1*(s1+s23)+…+ a11*(s11+s13)+a12*s12
と表現すると、sfltは下記の式で表現できる。
prodFlt = a0 * (s0 + s24) + a1 * (s1 + s23) +... + a11 * (s11 + s13) + a12 * s12
Expressed as, sflt can be expressed by the following equation.
 sflt = (prodFlt+o) >> shift
 アクティビティは、例えば下記式で示すSAD(Sum of Absolute Difference、差分絶対値和)により、図20に示す太線で囲んだ領域では、対象画素(s12)の画素値と、当該対象画素の周囲の画素の少なくとも一部(s7,s11,s13,s17、画素の集合Sとも呼称する)の画素値の各々との差の絶対値の和によって算出することができる。
sflt = (prodFlt + o) >> shift
The activity is, for example, SAD (Sum of Absolute Difference, difference absolute value sum) shown by the following equation, and in a region surrounded by a thick line shown in FIG. 20, the pixel value of the target pixel (s12) and pixels around the target pixel Can be calculated by the sum of the absolute values of the difference between each of the pixel values of at least a part of (s7, s11, s13, s17, and also referred to as a set S of pixels).
 act (s7,s11,s13,s17) = |s7-s12|+|s11-s12|+|s13-s12|+|s17-s12|
 一般的に、act()は下記の式で表すことができる。
act (s7, s11, s13, s17) = | s7-s12 | + | s11-s12 | + | s13-s12 | + | s17-s12 |
In general, act () can be represented by the following formula.
 act(s(0),s(1),…s(N)) = Σabs(s(i)-s(N/2))
 ここで、Σはi=0~Nまでの総和であり、Nは周辺画素の個数であり、s(N/2)は対象画素である。
act (s (0), s (1), ... s (N)) = = abs (s (i)-s (N / 2))
Here, Σ is the sum of i = 0 to N, N is the number of peripheral pixels, and s (N / 2) is the target pixel.
 本実施形態において、「中間値d」という概念を導入する。中間値dは、下記式で示すように、対象画素の周囲の画素の画素値の和と、対象画素の画素値と、画素の集合Sのアクティビティact(x)と、所定の定数KACTから導出することができる。 In the present embodiment, the concept of "intermediate value d" is introduced. The intermediate value d is derived from the sum of the pixel values of the pixels around the target pixel, the pixel value of the target pixel, the activity act (x) of the pixel set S, and the predetermined constant KACT, as shown by the following equation can do.
 d = (s0+s1+s2+s3+…+s11+s13+…s24 - 24*s12) / (KACT + act(s0,s1,s2,…,s24))
 ここで、上記除算は、除数iに関するテーブル値table[i]と被除数との乗算処理、およびシフト処理を組み合わせることにより実施することができる。例えば、被除数xxxを除数yyyで割る場合、下記式のように処理することができる。
d = (s0 + s1 + s2 + s3 + ... + s11 + s13 + ... s24-24 * s12) / (KACT + act (s0, s1, s2, ..., s24))
Here, the division can be implemented by combining multiplication processing of the table value table [i] for the divisor i and the dividend, and shift processing. For example, when dividing the dividend xxx by the divisor yyy, it can be processed as the following equation.
 xxx / yyy = (xxx * table[yyy] + round) >> tblshift
 ここで、
 round = 1 << (tblshift - 1)
であり、table[i]は、例えば下記式で導出する。
xxx / yyy = (xxx * table [yyy] + round) >> tblshift
here,
round = 1 << (tblshift-1)
And table [i] is derived, for example, by the following equation.
 table[i] = (1 << tblshift) / i
 適応フィルタ305a_2は、中間値dを、例えば下記式で示すように、適応フィルタALFの項の一つとして利用する。
table [i] = (1 << tblshift) / i
The adaptive filter 305a_2 uses the intermediate value d as one of the terms of the adaptive filter ALF, for example, as shown in the following equation.
 sflt = ( prodFlt + b0*d + o) >> shift
 すなわち、フィルタ処理部305a_2cでは、アクティビティから導出された中間値に重み係数を乗算して得られた結果を右ビットシフトする処理が追加される。
sflt = (prodFlt + b0 * d + o) >> shift
That is, in the filter processing units 305a_2c, processing for right bit shifting the result obtained by multiplying the weighting factor to the intermediate value derived from the activity is added.
 また、適応フィルタ305a_2は、様々な画素の集合Sを採用することができる。画素の集合Sの例を図20から図24を参照して説明する。 Also, the adaptive filter 305a_2 can adopt a set S of various pixels. An example of the pixel set S will be described with reference to FIGS.
 適応フィルタ305a_2は、図20に示すように、対象画素s12の上下左右に隣り合う画素を画素の集合Sとして採用することができる。図20に示す場合、中間値dN1は下記式で表すことができる。 The adaptive filter 305a_2 can adopt, as a set S of pixels, pixels adjacent to the upper, lower, left, and right of the target pixel s12, as shown in FIG. In the case shown in FIG. 20, the intermediate value dN1 can be expressed by the following equation.
 dN1 = { (s7+s11+s13+s17) - 4*s12 } / (KACT + act (s7,s11,s12,s13,s17))
 また、適応フィルタ305a_2は、中間値dN1を、下記式で示すように、適応フィルタALFの項の一つとして利用することができる。
dN1 = {(s7 + s11 + s13 + s17)-4 * s12} / (KACT + act (s7, s11, s12, s13, s17))
Further, the adaptive filter 305a_2 can use the intermediate value dN1 as one of the terms of the adaptive filter ALF, as shown by the following equation.
 slft = ( prodFlt + b0*dN1 + o) >> shift
 適応フィルタ305a_2は、図21に示すように、対象画素s12の上下左右、及び斜めに隣り合う画素を画素の集合Sとして採用することができる。図21に示す場合、中間値dN2は下記式で表すことができる。
slft = (prodFlt + b0 * dN1 + o) >> shift
The adaptive filter 305a_2 can adopt, as the set S of pixels, pixels adjacent to the upper, lower, left, and right of the target pixel s12 and diagonally as shown in FIG. In the case shown in FIG. 21, the intermediate value dN2 can be expressed by the following equation.
 dN2 = { (s6+s7+s8+s11+s13+s16+s17+s18) - 8*s12 } / (KACT + act (s6,s7,s8,s11,s12,s13,s16,s17,s18))
 また、適応フィルタ305a_2は、中間値dN2を、下記式で示すように、適応フィルタALFの項の一つとして利用することができる。
dN2 = {(s6 + s7 + s8 + s11 + s13 + s16 + s17 + s18)-8 * s12} / (KACT + act (s6, s7, s8, s11, s11, s12, s13, s16, s17, s18))
In addition, the adaptive filter 305a_2 can use the intermediate value dN2 as one of the terms of the adaptive filter ALF, as shown by the following equation.
 slft = ( prodFlt + b0*dN2 + o) >> shift
 適応フィルタ305a_2は、図22に示すように、対象画素s12の上下左右、及び斜めに、1画素空けて隣り合う画素を画素の集合Sとして採用することができる。図22に示す場合、中間値dN3は下記式で表すことができる。
slft = (prodFlt + b0 * dN2 + o) >> shift
As shown in FIG. 22, the adaptive filter 305a_2 can adopt, as the set S of pixels, pixels adjacent to each other with a gap of one pixel above, below, to the left, and to the right of the target pixel s12. In the case shown in FIG. 22, the intermediate value dN3 can be expressed by the following equation.
 dN3 = { (s0+s1+s2+s3+s4+s5+s9+s10+s14+s15+s19+s20+s21+s22+s23+s24) - 16*s12 } / (KACT + act (s0,s1,s2,s3,…,s24))
 また、適応フィルタ305a_2は、中間値dN3を、下記式で示すように、適応フィルタALFの項の一つとして利用することができる。
dN3 = {(s0 + s1 + s2 + s3 + s4 + s5 + s9 + s10 + s14 + s15 + s19 + s20 + s21 + s22 + s23 + s24)-16 * s12} / (KACT + act (s0, s1) , s2, s3, ..., s24))
Also, the adaptive filter 305a_2 can use the intermediate value dN3 as one of the terms of the adaptive filter ALF, as shown by the following equation.
 slft = ( prodFlt + b0*dN3 + o) >> shift
 さらに、適応フィルタ305a_2は、複数の異なる中間値dを、下記式で示すように、適応フィルタALFの項として利用することができる。下記式においては、図20で示す画素の集合Sを採用した場合の中間値dN1、および図21で示す画素の集合Sを採用した場合の中間値dN2を利用している。
slft = (prodFlt + b0 * dN3 + o) >> shift
Furthermore, the adaptive filter 305a_2 can use a plurality of different intermediate values d as a term of the adaptive filter ALF as indicated by the following equation. In the following equation, an intermediate value dN1 in the case of adopting the pixel set S shown in FIG. 20 and an intermediate value dN2 in the case of adopting the pixel group S shown in FIG. 21 are used.
 slft = ( prodFlt + b0*dN1 + b1*dN2 + o) >> shift
 すなわち、フィルタ処理部305a_2cは、アクティビティから導出された中間値に重み係数を乗算して得られた各項の和を取る処理をする。さらに、フィルタ処理部305a_2cは、和を取って得られた結果を右ビットシフトする処理をする。
slft = (prodFlt + b0 * dN1 + b1 * dN2 + o) >> shift
That is, the filter processing units 305a_2c process the sum of the terms obtained by multiplying the weighting factor to the intermediate value derived from the activity. Furthermore, the filter processing units 305a_2c performs a process of right bit shifting the result obtained by taking the sum.
 また、適応フィルタ305a_2は、画素の集合S(すなわち、アクティビティを算出するために参照される画素)に、水平方向、垂直方向、及び斜め方向に並んだ画素を含むことができる。 In addition, the adaptive filter 305a_2 may include pixels aligned in the horizontal direction, the vertical direction, and the diagonal direction in the set S of pixels (that is, the pixels referred to for calculating the activity).
 適応フィルタ305a_2は、図23に示すように、CTU内で対象画素s12と共に水平方向に並ぶ画素を画素の集合Sとして採用することができる。図23に示す場合、中間値dHは下記式で表すことができる。 The adaptive filter 305a_2 can adopt, as the set S of pixels, pixels aligned in the horizontal direction with the target pixel s12 in the CTU, as shown in FIG. In the case shown in FIG. 23, the intermediate value dH can be expressed by the following equation.
 dH = { (s10+s11+s13+s14) - 4*s12 } / (KACT + act (s10,s11,s12,s13,s14))
 また、適応フィルタ305a_2が、CTU内で対象画素s12と共に垂直方向に並ぶ画素を画素の集合Sとして採用した場合、中間値dVは下記式で表すことができる。
dH = {(s10 + s11 + s13 + s14)-4 * s12} / (KACT + act (s10, s11, s12, s13, s14))
Further, when the adaptive filter 305a_2 adopts, as the pixel set S, pixels aligned in the vertical direction with the target pixel s12 in the CTU, the intermediate value dV can be expressed by the following equation.
 dV = { (s2+s7+s17+s22) - 4*s12 } / (KACT + act (s2,s7,s12,s17,s22))
 また、適応フィルタ305a_2は、中間値dHおよびdVを、下記式で示すように、適応フィルタALFの項として利用することができる。
dV = {(s2 + s7 + s17 + s22)-4 * s12} / (KACT + act (s2, s7, s12, s17, s22))
Further, the adaptive filter 305a_2 can use the intermediate values dH and dV as the terms of the adaptive filter ALF, as shown by the following equation.
 sflt = ( prodFlt + b0*dH + b1*dV + o) >> shift
 適応フィルタ305a_2は、図24に示すように、CTU内で対象画素s12と共に斜め方向に並ぶ画素を画素の集合Sとして採用することができる。図24に示す場合、中間値dD1は下記式で表すことができる。
sflt = (prodFlt + b0 * dH + b1 * dV + o) >> shift
As shown in FIG. 24, the adaptive filter 305a_2 can adopt, as a set S of pixels, pixels that are diagonally aligned with the target pixel s12 in the CTU. In the case shown in FIG. 24, the intermediate value dD1 can be expressed by the following equation.
 dD1 = { (s0+s6+s18+s24) - 4*s12 } / (KACT + act (s0,s6,s12,s18,s24))
 また、適応フィルタ305a_2が、CTU内で対象画素s12と共に図24に示す方向と対称な垂直方向に並ぶ画素を画素の集合Sとして採用した場合、中間値dD2は下記式で表すことができる。
dD1 = {(s0 + s6 + s18 + s24)-4 * s12} / (KACT + act (s0, s6, s12, s18, s24))
When the adaptive filter 305a_2 adopts, in the CTU, pixels aligned in the vertical direction symmetrical to the target pixel s12 in the direction shown in FIG. 24 as the pixel set S, the intermediate value dD2 can be expressed by the following equation.
 dD2 = { (s4+s8+s16+s20) - 4*s12 } / (KACT + act (s4,s8,s12,s16,s20))
 また、適応フィルタ305a_2は、中間値dD1およびdD2を、下記式で示すように、適応フィルタALFの項として利用することができる。
dD2 = {(s4 + s8 + s16 + s20)-4 * s12} / (KACT + act (s4, s8, s12, s16, s20))
Further, the adaptive filter 305a_2 can use the intermediate values dD1 and dD2 as the terms of the adaptive filter ALF, as shown by the following equation.
 sflt = ( prodFlt + b0*dD1 + b1*dD2 + o) >> shift
 さらに、適応フィルタ305a_2が、CTU内で対象画素s12と共に図24に示す方向とは異なる方向に並ぶ画素を画素の集合Sとして採用した場合、下記式で表す中間値dD23、dD21、dD19、dD15を導出することができる。
sflt = (prodFlt + b0 * dD1 + b1 * dD2 + o) >> shift
Furthermore, when adaptive filter 305a_2 adopts pixels aligned in a direction different from the direction shown in FIG. 24 together with target pixel s12 in CTU as pixel set S, intermediate values dD23, dD21, dD19, dD15 expressed by the following equations are obtained. It can be derived.
 dD23 = { (s1+s23) - 2*s12 } / (KACT + act (s1,s12,s23))
 dD21 = { (s3+s21) - 2*s12 } / (KACT + act (s3,s12,s21))
 dD19 = { (s5+s19) - 2*s12 } / (KACT + act (s5,s12,s19))
 dD15 = { (s9+s15) - 2*s12 } / (KACT + act (s9,s15,s21))
 また、適応フィルタ305a_2は、中間値dD23、dD21、dD19、およびdD15を、下記式で示すように、適応フィルタALFの項として利用することができる。
dD23 = {(s1 + s23)-2 * s12} / (KACT + act (s1, s12, s23))
dD21 = {(s3 + s21)-2 * s12} / (KACT + act (s3, s12, s21))
dD19 = {(s5 + s19)-2 * s12} / (KACT + act (s5, s12, s19))
dD15 = {(s9 + s15)-2 * s12} / (KACT + act (s9, s15, s21))
In addition, the adaptive filter 305a_2 can use the intermediate values dD23, dD21, dD19, and dD15 as the terms of the adaptive filter ALF, as indicated by the following equation.
 sflt = ( prodFlt + b0*dD23 + b1*dD21 + b2*dD19 + b3*dD15 + o) >> shift
 また、適応フィルタ305a_2は、対象画素s12と共に水平方向に並ぶ画素を画素の集合Sから導出した中間値dH、対象画素s12と共に垂直方向に並ぶ画素を画素の集合Sから導出した中間値dV、ならびに対象画素s12と共に斜め方向に並ぶ画素を画素の集合Sから導出した中間値dD1およびdD2を、下記式で示すように、適応フィルタALFの項として利用することができる。
sflt = (prodFlt + b0 * dD23 + b1 * dD21 + b2 * dD19 + b3 * dD15 + o) >> shift
Further, the adaptive filter 305a_2 has an intermediate value dH derived from the set S of pixels horizontally aligned with the target pixel s12, an intermediate value dV derived derived from the set S of pixels vertically aligned with the target pixel s12, and Intermediate values dD1 and dD2 derived from a set S of pixels of pixels aligned in a diagonal direction with the target pixel s12 can be used as a term of the adaptive filter ALF as shown by the following equation.
 sflt = ( prodFlt + b0*dH + b1*dV + b2*dD1 + b3*dD2 + o) >> shift
 下記式は、対象画素s12の上下左右に隣り合う画素を画素の集合Sから導出した中間値dN1、対象画素s12と共に水平方向に並ぶ画素を画素の集合Sから導出した中間値dH、対象画素s12と共に垂直方向に並ぶ画素を画素の集合Sから導出した中間値dV、ならびに対象画素s12と共に斜め方向に並ぶ画素を画素の集合Sから導出した中間値dD1およびdD2を適応フィルタALFの項として利用した場合を示す。
sflt = (prodFlt + b0 * dH + b1 * dV + b2 * dD1 + b3 * dD2 + o) >> shift
The following equation is an intermediate value dN1 derived from the set S of pixels adjacent to the target pixel s12 above and below, and an intermediate value dH derived from the set S of pixels horizontally aligned with the target pixel s12, the target pixel s12 And the intermediate values dD1 and dD2 derived from the pixel set S as the terms of the adaptive filter ALF. Indicates the case.
 sflt = ( prodFlt + b0*dN1 + b1*dH + b2*dV + b3*dD1 + b4*dD2 + o) >> shift
 本実施形態によれば、適応フィルタALFが、周囲の画素の少なくとも一部を参照することによって算出されたアクティビティのそれぞれに対して重み係数を乗算した項を有する。これにより、画素単位で適応フィルタALFのフィルタ強度を調整することができる。また、適応フィルタALFのフィルタ強度を、シーケンスやブロックに応じて変えることができる。
sflt = (prodFlt + b0 * dN1 + b1 * dH + b2 * dV + b3 * dD1 + b4 * dD2 + o) >> shift
According to this embodiment, the adaptive filter ALF has a term obtained by multiplying each of the activities calculated by referring to at least a part of surrounding pixels by a weighting factor. Thus, the filter strength of the adaptive filter ALF can be adjusted in pixel units. Also, the filter strength of the adaptive filter ALF can be changed according to the sequence or block.
  (画像符号化装置の構成)
 次に、本実施形態に係る画像符号化装置11の構成について説明する。図4は、本実施形態に係る画像符号化装置11の構成を示すブロック図である。画像符号化装置11は、予測画像生成部101、減算部102、DCT・量子化部103、エントロピー符号化部104、逆量子化・逆DCT部105、加算部106、ループフィルタ107、予測パラメータメモリ(予測パラメータ記憶部、フレームメモリ)108、参照ピクチャメモリ(参照画像記憶部、フレームメモリ)109、符号化パラメータ決定部110、予測パラメータ符号化部111を含んで構成される。予測パラメータ符号化部111は、インター予測パラメータ符号化部112及びイントラ予測パラメータ符号化部113を含んで構成される。
(Configuration of image coding apparatus)
Next, the configuration of the image coding apparatus 11 according to the present embodiment will be described. FIG. 4 is a block diagram showing the configuration of the image coding apparatus 11 according to the present embodiment. The image coding device 11 includes a predicted image generation unit 101, a subtraction unit 102, a DCT / quantization unit 103, an entropy coding unit 104, an inverse quantization / inverse DCT unit 105, an addition unit 106, a loop filter 107, a prediction parameter memory (Prediction parameter storage unit, frame memory) 108, reference picture memory (reference image storage unit, frame memory) 109, coding parameter determination unit 110, and prediction parameter coding unit 111 are configured. The prediction parameter coding unit 111 includes an inter prediction parameter coding unit 112 and an intra prediction parameter coding 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 prediction image generation unit 101 generates, for each picture of the image T, the prediction image P of the prediction unit PU for each coding unit CU, which 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 coding unit 111. The prediction parameter input from the prediction parameter coding 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 starting from the target PU. In the case of intra prediction, the prediction parameter is, for example, an intra prediction mode. The pixel value of the adjacent PU used in the intra prediction mode is read from the reference picture memory 109, and a PU predicted image P is generated. The prediction image generation unit 101 generates a PU prediction image P using one of a plurality of prediction methods for the read reference picture block. The prediction image generation unit 101 outputs the generated prediction image P of PU to the subtraction unit 102.
 なお、予測画像生成部101は、既に説明した予測画像生成部308と同じ動作である。例えば、図6は、予測画像生成部101に含まれるインター予測画像生成部1011の構成を示す概略図である。インター予測画像生成部1011は、動き補償部10111、重み予測部10112を含んで構成される。動き補償部10111および重み予測部10112については、上述の動き補償部3091、重み予測部3094のそれぞれと同様の構成であるためここでの説明を省略する。 The predicted image generation unit 101 performs the same operation as the predicted image generation unit 308 described above. For example, FIG. 6 is a schematic diagram showing a configuration of the inter predicted image generation unit 1011 included in the predicted image generation unit 101. The inter prediction image generation unit 1011 includes a motion compensation unit 10111 and a weight prediction unit 10112. The motion compensation unit 10111 and the weight prediction unit 10112 have the same configuration as that of the above-described motion compensation unit 3091 and weight prediction unit 3094, and therefore the description thereof is omitted here.
 予測画像生成部101は、予測パラメータ符号化部から入力されたパラメータを用いて、参照ピクチャメモリから読み出した参照ブロックの画素値をもとにPUの予測画像Pを生成する。予測画像生成部101で生成した予測画像は減算部102、加算部106に出力される。 The prediction image generation unit 101 generates a PU prediction image P based on the pixel value of the reference block read from the reference picture memory, using the parameter input from the prediction parameter coding 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 to generate 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 to calculate DCT coefficients. 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から符号化パラメータが入力される。入力される符号化パラメータには、例えば、参照ピクチャインデックスrefIdxLX、予測ベクトルインデックスmvp_LX_idx、差分ベクトルmvdLX、予測モードpredMode、及びマージインデックスmerge_idx等の符号がある。 The entropy coding unit 104 receives the quantization coefficient from the DCT / quantization unit 103, and receives the coding parameter from the prediction parameter coding unit 111. The coding parameters to be input include, for example, codes such as a reference picture index refIdxLX, a prediction vector index mvp_LX_idx, a difference vector mvdLX, a prediction mode predMode, and a merge index merge_idx.
 エントロピー符号化部104は、入力された量子化係数と符号化パラメータをエントロピー符号化して符号化ストリームTeを生成し、生成した符号化ストリームTeを外部に出力する。 The entropy coding unit 104 entropy-codes the input quantization coefficient and coding parameters to generate a coded stream Te, and outputs the generated coded stream Te to the outside.
 逆量子化・逆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 coefficients 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, for each pixel, the signal value of the predicted 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 decoding. Generate an image. The addition unit 106 stores the generated decoded image in the reference picture memory 109.
 ループフィルタ107は加算部106が生成した復号画像に対し、デブロッキングフィルタ、サンプル適応オフセット(SAO)、適応フィルタ(ALF)を施す。 The loop filter 107 applies a deblocking filter, a sample adaptive offset (SAO), and an adaptive filter (ALF) to the decoded image generated by the adding unit 106.
 予測パラメータメモリ108は、符号化パラメータ決定部110が生成した予測パラメータを、符号化対象のピクチャ及びCU毎に予め定めた位置に記憶する。 The prediction parameter memory 108 stores the prediction parameter generated by the coding parameter determination unit 110 in a predetermined position for each picture and CU to be coded.
 参照ピクチャメモリ109は、ループフィルタ107が生成した復号画像を、符号化対象のピクチャ及びCU毎に予め定めた位置に記憶する。 The reference picture memory 109 stores the decoded image generated by the loop filter 107 in a predetermined position for each picture and CU to be encoded.
 符号化パラメータ決定部110は、符号化パラメータの複数のセットのうち、1つのセットを選択する。符号化パラメータとは、上述した予測パラメータやこの予測パラメータに関連して生成される符号化の対象となるパラメータである。予測画像生成部101は、これらの符号化パラメータのセットの各々を用いてPUの予測画像Pを生成する。 The coding parameter determination unit 110 selects one of a plurality of sets of coding parameters. The coding parameter is a prediction parameter described above or a parameter to be coded that is generated in association with the prediction parameter. The prediction image generation unit 101 generates a PU prediction image P using each of these sets of coding parameters.
 符号化パラメータ決定部110は、複数のセットの各々について情報量の大きさと符号化誤差を示すコスト値を算出する。コスト値は、例えば、符号量と二乗誤差に係数λを乗じた値との和である。符号量は、量子化誤差と符号化パラメータをエントロピー符号化して得られる符号化ストリームTeの情報量である。二乗誤差は、減算部102において算出された残差信号の残差値の二乗値についての画素間の総和である。係数λは、予め設定されたゼロよりも大きい実数である。符号化パラメータ決定部110は、算出したコスト値が最小となる符号化パラメータのセットを選択する。これにより、エントロピー符号化部104は、選択した符号化パラメータのセットを符号化ストリームTeとして外部に出力し、選択されなかった符号化パラメータのセットを出力しない。符号化パラメータ決定部110は決定した符号化パラメータを予測パラメータメモリ108に記憶する。 The coding parameter determination unit 110 calculates, for each of the plurality of sets, a cost value indicating the size of the information amount and the coding error. The cost value is, for example, the sum of the code amount and a value obtained by multiplying the square error by the coefficient λ. The code amount is the information amount of the coded stream Te obtained by entropy coding the quantization error and the coding parameter. The squared error is a sum between pixels with respect to the square value of the residual value of the residual signal calculated by the subtraction unit 102. The factor λ is a real number greater than a preset zero. The coding parameter determination unit 110 selects a set of coding parameters that minimize the calculated cost value. Thereby, the entropy coding unit 104 externally outputs the set of selected coding parameters as the coded stream Te, and does not output the set of non-selected coding parameters. The coding parameter determination unit 110 stores the determined coding parameters in the prediction parameter memory 108.
 予測パラメータ符号化部111は、符号化パラメータ決定部110から入力されたパラメータから、符号化するための形式を導出し、エントロピー符号化部104に出力する。符号化するための形式の導出とは、例えば動きベクトルと予測ベクトルから差分ベクトルを導出することである。また予測パラメータ符号化部111は、符号化パラメータ決定部110から入力されたパラメータから予測画像を生成するために必要なパラメータを導出し、予測画像生成部101に出力する。予測画像を生成するために必要なパラメータとは、例えばサブブロック単位の動きベクトルである。 The prediction parameter coding unit 111 derives a format for coding from the parameters input from the coding parameter determination unit 110, and outputs the format to the entropy coding unit 104. Derivation of a form for encoding is, for example, derivation of a difference vector from a motion vector and a prediction vector. Further, the prediction parameter coding unit 111 derives parameters necessary to generate a prediction image from the parameters input from the coding parameter determination unit 110, and outputs the parameters to the prediction image generation unit 101. The parameters required to generate a predicted image are, for example, motion vectors in units of subblocks.
 インター予測パラメータ符号化部112は、符号化パラメータ決定部110から入力された予測パラメータに基づいて、差分ベクトルのようなインター予測パラメータを導出する。インター予測パラメータ符号化部112は、予測画像生成部101に出力する予測画像の生成に必要なパラメータを導出する構成として、インター予測パラメータ復号部303(図5等、参照)がインター予測パラメータを導出する構成と一部同一の構成を含む。インター予測パラメータ符号化部112の構成については、後述する。 The inter prediction parameter coding unit 112 derives inter prediction parameters such as a difference vector based on the prediction parameters input from the coding parameter determination unit 110. The inter prediction parameter coding unit 112 derives the inter prediction parameter by the inter prediction parameter decoding unit 303 (refer to FIG. 5 and the like) as a configuration for deriving the parameters necessary for generating the prediction image to be output to the prediction image generation unit 101. Partially include the same configuration as the configuration. The configuration of the inter prediction parameter coding unit 112 will be described later.
 イントラ予測パラメータ符号化部113は、符号化パラメータ決定部110から入力されたイントラ予測モードIntraPredModeから、符号化するための形式(例えばMPM_idx、rem_intra_luma_pred_mode等)を導出する。 The intra prediction parameter coding unit 113 derives a format (for example, MPM_idx, rem_intra_luma_pred_mode, etc.) for coding from the intra prediction mode IntraPredMode input from the coding parameter determination unit 110.
 (ループフィルタ107)
 ループフィルタ107は、前述した画像復号装置31が備えるループフィルタ305と同様の機能を有する。より具体的には、参照制限ラインを用いた適応フィルタを用いてもよい。また、アクティビティに基づいて画素単位で適応ループフィルタの項を変化させてもよい。
(Loop filter 107)
The loop filter 107 has the same function as the loop filter 305 included in the image decoding device 31 described above. More specifically, an adaptive filter using a reference restriction line may be used. Also, the term of the adaptive loop filter may be changed on a pixel basis based on the activity.
  (第9の実施形態)
 適応フィルタ305_2は、小ブロック(例えば2x2や4x4)単位で、同じ性質を持つクラスに分類し、分類したクラス毎に異なるフィルタ係数を適用してもよい。例えば、クラスを示す識別子classidは小ブロックの方向性DIRとアクティビティACTから以下の式で導出してもよい。
Ninth Embodiment
The adaptive filter 305 _ 2 may classify small classes (eg, 2 × 2 or 4 × 4) into classes having the same property, and apply different filter coefficients to the classified classes. For example, an identifier classid indicating a class may be derived from the directionality DIR of the small block and the activity ACT according to the following equation.
 classid = DIR * N + ACT
 例えば、DIR = 0から4、ACT = 0から4であり、N = max(ACT) +1 = 5とする場合、小ブロックは0~24のクラスに分類される。
classid = DIR * N + ACT
For example, if DIR = 0-4, ACT = 0-4 and N = max (ACT) + 1 = 5, the small blocks are classified into classes 0-24.
 図25は、適応フィルタ305_2で導出したフィルタ係数の値を、クラス単位で可視化した図である。図25は、2値画像でプロットしているので諧調が表現されていないが、実際には滑らかな図となる。各DIR、ACTに対応する25個のクラスについてフィルタ係数の2次元上の値(以下フィルタ係数形状)が表現できる。また、クラスによりどの程度フィルタ係数形状が異なるかを評価することができる。発明者が評価したところ、シーケンスごと、クラスごと、フレームごと、量子化ステップごとに、フィルタ係数形状が大きく異なることが確認できた。 FIG. 25 is a diagram visualizing the values of the filter coefficients derived by the adaptive filter 305_2 in units of classes. Although FIG. 25 is plotted as a binary image, gradation is not represented, but it is actually a smooth figure. Two-dimensional values of filter coefficients (hereinafter, filter coefficient shapes) can be expressed for 25 classes corresponding to each DIR and ACT. In addition, it is possible to evaluate how much the filter coefficient shape differs depending on the class. As a result of the inventor's evaluation, it has been confirmed that the shape of the filter coefficient is greatly different for each sequence, each class, each frame, and each quantization step.
 図26の(a)は、適応フィルタ305_2で導出したフィルタ係数を適用する前後で変化した残差量(残差削減量gain)をクラス単位で示した図である。 (A) of FIG. 26 is a diagram showing the residual amount (residual reduction amount gain) which has changed before and after application of the filter coefficient derived by the adaptive filter 305_2 in units of classes.
 gain[classid] = 適応フィルタをかける前の残差 - 適応フィルタをかけた後の残差
       = Σ|fltin(x,y) - org(x,y)|^2 - Σ|fltout(x,y) - org(x,y)|^2
 ここで、fltin、fltout、orgはそれぞれ、フィルタ前の画素値、フィルタ後の画素値、原画の画素値であり、(x,y)はクラスclassidに属する画素の位置である。この差分gainが大きい場合には、適応フィルタの前後で残差が大きく減少した場合である。各DIR、ACTに対応する25個のクラスclassidについてgain[classid]を計算することにより、どのクラスでの適応フィルタの残差削減量(効果)が大きいかが分かる。
gain [classid] = residual before adaptive filtering-residual after adaptive filtering = || fltin (x, y)-org (x, y) | ^ 2-|| fltout (x, y )-org (x, y) | ^ 2
Here, fltin, fltout, and org are the pixel value before the filter, the pixel value after the filter, and the pixel value of the original image, respectively, and (x, y) are the positions of the pixels belonging to the class classid. When the difference gain is large, the residual largely decreases before and after the adaptive filter. By calculating gain [classid] for 25 classes classid corresponding to each DIR and ACT, it can be known in which class the residual reduction amount (effect) of the adaptive filter is large.
 図26の(b)は、適応フィルタ305_2で分類したクラスの出現頻度frequencyを示すものである。小ブロック単位で、クラス分類した場合の、各クラスに分類された数を総ブロック数で割った値である。以下のように、各位置(x, y)でのclassidをカウントすることで得ることができる。 (B) of FIG. 26 shows the appearance frequency of the class classified by the adaptive filter 305_2. It is a value obtained by dividing the number classified into each class by the total number of blocks when classifying into small blocks. It can be obtained by counting the classid at each position (x, y) as follows.
 count[classid(x, y)] += 1
 発明者の評価によれば、(1)アクティビティACTが中から大のクラスでの残差削減量が大きいこと、(2)QPが増加すると画像がボケるため、ACTが減少すること、も分かる。
count [classid (x, y)] + = 1
According to the inventor's evaluation, it can be understood that (1) the amount of residual reduction in a medium to large class of activity ACT is large, and (2) the image is blurred when QP increases, so that ACT decreases. .
 適応フィルタ305_2は、図25、図26の(a)、(b)に示す、クラス単位のフィルタ係数の評価、クラス単位の残差削減量、およびクラス単位の発生頻度に基づいて、フィルタ係数を設計してもよい。 The adaptive filter 305 _ 2 is a filter coefficient based on the evaluation of the filter coefficient on a class basis, the residual reduction amount on a class basis, and the occurrence frequency on a class basis shown in FIG. 25 and FIGS. You may design.
 例えば、適応フィルタ305_2は、クラス単位の残差削減量が所定の閾値未満となる場合において、当該クラスclassidの適応フィルタ処理をオフとしてもよい。適応フィルタ処理をオフとするか否かは、クラスclassidに適応フィルタをオンオフするかを示すシンタックスalf_class_flag[classidx]を符号化してもよい。また、適応フィルタをオンオフするかを示すシンタックスalf_class_flag[classid]はさらに、画像の領域やブロック単位(例えばCU単位)で符号化してもよい。例えばalf_cu_flag[x][y]がオンオフを示す。 For example, the adaptive filter 305 _ 2 may turn off the adaptive filtering of the class “classid” when the residual reduction amount in units of classes is less than a predetermined threshold. Whether to turn off the adaptive filter processing may encode syntax alf_class_flag [classidx] indicating whether the adaptive filter is turned on or off in the class classid. The syntax alf_class_flag [classid] indicating whether the adaptive filter is turned on or off may be further encoded in an image area or in units of blocks (for example, in units of CUs). For example, alf_cu_flag [x] [y] indicates on / off.
 画像復号装置31は、スライスヘッダから、実クラス数がNumActualClassの場合に、classid=0..NumActualClass-1のalf_class_flag[classid]を復号して以下のようにフィルタ処理を行ってもよい。 When the number of actual classes is NumActualClass, the image decoding apparatus 31 may decode alf_class_flag [classid] of classid = 0..NumActualClass-1 and perform filter processing as follows, when the actual number of classes is NumActualClass.
 ループフィルタ305は、alf_class_flag[classid]が1であれば、対象画素のclassidの示すクラスの画素に、classidが示すフィルタ係数を用いて適応フィルタ処理を行う。それ以外の場合は、適応フィルタ処理を行わない。 If alf_class_flag [classid] is 1, the loop filter 305 performs adaptive filter processing on the pixel of the class indicated by the classid of the target pixel using the filter coefficient indicated by the classid. Otherwise, adaptive filter processing is not performed.
 画像復号装置31は、スライスヘッダから、さらにalf_cu_flag[x][y]を復号して、ループフィルタ305は、対象画素の位置(x, y)のalf_cu_flag[x][y]が1であり、かつ、対象画素の位置(x,y)のclassidについて、alf_class_flag[classid]が1であれば、当該classidの示すフィルタ係数を用いて対象画素に適応フィルタ処理を行う。それ以外の場合は、適応フィルタ処理を行わない。 The image decoding device 31 further decodes alf_cu_flag [x] [y] from the slice header, and the loop filter 305 determines that alf_cu_flag [x] [y] of the position (x, y) of the target pixel is 1. And if alf_class_flag [classid] is 1 for the classid of the position (x, y) of the target pixel, adaptive filter processing is performed on the target pixel using the filter coefficient indicated by the classid. Otherwise, adaptive filter processing is not performed.
 なお、上述した実施形態における画像符号化装置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等の可搬媒体、コンピュータシステムに内蔵されるハードディスク等の記憶装置のことをいう。さらに「コンピュータ読み取り可能な記録媒体」とは、インターネット等のネットワークや電話回線等の通信回線を介してプログラムを送信する場合の通信線のように、短時間、動的にプログラムを保持するもの、その場合のサーバやクライアントとなるコンピュータシステム内部の揮発性メモリのように、一定時間プログラムを保持しているものも含んでも良い。また上記プログラムは、前述した機能の一部を実現するためのものであっても良く、さらに前述した機能をコンピュータシステムにすでに記録されているプログラムとの組み合わせで実現できるものであっても良い。 Note that the image encoding device 11 and a part of the image decoding device 31 in the embodiment described above, for example, the entropy decoding unit 301, the prediction parameter decoding unit 302, the loop filter 305, the prediction 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 coding unit 104, inverse quantization / inverse DCT unit 105, loop filter 107, coding parameter determination unit 110, The prediction parameter coding unit 111 may be realized by a computer. In that case, a program for realizing the control function may be recorded in a computer readable recording medium, and the computer system may read and execute the program recorded in the recording medium. Here, the “computer system” is a computer system built in any of the image encoding device 11 and the image decoding device 31, and includes an OS and hardware such as peripheral devices. The “computer-readable recording medium” means a portable medium such as a flexible disk, a magneto-optical disk, a ROM, a CD-ROM, or a storage device such as a hard disk built in a computer system. Furthermore, the “computer-readable recording medium” is one that holds a program dynamically for a short time, like a communication line in the case of 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 in a computer system serving as a server or a client may be included, which holds a program for a predetermined time. The program may be for realizing a part of the functions described above, or may be realized in combination with the program already recorded in the computer system.
 また、上述した実施形態における画像符号化装置11、画像復号装置31の一部、または全部を、LSI(Large Scale Integration)等の集積回路として実現しても良い。画像符号化装置11、画像復号装置31の各機能ブロックは個別にプロセッサ化しても良いし、一部、または全部を集積してプロセッサ化しても良い。また、集積回路化の手法はLSIに限らず専用回路、または汎用プロセッサで実現しても良い。また、半導体技術の進歩によりLSIに代替する集積回路化の技術が出現した場合、当該技術による集積回路を用いても良い。 In addition, 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 a large scale integration (LSI). Each functional block of the image encoding device 11 and the image decoding device 31 may be individually processorized, or part or all may be integrated and processorized. Further, the method of circuit integration is not limited to LSI's, and implementation using dedicated circuitry or general purpose processors is also possible. In the case where an integrated circuit technology comes out to replace LSI's as a result of the advancement of semiconductor technology, integrated circuits based on such technology may also be used.
 以上、図面を参照してこの発明の一実施形態について詳しく説明してきたが、具体的な構成は上述のものに限られることはなく、この発明の要旨を逸脱しない範囲内において様々な設計変更等をすることが可能である。 As mentioned above, although one embodiment of this invention was described in detail with reference to drawings, a specific structure is not restricted to the above-mentioned thing, Various design changes etc. in the range which does not deviate from the summary of this invention It is possible to
 〔応用例〕
 上述した画像符号化装置11及び画像復号装置31は、動画像の送信、受信、記録、再生を行う各種装置に搭載して利用することができる。なお、動画像は、カメラ等により撮像された自然動画像であってもよいし、コンピュータ等により生成された人工動画像(CGおよびGUIを含む)であってもよい。
[Application example]
The image encoding device 11 and the image decoding device 31 described above can be mounted and used in various devices that transmit, receive, record, and reproduce moving images. The moving image may be a natural moving image captured by a camera or the like, or an artificial moving image (including CG and GUI) generated by a computer or the like.
 まず、上述した画像符号化装置11及び画像復号装置31を、動画像の送信及び受信に利用できることを、図27を参照して説明する。 First, the fact that the image encoding device 11 and the image decoding device 31 described above can be used for transmission and reception of a moving image will be described with reference to FIG.
 図27の(a)は、画像符号化装置11を搭載した送信装置PROD_Aの構成を示したブロック図である。図27の(a)に示すように、送信装置PROD_Aは、動画像を符号化することによって符号化データを得る符号化部PROD_A1と、符号化部PROD_A1が得た符号化データで搬送波を変調することによって変調信号を得る変調部PROD_A2と、変調部PROD_A2が得た変調信号を送信する送信部PROD_A3と、を備えている。上述した画像符号化装置11は、この符号化部PROD_A1として利用される。 (A) of FIG. 27 is a block diagram showing a configuration of a transmission device PROD_A on which the image coding device 11 is mounted. As shown in (a) of FIG. 27, the transmission device PROD_A modulates a carrier wave with the coding unit PROD_A1 for obtaining coded data by coding a moving image, and the coding data obtained by the coding unit PROD_A1. A modulation unit PROD_A2 for obtaining a modulation signal thereby, and a transmission unit PROD_A3 for transmitting the modulation signal obtained by the modulation unit PROD_A2. The image coding apparatus 11 described above is used as the coding unit PROD_A1.
 送信装置PROD_Aは、符号化部PROD_A1に入力する動画像の供給源として、動画像を撮像するカメラPROD_A4、動画像を記録した記録媒体PROD_A5、動画像を外部から入力するための入力端子PROD_A6、及び、画像を生成または加工する画像処理部A7を更に備えていてもよい。図27の(a)においては、これら全てを送信装置PROD_Aが備えた構成を例示しているが、一部を省略しても構わない。 The transmission device PROD_A is a camera PROD_A4 for capturing a moving image, a recording medium PROD_A5 for recording the moving image, an input terminal PROD_A6 for externally inputting the moving image, and a transmission source of the moving image input to the encoding unit PROD_A1. , And may further include an image processing unit A7 that generates or processes an image. In (a) of FIG. 27, although the configuration in which the transmission device PROD_A includes all of these is illustrated, a part of the configuration 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-coded moving image, or a moving image encoded by a recording encoding method different from the transmission encoding method. It may be one. In the latter case, it is preferable to interpose, between the recording medium PROD_A5 and the encoding unit PROD_A1, a decoding unit (not shown) that decodes the encoded data read from the recording medium PROD_A5 according to the encoding scheme for recording.
 図27の(b)は、画像復号装置31を搭載した受信装置PROD_Bの構成を示したブロック図である。図27の(b)に示すように、受信装置PROD_Bは、変調信号を受信する受信部PROD_B1と、受信部PROD_B1が受信した変調信号を復調することによって符号化データを得る復調部PROD_B2と、復調部PROD_B2が得た符号化データを復号することによって動画像を得る復号部PROD_B3と、を備えている。上述した画像復号装置31は、この復号部PROD_B3として利用される。 (B) of FIG. 27 is a block diagram showing a configuration of a reception device PROD_B on which the image decoding device 31 is mounted. As shown in (b) of FIG. 27, the receiver PROD_B demodulates the modulated signal received by the receiver PROD_B1, which receives the modulated signal, and the demodulator PROD_B2, which obtains encoded data by demodulating the modulated signal received by the receiver PROD_B1, and And a decoding unit PROD_B3 for obtaining a moving image by decoding encoded data obtained by the unit PROD_B2. The image decoding device 31 described above is used as the decoding unit PROD_B3.
 受信装置PROD_Bは、復号部PROD_B3が出力する動画像の供給先として、動画像を表示するディスプレイPROD_B4、動画像を記録するための記録媒体PROD_B5、及び、動画像を外部に出力するための出力端子PROD_B6を更に備えていてもよい。図27の(b)においては、これら全てを受信装置PROD_Bが備えた構成を例示しているが、一部を省略しても構わない。 The receiving device PROD_B is a display PROD_B4 for displaying a moving image, a recording medium PROD_B5 for recording the 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. It may further comprise PROD_B6. Although (b) of FIG. 27 illustrates the configuration in which the reception device PROD_B includes all of these, a part may be omitted.
 なお、記録媒体PROD_B5は、符号化されていない動画像を記録するためのものであってもよいし、伝送用の符号化方式とは異なる記録用の符号化方式で符号化されたものであってもよい。後者の場合、復号部PROD_B3と記録媒体PROD_B5との間に、復号部PROD_B3から取得した動画像を記録用の符号化方式に従って符号化する符号化部(不図示)を介在させるとよい。 Incidentally, the recording medium PROD_B5 may be for recording a moving image which has not been encoded, or is encoded by a recording encoding method different from the transmission encoding method. May be In the latter case, an encoding unit (not shown) may be interposed between the decoding unit PROD_B3 and the recording medium PROD_B5 to encode the moving image acquired from the decoding unit PROD_B3 according to the encoding method for recording.
 なお、変調信号を伝送する伝送媒体は、無線であってもよいし、有線であってもよい。また、変調信号を伝送する伝送態様は、放送(ここでは、送信先が予め特定されていない送信態様を指す)であってもよいし、通信(ここでは、送信先が予め特定されている送信態様を指す)であってもよい。すなわち、変調信号の伝送は、無線放送、有線放送、無線通信、及び有線通信の何れによって実現してもよい。 The transmission medium for transmitting the modulation signal may be wireless or wired. Further, the transmission mode for transmitting the modulation signal may be broadcast (here, a transmission mode in which the transmission destination is not specified in advance), or communication (in this case, transmission in which the transmission destination is specified in advance) (Refer to an aspect). That is, transmission of the modulation signal may be realized by any of wireless broadcast, wired broadcast, wireless communication, and wired communication.
 例えば、地上デジタル放送の放送局(放送設備など)/受信局(テレビジョン受像機など)は、変調信号を無線放送で送受信する送信装置PROD_A/受信装置PROD_Bの一例である。また、ケーブルテレビ放送の放送局(放送設備など)/受信局(テレビジョン受像機など)は、変調信号を有線放送で送受信する送信装置PROD_A/受信装置PROD_Bの一例である。 For example, a broadcasting station (broadcasting facility etc.) / Receiving station (television receiver etc.) of terrestrial digital broadcasting is an example of a transmitting device PROD_A / receiving device PROD_B which transmits and receives a modulated signal by wireless broadcasting. A cable television broadcast station (broadcasting facility or the like) / receiving station (television receiver or the like) is an example of a transmitting device PROD_A / receiving device PROD_B which 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 (such as a workstation) / client (television receiver, personal computer, smart phone, etc.) such as a VOD (Video On Demand) service or a video sharing service using the Internet is a transmitting device that transmits and receives modulated signals by communication. This is an example of PROD_A / receiving device PROD_B (Normally, in a LAN, either wireless or wired is used as a transmission medium, and in WAN, wired is used as a transmission medium). Here, the personal computer includes a desktop PC, a laptop PC, and a tablet PC. The smartphone also includes a multifunctional 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 client of the moving image sharing service has a function of encoding a moving image captured by a camera and uploading it to the server. That is, the client of the moving image sharing service functions as both the transmitting device PROD_A and the receiving device PROD_B.
 次に、上述した画像符号化装置11及び画像復号装置31を、動画像の記録及び再生に利用できることを、図28を参照して説明する。 Next, the fact that the image encoding device 11 and the image decoding device 31 described above can be used for recording and reproduction of a moving image will be described with reference to FIG.
 図28の(a)は、上述した画像符号化装置11を搭載した記録装置PROD_Cの構成を示したブロック図である。図28の(a)に示すように、記録装置PROD_Cは、動画像を符号化することによって符号化データを得る符号化部PROD_C1と、符号化部PROD_C1が得た符号化データを記録媒体PROD_Mに書き込む書込部PROD_C2と、を備えている。上述した画像符号化装置11は、この符号化部PROD_C1として利用される。 (A) of FIG. 28 is a block diagram showing a configuration of a recording device PROD_C on which the image coding device 11 described above is mounted. As shown in (a) of FIG. 28, the recording device PROD_C uses the encoding unit PROD_C1, which obtains encoded data by encoding a moving image, and the encoded data obtained by the encoding unit PROD_C1, to the recording medium PROD_M. And a writing unit PROD_C2 for writing. The image coding device 11 described above is used as the coding 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 (1) a type incorporated in the recording device PROD_C, such as a hard disk drive (HDD) or a solid state drive (SSD), or (2) an SD memory. It may be of a type connected to the recording device PROD_C, such as a card or a Universal Serial Bus (USB) flash memory, or (3) a DVD (Digital Versatile Disc) or a BD (Blu-ray Disc: Registration It may be loaded into a drive device (not shown) built in the recording device PROD_C, such as a trademark).
 また、記録装置PROD_Cは、符号化部PROD_C1に入力する動画像の供給源として、動画像を撮像するカメラPROD_C3、動画像を外部から入力するための入力端子PROD_C4、動画像を受信するための受信部PROD_C5、及び、画像を生成または加工する画像処理部PROD_C6を更に備えていてもよい。図28の(a)においては、これら全てを記録装置PROD_Cが備えた構成を例示しているが、一部を省略しても構わない。 In addition, the recording device PROD_C is a camera PROD_C3 for capturing a moving image as a supply source of the moving image input to the encoding unit PROD_C1, an input terminal PROD_C4 for inputting the moving image from the outside, and a reception for receiving the moving image The image processing unit PROD_C5 may further include an image processing unit PROD_C6 that generates or processes an image. Although (a) of FIG. 28 exemplifies a configuration in which the recording apparatus PROD_C includes all of these, a part may be omitted.
 なお、受信部PROD_C5は、符号化されていない動画像を受信するものであってもよいし、記録用の符号化方式とは異なる伝送用の符号化方式で符号化された符号化データを受信するものであってもよい。後者の場合、受信部PROD_C5と符号化部PROD_C1との間に、伝送用の符号化方式で符号化された符号化データを復号する伝送用復号部(不図示)を介在させるとよい。 Note that the receiving unit PROD_C5 may receive an uncoded moving image, and receives encoded data encoded by a transmission encoding scheme different from the recording encoding scheme. It may be In the latter case, it is preferable to interpose a transmission decoding unit (not shown) that decodes encoded data encoded by the transmission encoding scheme 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, etc. (In this case, the input terminal PROD_C4 or the receiving unit PROD_C5 is a main supply source of moving images). . In addition, a camcorder (in this case, the camera PROD_C3 is the main supply source of moving images), a personal computer (in this case, the receiving unit PROD_C5 or the image processing unit C6 is the main supply source of moving images), a smartphone (this In this case, the camera PROD_C3 or the receiving unit PROD_C5 is a main supply source of moving images) and the like are also examples of such a recording device PROD_C.
 図28の(b)は、上述した画像復号装置31を搭載した再生装置PROD_Dの構成を示したブロックである。図28の(b)に示すように、再生装置PROD_Dは、記録媒体PROD_Mに書き込まれた符号化データを読み出す読出部PROD_D1と、読出部PROD_D1が読み出した符号化データを復号することによって動画像を得る復号部PROD_D2と、を備えている。上述した画像復号装置31は、この復号部PROD_D2として利用される。 (B) of FIG. 28 is a block showing the configuration of the playback device PROD_D on which the image decoding device 31 described above is mounted. As shown in (b) of FIG. 28, the playback device PROD_D decodes the moving image by decoding the encoded data read by the reading unit PROD_D1 that reads the encoded data written to the recording medium PROD_M and the reading unit PROD_D1. And a decryption unit PROD_D2 to be obtained. The image decoding device 31 described above 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 (1) a type incorporated in the playback device PROD_D such as an HDD or an SSD, or (2) such as an SD memory card or a USB flash memory. It may be of a type connected to the playback device PROD_D, or (3) it may be loaded into a drive device (not shown) built in the playback device PROD_D, such as DVD or BD. Good.
 また、再生装置PROD_Dは、復号部PROD_D2が出力する動画像の供給先として、動画像を表示するディスプレイPROD_D3、動画像を外部に出力するための出力端子PROD_D4、及び、動画像を送信する送信部PROD_D5を更に備えていてもよい。図28の(b)においては、これら全てを再生装置PROD_Dが備えた構成を例示しているが、一部を省略しても構わない。 In addition, the playback device PROD_D is a display 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. It may further comprise PROD_D5. Although (b) of FIG. 28 exemplifies a configuration in which the playback device PROD_D includes all of these, a part may be omitted.
 なお、送信部PROD_D5は、符号化されていない動画像を送信するものであってもよいし、記録用の符号化方式とは異なる伝送用の符号化方式で符号化された符号化データを送信するものであってもよい。後者の場合、復号部PROD_D2と送信部PROD_D5との間に、動画像を伝送用の符号化方式で符号化する符号化部(不図示)を介在させるとよい。 The transmission unit PROD_D5 may transmit a non-encoded moving image, or transmit encoded data encoded by a transmission encoding method different from the recording encoding method. It may be In the latter case, an encoding unit (not shown) may be interposed between the decoding unit PROD_D2 and the transmission unit PROD_D5 for encoding moving pictures according to a transmission encoding scheme.
 このような再生装置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の一例である。 As such a playback device PROD_D, for example, a DVD player, a BD player, an HDD player, etc. may be mentioned (in this case, the output terminal PROD_D4 to which a television receiver etc. is connected is the main supply destination of moving images) . In addition, television receivers (in this case, the display PROD_D3 is the main supply destination of moving images), digital signage (also referred to as an electronic signboard or electronic bulletin board, etc.), the display PROD_D3 or the transmission unit PROD_D5 is the main supply of moving images. First, desktop type PC (in this case, output terminal PROD_D4 or transmission unit PROD_D5 is the main supply destination of moving images), laptop type or tablet type PC (in this case, display PROD_D3 or transmission unit PROD_D5 is moving image) The main supply destination of the image), the smartphone (in this case, the display PROD_D3 or the transmission unit PROD_D5 is the main supply destination of the moving image), and the like are also examples of such a reproduction device PROD_D.
  (ハードウェア的実現およびソフトウェア的実現)
 また、上述した画像復号装置31および画像符号化装置11の各ブロックは、集積回路(ICチップ)上に形成された論理回路によってハードウェア的に実現してもよいし、CPU(Central Processing Unit)を用いてソフトウェア的に実現してもよい。
(Hardware realization and software realization)
In addition, each block of the image decoding device 31 and the image encoding device 11 described above may be realized as hardware by a logic circuit formed on an integrated circuit (IC chip), or a CPU (Central Processing Unit) It may be realized as software using
 後者の場合、上記各装置は、各機能を実現するプログラムの命令を実行するCPU、上記プログラムを格納したROM(Read Only Memory)、上記プログラムを展開するRAM(Random Access Memory)、上記プログラムおよび各種データを格納するメモリ等の記憶装置(記録媒体)などを備えている。そして、本発明の実施形態の目的は、上述した機能を実現するソフトウェアである上記各装置の制御プログラムのプログラムコード(実行形式プログラム、中間コードプログラム、ソースプログラム)をコンピュータで読み取り可能に記録した記録媒体を、上記各装置に供給し、そのコンピュータ(またはCPUやMPU)が記録媒体に記録されているプログラムコードを読み出し実行することによっても、達成可能である。 In the latter case, each of the devices described above includes a CPU that executes instructions of a program that implements each function, a ROM (Read Only Memory) that stores the program, a RAM (Random Access Memory) that expands the program, the program, and various other methods. A storage device (recording medium) such as a memory for storing data is provided. The object of the embodiment of the present invention is to record computer program readable program codes (execution format program, intermediate code program, source program) of control programs of the above-mentioned respective devices which are software for realizing the functions described above. The present invention can also be achieved by supplying a medium to each of the above-described devices, and a computer (or a CPU or an MPU) reading and executing a program code recorded on a recording medium.
 上記記録媒体としては、例えば、磁気テープやカセットテープ等のテープ類、フロッピー(登録商標)ディスク/ハードディスク等の磁気ディスクや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, CDs (Compact Disc Read-Only Memory) / MO disks (Magneto-Optical disc). ) Disks including optical disks such as MD (Mini Disc) / DVD (Digital Versatile Disc) / CD-R (CD Recordable) / Blu-ray Disc (registered trademark), IC cards (including memory cards) Cards such as optical cards, mask ROMs / erasable programmable read-only memories (EPROMs) / electrically erasable and programmable read-only memories (EEPROMs) / semiconductor memories such as flash ROMs, or programmable logic devices (PLDs) And logic circuits such as FPGA (Field Programmable Gate Array) can be used.
 また、上記各装置を通信ネットワークと接続可能に構成し、上記プログラムコードを通信ネットワークを介して供給してもよい。この通信ネットワークは、プログラムコードを伝送可能であればよく、特に限定されない。例えば、インターネット、イントラネット、エキストラネット、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 device may be configured to be connectable to a communication network, and the program code may be supplied via the communication network. This communication network is not particularly limited as long as the program code can be transmitted. For example, the Internet, intranet, extranet, LAN (Local Area Network), ISDN (Integrated Services Digital Network), VAN (Value-Added Network), CATV (Community Antenna television / Cable Television) communication network, virtual private network (Virtual Private) Network), telephone network, mobile communication network, satellite communication network, etc. can be used. Also, the transmission medium that constitutes this communication network may be any medium that can transmit the program code, and is not limited to a specific configuration or type. For example, even if wired such as IEEE (Institute of Electrical and Electronic Engineers) 1394, USB, power line carrier, cable TV line, telephone line, ADSL (Asymmetric Digital Subscriber Line) line, infrared rays such as IrDA (Infrared Data Association) or remote control , BlueTooth (registered trademark), IEEE 802.11 wireless, HDR (High Data Rate), NFC (Near Field Communication), DLNA (Digital Living Network Alliance (registered trademark), mobile phone network, satellite link, terrestrial digital broadcast network, etc. It can also be used wirelessly. The embodiment of the present invention may 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 not limited to the above-described embodiments, and various modifications are possible within the scope of the claims. That is, an embodiment obtained by combining technical means appropriately modified within the scope of the claims is also included in the technical scope of the present invention.
 〔まとめ〕
 本発明の態様1に係る画像フィルタ装置(ループフィルタ107,305)は、複数の基本単位領域から構成される入力画像に作用することによって出力画像を生成する画像フィルタ装置であって、上記基本単位領域の境界を含むブロック境界に作用する境界フィルタ部(デブロッキングフィルタ305_1)と、適応フィルタ部(適応フィルタ305_2)とを備え、上記境界フィルタ部は、スライス境界もしくはタイル境界の境界フィルタのオンオフが可能であって、上記適応フィルタ部は、上記境界フィルタ部によるフィルタ処理がスライス境界もしくはタイル境界においてオンであるかオフであるかに応じて位置の異なる仮想的境界を設定し、当該仮想的境界内に位置する画素値を参照してフィルタ処理を行う。
[Summary]
An image filter device (loop filter 107, 305) according to aspect 1 of the present invention is an image filter device that generates an output image by acting on an input image composed of a plurality of basic unit areas, and the basic unit A boundary filter unit (deblocking filter 305_1) acting on a block boundary including a boundary of a region and an adaptive filter unit (adaptive filter 305_2) are provided, and the boundary filter unit turns on / off the boundary filter of slice boundaries or tile boundaries. The adaptive filter unit sets virtual boundaries different in position depending on whether the filtering process by the boundary filter unit is on or off at a slice boundary or a tile boundary, and the virtual boundary The filter processing is performed with reference to the pixel value located inside.
 上記の構成によれば、適応フィルタ部は、境界フィルタ部によるフィルタ処理がスライス境界もしくはタイル境界においてオンであるかオフであるかに応じて位置の異なる仮想的境界を設定するので、仮想的境界内に位置する画素値を参照でき、効率よくフィルタ処理をすることができる。 According to the above configuration, the adaptive filter unit sets virtual boundaries different in position depending on whether the filtering process by the boundary filter unit is on or off at the slice boundary or tile boundary, so that the virtual boundary The pixel values located inside can be referred to, and filtering can be performed efficiently.
 本発明の態様2に係る画像フィルタ装置(ループフィルタ107,305)は、上記態様1において、上記境界フィルタ部は、上記仮想的境界外の画素の画素値を参照する場合、当該画素値を、当該仮想的境界内の画素であって、上記仮想的境界に隣接する画素の画素値で置き換えてもよい。 In the image filter device (loop filter 107, 305) according to aspect 2 of the present invention, in the above aspect 1, when the boundary filter unit refers to the pixel value of the pixel outside the virtual boundary, the pixel value is The pixel value of the pixel within the virtual boundary and adjacent to the virtual boundary may be replaced.
 上記の構成によれば、より類似する画素値に置き換えることができる。 According to the above configuration, more similar pixel values can be substituted.
 本発明の態様3に係る画像フィルタ装置(ループフィルタ107,305)は、上記態様1において、上記境界フィルタ部は、上記仮想的境界外の画素の画素値を参照する場合、当該画素値を、当該仮想的境界内の画素であって、フィルタ参照領域の中心画素の画素値で置き換えてもよい。 In the image filter device (loop filter 107, 305) according to aspect 3 of the present invention, in the above aspect 1, when the boundary filter unit refers to the pixel value of the pixel outside the virtual boundary, the pixel value is It may be replaced with the pixel value of the central pixel of the filter reference area that is the pixel within the virtual boundary.
 上記の構成によれば、フィルタ参照領域内の平均的な画素値に置き換えることができる。 According to the above configuration, the average pixel value in the filter reference area can be replaced.
 本発明の態様4に係る画像フィルタ装置(ループフィルタ305a)は、入力画像に作用することによって出力画像を生成するフィルタ部(フィルタ処理部305a_2c)を備え、上記フィルタ部によるフィルタ処理には、上記入力画像における対象画素、上記対象画素の周囲の画素、及び、上記周囲の画素の少なくとも一部を参照することによって算出されたアクティビティのそれぞれに対して重み係数を乗算する処理が含まれてもよい。 An image filter device (loop filter 305a) according to aspect 4 of the present invention includes a filter unit (filter processing units 305a_2c) that generates an output image by acting on an input image, and the filter processing by the filter unit A process of multiplying each of the target pixel in the input image, the pixels around the target pixel, and the activity calculated by referring to at least a part of the peripheral pixels may be included by multiplying the weighting factor .
 上記の構成によれば、周囲の画素の少なくとも一部を参照することによって算出されたアクティビティを参照するので、入力画像データに対し、画像特性により応じたフィルタを適用することができる。 According to the above configuration, since the activity calculated by referring to at least a part of the surrounding pixels is referred to, a filter according to the image characteristic can be applied to the input image data.
 本発明の態様5に係る画像フィルタ装置(ループフィルタ305a)は、上記態様4において、上記アクティビティを算出するために参照される画素には、水平方向、垂直方向、及び斜め方向に並んだ画素が含まれてもい。 In the image filter device (loop filter 305 a) according to aspect 5 of the present invention, in the above aspect 4, pixels to which reference is made to calculate the activity include pixels lined in the horizontal direction, vertical direction, and diagonal direction. May be included.
 上記の構成によれば、対象画素に応じた周囲の画素を参照することができる。 According to the above configuration, it is possible to refer to surrounding pixels corresponding to the target pixel.
 本発明の態様6に係る画像フィルタ装置(ループフィルタ305a)は、上記態様4又は5において、上記フィルタ処理には、上記重み係数を乗算して得られた各項の和を取る処理、及び、上記和を取って得られた結果を右ビットシフトする処理が含まれてもよい。 In the image filter device (loop filter 305a) according to aspect 6 of the present invention, in the above aspect 4 or 5, processing for taking the sum of each term obtained by multiplying the weighting coefficient in the above-mentioned filter processing; A process of right bit shifting the result obtained by taking the above sum may be included.
 〔関連出願の相互参照〕
 本出願は、2017年12月26日に出願された日本国特許出願:特願2017-250223に対して優先権の利益を主張するものであり、それを参照することにより、その内容の全てが本書に含まれる。
[Cross-reference to related applications]
This application claims the benefit of priority to Japanese Patent Application filed on Dec. 26, 2017: Japanese Patent Application No. 2017-250223, the entire contents of which are hereby incorporated by reference. Included in this book.
 本発明の実施形態は、画像データが符号化された符号化データを復号する画像復号装置、および、画像データが符号化された符号化データを生成する画像符号化装置に好適に適用することができる。また、画像符号化装置によって生成され、画像復号装置によって参照される符号化データのデータ構造に好適に適用することができる。 An embodiment of the present invention is suitably applied to an image decoding apparatus that decodes encoded data obtained by encoding image data, and an image encoding apparatus that generates encoded data obtained by encoding image data. it can. Further, the present invention can be suitably applied to the data structure of encoded data generated by the image encoding device and referenced by the image decoding device.
11 画像符号化装置
31 画像復号装置
107,305,305a ループフィルタ(画像フィルタ装置)
305_1 デブロッキングフィルタ(境界フィルタ部)
305_2 適応フィルタ(適応フィルタ部)
305a_2c フィルタ処理部(フィルタ部)
11 Image Coding Device 31 Image Decoding Device 107, 305, 305a Loop Filter (Image Filter Device)
305_1 Deblocking filter (boundary filter part)
305_2 Adaptive filter (Adaptive filter section)
305a_2c Filter processing unit (filter unit)

Claims (8)

  1.  複数の基本単位領域から構成される入力画像に作用することによって出力画像を生成する画像フィルタ装置であって、
     上記基本単位領域の境界を含むブロック境界に作用する境界フィルタ部と、
     適応フィルタ部とを備え、
     上記境界フィルタ部は、スライス境界もしくはタイル境界の境界フィルタのオンオフが可能であって、
     上記適応フィルタ部は、
      上記境界フィルタ部によるフィルタ処理がスライス境界もしくはタイル境界においてオンであるかオフであるかに応じて位置の異なる仮想的境界を設定し、
      当該仮想的境界内に位置する画素値を参照してフィルタ処理を行う
    ことを特徴とする画像フィルタ装置。
    An image filter apparatus that generates an output image by acting on an input image composed of a plurality of basic unit areas, comprising:
    A boundary filter unit acting on a block boundary including the boundary of the basic unit region;
    And an adaptive filter unit,
    The boundary filter unit is capable of turning on or off a boundary filter of slice boundaries or tile boundaries, and
    The above adaptive filter unit
    Setting virtual boundaries different in position depending on whether the filtering process by the boundary filter unit is on or off at slice boundaries or tile boundaries;
    An image filter apparatus that performs filter processing with reference to pixel values located within the virtual boundary.
  2.  上記境界フィルタ部は、
      上記仮想的境界外の画素の画素値を参照する場合、当該画素値を、当該仮想的境界内の画素であって、上記仮想的境界に隣接する画素の画素値で置き換える
    ことを特徴とする請求項1に記載の画像フィルタ装置。
    The boundary filter unit is
    When referring to the pixel value of a pixel outside the virtual boundary, the pixel value is replaced with the pixel value of a pixel within the virtual boundary that is adjacent to the virtual boundary. The image filter apparatus of claim 1.
  3.  上記境界フィルタ部は、
      上記仮想的境界外の画素の画素値を参照する場合、当該画素値を、当該仮想的境界内の画素であって、フィルタ参照領域の中心画素の画素値で置き換える
    ことを特徴とする請求項1に記載の画像フィルタ装置。
    The boundary filter unit is
    When referring to the pixel value of the pixel outside the virtual boundary, the pixel value is replaced with the pixel value of the central pixel of the filter reference area that is the pixel within the virtual boundary. Image filter device according to claim 1.
  4.  入力画像に作用することによって出力画像を生成するフィルタ部を備え、
     上記フィルタ部によるフィルタ処理には、
      上記入力画像における対象画素、
      上記対象画素の周囲の画素、及び、
      上記周囲の画素の少なくとも一部を参照することによって算出されたアクティビティのそれぞれに対して重み係数を乗算する処理が含まれる
    ことを特徴とする画像フィルタ装置。
    A filter unit that generates an output image by acting on the input image;
    For filter processing by the above filter unit,
    Target pixel in the input image,
    Pixels around the target pixel, and
    An image filter apparatus comprising: a process of multiplying each of activities calculated by referring to at least a part of the surrounding pixels by a weighting factor.
  5.  上記アクティビティを算出するために参照される画素には、水平方向、垂直方向、及び斜め方向に並んだ画素が含まれる
    ことを特徴とする請求項4に記載の画像フィルタ装置。
    5. The image filter device according to claim 4, wherein the pixels referred to for calculating the activity include pixels arranged in the horizontal direction, the vertical direction, and the diagonal direction.
  6.  上記フィルタ処理には、
      上記重み係数を乗算して得られた各項の和を取る処理、及び、
      上記和を取って得られた結果を右ビットシフトする処理が含まれる
    ことを特徴とする請求項4又は5に記載の画像フィルタ装置。
    The above filter process
    A process of taking the sum of each term obtained by multiplying the weighting factor, and
    The image filter apparatus according to claim 4 or 5, further comprising a process of right bit shifting the result obtained by taking the sum.
  7.  画像を復号する画像復号装置であって、復号画像に作用させるフィルタとして請求項1から6の何れか1項に記載の画像フィルタ装置を備えた画像復号装置。 The image decoding apparatus which decodes an image, Comprising: The image decoding apparatus provided with the image filter apparatus in any one of Claims 1-6 as a filter made to act on a decoded image.
  8.  画像を符号化する画像符号化装置であって、局所復号画像に作用させるフィルタとして請求項1から6の何れか1項に記載の画像フィルタ装置を備えた画像符号化装置。 An image coding apparatus for coding an image, comprising: the image filter apparatus according to any one of claims 1 to 6 as a filter for acting on a locally decoded image.
PCT/JP2018/046859 2017-12-26 2018-12-19 Image filter device, image decoding device, and image encoding device WO2019131400A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2017250223 2017-12-26
JP2017-250223 2017-12-26

Publications (1)

Publication Number Publication Date
WO2019131400A1 true WO2019131400A1 (en) 2019-07-04

Family

ID=67063074

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2018/046859 WO2019131400A1 (en) 2017-12-26 2018-12-19 Image filter device, image decoding device, and image encoding device

Country Status (1)

Country Link
WO (1) WO2019131400A1 (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021008539A1 (en) * 2019-07-15 2021-01-21 Beijing Bytedance Network Technology Co., Ltd. Classification in adaptive loop filtering
WO2021133236A1 (en) * 2019-12-24 2021-07-01 Telefonaktiebolaget Lm Ericsson (Publ) Virtual boundary processing for adaptive loop filtering
WO2021157536A1 (en) * 2020-02-06 2021-08-12 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ Encoding device, decoding device, encoding method, and decoding method
CN114946191A (en) * 2019-11-18 2022-08-26 Lg电子株式会社 Image encoding apparatus and method based on signaling of information for filtering
US11490082B2 (en) 2019-06-14 2022-11-01 Beijing Bytedance Network Technology Co., Ltd. Handling video unit boundaries and virtual boundaries based on color format
US11553179B2 (en) 2019-07-09 2023-01-10 Beijing Bytedance Network Technology Co., Ltd. Sample determination for adaptive loop filtering
US11589042B2 (en) 2019-07-11 2023-02-21 Beijing Bytedance Network Technology Co., Ltd. Sample padding in adaptive loop filtering
US11652998B2 (en) 2019-09-22 2023-05-16 Beijing Bytedance Network Technology Co., Ltd. Padding process in adaptive loop filtering
US11683488B2 (en) 2019-09-27 2023-06-20 Beijing Bytedance Network Technology Co., Ltd. Adaptive loop filtering between different video units
US11706462B2 (en) 2019-10-10 2023-07-18 Beijing Bytedance Network Technology Co., Ltd Padding process at unavailable sample locations in adaptive loop filtering
US12003712B2 (en) 2019-06-14 2024-06-04 Beijing Bytedance Network Technology Co., Ltd Handling video unit boundaries and virtual boundaries

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013118605A (en) * 2011-06-28 2013-06-13 Sony Corp Image processing device and image processing method
JP2014517555A (en) * 2011-05-10 2014-07-17 メディアテック インコーポレイテッド Method and apparatus for reducing in-loop filter buffer
JP2014533008A (en) * 2011-10-21 2014-12-08 クゥアルコム・インコーポレイテッドQualcomm Incorporated Loop filtering around slice or tile boundaries in video coding
US20150156490A1 (en) * 2012-04-11 2015-06-04 Texas Instruments Incorporated Virtual boundary processing simplification for adaptive loop filtering (alf) in video coding

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014517555A (en) * 2011-05-10 2014-07-17 メディアテック インコーポレイテッド Method and apparatus for reducing in-loop filter buffer
JP2013118605A (en) * 2011-06-28 2013-06-13 Sony Corp Image processing device and image processing method
JP2014533008A (en) * 2011-10-21 2014-12-08 クゥアルコム・インコーポレイテッドQualcomm Incorporated Loop filtering around slice or tile boundaries in video coding
US20150156490A1 (en) * 2012-04-11 2015-06-04 Texas Instruments Incorporated Virtual boundary processing simplification for adaptive loop filtering (alf) in video coding

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
CHING-YEH CHEN ET AL.: "Adaptive Loop Filter with Zero Pixel Line Buffers for LCU-based Decoding,", JOINT COLLABORATIVE TEAM ON VIDEO CODING(JCT-VC) OF ITU-T SG 16 WP3 AND ISO/IEC JTC1/SC29/WG11 6TH MEETING:TORINO, IT , 14- 22 JULY, 2011, no. JCTVC-F054, 1 July 2011 (2011-07-01) - 22 July 2011 (2011-07-22), Meeting:Torino, IT, pages 1 - 11, XP030009077 *
CHING-YEH CHEN ET AL.: "Non-CE8:c. 7:Single-source SAO and ALF virtual boundary processing with cross9X9", JOINT COLLABORATIVE TEAM ON VIDEO CODING(JCT-VC) OF ITU-T SG 16 WP3 AND ISO/IEC JTC1/SC29/WG11 7TH MEETING : GENEVA , CH ,21- 30 NOVEMBER,2011, 13 November 2011 (2011-11-13) - 30 November 2011 (2011-11-30), pages 1 - 25, XP030110196 *
OHJI NAKAGAMI ET AL.: "Non-CE8:Report on visual artifacts by ALF virtual boundary processing and proposal on the filtering process modification, Joint Collaborative Team on Video Coding (JCT-VC) of ITU-T SG 16 WP3 and ISO/IEC JTC1/SC29/WG11 8th", 99. MPEG MEETING; 6-2-2012 - 10-2-2012; SAN JOSÉ; (MOTION PICTURE EXPERT GROUP OR ISO/IEC JTC1/SC29/WG11), 1 February 2012 (2012-02-01) - 4 February 2012 (2012-02-04), San Jose, CA , USA, pages 1 - 13, XP030051533 *
SEMIH ESENLIK ET AL.: "Non-CE8:Line memory reduction fix at independent slice and tile boundaries", ITU-T SG 16 WP3 AND ISO/IEC JTC1/SC29/WG11 8TH MEETING:SAN JOSE , CA , USA , 1- 10 FEBRUARY, 2012, no. JCTVC-H0372, 1 February 2012 (2012-02-01) - 10 February 2012 (2012-02-10), CA , USA, XP030111399 *

Cited By (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11490082B2 (en) 2019-06-14 2022-11-01 Beijing Bytedance Network Technology Co., Ltd. Handling video unit boundaries and virtual boundaries based on color format
US12003712B2 (en) 2019-06-14 2024-06-04 Beijing Bytedance Network Technology Co., Ltd Handling video unit boundaries and virtual boundaries
US11831869B2 (en) 2019-07-09 2023-11-28 Beijing Bytedance Network Technology Co., Ltd. Sample determination for adaptive loop filtering
US11553179B2 (en) 2019-07-09 2023-01-10 Beijing Bytedance Network Technology Co., Ltd. Sample determination for adaptive loop filtering
US11589042B2 (en) 2019-07-11 2023-02-21 Beijing Bytedance Network Technology Co., Ltd. Sample padding in adaptive loop filtering
CN114175637A (en) * 2019-07-15 2022-03-11 北京字节跳动网络技术有限公司 Classification in adaptive loop filtering
WO2021008539A1 (en) * 2019-07-15 2021-01-21 Beijing Bytedance Network Technology Co., Ltd. Classification in adaptive loop filtering
CN114175637B (en) * 2019-07-15 2024-04-12 北京字节跳动网络技术有限公司 Classification in adaptive loop filtering
US11700368B2 (en) 2019-07-15 2023-07-11 Beijing Bytedance Network Technology Co., Ltd. Classification in adaptive loop filtering
US11652998B2 (en) 2019-09-22 2023-05-16 Beijing Bytedance Network Technology Co., Ltd. Padding process in adaptive loop filtering
US11671594B2 (en) 2019-09-22 2023-06-06 Beijing Bytedance Network Technology Co., Ltd. Selective application of sample padding in adaptive loop filtering
US11683488B2 (en) 2019-09-27 2023-06-20 Beijing Bytedance Network Technology Co., Ltd. Adaptive loop filtering between different video units
US11706462B2 (en) 2019-10-10 2023-07-18 Beijing Bytedance Network Technology Co., Ltd Padding process at unavailable sample locations in adaptive loop filtering
CN114946191A (en) * 2019-11-18 2022-08-26 Lg电子株式会社 Image encoding apparatus and method based on signaling of information for filtering
US11317095B2 (en) 2019-12-24 2022-04-26 Telefonaktiebolaget Lm Ericsson (Publ) Virtual boundary processing for adaptive loop filtering
US11689725B2 (en) 2019-12-24 2023-06-27 Telefonaktieblaget Lm Ericsson (Publ) Virtual boundary processing for adaptive loop filtering
WO2021133236A1 (en) * 2019-12-24 2021-07-01 Telefonaktiebolaget Lm Ericsson (Publ) Virtual boundary processing for adaptive loop filtering
WO2021157536A1 (en) * 2020-02-06 2021-08-12 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカ Encoding device, decoding device, encoding method, and decoding method

Similar Documents

Publication Publication Date Title
US11503319B2 (en) Image coding apparatus and image decoding apparatus
JP7223886B2 (en) Image decoding method
WO2019131400A1 (en) Image filter device, image decoding device, and image encoding device
JP7260472B2 (en) image filter device
US11234011B2 (en) Image decoding apparatus and image coding apparatus
JP7199221B2 (en) Encoding device, decoding device, encoding method and decoding method
JP2024054401A (en) Image encoding device, image decoding device, and bitstream generating device
WO2019054300A1 (en) Image encoding device and image decoding device
WO2020184487A1 (en) Dynamic image decoding device
KR20190031250A (en) Coding device, decoding device, coding method and decoding method
KR20190137806A (en) Coding device, decoding device, coding method and decoding method
JP7139144B2 (en) image filter device
TWI812376B (en) Encoding device and decoding device
WO2020137920A1 (en) Prediction image generating device, moving image decoding device, moving image encoding device, and prediction image generating method
WO2018105582A1 (en) Encoding device, decoding device, encoding method, and decoding method
JP7161636B2 (en) Encoding device and encoding method
JP7495568B2 (en) Encoding device and decoding device
JP2022140583A (en) Decoding method and encoding method
JP7149995B2 (en) Decoding device and decoding method
JP2020120141A (en) Dynamic image encoding device, dynamic image decoding device, and filter device
JP7503607B2 (en) Encoding and Decoding Methods
KR20220106771A (en) Encoding apparatus, decoding apparatus, encoding method, and decoding method
JP2023029589A (en) Encoding device and decoding device
KR20200015518A (en) Encoding device, decoding device, encoding method and decoding method
JP2024063232A (en) Encoding device and encoding method

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: 18894672

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: 18894672

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: JP