[go: up one dir, main page]

WO2019142764A1 - Moving-image coding device, moving-image decoding device, and moving-image filter device - Google Patents

Moving-image coding device, moving-image decoding device, and moving-image filter device Download PDF

Info

Publication number
WO2019142764A1
WO2019142764A1 PCT/JP2019/000867 JP2019000867W WO2019142764A1 WO 2019142764 A1 WO2019142764 A1 WO 2019142764A1 JP 2019000867 W JP2019000867 W JP 2019000867W WO 2019142764 A1 WO2019142764 A1 WO 2019142764A1
Authority
WO
WIPO (PCT)
Prior art keywords
offset
target
pixel
sao
image
Prior art date
Legal status (The legal status 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 status listed.)
Ceased
Application number
PCT/JP2019/000867
Other languages
French (fr)
Japanese (ja)
Inventor
友子 青野
知宏 猪飼
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sharp Corp
Original Assignee
Sharp Corp
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 Sharp Corp filed Critical Sharp Corp
Publication of WO2019142764A1 publication Critical patent/WO2019142764A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

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/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/117Filters, e.g. for pre-processing or post-processing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/136Incoming video signal characteristics or properties
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • 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/85Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression
    • H04N19/86Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression involving reduction of coding artifacts, e.g. of blockiness

Definitions

  • One aspect of the present invention relates to a video decoding device, a video encoding device, and a video filter device.
  • a moving picture coding apparatus image coding apparatus
  • decoding the coded stream A moving image decoding apparatus (image decoding apparatus) that generates a decoded image is used.
  • a filter device for enhancing the image quality of the moving picture is mounted in the moving picture coding apparatus and the moving picture decoding apparatus.
  • a method adopted or proposed in H.264 / AVC or High-Efficiency Video Coding (HEVC) may be mentioned.
  • an image (picture) constituting a moving picture is a slice obtained by dividing the image, a coding tree unit obtained by dividing the slice (CTU: Coding Tree Unit)
  • CU Coding Unit, sometimes referred to as a coding unit
  • a prediction unit (block) obtained by dividing a coding unit It is managed by the hierarchical structure which consists of PU: Prediction Unit (TU) and transform unit (TU: Transform Unit), and is encoded / decoded per CU (nonpatent literature 1).
  • 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).
  • a prediction residual signal (sometimes referred to as a “residual signal”) obtained by subtraction is encoded (Non-Patent Document 1).
  • Non-Patent Document 1 discloses a deblocking filter that performs smoothing processing on adjacent pixels through block boundaries of an image to remove block distortion. Furthermore, an adaptive offset filter (SAO: Sample Adaptive Offset) is also disclosed, which is performed after the deblocking filter and adds an offset according to pixel classification for each pixel.
  • SAO Sample Adaptive Offset
  • Non-Patent Document 1 SAO is performed after the deblocking filter.
  • the deblocking filter performs the filtering process on two blocks across block boundaries. Therefore, at the CTU boundary, deblocking filtering can not be performed until pixel values (before deblocking filtering) of blocks of CTUs to be processed later in decoding order are generated. That is, the deblocking filter can not be processed on a CTU basis. Therefore, there is a problem that the SAO implemented after the deblocking filter processing can not be processed in CTU units.
  • the present invention aims to process SAO on a CTU basis by implementing SAO before deblocking filter.
  • An image filter device is an image filter device that divides an image into blocks of a predetermined unit and adds an offset to each pixel value, and the block (target block) of a predetermined unit of an input image
  • the first offset type that derives the category classification of the object pixel according to the magnitude relationship between the object pixel and the adjacent pixel, or the second offset that derives the category classification of the object pixel according to the size of the pixel value of the object pixel
  • a means for assigning one of two offset types, ie, a type, a means for setting different filter target areas in the target block according to the offset type, and a category of each pixel are set using the input image and the offset type Means for deriving an offset, and the category corresponding to the category set according to the offset type.
  • Means for performing filter processing on the filter target area of the target block by adding a set to each pixel and the input image is a predicted image generated by intra prediction processing or inter prediction processing, and prediction It is an image obtained by adding the residual signal, and the means for setting the category and deriving the offset is specified by the target pixel value and the offset class when the offset type of the target block is the first offset type.
  • a category is set using the two reference pixel values, an offset is derived for each category, and if the offset type of the target block is the second offset type, the category is selected from the band to which the target pixel value belongs. Set and derive the offset for each category.
  • FIG. 6 is a block diagram and a flowchart of a loop filter. It is a figure explaining the object field of conventional SAO.
  • FIG. 1 It is a figure explaining the object area
  • FIG. 1 is a diagram showing a configuration of a transmitting device equipped with a moving image encoding device according to the present embodiment and a receiving device equipped with a moving image decoding device.
  • (a) shows a transmitting apparatus equipped with a moving picture coding apparatus
  • (b) shows a receiving apparatus equipped with a moving picture decoding apparatus.
  • FIG. 1 is a diagram showing a configuration of a recording apparatus equipped with a moving picture coding apparatus according to the present embodiment and a reproduction apparatus equipped with a moving picture decoding apparatus.
  • (a) shows a recording apparatus equipped with a moving picture coding apparatus
  • (b) shows a reproduction apparatus equipped with a moving picture decoding apparatus.
  • FIG. 1 is a schematic view showing the configuration of an image transmission system 1 according to the present embodiment.
  • the image transmission system 1 is a system that transmits an encoded stream obtained by encoding an image to be encoded, decodes the transmitted encoded stream, and displays an image.
  • the image transmission system 1 includes a moving image coding device (image coding device) 11, a network 21, a moving image decoding device (image decoding device) 31, and a moving image display device (image display device) 41.
  • An image T is input to the moving picture coding device 11.
  • the network 21 transmits the encoded stream Te generated by the video encoding device 11 to the video decoding device 31.
  • the network 21 is the Internet, a wide area network (WAN), a 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 an encoded stream Te such as a DVD (Digital Versatile Disc) or a BD (Blue-ray (registered trademark) Disc).
  • the video decoding device 31 decodes each of the encoded streams Te transmitted by the network 21 and generates one or more decoded images Td which are each decoded.
  • the moving image display device 41 displays all or part of one or more decoded images Td generated by the moving image decoding device 31.
  • the moving image display device 41 includes, for example, a display device such as a liquid crystal display or an organic EL (Electro-luminescence) display.
  • the form of the display may be stationary, mobile, HMD or the like.
  • X? Y: z is a ternary operator that takes y if x is true (other than 0) and z if x is false (0).
  • Abs (a) is a function that returns the absolute value of a.
  • Int (a) is a function that returns an integer value of a.
  • Floor (a) is a function that returns the largest integer less than or equal to a.
  • a / d represents the division of a by d (rounding down the decimal point).
  • Avg (a (i)) is a function for deriving N average values of a (0) to a (N-1).
  • Min (a (0), a (1),..., A (N-1)) is a function that returns the minimum value of a (0) to a (N-1).
  • FIG. 2 is a diagram showing the hierarchical structure of data in the coded stream Te.
  • the coded stream Te illustratively includes a sequence and a plurality of pictures forming the sequence.
  • (A) to (f) in FIG. 2 respectively represent a coded video sequence defining the sequence SEQ, a coded picture defining the picture PICT, and a coding slice defining a slice S composed of a slice header SH and slice data SDATA.
  • 3 is a diagram illustrating CTUs included in slice data and CUs included in CTUs.
  • the coded stream Te is a video parameter set VPS (Video Parameter Set), a sequence parameter set SPS (Sequence Parameter Set), a picture parameter set PPS (Picture Parameter Set), a picture PICT, And, supplemental enhancement information SEI (Supplemental Enhancement Information) is included.
  • VPS Video Parameter Set
  • SPS Sequence Parameter Set
  • PPS Picture Parameter Set
  • PICT Picture PICT
  • SEI Supplemental Enhancement Information
  • a video parameter set VPS is a set of coding parameters common to a plurality of moving images in a moving image composed of one or more layers, and one or more layers and individual layers included in the moving image.
  • a set of related coding parameters is defined.
  • sequence parameter set SPS a set of coding parameters to be referred to by the video 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 be referred to by the video decoding device 31 for decoding each picture in the target sequence is defined.
  • 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 slice header in the target sequence.
  • the picture PICT includes slice 0 to slice NS-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 video 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.
  • inter prediction is not limited to single prediction and bi prediction, and more reference pictures may be used to generate a predicted image.
  • P and B slices it refers to a slice including a block for which inter prediction can be used.
  • the slice header SH includes the SAO parameter SAOP_S referred to by the adaptive offset filter SAO provided in the video decoding device 31.
  • FIG. 3A is a diagram showing syntax elements of the SAO parameter SAOP_S included as a part of slice header SH of the encoded stream according to the present embodiment (denoted as slice_segment_header () in FIG. 3A). is there.
  • the SAO parameter SAOP_S is information indicating on / off etc.
  • the slice header SH may include a reference (slice_pic_parameter_set_id) to the picture parameter set PPS.
  • the slice data SDATA includes a coding tree unit CTU (CTU block) as shown in (d) of FIG.
  • the CTU is a block of a fixed size (for example, 64 ⁇ 64) that configures a slice, and may also be referred to as a largest coding unit (LCU: Largest Coding Unit).
  • (Encoding tree unit) In (d) of FIG. 2, a set of data to which the video decoding device 31 refers to to decode the coding tree unit CTU is defined. As (d) in FIG. 2 shows, the CTU includes a CTU header and a coding unit CU (CU block).
  • the CTU header includes a coding parameter to which the video decoding device 31 refers in order to determine the decoding method of the target CTU.
  • division information SP_CU specifying a division pattern to each CU of the target CTU
  • quantization parameter difference ⁇ qp (qp_delta) specifying the size of quantization step
  • SAO parameter SAOP_C referred to by SAO are included. included.
  • the division information SP_CU is information representing a coding tree for dividing a CTU, and more specifically, information specifying the shape, size, and position within the target CTU of each CU included in the target CTU. is there.
  • the quantization parameter difference ⁇ qp is the difference qp ⁇ qp ′ between the quantization parameter qp in the target CTU and the quantization parameter qp ′ in the CTU encoded immediately before the target CTU.
  • the SAO parameter SAOP_C is a parameter referred to by the SAO included in the video decoding device 31.
  • FIG. 3B is a diagram showing syntax elements of the SAO parameter SAOP_C included as part of the CTU (denoted as coding_tree_unit () in FIG. 3B) of the coded stream according to the present embodiment.
  • the SAO parameter SAOP_C includes, as a syntax element, SAO unit information sao_unit () described later.
  • a set of data to which the moving picture decoding apparatus 31 refers to to decode a target CTU is defined.
  • the CTU is divided into a coding unit CU which is a basic unit of coding processing by recursive quadtree division (QT division) or binary tree division (BT division).
  • a tree structure obtained by recursive quadtree division or binary tree division is called a coding tree (CT: Coding Tree), and nodes of the tree structure are called a coding node (CN: Coding Node).
  • CT Coding Tree
  • CN Coding Node
  • the intermediate nodes of the quadtree and binary tree are coding nodes, and the CTU itself is also defined as the highest coding node.
  • the CT includes, as CT information, a QT split flag (cu_split_flag) indicating whether or not to perform QT split, and a BT split mode (split_bt_mode) indicating a split method of BT split.
  • a QT split flag cu_split_flag
  • a BT split mode split_bt_mode
  • a set of data to which the moving picture decoding apparatus 31 refers to to decode the target CU is defined.
  • a CU 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.
  • each prediction unit (PU: Prediction Unit) obtained by dividing a coding unit into one or more are defined.
  • a PU is one or more non-overlapping regions that make up a CU.
  • the prediction tree includes one or more PUs obtained by the above-mentioned division.
  • segmented PU further is called a "subblock.”
  • the sub block is composed of a plurality of pixels. When PU and subblocks have the same size, there is one subblock in PU. If the PU is larger than the size of the subblock, the PU is divided into subblocks. For example, if the PU is 8x8 and the sub-blocks are 4x4, the PU is divided into four sub-blocks, 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 the PU division mode (part_mode) of the coded stream, and 2Nx2N (same size as CU), 2NxN, 2NxnU, 2NxnD, Nx2N, nLx2N, nRx2N, and NxN There is. 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.
  • a CU is divided into one or more transformation units TU, and the position and size of each TU are defined.
  • a TU is one or more non-overlapping regions that make up a CU.
  • the transformation tree includes one or more TUs obtained by the above-mentioned division.
  • Partitions in the transformation tree may be allocated as an area of the same size as a CU as TU, or by recursive quadtree partitioning, as in the case of CU partitioning described above.
  • the conversion process is performed for each TU.
  • the prediction image of the prediction unit PU is derived by the prediction parameters associated with the PU.
  • the prediction parameters include intra prediction prediction parameters or inter prediction prediction parameters.
  • FIG. 4 shows a moving picture decoding apparatus (image decoding apparatus) 31 according to the present invention.
  • the moving picture decoding apparatus 31 includes an entropy decoding unit 301, a prediction parameter decoding unit (predicted image decoding apparatus) 302, a loop filter 305, a reference picture memory 306, a prediction parameter memory 307, a predicted image generation unit (predicted image generation apparatus) 308,
  • the configuration includes an inverse quantization / inverse transform unit 311 and an addition unit 312.
  • 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.
  • CTU, CU, PU, and TU may be replaced with blocks, and processing may be performed in units of blocks.
  • 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).
  • CABAC Context-based Adaptive Binary Arithmetic Coding
  • CAV Context-based Adaptive Variable Length Coding
  • the separated codes include prediction parameters for generating a prediction image and residual information for generating a residual signal.
  • the entropy decoding unit 301 outputs a part of the separated code to the prediction parameter decoding unit 302.
  • the entropy decoding unit 301 outputs the quantized transform coefficient to the inverse quantization / inverse transform unit 311.
  • the quantization transform coefficients are used to encode the residual signal by discrete cosine transform (DCT), discrete sine transform (DST), Karynen Loeve transform, and Karhunen Loeve transform in a coding process. Etc.) and is obtained by quantization.
  • the entropy decoding unit 301 decodes the SAO parameters SAOP_S and SAOP_C from the encoded stream, and supplies them to the adaptive offset filter (SAO) 3052.
  • SAO adaptive offset filter
  • 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. Further, 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.
  • 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 decoding unit 304 outputs the decoded intra prediction parameter to the prediction image generation unit 308, and stores it in the prediction parameter memory 307.
  • the loop filter 305 applies filters such as a deblocking filter, a sample adaptive offset filter (SAO), and an adaptive loop filter (ALF) to the decoded image of the CU generated by the adding unit 312.
  • the loop filter 305 may not necessarily include the above three types of filters as long as the loop filter 305 is paired with the moving picture coding device 11.
  • the loop filter 305 may have only a deblocking filter. Details of the loop filter 305 will be described later.
  • the reference picture memory 306 stores the decoded image of the CU generated by the adding unit 312 in a predetermined position for each of the picture to be decoded and the CTU or CU.
  • 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 separated by the entropy decoding unit 301.
  • 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 inter prediction image generation unit 309 When the prediction mode predMode indicates the inter prediction mode, the inter prediction image generation unit 309 performs block or inter prediction by using the inter prediction parameter input from the inter prediction parameter decoding unit 303 and the read reference picture (reference picture block). Generate a predicted image of subblocks.
  • 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 pixel.
  • the prediction image generation unit 308 outputs the prediction image of the block generated by the inter prediction image generation unit 309 or the intra prediction image generation unit 310 to the addition unit 312.
  • the inverse quantization / inverse transform unit 311 inversely quantizes the quantized transform coefficient input from the entropy decoding unit 301 to obtain a transform coefficient.
  • the inverse quantization / inverse transform unit 311 performs inverse frequency transform such as inverse DCT, inverse DST, and inverse KLT on the obtained transform coefficient to calculate a residual signal.
  • the inverse quantization / inverse transform unit 311 outputs the calculated residual signal to the addition unit 312.
  • the addition unit 312 adds, for each pixel, the prediction image of the block input from the inter prediction image generation unit 309 or the prediction image generation unit 308 and the residual signal input from the inverse quantization / inverse conversion unit 311. Generate a decoded image of The addition unit 312 outputs the generated decoded image of the block to at least one of the deblocking filter 3051, the SAO 3052, and the ALF 3053.
  • FIG. 4B is a block diagram showing the configuration of the loop filter (image filter device) 305.
  • the loop filter 305 includes a deblocking filter 3051, an SAO 3052, and an ALF 3053.
  • the input to the loop filter is a decoded image in which the predicted image generated by the predicted image generation unit 308 and the residual signal derived by the inverse quantization / inverse conversion unit 311 are added by the addition unit 312 (pre-filter decoded image ).
  • the deblocking filter 3051 determines that block distortion is present when the difference between the pixel values of the adjacent pixels through the block (CTU / CU / PU / TU) boundary is within a predetermined range. Then, the block boundary in the pre-deblocking filter image is subjected to deblocking processing to smooth the image in the vicinity of the block boundary.
  • the image subjected to the deblocking processing by the deblocking filter 3051 is a deblocked decoded image P_DB. For example, the on / off determination of the deblocking filter is performed by the following equation.
  • p2k, p1k, p0k, q0k, q1k and q2k are respectively a column or a row of pixels having a distance of 2, 1, 0, 0, 1, 2 from the block boundary as shown in FIG.
  • p2k, p1k, and p0k are pixels included in the block P among the blocks P and Q bordering the boundary
  • q0k, q1k, and q2k are pixels included in the block Q.
  • k indicates the pixel number in the block boundary direction
  • k> 0.
  • is a threshold value derived from the average value QPavg of quantization parameters of the block P and the block Q, and pps_beta_offset_div2 and slice_beta_offset_div2 notified by the PPS or the slice header SH. If (Expression DB-1) is satisfied, the deblocking filter is turned on (implemented) for the boundary between block P and block Q. In addition, deblocking filter processing is performed by the following equation.
  • p2 ' Clip3 (p2-2 * tc, p2 + 2 * tc, (2 * p3 + 3 * p2 + p1 + p0 + q0 + 4) >> 3) (Expression DB-2)
  • 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, (p
  • Each of p3, p2, p1, p0, q0, q1, q2 is a column or row of pixels having a distance of 3, 2, 1, 0, 0, 1, 2, 3 from the block boundary.
  • tc is a variable for suppressing the filter processing, and is a threshold value derived from the average value QPavg of the quantization parameter of the block P and the block Q, pps_tc_offset_div2, slice_tc_offset_div2 notified by the PPS or the slice header SH, and the like.
  • the deblocking filter refers to pixel values of 4 pixels from the boundary and changes pixel values of 3 pixels from the boundary in two blocks bordering the boundary. That is, when the block boundary is a CTU boundary, the deblocking process requires pixels of blocks belonging to adjacent different CTUs. Therefore, deblocking processing can not be performed in CTU units.
  • SAO is a process using SAO parameters notified for each CTU, and has an effect of removing ringing distortion and quantization distortion.
  • the SAO 3052 generates the SAO-completed decoded image P_SAO by performing SAO processing on the input image.
  • the SAO is a filter that classifies pixel values into several categories, and adds / subtracts an offset in units of pixels for each category.
  • the SAO has two types of offset types: edge offset (EO: Edge Offset, first offset) and band offset (BO: Band Offset, second offset), and the category classification method of pixel values in CTU is this offset. It depends on the type.
  • EO classifies the target pixel according to the magnitude relationship between the target pixel and the adjacent pixel (reference pixel, see FIG. 6A).
  • the BO classifies the target pixel according to the size of the pixel value of the target pixel (see FIG. 6C). An offset defined for each category for both EO and BO is added to the pixel value of the target pixel.
  • EO refers to adjacent pixels in eight directions of the target pixel and changes the target pixel value. That is, at the CTU boundary, pixels of different CTUs adjacent to each other are required as reference pixels for EO processing.
  • BO refers to the target pixel value itself and changes the target pixel value. That is, BO processing can be performed in CTU units.
  • FIG. 7 is a diagram showing the syntax of the SAO unit (denoted as sao_unit () in FIG. 7) of the coded stream according to the present embodiment.
  • the SAO unit is notified for each CTU, and includes SAO offset information sao_offset () and merge control information (sao_merge_left_flag, sao_merge_up_flag) of SAO offset information as syntax elements.
  • sao_merge_left_flag is a flag indicating whether or not SAO offset information of the target CTU is to be copied from the left adjacent CTU of the target CTU.
  • sao_merge_up_flag is a flag indicating whether or not SAO offset information of the target CTU is to be copied from the upper adjacent CTU of the target CTU.
  • SAO offset information is an offset type (sao_type_idx), an index (band offset position, sao_band_position) indicating the position of the band to which the offset is applied within the pixel value range, an offset class (reference pixel position of EO, sao_eo_class), and an offset value (sao_offset) including.
  • sao_offset consists of the absolute value of the offset sao_offset_abs and the sign of the offset sao_offset_sign.
  • sao_band_position is used when the offset type is BO.
  • the value of the offset in the coded stream may be encoded as a residual signal that derives the offset value using a quantized value or a prediction value such as linear prediction.
  • the sao_type_idx and sao_offset will be described later.
  • “_luma” or “_chroma” following the syntax in FIG. 7 indicates that it is a syntax for luminance or chrominance, respectively.
  • ue (v) indicates that the syntax associated with this descriptor is an unsigned numeric value, and that the value is variable-length encoded.
  • se (v) indicates that the syntax associated with this descriptor is a signed numeric value and is variable-length encoded.
  • ae (v) indicates that the syntax associated with this descriptor is variable-length encoded using an arithmetic code.
  • u (n) indicates that the syntax associated with this descriptor is an unsigned numeric value, and n-bit fixed-length coding is used.
  • f (n) indicates that a fixed value bit pattern is used.
  • sao_type_idx is an identifier representing an offset type.
  • sao_type_idx is assigned to a predetermined unit (SAO unit, for example, CTU) for each color component. Therefore, the type for each predetermined unit is expressed as sao_type_idx [cIdx] [rx] [ry].
  • the subscript cIdx is an index indicating any of luminance, color difference Cr, and color difference Cb, and rx and ry respectively indicate x and y coordinates of the upper left position of a predetermined unit to be an object.
  • sao_type_idx [cIdx] [rx] [ry] may be referred to simply as sao_type_idx or an offset type. Even when simply called sao_type_idx, the necessary individual values can be referred to as sao_type_idx [cIdx] [rx] [ry].
  • the predetermined unit is described as CTU, the predetermined unit is not limited to this.
  • EO edge offset
  • BO band offset
  • sao_offset_abs [cIdx] [rx] [ry] [i] and sao_offset_sign [cIdx] [rx] [ry] [i] are offsets added to the respective pixels included in the target CTU in the SAO process according to the present embodiment. It is a parameter used to derive a value.
  • sao_offset_abs [cIdx] [rx] [ry] [i] and sao_offset_sign [cIdx] [rx] [ry] [i] may be simply referred to as sao_offset_abs, sao_offset_sign or an offset value.
  • sao_offset_abs [cIdx] [rx] [ry] [i] and sao_offset_sign [cIdx] [rx] [ry] [i] are i in addition to the above arguments cIdx, rx, ry, corresponding to the category cat described later Specified by The categories will be described later.
  • the absolute value sao_offset_abs of the offset and the code sao_offset_sign are included in the encoded stream, and the SAO 3052 derives and uses the offset value SaoOfftVal actually used from sao_offset_abs and sao_offset_sign.
  • sao_offset_sign is encoded as a parameter for deriving the sign of the value of the offset to be added to each derived pixel. sao_offset_sign is encoded when the offset value to be added is other than zero.
  • bitDepth is a value representing the bit depth of the pixel value to be subjected to SAO
  • bitDepthTh is the lower limit bit depth for quantizing the offset value
  • bitDepthD is a value for adjusting the number of bits in the offset value range.
  • the offset type sao_type_idx is 1, that is, in the offset sao_offset of BO
  • the derivation method of the offset type sao_type_idx, the band offset position sao_band_position, the offset sao_offset_abs, the offset code sao_offset_sign, and the offset class sao_eo_class differs depending on whether the merge control information (sao_merge_left_flag, sao_merge_up_flag) of the SAO parameter SAOP_C indicates merge.
  • the merge control information does not indicate merging, these parameters are decoded by the entropy decoding unit 301 and stored in the offset information storage unit 1002.
  • the parameter of the adjacent CTU that has been decoded is read out from the offset information storage unit 1002 and set as a parameter of the target CTU. Specifically, when sao_merge_left_flag is 1, the parameter of the left adjacent CTU of the target CTU is set. When sao_merge_up_flag is 1, the parameter of the upper adjacent CTU of the target CTU is set.
  • round processing may be performed to discard information of lower bits. Round processing is effective in reducing line memory.
  • reverse round processing may be performed.
  • the block diagram of SAO3052 is shown in FIG.
  • the SAO 3052 includes a category setting unit 1001, an offset information storage unit 1002, and an offset addition unit 1003.
  • the category setting unit 1001 receives the SAO parameters (SAOP_S, SAOP_C) stored in the offset information storage unit 1002 and the SAO pre-decoded image rec. The category setting unit 1001 uses these to set the category of each pixel position corresponding to the offset type sao_type_idx. Further, the offset SaoOffsetVal of (Expression SAO-1) is derived, and the category and the offset are output to the offset addition unit 1003. When sao_type_idx is 0, the category is not calculated.
  • the category setting unit 1001 sets sao_eo_class to an offset class representing edge classification shown in FIG. 6A.
  • the class corresponds to the reference pixel direction viewed from the target pixel, and is used to select the reference pixel.
  • the left and right pixels of the target pixel X are set in the reference pixels a and b
  • Upper left and lower right pixels of the target pixel X are set to a and b
  • rec [x] represents the decoded pixel value of the pixel x.
  • the category cat is calculated from this edgeIdx.
  • the category setting unit 1001 divides pixel values of 0 to 2 ⁇ bitDepth-1 into bands as shown in FIG. 6C.
  • bit Depth 8
  • bitDepth 10
  • the category setting unit 1001 sets four consecutive bands from the band indicated by the band offset position (sao_band_position) decoded by the entropy decoding unit 301 to 1 to 4 of the category cat.
  • the offset SaoOffsetVal of (Expression SAO-1) is derived, and the category cat and the offset SaoOffsetVal are output to the offset addition unit 1003.
  • the category setting unit 1001 checks the offset type sao_offset_type in S901, and proceeds to S902 in the case of EO, or proceeds to S905 in the case of BO. Steps S902 to S904 are processing of EO, and steps S905 to S906 are processing of BO. If the offset type sao_offset_type is EO, the category setting unit 1001 refers to sao_type_idx in S902 and sets adjacent pixels of the target pixel x as reference pixels a and b.
  • the category setting unit 1001 sets the difference sign (rec [x] -rec [a]), sign (rec [x] -rec [b]) of the pixel values of the target pixel x and the two reference pixels a and b in S903. Derive edgeIdx using Next, the category setting unit 1001 calculates and sets a category cat from edgeIdx in S904.
  • the category setting unit 1001 divides the pixel value of 0 to 2 ⁇ bit Depth-1 into bands in S905. In step S 906, the category setting unit 1001 sets four consecutive bands from the band indicated by the band offset position (sao_band_position) to the categories 1 to 4 of the category cat. Then, when it is included in categories 1 to 4 in which the pixel value of the target pixel is included, this is set as the category of the target pixel.
  • step S 907 the category setting unit 1001 derives the offset SaoOffsetVal using (Expression SAO-1).
  • the offset information storage unit 1002 stores the SAO parameters decoded by the entropy decoding unit 301. If the merge control information (sao_merge_left_flag, sao_merge_up_flag) is 1, the SAO parameter of the adjacent CTU is output to the category setting unit 1001, otherwise the SAO parameter decoded by the entropy decoding unit 301 is output.
  • the ALF 3053 performs ALF-processed decoded image P_ALF by performing filter processing on the input image using filter parameters (filter set number, filter coefficient group, region designation information, and on / off information) decoded from the encoded stream. Generate The ALF-completed decoded image P_ALF is output to the outside as a decoded moving image Td, and stored in the prediction parameter memory 307 in association with POC designation information decoded from the coded stream by the entropy decoding unit 301.
  • filter parameters filter set number, filter coefficient group, region designation information, and on / off information
  • the deblocking filter 3051 first performs smoothing processing on the pixels of the block boundary for the decoded image (pre-filter decoded pixel), and then the SAO 3052 removes ringing distortion for pixels in the CTU, Correction of pixel value deviation is performed. Finally, processing is performed to reduce the difference between the decoded image and the original image by ALF.
  • the deblocking filter can not process on a CTU basis, and after the unfiltered decoded image P of the right adjacent CTU and the lower adjacent CTU of the target CTU is generated, at the block boundary in the target CTU.
  • the on / off determination and deblocking filter processing of all the pixels in contact can be completed. Therefore, SAO using the pixel value changed by the deblocking filter can not perform processing until the processing of the right adjacent CTU and the lower adjacent CTU of the target CTU is completed.
  • the deblocking filter can be a pixel (a white area surrounded by a broken line) that can perform deblocking filter processing only with pixels in the target CTU. Applies a deblocking filter during decoding of the target CTU.
  • a pre-filter decoded image of the left end pixel of the right adjacent CTU of the target CTU is generated for the pixel in the target CTU that touches the right adjacent CTU (upper right-lower left hatched area surrounded by dashed line), Call.
  • SAO parameters that the SAO notifies on a CTU basis. For example, sao_merge_left_flag, sao_merge_up_flag, sao_type_idx, sao_offset_abs, sao_offset_sign, sao_band_position, sao_eo_class. If all the deblocking filtered pixels of the target CTU are not aligned, these parameters can not be derived at the video encoding device side. Also, as shown in FIG.
  • the deblocking filtered pixels of the area subjected to the deblocking filter are derived using only the deblocking filtered pixels of the area subjected to the deblocking filter, or
  • SAO parameters can be derived using the pre-deblocking filter pixel values in the unimplemented area, especially when the CTU size is small, the percentage of unperformed deblocking filter pixels increases, so the SAO parameters can be derived. Accuracy will be worse.
  • an SAO process is performed before the deblocking filter, and a deblocking filter is performed on the SAO-decoded image to explain a technique for reducing delay while maintaining the accuracy of the derived SAO parameter. Do.
  • FIG. 11A is a block diagram of a loop filter 305D (in a moving image decoding apparatus) in the present embodiment.
  • a loop filter 305D shown in FIG. 11A replaces the loop filter 305 in FIG. 4 and the input and output are also the same as the loop filter 305. That is, the input to the loop filter is a pre-filter decoded image, and the output from the loop filter is a loop-filtered decoded image.
  • the configurations of the deblocking filter 3051 and the ALF 3053 are the same as the configurations of the deblocking filter 3051 and the ALF 3053 in FIG.
  • FIG. 11C is a flowchart showing the operation of the loop filter 305D.
  • the loop filter 305D performs filtering processing in order of SAO, deblocking filter, and ALF.
  • the loop filter 305D performs on / off determination of SAO (S1101). If the SAO is off (NO in S1101), the process advances to S1103. If the SAO is on (YES in S1101), the process proceeds to S1102. The SAO 3054 performs SAO processing (S1102).
  • the loop filter 305D performs on / off determination of the deblocking filter (S1103). If the deblocking filter is off (NO in S1103), the process proceeds to S1105. If the deblocking filter is on (YES in step S1103), the process advances to step S1104.
  • the deblocking filter 3051 performs deblocking filter processing (S1104).
  • the loop filter 305D performs on / off determination of ALF (S1105). If the ALF is off (NO in S1105), the process ends. If the ALF is on (YES in S1105), the process advances to S1106. The ALF 3053 performs ALF processing (S1106), and ends the processing.
  • the conventional edge offset requires the adjacent pixels shown in FIG. 6 (a) to derive the category of the target pixel, and as shown in FIG. 12 (a), the target CTU (FIG. 12 (a)).
  • An area adjacent to one pixel is used as a reference area outside the hatched area).
  • one pixel at the right end and the lower end of the target CTU uses the SAO pre-decoded pixel (pre-filter decoded pixel) of the right adjacent CTU and the lower adjacent CTU of the target CTU.
  • pre-filter decoded pixel reference is made to the pixel of the subsequent CTU which is the CTU on the right side of the target CTU and the lower side.
  • EO can be performed in CTU units without waiting for the processing of the subsequent CTUs by not referring to the pixel values of the subsequent CTUs by limiting the target area of the EO. .
  • the band offset (BO) uses the pixel value of the target pixel itself for category derivation, as shown in FIG. 12 (b), additional adjacent to the target CTU (shaded area in FIG. 12 (b)) No space is required. Therefore, the BO can perform processing on a CTU basis without waiting for the subsequent CTU processing.
  • FIG. 15 is a block diagram of the SAO 3054 of the present invention. The difference from SAO 3052 in FIG. 8 is that a target area setting unit 1004 is added.
  • the target area setting unit 1004 sets pixels in the CTU (hatched area in FIG. 13A) excluding the right end one pixel and the lower end one pixel of the target CTU as a target area of EO.
  • an area outside the target CTU of one pixel of the upper adjacent CTU of the target CTU and one pixel of the left adjacent CTU is used as a reference area.
  • These are pixels in the already-decoded CTU (pixels of processed CTU), and are regions stored in the internal memory for use in intra prediction and deblocking filter in the target CTU. Therefore, when making the hatched area in FIG. 13A the target area of EO, there is no increase in additional memory and data transfer amount for SAO processing.
  • the target area of BO (FIG. 13 (c)) is the entire area of CTU as in FIG. 12 (b).
  • the processes of the category setting unit 1001 and the offset addition unit 1003 are executed on the target area set by the target area setting unit 1004.
  • the processes of the category setting unit 1001 and the offset addition unit 1003 are the same as those of the category setting unit 1001 and the offset addition unit 1003 in FIG.
  • FIG. 16 shows a flowchart of the SAO 3054.
  • the target area setting unit 1004 sets SAO target areas of EO and BO.
  • the shaded area in FIG. 13A is set for EO, and the shaded area in FIG. 13C for BO (S1400).
  • the category setting unit 1001 checks the offset type sao_offset_type, and proceeds to S902 if EO, or proceeds to S905 if BO (S901).
  • S902 to S904 are EO processing
  • S905 to S906 are BO processing
  • S902 to S907 are the same operations as in FIG.
  • the offset addition unit 1003 adds the offset SaoOffsetVal corresponding to the category cat derived for each target pixel by the category setting unit 1001 to the target pixel, and carries out SAO (S1408).
  • the SAO can be processed in CTU units without using pixel values of subsequent CTUs, and delay can be reduced while maintaining image quality.
  • a target CTU outside area corresponding to one pixel of the upper adjacent CTU of the target CTU, one pixel of the left adjacent CTU, and one pixel of the right adjacent CTU is required as a reference area.
  • a delay of 1 CTU occurs with respect to the target CTU.
  • the delay generated to reference the right adjacent CTU is small. Therefore, although the delay is increased by 1 CTU, the area of the right end of the target CTU is included in the target area of EO, so that the image quality is improved.
  • the target area for EO set in the target area setting unit 1004 in FIG. 15 and S1400 in FIG. 16 is the hatched area in FIG. There is no other processing change.
  • the upper adjacent CTU of the target CTU or an area outside the target CTU for one pixel of the left adjacent CTU is required as a reference area.
  • These areas are already stored in the internal memory. Therefore, when the hatched area in FIG. 14A or 14B is set as the target area, there is no increase in memory or data transfer amount, and no increase in delay.
  • the target area of BO (FIG. 14D) is the entire area of CTU as in FIG. 12B.
  • the target area for EO set in the target area setting unit 1004 in FIG. 15 and S1400 in FIG. 16 is the hatched area in FIG. 14A or 14B. There is no other processing change.
  • the third modification of the present invention sets the EO target area to an area (shaded area in FIG. 14C) one pixel inward from the CTU boundary, and the BO target area to the entire CTU area (FIG. The hatched area shown in d) is set as in FIG. 12 (b)).
  • the target area for EO set in the target area setting unit 1004 of FIG. 15 and S1400 of FIG. 16 is a hatched area of FIG. There is no other processing change.
  • the area required for the SAO including the reference area is limited to the inside of the CTU. Therefore, the delay can be reduced by simple processing without using pixel values of adjacent CTUs.
  • the moving picture coding apparatus 11 includes a predicted image generation unit 101, a subtraction unit 102, a transform / quantization unit 103, an entropy coding unit 104, an inverse quantization / inverse transform unit 105, an addition unit 106, a loop filter 107, and prediction parameters.
  • a memory (prediction parameter storage unit, frame memory) 108, a reference picture memory (reference image storage unit, frame memory) 109, an encoding parameter determination unit 110, and a prediction parameter encoding unit 111 are included.
  • the prediction parameter coding unit 111 includes an inter prediction parameter coding unit 112 and an intra prediction parameter coding unit 113.
  • the predicted image generation unit 101 generates, for each picture of the image T, a predicted image of 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 a reference picture indicated by the motion vector starting from the target block, and generates a predicted image.
  • the prediction parameter is, for example, an intra prediction mode.
  • the predicted image generation unit 101 reads the pixel value of the adjacent block used in the intra prediction mode from the reference picture memory 109, and generates a predicted image.
  • the predicted image generation unit 101 outputs the generated predicted image of the block to the subtraction unit 102 and the addition unit 106.
  • the predicted image generation unit 101 performs the same operation as the predicted image generation unit 308 described above.
  • the subtraction unit 102 subtracts the signal value of the prediction image of the block input from the prediction image generation unit 101 from the pixel value of the corresponding block position of the image T to generate a residual signal.
  • the subtraction unit 102 outputs the generated residual signal to the transformation / quantization unit 103.
  • the transformation / quantization unit 103 performs frequency transformation on the residual signal input from the subtraction unit 102 to calculate transformation coefficients.
  • the transform / quantization unit 103 quantizes the calculated transform coefficient to obtain a quantized transform coefficient.
  • Transform / quantization section 103 outputs the obtained quantized transform coefficient to entropy coding section 104 and inverse quantization / inverse transform section 105.
  • the entropy coding unit 104 receives quantization transform coefficients from the transform / quantization unit 103 and receives prediction parameters from the prediction parameter coding unit 111.
  • the entropy coding unit 104 entropy-codes the input division information, prediction parameters, quantized transform coefficients and the like to generate a coded stream Te, and outputs the generated coded stream Te to the outside. Also, the entropy coding unit 104 performs variable-length coding on the SAO parameters SAOP_S and SAOP_C supplied from the SAO_E 1072 and includes them in the coded stream.
  • the inverse quantization / inverse transform unit 105 is the same as the inverse quantization / inverse transform unit 311 (FIG. 4) in the video decoding device 31, and dequantizes the quantized transform coefficients input from the transform / quantization unit 103. Quantize to obtain transform coefficients.
  • the inverse quantization / inverse transform unit 105 performs inverse transform on the obtained transform coefficient to calculate a residual signal.
  • the inverse quantization / inverse transform unit 105 outputs the calculated residual signal to the addition unit 106.
  • the addition unit 106 adds the prediction image of the block input from the prediction image generation unit 101 and the residual signal input from the inverse quantization / inverse conversion unit 105 for each pixel to generate a decoded image.
  • the addition unit 106 outputs the generated (pre-filter) decoded image to the loop filter 107.
  • the loop filter 107 applies a deblocking filter, a sample adaptive offset filter (SAO), and an adaptive loop filter (ALF) to the decoded image generated by the adding unit 106.
  • the loop filter 107 may not necessarily include the three types of filters described above, and may have, for example, only a deblocking filter.
  • deblocking filter (E) 1071, SAO_E 1072, ALF (E) 1073 processing for determining filter parameters is added to the deblocking filter 3051, SAO 3052, ALF 3053, but the filter processing function is the same.
  • the filter parameters are encoded and transmitted to the video decoding device 31.
  • the SAO_E 1072 includes an SAO information setting unit 1701 and an SAO 3052.
  • the SAO 3052 is the same as in FIG.
  • the SAO information setting unit 1701 includes an offset calculation unit 1702, an offset information selection unit 1703, and a merge information setting unit 1704.
  • the offset calculation unit 1702 calculates offsets of each offset class (0 to 3) of EO and each band of BO.
  • the offset type is EO
  • the category setting of each pixel is performed for each offset class, and the offset of the set category is calculated.
  • BO a band (category) belonging to each pixel is set, and the offset of the set category is calculated.
  • the offset calculation unit 1702 initializes the offset class (class), count [class] [cat], and SAD [class] [cat] in S1801.
  • count [class] [cat] is a variable that counts the number of pixels per combination of (class, cat) in the CTU
  • SAD [class] [cat] is decoding for each combination of (class, cat) in the CTU It is a variable that stores the absolute difference sum of the pixel value and the original pixel.
  • the offset calculation unit 1702 calculates the offset of EO in S1802 and S1803.
  • reference pixels a and b indicated by the offset class are set for the target pixel (x, y) to derive a category cat.
  • count [class] [cat] is incremented by one for the current offset class.
  • the absolute difference between the SAO pre-decoded pixel value rec [x] [y] and the original pixel org [x] [y] is added to SAD [class] [cat].
  • the offset calculation unit 1702 calculates offset offset [class] [cat] for categories 1 to 4 in S1803 using the following equation, and increments the offset class by one.
  • the offset calculation unit 1702 calculates the offset of BO in S1805 and S1806.
  • the band i to which the SAO pre-decoded pixel value rec [x] [y] of the target pixel belongs is obtained in S1805, and the difference sum SAD [class] [i] of the band i is rec [x] [y] and org [x] [ Add the difference of y]. Also, the count of band i is incremented by one.
  • bandShift is log 2 (bandW) and bandW is the bandwidth of BO.
  • offset [class] [i] SAD [class] [i] / count [class] [i] (equation SAO-12)
  • the offset information selection unit 1703 uses the offset calculated by the offset calculation unit 1702 to select an offset type (EO / BO), an offset class in the case of EO, and a band position in the case of BO.
  • FIG. 20 is a flowchart showing the operation of the offset information selection unit 1703.
  • S1902 to S1904 are processes relating to EO
  • S1905 to S1907 are processes relating to BO.
  • the offset information selection unit 1703 initializes the offset class class (0 to 3) and the absolute difference sum SAD [class] in S1901.
  • the absolute difference sum SAD [class] is a variable that stores the absolute difference sum of the pixel value to which SAO is applied (to which the offset is added) and the original pixel value.
  • the absolute difference sum SAD [class] sets the reference pixels a and b indicated by the offset class in S1902, derives the category for each pixel of CTU by the method described above, and uses the offset assigned to each category Calculate the absolute difference sum SAD.
  • the offset information selection unit 1703 checks in step S1903 whether the offset class is equal to four. If the offset class is not equal to 4, the processing of S1902 is performed until it is 4. If the offset class is equal to 4, processing of all offset classes of EO is completed, and the process advances to step S1904.
  • step S1905 the offset information selection unit 1703 calculates, for each band of CTUs, the sum of absolute differences between pixel values to which SAO is applied (offset is added) and original pixel values. Specifically, using the band i to which the target pixel (x, y) belongs and the offset offset [class] [i] of each band obtained by the offset calculation unit 1702, the band i has four consecutive bands (j to If it belongs to any of j + 3), the absolute difference sum of the pixel value rec [x] [y] + oft to which SAO is applied and the original pixel value org [x] [y] is calculated.
  • the offset information selection unit 1703 compares the magnitude relationship between SAO EO and SAO BO . If the SAO BO is large, step S1909 follows and the offset type (type) of the current CTU is set to EO. If not, it proceeds to S1910 and sets the offset type (type) of the current CTU to BO.
  • the offset information (offset, offset type, offset class, band position) calculated by the SAO information setting unit 1701 is input to the SAO 3052.
  • the operation of the SAO 3052 is the same as the operation of the SAO 3052 of the video decoding device 31, and the description thereof is omitted.
  • the merge control information (sao_merge_left_flag, sao_merge_up_flag) is set to 1. If the SAO parameter of the target CTU is not equal to the SAO parameter of the adjacent CTU, the merge control information is set to 0.
  • sao_merge_left_flag 1
  • sao_merge_up_flag 1
  • FIG. 11B is a block diagram of the loop filter 107E (in the moving picture coding apparatus) in the present embodiment.
  • the loop filter 107E shown in FIG. 11B is a replacement of the loop filter 107 in FIG. 17, and the input and output are also the same as the loop filter 107. That is, the input to the loop filter is a pre-filter decoded image, and the output from the loop filter is a loop-filtered decoded image.
  • the configurations of the deblocking filter 1071 and the ALF 1073 are the same as the configurations of the deblocking filter 1071 and the ALF 1073 in FIG.
  • FIG. 11C is a flowchart showing the operation of the loop filter 107E. The flow of the process is the same as that of the loop filter 305D, so the description will be omitted.
  • the SAO_E 1074 sets the EO target area to the CTU pixels (hatched area in FIG. 13A) excluding the right end pixel and the lower end pixel of the target CTU. Further, the target region of BO is a hatched region in FIG. 13C, which is all pixels of the target CTU.
  • FIG. 21 is a block diagram of SAO_E 1074 of the present invention.
  • the difference from SAO_E 1072 in FIG. 18 is that a target area setting unit 1705 is added.
  • the target area setting unit 1705 sets a shaded area in FIG. 13A as a target area of SAO.
  • the target area setting unit 1705 is the same as the target area setting unit 1004 in FIG.
  • the offset calculation unit 1702, the offset information selection unit 1703, and the merge information setting unit 1704 are the same as the offset calculation unit 1702, the offset information selection unit 1703, and the merge information setting unit 1704 in FIG.
  • Each process is performed on the target area of the SAO.
  • the SAO 3054 is the same as the SAO 3054 in FIG.
  • SAO_E 1074 can derive SAO parameters SAOP_S and SAOP_C for each CTU for both EO and BO. . Therefore, the delay of the encoding process can be reduced. In addition, since the number of pixels that can be used for calculating the SAO parameter increases compared to the case where the deblocking filtered pixel is used, the accuracy of the SAO parameter can be improved.
  • the target region for EO set by the target region setting unit 1705 in FIG. 21 is a CTU pixel (hatched region in FIG. 13B) excluding one lower end pixel of the target CTU. . There is no other processing change.
  • a delay of 1 CTU occurs compared to the case where the EO target area is set to the hatched area in FIG. .
  • the delay of 1 CTU is sufficiently smaller than the delay of 1 CTU line which occurs when the target area of EO is set as shown in FIG. 12A. Therefore, the delay can be reduced while maintaining the image quality as compared with the prior art (FIG. 12A).
  • the target area for EO set by the target area setting unit 1705 in FIG. 21 is a pixel in CTU excluding one pixel at the left end and one pixel at the right end and one lower end of the target CTU (FIG. 14 The shaded area in (a)).
  • the CTU pixels (the shaded area in FIG. 14B) excluding the upper end one pixel, the right end pixel, and the lower end pixel of the target CTU may be excluded. There is no other processing change. In these cases, the delay does not increase because the subsequent CTUs of the target CTU are not referenced.
  • the target region for EO set by the target region setting unit 1705 in FIG. 21 is a hatched region (hatched region in FIG. 14C) which is located one pixel inside from the CTU boundary. There is no other processing change.
  • the area required for the SAO including the reference area is limited to the area inside the CTU. Therefore, the delay can be reduced by simple processing.
  • 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 the QT or BT division parameter or prediction parameter described above, or a parameter to be coded that is generated in association with these.
  • the predicted image generation unit 101 generates a predicted image of a block using each of these sets of coding parameters.
  • the coding parameter determination unit 110 calculates an RD cost value indicating the size of the information amount and the coding error for each of the plurality of sets.
  • the coding parameter determination unit 110 selects a set of coding parameters that minimize the calculated RD 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. 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 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 is partially identical to the configuration in which the inter prediction parameter decoding unit 303 derives the inter prediction parameter, as a configuration for deriving a parameter necessary for generating a predicted image to be output to the predicted image generation unit 101. Includes configuration.
  • the intra prediction parameter coding unit 113 derives the prediction parameters necessary for generating the prediction image to be output to the prediction image generation unit 101
  • the intra prediction parameter decoding unit 304 derives the intra prediction parameter, and Some include the same configuration.
  • FIG. 22 is used instead of FIG. 7 as the syntax of SAO.
  • the positive / negative sign (sao_offset_sign) of the offset SaoOffsetVal derived for each CTU can be notified (SYN 2201).
  • EO had the effect of removing ringing distortion, but had no edge enhancement effect.
  • sao_offset_sign is notified, and filtering is performed using positive and negative offsets, thereby providing EO with an edge emphasizing effect other than the ringing removal effect.
  • the deblocking filter changes the on / off and the filter strength depending on the pixel value of the block boundary. Therefore, in the case of edge enhancement by EO, if the output of SAO is affected by coding distortion, there is a possibility that the deblocking filter implemented after SAO may make an erroneous determination. For example, as a result of SAO edge-enhancing block distortion, the deblocking filter considers block distortion as an edge and determines that the filter is off. Moreover, when applying SAO of the image before a deblocking filter process, block distortion may be emphasized and a subjective image quality may fall.
  • the block is a unit to be processed by the deblocking filter, and is, for example, a PU or a TU.
  • the filtering process is not applied to the target pixel.
  • the filter processing is applied to the target pixel.
  • FIG. 23 is a flowchart showing the operation of the offset addition unit 10032 of this embodiment.
  • the offset addition unit 10032 replaces the offset addition unit 1003 in FIGS. 8 and 15. Although the offset addition unit 1003 only performs the process of adding the offset as shown in S907 of FIG. 9 and S1408 of FIG. 16, the offset addition unit 10032 performs the process shown in FIG.
  • the offset addition unit S10032 determines in S2301 whether the offset type is EO. If the offset type is not EO (NO in S2301), the process proceeds to S2304. If the offset type is EO (YES in S2301), the process advances to S2302.
  • the offset addition unit S10032 determines in S2303 whether or not the target pixel is at a block boundary. If the target pixel is not at the block boundary (NO in S2303), the process proceeds to S2304. If the target pixel is at a block boundary (YES in S2303), the process ends without adding the offset to the target pixel.
  • whether or not the target pixel (x, y) is at the block boundary can be determined, for example, by the following equation.
  • the offset addition unit S 10032 calculates the pixel value of the target pixel by (Expression SAO-8) in S 2304.
  • the process of S2304 is the same as S907 of FIG. 9 and S1408 of FIG.
  • the determination of the target pixel position may not be a block boundary but may be a CTU boundary.
  • the block width CUWidth and the block height CUHeight of (Expression SAO-17) are replaced by the CTU width CTUWidth and the CTU height CTUHeight.
  • An image filter device is an image filter device that divides an image into blocks of a predetermined unit and adds an offset to each pixel value, and the block (target block) of a predetermined unit of an input image
  • the first offset type that derives the category classification of the target pixel according to the magnitude relationship between the target pixel and the adjacent pixel, or the second offset that classifies the category classification of the target pixel according to the size of the pixel value of the target pixel
  • the category of each pixel is set using the means for assigning one of two offset types, ie, the type, the means for setting the filter target area for performing the filtering process of the target block, and the input image and the offset type; For each pixel, and an offset corresponding to a category set according to the offset.
  • the input image is an image obtained by adding a prediction image generated by intra prediction processing or inter prediction processing and a prediction residual signal, and the category is set;
  • the means for deriving the offset sets the category using the target pixel value and the two reference pixel values designated by the offset class when the target block is a predetermined first offset type, and the offset is set for each category.
  • the target block is a predetermined second offset type
  • a category is set from the band to which the target pixel value belongs, and an offset is derived for each category.
  • the means for setting the filter target area of the target block includes an area to be set when the target block is the first offset type, and an offset type of the target block. A different area is set to the area to be set in the case of
  • the means for setting the filter target area of the target block is a filter target area of the target block of the target block when the target block is the second offset type. Set to all areas.
  • the means for setting the filter target area of the target block is a filter target area of the target block, the target block boundary when the target block is the first offset type. It is set to an area that is inside by 1 pixel.
  • the means for setting the filter target area of the target block is a filter target area of the target block of the target block when the target block is the first offset type.
  • the target block is set except for the right end one pixel and the lower end one pixel.
  • the means for setting the filter target area of the target block is a filter target area of the target block of the target block when the target block is the first offset type.
  • the target block is set except for the left end one pixel, the right end one pixel, and the lower end one pixel.
  • the means for setting the filter target area of the target block is a filter target area of the target block of the target block when the target block is the first offset type. Set as the target block excluding the lower 1 pixel.
  • the image filter device implements a deblocking filter on the output of the adaptive offset filter SAO.
  • the image filter device performs a deblocking filter on the output of the adaptive offset filter SAO, and further performs an adaptive loop filter ALF on the output of the deblocking filter.
  • an image filter device that divides an image into blocks of a predetermined unit and adds an offset to each pixel value, and blocks (target block) a predetermined unit of an input image
  • the first offset type that derives the category classification of the target pixel according to the magnitude relationship between the target pixel and the adjacent pixel, or the second offset that classifies the category classification of the target pixel according to the size of the pixel value of the target pixel
  • an image filter device that divides an image into blocks of a predetermined unit and adds an offset to each pixel value, and blocks (target block) a predetermined unit of an input image
  • the first offset type that derives the category classification of the target pixel according to the magnitude relationship between the target pixel and the adjacent pixel, or the second offset that classifies the category classification of the target pixel according to the size of the pixel value of the target pixel
  • the predetermined condition is that the offset is positive when the category is 1 or 2, or negative when the category is 3 or 4. is there.
  • the moving picture coding apparatus 11 and a part of the moving picture decoding apparatus 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 dequantization Inverse transformation unit 311, addition unit 312, predicted image generation unit 101, subtraction unit 102, transformation / quantization unit 103, entropy encoding unit 104, inverse quantization / inverse transformation unit 105, loop filter 107, encoding parameter determination unit 110, 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 moving image encoding device 11 and the moving 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 video encoding device 11 and the video decoding device 31 in the above-described embodiment may be realized as an integrated circuit such as LSI (Large Scale Integration).
  • LSI Large Scale Integration
  • Each functional block of the moving picture coding device 11 and the moving picture 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 moving image encoding device 11 and the moving 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. 24A is a block diagram showing the configuration of a transmitter PROD_A on which the moving picture coding apparatus 11 is mounted.
  • the transmitter PROD_A modulates a carrier wave with an encoding unit PROD_A1 which obtains an encoded stream by encoding a moving image, and the encoding stream obtained by the encoding unit PROD_A1.
  • the above-described moving picture coding apparatus 11 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 PRED_A7 that generates or processes an image.
  • FIG. 24A illustrates the configuration in which the transmission device PROD_A includes all of the above, 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, a decoding unit (not shown) may be interposed between the recording medium PROD_A5 and the encoding unit PROD_A1 for decoding the encoded stream read from the recording medium PROD_A5 according to the encoding scheme for recording.
  • FIG. 24 (b) is a block diagram showing the configuration of the reception device PROD_B on which the video decoding device 31 is mounted.
  • the receiving device PROD_B receives the modulated signal, receives the modulated signal, demodulates the modulated signal received by the receiving unit PROD_B1, obtains the encoded stream, and demodulates the demodulated signal;
  • a decoding unit PROD_B3 for obtaining a moving image by decoding the encoded stream obtained by PROD_B2.
  • the above-described moving picture decoding apparatus 31 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.
  • FIG. 24 (b) exemplifies the configuration in which the receiving device PROD_B includes all of the above, a part of the configuration 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 the moving image captured by the 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. 25A is a block diagram showing the configuration of a recording device PROD_C on which the above-described moving picture coding device 11 is mounted.
  • the recording device PROD_C writes the encoded stream obtained by the encoding unit PROD_C1 for obtaining an encoded stream by encoding a moving image and the encoding unit PROD_C1 to the recording medium PROD_M.
  • the above-described moving picture coding apparatus 11 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 Universal Serial Bus (USB) flash memory, or (3) DVD (Digital Versatile Disc) or BD (Blu-ray (registered trademark) A disc such as a registered trademark) may be loaded into a drive device (not shown) built in the recording device PROD_C.
  • 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 Universal Serial Bus (USB) flash memory, or (3) DVD (Digital Versatile Disc) or BD (Blu-ray (registered trademark) A disc such as a registered trademark) may be loaded
  • 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. 25A exemplifies the configuration in which the recording apparatus PROD_C includes all of the above, a part of the configuration may be omitted.
  • the receiving unit PROD_C5 may receive a non-coded moving image, and receives a coded stream coded by a transmission coding scheme different from the recording coding scheme. It may be In the latter case, it is preferable to interpose a transmission decoding unit (not shown) that decodes the coded stream coded by the transmission coding scheme between the reception unit PROD_C5 and the coding 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. 25 (b) is a block showing the configuration of the playback device PROD_D on which the above-described moving picture decoding device 31 is mounted.
  • the playback device PROD_D obtains a moving image by decoding a coded stream read by the reading unit PROD_D1 that reads the coded stream written in the recording medium PROD_M and the reading unit PROD_D1.
  • the above-described moving picture decoding apparatus 31 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.
  • FIG. 25 (b) exemplifies the configuration in which the playback device PROD_D includes all of these, part of the configuration may be omitted.
  • the transmitting unit PROD_D5 may transmit an uncoded moving image, or transmit an encoded stream encoded by a transmission coding scheme different from the recording coding scheme. 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 above-described moving picture decoding apparatus 31 and moving picture coding apparatus 11 may be realized as hardware by a logic circuit formed on an integrated circuit (IC chip), or CPU (Central Processing). It may be realized as software using Unit).
  • IC chip integrated circuit
  • CPU Central Processing
  • each of the devices described above includes a CPU that executes instructions of a program that implements each function, a read only memory (ROM) that stores the program, a random access memory (RAM) that develops the program, the program, and various data.
  • a storage device such as a memory for storing the
  • the object of the embodiment of the present invention is 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). / MD (Mini Disc) / DVD (Digital Versatile Disc) / CD-R (CD Recordable) / Blu-ray Disc (Blu-ray (registered trademark) Disc: registered trademark), etc.
  • 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.
  • MD Mini Disc
  • DVD Digital Versatile Disc
  • CD-R Compact Disc
  • Blu-ray Disc Blu-ray (registered trademark) Disc: registered trademark), etc.
  • Disc including optical disc, IC card (memory) Cards) / cards such as optical cards, mask ROM / EPROM (Erasable Programmable Read-Only Memory) / EEPROM (Electrically Erasable and Programmable Read-Only Memory (registered trademark)) / semiconductor memory such as flash ROM, or PLD Logic circuits such as programmable logic device (FPGA) and field programmable gate array (FPGA) can be used.
  • IC card memory
  • EPROM Erasable Programmable Read-Only Memory
  • EEPROM Electrical Erasable and Programmable Read-Only Memory (registered trademark))
  • semiconductor memory such as flash ROM, or PLD
  • Logic circuits such as programmable logic device (FPGA) and field programmable gate array (FPGA) can be used.
  • FPGA programmable logic device
  • FPGA field programmable gate array
  • 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 / CableTelevision) communication network, Virtual Private Network (Virtual Private Network) A telephone network, a mobile communication network, a satellite communication network, etc. can be used.
  • 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 embodiment of the present invention is suitably applied to a video decoding apparatus that decodes a coded stream obtained by coding image data, and a video coding apparatus that generates a coded stream obtained by coding image data. be able to. Further, the present invention can be suitably applied to the data structure of a coded stream generated by the moving picture coding apparatus and referred to by the moving picture decoding apparatus.

Landscapes

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

Abstract

At a CTU boundary, a deblocking filter process cannot be performed until the pixel value of a CTU block processed later in a decoding sequence is generated and SAO carried out after the deblocking filter process cannot be processed in CTU units either. SAO is carried out before the deblocking filter and the EO processing region of SAO is limited, thereby SAO is processed in CTU units.

Description

動画像符号化装置、動画像復号装置および動画像フィルタ装置Moving picture coding device, moving picture decoding device and moving picture filter device

 本発明の一態様は、動画像復号装置、動画像符号化装置および動画像フィルタ装置に関する。 One aspect of the present invention relates to a video decoding device, a video encoding device, and a video filter device.

 動画像を効率的に伝送または記録するために、動画像を符号化することによって符号化ストリームを生成する動画像符号化装置(画像符号化装置)、および、当該符号化ストリームを復号することによって復号画像を生成する動画像復号装置(画像復号装置)が用いられている。また、動画像符号化装置および動画像復号装置には、動画像の画質を高めるためのフィルタ装置が搭載されている。 In order to efficiently transmit or record moving pictures, a moving picture coding apparatus (image coding apparatus) that generates a coded stream by coding a moving picture, and decoding the coded stream A moving image decoding apparatus (image decoding apparatus) that generates a decoded image is used. Also, in the moving picture coding apparatus and the moving picture decoding apparatus, a filter device for enhancing the image quality of the moving picture is mounted.

 具体的な動画像符号化方式としては、例えば、H.264/AVCやHEVC(High-Efficiency Video Coding)にて採用あるいは提案された方式などが挙げられる。 As a specific moving picture coding method, for example, a method adopted or proposed in H.264 / AVC or High-Efficiency Video Coding (HEVC) may be mentioned.

 このような動画像符号化方式においては、動画像を構成する画像(ピクチャ)は、画像を分割することにより得られるスライス、スライスを分割することにより得られる符号化ツリーユニット(CTU:Coding Tree Unit)、符号化ツリーユニットを分割することで得られる符号化単位(CU:Coding Unit、符号化ユニットと呼ばれることもある)、及び、符号化単位を分割することより得られるブロックである予測ユニット(PU:Prediction Unit)、変換ユニット(TU:Transform Unit)からなる階層構造により管理され、CUごとに符号化/復号される(非特許文献1)。 In such a moving picture coding method, an image (picture) constituting a moving picture is a slice obtained by dividing the image, a coding tree unit obtained by dividing the slice (CTU: Coding Tree Unit) A coding unit (CU: Coding Unit, sometimes referred to as a coding unit) obtained by dividing a coding tree unit, and a prediction unit (block) obtained by dividing a coding unit It is managed by the hierarchical structure which consists of PU: Prediction Unit (TU) and transform unit (TU: Transform Unit), and is encoded / decoded per CU (nonpatent literature 1).

 また、このような動画像符号化方式においては、通常、入力画像を符号化/復号することによって得られる局所復号画像に基づいて予測画像が生成され、当該予測画像を入力画像(原画像)から減算して得られる予測残差信号(「残差信号」と呼ぶこともある)が符号化される(非特許文献1)。 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). A prediction residual signal (sometimes referred to as a “residual signal”) obtained by subtraction is encoded (Non-Patent Document 1).

 また、非特許文献1には、画像のブロック境界を介して隣接する画素に平滑化処理を実施し、ブロック歪を除去するデブロッキングフィルタが開示されている。さらに、デブロッキングフィルタの後に実施される、画素分類に応じたオフセットを画素毎に加算する適応オフセットフィルタ(SAO:Sample Adaptive Offset)も開示されている。 In addition, Non-Patent Document 1 discloses a deblocking filter that performs smoothing processing on adjacent pixels through block boundaries of an image to remove block distortion. Furthermore, an adaptive offset filter (SAO: Sample Adaptive Offset) is also disclosed, which is performed after the deblocking filter and adds an offset according to pixel classification for each pixel.

ITU-T H.265(04/2015) SERIES H:AUDIOVISUAL AND MULTIMEDIA SYSTEMS Infrastructure of audiovisual services - Coding of moving video High efficiency video codingITU-T H. 265 (04/2015) SERIES H: AUDIO VISUAL AND MULTIMEDIA SYSTEMS Infrastructure of audiovisual services-Coding of moving video High efficiency video coding

 上述の非特許文献1では、デブロッキングフィルタの後にSAOが実施される。しかしながら、デブロッキングフィルタはブロック境界をはさむ2個のブロックに対しフィルタリング処理を実施する。従って、CTU境界では、復号順で後に処理されるCTUのブロックの(デブロッキングフィルタ前の)画素値が生成されるまでは、デブロッキングフィルタ処理ができない。つまり、デブロッキングフィルタはCTU単位で処理することができない。そのため、デブロッキングフィルタ処理後に実施されるSAOも、CTU単位で処理することができないという課題がある。 In Non-Patent Document 1 described above, SAO is performed after the deblocking filter. However, the deblocking filter performs the filtering process on two blocks across block boundaries. Therefore, at the CTU boundary, deblocking filtering can not be performed until pixel values (before deblocking filtering) of blocks of CTUs to be processed later in decoding order are generated. That is, the deblocking filter can not be processed on a CTU basis. Therefore, there is a problem that the SAO implemented after the deblocking filter processing can not be processed in CTU units.

 本発明は、SAOをデブロッキングフィルタの前に実施することにより、SAOをCTU単位で処理することを目的とする。 The present invention aims to process SAO on a CTU basis by implementing SAO before deblocking filter.

 本発明の一態様に係る画像フィルタ装置は、画像を所定単位のブロックに分割し、各画素値にオフセットを加算する画像フィルタ装置であって、入力画像の所定単位のブロック(対象ブロック)に、対象画素と隣接画素との大小関係に応じて対象画素のカテゴリ分類を導出する第1のオフセットタイプ、または、対象画素の画素値の大きさにより、対象画素のカテゴリ分類を導出する第2のオフセットタイプという2つのオフセットタイプのいずれかを割り当てる手段と、前記オフセットタイプに応じて前記対象ブロックに異なるフィルタ対象領域を設定する手段と、前記入力画像と前記オフセットタイプを用いて各画素のカテゴリを設定し、オフセットを導出する手段と、前記オフセットタイプに応じて設定されたカテゴリに対応するオフセットを各画素に加算することにより、前記対象ブロックのフィルタ対象領域に対してフィルタ処理を実施する手段とを備え、前記入力画像は、イントラ予測処理あるいはインター予測処理で生成した予測画像と、予測残差信号とを加算した画像であり、前記カテゴリを設定し、オフセットを導出する手段は、前記対象ブロックの前記オフセットタイプが前記第1のオフセットタイプの場合、対象画素値と、オフセットクラスで指定された2個の参照画素値を用いてカテゴリを設定し、カテゴリ毎にオフセットを導出し、前記対象ブロックの前記オフセットタイプが前記第2のオフセットタイプの場合、対象画素値の属するバンドからカテゴリを設定し、カテゴリ毎にオフセットを導出する。 An image filter device according to an aspect of the present invention is an image filter device that divides an image into blocks of a predetermined unit and adds an offset to each pixel value, and the block (target block) of a predetermined unit of an input image The first offset type that derives the category classification of the object pixel according to the magnitude relationship between the object pixel and the adjacent pixel, or the second offset that derives the category classification of the object pixel according to the size of the pixel value of the object pixel A means for assigning one of two offset types, ie, a type, a means for setting different filter target areas in the target block according to the offset type, and a category of each pixel are set using the input image and the offset type Means for deriving an offset, and the category corresponding to the category set according to the offset type. Means for performing filter processing on the filter target area of the target block by adding a set to each pixel, and the input image is a predicted image generated by intra prediction processing or inter prediction processing, and prediction It is an image obtained by adding the residual signal, and the means for setting the category and deriving the offset is specified by the target pixel value and the offset class when the offset type of the target block is the first offset type. A category is set using the two reference pixel values, an offset is derived for each category, and if the offset type of the target block is the second offset type, the category is selected from the band to which the target pixel value belongs. Set and derive the offset for each category.

 上記の構成によれば、SAOをCTU単位で処理するので、遅延を増加させることなく符号化・復号処理ができる。 According to the above configuration, since SAO is processed in CTU units, encoding / decoding processing can be performed without increasing delay.

画像伝送システムの構成を示す概略図である。It is the schematic which shows the structure of an image transmission system. 符号化ストリームのデータの階層構造を示す図である。It is a figure which shows the hierarchical structure of the data of a coding stream. スライスヘッダおよびCTUのシンタックスの一例である。It is an example of the syntax of a slice header and CTU. 動画像復号装置の構成を示す図である。It is a figure which shows the structure of a moving image decoding apparatus. デブロッキングフィルタを説明する図である。It is a figure explaining a de blocking filter. SAOを説明する図である。It is a figure explaining SAO. SAOのシンタックスの一例である。It is an example of the syntax of SAO. SAOのブロック図である。It is a block diagram of SAO. カテゴリ設定部の動作を説明するフローチャートである。It is a flowchart explaining operation | movement of a category setting part. CTU内のデブロッキングフィルタ処理を実施する領域を説明する図である。It is a figure explaining the field which performs the deblocking filter processing in CTU. ループフィルタのブロック図とフローチャートである。FIG. 6 is a block diagram and a flowchart of a loop filter. 従来のSAOの対象領域を説明する図である。It is a figure explaining the object field of conventional SAO. 本発明のSAOの対象領域を説明する図である。It is a figure explaining the object area | region of SAO of this invention. 本発明のSAOの対象領域を説明する別の図である。It is another figure explaining the object area | region of SAO of this invention. SAOのブロック図である。It is a block diagram of SAO. SAOのフローチャートである。It is a flowchart of SAO. 動画像符号化装置の構成を示す図である。It is a figure which shows the structure of a moving image coding apparatus. SAO_Eのブロック図である。It is a block diagram of SAO_E. オフセット情報算出部の動作を説明するフローチャートである。It is a flowchart explaining operation | movement of an offset information calculation part. オフセット情報選択部の動作を説明するフローチャートである。It is a flowchart explaining operation | movement of an offset information selection part. SAO_Eのブロック図である。It is a block diagram of SAO_E. SAOのシンタックスの別の一例である。It is another example of the syntax of SAO. オフセット加算部の動作を説明するフローチャートである。It is a flowchart explaining the operation | movement of an offset addition part. 本実施形態に係る動画像符号化装置を搭載した送信装置、および、動画像復号装置を搭載した受信装置の構成について示した図である。(a)は、動画像符号化装置を搭載した送信装置を示しており、(b)は、動画像復号装置を搭載した受信装置を示している。FIG. 1 is a diagram showing a configuration of a transmitting device equipped with a moving image encoding device according to the present embodiment and a receiving device equipped with a moving image decoding device. (a) shows a transmitting apparatus equipped with a moving picture coding apparatus, and (b) shows a receiving apparatus equipped with a moving picture decoding apparatus. 本実施形態に係る動画像符号化装置を搭載した記録装置、および、動画像復号装置を搭載した再生装置の構成について示した図である。(a)は、動画像符号化装置を搭載した記録装置を示しており、(b)は、動画像復号装置を搭載した再生装置を示している。FIG. 1 is a diagram showing a configuration of a recording apparatus equipped with a moving picture coding apparatus according to the present embodiment and a reproduction apparatus equipped with a moving picture decoding apparatus. (a) shows a recording apparatus equipped with a moving picture coding apparatus, and (b) shows a reproduction apparatus equipped with a moving picture decoding apparatus.

  (第1の実施形態)
 以下、図面を参照しながら本発明の実施形態について説明する。
First Embodiment
Hereinafter, embodiments of the present invention will be described with reference to the drawings.

 図1は、本実施形態に係る画像伝送システム1の構成を示す概略図である。 FIG. 1 is a schematic view showing the configuration of an image transmission system 1 according to the present embodiment.

 画像伝送システム1は、符号化対象画像を符号化した符号化ストリームを伝送し、伝送された符号化ストリームを復号し画像を表示するシステムである。画像伝送システム1は、動画像符号化装置(画像符号化装置)11、ネットワーク21、動画像復号装置(画像復号装置)31及び動画像表示装置(画像表示装置)41を含んで構成される。 The image transmission system 1 is a system that transmits an encoded stream obtained by encoding an image to be encoded, decodes the transmitted encoded stream, and displays an image. The image transmission system 1 includes a moving image coding device (image coding device) 11, a network 21, a moving image decoding device (image decoding device) 31, and a moving image display device (image display device) 41.

 動画像符号化装置11には画像Tが入力される。 An image T is input to the moving picture coding device 11.

 ネットワーク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 video encoding device 11 to the video 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 an encoded stream Te such as a DVD (Digital Versatile Disc) or a BD (Blue-ray (registered trademark) Disc).

 動画像復号装置31は、ネットワーク21が伝送した符号化ストリームTeのそれぞれを復号し、それぞれ復号した1または複数の復号画像Tdを生成する。 The video decoding device 31 decodes each of the encoded streams Te transmitted by the network 21 and generates one or more decoded images Td which are each decoded.

 動画像表示装置41は、動画像復号装置31が生成した1または複数の復号画像Tdの全部または一部を表示する。動画像表示装置41は、例えば、液晶ディスプレイ、有機EL(Electro-luminescence)ディスプレイ等の表示デバイスを備える。ディスプレイの形態としては、据え置き、モバイル、HMD等が挙げられる。 The moving image display device 41 displays all or part of one or more decoded images Td generated by the moving image decoding device 31. The moving image display device 41 includes, for example, a display device such as a liquid crystal display or an organic EL (Electro-luminescence) display. The form of the display may be stationary, mobile, HMD or the like.

  <演算子>
 本明細書で用いる演算子を以下に記載する。
<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 an OR assignment operator.

 ||は、論理和を示す。 || indicates a disjunction.

 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).

 abs(a)はaの絶対値を返す関数である。 Abs (a) is a function that returns the absolute value of a.

 Int(a)はaの整数値を返す関数である。 Int (a) is a function that returns an integer value of a.

 floor(a)はa以下の最大の整数を返す関数である。 Floor (a) is a function that returns the largest integer less than or equal to a.

 a/dはdによるaの除算(小数点以下切り捨て)を表す。 A / d represents the division of a by d (rounding down the decimal point).

 avg(a(i))はa(0)~a(N-1)のN個の平均値を導出する関数である。 Avg (a (i)) is a function for deriving N average values of a (0) to a (N-1).

 min(a(0),a(1),…,a(N-1))はa(0)~a(N-1)の最小値を返す関数である。 Min (a (0), a (1),..., A (N-1)) is a function that returns the minimum value of a (0) to a (N-1).

  <符号化ストリームTeの構造>
 本実施形態に係る動画像符号化装置11および動画像復号装置31の詳細な説明に先立って、動画像符号化装置11によって生成され、動画像復号装置31によって復号される符号化ストリームTeのデータ構造について説明する。
<Structure of Coded Stream Te>
Prior to detailed description of the moving picture coding apparatus 11 and the moving picture decoding apparatus 31 according to the present embodiment, data of the coded stream Te generated by the moving picture coding apparatus 11 and decoded by the moving picture decoding apparatus 31 The structure will be described.

 図2は、符号化ストリームTeにおけるデータの階層構造を示す図である。符号化ストリームTeは、例示的に、シーケンス、およびシーケンスを構成する複数のピクチャを含む。図2の(a)~(f)は、それぞれ、シーケンスSEQを規定する符号化ビデオシーケンス、ピクチャPICTを規定する符号化ピクチャ、スライスヘッダSHとスライスデータSDATAからなるスライスSを規定する符号化スライス、スライスデータに含まれるCTU、CTUに含まれるCUを示す図である。 FIG. 2 is a diagram showing the hierarchical structure of data in the coded stream Te. The coded stream Te illustratively includes a sequence and a plurality of pictures forming the sequence. (A) to (f) in FIG. 2 respectively represent a coded video sequence defining the sequence SEQ, a coded picture defining the picture PICT, and a coding slice defining a slice S composed of a slice header SH and slice data SDATA. 3 is a diagram illustrating CTUs included in slice data and CUs included in CTUs. FIG.

  (符号化ビデオシーケンス)
 符号化ビデオシーケンスでは、処理対象の符号化ストリームTeを復号するために動画像復号装置31が参照するデータの集合が規定されている。符号化ストリームTeは、図2の(a)に示すように、ビデオパラメータセットVPS(Video Parameter Set)、シーケンスパラメータセットSPS(Sequence Parameter Set)、ピクチャパラメータセットPPS(Picture Parameter Set)、ピクチャPICT、及び、付加拡張情報SEI(Supplemental Enhancement Information)を含んでいる。
(Encoded video sequence)
In the encoded video sequence, a set of data to which the moving picture decoding apparatus 31 refers in order to decode the target encoded stream Te is defined. As shown in FIG. 2A, the coded stream Te is a video parameter set VPS (Video Parameter Set), a sequence parameter set SPS (Sequence Parameter Set), a picture parameter set PPS (Picture Parameter Set), a picture PICT, And, supplemental enhancement information SEI (Supplemental Enhancement Information) is included.

 ビデオパラメータセットVPSは、1つ以上のレイヤから構成されている動画像において、複数の動画像に共通する符号化パラメータの集合、および、動画像に含まれる1つ以上のレイヤおよび個々のレイヤに関連する符号化パラメータの集合が規定されている。 A video parameter set VPS is a set of coding parameters common to a plurality of moving images in a moving image composed of one or more layers, and one or more layers and individual layers included in the moving image. A set of related coding parameters is defined.

 シーケンスパラメータセットSPSでは、対象シーケンスを復号するために動画像復号装置31が参照する符号化パラメータの集合が規定されている。例えば、ピクチャの幅や高さが規定される。なお、SPSは複数存在してもよい。その場合、PPSから複数のSPSの何れかを選択する。 In the sequence parameter set SPS, a set of coding parameters to be referred to by the video 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 be referred to by the video decoding device 31 for decoding 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 slice header in the target sequence.

  (符号化ピクチャ)
 符号化ピクチャでは、処理対象のピクチャPICTを復号するために動画像復号装置31が参照するデータの集合が規定されている。ピクチャPICTは、図2の(b)に示すように、スライス0~スライスNS-1を含んでいる(NSはピクチャPICTに含まれるスライスの総数)。
(Coded picture)
In the coded picture, a set of data to which the moving picture decoding apparatus 31 refers in order to decode the picture PICT to be processed is defined. The picture PICT includes slice 0 to slice NS-1 (NS is the total number of slices included in the picture PICT) as shown in (b) of FIG.

 なお、以下、スライス0~スライスNS-1のそれぞれを区別する必要が無い場合、符号の添え字を省略して記述することがある。また、以下に説明する符号化ストリームTeに含まれるデータであって、添え字を付している他のデータについても同様である。 In the following, when it is not necessary to distinguish each of slice 0 to slice NS-1, the 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は、図2の(c)に示すように、スライスヘッダSH、および、スライスデータSDATAを含んでいる。
(Coding slice)
In the coding slice, a set of data to which the moving picture decoding apparatus 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 video 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スライスなどが挙げられる。なお、インター予測は、単予測、双予測に限定されず、より多くの参照ピクチャを用いて予測画像を生成してもよい。以下、P、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. Note that inter prediction is not limited to single prediction and bi prediction, and more reference pictures may be used to generate a predicted image. Hereinafter, when referred to as P and B slices, it refers to a slice including a block for which inter prediction can be used.

 また、スライスヘッダSHには、動画像復号装置31の備える適応オフセットフィルタSAOによって参照されるSAOパラメータSAOP_Sが含まれている。図3(a)は、本実施形態に係る符号化ストリームのスライスヘッダSH(図3(a)においてslice_segment_header()と表記)の一部として含まれる、SAOパラメータSAOP_Sのシンタックス要素を示す図である。SAOパラメータSAOP_Sは、SAO処理のパラメータのオンオフ等を示す情報であり、sllice_sao_luma_flagが1の場合には輝度(Y:色コンポーネントcIdx==0)に対し、SAOをオン、0ならオフとし、slice_sao_chroma_flagが1の場合には色差(Cb:色コンポーネントcIdx==1、及びCr:色コンポーネントcIdx==2)に対し、SAOをオン、0ならオフとする。 In addition, the slice header SH includes the SAO parameter SAOP_S referred to by the adaptive offset filter SAO provided in the video decoding device 31. FIG. 3A is a diagram showing syntax elements of the SAO parameter SAOP_S included as a part of slice header SH of the encoded stream according to the present embodiment (denoted as slice_segment_header () in FIG. 3A). is there. The SAO parameter SAOP_S is information indicating on / off etc. of the parameter of the SAO process, and when sllice_sao_luma_flag is 1, for the luminance (Y: color component cIdx == 0), SAO is turned on, 0 is turned off, and slice_sao_chroma_flag is In the case of 1, for the color difference (Cb: color component cIdx == 1 and Cr: color component cIdx == 2), the SAO is turned on, and when it is 0, it is turned off.

 なお、スライスヘッダSHは、ピクチャパラメータセットPPSへの参照(slice_pic_parameter_set_id)を含んでいても良い。 The slice header SH may include a reference (slice_pic_parameter_set_id) to the picture parameter set PPS.

 スライスデータでは、処理対象のスライスデータSDATAを復号するために動画像復号装置31が参照するデータの集合が規定されている。スライスデータSDATAは、図2の(d)に示すように、符号化ツリーユニットCTU(CTUブロック)を含んでいる。CTUは、スライスを構成する固定サイズ(例えば64x64)のブロックであり、最大符号化単位(LCU:LargestCoding Unit)と呼ぶこともある。 In the slice data, a set of data to which the moving image decoding apparatus 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 (CTU block) as shown in (d) of FIG. The CTU is a block of a fixed size (for example, 64 × 64) that configures a slice, and may also be referred to as a largest coding unit (LCU: Largest Coding Unit).

  (符号化ツリーユニット)
 図2の(d)には、符号化ツリーユニットCTUを復号するために動画像復号装置31が参照するデータの集合が規定されている。図2の(d)が示すように、CTUは、CTUヘッダ、および、符号化ユニットCU(CUブロック)を含んでいる。
(Encoding tree unit)
In (d) of FIG. 2, a set of data to which the video decoding device 31 refers to to decode the coding tree unit CTU is defined. As (d) in FIG. 2 shows, the CTU includes a CTU header and a coding unit CU (CU block).

 CTUヘッダには、対象CTUの復号方法を決定するために動画像復号装置31が参照する符号化パラメータが含まれる。具体的には、対象CTUの各CUへの分割パターンを指定する分割情報SP_CU、量子化ステップの大きさを指定する量子化パラメータ差分Δqp(qp_delta)、および、SAOで参照されるSAOパラメータSAOP_Cが含まれる。 The CTU header includes a coding parameter to which the video decoding device 31 refers in order to determine the decoding method of the target CTU. Specifically, division information SP_CU specifying a division pattern to each CU of the target CTU, quantization parameter difference Δqp (qp_delta) specifying the size of quantization step, and SAO parameter SAOP_C referred to by SAO are included. included.

 分割情報SP_CUは、CTUを分割するための符号化ツリーを表す情報であり、具体的には、対象CTUに含まれる各CUの形状、サイズ、および、対象CTU内での位置を指定する情報である。 The division information SP_CU is information representing a coding tree for dividing a CTU, and more specifically, information specifying the shape, size, and position within the target CTU of each CU included in the target CTU. is there.

 また、量子化パラメータ差分Δqpは、対象CTUにおける量子化パラメータqpと、当該対象CTUの直前に符号化されたCTUにおける量子化パラメータqp’との差分qp-qp’である。 The quantization parameter difference Δqp is the difference qp−qp ′ between the quantization parameter qp in the target CTU and the quantization parameter qp ′ in the CTU encoded immediately before the target CTU.

 また、SAOパラメータSAOP_Cは、動画像復号装置31の備えるSAOによって参照されるパラメータである。図3(b)は、本実施形態に係る符号化ストリームのCTU(図3(b)においてcoding_tree_unit()と表記)の一部として含まれる、SAOパラメータSAOP_Cの各シンタックス要素を示す図である。SAOパラメータSAOP_Cは、後述のSAOユニット情報sao_unit()をシンタックス要素として含む。 In addition, the SAO parameter SAOP_C is a parameter referred to by the SAO included in the video decoding device 31. FIG. 3B is a diagram showing syntax elements of the SAO parameter SAOP_C included as part of the CTU (denoted as coding_tree_unit () in FIG. 3B) of the coded stream according to the present embodiment. . The SAO parameter SAOP_C includes, as a syntax element, SAO unit information sao_unit () described later.

 図2の(e)には、対象CTUを復号するために動画像復号装置31が参照するデータの集合が規定されている。CTUは、再帰的な4分木分割(QT分割)または2分木分割(BT分割)により符号化処理の基本的な単位である符号化ユニットCUに分割される。再帰的な4分木分割または2分木分割により得られる木構造を符号化ツリー(CT:Coding Tree)、木構造のノードのことを符号化ノード(CN:Coding Node)と称する。4分木及び2分木の中間ノードは、符号化ノードであり、CTU自身も最上位の符号化ノードとして規定される。 In (e) of FIG. 2, a set of data to which the moving picture decoding apparatus 31 refers to to decode a target CTU is defined. The CTU is divided into a coding unit CU which is a basic unit of coding processing by recursive quadtree division (QT division) or binary tree division (BT division). A tree structure obtained by recursive quadtree division or binary tree division is called a coding tree (CT: Coding Tree), and nodes of the tree structure are called a coding node (CN: Coding Node). The intermediate nodes of the quadtree and binary tree are coding nodes, and the CTU itself is also defined as the highest coding node.

 CTは、CT情報として、QT分割を行うか否かを示すQT分割フラグ(cu_split_flag)、及びBT分割の分割方法を示すBT分割モード(split_bt_mode)を含む。 The CT includes, as CT information, a QT split flag (cu_split_flag) indicating whether or not to perform QT split, and a BT split mode (split_bt_mode) indicating a split method of BT split.

  (符号化ユニット)
 図2の(f)には、対象CUを復号するために動画像復号装置31が参照するデータの集合が規定されている。具体的には、CUは、予測ツリー、変換ツリー、CUヘッダCUHから構成される。CUヘッダでは予測モード、分割方法(PU分割モード)等が規定される。
(Coding unit)
In (f) of FIG. 2, a set of data to which the moving picture decoding apparatus 31 refers to to decode the target CU is defined. Specifically, a CU 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:Prediction Unit)の予測パラメータ(参照ピクチャインデックス、動きベクトル等)が規定される。別の表現でいえば、PUは、CUを構成する1または複数の重複しない領域である。また、予測ツリーは、上述の分割により得られた1または複数のPUを含む。なお、以下では、PUをさらに分割した予測単位を「サブブロック」と呼ぶ。サブブロックは、複数の画素によって構成されている。PUとサブブロックのサイズが等しい場合には、PU中のサブブロックは1つである。PUがサブブロックのサイズよりも大きい場合には、PUは、サブブロックに分割される。たとえばPUが8x8、サブブロックが4x4の場合には、PUは水平に2分割、垂直に2分割からなる、4つのサブブロックに分割される。 In the prediction tree, prediction parameters (reference picture index, motion vector, etc.) of each prediction unit (PU: Prediction Unit) obtained by dividing a coding unit into one or more are defined. Put another way, a PU is one or more non-overlapping regions that make up a CU. Also, the prediction tree includes one or more PUs obtained by the above-mentioned division. In addition, below, the prediction unit which divided | segmented PU further is called a "subblock." The sub block is composed of a plurality of pixels. When PU and subblocks have the same size, there is one subblock in PU. If the PU is larger than the size of the subblock, the PU is divided into subblocks. For example, if the PU is 8x8 and the sub-blocks are 4x4, the PU is divided into four sub-blocks, 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 prediction 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(CUと同一サイズ)、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 the PU division mode (part_mode) of the coded stream, and 2Nx2N (same size as CU), 2NxN, 2NxnU, 2NxnD, Nx2N, nLx2N, nRx2N, and NxN There is. 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.

 また、変換ツリーにおいては、CUが1または複数の変換ユニットTUに分割され、各TUの位置とサイズとが規定される。別の表現でいえば、TUは、CUを構成する1または複数の重複しない領域のことである。また、変換ツリーは、上述の分割より得られた1または複数のTUを含む。 In addition, in the transformation tree, a CU is divided into one or more transformation units TU, and the position and size of each TU are defined. In other words, a TU is one or more non-overlapping regions that make up a CU. Also, the transformation tree includes one or more TUs obtained by the above-mentioned division.

 変換ツリーにおける分割には、CUと同一のサイズの領域をTUとして割り付けるものと、上述したCUの分割と同様、再帰的な4分木分割によるものがある。 Partitions in the transformation tree may be allocated as an area of the same size as a CU as TU, or by recursive quadtree partitioning, as in the case of CU partitioning described above.

 変換処理は、このTUごとに行われる。 The conversion process is performed for each TU.

  (予測パラメータ)
 予測ユニットPUの予測画像は、PUに付随する予測パラメータによって導出される。予測パラメータには、イントラ予測の予測パラメータもしくはインター予測の予測パラメータがある。
(Prediction parameter)
The prediction image of the prediction unit PU is derived by the prediction parameters associated with the PU. The prediction parameters include intra prediction prediction parameters or inter prediction prediction parameters.

  (動画像復号装置の構成)
 図4に本発明の動画像復号装置(画像復号装置)31を示す。
(Configuration of video decoding device)
FIG. 4 shows a moving picture decoding apparatus (image decoding apparatus) 31 according to the present invention.

 動画像復号装置31は、エントロピー復号部301、予測パラメータ復号部(予測画像復号装置)302、ループフィルタ305、参照ピクチャメモリ306、予測パラメータメモリ307、予測画像生成部(予測画像生成装置)308、逆量子化・逆変換部311、及び加算部312を含んで構成される。 The moving picture decoding apparatus 31 includes an entropy decoding unit 301, a prediction parameter decoding unit (predicted image decoding apparatus) 302, a loop filter 305, a reference picture memory 306, a prediction parameter memory 307, a predicted image generation unit (predicted image generation apparatus) 308, The configuration includes an inverse quantization / inverse transform unit 311 and an addition unit 312.

 また、予測パラメータ復号部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.

 また、以降では処理の単位としてCTU、CU、PU、TUを使用した例を記載するが、この例に限らず、TUあるいはPU単位の代わりにCU単位で処理をしてもよい。あるいはCTU、CU、PU、TUをブロックと読み替え、ブロック単位の処理としてもよい。 Moreover, although the example which used CTU, CU, PU, and TU as a process unit below is described, you may process not only this example but CU unit instead of TU or PU unit. Alternatively, CTU, CU, PU, and TU may be replaced with blocks, and processing may be performed in units of blocks.

 エントロピー復号部301は、外部から入力された符号化ストリームTeに対してエントロピー復号を行って、個々の符号(シンタックス要素)を分離し復号する。エントロピー符号化には、シンタックスの種類や周囲の状況に応じて適応的に選択したコンテキスト(確率モデル)を用いてシンタックスを可変長符号化・復号する方式CABAC(Context-based Adaptive Binary Arithmetic Coding)と、あらかじめ定められた表、あるいは計算式を用いてシンタックスを可変長符号化する方式CAVLC(Context-based Adaptive Variable Length Coding)がある。分離された符号には、予測画像を生成するための予測パラメータおよび、残差信号を生成するための残差情報などがある。 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). In entropy coding, CABAC (Context-based Adaptive Binary Arithmetic Coding), which uses variable-length coding / decoding of syntax using a context (probability model) that is adaptively selected according to the kind of syntax and surrounding circumstances. And CAV (Context-based Adaptive Variable Length Coding) in which syntax is variable-length encoded using a predetermined table or a formula. The separated codes include prediction parameters for generating a prediction image and residual information for generating a residual signal.

 エントロピー復号部301は、分離した符号の一部を予測パラメータ復号部302に出力する。エントロピー復号部301は、量子化変換係数を逆量子化・逆変換部311に出力する。この量子化変換係数は、符号化処理において、残差信号に対してDCT(Discrete Cosine Transform、離散コサイン変換)、DST(Discrete Sine Transform、離散サイン変換)、KLT(Karyhnen Loeve Transform、カルーネンレーベ変換)等の周波数変換を行い量子化して得られる係数である。また、エントロピー復号部301は、符号化ストリームからSAOパラメータSAOP_S、SAOP_Cを復号し、それらを適応オフセットフィルタ(SAO)3052に供給する。 The entropy decoding unit 301 outputs a part of the separated code to the prediction parameter decoding unit 302. The entropy decoding unit 301 outputs the quantized transform coefficient to the inverse quantization / inverse transform unit 311. The quantization transform coefficients are used to encode the residual signal by discrete cosine transform (DCT), discrete sine transform (DST), Karynen Loeve transform, and Karhunen Loeve transform in a coding process. Etc.) and is obtained by quantization. Further, the entropy decoding unit 301 decodes the SAO parameters SAOP_S and SAOP_C from the encoded stream, and supplies them to the adaptive offset filter (SAO) 3052.

 インター予測パラメータ復号部303は、エントロピー復号部301から入力された符号に基づいて、予測パラメータメモリ307に記憶された予測パラメータを参照してインター予測パラメータを復号する。また、インター予測パラメータ復号部303は、復号したインター予測パラメータを予測画像生成部308に出力し、また予測パラメータメモリ307に記憶する。 The inter prediction parameter decoding unit 303 decodes the inter prediction parameter with reference to the prediction parameter stored in the prediction parameter memory 307 based on the code input from the entropy decoding unit 301. Further, 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.

 イントラ予測パラメータ復号部304は、エントロピー復号部301から入力された符号に基づいて、予測パラメータメモリ307に記憶された予測パラメータを参照してイントラ予測パラメータを復号する。イントラ予測パラメータ復号部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 decoding unit 304 outputs the decoded intra prediction parameter to the prediction image generation unit 308, and stores it in the prediction parameter memory 307.

 ループフィルタ305は、加算部312が生成したCUの復号画像に対し、デブロッキングフィルタ、サンプル適応オフセットフィルタ(SAO:Sample Adaptive Offset)、適応ループフィルタ(ALF:Adaptive Loop Filter)等のフィルタを施す。なお、ループフィルタ305は動画像符号装置11と対になっていれば、必ずしも上記3種類のフィルタを含まなくてもよく、例えばデブロッキングフィルタのみの構成であってもよい。ループフィルタ305の詳細は後述する。 The loop filter 305 applies filters such as a deblocking filter, a sample adaptive offset filter (SAO), and an adaptive loop filter (ALF) to the decoded image of the CU generated by the adding unit 312. The loop filter 305 may not necessarily include the above three types of filters as long as the loop filter 305 is paired with the moving picture coding device 11. For example, the loop filter 305 may have only a deblocking filter. Details of the loop filter 305 will be described later.

 参照ピクチャメモリ306は、加算部312が生成したCUの復号画像を、復号対象のピクチャ及びCTUあるいは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 of the picture to be decoded and the CTU or CU.

 予測パラメータメモリ307は、予測パラメータを、復号対象のピクチャ及び予測ユニット(もしくはサブブロック、固定サイズブロック、ピクセル)毎に予め定めた位置に記憶する。具体的には、予測パラメータメモリ307は、インター予測パラメータ復号部303が復号したインター予測パラメータ、イントラ予測パラメータ復号部304が復号したイントラ予測パラメータ及びエントロピー復号部301が分離した予測モードを記憶する。 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 separated by the entropy decoding unit 301.

 予測画像生成部308には、エントロピー復号部301から入力された予測モードpredModeが入力され、また予測パラメータ復号部302から予測パラメータが入力される。また、予測画像生成部308は、参照ピクチャメモリ306から参照ピクチャを読み出す。 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.

 予測モードpredModeがインター予測モードを示す場合、インター予測画像生成部309は、インター予測パラメータ復号部303から入力されたインター予測パラメータと読み出した参照ピクチャ(参照ピクチャブロック)を用いてインター予測によりブロックもしくはサブブロックの予測画像を生成する。 When the prediction mode predMode indicates the inter prediction mode, the inter prediction image generation unit 309 performs block or inter prediction by using the inter prediction parameter input from the inter prediction parameter decoding unit 303 and the read reference picture (reference picture block). Generate a predicted image of subblocks.

 予測モードpredModeがイントラ予測モードを示す場合、イントラ予測画像生成部310は、イントラ予測パラメータ復号部304から入力されたイントラ予測パラメータと読み出した参照画素を用いてイントラ予測を行う。 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 pixel.

 予測画像生成部308は、インター予測画像生成部309あるいはイントラ予測画像生成部310が生成したブロックの予測画像を加算部312に出力する。 The prediction image generation unit 308 outputs the prediction image of the block generated by the inter prediction image generation unit 309 or the intra prediction image generation unit 310 to the addition unit 312.

 逆量子化・逆変換部311は、エントロピー復号部301から入力された量子化変換係数を逆量子化して変換係数を求める。逆量子化・逆変換部311は、求めた変換係数について逆DCT、逆DST、逆KLT等の逆周波数変換を行い、残差信号を算出する。逆量子化・逆変換部311は、算出した残差信号を加算部312に出力する。 The inverse quantization / inverse transform unit 311 inversely quantizes the quantized transform coefficient input from the entropy decoding unit 301 to obtain a transform coefficient. The inverse quantization / inverse transform unit 311 performs inverse frequency transform such as inverse DCT, inverse DST, and inverse KLT on the obtained transform coefficient to calculate a residual signal. The inverse quantization / inverse transform unit 311 outputs the calculated residual signal to the addition unit 312.

 加算部312は、インター予測画像生成部309または予測画像生成部308から入力されたブロックの予測画像と逆量子化・逆変換部311から入力された残差信号を画素毎に加算して、ブロックの復号画像を生成する。加算部312は、生成したブロックの復号画像をデブロッキングフィルタ3051、SAO3052、またはALF3053の少なくとも何れかに出力する。 The addition unit 312 adds, for each pixel, the prediction image of the block input from the inter prediction image generation unit 309 or the prediction image generation unit 308 and the residual signal input from the inverse quantization / inverse conversion unit 311. Generate a decoded image of The addition unit 312 outputs the generated decoded image of the block to at least one of the deblocking filter 3051, the SAO 3052, and the ALF 3053.

  (ループフィルタ305)
 図4(b)は、ループフィルタ(画像フィルタ装置)305の構成を示すブロック図である。図4(b)に示すように、ループフィルタ305は、デブロッキングフィルタ3051、SAO3052、ALF3053を備える。ループフィルタへの入力は、予測画像生成部308で生成された予測画像と、逆量子化・逆変換部311で導出された残差信号を、加算部312で加算した復号画像(フィルタ前復号画像)である。
(Loop filter 305)
FIG. 4B is a block diagram showing the configuration of the loop filter (image filter device) 305. As shown in FIG. 4B, the loop filter 305 includes a deblocking filter 3051, an SAO 3052, and an ALF 3053. The input to the loop filter is a decoded image in which the predicted image generated by the predicted image generation unit 308 and the residual signal derived by the inverse quantization / inverse conversion unit 311 are added by the addition unit 312 (pre-filter decoded image ).

  (デブロッキングフィルタ3051)
 デブロッキングフィルタ3051は、ブロック(CTU/CU/PU/TU)境界を介して隣接する画素の画素値の差が予め定められた範囲内である場合には、ブロック歪みが存在すると判定する。そして、デブロッキングフィルタ前復号画像における当該ブロック境界に対してデブロッキング処理を施すことによって、当該ブロック境界付近の画像の平滑化を行う。デブロッキングフィルタ3051によりデブロッキング処理が施された画像は、デブロック済復号画像P_DBである。例えば、以下の式でデブロッキングフィルタのオンオフ判定を行う。
(Deblocking filter 3051)
The deblocking filter 3051 determines that block distortion is present when the difference between the pixel values of the adjacent pixels through the block (CTU / CU / PU / TU) boundary is within a predetermined range. Then, the block boundary in the pre-deblocking filter image is subjected to deblocking processing to smooth the image in the vicinity of the block boundary. The image subjected to the deblocking processing by the deblocking filter 3051 is a deblocked decoded image P_DB. For example, the on / off determination of the deblocking filter is performed by the following equation.

  abs(p20-2*p10+p00)+ abs(p23-2*p13+p03)+abs(q20-2*q10+q00)+abs(q23-2*q13+q03)<β   (式DB-1)
 ここで、p2k, p1k, p0k, q0k, q1k, q2kは各々、図5に示すように、ブロック境界からの距離が2, 1, 0, 0, 1, 2の画素の列または行である。p2k, p1k, p0kは境界を接するブロックP、ブロックQのうちブロックPに含まれる画素であり、q0k, q1k, q2kはブロックQに含まれる画素である。kはブロック境界方向の画素の番号を示し、k>=0である。βは、ブロックPとブロックQの量子化パラメータの平均値QPavgと、PPSあるいはスライスヘッダSHで通知されたpps_beta_offset_div2、slice_beta_offset_div2から導出される閾値である。(式DB-1)を満たす場合、ブロックPとブロックQの境界に対し、デブロッキングフィルタをオンにする(実施する)。また、下式でデブロッキングフィルタ処理を行う。
abs (p20-2 * p10 + p00) + abs (p23-2 * p13 + p03) + abs (q20-2 * q10 + q00) + abs (q23-2 * q13 + q03) <β (Formula DB-1 )
Here, p2k, p1k, p0k, q0k, q1k and q2k are respectively a column or a row of pixels having a distance of 2, 1, 0, 0, 1, 2 from the block boundary as shown in FIG. p2k, p1k, and p0k are pixels included in the block P among the blocks P and Q bordering the boundary, and q0k, q1k, and q2k are pixels included in the block Q. k indicates the pixel number in the block boundary direction, and k> = 0. β is a threshold value derived from the average value QPavg of quantization parameters of the block P and the block Q, and pps_beta_offset_div2 and slice_beta_offset_div2 notified by the PPS or the slice header SH. If (Expression DB-1) is satisfied, the deblocking filter is turned on (implemented) for the boundary between block P and block Q. In addition, deblocking filter processing is performed by the following equation.

  p2' = Clip3(p2 - 2*tc, p2 + 2*tc, (2*p3 + 3*p2 + p1 + p0 + q0 + 4)>>3) (式DB-2)
  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)
 (式DB-2)は、図5中の各k(k>=0)に対し共通の処理であるので、kを省略した。p3, p2, p1, p0, q0, q1, q2, q3は各々、ブロック境界からの距離が3, 2, 1, 0, 0, 1, 2, 3の画素の列または行である。tcは、フィルタ処理を抑制するための変数であり、ブロックPとブロックQの量子化パラメータの平均値QPavgと、PPSあるいはスライスヘッダSHで通知されたpps_tc_offset_div2、slice_tc_offset_div2等から導出される閾値である。
p2 '= Clip3 (p2-2 * tc, p2 + 2 * tc, (2 * p3 + 3 * p2 + p1 + p0 + q0 + 4) >> 3) (Expression DB-2)
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)
(Formula DB-2) is a process common to each k (k> = 0) in FIG. 5, so k is omitted. Each of p3, p2, p1, p0, q0, q1, q2 is a column or row of pixels having a distance of 3, 2, 1, 0, 0, 1, 2, 3 from the block boundary. tc is a variable for suppressing the filter processing, and is a threshold value derived from the average value QPavg of the quantization parameter of the block P and the block Q, pps_tc_offset_div2, slice_tc_offset_div2 notified by the PPS or the slice header SH, and the like.

 以上のように、デブロッキングフィルタは、境界を接する2つのブロックにおいて、境界から各々4画素の画素値を参照し、境界から各々3画素の画素値を変更する。つまり、ブロック境界がCTU境界の場合、デブロッキング処理には、隣接する異なるCTUに属するブロックの画素が必要である。そのため、デブロッキング処理をCTU単位で実施することはできない。 As described above, the deblocking filter refers to pixel values of 4 pixels from the boundary and changes pixel values of 3 pixels from the boundary in two blocks bordering the boundary. That is, when the block boundary is a CTU boundary, the deblocking process requires pixels of blocks belonging to adjacent different CTUs. Therefore, deblocking processing can not be performed in CTU units.

  (SAO3052)
 SAOはCTU毎に通知されたSAOパラメータを用いた処理であり、リンギング歪や量子化歪を除去する効果がある。SAO3052は、入力画像にSAO処理を施すことによって、SAO済復号画像P_SAOを生成する。SAOは画素値をいくつかのカテゴリに分類し、カテゴリ毎に画素単位にオフセットを加減算するフィルタである。SAOはエッジオフセット(EO:Edge Offset、第1のオフセット)とバンドオフセット(BO:Band Offset、第2のオフセット)の2種類のオフセットタイプを持ち、CTU内画素値のカテゴリ分類方法は、このオフセットタイプによって決まる。
(SAO3052)
SAO is a process using SAO parameters notified for each CTU, and has an effect of removing ringing distortion and quantization distortion. The SAO 3052 generates the SAO-completed decoded image P_SAO by performing SAO processing on the input image. The SAO is a filter that classifies pixel values into several categories, and adds / subtracts an offset in units of pixels for each category. The SAO has two types of offset types: edge offset (EO: Edge Offset, first offset) and band offset (BO: Band Offset, second offset), and the category classification method of pixel values in CTU is this offset. It depends on the type.

 EOは、対象画素と隣接画素(参照画素、図6(a)参照)との大小関係に応じて対象画素をカテゴリ分類する。BOは対象画素の画素値の大きさにより、対象画素をカテゴリ分類する(図6(c)参照)。EO、BOともにカテゴリ毎に定められたオフセットを、対象画素の画素値に加算する。 EO classifies the target pixel according to the magnitude relationship between the target pixel and the adjacent pixel (reference pixel, see FIG. 6A). The BO classifies the target pixel according to the size of the pixel value of the target pixel (see FIG. 6C). An offset defined for each category for both EO and BO is added to the pixel value of the target pixel.

 EOは対象画素の8方向の隣接画素を参照し、対象画素値を変更する。つまり、CTU境界では、EO処理に、隣接する異なるCTUの画素が参照画素として必要である。一方、BOは対象画素値自身を参照し、対象画素値を変更する。つまり、BO処理はCTU単位で実施することができる。 EO refers to adjacent pixels in eight directions of the target pixel and changes the target pixel value. That is, at the CTU boundary, pixels of different CTUs adjacent to each other are required as reference pixels for EO processing. On the other hand, BO refers to the target pixel value itself and changes the target pixel value. That is, BO processing can be performed in CTU units.

  (SAOユニット)
 図7は、本実施形態に係る符号化ストリームのSAOユニット(図7においてsao_unit()と表記)のシンタックスを示す図である。SAOユニットはCTU毎に通知され、SAOオフセット情報sao_offset()、および、SAOオフセット情報のマージ制御情報(sao_merge_left_flag, sao_merge_up_flag)をシンタックス要素として含む。sao_merge_left_flagは、対象CTUのSAOオフセット情報を、対象CTUの左隣接CTUから複製するか否かを示すフラグである。sao_merge_up_flagは、対象CTUのSAOオフセット情報を、対象CTUの上隣接CTUから複製するか否かを示すフラグである。SAOオフセット情報はオフセットタイプ(sao_type_idx)、画素値域内でオフセットを適用するバンドの位置を示すインデックス(バンドオフセット位置、sao_band_position)、オフセットクラス(EOの参照画素位置、sao_eo_class)、オフセットの値(sao_offset)を含む。sao_offsetは、オフセットの絶対値sao_offset_absとオフセットの符号sao_offset_signからなる。sao_band_positionは、オフセットタイプがBOである場合に用いられる。なお、符号化ストリーム中のオフセットの値は、量子化された値や、線形予測等の予測値を用いてオフセット値を導出する残差信号として符号化されても良い。sao_type_idxとsao_offsetについては後述する。なお、図7のシンタックスの後に続く”_luma”あるいは”_chroma”は、各々輝度用あるいは色差用のシンタックスであることを示す。
(SAO unit)
FIG. 7 is a diagram showing the syntax of the SAO unit (denoted as sao_unit () in FIG. 7) of the coded stream according to the present embodiment. The SAO unit is notified for each CTU, and includes SAO offset information sao_offset () and merge control information (sao_merge_left_flag, sao_merge_up_flag) of SAO offset information as syntax elements. sao_merge_left_flag is a flag indicating whether or not SAO offset information of the target CTU is to be copied from the left adjacent CTU of the target CTU. sao_merge_up_flag is a flag indicating whether or not SAO offset information of the target CTU is to be copied from the upper adjacent CTU of the target CTU. SAO offset information is an offset type (sao_type_idx), an index (band offset position, sao_band_position) indicating the position of the band to which the offset is applied within the pixel value range, an offset class (reference pixel position of EO, sao_eo_class), and an offset value (sao_offset) including. sao_offset consists of the absolute value of the offset sao_offset_abs and the sign of the offset sao_offset_sign. sao_band_position is used when the offset type is BO. Note that the value of the offset in the coded stream may be encoded as a residual signal that derives the offset value using a quantized value or a prediction value such as linear prediction. The sao_type_idx and sao_offset will be described later. Note that “_luma” or “_chroma” following the syntax in FIG. 7 indicates that it is a syntax for luminance or chrominance, respectively.

 なお、図3、図7に示したDescriptor(記述子)について説明する。ue(v)は、この記述子に関連付けられたシンタックスは符号なしの数値であり、値が可変長符号化されることを示している。se(v)は、この記述子に関連付けられたシンタックスは符号付きの数値であり、可変長符号化されることを示している。ae(v)は、この記述子に関連づけられたシンタックスが算術符号を用いて可変長符号化されることを示している。u(n)は、この記述子に関連付けられたシンタックスは符号なしの数値であり、nビットの固定長符号化が用いられることを示している。f(n)は、固定値のビットパターンが用いられることを示している。 The Descriptor shown in FIG. 3 and FIG. 7 will be described. ue (v) indicates that the syntax associated with this descriptor is an unsigned numeric value, and that the value is variable-length encoded. se (v) indicates that the syntax associated with this descriptor is a signed numeric value and is variable-length encoded. ae (v) indicates that the syntax associated with this descriptor is variable-length encoded using an arithmetic code. u (n) indicates that the syntax associated with this descriptor is an unsigned numeric value, and n-bit fixed-length coding is used. f (n) indicates that a fixed value bit pattern is used.

 次に、オフセットタイプsao_type_idxとオフセットsao_offsetについて、さらに詳細に説明する。 Next, the offset type sao_type_idx and the offset sao_offset will be described in more detail.

  (sao_type_idx)
 sao_type_idxは、オフセットタイプを表す識別子である。sao_type_idxは、カラー成分毎に、所定の単位(SAOユニット、例えばCTU)に対して割り当てられる。従って、所定の単位毎のタイプは、sao_type_idx[cIdx][rx][ry]と表される。添字cIdxは輝度、色差Cr、色差Cbのいずれかを示すインデックスであり、rxおよびryはそれぞれ、対象となる所定の単位の左上位置のxおよびy座標を示す。本実施形態では、sao_type_idx[cIdx][rx][ry]を、単にsao_type_idxやオフセットタイプと呼称することもある。単にsao_type_idxと呼称する場合においても、必要な個々の値はsao_type_idx[cIdx][rx][ry]として参照することが可能である。以降では、所定の単位をCTUとして説明するが、所定の単位はこれに限定されない。
(Sao_type_idx)
sao_type_idx is an identifier representing an offset type. sao_type_idx is assigned to a predetermined unit (SAO unit, for example, CTU) for each color component. Therefore, the type for each predetermined unit is expressed as sao_type_idx [cIdx] [rx] [ry]. The subscript cIdx is an index indicating any of luminance, color difference Cr, and color difference Cb, and rx and ry respectively indicate x and y coordinates of the upper left position of a predetermined unit to be an object. In the present embodiment, sao_type_idx [cIdx] [rx] [ry] may be referred to simply as sao_type_idx or an offset type. Even when simply called sao_type_idx, the necessary individual values can be referred to as sao_type_idx [cIdx] [rx] [ry]. Hereinafter, although the predetermined unit is described as CTU, the predetermined unit is not limited to this.

 オフセットタイプには、大きく分けてエッジオフセット(EO)とバンドオフセット(BO)の2種類がある。EOは、対象画素の画素値とその周辺画素の画素値との差分に応じて、対象画素の画素値に複数のオフセットの何れかを加算する処理である。また、BOは、対象画素値に応じて、対象画素の画素値に複数のオフセットの何れかを加算する処理である。 There are two types of offset types: edge offset (EO) and band offset (BO). EO is processing for adding one of a plurality of offsets to the pixel value of the target pixel according to the difference between the pixel value of the target pixel and the pixel values of the peripheral pixels. Further, BO is a process of adding one of a plurality of offsets to the pixel value of the target pixel according to the target pixel value.

 本実施形態において、sao_type_idxは、0から2までの整数値をとり、SAO前復号画像に対して、どのようなフィルタ処理を行うか、あるいはフィルタ処理を行わないかを示す。具体的には以下の通りである。
・sao_type_idx=0は、対象CTUにおけるSAO前復号画像に対して、SAOを行わないことを示す。
・sao_type_idx=2は、対象CTUにおけるSAO前復号画像に対して、EOを行うことを示す。EOでは、参照画素位置を示すsao_eo_classが符号化される。
・sao_type_idx=1は、対象CTUにおけるSAO前復号画像に対して、BOを行うことを示す。BOでは、処理を行う画素値帯の左端位置を指定するsao_band_positionが符号化される。
In the present embodiment, sao_type_idx takes an integer value from 0 to 2 and indicates what kind of filter processing is to be performed or no filter processing is to be performed on the SAO pre-decoded image. Specifically, it is as follows.
-Sao_type_idx = 0 indicates that SAO is not performed on the SAO pre-decoded image in the target CTU.
-Sao_type_idx = 2 indicates that EO is performed on the SAO pre-decoded image in the target CTU. In EO, sao_eo_class indicating the reference pixel position is encoded.
-Sao_type_idx = 1 indicates that BO is performed on the SAO pre-decoded image in the target CTU. In BO, sao_band_position which specifies the left end position of the pixel value band to be processed is encoded.

  (SaoOffsetVal)
 sao_offset_abs[cIdx][rx][ry][i]とsao_offset_sign[cIdx][rx][ry][i]は、本実施形態に係るSAO処理において、対象CTUに含まれる各画素に加算されるオフセット値の導出に用いられるパラメータである。本実施形態では、sao_offset_abs[cIdx][rx][ry][i]、sao_offset_sign[cIdx][rx][ry][i]を単にsao_offset_abs、sao_offset_signあるいはオフセット値と呼称することもある。単にsao_offset_abs、sao_offset_signと呼称する場合においても、必要な個々の値はsao_offset[cIdx][rx][ry][i]とsao_offset_sign[cIdx][rx][ry][i]として参照することが可能である。
(SaoOffsetVal)
sao_offset_abs [cIdx] [rx] [ry] [i] and sao_offset_sign [cIdx] [rx] [ry] [i] are offsets added to the respective pixels included in the target CTU in the SAO process according to the present embodiment. It is a parameter used to derive a value. In the present embodiment, sao_offset_abs [cIdx] [rx] [ry] [i] and sao_offset_sign [cIdx] [rx] [ry] [i] may be simply referred to as sao_offset_abs, sao_offset_sign or an offset value. Even when simply called sao_offset_abs or sao_offset_sign, the necessary individual values can be referred to as sao_offset [cIdx] [rx] [ry] [i] and sao_offset_sign [cIdx] [rx] [ry] [i] It is.

 sao_offset_abs[cIdx][rx][ry][i]とsao_offset_sign[cIdx][rx][ry][i]は、上述の引数cIdx、rx、ryに加えて、i(後述のカテゴリcatに対応)によって指定される。カテゴリについては後述する。 sao_offset_abs [cIdx] [rx] [ry] [i] and sao_offset_sign [cIdx] [rx] [ry] [i] are i in addition to the above arguments cIdx, rx, ry, corresponding to the category cat described later Specified by The categories will be described later.

 なお、本実施形態におけるSAOの処理では、オフセットの絶対値sao_offset_absと符号sao_offset_signを符号化ストリームに含め、SAO3052は、sao_offset_absとsao_offset_signから実際に用いられるオフセット値SaoOffsetValを導出して用いる。 In the process of SAO in this embodiment, the absolute value sao_offset_abs of the offset and the code sao_offset_sign are included in the encoded stream, and the SAO 3052 derives and uses the offset value SaoOfftVal actually used from sao_offset_abs and sao_offset_sign.

  SaoOffsetVal[cIdx][rx][ry][i+1] = (1-2*sao_offset_sign[cIdx][rx][ry][i]) * sao_offset_abs[cIdx][rx][ry][i] << log2OffsetScale  (式SAO-1)
 ここでlog2OffsetScaleは、オフセットを量子化する場合に用いる量子化パラメータで通常0, 1, 2等の値を用いる。
SaoOffsetVal [cIdx] [rx] [ry] [i + 1] = (1-2 * sao_offset_sign [cIdx] [rx] [ry] [i]) * sao_offset_abs [cIdx] [rx] [ry] [i] <<log2OffsetScale (equation SAO-1)
Here, log2OffsetScale is a quantization parameter used when quantizing the offset, and typically uses a value such as 0, 1, 2, or the like.

 また、導出された各画素に加算されるオフセットの値の符号を導出するためのパラメータとしてsao_offset_signが符号化される。sao_offset_signは、加算されるオフセット値が0以外のときに符号化する。 Further, sao_offset_sign is encoded as a parameter for deriving the sign of the value of the offset to be added to each derived pixel. sao_offset_sign is encoded when the offset value to be added is other than zero.

 次に、sao_offsetの値の範囲について説明する。 Next, the range of values of sao_offset will be described.

 オフセットタイプsao_type_idxが2の場合、すなわちEOのオフセットsao_offsetにおいては、値域は、
  0 から (1<<(min(bitDepth,bitDepthTh)-bitDepthD))-1 
である。ここで、bitDepthはSAOの対象となる画素値のビット深度を表す値、bitDepthThはオフセット値を量子化する下限のビット深度、bitDepthDはオフセット値の値域のビット数を調整する値である。
When the offset type sao_type_idx is 2, that is, at the offset sao_offset of EO, the range is
From 0 to (1 << (min (bitDepth, bitDepthTh) -bitDepthD))-1
It is. Here, bitDepth is a value representing the bit depth of the pixel value to be subjected to SAO, bitDepthTh is the lower limit bit depth for quantizing the offset value, and bitDepthD is a value for adjusting the number of bits in the offset value range.

 一方、オフセットタイプsao_type_idxが1の場合、すなわちBOのオフセットsao_offsetにおいては、値域は、
  -(1<<(min(bitDepth,bitDepthTh)-bitDepthD)) から (1<<(min(bitDepth,bitDepthTh)-bitDepthD)-1 
である。以上から、例えば、bitDepth=8、bitDepthTh=10、bitDepthD=5 である場合、オフセットsao_offsetの値域は、EOの場合は0~7となり、BOの場合は-8~7となる。SAOパラメータSAOP_Cのマージ制御情報(sao_merge_left_flag, sao_merge_up_flag)がマージを示すか否かに応じて、オフセットタイプsao_type_idx、バンドオフセット位置sao_band_position、オフセットsao_offset_abs、オフセット符号sao_offset_sign、オフセットクラスsao_eo_classの導出方法は異なる。マージ制御情報がマージを示さない場合、これらのパラメータはエントロピー復号部301で復号され、オフセット情報格納部1002に格納される。マージ制御情報がマージを示す場合、オフセット情報格納部1002から復号済みの隣接CTUのパラメータを読み出し、対象CTUのパラメータとしてセットする。具体的には、sao_merge_left_flagが1の場合、対象CTUの左隣接CTUのパラメータをセットする。sao_merge_up_flagが1の場合、対象CTUの上隣接CTUのパラメータをセットする。
On the other hand, when the offset type sao_type_idx is 1, that is, in the offset sao_offset of BO, the range is
From-(1 << (min (bitDepth, bitDepthTh) -bitDepthD)) to (1 << (min (bitDepth, bitDepthTh) -bitDepthD) -1
It is. From the above, for example, when bitDepth = 8, bitDepthTh = 10, and bitDepthD = 5, the value range of the offset sao_offset is 0 to 7 in the case of EO and -8 to 7 in the case of BO. The derivation method of the offset type sao_type_idx, the band offset position sao_band_position, the offset sao_offset_abs, the offset code sao_offset_sign, and the offset class sao_eo_class differs depending on whether the merge control information (sao_merge_left_flag, sao_merge_up_flag) of the SAO parameter SAOP_C indicates merge. When the merge control information does not indicate merging, these parameters are decoded by the entropy decoding unit 301 and stored in the offset information storage unit 1002. When the merge control information indicates merge, the parameter of the adjacent CTU that has been decoded is read out from the offset information storage unit 1002 and set as a parameter of the target CTU. Specifically, when sao_merge_left_flag is 1, the parameter of the left adjacent CTU of the target CTU is set. When sao_merge_up_flag is 1, the parameter of the upper adjacent CTU of the target CTU is set.

 より具体的にはsao_merge_up_flag=1の場合には、
  sao_offset_abs[cIdx][rx][ry][i] = sao_offset_abs[cIdx][rx][ry-1][i] (式SAO-2)
  sao_offset_sign[cIdx][rx][ry][i] = sao_offset_sign[cIdx][rx][ry-1][i]
  sao_type_idx[cIdx][rx][ry][i] = sao_type_idx[cIdx][rx][ry-1][i]
  sao_band_position[cIdx][rx][ry] = sao_band_position[cIdx][rx][ry-1][i]
  sao_eo_class[cIdx][rx][ry] = sao_eo_class[cIdx][rx][ry-1][i]
にセットする。sao_merge_left_flag=1の場合には、
 sao_offset_abs[cIdx][rx][ry][i] = sao_offset_abs[cIdx][rx-1][ry][i]  (式SAO-3)
 sao_offset_sign[cIdx][rx][ry][i] = sao_offset_sign[cIdx][rx-1][ry][i]
 sao_type_idx[cIdx][rx][ry][i] = sao_type_idx[cIdx][rx-1][ry][i]
 sao_band_position[cIdx][rx][ry] = sao_band_position[cIdx][rx-1][ry][i]
 sao_eo_class[cIdx][rx][ry] = sao_eo_class[cIdx][rx-1][ry][i]
にセットする。ここで、(rx, ry)は、対象CTUの左上座標である。なお、バンドオフセット位置sao_band_positionを格納する場合、オフセット情報格納部1002のメモリサイズを低減するため、下位ビットの情報を捨てるラウンド処理を行なっても良い。ラウンド処理は、ラインメモリの削減に効果がある。そして、バンドオフセット位置sao_band_positionをオフセット情報格納部1002から読み出す時に逆ラウンド処理を行ってもよい。
More specifically, when sao_merge_up_flag = 1,
sao_offset_abs [cIdx] [rx] [ry] [i] = sao_offset_abs [cIdx] [rx] [ry-1] [i] (Expression SAO-2)
sao_offset_sign [cIdx] [rx] [ry] [i] = sao_offset_sign [cIdx] [rx] [ry-1] [i]
sao_type_idx [cIdx] [rx] [ry] [i] = sao_type_idx [cIdx] [rx] [ry-1] [i]
sao_band_position [cIdx] [rx] [ry] = sao_band_position [cIdx] [rx] [ry-1] [i]
sao_eo_class [cIdx] [rx] [ry] = sao_eo_class [cIdx] [rx] [ry-1] [i]
Set to If sao_merge_left_flag = 1, then
sao_offset_abs [cIdx] [rx] [ry] [i] = sao_offset_abs [cIdx] [rx-1] [ry] [i] (Expression SAO-3)
sao_offset_sign [cIdx] [rx] [ry] [i] = sao_offset_sign [cIdx] [rx-1] [ry] [i]
sao_type_idx [cIdx] [rx] [ry] [i] = sao_type_idx [cIdx] [rx-1] [ry] [i]
sao_band_position [cIdx] [rx] [ry] = sao_band_position [cIdx] [rx-1] [ry] [i]
sao_eo_class [cIdx] [rx] [ry] = sao_eo_class [cIdx] [rx-1] [ry] [i]
Set to Here, (rx, ry) is the upper left coordinates of the target CTU. When the band offset position sao_band_position is stored, in order to reduce the memory size of the offset information storage unit 1002, round processing may be performed to discard information of lower bits. Round processing is effective in reducing line memory. When the band offset position sao_band_position is read out from the offset information storage unit 1002, reverse round processing may be performed.

 sao_band_position[cIdx][rx][ry] = ((sao_band_position[cIdx][rx][ry-1][i])>>shift)<<shift (式SAO-4)
 sao_band_position[cIdx][rx][ry] = ((sao_band_position[cIdx][rx-1][ry][i])>>shift)<<shift
 図8にSAO3052のブロック図を示す。SAO3052は、カテゴリ設定部1001、オフセット情報格納部1002、オフセット加算部1003から構成される。
sao_band_position [cIdx] [rx] [ry] = ((sao_band_position [cIdx] [rx] [ry-1] [i]) >> shift) << shift (equation SAO-4)
sao_band_position [cIdx] [rx] [ry] = ((sao_band_position [cIdx] [rx-1] [ry] [i]) >> shift) << shift
The block diagram of SAO3052 is shown in FIG. The SAO 3052 includes a category setting unit 1001, an offset information storage unit 1002, and an offset addition unit 1003.

  (カテゴリ設定部1001)
 カテゴリ設定部1001には、オフセット情報格納部1002に格納されたSAOパラメータ(SAOP_S, SAOP_C)とSAO前復号画像recが入力される。カテゴリ設定部1001は、これらを用いて、オフセットタイプsao_type_idxに対応する各画素位置のカテゴリを設定する。また、(式SAO-1)のオフセットSaoOffsetValを導出し、カテゴリとオフセットをオフセット加算部1003に出力する。なお、sao_type_idxが0の場合、カテゴリを算出しない。
(Category setting unit 1001)
The category setting unit 1001 receives the SAO parameters (SAOP_S, SAOP_C) stored in the offset information storage unit 1002 and the SAO pre-decoded image rec. The category setting unit 1001 uses these to set the category of each pixel position corresponding to the offset type sao_type_idx. Further, the offset SaoOffsetVal of (Expression SAO-1) is derived, and the category and the offset are output to the offset addition unit 1003. When sao_type_idx is 0, the category is not calculated.

 sao_type_idxが2(EO)の場合、カテゴリ設定部1001は図6(a)に示す、エッジ分類を表すオフセットクラスclassにsao_eo_classをセットする。classは、対象画素からみた参照画素方向に対応し、参照画素の選択に用いられる。class=0の場合、参照画素a、bに対象画素Xの左右の画素を設定し、class=1の場合、a、bに対象画素Xの上下の画素を設定し、class=2の場合、a、bに対象画素Xの左上、右下の画素を設定し、class=3の場合、a、bに対象画素xの左下、右上の画素を設定する。 When sao_type_idx is 2 (EO), the category setting unit 1001 sets sao_eo_class to an offset class representing edge classification shown in FIG. 6A. The class corresponds to the reference pixel direction viewed from the target pixel, and is used to select the reference pixel. In the case of class = 0, the left and right pixels of the target pixel X are set in the reference pixels a and b, and in the case of class = 1, the pixels above and below the target pixel X are set in a, b. Upper left and lower right pixels of the target pixel X are set to a and b, and in the case of class = 3, lower left and upper right pixels of the target pixel x are set to a and b.

 次に対象画素xと、classによって指定された2つの参照画素a、bの画素値の差分sign(rec[x]-rec[a])、sign(rec[x]-rec[b])を用いてedgeIdxを導出する。 Next, the difference sign (rec [x] -rec [a]) and sign (rec [x] -rec [b]) of the pixel values of the target pixel x and the two reference pixels a and b designated by class are calculated. Use to derive edgeIdx.

  edgeIdx=sign(rec[x]-rec[a])+sign(rec[x]-rec[b])+2  (式SAO-5)
  sign(x) = 1  (x>0)
      = 0  (x=0)
      =-1  (x<0)
ここで、rec[x]は画素xの復号画素値を表す。このedgeIdxからカテゴリcatを算出する。
edgeIdx = sign (rec [x] -rec [a]) + sign (rec [x] -rec [b]) + 2 (equation SAO-5)
sign (x) = 1 (x> 0)
= 0 (x = 0)
= -1 (x <0)
Here, rec [x] represents the decoded pixel value of the pixel x. The category cat is calculated from this edgeIdx.

  cat =(edgeIdx==2)?0:edgeIdx+1  (edgeIdx<=2)     (式SAO-6)
    =edgeIdx          (edgeIdx>2)
 class=0の場合のカテゴリcatの示す対象画素値xと参照画素a、bの大小関係を図6(b)に示す。黒丸が対象画素x、xの左側の白丸が参照画素a、xの右側の白丸が参照画素bであり、縦方向は画素値の大小関係を表す。
cat = (edgeIdx = = 2)? 0: edgeIdx + 1 (edgeIdx <= 2) (Equation SAO-6)
= edgeIdx (edgeIdx> 2)
The magnitude relationship between the target pixel value x and the reference pixels a and b indicated by the category cat in the case of class = 0 is shown in FIG. Black circles represent the target pixel x, white circles on the left of x represent reference pixels a, white circles on the right of x represent reference pixels b, and the vertical direction represents the magnitude relationship of pixel values.

 sao_type_idxが1(BO)の場合、カテゴリ設定部1001は、図6(c)に示すように0~2^bitDepth-1の画素値をバンドに分割する。bitDepth=8の場合、画素値は0~255の範囲をとり、各バンドは8個の連続する画素値からなる(バンド幅bandW=8)。bitDepth=10の場合、画素値は0~1023の範囲をとり、各バンドは32個の連続する画素値からなる(bandW=32)。カテゴリ設定部1001は、カテゴリcatの1~4に、エントロピー復号部301で復号したバンドオフセット位置(sao_band_position)が示すバンドから連続する4バンドをセットする。 When sao_type_idx is 1 (BO), the category setting unit 1001 divides pixel values of 0 to 2 ^ bitDepth-1 into bands as shown in FIG. 6C. In the case of bit Depth = 8, the pixel value ranges from 0 to 255, and each band consists of eight consecutive pixel values (bandwidth band W = 8). When bitDepth = 10, the pixel value ranges from 0 to 1023, and each band consists of 32 consecutive pixel values (bandW = 32). The category setting unit 1001 sets four consecutive bands from the band indicated by the band offset position (sao_band_position) decoded by the entropy decoding unit 301 to 1 to 4 of the category cat.

 cat = (rec[x][y]>>bandShift)-sao_band_position+1    (式SAO-7)
 if (cat<=0 || cat>4) cat=0
ここでrec[x][y]はSAO前復号画像の画素値、bandShiftはlog2(bandW)である。
cat = (rec [x] [y] >> bandShift) -sao_band_position + 1 (equation SAO-7)
if (cat <= 0 || cat> 4) cat = 0
Here, rec [x] [y] is the pixel value of the SAO pre-decoded image, and bandShift is log2 (bandW).

 さらに、(式SAO-1)のオフセットSaoOffsetValを導出し、カテゴリcatとオフセットSaoOffsetValをオフセット加算部1003に出力する。 Furthermore, the offset SaoOffsetVal of (Expression SAO-1) is derived, and the category cat and the offset SaoOffsetVal are output to the offset addition unit 1003.

 図9のフローチャートを参照して、カテゴリ設定部1001の動作を説明する。カテゴリ設定部1001は、S901でオフセットタイプsao_offset_typeをチェックし、EOならばS902へ、BOならばS905へ進む。S902~S904はEOの処理、S905~S906はBOの処理である。カテゴリ設定部1001は、オフセットタイプsao_offset_typeがEOであれば S902でsao_type_idxを参照して、対象画素xの隣接画素を参照画素a、bとして設定する。カテゴリ設定部1001は、S903で、対象画素xと2つの参照画素a、bの画素値の差分sign(rec[x]-rec[a])、sign(rec[x]-rec[b])を用いてedgeIdxを導出する。次にカテゴリ設定部1001は、S904でedgeIdxからカテゴリcatを算出し、設定する。 The operation of the category setting unit 1001 will be described with reference to the flowchart of FIG. The category setting unit 1001 checks the offset type sao_offset_type in S901, and proceeds to S902 in the case of EO, or proceeds to S905 in the case of BO. Steps S902 to S904 are processing of EO, and steps S905 to S906 are processing of BO. If the offset type sao_offset_type is EO, the category setting unit 1001 refers to sao_type_idx in S902 and sets adjacent pixels of the target pixel x as reference pixels a and b. The category setting unit 1001 sets the difference sign (rec [x] -rec [a]), sign (rec [x] -rec [b]) of the pixel values of the target pixel x and the two reference pixels a and b in S903. Derive edgeIdx using Next, the category setting unit 1001 calculates and sets a category cat from edgeIdx in S904.

 カテゴリ設定部1001は、オフセットタイプsao_offset_typeがBOであれば S905で、0~2^bitDepth-1の画素値をバンドに分割する。カテゴリ設定部1001は、S906で、バンドオフセット位置(sao_band_position)が示すバンドから連続する4バンドをカテゴリcatの1~4にセットする。そして対象画素の画素値が含まれるカテゴリ1~4に含まれる場合、これを対象画素のカテゴリとする。 If the offset type sao_offset_type is BO, the category setting unit 1001 divides the pixel value of 0 to 2 ^ bit Depth-1 into bands in S905. In step S 906, the category setting unit 1001 sets four consecutive bands from the band indicated by the band offset position (sao_band_position) to the categories 1 to 4 of the category cat. Then, when it is included in categories 1 to 4 in which the pixel value of the target pixel is included, this is set as the category of the target pixel.

 カテゴリ設定部1001は、S907で、(式SAO-1)を用いてオフセットSaoOffsetValを導出する。 In step S 907, the category setting unit 1001 derives the offset SaoOffsetVal using (Expression SAO-1).

 オフセット情報格納部1002は、エントロピー復号部301で復号したSAOパラメータを格納する。また、マージ制御情報(sao_merge_left_flag、sao_merge_up_flag)が1の場合は隣接CTUのSAOパラメータを、そうでなければエントロピー復号部301で復号したSAOパラメータを、カテゴリ設定部1001に出力する。 The offset information storage unit 1002 stores the SAO parameters decoded by the entropy decoding unit 301. If the merge control information (sao_merge_left_flag, sao_merge_up_flag) is 1, the SAO parameter of the adjacent CTU is output to the category setting unit 1001, otherwise the SAO parameter decoded by the entropy decoding unit 301 is output.

 オフセット加算部1003は、カテゴリ設定部1001で対象画素毎に導出したカテゴリcatと、CTU毎に導出したオフセットSaoOffsetValを用いて、SAOを実施する。SAO前復号画素値をrec[x][y]とすると、オフセット加算部1003の出力画素値recsao[x][y]は
  recsao[x][y]=Clip3(0,(1<<bitDepth)-1,rec[x][y]+SaoOffsetVal[cIdx][rx][ry][cat]) (式SAO-8)
である。ここで、(rx, ry)は、対象CTUの左上座標である。recsao[x][y]はP_SAOとしてSAO3052から出力される。
The offset addition unit 1003 performs SAO using the category cat derived for each target pixel by the category setting unit 1001 and the offset SaoOffsetVal derived for each CTU. Assuming that the SAO pre-decoded pixel value is rec [x] [y], the output pixel value recsao [x] [y] of the offset addition unit 1003 is recsao [x] [y] = Clip 3 (0, (1 << bitDepth) -1, rec [x] [y] + SaoOffsetVal [cIdx] [rx] [ry] [cat]) (Expression SAO-8)
It is. Here, (rx, ry) is the upper left coordinates of the target CTU. recsao [x] [y] is output from the SAO 3052 as P_SAO.

  (ALF3053)
 ALF3053は、入力画像に対して、符号化ストリームから復号されたフィルタパラメータ(フィルタセット番号、フィルタ係数群、領域指定情報、並びにオンオフ情報)を用いたフィルタ処理を施すことによって、ALF済復号画像P_ALFを生成する。ALF済復号画像P_ALFは、復号動画像Tdとして外部に出力されると共に、エントロピー復号部301によって符号化ストリームから復号されたPOC指定情報と関連付けて予測パラメータメモリ307に格納される。
(ALF3053)
The ALF 3053 performs ALF-processed decoded image P_ALF by performing filter processing on the input image using filter parameters (filter set number, filter coefficient group, region designation information, and on / off information) decoded from the encoded stream. Generate The ALF-completed decoded image P_ALF is output to the outside as a decoded moving image Td, and stored in the prediction parameter memory 307 in association with POC designation information decoded from the coded stream by the entropy decoding unit 301.

 ループフィルタ305では、復号画像(フィルタ前復号画素)に対し、まずデブロッキングフィルタ3051でブロック境界の画素の平滑化処理を行った後、SAO3052で、CTU内の画素に対してリンギング歪除去や、画素値のずれ補正を行う。最後にALFで復号画像と原画との差分を小さくする処理を実施する。 In the loop filter 305, the deblocking filter 3051 first performs smoothing processing on the pixels of the block boundary for the decoded image (pre-filter decoded pixel), and then the SAO 3052 removes ringing distortion for pixels in the CTU, Correction of pixel value deviation is performed. Finally, processing is performed to reduce the difference between the decoded image and the original image by ALF.

 しかしながら、デブロッキングフィルタは前述のように、CTU単位で処理することはできず、対象CTUの右隣接CTUと下隣接CTUのフィルタ前復号画像Pが生成された後に、対象CTU内のブロック境界に接する全ての画素のオンオフ判定とデブロッキングフィルタ処理を終了することができる。従って、デブロッキングフィルタにより変更された画素値を用いるSAOは、対象CTUの右隣接CTUと下隣接CTUの処理が終了するまで処理を実施できない。 However, as described above, the deblocking filter can not process on a CTU basis, and after the unfiltered decoded image P of the right adjacent CTU and the lower adjacent CTU of the target CTU is generated, at the block boundary in the target CTU. The on / off determination and deblocking filter processing of all the pixels in contact can be completed. Therefore, SAO using the pixel value changed by the deblocking filter can not perform processing until the processing of the right adjacent CTU and the lower adjacent CTU of the target CTU is completed.

 デブロッキングフィルタにはCTU単位で通知する符号化パラメータはないので、図10(a)に示すように、対象CTU内の画素のみでデブロッキングフィルタ処理ができる画素(破線で囲った白領域)には、対象CTUの復号中にデブロッキングフィルタをかける。次に、対象CTU内の右隣接CTUに接する画素(破線で囲った右上-左下斜線領域)には、対象CTUの右隣接CTUの左端画素のフィルタ前復号画像が生成されたら、デブロッキングフィルタをかける。さらに、対象CTU内の下隣接CTUに接する画素(破線で囲った左上-右下斜線領域)には、対象CTUの下隣接CTUの上端画素のフィルタ前復号画像が生成されたら、デブロッキングフィルタをかける。以上のような処理によって、デブロッキングフィルタによる遅延を低減することが可能である。 Since the deblocking filter has no coding parameter to be notified in CTU units, as shown in FIG. 10A, the deblocking filter can be a pixel (a white area surrounded by a broken line) that can perform deblocking filter processing only with pixels in the target CTU. Applies a deblocking filter during decoding of the target CTU. Next, if a pre-filter decoded image of the left end pixel of the right adjacent CTU of the target CTU is generated for the pixel in the target CTU that touches the right adjacent CTU (upper right-lower left hatched area surrounded by dashed line), Call. Furthermore, if a pre-filter decoded image of the top pixel of the lower adjacent CTU of the target CTU is generated for the pixels in contact with the lower adjacent CTU in the target CTU (upper left-lower right hatched area surrounded by dashed line), Call. By the above processing, it is possible to reduce the delay due to the deblocking filter.

 しかしながら、SAOはCTU単位で通知するSAOパラメータがある。例えばsao_merge_left_flag、sao_merge_up_flag、sao_type_idx、sao_offset_abs、sao_offset_sign、sao_band_position、sao_eo_classである。対象CTUのデブロッキングフィルタ済の画素が全てそろわなければ、動画像符号化装置側でこれらのパラメータを導出することはできない。また図10(b)に示すように、デブロッキングフィルタを実施した領域のデブロッキングフィルタ済画素のみを使ってSAOのパラメータを導出する、あるいは、デブロッキングフィルタを実施した領域のデブロッキングフィルタ済画素と未実施の領域のデブロッキングフィルタ前画素値を使ってSAOパラメータを導出することができるが、特にCTUサイズが小さい場合は、デブロッキングフィルタ未実施の画素の占める割合が大きくなるため、SAOパラメータの精度が悪くなる。 However, there are SAO parameters that the SAO notifies on a CTU basis. For example, sao_merge_left_flag, sao_merge_up_flag, sao_type_idx, sao_offset_abs, sao_offset_sign, sao_band_position, sao_eo_class. If all the deblocking filtered pixels of the target CTU are not aligned, these parameters can not be derived at the video encoding device side. Also, as shown in FIG. 10 (b), the deblocking filtered pixels of the area subjected to the deblocking filter are derived using only the deblocking filtered pixels of the area subjected to the deblocking filter, or Although SAO parameters can be derived using the pre-deblocking filter pixel values in the unimplemented area, especially when the CTU size is small, the percentage of unperformed deblocking filter pixels increases, so the SAO parameters can be derived. Accuracy will be worse.

 本実施形態では、デブロッキングフィルタの前にSAO処理を実施し、SAO済復号画像に対しデブロッキングフィルタを実施することで、導出するSAOパラメータの精度を維持しつつ、遅延を低減する技術を説明する。 In this embodiment, an SAO process is performed before the deblocking filter, and a deblocking filter is performed on the SAO-decoded image to explain a technique for reducing delay while maintaining the accuracy of the derived SAO parameter. Do.

 図11(a)は本実施形態でのループフィルタ305D(動画像復号装置内)のブロック図である。図11(a)に示すループフィルタ305Dは図4のループフィルタ305を置き換えたものであり、入出力もループフィルタ305と同じである。つまり、ループフィルタへの入力はフィルタ前復号画像であり、ループフィルタからの出力はループフィルタ処理済の復号画像である。また、ループフィルタ305Dにおいて、デブロッキングフィルタ3051とALF3053の構成は、図4のデブロッキングフィルタ3051とALF3053の構成と同じであり、同じ番号を付している。図11(c)はループフィルタ305Dの動作を示すフローチャートである。ループフィルタ305Dは、SAO、デブロッキングフィルタ、ALFの順にフィルタリング処理する。 FIG. 11A is a block diagram of a loop filter 305D (in a moving image decoding apparatus) in the present embodiment. A loop filter 305D shown in FIG. 11A replaces the loop filter 305 in FIG. 4 and the input and output are also the same as the loop filter 305. That is, the input to the loop filter is a pre-filter decoded image, and the output from the loop filter is a loop-filtered decoded image. Further, in the loop filter 305D, the configurations of the deblocking filter 3051 and the ALF 3053 are the same as the configurations of the deblocking filter 3051 and the ALF 3053 in FIG. FIG. 11C is a flowchart showing the operation of the loop filter 305D. The loop filter 305D performs filtering processing in order of SAO, deblocking filter, and ALF.

 図11(c)において、ループフィルタ305DはSAOのオンオフ判定を行う(S1101)。SAOオフの場合(S1101でNO)、S1103に進む。SAOオンの場合(S1101でYES)、S1102に進む。SAO3054はSAO処理を実施する(S1102)。 In FIG. 11C, the loop filter 305D performs on / off determination of SAO (S1101). If the SAO is off (NO in S1101), the process advances to S1103. If the SAO is on (YES in S1101), the process proceeds to S1102. The SAO 3054 performs SAO processing (S1102).

 次にループフィルタ305Dはデブロッキングフィルタのオンオフ判定を行う(S1103)。デブロッキングフィルタオフの場合(S1103でNO)、S1105に進む。デブロッキングフィルタオンの場合(S1103でYES)、S1104に進む。デブロッキングフィルタ3051はデブロッキングフィルタ処理を実施する(S1104)。 Next, the loop filter 305D performs on / off determination of the deblocking filter (S1103). If the deblocking filter is off (NO in S1103), the process proceeds to S1105. If the deblocking filter is on (YES in step S1103), the process advances to step S1104. The deblocking filter 3051 performs deblocking filter processing (S1104).

 次にループフィルタ305DはALFのオンオフ判定を行う(S1105)。ALFオフの場合(S1105でNO)、処理を終了する。ALFオンの場合(S1105でYES)、S1106に進む。ALF3053はALF処理を実施し(S1106)、処理を終了する。 Next, the loop filter 305D performs on / off determination of ALF (S1105). If the ALF is off (NO in S1105), the process ends. If the ALF is on (YES in S1105), the process advances to S1106. The ALF 3053 performs ALF processing (S1106), and ends the processing.

 次にSAO3054について説明する。 Next, the SAO 3054 will be described.

 まず従来のエッジオフセット(EO)は、対象画素のカテゴリ導出に、図6(a)に示す隣接画素が必要であり、図12(a)に示すように、対象CTU(図12(a)の斜線領域)に対し、外側に1画素分の隣接領域が参照領域として使用する。この場合、対象CTUの右端および下端の1画素は、対象CTUの右隣接CTUおよび下隣接CTUのSAO前復号画素(フィルタ前復号画素)を使用する。言い換えると、対象CTUの右側、下側のCTUである後続のCTUの画素を参照する。本発明では、図13および図14に示すように、EOのフィルタ対象領域(対象領域)をCTU境界よりも1画素内側に入った図の斜線領域に限定する。すなわち、フィルタ対象領域をx=0..CTUWidth-2、y = 0..CTUHeight-2とする(ここでCTUWIdthはCTUの幅、CTUHeightはCTUの高さ)。これらの処理の詳細は後述するが、EOの対象領域を限定することで、後続のCTUの画素値を参照しないため、後続のCTUの処理を待つことなくCTU単位でEOを実施することができる。 First, the conventional edge offset (EO) requires the adjacent pixels shown in FIG. 6 (a) to derive the category of the target pixel, and as shown in FIG. 12 (a), the target CTU (FIG. 12 (a)). An area adjacent to one pixel is used as a reference area outside the hatched area). In this case, one pixel at the right end and the lower end of the target CTU uses the SAO pre-decoded pixel (pre-filter decoded pixel) of the right adjacent CTU and the lower adjacent CTU of the target CTU. In other words, reference is made to the pixel of the subsequent CTU which is the CTU on the right side of the target CTU and the lower side. In the present invention, as shown in FIGS. 13 and 14, the filter target area (target area) of EO is limited to the hatched area in the figure which is located one pixel inside of the CTU boundary. That is, the filter target area is x = 0..CTUWidth-2 and y = 0..CTUHeight-2 (where CTUWIdth is the width of CTU and CTUHeight is the height of CTU). Although the details of these processes will be described later, EO can be performed in CTU units without waiting for the processing of the subsequent CTUs by not referring to the pixel values of the subsequent CTUs by limiting the target area of the EO. .

 次にバンドオフセット(BO)は、カテゴリ導出に対象画素自身の画素値を用いるので、図12(b)に示すように、対象CTU(図12(b)の斜線領域)に対し、追加の隣接領域は不要である。従って、BOは、後続のCTU処理を待つことなく、CTU単位で処理を実施できる。 Next, since the band offset (BO) uses the pixel value of the target pixel itself for category derivation, as shown in FIG. 12 (b), additional adjacent to the target CTU (shaded area in FIG. 12 (b)) No space is required. Therefore, the BO can perform processing on a CTU basis without waiting for the subsequent CTU processing.

 図15は本発明のSAO3054のブロック図である。図8のSAO3052との違いは、対象領域設定部1004が追加されたことである。 FIG. 15 is a block diagram of the SAO 3054 of the present invention. The difference from SAO 3052 in FIG. 8 is that a target area setting unit 1004 is added.

 対象領域設定部1004は、対象CTUの右端1画素分と下端1画素分を除くCTU内画素(図13 (a)の斜線領域)をEOの対象領域とする。この場合、対象CTUの上隣接CTUの1画素分と、左隣接CTUの1画素分の対象CTU外領域を参照領域として使用する。これらは既復号CTU内の画素(処理済みのCTUの画素)であり、対象CTUにおいてイントラ予測やデブロッキングフィルタで使用するために、内部メモリに保存されている領域である。そのため、図13(a)の斜線領域をEOの対象領域とするにあたり、SAO処理のための追加のメモリやデータ転送量の増加はない。そして、対象CTUの逆量子化・逆変換部311の出力である残差信号と予測画像生成部308の出力である予測画像を加算したフィルタ前復号画像が入力されれば、SAO処理を開始できる。従って、従来技術で発生する後続CTUの処理が終わるのを待つという処理の遅延を削減することができる。さらに、既復号隣接CTUの画素値を最大限参照することで、EOの対象領域の制限を緩和することが可能であり、画質を維持できるという効果もある。なお、BOの対象領域(図13(c))は図12(b)と同じくCTUの全領域である。 The target area setting unit 1004 sets pixels in the CTU (hatched area in FIG. 13A) excluding the right end one pixel and the lower end one pixel of the target CTU as a target area of EO. In this case, an area outside the target CTU of one pixel of the upper adjacent CTU of the target CTU and one pixel of the left adjacent CTU is used as a reference area. These are pixels in the already-decoded CTU (pixels of processed CTU), and are regions stored in the internal memory for use in intra prediction and deblocking filter in the target CTU. Therefore, when making the hatched area in FIG. 13A the target area of EO, there is no increase in additional memory and data transfer amount for SAO processing. Then, if a pre-filter decoded image obtained by adding the residual signal output from the inverse quantization / inverse transform unit 311 of the target CTU and the predicted image output from the predicted image generation unit 308 is input, the SAO process can be started. . Therefore, it is possible to reduce the processing delay of waiting for the processing of the subsequent CTU generated in the prior art to finish. Furthermore, by referring to the pixel values of the already decoded adjacent CTU as much as possible, it is possible to ease the restriction of the EO target area, and there is also an effect that the image quality can be maintained. The target area of BO (FIG. 13 (c)) is the entire area of CTU as in FIG. 12 (b).

 カテゴリ設定部1001、オフセット加算部1003の処理は、対象領域設定部1004で設定された対象領域に対して実行される。カテゴリ設定部1001、オフセット加算部1003の処理は図8のカテゴリ設定部1001、オフセット加算部1003と同じである。 The processes of the category setting unit 1001 and the offset addition unit 1003 are executed on the target area set by the target area setting unit 1004. The processes of the category setting unit 1001 and the offset addition unit 1003 are the same as those of the category setting unit 1001 and the offset addition unit 1003 in FIG.

 図16にSAO3054のフローチャートを示す。 FIG. 16 shows a flowchart of the SAO 3054.

 対象領域設定部1004はEOとBOのSAO対象領域を設定する。EO用に図13(a)の斜線領域を、BO用に図13(c)の斜線領域を設定する(S1400)。 The target area setting unit 1004 sets SAO target areas of EO and BO. The shaded area in FIG. 13A is set for EO, and the shaded area in FIG. 13C for BO (S1400).

 カテゴリ設定部1001は、オフセットタイプsao_offset_typeをチェックし、EOならばS902へ、BOならばS905へ進む(S901)。S902~S904はEOの処理、S905~S906はBOの処理であり、S902からS907は図9と同じ動作であるので説明を省略する。 The category setting unit 1001 checks the offset type sao_offset_type, and proceeds to S902 if EO, or proceeds to S905 if BO (S901). S902 to S904 are EO processing, S905 to S906 are BO processing, and S902 to S907 are the same operations as in FIG.

 オフセット加算部1003は、カテゴリ設定部1001で対象画素毎に導出したカテゴリcatに対応するオフセットSaoOffsetValを対象画素に加算し、SAOを実施する(S1408)。 The offset addition unit 1003 adds the offset SaoOffsetVal corresponding to the category cat derived for each target pixel by the category setting unit 1001 to the target pixel, and carries out SAO (S1408).

 以上により、後続のCTUの画素値を利用せず、SAOをCTU単位で処理することが可能になり、画質を維持しつつ、遅延を削減することができる。 As described above, the SAO can be processed in CTU units without using pixel values of subsequent CTUs, and delay can be reduced while maintaining image quality.

  (変形例1)
 本発明の変形例1は、対象CTUの下端1画素分を除くCTU内画素(図13(b)の斜線領域)をEOの対象領域とする。すなわち、フィルタ対象領域をx=0..CTUWidth-1、y = 0..CTUHeight-2とする。この場合、対象CTUの上隣接CTUの1画素分、左隣接CTUの1画素分と右隣接CTUの1画素分の対象CTU外領域が参照領域として必要である。右隣接CTUのフィルタ前復号画素を参照するためには、対象CTUに対し1CTU分の遅延が発生する。しかしながら、1CTUライン分の遅延が発生する下隣接CTUの参照と異なり、右隣接CTUを参照するために発生する遅延は小さい。従って遅延は1CTU分増えるものの、EOの対象領域に対象CTUの右端1画素分の領域が含まれるため、画質が向上するというメリットがある。
(Modification 1)
According to the first modification of the present invention, pixels in CTU (shaded area in FIG. 13B) excluding one pixel at the lower end of the target CTU are set as an EO target area. That is, the filter target area is x = 0..CTUWidth-1, y = 0 .. CTUHeight-2. In this case, a target CTU outside area corresponding to one pixel of the upper adjacent CTU of the target CTU, one pixel of the left adjacent CTU, and one pixel of the right adjacent CTU is required as a reference area. In order to refer to the pre-filter decoded pixel of the right adjacent CTU, a delay of 1 CTU occurs with respect to the target CTU. However, unlike the reference to the lower adjacent CTU where a delay corresponding to one CTU line occurs, the delay generated to reference the right adjacent CTU is small. Therefore, although the delay is increased by 1 CTU, the area of the right end of the target CTU is included in the target area of EO, so that the image quality is improved.

 変形例1を実施する場合、図15の対象領域設定部1004、および図16のS1400で設定するEO用の対象領域は図13(b)の斜線領域である。それ以外の処理の変更はない。 When the first modification is performed, the target area for EO set in the target area setting unit 1004 in FIG. 15 and S1400 in FIG. 16 is the hatched area in FIG. There is no other processing change.

 変形例1のようにSAO対象領域を設定することで、EOの対象領域を図13(a)とした場合より遅延は1CTU増えるが、対象CTUの右端の画素にもEOを実施することができる。従って、従来技術(図12(a))に比べ、遅延を低下させつつ、画質を維持することができる。 By setting the SAO target area as in the first modification, although the delay is increased by 1 CTU compared to the case where the EO target area is set to FIG. 13A, EO can be performed on the pixel at the right end of the target CTU. . Therefore, the image quality can be maintained while the delay is reduced as compared with the prior art (FIG. 12A).

  (変形例2)
 本発明の変形例2は、対象CTUの左端1画素分、右端1画素分と下端1画素分を除くCTU内画素(図14(a)の斜線領域)をEOの対象領域とする。すなわち、フィルタ対象領域をx=1..CTUWidth-2、y = 0..CTUHeight-2とする。
(Modification 2)
According to the second modification of the present invention, the pixels in the CTU (hatched area in FIG. 14A) excluding the left end one pixel and the right end pixel and the lower end pixel of the target CTU are set as the target area of EO. That is, the filter target area is x = 1..CTUWidth-2, y = 0..CTUHeight-2.

 あるいは、対象CTUの上端1画素分、右端1画素分と下端1画素分を除くCTU内画素(図14(b)の斜線領域)をEOの対象領域としてもよい。すなわち、フィルタ対象領域をx=0..CTUWidth-2、y = 1..CTUHeight-2とする。 Alternatively, the CTU pixels (the shaded area in FIG. 14B) excluding the upper end one pixel and the right end pixel and the lower end pixel of the target CTU may be set as the EO target area. That is, the filter target area is x = 0..CTUWidth-2, y = 1..CTUHeight-2.

 これらの場合、対象CTUの上隣接CTU、あるいは、左隣接CTUの1画素分の対象CTU外領域が参照領域として必要である。これらの領域は既に内部メモリに保存されている。そのため、図14(a)あるいは図14(b)の斜線領域を対象領域とするにあたり、メモリやデータ転送量の増加はなく、遅延が増えることもない。なお、BOの対象領域(図14(d))は図12(b)と同じくCTUの全領域である。 In these cases, the upper adjacent CTU of the target CTU or an area outside the target CTU for one pixel of the left adjacent CTU is required as a reference area. These areas are already stored in the internal memory. Therefore, when the hatched area in FIG. 14A or 14B is set as the target area, there is no increase in memory or data transfer amount, and no increase in delay. The target area of BO (FIG. 14D) is the entire area of CTU as in FIG. 12B.

 変形例2を実施する場合、図15の対象領域設定部1004、および図16のS1400で設定するEO用の対象領域は図14(a) あるいは図14(b)の斜線領域である。それ以外の処理の変更はない。 When the second modification is performed, the target area for EO set in the target area setting unit 1004 in FIG. 15 and S1400 in FIG. 16 is the hatched area in FIG. 14A or 14B. There is no other processing change.

 変形例2のようにSAO対象領域を設定することで、後続のCTUの画素値を利用せずCTU単位の処理を可能にし、遅延を低下させることができる。 By setting the SAO target area as in the second modification, processing can be performed in CTU units without using pixel values of subsequent CTUs, and delay can be reduced.

  (変形例3)
 本発明の変形例3は、EOの対象領域をCTU境界から1画素内側に入った領域(図14(c)の斜線領域)に設定し、BOの対象領域をCTUの全領域(図14(d)に示す斜線領域、図12(b)と同じ)に設定する。
(Modification 3)
The third modification of the present invention sets the EO target area to an area (shaded area in FIG. 14C) one pixel inward from the CTU boundary, and the BO target area to the entire CTU area (FIG. The hatched area shown in d) is set as in FIG. 12 (b)).

 変形例3を実施する場合、図15の対象領域設定部1004、および図16のS1400で設定するEO用の対象領域は図14(c)の斜線領域である。それ以外の処理の変更はない。 When the modification 3 is performed, the target area for EO set in the target area setting unit 1004 of FIG. 15 and S1400 of FIG. 16 is a hatched area of FIG. There is no other processing change.

 変形例3のようにSAO対象領域を設定することで、参照領域を含めたSAOに必要な領域がCTU内部に限定される。従って、隣接CTUの画素値を利用せず、簡単な処理で遅延を低下させることができる。 By setting the SAO target area as in the third modification, the area required for the SAO including the reference area is limited to the inside of the CTU. Therefore, the delay can be reduced by simple processing without using pixel values of adjacent CTUs.

  (動画像符号化装置の構成)
 次に、動画像符号化装置11の構成について説明する。以下に一例として、動画像符号化装置11の構成を、図17を用いて説明する。動画像符号化装置11は、予測画像生成部101、減算部102、変換・量子化部103、エントロピー符号化部104、逆量子化・逆変換部105、加算部106、ループフィルタ107、予測パラメータメモリ(予測パラメータ記憶部、フレームメモリ)108、参照ピクチャメモリ(参照画像記憶部、フレームメモリ)109、符号化パラメータ決定部110、予測パラメータ符号化部111を含んで構成される。予測パラメータ符号化部111は、インター予測パラメータ符号化部112及びイントラ予測パラメータ符号化部113を含んで構成される。
(Configuration of video coding device)
Next, the configuration of the moving picture coding apparatus 11 will be described. The configuration of the moving picture coding apparatus 11 will be described below as an example using FIG. The moving picture coding apparatus 11 includes a predicted image generation unit 101, a subtraction unit 102, a transform / quantization unit 103, an entropy coding unit 104, an inverse quantization / inverse transform unit 105, an addition unit 106, a loop filter 107, and prediction parameters. A memory (prediction parameter storage unit, frame memory) 108, a reference picture memory (reference image storage unit, frame memory) 109, an encoding parameter determination unit 110, and a prediction parameter encoding unit 111 are included. 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の予測画像を生成する。ここで、予測画像生成部101は、予測パラメータ符号化部111から入力された予測パラメータに基づいて参照ピクチャメモリ109から復号済のブロックを読み出す。予測パラメータ符号化部111から入力された予測パラメータとは、例えばインター予測の場合、動きベクトルである。予測画像生成部101は、対象ブロックを起点として動きベクトルが示す参照ピクチャ上の位置にあるブロックを読み出し、予測画像を生成する。またイントラ予測の場合、予測パラメータとは例えばイントラ予測モードである。予測画像生成部101は、イントラ予測モードで使用する隣接ブロックの画素値を参照ピクチャメモリ109から読み出し、予測画像を生成する。予測画像生成部101は、生成したブロックの予測画像を減算部102と加算部106に出力する。なお、予測画像生成部101は、既に説明した予測画像生成部308と同じ動作である。 The predicted image generation unit 101 generates, for each picture of the image T, a predicted image of 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 a reference picture indicated by the motion vector starting from the target block, and generates a predicted image. In the case of intra prediction, the prediction parameter is, for example, an intra prediction mode. The predicted image generation unit 101 reads the pixel value of the adjacent block used in the intra prediction mode from the reference picture memory 109, and generates a predicted image. The predicted image generation unit 101 outputs the generated predicted image of the block to the subtraction unit 102 and the addition unit 106. The predicted image generation unit 101 performs the same operation as the predicted image generation unit 308 described above.

 減算部102は、予測画像生成部101から入力されたブロックの予測画像の信号値を、画像Tの対応するブロック位置の画素値から減算して、残差信号を生成する。減算部102は、生成した残差信号を変換・量子化部103に出力する。 The subtraction unit 102 subtracts the signal value of the prediction image of the block input from the prediction image generation unit 101 from the pixel value of the corresponding block position of the image T to generate a residual signal. The subtraction unit 102 outputs the generated residual signal to the transformation / quantization unit 103.

 変換・量子化部103は、減算部102から入力された残差信号に対し周波数変換を行い、変換係数を算出する。変換・量子化部103は、算出した変換係数を量子化して量子化変換係数を求める。変換・量子化部103は、求めた量子化変換係数をエントロピー符号化部104及び逆量子化・逆変換部105に出力する。 The transformation / quantization unit 103 performs frequency transformation on the residual signal input from the subtraction unit 102 to calculate transformation coefficients. The transform / quantization unit 103 quantizes the calculated transform coefficient to obtain a quantized transform coefficient. Transform / quantization section 103 outputs the obtained quantized transform coefficient to entropy coding section 104 and inverse quantization / inverse transform section 105.

 エントロピー符号化部104には、変換・量子化部103からは量子化変換係数が入力され、予測パラメータ符号化部111からは予測パラメータが入力される。エントロピー符号化部104は、入力された分割情報、予測パラメータ、量子化変換係数等をエントロピー符号化して符号化ストリームTeを生成し、生成した符号化ストリームTeを外部に出力する。また、エントロピー符号化部104は、SAO_E1072から供給されるSAOパラメータSAOP_S、SAOP_Cを可変長符号化し、符号化ストリームに含める。 The entropy coding unit 104 receives quantization transform coefficients from the transform / quantization unit 103 and receives prediction parameters from the prediction parameter coding unit 111. The entropy coding unit 104 entropy-codes the input division information, prediction parameters, quantized transform coefficients and the like to generate a coded stream Te, and outputs the generated coded stream Te to the outside. Also, the entropy coding unit 104 performs variable-length coding on the SAO parameters SAOP_S and SAOP_C supplied from the SAO_E 1072 and includes them in the coded stream.

 逆量子化・逆変換部105は、動画像復号装置31における、逆量子化・逆変換部311(図4)と同じであり、変換・量子化部103から入力された量子化変換係数を逆量子化して変換係数を求める。逆量子化・逆変換部105は、求めた変換係数について逆変換を行い、残差信号を算出する。逆量子化・逆変換部105は、算出した残差信号を加算部106に出力する。 The inverse quantization / inverse transform unit 105 is the same as the inverse quantization / inverse transform unit 311 (FIG. 4) in the video decoding device 31, and dequantizes the quantized transform coefficients input from the transform / quantization unit 103. Quantize to obtain transform coefficients. The inverse quantization / inverse transform unit 105 performs inverse transform on the obtained transform coefficient to calculate a residual signal. The inverse quantization / inverse transform unit 105 outputs the calculated residual signal to the addition unit 106.

 加算部106は、予測画像生成部101から入力されたブロックの予測画像と逆量子化・逆変換部105から入力された残差信号を画素毎に加算して、復号画像を生成する。加算部106は、生成した(フィルタ前)復号画像をループフィルタ107に出力する。 The addition unit 106 adds the prediction image of the block input from the prediction image generation unit 101 and the residual signal input from the inverse quantization / inverse conversion unit 105 for each pixel to generate a decoded image. The addition unit 106 outputs the generated (pre-filter) decoded image to the loop filter 107.

 ループフィルタ107は加算部106が生成した復号画像に対し、デブロッキングフィルタ、サンプル適応オフセットフィルタ(SAO)、適応ループフィルタ(ALF)を施す。なお、ループフィルタ107は、必ずしも上記3種類のフィルタを含まなくてもよく、例えばデブロッキングフィルタのみの構成であってもよい。 The loop filter 107 applies a deblocking filter, a sample adaptive offset filter (SAO), and an adaptive loop filter (ALF) to the decoded image generated by the adding unit 106. The loop filter 107 may not necessarily include the three types of filters described above, and may have, for example, only a deblocking filter.

 デブロッキングフィルタ(E)1071、SAO_E1072、ALF(E)1073は、デブロッキングフィルタ3051、SAO3052、ALF3053に対し、フィルタパラメータを決定する処理が追加されているが、フィルタ処理の機能は同一である。フィルタパラメータは符号化され、動画像復号装置31に伝送される。 In the deblocking filter (E) 1071, SAO_E 1072, ALF (E) 1073, processing for determining filter parameters is added to the deblocking filter 3051, SAO 3052, ALF 3053, but the filter processing function is the same. The filter parameters are encoded and transmitted to the video decoding device 31.

  (符号化装置におけるSAO)
 画像符号化装置におけるSAOの動作を説明するため、図17(b)のSAO_E1072の詳細なブロック図を図18に示す。SAO_E1072はSAO情報設定部1701とSAO3052からなる。SAO3052は図8と同じであり、説明は省略する。SAO情報設定部1701はオフセット算出部1702、オフセット情報選択部1703とマージ情報設定部1704からなる。
(SAO in encoder)
In order to explain the operation of SAO in the image coding apparatus, a detailed block diagram of SAO_E 1072 in FIG. 17B is shown in FIG. The SAO_E 1072 includes an SAO information setting unit 1701 and an SAO 3052. The SAO 3052 is the same as in FIG. The SAO information setting unit 1701 includes an offset calculation unit 1702, an offset information selection unit 1703, and a merge information setting unit 1704.

 まずオフセット算出部1702を説明する。オフセット算出部1702は、EOの各オフセットクラス(0~3)およびBOの各バンドのオフセットを算出する。オフセットタイプがEOの場合、オフセットクラス毎に各画素のカテゴリ設定を行い、設定したカテゴリのオフセットを算出する。BOの場合、各画素に属するバンド(カテゴリ)を設定し、設定したカテゴリのオフセットを算出する。具体的な動作を、図19を用いて説明する。 First, the offset calculation unit 1702 will be described. The offset calculation unit 1702 calculates offsets of each offset class (0 to 3) of EO and each band of BO. When the offset type is EO, the category setting of each pixel is performed for each offset class, and the offset of the set category is calculated. In the case of BO, a band (category) belonging to each pixel is set, and the offset of the set category is calculated. A specific operation will be described using FIG.

 オフセット算出部1702は、S1801で、オフセットクラス(class)、count[class][cat]、SAD[class][cat]を初期化する。ここでcount[class][cat]はCTU内の(class, cat)の組み合わせ毎の画素数をカウントする変数、SAD[class][cat]はCTU内の(class, cat)の組み合わせ毎の復号画素値と原画素との絶対差分和を格納する変数である。 The offset calculation unit 1702 initializes the offset class (class), count [class] [cat], and SAD [class] [cat] in S1801. Here, count [class] [cat] is a variable that counts the number of pixels per combination of (class, cat) in the CTU, and SAD [class] [cat] is decoding for each combination of (class, cat) in the CTU It is a variable that stores the absolute difference sum of the pixel value and the original pixel.

 オフセット算出部1702は、S1802とS1803でEOのオフセットを算出する。S1802では、対象画素(x,y)に対し、オフセットクラスが示す参照画素aとbをセットし、カテゴリcatを導出する。そして、現在のオフセットクラスに対し、count[class][cat]を1インクリメントする。また現在のオフセットクラスにおいて、SAO前復号画素値rec[x][y]と原画素org[x][y]との絶対差分をSAD[class][cat]に加算する。 The offset calculation unit 1702 calculates the offset of EO in S1802 and S1803. In S1802, reference pixels a and b indicated by the offset class are set for the target pixel (x, y) to derive a category cat. Then, count [class] [cat] is incremented by one for the current offset class. Also, in the current offset class, the absolute difference between the SAO pre-decoded pixel value rec [x] [y] and the original pixel org [x] [y] is added to SAD [class] [cat].

  SAD[class][cat]+=abs(rec[x][y]-org[x][y])       (式SAO-9)
CTU内の対象領域に対し、上記の処理を行う。
SAD [class] [cat] + = abs (rec [x] [y] -org [x] [y]) (Formula SAO-9)
The above processing is performed on the target area in the CTU.

 オフセット算出部1702は、S1803でカテゴリ1~4に対し、下記の式を用いてオフセットoffset[class][cat]を算出し、オフセットクラスを1インクリメントする。 The offset calculation unit 1702 calculates offset offset [class] [cat] for categories 1 to 4 in S1803 using the following equation, and increments the offset class by one.

  offset[class][cat]=SAD[class][cat]/count[class][cat]  (式SAO-10)
なおカテゴリ0のオフセットは0にセットする。
offset [class] [cat] = SAD [class] [cat] / count [class] [cat] (Expression SAO-10)
The category 0 offset is set to 0.

 オフセット算出部1702は、S1804でclass=4(EOがすべて終了)であれば、S1805に進み、そうでなければS1802とS1803を繰り返す。 The offset calculation unit 1702 proceeds to S1805 if class = 4 (all EO ends) in S1804, and otherwise repeats S1802 and S1803.

 オフセット算出部1702は、S1805とS1806でBOのオフセットを算出する。S1805で対象画素のSAO前復号画素値rec[x][y]の属するバンドiを求め、バンドiの差分和SAD[class][i]にrec[x][y]とorg[x][y]の差分を加算する。またバンドiのカウントを1インクリメントする。 The offset calculation unit 1702 calculates the offset of BO in S1805 and S1806. The band i to which the SAO pre-decoded pixel value rec [x] [y] of the target pixel belongs is obtained in S1805, and the difference sum SAD [class] [i] of the band i is rec [x] [y] and org [x] [ Add the difference of y]. Also, the count of band i is incremented by one.

  i=rec[x][y]>>bandShift                (式SAO-11)
  SAD[class][i]+=(rec[x][y]-org[x][y])
  count[class][i]++
ここで、bandShiftはlog2(bandW)、bandWはBOのバンド幅である。
i = rec [x] [y] >> bandShift (Expression SAO-11)
SAD [class] [i] + = (rec [x] [y] -org [x] [y])
count [class] [i] ++
Here, bandShift is log 2 (bandW) and bandW is the bandwidth of BO.

 オフセット算出部1702は、S1806で32個のバンドi(i=0~31)に対し、各々オフセットを算出する。 The offset calculation unit 1702 calculates offsets for 32 bands i (i = 0 to 31) in S1806.

  offset[class][i]=SAD[class][i]/count[class][i]    (式SAO-12)
 以上でEO(class=0~3)の各カテゴリ(cat=1~4)のオフセット、およびBO(class=4)の各バンド(i=0~31)のオフセットを各々算出した。
offset [class] [i] = SAD [class] [i] / count [class] [i] (equation SAO-12)
As described above, the offset of each category (cat = 1 to 4) of EO (class = 0 to 3) and the offset of each band (i = 0 to 31) of BO (class = 4) were calculated.

 オフセット情報選択部1703は、オフセット算出部1702で算出したオフセットを用いて、オフセットタイプ(EO/BO)と、EOの場合はオフセットクラス、BOの場合はバンド位置を選択する。図20はオフセット情報選択部1703の動作を示すフローチャートである。なおS1902~S1904はEO、S1905~S1907はBOに関する処理である。 The offset information selection unit 1703 uses the offset calculated by the offset calculation unit 1702 to select an offset type (EO / BO), an offset class in the case of EO, and a band position in the case of BO. FIG. 20 is a flowchart showing the operation of the offset information selection unit 1703. S1902 to S1904 are processes relating to EO, and S1905 to S1907 are processes relating to BO.

 オフセット情報選択部1703は、S1901で、オフセットクラスclass(0~3)と絶対差分和SAD[class]を初期化する。絶対差分和SAD[class]は、SAOを適用した(オフセットを加算した)画素値と原画素値の絶対差分和を格納する変数である。 The offset information selection unit 1703 initializes the offset class class (0 to 3) and the absolute difference sum SAD [class] in S1901. The absolute difference sum SAD [class] is a variable that stores the absolute difference sum of the pixel value to which SAO is applied (to which the offset is added) and the original pixel value.

 絶対差分和SAD[class]は、S1902で、オフセットクラスで示される参照画素a、bをセットし、CTUの各画素に対し上述の方法でカテゴリを導出し、各カテゴリに割り当てられたオフセットを用いて絶対差分和SADを算出する。 The absolute difference sum SAD [class] sets the reference pixels a and b indicated by the offset class in S1902, derives the category for each pixel of CTU by the method described above, and uses the offset assigned to each category Calculate the absolute difference sum SAD.

 SAD[class]+=abs(rec[x][y]+offset[class][cat]-org[x][y])  (式SAO-13)
なおカテゴリ0のオフセットは0にセットする。rec[x][y]+offset[class][cat]は(class, cat)の組み合わせ時のSAOの値であり、これと原画素値org[x][y]との絶対差分をオフセットクラス毎にSADに加算する。CTU内の対象領域の処理が終了すれば、オフセットクラスを1インクリメントする。
SAD [class] + = abs (rec [x] [y] + offset [class] [cat] -org [x] [y]) (Formula SAO-13)
The category 0 offset is set to 0. rec [x] [y] + offset [class] [cat] is the value of SAO at the time of combination of (class, cat), and the absolute difference between this and the original pixel value org [x] [y] is offset class Add to SAD every time. When the processing of the target area in the CTU is completed, the offset class is incremented by one.

 オフセット情報選択部1703は、S1903で、オフセットクラスが4に等しいか否かをチェックする。オフセットクラスが4に等しくなければ、4になるまでS1902の処理を行う。オフセットクラスが4に等しい場合、EOの全オフセットクラスの処理が終了したことになり、S1904に進む。 The offset information selection unit 1703 checks in step S1903 whether the offset class is equal to four. If the offset class is not equal to 4, the processing of S1902 is performed until it is 4. If the offset class is equal to 4, processing of all offset classes of EO is completed, and the process advances to step S1904.

 オフセット情報選択部1703は、S1904で、SAD[i](i=0~3)が最小となるiを求め、これをEOのオフセットクラスとする。 The offset information selection unit 1703 obtains i at which SAD [i] (i = 0 to 3) becomes minimum at S1904, and sets it as an EO offset class.

  SADEO=min(SAD[i])、class=左記を満たすi         (式SAO-14)
 オフセット情報選択部1703は、S1905で、CTUの各バンドに対し、SAOを適用した(オフセットを加算した)画素値と原画素値との絶対差分和を計算する。具体的には、対象画素(x,y)の属するバンドiと、オフセット算出部1702で求めた各バンドのオフセットoffset[class][i]を用いて、バンドiが4連続のバンド(j~j+3)のいずれかに属する場合、SAOを適用した画素値rec[x][y]+oftと原画素値org[x][y]の絶対差分和を計算する。ここで、
  i=rec[X]>>bandShift                  (式SAO-15)
  oft =offset[class=4][j]  (j<=i<=j+3)
    =0          (otherwise)
  SAD[i]=abs(rec[x][y]+oft-org[x][y])
とする。そしてCTUの対象領域に対し上記処理を施した後、jを1インクリメントする。
SAD EO = min (SAD [i]), class = i that satisfies the left (Equation SAO-14)
In step S1905, the offset information selection unit 1703 calculates, for each band of CTUs, the sum of absolute differences between pixel values to which SAO is applied (offset is added) and original pixel values. Specifically, using the band i to which the target pixel (x, y) belongs and the offset offset [class] [i] of each band obtained by the offset calculation unit 1702, the band i has four consecutive bands (j to If it belongs to any of j + 3), the absolute difference sum of the pixel value rec [x] [y] + oft to which SAO is applied and the original pixel value org [x] [y] is calculated. here,
i = rec [X] >> bandShift (equation SAO-15)
oft = offset [class = 4] [j] (j <= i <= j + 3)
= 0 (otherwise)
SAD [i] = abs (rec [x] [y] + oft-org [x] [y])
I assume. After the above processing is performed on the CTU target area, j is incremented by one.

 オフセット情報選択部1703は、S1906で、i<29であるか否かをチェックする。j<29であれば、処理を終了していないバンドがあるので、j=29になるまでS1905を繰り返す。j=29の場合、全バンドに対し処理が終了したので、S1907に進む。 The offset information selection unit 1703 checks in step S1906 whether i <29. If j <29, there is a band that has not been processed, so S1905 is repeated until j = 29. If j = 29, processing has ended for all bands, and the process advances to step S1907.

 オフセット情報選択部1703は、S1907で、SAD[j]が最小となるj(j=0~31)を現CTUのBOのバンド位置(sao_band_position)に設定する。 In S1907, the offset information selection unit 1703 sets j (j = 0 to 31) that minimizes SAD [j] to the band position (sao_band_position) of the BO of the current CTU.

  SADBO=min(SAD[j])、band_position=左記を満たすj    (式SAO-16)
 オフセット情報選択部1703は、S1908で、SAOEOとSAOBOの大小関係を比較する。SAOBOが大きい場合、S1909に進み、現CTUのオフセットタイプ(type)をEOにセットする。そうでない場合、S1910に進み、現CTUのオフセットタイプ(type)をBOにセットする。
SAD BO = min (SAD [j]), band_position = j that satisfies the left (Equation SAO-16)
In S1908, the offset information selection unit 1703 compares the magnitude relationship between SAO EO and SAO BO . If the SAO BO is large, step S1909 follows and the offset type (type) of the current CTU is set to EO. If not, it proceeds to S1910 and sets the offset type (type) of the current CTU to BO.

 以上がオフセット情報選択部1703で実施される処理である。 The above is the processing performed by the offset information selection unit 1703.

 SAO情報設定部1701で算出したオフセット情報(オフセット、オフセットタイプ、オフセットクラス、バンド位置)はSAO3052に入力される。SAO3052の動作は動画像復号装置31のSAO3052の動作と同じであり、説明を省略する。 The offset information (offset, offset type, offset class, band position) calculated by the SAO information setting unit 1701 is input to the SAO 3052. The operation of the SAO 3052 is the same as the operation of the SAO 3052 of the video decoding device 31, and the description thereof is omitted.

  (マージ制御情報決定部1704)
 オフセット算出部1702、オフセット情報選択部1703で導出された対象CTUのSAOパラメータが、既に符号化された隣接CTUのSAOパラメータと等しい場合には、マージ制御情報(sao_merge_left_flag, sao_merge_up_flag)を1にセットし、対象CTUのSAOパラメータが隣接CTUのSAOパラメータと等しくない場合は、マージ制御情報を0にセットする。より具体的には、対象CTUと左隣接CTUのSAOパラメータが等しい場合には、sao_merge_left_flag=1、対象CTUと上隣接CTUのSAOパラメータが等しい場合には、sao_merge_up_flag=1とし、それ以外の場合には、マージ制御情報を0とする。
(Merge control information determination unit 1704)
If the SAO parameter of the target CTU derived by the offset calculation unit 1702 and the offset information selection unit 1703 is equal to the SAO parameter of the adjacent CTU already encoded, the merge control information (sao_merge_left_flag, sao_merge_up_flag) is set to 1. If the SAO parameter of the target CTU is not equal to the SAO parameter of the adjacent CTU, the merge control information is set to 0. More specifically, if the target CTU and the left adjacent CTU have the same SAO parameters, sao_merge_left_flag = 1, and if the target CTU and the upper adjacent CTU have the same SAO parameters, set sao_merge_up_flag = 1, otherwise Sets the merge control information to 0.

 次に、本発明のSAO3054に対応するSAO_E1074について説明する。 Next, SAO_E 1074 corresponding to SAO 3054 of the present invention will be described.

 図11(b)は本実施形態でのループフィルタ107E(動画像符号化装置内)のブロック図である。図11(b)に示すループフィルタ107Eは図17のループフィルタ107を置き換えたものであり、入出力もループフィルタ107と同じである。つまり、ループフィルタへの入力はフィルタ前復号画像であり、ループフィルタからの出力はループフィルタ処理済の復号画像である。また、ループフィルタ107Eにおいて、デブロッキングフィルタ1071とALF1073の構成は、図17のデブロッキングフィルタ1071とALF1073の構成と同じであり、同じ番号を付している。図11(c)はループフィルタ107Eの動作を示すフローチャートであり、処理の流れはループフィルタ305Dと同じであるので、説明は省略する。 FIG. 11B is a block diagram of the loop filter 107E (in the moving picture coding apparatus) in the present embodiment. The loop filter 107E shown in FIG. 11B is a replacement of the loop filter 107 in FIG. 17, and the input and output are also the same as the loop filter 107. That is, the input to the loop filter is a pre-filter decoded image, and the output from the loop filter is a loop-filtered decoded image. In the loop filter 107E, the configurations of the deblocking filter 1071 and the ALF 1073 are the same as the configurations of the deblocking filter 1071 and the ALF 1073 in FIG. FIG. 11C is a flowchart showing the operation of the loop filter 107E. The flow of the process is the same as that of the loop filter 305D, so the description will be omitted.

 SAO_E1074は、SAO3054と同様、EOの対象領域を、対象CTUの右端1画素分と下端1画素分を除くCTU内画素(図13(a)の斜線領域)に設定する。また、BOの対象領域は図13(c)の斜線領域であり、対象CTUの全画素である。 Similar to the SAO 3054, the SAO_E 1074 sets the EO target area to the CTU pixels (hatched area in FIG. 13A) excluding the right end pixel and the lower end pixel of the target CTU. Further, the target region of BO is a hatched region in FIG. 13C, which is all pixels of the target CTU.

 図21は本発明のSAO_E1074のブロック図である。図18のSAO_E1072との違いは、対象領域設定部1705が追加されたことである。対象領域設定部1705は、SAOの対象領域として、図13(a)の斜線領域を設定する。対象領域設定部1705は、図15の対象領域設定部1004と同じであり、説明を省略する。オフセット算出部1702、オフセット情報選択部1703、マージ情報設定部1704は、図18のオフセット算出部1702、オフセット情報選択部1703、マージ情報設定部1704と同じであるが、対象領域設定部1705で設定されたSAOの対象領域に対して各々の処理を実施する。SAO3054は図15のSAO3054と同じであり、説明を省略する。 FIG. 21 is a block diagram of SAO_E 1074 of the present invention. The difference from SAO_E 1072 in FIG. 18 is that a target area setting unit 1705 is added. The target area setting unit 1705 sets a shaded area in FIG. 13A as a target area of SAO. The target area setting unit 1705 is the same as the target area setting unit 1004 in FIG. The offset calculation unit 1702, the offset information selection unit 1703, and the merge information setting unit 1704 are the same as the offset calculation unit 1702, the offset information selection unit 1703, and the merge information setting unit 1704 in FIG. Each process is performed on the target area of the SAO. The SAO 3054 is the same as the SAO 3054 in FIG.

 EOの対象領域を、対象CTUの右端1画素分と下端1画素分を除くCTU内画素に限定することで、SAO_E1074はEO、BOともに、SAOパラメータSAOP_S、SAOP_CをCTU毎に導出することができる。従って、符号化処理の遅延を削減することができる。また、デブロッキングフィルタ済の画素を使用する場合に比べて、SAOパラメータの算出に使用できる画素が増加するため、SAOパラメータの精度を向上させることができる。 By limiting the EO target area to CTU pixels excluding the right end pixel and the lower end pixel of the target CTU, SAO_E 1074 can derive SAO parameters SAOP_S and SAOP_C for each CTU for both EO and BO. . Therefore, the delay of the encoding process can be reduced. In addition, since the number of pixels that can be used for calculating the SAO parameter increases compared to the case where the deblocking filtered pixel is used, the accuracy of the SAO parameter can be improved.

  (変形例4)
 本発明の変形例1のSAO3054に対応するSAO_E1074を本発明の変形例4で説明する。
(Modification 4)
SAO_E 1074 corresponding to SAO 3054 of Modification 1 of the present invention will be described in Modification 4 of the present invention.

 変形例4を実施する場合、図21の対象領域設定部1705で設定するEO用の対象領域は、対象CTUの下端1画素分を除くCTU内画素(図13(b)の斜線領域)である。それ以外の処理の変更はない。 When the modification 4 is performed, the target region for EO set by the target region setting unit 1705 in FIG. 21 is a CTU pixel (hatched region in FIG. 13B) excluding one lower end pixel of the target CTU. . There is no other processing change.

 EO対象領域を、対象CTUの下端1画素分を除くCTU内画素に設定することで、EOの対象領域を図13(a)の斜線領域に設定する場合に比べ、1CTU分の遅延が発生する。しかし、対象CTUの右端の画素にもEOを実施することができるので、画質は向上する。1CTU分の遅延は、EOの対象領域を図12(a)のように設定した場合に発生する1CTUライン分の遅延に比べ十分小さい。従って、従来技術(図12(a))に比べ、画質を維持しつつ、遅延を低下させることができる。 By setting the EO target area to pixels in the CTU excluding the lower end one pixel of the target CTU, a delay of 1 CTU occurs compared to the case where the EO target area is set to the hatched area in FIG. . However, since the EO can be performed on the rightmost pixel of the target CTU, the image quality is improved. The delay of 1 CTU is sufficiently smaller than the delay of 1 CTU line which occurs when the target area of EO is set as shown in FIG. 12A. Therefore, the delay can be reduced while maintaining the image quality as compared with the prior art (FIG. 12A).

  (変形例5)
 本発明の変形例2のSAO3054に対応するSAO_E1074を本発明の変形例5で説明する。
(Modification 5)
SAO_E 1074 corresponding to SAO 3054 of Modification 2 of the present invention will be described in Modification 5 of the present invention.

 変形例5を実施する場合、図21の対象領域設定部1705で設定するEO用の対象領域は対象CTUの左端1画素分、右端1画素分と下端1画素分を除くCTU内画素(図14(a)の斜線領域)である。あるいは、対象CTUの上端1画素分、右端1画素分と下端1画素分を除くCTU内画素(図14(b)の斜線領域)としてもよい。それ以外の処理の変更はない。これらの場合、対象CTUの後続のCTUを参照しないので、遅延が増えることはない。 When the modification 5 is performed, the target area for EO set by the target area setting unit 1705 in FIG. 21 is a pixel in CTU excluding one pixel at the left end and one pixel at the right end and one lower end of the target CTU (FIG. 14 The shaded area in (a)). Alternatively, the CTU pixels (the shaded area in FIG. 14B) excluding the upper end one pixel, the right end pixel, and the lower end pixel of the target CTU may be excluded. There is no other processing change. In these cases, the delay does not increase because the subsequent CTUs of the target CTU are not referenced.

 変形例5のようにEO対象領域を設定することで、CTU単位の処理を可能にし、遅延を低下させることができる。 By setting the EO target area as in the fifth modification, processing on a CTU basis can be enabled, and the delay can be reduced.

  (変形例6)
 本発明の変形例3のSAO3054に対応するSAO_E1074を本発明の変形例6で説明する。
(Modification 6)
SAO_E 1074 corresponding to SAO 3054 of Modification 3 of the present invention will be described in Modification 6 of the present invention.

 変形例6を実施する場合、図21の対象領域設定部1705で設定するEO用の対象領域はCTU境界から1画素内側に入った斜線領域(図14(c)の斜線領域)である。それ以外の処理の変更はない。 When the sixth modification is performed, the target region for EO set by the target region setting unit 1705 in FIG. 21 is a hatched region (hatched region in FIG. 14C) which is located one pixel inside from the CTU boundary. There is no other processing change.

 変形例6のようにEO対象領域を設定することで、参照領域を含めたSAOに必要な領域がCTU内部の領域に限定される。従って、簡単な処理で遅延を低下させることができる。 By setting the EO target area as in the sixth modification, the area required for the SAO including the reference area is limited to the area inside the CTU. Therefore, the delay can be reduced by simple processing.

 予測パラメータメモリ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つのセットを選択する。符号化パラメータとは、上述したQTあるいはBT分割パラメータや予測パラメータやこれらに関連して生成される符号化の対象となるパラメータである。予測画像生成部101は、これらの符号化パラメータのセットの各々を用いてブロックの予測画像を生成する。 The coding parameter determination unit 110 selects one of a plurality of sets of coding parameters. The coding parameter is the QT or BT division parameter or prediction parameter described above, or a parameter to be coded that is generated in association with these. The predicted image generation unit 101 generates a predicted image of a block using each of these sets of coding parameters.

 符号化パラメータ決定部110は、複数のセットの各々について情報量の大きさと符号化誤差を示すRDコスト値を算出する。符号化パラメータ決定部110は、算出したRDコスト値が最小となる符号化パラメータのセットを選択する。これにより、エントロピー符号化部104は、選択した符号化パラメータのセットを符号化ストリームTeとして外部に出力し、選択されなかった符号化パラメータのセットを出力しない。符号化パラメータ決定部110は決定した符号化パラメータを予測パラメータメモリ108に記憶する。 The coding parameter determination unit 110 calculates an RD cost value indicating the size of the information amount and the coding error for each of the plurality of sets. The coding parameter determination unit 110 selects a set of coding parameters that minimize the calculated RD 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. 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.

 インター予測パラメータ符号化部112は、符号化パラメータ決定部110から入力された予測パラメータに基づいて、差分ベクトルのようなインター予測パラメータを導出する。インター予測パラメータ符号化部112は、予測画像生成部101に出力する予測画像の生成に必要なパラメータを導出する構成として、インター予測パラメータ復号部303がインター予測パラメータを導出する構成と一部同一の構成を含む。 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 is partially identical to the configuration in which the inter prediction parameter decoding unit 303 derives the inter prediction parameter, as a configuration for deriving a parameter necessary for generating a predicted image to be output to the predicted image generation unit 101. Includes configuration.

 また、イントラ予測パラメータ符号化部113は、予測画像生成部101に出力する予測画像の生成に必要な予測パラメータを導出する構成として、イントラ予測パラメータ復号部304がイントラ予測パラメータを導出する構成と、一部同一の構成を含む。 Further, the intra prediction parameter coding unit 113 derives the prediction parameters necessary for generating the prediction image to be output to the prediction image generation unit 101, the intra prediction parameter decoding unit 304 derives the intra prediction parameter, and Some include the same configuration.

  (第2の実施形態)
 本実施形態では、デブロッキングフィルタの前にSAO処理を実施し、SAO済復号画像に対しデブロッキングフィルタを実施する場合の別の技術について説明する。
Second Embodiment
In the present embodiment, another technique will be described in which the SAO process is performed before the deblocking filter, and the deblocking filter is performed on the SAO-decoded image.

 本実施形態では、SAOのシンタックスとして図7の代わりに図22を用いる。図22に示すシンタックスでは、EOにおいて、CTU毎に導出するオフセットSaoOffsetValの正負の符号(sao_offset_sign)を通知することができる(SYN2201)。第1の実施形態では、EOのオフセットSaoOffsetValの符号を通知せず、カテゴリによって符号を一意に決定していた。つまり、図6(b)に示すカテゴリ1および2の場合はsao_offset_sign=0(正を示す)にセットし、カテゴリ3および4の場合はsao_offset_sign=1(負を示す)にセットしていた。従って、EOではリンギング歪を除去する効果があったが、エッジ強調効果はなかった。第2の実施形態では、EOでもsao_offset_signを通知し、正負のオフセットを用いてフィルタ処理することで、EOにリンギング除去効果以外にエッジ強調効果を持たせる。 In this embodiment, FIG. 22 is used instead of FIG. 7 as the syntax of SAO. In the syntax shown in FIG. 22, in EO, the positive / negative sign (sao_offset_sign) of the offset SaoOffsetVal derived for each CTU can be notified (SYN 2201). In the first embodiment, the sign of the EO offset SaoOffsetVal is not notified, and the sign is uniquely determined by the category. That is, in the case of the categories 1 and 2 shown in FIG. 6B, sao_offset_sign = 0 (indicating positive) is set, and in the case of the categories 3 and 4, sao_offset_sign = 1 (indicating negative) is set. Therefore, EO had the effect of removing ringing distortion, but had no edge enhancement effect. In the second embodiment, even in EO, sao_offset_sign is notified, and filtering is performed using positive and negative offsets, thereby providing EO with an edge emphasizing effect other than the ringing removal effect.

 ところで、対象CTUの逆量子化・逆変換部311の出力である残差信号と予測画像生成部308の出力である予測画像を加算したフィルタ前復号画像には符号化歪が含まれている場合がある。一方、デブロッキングフィルタはブロック境界の画素値によってオンオフ、およびフィルタの強度を変更する。そのため、EOによってエッジ強調する場合、SAOの出力が符号化歪による影響を受けると、SAOの後に実施するデブロッキングフィルタが誤判定する可能性がある。例えば、SAOがブロック歪をエッジ強調した結果、デブロッキングフィルタがブロック歪をエッジとみなし、フィルタをオフと判定した場合等である。また、デブロッキングフィルタ処理前の画像のSAOを適用する場合、ブロック歪を強調し主観画質が低下する可能性がある。 When the unfiltered decoded image obtained by adding the residual signal output from the inverse quantization / inverse transform unit 311 of the target CTU and the predicted image output from the predicted image generation unit 308 includes coding distortion There is. On the other hand, the deblocking filter changes the on / off and the filter strength depending on the pixel value of the block boundary. Therefore, in the case of edge enhancement by EO, if the output of SAO is affected by coding distortion, there is a possibility that the deblocking filter implemented after SAO may make an erroneous determination. For example, as a result of SAO edge-enhancing block distortion, the deblocking filter considers block distortion as an edge and determines that the filter is off. Moreover, when applying SAO of the image before a deblocking filter process, block distortion may be emphasized and a subjective image quality may fall.

 そこで、第2の実施形態では、EOが選択され、かつ、オフセットにエッジを強調する効果がある場合、ブロック境界ではSAOをかけない(オフにする)ことで、後続のデブロッキングフィルタで発生する可能性のある画質劣化を回避する。ここで、ブロックはデブロッキングフィルタの処理対象の単位であり、例えばPUやTUである。 Therefore, in the second embodiment, when EO is selected and the offset has an effect of emphasizing an edge, it is generated in the subsequent deblocking filter by not applying (turning off) SAO at the block boundary. Avoid possible image quality degradation. Here, the block is a unit to be processed by the deblocking filter, and is, for example, a PU or a TU.

 オフセット加算部10032は、EO、かつ、対象画素がブロック境界画素、かつ、(カテゴリ1もしくは2)、かつ、sao_offset_sign=1(負を示す)の場合、対象画素にフィルタ処理を適用しない。また、対象画素がブロック境界画素、かつ、カテゴリ1および2、かつ、(カテゴリ3もしくは4)、かつ、sao_offset_sign=0(正を示す)の場合、対象画素にフィルタ処理を適用しない。 The offset addition unit 10032 does not apply the filtering process to the target pixel when EO, and the target pixel is a block boundary pixel, (category 1 or 2), and sao_offset_sign = 1 (indicating negative). When the target pixel is a block boundary pixel, and categories 1 and 2 (category 3 or 4) and sao_offset_sign = 0 (indicating positive), the filtering process is not applied to the target pixel.

 言い換えると、EOの場合、対象画素がブロック境界画素以外、もしくは、((カテゴリ1もしくは2)、かつ、sao_offset_sign=1以外)の場合に、対象画素にフィルタ処理を適用する。また、対象画素がブロック境界画素、もしくは、((カテゴリ3もしくは4)、かつ、sao_offset_sign=0以外)の場合、対象画素にフィルタ処理を適用する。 In other words, in the case of EO, the filtering process is applied to the target pixel when the target pixel is other than the block boundary pixel or ((category 1 or 2) and sao_offset_sign = 1). When the target pixel is a block boundary pixel or ((category 3 or 4) and sao_offset_sign = 0 other than 0), the filter processing is applied to the target pixel.

 図23は本実施形態のオフセット加算部10032の動作を示すフローチャートである。オフセット加算部10032は、図8および図15のオフセット加算部1003を置き換えたものである。オフセット加算部1003は、図9のS907および図16のS1408に示すように、オフセットを加算する処理を実施するだけであったが、オフセット加算部10032では図23に示す処理を実施する。 FIG. 23 is a flowchart showing the operation of the offset addition unit 10032 of this embodiment. The offset addition unit 10032 replaces the offset addition unit 1003 in FIGS. 8 and 15. Although the offset addition unit 1003 only performs the process of adding the offset as shown in S907 of FIG. 9 and S1408 of FIG. 16, the offset addition unit 10032 performs the process shown in FIG.

 オフセット加算部S10032は、S2301でオフセットタイプがEOであるか否かを判定する。オフセットタイプがEOでなければ(S2301でNO)、S2304に進む。オフセットタイプがEOならば(S2301でYES)、S2302に進む。 The offset addition unit S10032 determines in S2301 whether the offset type is EO. If the offset type is not EO (NO in S2301), the process proceeds to S2304. If the offset type is EO (YES in S2301), the process advances to S2302.

 オフセット加算部S10032は、S2302で条件1(カテゴリとオフセットの関係)を判定する。(カテゴリ1もしくは2)かつsao_offset_sign=1(負を示す)、もしくは、(カテゴリ3もしくは4)かつsao_offset_sign=0(正を示す)の場合には(S2302でYES)、S2303に進む。それ以外は(S2302でNO)、S2304に進む。 The offset addition unit S10032 determines Condition 1 (relationship between category and offset) in S2302. If (category 1 or 2) and sao_offset_sign = 1 (indicating a negative) or (category 3 or 4) and sao_offset_sign = 0 (indicating a positive) (YES in S2302), the process proceeds to S2303. Otherwise (NO in S2302), the process proceeds to S2304.

 オフセット加算部S10032は、S2303で対象画素がブロック境界にあるか否かを判定する。対象画素がブロック境界になければ(S2303でNO)、S2304に進む。対象画素がブロック境界にあれば(S2303でYES)、対象画素にオフセットを加算せずに処理を終了する。ここで、対象画素(x,y)がブロック境界にあるか否かは、例えば下式で判定することができる。 The offset addition unit S10032 determines in S2303 whether or not the target pixel is at a block boundary. If the target pixel is not at the block boundary (NO in S2303), the process proceeds to S2304. If the target pixel is at a block boundary (YES in S2303), the process ends without adding the offset to the target pixel. Here, whether or not the target pixel (x, y) is at the block boundary can be determined, for example, by the following equation.

  if (x%CUWidth==0 && y%CUHeight==0)     (式SAO-17)
ここで、CUWidthとCUHeightはブロックの幅と高さである。(式SAO-17)が真の場合、対象画素(x,y)はブロック境界に存在し、そうでなければ、対象画素(x,y)はブロック境界に存在しない。
if (x% CUWidth == 0 && y% CUHeight == 0) (Expression SAO-17)
Here, CUWidth and CUHeight are the width and height of the block. If (Equation SAO-17) is true, the target pixel (x, y) is at a block boundary, otherwise the target pixel (x, y) is not at a block boundary.

 オフセット加算部S10032は、S2304で、(式SAO-8)により対象画素の画素値を算出する。S2304の処理は図9のS907、図16のS1408と同じである。 The offset addition unit S 10032 calculates the pixel value of the target pixel by (Expression SAO-8) in S 2304. The process of S2304 is the same as S907 of FIG. 9 and S1408 of FIG.

 なお、対象画素位置の判定はブロック境界ではなく、CTU境界であってもよい。この場合、(式SAO-17)のブロックの幅CUWidth、ブロックの高さCUHeightはCTUの幅CTUWidth、CTUの高さCTUHeightで置き換える。 The determination of the target pixel position may not be a block boundary but may be a CTU boundary. In this case, the block width CUWidth and the block height CUHeight of (Expression SAO-17) are replaced by the CTU width CTUWidth and the CTU height CTUHeight.

 以上のように、本実施形態では、EOが選択され、かつ、sao_offset_signが負の符号を示す場合、ブロック境界ではSAOをオフにすることで、後続のデブロッキングフィルタで発生する可能性のある画質劣化を回避する。 As described above, in the present embodiment, when EO is selected and sao_offset_sign indicates a negative sign, image quality that may occur in the subsequent deblocking filter by turning off SAO at the block boundary Avoid degradation.

 本発明の一態様に係る画像フィルタ装置は、画像を所定単位のブロックに分割し、各画素値にオフセットを加算する画像フィルタ装置であって、入力画像の所定単位のブロック(対象ブロック)に、対象画素と隣接画素との大小関係に応じて対象画素のカテゴリ分類を導出する第1のオフセットタイプ、または、対象画素の画素値の大きさにより、対象画素のカテゴリ分類を分類する第2のオフセットタイプという2つのオフセットタイプのいずれかを割り当てる手段と、対象ブロックのフィルタ処理を実施するフィルタ対象領域を設定する手段と、前記入力画像と前記オフセットタイプを用いて各画素のカテゴリを設定し、オフセットを導出する手段と、前記オフセットに応じて設定されたカテゴリに対応するオフセットを各画素に加算することによりフィルタ処理を実施する手段とを備え、前記入力画像は、イントラ予測処理あるいはインター予測処理で生成した予測画像と、予測残差信号とを加算した画像であり、前記カテゴリを設定し、オフセットを導出する手段は、対象ブロックが所定の第1のオフセットタイプの場合、対象画素値と、オフセットクラスで指定された2個の参照画素値を用いてカテゴリを設定し、カテゴリ毎にオフセットを導出し、対象ブロックが所定の第2のオフセットタイプの場合、対象画素値の属するバンドからカテゴリを設定し、カテゴリ毎にオフセットを導出する。 An image filter device according to an aspect of the present invention is an image filter device that divides an image into blocks of a predetermined unit and adds an offset to each pixel value, and the block (target block) of a predetermined unit of an input image The first offset type that derives the category classification of the target pixel according to the magnitude relationship between the target pixel and the adjacent pixel, or the second offset that classifies the category classification of the target pixel according to the size of the pixel value of the target pixel The category of each pixel is set using the means for assigning one of two offset types, ie, the type, the means for setting the filter target area for performing the filtering process of the target block, and the input image and the offset type; For each pixel, and an offset corresponding to a category set according to the offset. The input image is an image obtained by adding a prediction image generated by intra prediction processing or inter prediction processing and a prediction residual signal, and the category is set; The means for deriving the offset sets the category using the target pixel value and the two reference pixel values designated by the offset class when the target block is a predetermined first offset type, and the offset is set for each category. When the target block is a predetermined second offset type, a category is set from the band to which the target pixel value belongs, and an offset is derived for each category.

 本発明の一態様に係る画像フィルタ装置において、前記対象ブロックのフィルタ対象領域を設定する手段は、対象ブロックが第1のオフセットタイプである場合に設定する領域と、対象ブロックが第2のオフセットタイプである場合に設定する領域とに、異なる領域を設定する。 In the image filter device according to one aspect of the present invention, the means for setting the filter target area of the target block includes an area to be set when the target block is the first offset type, and an offset type of the target block. A different area is set to the area to be set in the case of

 本発明の一態様に係る画像フィルタ装置において、前記対象ブロックのフィルタ対象領域を設定する手段は、対象ブロックが第2のオフセットタイプである場合に、前記対象ブロックのフィルタ対象領域を、対象ブロックの全領域に設定する。 In the image filter device according to one aspect of the present invention, the means for setting the filter target area of the target block is a filter target area of the target block of the target block when the target block is the second offset type. Set to all areas.

 本発明の一態様に係る画像フィルタ装置において、前記対象ブロックのフィルタ対象領域を設定する手段は、対象ブロックが第1のオフセットタイプである場合に、前記対象ブロックのフィルタ対象領域を、対象ブロック境界よりも1画素内側に入った領域に設定する。 In the image filter device according to one aspect of the present invention, the means for setting the filter target area of the target block is a filter target area of the target block, the target block boundary when the target block is the first offset type. It is set to an area that is inside by 1 pixel.

 本発明の一態様に係る画像フィルタ装置において、前記対象ブロックのフィルタ対象領域を設定する手段は、対象ブロックが第1のオフセットタイプである場合に、前記対象ブロックのフィルタ対象領域を、対象ブロックの右端1画素分と下端1画素分を除く対象ブロックに設定する。 In the image filter device according to one aspect of the present invention, the means for setting the filter target area of the target block is a filter target area of the target block of the target block when the target block is the first offset type. The target block is set except for the right end one pixel and the lower end one pixel.

 本発明の一態様に係る画像フィルタ装置において、前記対象ブロックのフィルタ対象領域を設定する手段は、対象ブロックが第1のオフセットタイプである場合に、前記対象ブロックのフィルタ対象領域を、対象ブロックの左端1画素分、右端1画素分と下端1画素分を除く対象ブロックに設定する。 In the image filter device according to one aspect of the present invention, the means for setting the filter target area of the target block is a filter target area of the target block of the target block when the target block is the first offset type. The target block is set except for the left end one pixel, the right end one pixel, and the lower end one pixel.

 本発明の一態様に係る画像フィルタ装置において、前記対象ブロックのフィルタ対象領域を設定する手段は、対象ブロックが第1のオフセットタイプである場合に、前記対象ブロックのフィルタ対象領域を、対象ブロックの下端1画素分を除く対象ブロックに設定する。 In the image filter device according to one aspect of the present invention, the means for setting the filter target area of the target block is a filter target area of the target block of the target block when the target block is the first offset type. Set as the target block excluding the lower 1 pixel.

 本発明の一態様に係る画像フィルタ装置は、適応オフセットフィルタSAOの出力に対し、デブロッキングフィルタを実施する。 The image filter device according to an aspect of the present invention implements a deblocking filter on the output of the adaptive offset filter SAO.

 本発明の一態様に係る画像フィルタ装置は、適応オフセットフィルタSAOの出力に対し、デブロッキングフィルタを実施し、さらにデブロッキングフィルタの出力に対し、適応ループフィルタALFを実施する。 The image filter device according to an aspect of the present invention performs a deblocking filter on the output of the adaptive offset filter SAO, and further performs an adaptive loop filter ALF on the output of the deblocking filter.

 本発明の一態様に係る画像フィルタ装置において、画像を所定単位のブロックに分割し、各画素値にオフセットを加算する画像フィルタ装置であって、入力画像の所定単位のブロック(対象ブロック)に、対象画素と隣接画素との大小関係に応じて対象画素のカテゴリ分類を導出する第1のオフセットタイプ、または、対象画素の画素値の大きさにより、対象画素のカテゴリ分類を分類する第2のオフセットタイプという2つのオフセットタイプのいずれかを割り当てる手段と、前記入力画像と前記オフセットタイプを用いて各画素のカテゴリを設定し、オフセットを導出する手段と、前記オフセットに応じて設定されたカテゴリに対応するオフセットを各画素に加算することによりフィルタ処理を実施する手段とを備え、前記入力画像は、イントラ予測処理あるいはインター予測処理で生成した予測画像と、予測残差信号とを加算した画像であり、前記フィルタ処理を実施する手段は、対象ブロックが所定の第1のオフセットタイプの場合、オフセットが負の値であれば、対象ブロックのブロック境界の画素ではフィルタ処理をオフにする。 In an image filter device according to an aspect of the present invention, an image filter device that divides an image into blocks of a predetermined unit and adds an offset to each pixel value, and blocks (target block) a predetermined unit of an input image The first offset type that derives the category classification of the target pixel according to the magnitude relationship between the target pixel and the adjacent pixel, or the second offset that classifies the category classification of the target pixel according to the size of the pixel value of the target pixel Means for assigning one of two offset types, ie, type, setting the category of each pixel using the input image and the offset type, means for deriving the offset, and corresponding to the category set according to the offset Means for performing a filtering process by adding the offsets to each pixel. It is an image obtained by adding a prediction image generated by intra prediction processing or inter prediction processing and a prediction residual signal, and the means for performing the filter processing has an offset when the target block is a predetermined first offset type. If it is a negative value, filtering is turned off at the pixel of the block boundary of the target block.

 本発明の一態様に係る画像フィルタ装置において、画像を所定単位のブロックに分割し、各画素値にオフセットを加算する画像フィルタ装置であって、入力画像の所定単位のブロック(対象ブロック)に、対象画素と隣接画素との大小関係に応じて対象画素のカテゴリ分類を導出する第1のオフセットタイプ、または、対象画素の画素値の大きさにより、対象画素のカテゴリ分類を分類する第2のオフセットタイプという2つのオフセットタイプのいずれかを割り当てる手段と、前記入力画像と前記オフセットタイプを用いて各画素のカテゴリを設定し、オフセットを導出する手段と、前記オフセットに応じて設定されたカテゴリに対応するオフセットを各画素に加算することによりフィルタ処理を実施する手段とを備え、前記入力画像は、イントラ予測処理あるいはインター予測処理で生成した予測画像と、予測残差信号とを加算した画像であり、前記フィルタ処理を実施する手段は、対象ブロックが所定の第1のオフセットタイプの場合、所定の条件を満たせば、対象ブロックのサブブロック境界の画素ではフィルタ処理をオフにし、サブブロックはデブロッキングフィルタの処理単位である。 In an image filter device according to an aspect of the present invention, an image filter device that divides an image into blocks of a predetermined unit and adds an offset to each pixel value, and blocks (target block) a predetermined unit of an input image The first offset type that derives the category classification of the target pixel according to the magnitude relationship between the target pixel and the adjacent pixel, or the second offset that classifies the category classification of the target pixel according to the size of the pixel value of the target pixel Means for assigning one of two offset types, ie, type, setting the category of each pixel using the input image and the offset type, means for deriving the offset, and corresponding to the category set according to the offset Means for performing a filtering process by adding the offsets to each pixel. It is an image obtained by adding a prediction image generated by intra prediction processing or inter prediction processing and a prediction residual signal, and the means for performing the filter processing is a predetermined one when the target block is a predetermined first offset type. If the condition is satisfied, the filtering process is turned off at the pixel at the subblock boundary of the target block, and the subblock is a processing unit of the deblocking filter.

 本発明の一態様に係る画像フィルタ装置において、前記所定の条件は、カテゴリが1または2の場合にオフセットが正であるか、あるいは、カテゴリが3または4の場合にオフセットが負であることである。 In the image filter device according to one aspect of the present invention, the predetermined condition is that the offset is positive when the category is 1 or 2, or negative when the category is 3 or 4. is there.

  (ソフトウェアによる実現例)
 なお、上述した実施形態における動画像符号化装置11、動画像復号装置31の一部、例えば、エントロピー復号部301、予測パラメータ復号部302、ループフィルタ305、予測画像生成部308、逆量子化・逆変換部311、加算部312、予測画像生成部101、減算部102、変換・量子化部103、エントロピー符号化部104、逆量子化・逆変換部105、ループフィルタ107、符号化パラメータ決定部110、予測パラメータ符号化部111をコンピュータで実現するようにしても良い。その場合、この制御機能を実現するためのプログラムをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行することによって実現しても良い。なお、ここでいう「コンピュータシステム」とは、動画像符号化装置11、動画像復号装置31のいずれかに内蔵されたコンピュータシステムであって、OSや周辺機器等のハードウェアを含むものとする。また、「コンピュータ読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM、CD-ROM等の可搬媒体、コンピュータシステムに内蔵されるハードディスク等の記憶装置のことをいう。さらに「コンピュータ読み取り可能な記録媒体」とは、インターネット等のネットワークや電話回線等の通信回線を介してプログラムを送信する場合の通信線のように、短時間、動的にプログラムを保持するもの、その場合のサーバやクライアントとなるコンピュータシステム内部の揮発性メモリのように、一定時間プログラムを保持しているものも含んでも良い。また上記プログラムは、前述した機能の一部を実現するためのものであっても良く、さらに前述した機能をコンピュータシステムにすでに記録されているプログラムとの組み合わせで実現できるものであっても良い。
(Example of software implementation)
Note that the moving picture coding apparatus 11 and a part of the moving picture decoding apparatus 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 dequantization Inverse transformation unit 311, addition unit 312, predicted image generation unit 101, subtraction unit 102, transformation / quantization unit 103, entropy encoding unit 104, inverse quantization / inverse transformation unit 105, loop filter 107, encoding parameter determination unit 110, 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 moving image encoding device 11 and the moving 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 video encoding device 11 and the video decoding device 31 in the above-described embodiment may be realized as an integrated circuit such as LSI (Large Scale Integration). Each functional block of the moving picture coding device 11 and the moving picture 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 moving image encoding device 11 and the moving 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を、動画像の送信及び受信に利用できることを、図24を参照して説明する。 First, the fact that the above-described moving picture coding apparatus 11 and moving picture decoding apparatus 31 can be used for transmission and reception of moving pictures will be described with reference to FIG.

 図24(a)は、動画像符号化装置11を搭載した送信装置PROD_Aの構成を示したブロック図である。図24(a)に示すように、送信装置PROD_Aは、動画像を符号化することによって符号化ストリームを得る符号化部PROD_A1と、符号化部PROD_A1が得た符号化ストリームで搬送波を変調することによって変調信号を得る変調部PROD_A2と、変調部PROD_A2が得た変調信号を送信する送信部PROD_A3と、を備えている。上述した動画像符号化装置11は、この符号化部PROD_A1として利用される。 FIG. 24A is a block diagram showing the configuration of a transmitter PROD_A on which the moving picture coding apparatus 11 is mounted. As shown in FIG. 24 (a), the transmitter PROD_A modulates a carrier wave with an encoding unit PROD_A1 which obtains an encoded stream by encoding a moving image, and the encoding stream obtained by the encoding unit PROD_A1. The modulation unit PROD_A2 for obtaining the modulation signal by the above-mentioned and the transmission unit PROD_A3 for transmitting the modulation signal obtained by the modulation unit PROD_A2. The above-described moving picture coding apparatus 11 is used as the coding unit PROD_A1.

 送信装置PROD_Aは、符号化部PROD_A1に入力する動画像の供給源として、動画像を撮像するカメラPROD_A4、動画像を記録した記録媒体PROD_A5、動画像を外部から入力するための入力端子PROD_A6、及び、画像を生成または加工する画像処理部PRED_A7を更に備えていてもよい。図24(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 PRED_A7 that generates or processes an image. Although FIG. 24A illustrates the configuration in which the transmission device PROD_A includes all of the above, 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, a decoding unit (not shown) may be interposed between the recording medium PROD_A5 and the encoding unit PROD_A1 for decoding the encoded stream read from the recording medium PROD_A5 according to the encoding scheme for recording.

 図24(b)は、動画像復号装置31を搭載した受信装置PROD_Bの構成を示したブロック図である。図24(b)に示すように、受信装置PROD_Bは、変調信号を受信する受信部PROD_B1と、受信部PROD_B1が受信した変調信号を復調することによって符号化ストリームを得る復調部PROD_B2と、復調部PROD_B2が得た符号化ストリームを復号することによって動画像を得る復号部PROD_B3と、を備えている。上述した動画像復号装置31は、この復号部PROD_B3として利用される。 FIG. 24 (b) is a block diagram showing the configuration of the reception device PROD_B on which the video decoding device 31 is mounted. As shown in FIG. 24 (b), the receiving device PROD_B receives the modulated signal, receives the modulated signal, demodulates the modulated signal received by the receiving unit PROD_B1, obtains the encoded stream, and demodulates the demodulated signal; And a decoding unit PROD_B3 for obtaining a moving image by decoding the encoded stream obtained by PROD_B2. The above-described moving picture decoding apparatus 31 is used as the decoding unit PROD_B3.

 受信装置PROD_Bは、復号部PROD_B3が出力する動画像の供給先として、動画像を表示するディスプレイPROD_B4、動画像を記録するための記録媒体PROD_B5、及び、動画像を外部に出力するための出力端子PROD_B6を更に備えていてもよい。図24(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 FIG. 24 (b) exemplifies the configuration in which the receiving device PROD_B includes all of the above, a part of the configuration 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 stream downloaded from the server and displaying it on the display, the client of the moving image sharing service has a function of encoding the moving image captured by the 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を、動画像の記録及び再生に利用できることを、図25を参照して説明する。 Next, the fact that the above-described moving picture coding apparatus 11 and moving picture decoding apparatus 31 can be used for recording and reproduction of moving pictures will be described with reference to FIG.

 図25(a)は、上述した動画像符号化装置11を搭載した記録装置PROD_Cの構成を示したブロック図である。図25(a)に示すように、記録装置PROD_Cは、動画像を符号化することによって符号化ストリームを得る符号化部PROD_C1と、符号化部PROD_C1が得た符号化ストリームを記録媒体PROD_Mに書き込む書込部PROD_C2と、を備えている。上述した動画像符号化装置11は、この符号化部PROD_C1として利用される。 FIG. 25A is a block diagram showing the configuration of a recording device PROD_C on which the above-described moving picture coding device 11 is mounted. As shown in FIG. 25A, the recording device PROD_C writes the encoded stream obtained by the encoding unit PROD_C1 for obtaining an encoded stream by encoding a moving image and the encoding unit PROD_C1 to the recording medium PROD_M. And a writing unit PROD_C2. The above-described moving picture coding apparatus 11 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 Universal Serial Bus (USB) flash memory, or (3) DVD (Digital Versatile Disc) or BD (Blu-ray (registered trademark) A disc such as a registered trademark) may be loaded into a drive device (not shown) built in the recording device PROD_C.

 また、記録装置PROD_Cは、符号化部PROD_C1に入力する動画像の供給源として、動画像を撮像するカメラPROD_C3、動画像を外部から入力するための入力端子PROD_C4、動画像を受信するための受信部PROD_C5、及び、画像を生成または加工する画像処理部PROD_C6を更に備えていてもよい。図25(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 FIG. 25A exemplifies the configuration in which the recording apparatus PROD_C includes all of the above, a part of the configuration may be omitted.

 なお、受信部PROD_C5は、符号化されていない動画像を受信するものであってもよいし、記録用の符号化方式とは異なる伝送用の符号化方式で符号化された符号化ストリームを受信するものであってもよい。後者の場合、受信部PROD_C5と符号化部PROD_C1との間に、伝送用の符号化方式で符号化された符号化ストリームを復号する伝送用復号部(不図示)を介在させるとよい。 Note that the receiving unit PROD_C5 may receive a non-coded moving image, and receives a coded stream coded by a transmission coding scheme different from the recording coding scheme. It may be In the latter case, it is preferable to interpose a transmission decoding unit (not shown) that decodes the coded stream coded by the transmission coding scheme between the reception unit PROD_C5 and the coding 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.

 図25(b)は、上述した動画像復号装置31を搭載した再生装置PROD_Dの構成を示したブロックである。図25(b)に示すように、再生装置PROD_Dは、記録媒体PROD_Mに書き込まれた符号化ストリームを読み出す読出部PROD_D1と、読出部PROD_D1が読み出した符号化ストリームを復号することによって動画像を得る復号部PROD_D2と、を備えている。上述した動画像復号装置31は、この復号部PROD_D2として利用される。 FIG. 25 (b) is a block showing the configuration of the playback device PROD_D on which the above-described moving picture decoding device 31 is mounted. As shown in FIG. 25B, the playback device PROD_D obtains a moving image by decoding a coded stream read by the reading unit PROD_D1 that reads the coded stream written in the recording medium PROD_M and the reading unit PROD_D1. And a decryption unit PROD_D2. The above-described moving picture decoding apparatus 31 is used as the decoding unit PROD_D2.

 なお、記録媒体PROD_Mは、(1)HDDやSSDなどのように、再生装置PROD_Dに内蔵されるタイプのものであってもよいし、(2)SDメモリカードやUSBフラッシュメモリなどのように、再生装置PROD_Dに接続されるタイプのものであってもよいし、(3)DVDやBDなどのように、再生装置PROD_Dに内蔵されたドライブ装置(不図示)に装填されるものであってもよい。 The recording medium PROD_M may be (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を更に備えていてもよい。図25(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 FIG. 25 (b) exemplifies the configuration in which the playback device PROD_D includes all of these, part of the configuration may be omitted.

 なお、送信部PROD_D5は、符号化されていない動画像を送信するものであってもよいし、記録用の符号化方式とは異なる伝送用の符号化方式で符号化された符号化ストリームを送信するものであってもよい。後者の場合、復号部PROD_D2と送信部PROD_D5との間に、動画像を伝送用の符号化方式で符号化する符号化部(不図示)を介在させるとよい。 The transmitting unit PROD_D5 may transmit an uncoded moving image, or transmit an encoded stream encoded by a transmission coding scheme different from the recording coding scheme. 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 above-described moving picture decoding apparatus 31 and moving picture coding apparatus 11 may be realized as hardware by a logic circuit formed on an integrated circuit (IC chip), or CPU (Central Processing). It may be realized as software using Unit).

 後者の場合、上記各装置は、各機能を実現するプログラムの命令を実行するCPU、上記プログラムを格納したROM(Read Only Memory)、上記プログラムを展開するRAM(RandomAccess 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 read only memory (ROM) that stores the program, a random access memory (RAM) that develops the program, the program, and various data. And a storage device (recording medium) such as a memory for storing the 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). / MD (Mini Disc) / DVD (Digital Versatile Disc) / CD-R (CD Recordable) / Blu-ray Disc (Blu-ray (registered trademark) Disc: registered trademark), etc. Disc including optical disc, IC card (memory) Cards) / cards such as optical cards, mask ROM / EPROM (Erasable Programmable Read-Only Memory) / EEPROM (Electrically Erasable and Programmable Read-Only Memory (registered trademark)) / semiconductor memory such as flash ROM, or PLD Logic circuits such as programmable logic device (FPGA) and field programmable gate array (FPGA) can be used.

 また、上記各装置を通信ネットワークと接続可能に構成し、上記プログラムコードを、通信ネットワークを介して供給してもよい。この通信ネットワークは、プログラムコードを伝送可能であればよく、特に限定されない。例えば、インターネット、イントラネット、エキストラネット、LAN(Local Area Network)、ISDN(Integrated Services DigitalNetwork)、VAN(Value-Added Network)、CATV(Community Antenna television/CableTelevision)通信網、仮想専用網(Virtual Private Network)、電話回線網、移動体通信網、衛星通信網等が利用可能である。また、この通信ネットワークを構成する伝送媒体も、プログラムコードを伝送可能な媒体であればよく、特定の構成または種類のものに限定されない。例えば、IEEE(Institute of Electrical and Electronic Engineers)1394、USB、電力線搬送、ケーブルTV回線、電話線、ADSL(Asymmetric Digital SubscriberLine)回線等の有線でも、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 / CableTelevision) communication network, Virtual Private Network (Virtual Private Network) A telephone network, a mobile communication network, a 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 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 (registered trademark) (Digital Living Network Alliance (registered trademark)), cellular phone network, satellite link, digital terrestrial broadcasting It can also be used by wireless such as networks. 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 embodiment of the present invention is suitably applied to a video decoding apparatus that decodes a coded stream obtained by coding image data, and a video coding apparatus that generates a coded stream obtained by coding image data. be able to. Further, the present invention can be suitably applied to the data structure of a coded stream generated by the moving picture coding apparatus and referred to by the moving picture decoding apparatus.

41 動画像表示装置
31 動画像復号装置
11 動画像符号化装置
41 Moving image display device
31 Moving picture decoding device
11 Video Coder

Claims (9)

 画像を所定単位のブロックに分割し、各画素値にオフセットを加算する画像フィルタ装置において、
 入力画像の所定単位のブロック(対象ブロック)に、対象画素と隣接画素との大小関係に応じて対象画素のカテゴリ分類を導出する第1のオフセットタイプ、または、対象画素の画素値の大きさにより、対象画素のカテゴリ分類を導出する第2のオフセットタイプという2つのオフセットタイプのいずれかを割り当てる手段と、
 前記オフセットタイプに応じて前記対象ブロックに異なるフィルタ対象領域を設定する手段と、
 前記入力画像と前記オフセットタイプを用いて各画素のカテゴリを設定し、オフセットを導出する手段と、
 前記オフセットタイプに応じて設定されたカテゴリに対応するオフセットを各画素に加算することにより、前記対象ブロックのフィルタ対象領域に対してフィルタ処理を実施する手段とを備え、
 前記入力画像は、イントラ予測処理あるいはインター予測処理で生成した予測画像と、予測残差信号とを加算した画像であり、
 前記カテゴリを設定し、オフセットを導出する手段は、
 前記対象ブロックの前記オフセットタイプが前記第1のオフセットタイプの場合、対象画素値と、オフセットクラスで指定された2個の参照画素値を用いてカテゴリを設定し、カテゴリ毎にオフセットを導出し、
 前記対象ブロックの前記オフセットタイプが前記第2のオフセットタイプの場合、対象画素値の属するバンドからカテゴリを設定し、カテゴリ毎にオフセットを導出する画像フィルタ装置。
In an image filter apparatus that divides an image into blocks of predetermined units and adds an offset to each pixel value,
The first offset type that derives the category classification of the target pixel according to the magnitude relationship between the target pixel and the adjacent pixel in a predetermined unit block (target block) of the input image, or the size of the pixel value of the target pixel And means for assigning one of two offset types, a second offset type for deriving the category classification of the target pixel,
Means for setting different filter target areas in the target block according to the offset type;
Means for setting the category of each pixel using the input image and the offset type, and deriving the offset;
Means for performing filtering on the filter target area of the target block by adding to each pixel an offset corresponding to a category set according to the offset type;
The input image is an image obtained by adding a prediction image generated by intra prediction processing or inter prediction processing and a prediction residual signal,
The means for setting the category and deriving the offset is
If the offset type of the target block is the first offset type, a category is set using the target pixel value and two reference pixel values specified in the offset class, and the offset is derived for each category,
An image filter apparatus which sets a category from a band to which a target pixel value belongs and derives an offset for each category when the offset type of the target block is the second offset type.
 前記対象ブロックのフィルタ対象領域を設定する手段は、前記対象ブロックの前記オフセットタイプが前記第2のオフセットタイプである場合に、前記対象ブロックのフィルタ対象領域を、前記対象ブロックの全領域に設定することを特徴とする請求項1に記載の画像フィルタ装置。 The means for setting the filter target area of the target block sets the filter target area of the target block to the entire area of the target block when the offset type of the target block is the second offset type. The image filter device according to claim 1, characterized in that:  前記対象ブロックのフィルタ対象領域を設定する手段は、前記対象ブロックの前記オフセットタイプが前記第1のオフセットタイプである場合に、前記対象ブロックのフィルタ対象領域を、前記対象ブロック境界よりも1画素内側に入った領域に設定することを特徴とする請求項1に記載の画像フィルタ装置。 When the offset type of the target block is the first offset type, the means for setting the filter target region of the target block is such that the filter target region of the target block is one pixel inside of the target block boundary. The image filter device according to claim 1, wherein the image filter device is set in an area in which  前記対象ブロックのフィルタ対象領域を設定する手段は、前記対象ブロックの前記オフセットタイプが前記第1のオフセットタイプである場合に、前記対象ブロックのフィルタ対象領域を、前記対象ブロックの右端1画素分と下端1画素分を除くブロックに設定することを特徴とする請求項1に記載の画像フィルタ装置。 When the offset type of the target block is the first offset type, the means for setting the filter target region of the target block includes the filter target region of the target block and the right end one pixel of the target block. 2. The image filter device according to claim 1, wherein the block is set to a block excluding one pixel at the lower end.  前記対象ブロックのフィルタ対象領域を設定する手段は、前記対象ブロックの前記オフセットタイプが前記第1のオフセットタイプである場合に、前記対象ブロックのフィルタ対象領域を、前記対象ブロックの左端1画素分、右端1画素分と下端1画素分を除くブロックに設定することを特徴とする請求項1に記載の画像フィルタ装置。 When the offset type of the target block is the first offset type, the means for setting the filter target region of the target block is the filter target region of the target block for the left end one pixel of the target block, The image filter device according to claim 1, wherein the block is set to a block excluding one pixel at the right end and one pixel at the lower end.  前記対象ブロックのフィルタ対象領域を設定する手段は、前記対象ブロックの前記オフセットタイプが前記第1のオフセットタイプである場合に、前記対象ブロックのフィルタ対象領域を、前記対象ブロックの下端1画素分を除くブロックに設定することを特徴とする請求項1に記載の画像フィルタ装置。 When the offset type of the target block is the first offset type, the means for setting the filter target region of the target block, the filter target region of the target block, the lower 1 pixel of the target block The image filter apparatus according to claim 1, wherein the image filter is set to a block to be excluded.  画像を所定単位のブロックに分割し、各画素値にオフセットを加算する画像フィルタ装置において、
 入力画像の所定単位のブロック(対象ブロック)に、対象画素と隣接画素との大小関係に応じて対象画素のカテゴリ分類を導出する第1のオフセットタイプ、または、対象画素の画素値の大きさにより、対象画素のカテゴリ分類を導出する第2のオフセットタイプという2つのオフセットタイプのいずれかを割り当てる手段と、
 前記入力画像と前記オフセットタイプを用いて各画素のカテゴリを設定し、オフセットを導出する手段と、
 前記オフセットタイプに応じて設定されたカテゴリに対応するオフセットを各画素に加算することによりフィルタ処理を実施する手段とを備え、
 前記入力画像は、イントラ予測処理あるいはインター予測処理で生成した予測画像と、予測残差信号とを加算した画像であり、
 前記フィルタ処理を実施する手段は、前記対象ブロックが所定第1のオフセットタイプの場合、所定の条件を満たせば、前記対象ブロックのブロック境界の画素ではフィルタ処理をオフにすることを特徴とする画像フィルタ装置。
In an image filter apparatus that divides an image into blocks of predetermined units and adds an offset to each pixel value,
The first offset type that derives the category classification of the target pixel according to the magnitude relationship between the target pixel and the adjacent pixel in a predetermined unit block (target block) of the input image, or the size of the pixel value of the target pixel And means for assigning one of two offset types, a second offset type for deriving the category classification of the target pixel,
Means for setting the category of each pixel using the input image and the offset type, and deriving the offset;
Means for performing filtering by adding an offset corresponding to a category set according to the offset type to each pixel,
The input image is an image obtained by adding a prediction image generated by intra prediction processing or inter prediction processing and a prediction residual signal,
When the target block is a predetermined first offset type, the means for performing the filter processing turns off the filter processing at the pixel of the block boundary of the target block if the predetermined condition is satisfied. Filter device.
 上記請求項1から7に記載の画像フィルタ装置を備える画像復号装置。 An image decoding apparatus comprising the image filter apparatus according to any one of claims 1 to 7.  上記請求項1から7に記載の画像フィルタ装置を備える画像符号化装置。 An image coding apparatus comprising the image filter apparatus according to any one of claims 1 to 7.
PCT/JP2019/000867 2018-01-18 2019-01-15 Moving-image coding device, moving-image decoding device, and moving-image filter device Ceased WO2019142764A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2018006245A JP2021057623A (en) 2018-01-18 2018-01-18 Moving image encoding device, moving image decoding device and moving image filtering device
JP2018-006245 2018-01-18

Publications (1)

Publication Number Publication Date
WO2019142764A1 true WO2019142764A1 (en) 2019-07-25

Family

ID=67301293

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2019/000867 Ceased WO2019142764A1 (en) 2018-01-18 2019-01-15 Moving-image coding device, moving-image decoding device, and moving-image filter device

Country Status (2)

Country Link
JP (1) JP2021057623A (en)
WO (1) WO2019142764A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114863257A (en) * 2022-05-12 2022-08-05 上海商汤智能科技有限公司 Image processing method, device, equipment and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012175195A1 (en) * 2011-06-20 2012-12-27 Panasonic Corporation Simplified pipeline for filtering

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012175195A1 (en) * 2011-06-20 2012-12-27 Panasonic Corporation Simplified pipeline for filtering

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
OKUBO, SAKAE, IMPRESS JAPAN KK, NON-OFFICIAL TRANSLATION (H.265/HEVC TEXTBOOK, FIRST EDITION), 21 October 2013 (2013-10-21), pages 157 - 161 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114863257A (en) * 2022-05-12 2022-08-05 上海商汤智能科技有限公司 Image processing method, device, equipment and storage medium

Also Published As

Publication number Publication date
JP2021057623A (en) 2021-04-08

Similar Documents

Publication Publication Date Title
JP6957715B2 (en) Image filter device, filter method and moving image decoding device
EP3949412B1 (en) Block-based adaptive loop filter (alf) with adaptive parameter set (aps) in video coding
EP3804337B1 (en) Block-based adaptive loop filter (alf) design and signaling
EP3100456B1 (en) Low complexity sample adaptive offset encoding
CN113597762B (en) Fixed filter with nonlinear adaptive loop filter in video decoding
KR20170117062A (en) Coding Tree Unit (CTU) Level Adaptive Loop Filter (ALF)
CN114080802A (en) Minimum allowed quantization parameters for transform skip mode and palette mode in video coding
CN114009049A (en) Context modeling for low frequency non-separable transform signaling for video coding
JPWO2013065702A1 (en) Arithmetic decoding device, image decoding device, arithmetic coding device, image coding device, and arithmetic decoding method
CN115398896B (en) Reference picture list constraints and signaling in video coding
JP7644849B2 (en) Video decoding device, video encoding device, video decoding method, and video encoding method
JP7139144B2 (en) image filter device
US20250039464A1 (en) Image coding device and method based on filtering-related information signaling
CN113892265B (en) Image decoding device
WO2013046990A1 (en) Offset decoding apparatus, offset encoding apparatus, image filter apparatus, and data structure
JPWO2020241858A5 (en)
EP4131968A1 (en) Image decoding method for residual coding, and device therefor
US20230050232A1 (en) In-loop filtering-based image coding apparatus and method
WO2012121352A1 (en) Video decoding device, video coding device, and data structure
JP7684960B2 (en) Video decoding device, video encoding device, video decoding method, and video encoding method
WO2019142764A1 (en) Moving-image coding device, moving-image decoding device, and moving-image filter device
JP7765231B2 (en) Video decoding device and video encoding device
JP7659674B2 (en) Video decoding device, video encoding device, and predicted image generating method
CN119452643A (en) Neural network-based filtering process for multiple color components in video decoding
WO2019139012A1 (en) Image filter device, image decoder, image encoder, and data structure

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

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: JP