WO2018110281A1 - 符号予測装置、画像復号装置および画像符号化装置 - Google Patents
符号予測装置、画像復号装置および画像符号化装置 Download PDFInfo
- Publication number
- WO2018110281A1 WO2018110281A1 PCT/JP2017/042892 JP2017042892W WO2018110281A1 WO 2018110281 A1 WO2018110281 A1 WO 2018110281A1 JP 2017042892 W JP2017042892 W JP 2017042892W WO 2018110281 A1 WO2018110281 A1 WO 2018110281A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- unit
- code
- cost
- prediction
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/60—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
- H04N19/61—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding in combination with predictive coding
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/70—Methods 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/90—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
- H04N19/91—Entropy coding, e.g. variable length coding [VLC] or arithmetic coding
Definitions
- Embodiments described herein relate generally to a code prediction apparatus, an image decoding apparatus, and an image encoding apparatus.
- a moving image encoding device that generates encoded data by encoding the moving image, and a moving image that generates a decoded image by decoding the encoded data
- An image decoding device is used.
- the moving image encoding method include a method proposed in H.264 / AVC and HEVC (High-Efficiency Video Coding).
- an image (picture) constituting a moving image is a slice obtained by dividing the image, a coding unit obtained by dividing the slice (coding unit (Coding Unit : CU)), and a hierarchical structure consisting of a prediction unit (PU) and a transform unit (TU) that are obtained by dividing a coding unit. Decrypted.
- a predicted image is usually generated based on a local decoded image obtained by encoding / decoding an input image, and the predicted image is generated from the input image (original image).
- a prediction residual obtained by subtraction (sometimes referred to as “difference image” or “residual image”) is encoded. Examples of the method for generating a predicted image include inter-screen prediction (inter prediction) and intra-screen prediction (intra prediction).
- Non-Patent Document 1 that reduces the code amount of a prediction residual code can be cited as a technique for encoding and decoding moving images in recent years.
- Non-Patent Document 1 discloses a technique for predicting a positive or negative sign for some of a plurality of transform coefficients calculated by dequantizing a quantization coefficient related to a residual image. The accuracy of such prediction depends on the evaluation method for the prediction candidate.
- An object of one embodiment of the present invention is to improve the accuracy of code prediction for some of a plurality of transform coefficients calculated by inverse quantization of quantization coefficients related to a residual image.
- a code prediction apparatus provides a non-zero above-described non-zero transform coefficient among a plurality of transform coefficients calculated by dequantizing a quantization coefficient related to a residual image of a target block.
- a code prediction apparatus that performs code prediction on transform coefficients, and generates a partial decoded image for a combination of a case where the sign of the transform coefficient to be predicted is positive and a negative case, and the partial decoded image
- a code prediction unit that performs prediction of the code using the upward cost and the left cost calculated based on the relationship with the pixels adjacent in the upward and left directions, and the code prediction unit includes the code
- a weight setting unit is provided for setting a weight to be given to each of the upward cost and the left cost used by the prediction unit.
- the code prediction apparatus it is possible to improve the accuracy of code prediction for a part of a plurality of transform coefficients calculated by inverse quantization of the quantization coefficient related to the residual image. .
- FIG. 1 It is a figure which shows the hierarchical structure of the data of the encoding stream which concerns on this embodiment. It is a figure which shows the pattern of PU division
- FIG. 1 It is the schematic which shows the structure of the inter estimated image generation part of the image coding apparatus which concerns on this embodiment.
- (A) is a block diagram showing a configuration of an inverse quantization / inverse DCT unit in the video decoding apparatus according to the present embodiment, and (b) is an inverse quantization / inverse in the video encoding apparatus according to the present embodiment. It is a block diagram which shows the structure of a DCT part. Further, (c) is a block diagram showing a configuration of a DCT / quantization unit according to a modification of the present embodiment. It is a flowchart which shows the flow of an example of the process in code
- (A) is a figure which shows the example of the coefficient made into a prediction object
- (b)-(d) is a figure explaining a mutually different template.
- (A) is a figure explaining a partial decoded image and its surrounding pixels
- (b) is a figure for explaining a secondary differential hypothesis
- (c) is a primary differential hypothesis and a secondary differential hypothesis. It is a figure for demonstrating the hypothesis between differential hypotheses. It is a flowchart which shows the flow of the process in the code prediction part which concerns on this embodiment. It is a figure which shows an intra prediction direction.
- FIG. 6C is a block diagram illustrating a configuration of a DCT / quantization unit according to the second embodiment.
- (A) And (b) is a block diagram which shows the structure of the dequantization and inverse DCT part which concerns on the modification of Embodiment 2, Comprising: (a) is a structure in an image coding apparatus, (b) is an image. The structure in a decoding apparatus is shown, respectively.
- FIG. 10 is a flowchart showing a flow of processing in a code prediction unit according to the fourth embodiment.
- FIG. 14 is a flowchart showing a flow of processing in a code prediction unit according to a modification of the fourth embodiment. It is the figure shown about the structure of the transmitter which mounts the image coding apparatus which concerns on this embodiment, and the receiver which mounts an image decoding apparatus.
- (A) shows a transmission device equipped with an image encoding device, and (b) shows a reception device equipped with an image decoding device. It is the figure shown about the structure of the recording device carrying the image coding apparatus which concerns on this embodiment, and the reproducing
- (A) shows a recording device equipped with an image encoding device, and (b) shows a playback device equipped with an image decoding device. It is the schematic which shows the structure of the image transmission system which concerns on this embodiment.
- FIG. 23 is a schematic diagram showing a configuration of the image transmission system 1 according to the present embodiment.
- the image transmission system 1 is a system that transmits a code obtained by encoding an encoding target image, decodes the transmitted code, and displays an image.
- the image transmission system 1 includes an image encoding device (moving image encoding device) 11, a network 21, an image decoding device (moving image decoding device) 31, and an image display device 41.
- the image encoding device 11 receives an image T indicating a single layer image or a plurality of layers.
- a layer is a concept used to distinguish a plurality of pictures when there are one or more pictures constituting a certain time. For example, when the same picture is encoded with a plurality of layers having different image quality and resolution, scalable encoding is performed, and when a picture of a different viewpoint is encoded with a plurality of layers, view scalable encoding is performed.
- inter-layer prediction, inter-view prediction When prediction is performed between pictures of a plurality of layers (inter-layer prediction, inter-view prediction), encoding efficiency is greatly improved. Further, even when prediction is not performed (simultaneous casting), encoded data can be collected.
- the network 21 transmits the encoded stream Te generated by the image encoding device 11 to the image decoding device 31.
- the network 21 is the Internet, a wide area network (WAN: Wide Area Network), a small network (LAN: Local Area Network), or a combination thereof.
- the network 21 is not necessarily limited to a bidirectional communication network, and may be a unidirectional communication network that transmits broadcast waves such as terrestrial digital broadcasting and satellite broadcasting.
- the network 21 may be replaced with a storage medium that records an encoded stream Te such as a DVD (Digital Versatile Disc) or a BD (Blue-ray Disc).
- the image decoding device 31 decodes each of the encoded streams Te transmitted by the network 21, and generates one or a plurality of decoded images Td decoded.
- the image display device 41 displays all or part of one or more decoded images Td generated by the image decoding device 31.
- the image display device 41 includes, for example, a display device such as a liquid crystal display or an organic EL (Electro-luminescence) display.
- a display device such as a liquid crystal display or an organic EL (Electro-luminescence) display.
- the image display device 41 displays an enhancement layer image with high image quality.
- the image display device 41 displays a base layer image that does not require higher processing capability and display capability as the enhancement layer.
- X? Y: z is a ternary operator that takes y when x is true (non-zero) and takes z when x is false (0).
- FIG. 1 is a diagram showing a hierarchical structure of data in the encoded stream Te.
- the encoded stream Te illustratively includes a sequence and a plurality of pictures constituting the sequence.
- FIG. 1A shows an encoded video sequence that defines the sequence SEQ.
- FIG. 1B is a diagram illustrating an encoded picture that defines the picture PICT.
- FIG. 1C is a diagram illustrating an encoded slice that defines the slice S.
- FIG. 1D is a diagram showing encoded slice data that defines slice data.
- (E) of FIG. 1 is a figure which shows the encoding tree unit contained in encoding slice data.
- FIG. 1F is a diagram illustrating a coding unit (Coding Unit; CU) included in the coding tree unit.
- CU coding unit
- the encoded video sequence In the encoded video sequence, a set of data referred to by the image decoding device 31 for decoding the sequence SEQ to be processed is defined. As shown in FIG. 1A, the sequence SEQ includes a video parameter set (Video Parameter Set), a sequence parameter set SPS (Sequence Parameter Set), a picture parameter set PPS (Picture Parameter Set), a picture PICT, and an addition. Includes SEI (Supplemental Enhancement Information). Here, the value indicated after # indicates the layer ID.
- FIG. 1 shows an example in which encoded data of # 0 and # 1, that is, layer 0 and layer 1, exists, the type of layer and the number of layers are not dependent on this.
- the video parameter set VPS is a set of encoding parameters common to a plurality of moving images, a plurality of layers included in the moving image, and encoding parameters related to individual layers in a moving image composed of a plurality of layers.
- a set is defined.
- the sequence parameter set SPS defines a set of encoding parameters that the image decoding device 31 refers to in order to decode the target sequence. For example, the width and height of the picture are defined. A plurality of SPSs may exist. In that case, one of a plurality of SPSs is selected from the PPS.
- a set of encoding parameters referred to by the image decoding device 31 in order to decode each picture in the target sequence is defined.
- a quantization width reference value (pic_init_qp_minus26) used for picture decoding and a flag (weighted_pred_flag) indicating application of weighted prediction are included.
- the picture PICT includes slices S0 to S NS-1 (NS is the total number of slices included in the picture PICT).
- the coded slice In the coded slice, a set of data referred to by the image decoding device 31 for decoding the slice S to be processed is defined. As shown in FIG. 1C, the slice S includes a slice header SH and slice data SDATA.
- the slice header SH includes an encoding parameter group that is referred to by the image decoding device 31 in order to determine a decoding method of the target slice.
- Slice type designation information (slice_type) for designating a slice type is an example of an encoding parameter included in the slice header SH.
- I slice using only intra prediction at the time of encoding (2) P slice using unidirectional prediction or intra prediction at the time of encoding, (3) B-slice using unidirectional prediction, bidirectional prediction, or intra prediction at the time of encoding may be used.
- the slice header SH may include a reference (pic_parameter_set_id) to the picture parameter set PPS included in the encoded video sequence.
- the slice data SDATA includes a coding tree unit (CTU: Coding Tree Unit) as shown in FIG.
- a CTU is a block of a fixed size (for example, 64x64) that constitutes a slice, and is sometimes called a maximum coding unit (LCU: Large Coding Unit).
- Encoding tree unit As shown in (e) of FIG. 1, a set of data referred to by the image decoding device 31 in order to decode the encoding tree unit to be processed is defined.
- the coding tree unit is divided by recursive quadtree division.
- a tree-structured node obtained by recursive quadtree partitioning is referred to as a coding node (CN).
- An intermediate node of the quadtree is an encoding node, and the encoding tree unit itself is defined as the highest encoding node.
- the CTU includes a split flag (cu_split_flag), and when cu_split_flag is 1, it is split into four coding nodes CN.
- the coding node CN is not divided and has one coding unit (CU: Coding Unit) as a node.
- CU Coding Unit
- the encoding unit CU is a terminal node of the encoding node and is not further divided.
- the encoding unit CU is a basic unit of the encoding process.
- the size of the coding tree unit CTU is 64 ⁇ 64 pixels
- the size of the coding unit can be any of 64 ⁇ 64 pixels, 32 ⁇ 32 pixels, 16 ⁇ 16 pixels, and 8 ⁇ 8 pixels.
- the encoding unit As shown in (f) of FIG. 1, a set of data referred to by the image decoding device 31 in order to decode an encoding unit to be processed is defined. Specifically, the encoding unit includes a prediction tree, a conversion tree, and a CU header CUH. In the CU header, a prediction mode, a division method (PU division mode), and the like are defined.
- prediction information (a reference picture index, a motion vector, etc.) of each prediction unit (PU) obtained by dividing the coding unit into one or a plurality is defined.
- the prediction unit is one or a plurality of non-overlapping areas constituting the encoding unit.
- the prediction tree includes one or a plurality of prediction units obtained by the above-described division.
- a prediction unit obtained by further dividing the prediction unit is referred to as a “sub-block”.
- the sub block is composed of a plurality of pixels.
- the number of sub-blocks in the prediction unit is one.
- the prediction unit is larger than the size of the sub-block, the prediction unit is divided into sub-blocks. For example, when the prediction unit is 8 ⁇ 8 and the sub-block is 4 ⁇ 4, the prediction unit is divided into four sub-blocks that are divided into two horizontally and two vertically.
- the prediction process may be performed for each prediction unit (sub block).
- Intra prediction is prediction within the same picture
- inter prediction refers to prediction processing performed between different pictures (for example, between display times and between layer images).
- the division method is encoded by the PU division mode (part_mode) of encoded data, 2Nx2N (same size as the encoding unit), 2NxN, 2NxnU, 2NxnD, Nx2N, nLx2N, nRx2N, and NxN etc.
- 2NxN and Nx2N indicate 1: 1 symmetrical division
- 2NxnU, 2NxnD and nLx2N and nRx2N indicate 1: 3 and 3: 1 asymmetric division.
- the PUs included in the CU are expressed as PU0, PU1, PU2, and PU3 in this order.
- FIG. 2 specifically illustrate the shape of the partition (the position of the boundary of the PU partition) in each PU partition mode.
- 2A shows a 2Nx2N partition
- FIGS. 2B, 2C, and 2D show 2NxN, 2NxnU, and 2NxnD partitions (horizontal partitions), respectively.
- E), (f), and (g) show partitions (vertical partitions) in the case of Nx2N, nLx2N, and nRx2N, respectively, and (h) shows an NxN partition.
- the horizontal partition and the vertical partition are collectively referred to as a rectangular partition
- 2Nx2N and NxN are collectively referred to as a square partition.
- the encoding unit is divided into one or a plurality of conversion units, and the position and size of each conversion unit are defined.
- a transform unit is one or more non-overlapping areas that make up a coding unit.
- the conversion tree includes one or a plurality of conversion units obtained by the above division.
- the division in the conversion tree includes a case where an area having the same size as that of the encoding unit is assigned as a conversion unit, and a case where recursive quadtree division is used, similar to the above-described CU division.
- Conversion processing is performed for each conversion unit.
- FIG. 5 is a schematic diagram illustrating a configuration of the image decoding device 31 according to the present embodiment.
- the image decoding device 31 includes an entropy decoding unit 301, a prediction parameter decoding unit (prediction image decoding device) 302, a loop filter 305, a reference picture memory 306, a prediction parameter memory 307, a prediction image generation unit (prediction image generation device) 308, and inversely.
- a quantization / inverse DCT unit 311 and an addition unit 312 are included.
- the prediction parameter decoding unit 302 includes an inter prediction parameter decoding unit 303 and an intra prediction parameter decoding unit 304.
- the predicted image generation unit 308 includes an inter predicted image generation unit 309 and an intra predicted image generation unit 310.
- the entropy decoding unit 301 performs entropy decoding on the coded stream Te input from the outside, and separates and decodes individual codes (syntax elements).
- the separated codes include prediction information for generating a prediction image and residual information for generating a difference image.
- the entropy decoding unit 301 outputs a part of the separated code to the prediction parameter decoding unit 302.
- Some of the separated codes are, for example, a prediction mode predMode, a PU partition mode part_mode, a merge flag merge_flag, a merge index merge_idx, an inter prediction identifier inter_pred_idc, a reference picture index refIdxLX, a prediction vector index mvp_LX_idx, and a difference vector mvdLX.
- Control of which code is decoded is performed based on an instruction from the prediction parameter decoding unit 302.
- the entropy decoding unit 301 outputs the quantization coefficient to the inverse quantization / inverse DCT unit 311.
- the quantization coefficient is a coefficient obtained by performing quantization by performing DCT (Discrete Cosine Transform) on the residual signal in the encoding process.
- the inter prediction parameter decoding unit 303 decodes the inter prediction parameter with reference to the prediction parameter stored in the prediction parameter memory 307 based on the code input from the entropy decoding unit 301.
- the inter prediction parameter decoding unit 303 outputs the decoded inter prediction parameter to the prediction image generation unit 308 and stores it in the prediction parameter memory 307. Details of the inter prediction parameter decoding unit 303 will be described later.
- the loop filter 305 applies a filter such as a deblocking filter, a sample adaptive offset (SAO), and / or an adaptive loop filter (ALF) to the decoded image of the CU generated by the adding unit 312.
- a filter such as a deblocking filter, a sample adaptive offset (SAO), and / or an adaptive loop filter (ALF)
- the reference picture memory 306 stores the decoded image of the CU generated by the loop filter 305 at a predetermined position for each decoding target picture and CU.
- the prediction parameter memory 307 stores the prediction parameter in a predetermined position for each decoding target picture and prediction unit (or sub-block, fixed-size block, pixel). Specifically, the prediction parameter memory 307 includes (i) an inter prediction parameter decoded by the inter prediction parameter decoding unit 303, (ii) an intra prediction parameter decoded by the intra prediction parameter decoding unit 304, and (iii) an entropy decoding unit 301. Stores the prediction mode predMode separated.
- the stored inter prediction parameters include, for example, a prediction list utilization flag predFlagLX (inter prediction identifier inter_pred_idc), a reference picture index refIdxLX, and a motion vector mvLX.
- the prediction image generation unit 308 receives the prediction mode predMode input from the entropy decoding unit 301 and the prediction parameter from the prediction parameter decoding unit 302. Further, the predicted image generation unit 308 reads a reference picture from the reference picture memory 306. The prediction image generation unit 308 generates a prediction image of the PU using the prediction parameter input from the prediction parameter decoding unit 302 and the reference picture read from the reference picture memory 306 in the prediction mode indicated by the prediction mode predMode.
- the inter prediction image generation unit 309 uses the inter prediction parameter input from the inter prediction parameter decoding unit 303 and the reference picture read from the reference picture memory 306. A prediction image of the PU is generated by the prediction.
- the inter prediction image generation unit 309 performs a motion vector on the basis of the decoding target PU from the reference picture indicated by the reference picture index refIdxLX for a reference picture list (L0 list or L1 list) having a prediction list use flag predFlagLX of 1.
- the reference picture block at the position indicated by mvLX is read from the reference picture memory 306.
- the inter prediction image generation unit 309 performs prediction based on the reference picture block read from the reference picture memory 306 to generate a prediction image of the PU.
- the inter prediction image generation unit 309 outputs the generated prediction image of the PU to the addition unit 312.
- the intra predicted image generation unit 310 When the prediction mode predMode indicates the intra prediction mode, the intra predicted image generation unit 310 performs intra prediction using the intra prediction parameter input from the intra prediction parameter decoding unit 304 and the reference picture read from the reference picture memory 306. . Specifically, the intra predicted image generation unit 310 reads, from the reference picture memory 306, neighboring PUs that are pictures to be decoded and are in a predetermined range from the decoding target PUs among the PUs that have already been decoded.
- the predetermined range is, for example, one of the left, upper left, upper, and upper right adjacent PUs when the decoding target PU sequentially moves in the so-called raster scan order, and differs depending on the intra prediction mode.
- the raster scan order is an order in which each row is sequentially moved from the left end to the right end in each picture from the upper end to the lower end.
- the intra predicted image generation unit 310 performs prediction in the prediction mode indicated by the intra prediction mode IntraPredMode for the read adjacent PU, and generates a predicted image of the PU.
- the intra predicted image generation unit 310 outputs the generated predicted image of the PU to the adding unit 312.
- the intra prediction image generation unit 310 performs planar prediction (0), DC prediction (1), direction according to the luminance prediction mode IntraPredModeY.
- a prediction image of the luminance PU is generated by any one of the predictions (2 to 66).
- the intra-predicted image generation unit 310 performs color difference PU according to any of the planar prediction (0), DC prediction (1), direction prediction (2 to 66), and LM mode (67) according to the color difference prediction mode IntraPredModeC.
- a predicted image is generated.
- the inverse quantization / inverse DCT unit 311 (code prediction device) obtains a DCT coefficient by inverse quantization of the quantization coefficient input from the entropy decoding unit 301.
- the inverse quantization / inverse DCT unit 311 performs inverse DCT (Inverse Discrete Cosine Transform) on the obtained DCT coefficient to calculate a residual signal.
- the inverse quantization / inverse DCT unit 311 outputs the calculated residual signal to the addition unit 312.
- a specific configuration of the inverse quantization / inverse DCT unit 311 will be described later.
- the addition unit 312 adds the prediction image of the PU input from the inter prediction image generation unit 309 or the intra prediction image generation unit 310 and the residual signal input from the inverse quantization / inverse DCT unit 311 for each pixel, Generate a decoded PU image.
- the loop filter 305 stores the generated decoded image of the PU in the reference picture memory 306, and outputs a decoded image Td obtained by integrating the generated decoded image of the PU for each picture to the outside.
- FIG. 7A is a block diagram illustrating a configuration of the inverse quantization / inverse DCT unit 311 in the image decoding device 31.
- the inverse quantization / inverse DCT unit 311 includes an inverse quantization unit 3111, a code prediction unit 3112, an error correction unit 3113, and an inverse DCT unit 3114.
- the inverse quantization / inverse DCT unit 311 performs code prediction for a non-zero DCT coefficient among a plurality of DCT coefficients (transform coefficients) calculated by inverse quantization of the quantization coefficient related to the residual image.
- the inverse quantization unit 3111 inversely quantizes the quantization coefficient of the target block input from the entropy decoding unit 301 to obtain a DCT coefficient without code information.
- the code prediction unit 3112 predicts the code of the DCT coefficient using the DCT coefficient without code information.
- the error correction unit 3113 corrects the prediction error of the DCT coefficient code based on the code prediction error input from the entropy decoding unit 301. Specifically, the error correcting unit 3113 corrects the prediction code by using the XOR of the prediction code and the code prediction error, and derives a code.
- (After Correction) Code Prediction Code XOR Code Prediction Error
- the error correction unit 3113 can also derive a code by inverting the prediction code depending on whether the code prediction error is 0 or 1.
- the prediction code inverse DCT unit 3114 performs inverse DCT using the DCT coefficient without code information and the sign of the DCT coefficient after correcting the prediction error, and calculates a residual signal.
- FIG. 8 is a flowchart showing an exemplary flow of processing in code prediction.
- the code prediction unit 3112 first sets the value of the variable min_cost to a predetermined positive number, for example, an upper limit (MAXINT) of an integer (SA1).
- the code predicting unit 3112 generates a partial decoded image (partially decoded image) of the target block for the combination of the case where the sign of the DCT coefficient to be predicted is positive and the case where it is negative (SA2). ).
- the code predicting unit 3112 calculates the upward cost and the leftward cost for the generated partial decoded image based on the relationship with the pixels adjacent in the upward direction and the left direction (SA3).
- the code prediction unit 3112 performs code prediction using the calculated upward cost and left cost. Specifically, the code predicting unit 3112 determines whether the value of the cost cost represented by the sum of the upward cost and the leftward cost is smaller than the min_cost value (SA4). When the cost cost value is smaller than the min_cost value (Y in SA4), the code prediction unit 3112 updates the min_cost value with the cost cost value and also updates the combination of DCT coefficients corresponding to the min_cost (SA5). . On the other hand, when the value of cost cost is equal to or greater than the value of min_cost (N in SA4), the code prediction unit 3112 does not perform the process of step SA5.
- SA4 min_cost value
- the code prediction unit 3112 repeats the processes from steps SA2 to SA5 for all combinations of codes of DCT coefficients to be predicted.
- the code predicting unit 3112 predicts that the combination of DCT coefficient codes corresponding to the min_cost value at the end of the loop is the combination of DCT coefficient codes to be predicted.
- the code predicting unit 3112 calculates the cost using the pixel values of the uppermost pixel and the leftmost pixel of the block. Therefore, the code predicting unit 3112 generates a partial decoded image obtained by decoding the upper and leftmost pixels.
- the code prediction unit 3112 may generate a partial decoded image by performing inverse DCT processing on all combinations of codes of coefficients to be predicted. However, the code prediction unit 3112 can generate a partial decoded image without performing the inverse DCT process on a part of the partial decoded images by calculating using a template.
- FIG. 9 is a figure which shows the example of the coefficient made into prediction object.
- (B) to (d) of FIG. 9 are diagrams for explaining different templates. A calculation method using a template will be described below with reference to (a) to (d) of FIG.
- the code is predicted from the state where the absolute values are known. Since DCT coefficients other than c 2,2 , c 1,2 and c 1,0 are not predicted, code information is included in the DCT coefficients.
- the partially decoded image is represented as Habc.
- a, b and c correspond to the codes c 2,2 , c 1,2 and c 1,0 respectively, and are 0 or 1, respectively.
- a, b, and c are 0, the corresponding DCT coefficient is positive, and when it is 1, the corresponding DCT coefficient is negative.
- the code prediction unit 3112 generates a partially decoded image by the following procedure.
- a partially decoded image H000 is generated by inverse DCT processing.
- the code predicting unit 3112 has a case where only one of the DCT coefficients to be predicted is positive and the other coefficients are 0.
- a partially decoded image is generated by inverse DCT processing.
- the partially decoded images in each of the cases (A) to (C) are sequentially expressed as templates T001, T010, and T100.
- the code predicting unit 3112 can generate a partial decoded image H000 and templates T001, T010, and T100 by inverse DCT processing, and then generate another partial decoded image by subtraction processing. Therefore, the processing amount can be reduced as compared with a case where partial decoded images corresponding to all combinations of codes (eight types) of coefficients to be predicted are generated by inverse DCT processing.
- FIG. 10A is a diagram for explaining a partially decoded image and surrounding pixels.
- Decoding is performed for the pixel at coordinates (0,0) to (3,0) located at the upper end and the pixel at coordinates (0,0) to (0,3) located at the left end.
- the pixels of (-1,0) to (-1,3) and coordinates (-2,0) to (-2,3) have already been decoded and the pixel values are known.
- the second-order differential hypothesis is that if the sign of the DCT coefficient (transformation coefficient) is correct, the change in the gradient of the change in pixel value between adjacent pixels (neighboring pixels) is minimized. It is a hypothesis. If this hypothesis holds, the second derivative of the change in the pixel value (change in the gradient, which is the first derivative) becomes 0, so this hypothesis is called a second derivative hypothesis. In other words, the secondary differential hypothesis assumes image continuity at the boundary of the partially decoded image. Specifically, in the second-order differential hypothesis, the sign prediction unit 3112 calculates costU and costL as Calculated by Here, p x, y is the pixel value of the pixel at coordinates (x, y).
- the cost can be derived by calculating the cost cost_p0 at each pixel p0 in the vicinity of the boundary for the entire partial decoded image in the upward direction and the left direction.
- the cost cost_p0 can be derived from the following equation.
- p0 is the value of the partially decoded image in the vicinity of the boundary (pixel value decoded by the prediction code)
- p1 is a pixel adjacent to p0 in the decoded upward or leftward adjacent block
- p2 is a pixel adjacent to p1.
- the cost cost_p0 of each pixel is the predicted value “p1 *” of the partial decoded image obtained by adding “p1 ⁇ p2”, which is the gradient of the two pixels p1 and p2 near the boundary, to the value p1 of the boundary pixel. This is equivalent to measuring the error between “2 ⁇ p2” and the value p0 of the partially decoded image.
- FIG. 10 is a figure for demonstrating a secondary differential hypothesis.
- the pixel values of three adjacent pixels are set to p2, p1, and p0 in order.
- the cost calculated by the formula is 0.
- the change between p0 and p1 and the change between p1 and p2 are not equal, that is, when the gradient of the change in pixel value changes.
- the cost calculated by the above formula is a value greater than zero. It is considered that the combination of signs of transform coefficients that minimizes the cost matches the original image most in the second derivative hypothesis.
- the code prediction unit 3112 performs calculation by introducing weights (weights) into costU and costL.
- the code predicting unit 3112 includes a weight changing unit 3112a (weight setting unit) that changes each of the weight cu to be given to the upward cost and the weight cl to be given to the left cost.
- FIG. 11 is a flowchart showing the flow of processing in the code prediction unit 3112.
- the process in the code prediction unit 3112 is different from the process in the code prediction shown in FIG. 8 in that step SA10 is executed before step SA1.
- the weight changing unit 3112a determines the weights cu and cl of the upward cost and the leftward cost.
- the processing in the code predicting unit 3112 is also different in that the above equation (1) is used for the cost calculation in step SA3.
- the weight changing unit 3112a may change cu and cl based on the shape of the target block.
- cl ⁇ cu or cl> cu is set under another condition when the target block is rectangular as described above.
- the weight changing unit 3112a may change cu and cl based on the activity of the target block.
- the activity is a change in pixel value between the upper and leftmost pixels of the target block and the pixels adjacent to the target block.
- activities include: • Sum of squares of differences in target block: ⁇ (pixel value of target block pixel-average value of target block pixel value) ⁇ 2 -Target block absolute value difference sum: ⁇ abs (pixel value of target block pixel-average value of target block pixel value) -Sum of absolute difference from adjacent pixels: ⁇ abs ((pixel value in target block)-(pixel value of pixel in adjacent block)) Absolute value Laplacian sum with adjacent pixels: ⁇ abs ((pixel value of x ⁇ 1)-(pixel value at x-1)-(pixel value at x + 1)) Etc.
- ⁇ means left shift ( ⁇ 1 is equivalent to ⁇ 2).
- X is a pixel located at the boundary in the target block.
- the weight changing unit 3112a calculates activities on the upper side and the left side of the block, and reduces the weight for the cost on the higher activity side.
- the weight changing unit 3112a may change cu and cl based on the direction of intra prediction in the target block. In this case, the weight changing unit 3112a may acquire the value of the intra prediction mode from the intra prediction parameter decoding unit 304.
- FIG. 12 is a diagram showing the direction of intra prediction corresponding to the value of the intra prediction mode. As shown in FIG. 12, there are 65 intra prediction directions corresponding to values of 2 to 66 in the intra prediction mode.
- the weight changing unit 3112a may set the weight based on conditions other than the above example. Even in this case, it is preferable that the weight of the upper side and the left side that is considered to have a higher correlation with the adjacent pixel be larger than the weight that is considered to have a lower correlation with the adjacent pixel.
- the weight changing unit 3112a determines whether or not the value of the intra prediction mode is around the vertical intra prediction mode predModeV and the horizontal intra prediction mode predModeH as follows (is close to thRange).
- the weight value may be determined by.
- the intra prediction mode number and the range thRange are not limited to the above (50, 18, 34, 5).
- FIG. 4 is a block diagram illustrating a configuration of the image encoding device 11 according to the present embodiment.
- the image encoding device 11 includes a prediction image generation unit 101, a subtraction unit 102, a DCT / quantization unit 103, an entropy encoding unit 104, an inverse quantization / inverse DCT unit 105, an addition unit 106, a loop filter 107, and a prediction parameter memory.
- the prediction parameter encoding unit 111 includes an inter prediction parameter encoding unit 112 and an intra prediction parameter encoding unit 113.
- the predicted image generation unit 101 generates, for each picture of the image T, a predicted image P of the prediction unit PU for each encoding unit CU that is an area obtained by dividing the picture.
- the predicted image generation unit 101 reads a decoded block from the reference picture memory 109 based on the prediction parameter input from the prediction parameter encoding unit 111.
- the prediction parameter input from the prediction parameter encoding unit 111 is, for example, a motion vector in the case of inter prediction.
- the predicted image generation unit 101 reads a block at a position on the reference image indicated by the motion vector with the target PU as a starting point.
- the prediction parameter is, for example, an intra prediction mode.
- a pixel value of an adjacent PU used in the intra prediction mode is read from the reference picture memory 109, and a predicted image P of the PU is generated.
- the predicted image generation unit 101 generates a predicted image P of the PU using one prediction method among a plurality of prediction methods for the read reference picture block.
- the predicted image generation unit 101 outputs the generated predicted image P of the PU to the subtraction unit 102.
- FIG. 6 is a schematic diagram illustrating a configuration of an inter predicted image generation unit 1011 included in the predicted image generation unit 101.
- the inter prediction image generation unit 1011 includes a motion compensation unit 10111 and a weight prediction unit 10112. Since the motion compensation unit 10111 and the weight prediction unit 10112 have the same configurations as the motion compensation unit 3091 and the weight prediction unit 3094 described above, description thereof is omitted here.
- the prediction image generation unit 101 generates a prediction image P of the PU based on the pixel value of the reference block read from the reference picture memory, using the parameter input from the prediction parameter encoding unit.
- the predicted image generated by the predicted image generation unit 101 is output to the subtraction unit 102 and the addition unit 106.
- the subtraction unit 102 subtracts the signal value of the predicted image P of the PU input from the predicted image generation unit 101 from the pixel value of the corresponding PU of the image T, and generates a residual signal.
- the subtraction unit 102 outputs the generated residual signal to the DCT / quantization unit 103.
- the DCT / quantization unit 103 performs DCT on the residual signal input from the subtraction unit 102 and calculates a DCT coefficient.
- the DCT / quantization unit 103 quantizes the calculated DCT coefficient to obtain a quantization coefficient.
- the DCT / quantization unit 103 outputs the obtained quantization coefficient to the entropy coding unit 104 and the inverse quantization / inverse DCT unit 105.
- the entropy encoding unit 104 receives the quantization coefficient from the DCT / quantization unit 103 and receives the encoding parameter from the prediction parameter encoding unit 111.
- Examples of input encoding parameters include codes such as a reference picture index refIdxLX, a prediction vector index mvp_LX_idx, a difference vector mvdLX, a prediction mode predMode, and a merge index merge_idx.
- the entropy encoding unit 104 generates an encoded stream Te by entropy encoding the input quantization coefficient and encoding parameter, and outputs the generated encoded stream Te to the outside.
- the inverse quantization / inverse DCT unit 105 (code prediction device) obtains a DCT coefficient by inverse quantization of the quantization coefficient input from the DCT / quantization unit 103.
- the inverse quantization / inverse DCT unit 105 performs inverse DCT on the obtained DCT coefficient to calculate a residual signal.
- the inverse quantization / inverse DCT unit 105 outputs the calculated residual signal to the addition unit 106.
- a specific configuration of the inverse quantization / inverse DCT unit 105 will be described later.
- the addition unit 106 adds the signal value of the prediction image P of the PU input from the prediction image generation unit 101 and the signal value of the residual signal input from the inverse quantization / inverse DCT unit 105 for each pixel, and performs decoding. Generate an image.
- the adding unit 106 outputs the generated decoded image to the loop filter 107.
- the loop filter 107 performs a deblocking filter, a sample adaptive offset (SAO), and an adaptive loop filter (ALF) on the decoded image generated by the adding unit 106.
- SAO sample adaptive offset
- ALF adaptive loop filter
- the prediction parameter memory 108 stores the prediction parameter generated by the encoding parameter determination unit 110 at a predetermined position for each encoding target picture and CU.
- the reference picture memory 109 stores the decoded image generated by the loop filter 107 at a predetermined position for each picture to be encoded and each CU.
- the encoding parameter determination unit 110 selects one set from among a plurality of sets of encoding parameters.
- the encoding parameter is a parameter to be encoded that is generated in association with the above-described prediction parameter or the prediction parameter.
- the predicted image generation unit 101 generates a predicted image P of the PU using each of these encoding parameter sets.
- the encoding parameter determination unit 110 calculates a cost value indicating the amount of information and the encoding error for each of a plurality of sets.
- the cost value is, for example, the sum of a code amount and a square error multiplied by a coefficient ⁇ .
- the code amount is the information amount of the encoded stream Te obtained by entropy encoding the quantization error and the encoding parameter.
- the square error is the sum between pixels regarding the square value of the residual value of the residual signal calculated by the subtracting unit 102.
- the coefficient ⁇ is a real number larger than a preset zero.
- the encoding parameter determination unit 110 selects a set of encoding parameters that minimizes the calculated cost value.
- the entropy encoding unit 104 outputs the selected set of encoding parameters to the outside as the encoded stream Te, and does not output the set of unselected encoding parameters.
- the encoding parameter determination unit 110 stores the determined encoding parameter in the prediction parameter memory 108.
- the prediction parameter encoding unit 111 derives a format for encoding from the parameters input from the encoding parameter determination unit 110 and outputs the format to the entropy encoding unit 104. Deriving the format for encoding is, for example, deriving a difference vector from a motion vector and a prediction vector. Also, the prediction parameter encoding unit 111 derives parameters necessary for generating a prediction image from the parameters input from the encoding parameter determination unit 110 and outputs the parameters to the prediction image generation unit 101.
- the parameter necessary for generating the predicted image is, for example, a motion vector in units of sub-blocks.
- the inter prediction parameter encoding unit 112 derives an inter prediction parameter such as a difference vector based on the prediction parameter input from the encoding parameter determination unit 110.
- the inter prediction parameter encoding unit 112 derives parameters necessary for generating a prediction image to be output to the prediction image generating unit 101, and an inter prediction parameter decoding unit 303 (see FIG. 5 and the like) derives inter prediction parameters. Some of the configurations are the same as those to be performed. The configuration of the inter prediction parameter encoding unit 112 will be described later.
- the intra prediction parameter encoding unit 113 derives a format (for example, MPM_idx, rem_intra_luma_pred_mode) for encoding from the intra prediction mode IntraPredMode input from the encoding parameter determination unit 110.
- a format for example, MPM_idx, rem_intra_luma_pred_mode
- FIG. 7B is a block diagram illustrating a configuration of the inverse quantization / inverse DCT unit 105 in the image encoding device 11.
- the inverse quantization / inverse DCT unit 105 includes an inverse quantization unit 1051, a code prediction unit 1052, an error calculation unit 1053, and an inverse DCT unit 1054.
- the code prediction unit 1052 includes a weight change unit 1052a.
- the inverse quantization unit 1051 performs inverse quantization on the quantization coefficient input from the DCT / quantization unit 103 to obtain a DCT coefficient. Similar to the code prediction unit 3112, the code prediction unit 1052 predicts the code of the DCT coefficient using the DCT coefficient.
- the error calculation unit 1053 compares the code of the DCT coefficient predicted by the code prediction unit 1052 with the code of the original DCT coefficient, and calculates a code prediction error. Specifically, the error calculation unit 1053, for example: The code of the predicted DCT coefficient matches the code of the original DCT coefficient: 0 -The sign of the predicted DCT coefficient does not match the sign of the original DCT coefficient: 1 A code prediction error is calculated.
- the error calculation unit 1053 can also calculate the code prediction error due to the above processing by using the XOR of the prediction code and the original code.
- Code prediction error prediction code XOR
- the code inverse DCT unit 1054 performs inverse DCT on the DCT coefficient to calculate a prediction error.
- the prediction error is output to the adding unit 106 as described above.
- the code prediction error is output to the entropy encoding unit 104.
- the inverse quantization unit 1051, the code prediction unit 1052, the weight change unit 1052a, and the inverse DCT unit 1054 are the same as the inverse quantization unit 3111, the code prediction unit 3112, the weight change unit 3112a, and the inverse DCT unit 3114, respectively. Therefore, the description is omitted here.
- a part of the image encoding device 11 and / or the image decoding device 31 in the above-described embodiment for example, the entropy decoding unit 301, the prediction parameter decoding unit 302, the loop filter 305, the predicted image generation unit 308, and the inverse quantization Inverse DCT unit 311, addition unit 312, prediction image generation unit 101, subtraction unit 102, DCT / quantization unit 103, entropy encoding unit 104, inverse quantization / inverse DCT unit 105, loop filter 107, encoding parameter determination Unit 110 and prediction parameter encoding unit 111 may be realized by a computer.
- the program for realizing the control function may be recorded on a computer-readable recording medium, and the program recorded on the recording medium may be read by a computer system and executed.
- the “computer system” is a computer system built in either the image encoding device 11 or the image decoding device 31 and includes hardware such as an OS and peripheral devices.
- the “computer-readable recording medium” refers to a storage device such as a portable medium such as a flexible disk, a magneto-optical disk, a ROM, a CD-ROM, or a hard disk built in a computer system.
- the “computer-readable recording medium” is a medium that dynamically holds a program for a short time, such as a communication line when transmitting a program via a network such as the Internet or a communication line such as a telephone line,
- a volatile memory inside a computer system serving as a server or a client may be included and a program that holds a program for a certain period of time.
- the program may be a program for realizing a part of the functions described above, and may be a program capable of realizing the functions described above in combination with a program already recorded in a computer system.
- the code prediction units 3112 and 1052 respectively change the weight assigned to the upward cost and the leftward cost by the weight changing unit 3112a. Or 1052a.
- the weight changing units 3112a and 1052a Based on conditions such as the shape of the target block, variation in pixel values between boundary pixels between the target block and the upper and left adjacent blocks of the target block, the direction of intra prediction in the target block, etc. Set. Therefore, the code prediction units 3112 and 1052 can predict the code of the DCT coefficient with high accuracy.
- the code predicting unit and the weight changing unit are provided in the inverse quantization / inverse DCT unit 311 of the image decoding device 31 or the inverse quantization / inverse DCT unit 105 of the image encoding device 11.
- the code predicting unit and the weight changing unit may be provided in the DCT / quantization unit 103 (code predicting device) of the image encoding device 11.
- FIG. 7 is a block diagram showing a configuration of the DCT / quantization unit 103 according to a modification of the present embodiment.
- the DCT / quantization unit 103 of this modification includes a DCT unit 1031, a quantization unit 1032, an inverse quantization unit 1033, a code prediction unit 1034, and an error correction unit 1035.
- the code prediction unit 1034 includes a weight changing unit 1034a (weight setting unit).
- the DCT unit 1031 performs DCT on the residual signal input from the subtracting unit 102 and calculates a DCT coefficient.
- the quantization unit 1032 quantizes the DCT coefficient calculated by the DCT unit 1031 to obtain a quantization coefficient.
- the inverse quantization unit 1033 calculates the DCT coefficient by inverse quantization of the quantization coefficient obtained by the quantization unit 1032. Similar to the code prediction units 1052 and 3112, the code prediction unit 1034 predicts the code of the DCT coefficient using the DCT coefficient.
- the error correction unit 1035 compares the prediction code predicted by the code prediction unit 1034 with the code of the original DCT coefficient, and calculates a code prediction error.
- the weight changing unit 1034a changes each of the weight cu given to the upward cost and the weight cl given to the left cost calculated by the code prediction unit 1034.
- the code predicting unit 1034 predicts the code of the DCT coefficient with high accuracy. be able to.
- each of the DCT unit and the inverse DCT unit (symbol omitted) in this embodiment uses a conversion method other than DCT (for example, DST (Discrete Sine Transform), KLT (Karhuen Loeve Transform), or non-separation conversion).
- DST Discrete Sine Transform
- KLT Karhuen Loeve Transform
- non-separation conversion for example, DST (Discrete Sine Transform), KLT (Karhuen Loeve Transform), or non-separation conversion.
- a conversion unit or an inverse conversion unit that performs conversion or inverse conversion may be used, or a conversion unit or an inverse conversion unit that performs conversion by performing a plurality of conversions (for example, two conversions of core conversion and secondary conversion). There may be.
- the code predicting unit 3112 calculates a cost based on the secondary differential hypothesis.
- the second-order differential hypothesis may not be established, and therefore, the cost calculation result may be inappropriate. Therefore, the code predicting unit 3112A of the present embodiment calculates a cost using a first-order differential hypothesis described later in addition to the second-order differential hypothesis.
- FIG. 13 is a block diagram illustrating a configuration of an inverse quantization / inverse DCT unit 311A (code prediction device) included in the image decoding device of the present embodiment.
- the inverse quantization / inverse DCT unit 311 ⁇ / b> A includes a code prediction unit 3112 ⁇ / b> A instead of the code prediction unit 3112.
- the code prediction unit 3112A includes a hypothesis determination unit 3112b in addition to the configuration of the code prediction unit 3112.
- the hypothesis determination unit 3112b determines whether to calculate each of the upward cost and the left cost of the partial decoded image based on the primary differential hypothesis or the secondary differential hypothesis.
- the code prediction unit 3112A calculates a cost based on the hypothesis determined by the hypothesis determination unit 3112b.
- FIG. 13B is a block diagram illustrating a configuration of an inverse quantization / inverse DCT unit 105A (code prediction apparatus) included in the image encoding apparatus according to the present embodiment.
- the inverse quantization / inverse DCT unit 105 ⁇ / b> A includes a code prediction unit 1052 ⁇ / b> A instead of the code prediction unit 1052.
- the code prediction unit 1052A includes a hypothesis determination unit 1052b in addition to the configuration of the code prediction unit 1052.
- FIG. 13C is a block diagram showing the configuration of the DCT / quantization unit 103A (code prediction apparatus) according to this embodiment.
- the DCT / quantization unit 103 ⁇ / b> A includes a code prediction unit 1034 ⁇ / b> A instead of the code prediction unit 1034.
- the code prediction unit 1034A includes a hypothesis determination unit 1034b in addition to the configuration of the code prediction unit 1034.
- the configurations of the code prediction unit 1052A and the hypothesis determination unit 1052b, and the code prediction unit 1034A and the hypothesis determination unit 1034b are the same as those of the code prediction unit 3112A and the hypothesis determination unit 3112b, respectively. Therefore, only the code prediction unit 3112A and the hypothesis determination unit 3112b will be described below.
- FIG. 15 is a flowchart showing a flow of processing in the code predicting unit 3112A according to the present embodiment.
- the processing in the code prediction unit 3112A is different from the code prediction shown in FIG. 8 in that a step (SA20) for determining a hypothesis is executed before step SA1.
- the cost calculation in step SA3 is different in that it is executed based on the hypothesis determined in step SA20 as will be described later.
- the primary differential hypothesis is a hypothesis that if the sign of the DCT coefficient (transform coefficient) is correct, the pixel values of adjacent pixels (neighboring pixels) do not change. That is, it is a hypothesis that the gradient that is the first derivative is zero.
- costU and costL are respectively It is represented by In the first-order differential hypothesis, if the pixel values of adjacent pixels are equal, the cost becomes zero, and the cost increases as the difference in pixel value between adjacent pixels increases.
- the hypothesis determination unit 3112b determines whether to calculate each of the upward cost and the left cost of the partial decoded image based on the primary differential hypothesis or the secondary differential hypothesis, for example, according to the activity of the target block. You can do it.
- the activity is as described in the first embodiment. When the activity is high, the number of non-zero DCT coefficients is large, or the variance of pixel values is large, so that the second-order differential hypothesis does not hold. Therefore, when the activity is high, the hypothesis determination unit 3112b determines the hypothesis used for the cost calculation as the first derivative hypothesis.
- FIG. 16 is a flowchart showing an example of a step (SA20) for determining a hypothesis in the flowchart shown in FIG.
- the hypothesis determination unit 3112b first determines whether or not the activity ActU above the target block is greater than a predetermined threshold Th (SB1). When ActU> Th (Y in SB1), the hypothesis determination unit 3112b determines the first differential hypothesis to be used in the upward cost calculation, and the code prediction unit 3112 derives costU based on the first differential hypothesis. (SB2).
- the hypothesis determination unit 3112b determines the hypothesis used for the cost calculation in the upward direction as the second derivative hypothesis, and the code predictor 3112 calculates the costU based on the second derivative hypothesis. Derived (SB3).
- the hypothesis determination unit 3112b determines whether or not the activity ActL on the left side of the target block is greater than a predetermined threshold Th (SB4).
- Th a predetermined threshold
- the hypothesis determination unit 3112b determines the hypothesis used for calculating the cost in the left direction as the primary differential hypothesis, and the code prediction unit 3112 derives costL based on the primary differential hypothesis.
- SB5 if ActL> Th is not satisfied (N in SB4), the hypothesis determination unit 3112b determines the hypothesis used for calculating the cost in the left direction as a second derivative hypothesis, and the code predictor 3112 calculates costL based on the second derivative hypothesis. Derived (SB6).
- the code predicting unit 3112 uses the already calculated costU and costL, as in the first embodiment.
- cost costU + costL
- the cost of the partially decoded image is calculated using the equation (SB7). At this time, each of costU and costL may be weighted as in the first embodiment.
- the hypothesis determination unit 3112b determines whether to calculate based on the primary differential hypothesis or the secondary differential hypothesis for each of the upward cost and the left cost of the partial decoded image according to the size of the target block. You may decide. When the size of the target block is small, it is considered that the texture of the image is fine, so the pixel value is unlikely to change between adjacent pixels. Therefore, when the size of the target block is small, the hypothesis determination unit 3112b determines the hypothesis used for calculating the cost as the primary differential hypothesis.
- the code predicting unit 3112A of the present embodiment determines whether to calculate the cost using the first-order differential hypothesis or the second-order differential hypothesis based on the condition of the target block. The accuracy of prediction can be improved.
- FIG. 14A and 14B are block diagrams illustrating a configuration of an inverse quantization / inverse DCT unit according to a modification of the present embodiment.
- FIG. 14A is a diagram illustrating the inverse quantization / decoding in the image encoding device.
- the configuration of the inverse DCT unit 311B and (b) show the configuration of the inverse quantization / inverse DCT unit 105B in the image decoding apparatus, respectively.
- FIG. 14C is a block diagram illustrating a configuration of a DCT / quantization unit 103B according to a modification of the present embodiment.
- the inverse quantization / inverse DCT unit 311B is different from the inverse quantization / inverse DCT unit 311A in that a code prediction unit 3112B is provided instead of the code prediction unit 3112A.
- the code predicting unit 3112B is different from the code predicting unit 3112A in that it does not include the weight changing unit 3112a.
- each of the inverse quantization / inverse DCT unit 105B and the DCT / quantization unit 103B has an inverse quantum in that the code prediction unit does not include a weight change unit. This is different from the quantization / inverse DCT unit 105A and the DCT / quantization unit 103A. Only the code prediction unit 3112B will be described below.
- the code predicting unit 3112A includes the weight changing unit 3112a similarly to the code predicting unit 3112 of the first embodiment, and the upward cost and the left direction calculated based on the primary differential hypothesis or the secondary differential hypothesis. The costs were further weighted in the same manner as in the first embodiment.
- the code predicting unit 3112B according to the modification of the present embodiment may include only the hypothesis determining unit 3112b without including the weight changing unit 3112a, as illustrated in FIG. In this case, after the upward cost and the leftward cost are calculated based on the hypothesis determined by the hypothesis determination unit 3112b, the sum of the upward cost and the leftward cost becomes the cost of the partially decoded image. .
- the hypothesis determination unit 3112b selects either the primary differential hypothesis or the secondary differential hypothesis. However, in addition to the primary differential hypothesis and the secondary differential hypothesis, the hypothesis determination unit 3112b of the present embodiment may use another hypothesis as an option.
- (C) of FIG. 10 is a figure for demonstrating the hypothesis between a primary differential hypothesis and a secondary differential hypothesis.
- the above hypothesis is referred to as an intermediate hypothesis.
- the intermediate hypothesis is explained below.
- the pixel value of the pixel at the upper end or the left end of the target block is set as p0, and the adjacent pixel of p0 in the upper block or the left adjacent block of the target block is set as p1 and p2.
- the difference (gradient) between the pixel values of p0 and p1 is close to half of the difference (gradient) between the pixel values of p1 and p2.
- the code prediction unit 3112B calculates costU and costL by the following equations, respectively. Calculated by
- the cost can be derived by calculating the cost cost_p0 at each pixel p0 in the vicinity of the boundary for the entire partial decoded image in the upward direction and the left direction.
- the cost cost_p0 can be derived from the following equation.
- p0 is a value of a partially decoded image in the vicinity of the boundary (a pixel value decoded by a prediction code)
- p1 is a pixel adjacent to p0 in the decoded upper or left adjacent block
- p2 is a pixel adjacent to p1.
- the cost cost_p0 of each pixel is added to the value p1 of the boundary pixel by adding (i) a value obtained by multiplying “p12 ⁇ ⁇ p2”, which is the gradient of the two pixels p1 and p2 near the boundary, by the weight wk.
- the weight wk may be 0.25 instead of 0.5. In this case, the shift amount is >> 2.
- cost_p0
- cost_p0
- the following equivalent expression can be used.
- the hypothesis determination unit 3112b of the present embodiment selects, for example, any one of the three types of hypotheses of the primary differential hypothesis, the secondary differential hypothesis, and the intermediate hypothesis as a hypothesis for calculating the cost of the target block Good.
- the hypothesis determination unit 3112b calculates the cost of the target block using either one of two types of hypotheses: (i) a primary differential hypothesis or a secondary differential hypothesis and (ii) an intermediate hypothesis. May be selected as a hypothesis.
- the hypothesis determination unit 3112b determines the hypothesis used for calculating the cost as either the primary differential hypothesis or the secondary differential hypothesis.
- the code predicting unit 3112A calculates the cost based on one of the hypotheses determined by the hypothesis determining unit 3112b.
- the code prediction unit 3112A of the present embodiment may not include the hypothesis determination unit 3112b, and may calculate the cost based on both the primary differential hypothesis and the secondary differential hypothesis.
- the upward cost costU and the leftward cost costL are respectively calculated based on the first derivative hypothesis (first cost) and calculated based on the second derivative hypothesis (second cost). And may be expressed as a linear sum. Further, in this case, the code predicting unit 3112A may calculate the cost by weighting each of the cost calculated based on the primary differential hypothesis and the cost calculated based on the secondary differential hypothesis.
- a code prediction unit that predicts a predetermined number of DCT coefficients of low frequency components that are relatively easy to predict according to the number of sub-blocks will be described.
- FIG. 17 is a flowchart showing the flow of processing in the code prediction unit of the present embodiment.
- the process in the code prediction unit of the present embodiment is different from the code prediction shown in FIG. 8 in that a step (SA30) of determining a prediction target is executed before step SA1.
- (Determination of forecast target) (A) of FIG. 18 is a figure which shows the object range of prediction in case conversion size is 4x4. (B) of FIG. 18 is a figure which shows the object range of prediction in case conversion size is 8x8. (C) of FIG. 18 is a figure which shows the object range of prediction in case conversion size is 16x16.
- each square indicates a 4 ⁇ 4 sub-block, and a colored sub-block indicates a sub-block to be predicted. The determination of the prediction target in step SA30 will be described with reference to (a) to (c) of FIG.
- the sub-block whose sub-block address is (0, 0) is the target of prediction.
- the sub block addresses are (0,0), (1,0), and (0,1).
- the block is the target of prediction.
- the sub-block whose sub-block address is (1,1) does not satisfy the above formula, and thus is not subject to prediction.
- the sub-block addresses are (0,0), (1,0), (0,1), (2, The sub-blocks 0, (1, 1), and (0, 2) are subject to prediction, and the other sub-blocks are not subject to prediction.
- the DCT coefficient in the low-frequency component sub-block contributes to continuity with adjacent pixels more than the DCT coefficient in the high-frequency component sub-block. For this reason, the DCT coefficient of the low frequency component is easier to predict than the DCT coefficient of the high frequency component.
- the code prediction unit of the present embodiment by limiting the DCT coefficients to be predicted to those in low-frequency component sub-blocks that are easy to predict, the increase in processing time is suppressed and the code amount is reduced. can do.
- the code prediction unit may perform code prediction for sub-blocks that satisfy an expression different from the above expression.
- the code prediction unit xc + yc ⁇ 1 Or xc + yc ⁇ 2 Code prediction may be performed for a sub-block in a range that satisfies the above equation.
- the code prediction unit that limits the DCT coefficients to be predicted to those in the low-frequency component sub-block that is easy to predict has been described.
- code prediction that suppresses an increase in processing time and reduces the code amount The part will be described.
- a sub-block having a large transformation size is flat or has a small change in pixel, and therefore has high continuity with adjacent pixels. For this reason, code prediction using continuity with adjacent blocks is easier for sub-blocks with a large transform size than for sub-blocks with a small transform size.
- code prediction unit according to the modification of the present embodiment by limiting the DCT coefficients to be subjected to code prediction to sub-blocks having a large transform size, an increase in processing time can be suppressed and the code amount can be reduced. it can.
- the DCT coefficient to be predicted is limited to the DCT coefficient of the sub-block whose intra prediction mode is the planar prediction mode or the DC prediction mode, thereby increasing the processing time.
- a code prediction unit that suppresses and reduces the code amount will be described.
- the sub-block is set as a prediction target, and otherwise, the sub-block is not set as a prediction target.
- the sub-block is set as a prediction target, and otherwise, the sub-block is not set as a prediction target.
- a sub-block in which the planar prediction mode or the DC prediction mode is selected is flat or has a small change in pixel, and has high continuity with adjacent pixels. Therefore, code prediction using continuity with adjacent blocks is easier than sub-blocks that have selected other intra prediction modes.
- the target of prediction is limited to the DCT coefficients of sub-blocks in which the intra prediction mode is the planar prediction mode or the DC prediction mode, thereby suppressing an increase in processing time and encoding. The amount can be reduced.
- the range of values that can be taken by the pixel values of each pixel included in the image is determined in advance, for example, from 0 to 255.
- the pixel value may be out of range in some pixels due to the influence, but the number of such pixels is small.
- the code prediction for the transform coefficient is incorrect, the pixel values of many pixels may take values outside the range. Conversely, if the pixel values of a large number of pixels in the partially decoded image take values outside the range, the combination of transform coefficient codes used to generate the partially decoded image may be incorrect. Is expensive.
- the code prediction unit of the present embodiment determines whether or not the pixel value of each pixel included in the partial decoded image is a value within a predetermined range after generating the partial decoded image.
- the code prediction unit calculates the upward cost and the leftward cost for the partial decoded image when the number of pixels determined to be not within the predetermined range is equal to or less than the predetermined number. Do.
- FIG. 19 is a flowchart showing processing executed by the code prediction unit of the present embodiment.
- the code prediction unit sets the number of out-of-range pixels num_over to 0 (SC1).
- the code prediction unit determines the pixel value of a certain pixel included in the partially decoded image. (A) Greater than maxVal (B) It is determined whether any of the values smaller than minVal is satisfied (SC2).
- the determination in step SC2 is a determination as to whether the pixel value is within the range.
- maxVal and minVal may be encoded by a parameter set or the like, or may be set according to the bit depth value.
- step SC2 when the pixel value satisfies one of the above (A) and (B) (Y in SC2), the code prediction unit increments num_over (SC3). On the other hand, when the pixel value does not satisfy both (A) and (B) (N in SC2), the code prediction unit does not increment num_over.
- the code predicting unit performs the processes of steps SC2 and SC3 for all the pixels of the partially decoded image.
- the code prediction unit determines whether or not the value of num_over is larger than a predetermined threshold value Th (SC4).
- SC4 a predetermined threshold value
- the code prediction unit calculates the cost of the partially decoded image in the same manner as in steps SA3 to SA5 described above.
- Th a predetermined threshold value
- the code prediction unit does not calculate the cost of the partially decoded image.
- the code predicting unit performs the above-described processing of steps SA2 to SA5 and SC1 to SC4 on each of the partial decoded images. After that, the code predicting unit predicts the code combination of the DCT coefficient corresponding to the partial decoded image with the lowest cost among the partial decoded images whose costs have been calculated as the correct code combination of the DCT coefficient.
- the code prediction unit may weight each of the upward cost and the left cost when calculating the cost, as in the first embodiment. Also in the present embodiment, the code prediction unit determines whether to apply the first-order differential hypothesis or the second-order differential hypothesis for each of the upward cost and the leftward cost, as in the second embodiment. It's okay.
- the code prediction unit determines whether or not to calculate the cost based on the number of pixels in the partially decoded image that are determined to have pixel values that are not within the predetermined range. However, the code prediction unit according to the present embodiment calculates a deviation amount indicating an amount by which the pixel value of each pixel included in the partially decoded image deviates from a predetermined range, and adds the upward cost and the left cost. In addition, the code may be predicted using the deviation amount in each pixel.
- FIG. 20 is a flowchart illustrating processing in the code prediction unit according to the modification of the fourth embodiment.
- the code prediction unit sets the deviation amount over to 0 (SD1).
- the code prediction unit determines whether or not the pixel value px , y is outside the range of the above-described range for the pixel whose coordinates are (x, y) included in the partially decoded image (SD2).
- the code prediction unit adds the excess of the pixel value from the range to the value of the deviation amount over (SD3).
- ⁇ is the sum of x and y (the same applies hereinafter).
- x and y are the coordinates of the pixels (upper adjacent boundary pixel and left adjacent boundary pixel) of the partially decoded image.
- the code prediction unit does not change the value of the deviation amount over.
- the code prediction unit performs the processes of steps SD2 and SD3 for all the pixels of the partially decoded image.
- over ⁇ (pow (overUpper, 2) + pow (overLower, 2))
- overUpper max (px , y ⁇ maxval, 0)
- overLower max (minval ⁇ px , y , 0)
- pow (x, y) are functions that raise x to the power of y.
- the cost of the quadratic function and the cost of the linear function may be added.
- aU1, aU2, aL1, and aL2 are the weights of the primary function cost of overUpper, the weights of the quadratic function cost of overUpper, the weights of the primary function cost of overLower, and the weights of the quadratic function cost of overLower, respectively. is there.
- the code prediction unit determines whether or not the value of the deviation amount over is larger than a predetermined threshold Th (SD4).
- Th a predetermined threshold
- the code predicting unit calculates the cost (SD5), and then executes the processes of steps SA4 and SA5 described above.
- the code prediction unit does not calculate the cost of the partially decoded image.
- the code prediction unit executes the above-described steps SA2, SA4, SA5, and SD1 to SD5 for each partial decoded image. After that, among the partial decoded images whose costs have been calculated, a combination of codes of DCT coefficients corresponding to a partial decoded image having the lowest cost is predicted as a correct combination of DCT coefficient codes.
- the code prediction unit may weight each of costU and costL as in the first embodiment, and may also weight the deviation amount over. . Also in the present embodiment, the code predicting unit determines whether to apply the primary differential hypothesis or the secondary differential hypothesis for each of costU and costL, as in the second embodiment, when calculating the cost. You can do it.
- the image coding apparatus 11 may implement
- LSI Large Scale Integration
- Each functional block of the image encoding device 11 and the image decoding device 31 may be individually made into a processor, or a part or all of them may be integrated into a processor.
- the method of circuit integration is not limited to LSI, and may be realized by a dedicated circuit or a general-purpose processor. Further, in the case where an integrated circuit technology that replaces LSI appears due to progress in semiconductor technology, an integrated circuit based on the technology may be used.
- the image encoding device 11 and the image decoding device 31 described above can be used by being mounted on various devices that perform transmission, reception, recording, and reproduction of moving images.
- the moving image may be a natural moving image captured by a camera or the like, or an artificial moving image (including CG and GUI) generated by a computer or the like.
- FIG. 21 is a block diagram showing a configuration of a transmission device PROD_A in which the image encoding device 11 is mounted.
- the transmission apparatus PROD_A modulates a carrier wave with an encoding unit PROD_A1 that obtains encoded data by encoding a moving image and the encoded data obtained by the encoding unit PROD_A1.
- a modulation unit PROD_A2 that obtains a modulation signal and a transmission unit PROD_A3 that transmits the modulation signal obtained by the modulation unit PROD_A2 are provided.
- the above-described image encoding device 11 is used as the encoding unit PROD_A1.
- Transmission device PROD_A as a source of moving images to be input to the encoding unit PROD_A1, a camera PROD_A4 that captures moving images, a recording medium PROD_A5 that records moving images, an input terminal PROD_A6 for inputting moving images from the outside, and An image processing unit A7 that generates or processes an image may be further provided.
- FIG. 21A illustrates a configuration in which the transmission apparatus PROD_A includes all of these, but a part of the configuration may be omitted.
- the recording medium PROD_A5 may be a recording of a non-encoded moving image, or a recording of a moving image encoded by a recording encoding scheme different from the transmission encoding scheme. It may be a thing. In the latter case, a decoding unit (not shown) for decoding the encoded data read from the recording medium PROD_A5 in accordance with the recording encoding method may be interposed between the recording medium PROD_A5 and the encoding unit PROD_A1.
- FIG. 21 is a block diagram showing a configuration of a receiving device PROD_B in which the image decoding device 31 is mounted.
- the reception device PROD_B includes a reception unit PROD_B1 that receives a modulation signal, a demodulation unit PROD_B2 that obtains encoded data by demodulating the modulation signal received by the reception unit PROD_B1, A decoding unit PROD_B3 that obtains a moving image by decoding the encoded data obtained by the unit PROD_B2.
- the above-described image decoding device 31 is used as the decoding unit PROD_B3.
- the receiving device PROD_B is a display destination PROD_B4 for displaying a moving image, a recording medium PROD_B5 for recording a moving image, and an output terminal for outputting the moving image to the outside as a supply destination of the moving image output by the decoding unit PROD_B3 PROD_B6 may be further provided.
- FIG. 21B illustrates a configuration in which all of these are provided in the receiving device PROD_B, but some of them may be omitted.
- the recording medium PROD_B5 may be used for recording a non-encoded moving image, or is encoded using a recording encoding method different from the transmission encoding method. May be. In the latter case, an encoding unit (not shown) for encoding the moving image acquired from the decoding unit PROD_B3 according to the recording encoding method may be interposed between the decoding unit PROD_B3 and the recording medium PROD_B5.
- the transmission medium for transmitting the modulation signal may be wireless or wired.
- the transmission mode for transmitting the modulated signal may be broadcasting (here, a transmission mode in which the transmission destination is not specified in advance) or communication (here, transmission in which the transmission destination is specified in advance). Refers to the embodiment). That is, the transmission of the modulation signal may be realized by any of wireless broadcasting, wired broadcasting, wireless communication, and wired communication.
- a terrestrial digital broadcast broadcasting station (broadcasting equipment, etc.) / Receiving station (such as a television receiver) is an example of a transmitting device PROD_A / receiving device PROD_B that transmits and receives a modulated signal by wireless broadcasting.
- a broadcasting station (such as broadcasting equipment) / receiving station (such as a television receiver) of cable television broadcasting is an example of a transmitting device PROD_A / receiving device PROD_B that transmits and receives a modulated signal by cable broadcasting.
- a server workstation, etc.
- Client television receiver, personal computer, smartphone, etc.
- VOD Video On Demand
- video sharing service using the Internet is a transmission device that transmits and receives modulated signals via communication.
- PROD_A / receiving device PROD_B normally, either a wireless or wired transmission medium is used in a LAN, and a wired transmission medium is used in a WAN.
- the personal computer includes a desktop PC, a laptop PC, and a tablet PC.
- the smartphone also includes a multi-function mobile phone terminal.
- the video sharing service client has a function of encoding a moving image captured by the camera and uploading it to the server. That is, the client of the video sharing service functions as both the transmission device PROD_A and the reception device PROD_B.
- FIG. 22 is a block diagram showing a configuration of a recording apparatus PROD_C in which the above-described image encoding device 11 is mounted.
- the recording apparatus PROD_C includes an encoding unit PROD_C1 that obtains encoded data by encoding a moving image, and the encoded data obtained by the encoding unit PROD_C1 on the recording medium PROD_M.
- a writing unit PROD_C2 for writing.
- the above-described image encoding device 11 is used as the encoding unit PROD_C1.
- the recording medium PROD_M may be of a type built into the recording device PROD_C, such as (1) HDD (Hard Disk Drive) or SSD (Solid State Drive), or (2) SD memory. It may be of the type connected to the recording device PROD_C, such as a card or USB (Universal Serial Bus) flash memory, or (3) DVD (Digital Versatile Disc) or BD (Blu-ray Disc: registered trademark) ) And the like may be loaded into a drive device (not shown) built in the recording device PROD_C.
- the recording device PROD_C is a camera PROD_C3 that captures moving images as a source of moving images to be input to the encoding unit PROD_C1, an input terminal PROD_C4 for inputting moving images from the outside, and a reception for receiving moving images
- a unit PROD_C5 and an image processing unit PROD_C6 for generating or processing an image may be further provided.
- FIG. 22A illustrates a configuration in which the recording apparatus PROD_C includes all of these, but some of them may be omitted.
- the receiving unit PROD_C5 may receive a non-encoded moving image, or may receive encoded data encoded by a transmission encoding scheme different from the recording encoding scheme. You may do. In the latter case, a transmission decoding unit (not shown) that decodes encoded data encoded by the transmission encoding method may be interposed between the reception unit PROD_C5 and the encoding unit PROD_C1.
- Examples of such a recording device PROD_C include a DVD recorder, a BD recorder, an HDD (Hard Disk Drive) recorder, and the like (in this case, the input terminal PROD_C4 or the receiver PROD_C5 is a main source of moving images). .
- a camcorder in this case, the camera PROD_C3 is a main source of moving images
- a personal computer in this case, the receiving unit PROD_C5 or the image processing unit C6 is a main source of moving images
- a smartphone this In this case, the camera PROD_C3 or the receiving unit PROD_C5 is a main source of moving images).
- FIG. 22 is a block diagram showing a configuration of a playback device PROD_D equipped with the image decoding device 31 described above.
- the playback device PROD_D reads a moving image by decoding a read unit PROD_D1 that reads encoded data written on the recording medium PROD_M and a read unit PROD_D1 that reads the encoded data. And a decoding unit PROD_D2 to obtain.
- the above-described image decoding device 31 is used as the decoding unit PROD_D2.
- the recording medium PROD_M may be of the type built into the playback device PROD_D, such as (1) HDD or SSD, or (2) such as an SD memory card or USB flash memory. It may be of the type connected to the playback device PROD_D, or (3) may be loaded into a drive device (not shown) built in the playback device PROD_D, such as a DVD or BD. Good.
- the playback device PROD_D has a display unit PROD_D3 that displays a moving image as a supply destination of the moving image output by the decoding unit PROD_D2, an output terminal PROD_D4 that outputs the moving image to the outside, and a transmission unit that transmits the moving image.
- PROD_D5 may be further provided.
- FIG. 22B illustrates a configuration in which the playback apparatus PROD_D includes all of these, but some of the configurations may be omitted.
- the transmission unit PROD_D5 may transmit a non-encoded moving image, or transmits encoded data encoded by a transmission encoding scheme different from the recording encoding scheme. You may do. In the latter case, it is preferable to interpose an encoding unit (not shown) that encodes a moving image using a transmission encoding method between the decoding unit PROD_D2 and the transmission unit PROD_D5.
- Examples of such a playback device PROD_D include a DVD player, a BD player, and an HDD player (in this case, an output terminal PROD_D4 to which a television receiver or the like is connected is a main moving image supply destination).
- a television receiver in this case, the display PROD_D3 is a main supply destination of moving images
- a digital signage also referred to as an electronic signboard or an electronic bulletin board
- the display PROD_D3 or the transmission unit PROD_D5 is the main supply of moving images.
- Display PROD_D3 or transmission unit PROD_D5 is video
- a smartphone which is a main image supply destination
- a smartphone in this case, the display PROD_D3 or the transmission unit PROD_D5 is a main moving image supply destination
- the like are also examples of such a playback device PROD_D.
- Each block of the image decoding device 31 and the image encoding device 11 described above may be realized in hardware by a logic circuit formed on an integrated circuit (IC chip), or may be a CPU (Central Processing Unit). You may implement
- IC chip integrated circuit
- CPU Central Processing Unit
- each of the above devices stores a CPU that executes instructions of a program that realizes each function, a ROM (ReadOnly Memory) that stores the program, a RAM (RandomAccess Memory) that expands the program, the program, and various data.
- a storage device such as a memory for storing is provided.
- the object of the embodiment of the present invention is a record in which the program code (execution format program, intermediate code program, source program) of the control program for each of the above devices, which is software that realizes the above-described functions, is recorded in a computer-readable manner. This can also be achieved by supplying a medium to each of the above devices, and reading and executing the program code recorded on the recording medium by the computer (or CPU or MPU).
- Examples of the recording medium include tapes such as magnetic tapes and cassette tapes, magnetic disks such as floppy (registered trademark) disks / hard disks, CD-ROMs (Compact Disc Read-Only Memory) / MO discs (Magneto-Optical discs).
- tapes such as magnetic tapes and cassette tapes
- magnetic disks such as floppy (registered trademark) disks / hard disks
- CD-ROMs Compact Disc Read-Only Memory
- MO discs Magnetic-Optical discs
- IC cards including memory cards
- Cards such as optical cards
- Semiconductor memories such as flash ROM, or PLD (Programmable logic device)
- Logic circuits such as FPGA and Field (Programmable Gate) Array can be used.
- each of the above devices may be configured to be connectable to a communication network, and the program code may be supplied via the communication network.
- the communication network is not particularly limited as long as it can transmit the program code.
- Internet intranet, extranet, LAN (Local Area Network), ISDN (Integrated Services Digital Network), VAN (Value-Added Network), CATV (Community Area Antenna / television / Cable Television), Virtual Private Network (Virtual Private Network) Network), telephone line network, mobile communication network, satellite communication network, and the like.
- the transmission medium constituting the communication network may be any medium that can transmit the program code, and is not limited to a specific configuration or type.
- IEEE Institute of Electrical and Electronic Engineers 1394, USB, power line carrier, cable TV line, telephone line, ADSL (Asymmetric Digital Subscriber Line) line, etc. wired such as IrDA (Infrared Data Association) and remote control , BlueTooth (registered trademark), IEEE802.11 wireless, HDR (High Data Rate), NFC (Near Field Communication), DLNA (Digital Living Network Alliance: registered trademark), mobile phone network, satellite line, terrestrial digital broadcasting network, etc. It can also be used wirelessly.
- the embodiment of the present invention can also be realized in the form of a computer data signal embedded in a carrier wave in which the program code is embodied by electronic transmission.
- Embodiments of the present invention can be preferably applied to an image decoding apparatus that decodes encoded data in which image data is encoded, and an image encoding apparatus that generates encoded data in which image data is encoded. it can. Further, the present invention can be suitably applied to the data structure of encoded data generated by an image encoding device and referenced by the image decoding device.
- DCT / Quantizer (Code Predictor) 105, 311 Inverse quantization / inverse DCT unit (code prediction device) 1052, 1052A, 3112, 3112A Code prediction unit 1034a, 1052a, 3112a Weight change unit (weight setting unit) 1034b, 1052b, 3112b Hypothesis determination unit
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
残差画像に関する量子化係数を逆量子化して算出される複数の変換係数の一部についての、符号の予測の精度を向上させる。逆量子化・逆DCT部(311、105)は、部分復号画像について算出した上方向のコストおよび左方向のコストを用いて変換係数の符号の予測を行う符号予測部(3112、1052)を備え、符号予測部は、上方向のコストおよび左方向のコストのそれぞれに付与する重みを設定する重み変更部(3112a、1052a)を備えている。
Description
本発明の実施形態は、符号予測装置、画像復号装置および画像符号化装置に関する。
動画像を効率的に伝送または記録するために、動画像を符号化することによって符号化データを生成する動画像符号化装置、および、当該符号化データを復号することによって復号画像を生成する動画像復号装置が用いられている。
具体的な動画像符号化方式としては、例えば、H.264/AVCやHEVC(High-Efficiency Video Coding)にて提案されている方式などが挙げられる。
このような動画像符号化方式においては、動画像を構成する画像(ピクチャ)は、画像を分割することにより得られるスライス、スライスを分割することにより得られる符号化単位(符号化ユニット(Coding Unit:CU)と呼ばれることもある)、及び、符号化単位を分割することより得られるブロックである予測ユニット(PU)、変換ユニット(TU)からなる階層構造により管理され、CUごとに符号化/復号される。
また、このような動画像符号化方式においては、通常、入力画像を符号化/復号することによって得られる局所復号画像に基づいて予測画像が生成され、当該予測画像を入力画像(原画像)から減算して得られる予測残差(「差分画像」または「残差画像」と呼ぶこともある)が符号化される。予測画像の生成方法としては、画面間予測(インター予測)、および、画面内予測(イントラ予測)が挙げられる。
また、近年の動画像符号化及び復号の技術として、予測残差の符号の符号量を低減する、非特許文献1が挙げられる。
"Residual Coefficient Sign Prediction",JVET-D0031, Joint Video Exploration Team (JVET) of ITU-T SG 16 WP 3 and ISO/IECJTC 1/SC 29/WG 11, 15-21 October 2016
非特許文献1には、残差画像に関する量子化係数を逆量子化して算出される複数の変換係数の一部について、正または負の符号の予測を行う技術が開示されている。このような予測の精度は、予測の候補に対する評価の方法に依存する。
本発明の一態様は、残差画像に関する量子化係数を逆量子化して算出される複数の変換係数の一部についての、符号の予測の精度を向上させることを目的とする。
上記の課題を解決するために、本発明の一態様に係る符号予測装置は、対象ブロックの残差画像に関する量子化係数を逆量子化して算出される複数の変換係数のうち、非0の上記変換係数について符号の予測を行う符号予測装置であって、予測の対象とする上記変換係数の符号が正である場合と負である場合との組み合わせについて部分復号画像を生成し、当該部分復号画像について上方向および左方向に隣接する画素との関係に基づいて算出した上方向のコストおよび左方向のコストを用いて上記符号の予測を行う符号予測部を備え、上記符号予測部は、当該符号予測部が用いる上記上方向のコストおよび上記左方向のコストのそれぞれに付与する重みを設定する重み設定部を備えている。
本発明の一態様に係る符号予測装置によれば、残差画像に関する量子化係数を逆量子化して算出される複数の変換係数の一部についての、符号の予測の精度を向上させることができる。
(第1の実施形態)
以下、図面を参照しながら本発明の実施形態について説明する。
以下、図面を参照しながら本発明の実施形態について説明する。
図23は、本実施形態に係る画像伝送システム1の構成を示す概略図である。
画像伝送システム1は、符号化対象画像を符号化した符号を伝送し、伝送された符号を復号し画像を表示するシステムである。画像伝送システム1は、画像符号化装置(動画像符号化装置)11、ネットワーク21、画像復号装置(動画像復号装置)31及び画像表示装置41を含んで構成される。
画像符号化装置11には、単一レイヤもしくは複数レイヤの画像を示す画像Tが入力される。レイヤとは、ある時間を構成するピクチャが1つ以上ある場合に、複数のピクチャを区別するために用いられる概念である。たとえば、同一ピクチャを、画質や解像度の異なる複数のレイヤで符号化するとスケーラブル符号化になり、異なる視点のピクチャを複数のレイヤで符号化するとビュースケーラブル符号化となる。複数のレイヤのピクチャ間で予測(インターレイヤ予測、インタービュー予測)を行う場合には、符号化効率が大きく向上する。また予測を行わない場合(サイマルキャスト)の場合にも、符号化データをまとめることができる。
ネットワーク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を記録した記憶媒体で代替されても良い。
画像復号装置31は、ネットワーク21が伝送した符号化ストリームTeのそれぞれを復号し、それぞれ復号した1または複数の復号画像Tdを生成する。
画像表示装置41は、画像復号装置31が生成した1または複数の復号画像Tdの全部または一部を表示する。画像表示装置41は、例えば、液晶ディスプレイ、有機EL(Electro-luminescence)ディスプレイ等の表示デバイスを備える。また、空間スケーラブル符号化およびSNRスケーラブル符号化では、画像復号装置31および画像表示装置41が高い処理能力を有する場合には、画像表示装置41は、画質の高い拡張レイヤ画像を表示する。一方、画像復号装置31および画像表示装置41がより低い処理能力しか有しない場合には、画像表示装置41は、拡張レイヤほど高い処理能力、表示能力を必要としないベースレイヤ画像を表示する。
<演算子>
本明細書で用いる演算子を以下に記載する。
本明細書で用いる演算子を以下に記載する。
>>は右ビットシフト、<<は左ビットシフト、&はビットワイズAND、|はビットワイズOR、|=は別の条件との和演算(OR)である。
x ? y : zは、xが真(0以外)の場合にy、xが偽(0)の場合にzをとる3項演算子である。
Clip3(a, b, c) は、cをa以上b以下の値にクリップする関数であり、c<aの場合にはaを返し、c>bの場合にはbを返し、その他の場合にはcを返す関数である(ただし、a<=b)。
<符号化ストリームTeの構造>
本実施形態に係る画像符号化装置11および画像復号装置31の詳細な説明に先立って、画像符号化装置11によって生成され、画像復号装置31によって復号される符号化ストリームTeのデータ構造について説明する。
本実施形態に係る画像符号化装置11および画像復号装置31の詳細な説明に先立って、画像符号化装置11によって生成され、画像復号装置31によって復号される符号化ストリームTeのデータ構造について説明する。
図1は、符号化ストリームTeにおけるデータの階層構造を示す図である。符号化ストリームTeは、例示的に、シーケンス、およびシーケンスを構成する複数のピクチャを含む。図1の(a)は、シーケンスSEQを既定する符号化ビデオシーケンスを示す図である。図1の(b)は、ピクチャPICTを規定する符号化ピクチャを示す図である。図1の(c)は、スライスSを規定する符号化スライスを示す図である。図1の(d)は、スライスデータを規定する符号化スライスデータを示す図である。図1の(e)は、符号化スライスデータに含まれる符号化ツリーユニットを示す図である。図1の(f)は、符号化ツリーユニットに含まれる符号化ユニット(Coding Unit;CU)を示す図である。
(符号化ビデオシーケンス)
符号化ビデオシーケンスでは、処理対象のシーケンスSEQを復号するために画像復号装置31が参照するデータの集合が規定されている。シーケンスSEQは、図1の(a)に示すように、ビデオパラメータセット(Video Parameter Set)、シーケンスパラメータセットSPS(Sequence Parameter Set)、ピクチャパラメータセットPPS(Picture Parameter Set)、ピクチャPICT、及び、付加拡張情報SEI(Supplemental Enhancement Information)を含んでいる。ここで#の後に示される値はレイヤIDを示す。図1では、#0と#1すなわちレイヤ0とレイヤ1の符号化データが存在する例を示すが、レイヤの種類およびレイヤの数はこれによらない。
符号化ビデオシーケンスでは、処理対象のシーケンスSEQを復号するために画像復号装置31が参照するデータの集合が規定されている。シーケンスSEQは、図1の(a)に示すように、ビデオパラメータセット(Video Parameter Set)、シーケンスパラメータセットSPS(Sequence Parameter Set)、ピクチャパラメータセットPPS(Picture Parameter Set)、ピクチャPICT、及び、付加拡張情報SEI(Supplemental Enhancement Information)を含んでいる。ここで#の後に示される値はレイヤIDを示す。図1では、#0と#1すなわちレイヤ0とレイヤ1の符号化データが存在する例を示すが、レイヤの種類およびレイヤの数はこれによらない。
ビデオパラメータセットVPSは、複数のレイヤから構成されている動画像において、複数の動画像に共通する符号化パラメータの集合および動画像に含まれる複数のレイヤおよび個々のレイヤに関連する符号化パラメータの集合が規定されている。
シーケンスパラメータセットSPSでは、対象シーケンスを復号するために画像復号装置31が参照する符号化パラメータの集合が規定されている。例えば、ピクチャの幅や高さが規定される。なお、SPSは複数存在してもよい。その場合、PPSから複数のSPSの何れかを選択する。
ピクチャパラメータセットPPSでは、対象シーケンス内の各ピクチャを復号するために画像復号装置31が参照する符号化パラメータの集合が規定されている。例えば、ピクチャの復号に用いられる量子化幅の基準値(pic_init_qp_minus26)や重み付き予測の適用を示すフラグ(weighted_pred_flag)が含まれる。なお、PPSは複数存在してもよい。その場合、対象シーケンス内の各ピクチャから複数のPPSの何れかを選択する。
(符号化ピクチャ)
符号化ピクチャでは、処理対象のピクチャPICTを復号するために画像復号装置31が参照するデータの集合が規定されている。ピクチャPICTは、図1の(b)に示すように、スライスS0~SNS-1を含んでいる(NSはピクチャPICTに含まれるスライスの総数)。
符号化ピクチャでは、処理対象のピクチャPICTを復号するために画像復号装置31が参照するデータの集合が規定されている。ピクチャPICTは、図1の(b)に示すように、スライスS0~SNS-1を含んでいる(NSはピクチャPICTに含まれるスライスの総数)。
なお、以下、スライスS0~SNS-1のそれぞれを区別する必要が無い場合、符号の添え字を省略して記述することがある。また、以下に説明する符号化ストリームTeに含まれるデータであって、添え字を付している他のデータについても同様である。
(符号化スライス)
符号化スライスでは、処理対象のスライスSを復号するために画像復号装置31が参照するデータの集合が規定されている。スライスSは、図1の(c)に示すように、スライスヘッダSH、および、スライスデータSDATAを含んでいる。
符号化スライスでは、処理対象のスライスSを復号するために画像復号装置31が参照するデータの集合が規定されている。スライスSは、図1の(c)に示すように、スライスヘッダSH、および、スライスデータSDATAを含んでいる。
スライスヘッダSHには、対象スライスの復号方法を決定するために画像復号装置31が参照する符号化パラメータ群が含まれる。スライスタイプを指定するスライスタイプ指定情報(slice_type)は、スライスヘッダSHに含まれる符号化パラメータの一例である。
スライスタイプ指定情報により指定可能なスライスタイプとしては、(1)符号化の際にイントラ予測のみを用いるIスライス、(2)符号化の際に単方向予測、または、イントラ予測を用いるPスライス、(3)符号化の際に単方向予測、双方向予測、または、イントラ予測を用いるBスライスなどが挙げられる。
なお、スライスヘッダSHには、上記符号化ビデオシーケンスに含まれる、ピクチャパラメータセットPPSへの参照(pic_parameter_set_id)を含んでいても良い。
(符号化スライスデータ)
符号化スライスデータでは、処理対象のスライスデータSDATAを復号するために画像復号装置31が参照するデータの集合が規定されている。スライスデータSDATAは、図1の(d)に示すように、符号化ツリーユニット(CTU:CodingTree Unit)を含んでいる。CTUは、スライスを構成する固定サイズ(例えば64x64)のブロックであり、最大符号化単位(LCU:Largest CodingUnit)と呼ぶこともある。
符号化スライスデータでは、処理対象のスライスデータSDATAを復号するために画像復号装置31が参照するデータの集合が規定されている。スライスデータSDATAは、図1の(d)に示すように、符号化ツリーユニット(CTU:CodingTree Unit)を含んでいる。CTUは、スライスを構成する固定サイズ(例えば64x64)のブロックであり、最大符号化単位(LCU:Largest CodingUnit)と呼ぶこともある。
(符号化ツリーユニット)
図1の(e)に示すように、処理対象の符号化ツリーユニットを復号するために画像復号装置31が参照するデータの集合が規定されている。符号化ツリーユニットは、再帰的な4分木分割により分割される。再帰的な4分木分割により得られる木構造のノードのことを符号化ノード(CN:Coding Node)と称する。4分木の中間ノードは、符号化ノードであり、符号化ツリーユニット自身も最上位の符号化ノードとして規定される。CTUは、分割フラグ(cu_split_flag)を含み、cu_split_flagが1の場合には、4つの符号化ノードCNに分割される。cu_split_flagが0の場合には、符号化ノードCNは分割されず、1つの符号化ユニット(CU:Coding Unit)をノードとして持つ。符号化ユニットCUは符号化ノードの末端ノードであり、これ以上分割されない。符号化ユニットCUは、符号化処理の基本的な単位となる。
図1の(e)に示すように、処理対象の符号化ツリーユニットを復号するために画像復号装置31が参照するデータの集合が規定されている。符号化ツリーユニットは、再帰的な4分木分割により分割される。再帰的な4分木分割により得られる木構造のノードのことを符号化ノード(CN:Coding Node)と称する。4分木の中間ノードは、符号化ノードであり、符号化ツリーユニット自身も最上位の符号化ノードとして規定される。CTUは、分割フラグ(cu_split_flag)を含み、cu_split_flagが1の場合には、4つの符号化ノードCNに分割される。cu_split_flagが0の場合には、符号化ノードCNは分割されず、1つの符号化ユニット(CU:Coding Unit)をノードとして持つ。符号化ユニットCUは符号化ノードの末端ノードであり、これ以上分割されない。符号化ユニットCUは、符号化処理の基本的な単位となる。
また、符号化ツリーユニットCTUのサイズが64x64画素の場合には、符号化ユニットのサイズは、64x64画素、32x32画素、16x16画素、および、8x8画素の何れかをとり得る。
(符号化ユニット)
図1の(f)に示すように、処理対象の符号化ユニットを復号するために画像復号装置31が参照するデータの集合が規定されている。具体的には、符号化ユニットは、予測ツリー、変換ツリー、CUヘッダCUHから構成される。CUヘッダでは予測モード、分割方法(PU分割モード)等が規定される。
図1の(f)に示すように、処理対象の符号化ユニットを復号するために画像復号装置31が参照するデータの集合が規定されている。具体的には、符号化ユニットは、予測ツリー、変換ツリー、CUヘッダCUHから構成される。CUヘッダでは予測モード、分割方法(PU分割モード)等が規定される。
予測ツリーでは、符号化ユニットを1または複数に分割した各予測ユニット(PU)の予測情報(参照ピクチャインデックス、動きベクトル等)が規定される。別の表現でいえば、予測ユニットは、符号化ユニットを構成する1または複数の重複しない領域である。また、予測ツリーは、上述の分割により得られた1または複数の予測ユニットを含む。なお、以下では、予測ユニットをさらに分割した予測単位を「サブブロック」と呼ぶ。サブブロックは、複数の画素によって構成されている。予測ユニットとサブブロックのサイズが等しい場合には、予測ユニット中のサブブロックは1つである。予測ユニットがサブブロックのサイズよりも大きい場合には、予測ユニットは、サブブロックに分割される。たとえば予測ユニットが8x8、サブブロックが4x4の場合には、予測ユニットは水平に2分割、垂直に2分割からなる、4つのサブブロックに分割される。
予測処理は、この予測ユニット(サブブロック)ごとに行ってもよい。
予測ツリーにおける分割の種類は、大まかにいえば、イントラ予測の場合と、インター予測の場合との2つがある。イントラ予測とは、同一ピクチャ内の予測であり、インター予測とは、互いに異なるピクチャ間(例えば、表示時刻間、レイヤ画像間)で行われる予測処理を指す。
イントラ予測の場合、分割方法は、2Nx2N(符号化ユニットと同一サイズ)と、NxNとがある。
また、インター予測の場合、分割方法は、符号化データのPU分割モード(part_mode)により符号化され、2Nx2N(符号化ユニットと同一サイズ)、2NxN、2NxnU、2NxnD、Nx2N、nLx2N、nRx2N、および、NxNなどがある。なお、2NxN、Nx2Nは1:1の対称分割を示し、2NxnU、2NxnDおよびnLx2N、nRx2Nは、1:3、3:1の非対称分割を示す。CUに含まれるPUを順にPU0、PU1、PU2、PU3と表現する。
図2の(a)~(h)に、それぞれのPU分割モードにおけるパーティションの形状(PU分割の境界の位置)を具体的に図示している。図2の(a)は、2Nx2Nのパーティションを示し、(b)、(c)、(d)は、それぞれ、2NxN、2NxnU、および、2NxnDのパーティション(横長パーティション)を示す。(e)、(f)、(g)は、それぞれ、Nx2N、nLx2N、nRx2Nである場合のパーティション(縦長パーティション)を示し、(h)は、NxNのパーティションを示す。なお、横長パーティションと縦長パーティションを総称して長方形パーティション、2Nx2N、NxNを総称して正方形パーティションと呼ぶ。
また、変換ツリーにおいては、符号化ユニットが1または複数の変換ユニットに分割され、各変換ユニットの位置とサイズとが規定される。別の表現でいえば、変換ユニットは、符号化ユニットを構成する1または複数の重複しない領域のことである。また、変換ツリーは、上述の分割より得られた1または複数の変換ユニットを含む。
変換ツリーにおける分割には、符号化ユニットと同一のサイズの領域を変換ユニットとして割り付けるものと、上述したCUの分割と同様、再帰的な4分木分割によるものがある。
変換処理は、この変換ユニットごとに行われる。
(画像復号装置の構成)
次に、本実施形態に係る画像復号装置31の構成について説明する。図5は、本実施形態に係る画像復号装置31の構成を示す概略図である。画像復号装置31は、エントロピー復号部301、予測パラメータ復号部(予測画像復号装置)302、ループフィルタ305、参照ピクチャメモリ306、予測パラメータメモリ307、予測画像生成部(予測画像生成装置)308、逆量子化・逆DCT部311、及び加算部312を含んで構成される。
次に、本実施形態に係る画像復号装置31の構成について説明する。図5は、本実施形態に係る画像復号装置31の構成を示す概略図である。画像復号装置31は、エントロピー復号部301、予測パラメータ復号部(予測画像復号装置)302、ループフィルタ305、参照ピクチャメモリ306、予測パラメータメモリ307、予測画像生成部(予測画像生成装置)308、逆量子化・逆DCT部311、及び加算部312を含んで構成される。
また、予測パラメータ復号部302は、インター予測パラメータ復号部303及びイントラ予測パラメータ復号部304を含んで構成される。予測画像生成部308は、インター予測画像生成部309及びイントラ予測画像生成部310を含んで構成される。
エントロピー復号部301は、外部から入力された符号化ストリームTeに対してエントロピー復号を行って、個々の符号(シンタックス要素)を分離し復号する。分離された符号には、予測画像を生成するための予測情報および、差分画像を生成するための残差情報などがある。
エントロピー復号部301は、分離した符号の一部を予測パラメータ復号部302に出力する。分離した符号の一部とは、例えば、予測モードpredMode、PU分割モードpart_mode、マージフラグmerge_flag、マージインデックスmerge_idx、インター予測識別子inter_pred_idc、参照ピクチャインデックスrefIdxLX、予測ベクトルインデックスmvp_LX_idx、および差分ベクトルmvdLXである。どの符号を復号するかの制御は、予測パラメータ復号部302の指示に基づいて行われる。エントロピー復号部301は、量子化係数を逆量子化・逆DCT部311に出力する。この量子化係数は、符号化処理において、残差信号に対してDCT(Discrete Cosine Transform、離散コサイン変換)を行い量子化して得られる係数である。
インター予測パラメータ復号部303は、エントロピー復号部301から入力された符号に基づいて、予測パラメータメモリ307に記憶された予測パラメータを参照してインター予測パラメータを復号する。
インター予測パラメータ復号部303は、復号したインター予測パラメータを予測画像生成部308に出力し、また予測パラメータメモリ307に記憶する。インター予測パラメータ復号部303の詳細については後述する。
ループフィルタ305は、加算部312が生成したCUの復号画像に対し、デブロッキングフィルタ、サンプル適応オフセット(SAO)、および/または適応ループフィルタ(ALF)等のフィルタを施す。
参照ピクチャメモリ306は、ループフィルタ305が生成したCUの復号画像を、復号対象のピクチャ及びCU毎に予め定めた位置に記憶する。
予測パラメータメモリ307は、予測パラメータを、復号対象のピクチャ及び予測ユニット(もしくはサブブロック、固定サイズブロック、ピクセル)毎に予め定めた位置に記憶する。具体的には、予測パラメータメモリ307は、(i)インター予測パラメータ復号部303が復号したインター予測パラメータ、(ii)イントラ予測パラメータ復号部304が復号したイントラ予測パラメータ及び(iii)エントロピー復号部301が分離した、予測モードpredModeを記憶する。記憶されるインター予測パラメータには、例えば、予測リスト利用フラグpredFlagLX(インター予測識別子inter_pred_idc)、参照ピクチャインデックスrefIdxLX、および動きベクトルmvLXがある。
予測画像生成部308には、エントロピー復号部301から入力された予測モードpredModeが入力され、また予測パラメータ復号部302から予測パラメータが入力される。また、予測画像生成部308は、参照ピクチャメモリ306から参照ピクチャを読み出す。予測画像生成部308は、予測モードpredModeが示す予測モードで、予測パラメータ復号部302から入力された予測パラメータと参照ピクチャメモリ306から読み出した参照ピクチャとを用いてPUの予測画像を生成する。
ここで、予測モードpredModeがインター予測モードを示す場合、インター予測画像生成部309は、インター予測パラメータ復号部303から入力されたインター予測パラメータと参照ピクチャメモリ306から読み出した参照ピクチャとを用いてインター予測によりPUの予測画像を生成する。
インター予測画像生成部309は、予測リスト利用フラグpredFlagLXが1である参照ピクチャリスト(L0リスト、もしくはL1リスト)に対し、参照ピクチャインデックスrefIdxLXで示される参照ピクチャから、復号対象PUを基準として動きベクトルmvLXが示す位置にある参照ピクチャブロックを参照ピクチャメモリ306から読み出す。インター予測画像生成部309は、参照ピクチャメモリ306から読み出した参照ピクチャブロックをもとに予測を行ってPUの予測画像を生成する。インター予測画像生成部309は、生成したPUの予測画像を加算部312に出力する。
予測モードpredModeがイントラ予測モードを示す場合、イントラ予測画像生成部310は、イントラ予測パラメータ復号部304から入力されたイントラ予測パラメータと参照ピクチャメモリ306から読み出した参照ピクチャとを用いてイントラ予測を行う。具体的には、イントラ予測画像生成部310は、復号対象のピクチャであって、既に復号されたPUのうち、復号対象PUから予め定めた範囲にある隣接PUを参照ピクチャメモリ306から読み出す。予め定めた範囲とは、復号対象PUがいわゆるラスタースキャンの順序で順次移動する場合、例えば、左、左上、上、右上の隣接PUのうちのいずれかであり、イントラ予測モードによって異なる。ラスタースキャンの順序とは、各ピクチャにおいて、上端から下端まで各行について、順次左端から右端まで移動させる順序である。
イントラ予測画像生成部310は、読み出した隣接PUについてイントラ予測モードIntraPredModeが示す予測モードで予測を行ってPUの予測画像を生成する。イントラ予測画像生成部310は、生成したPUの予測画像を加算部312に出力する。
イントラ予測パラメータ復号部304において、輝度と色差で異なるイントラ予測モードを導出する場合、イントラ予測画像生成部310は、輝度予測モードIntraPredModeYに応じて、プレーナ予測(0)、DC予測(1)、方向予測(2~66)の何れかによって輝度のPUの予測画像を生成する。また、イントラ予測画像生成部310は、色差予測モードIntraPredModeCに応じて、プレーナ予測(0)、DC予測(1)、方向予測(2~66)、LMモード(67)の何れかによって色差のPUの予測画像を生成する。
逆量子化・逆DCT部311(符号予測装置)は、エントロピー復号部301から入力された量子化係数を逆量子化してDCT係数を求める。逆量子化・逆DCT部311は、求めたDCT係数について逆DCT(Inverse Discrete Cosine Transform、逆離散コサイン変換)を行い、残差信号を算出する。逆量子化・逆DCT部311は、算出した残差信号を加算部312に出力する。逆量子化・逆DCT部311の具体的な構成については後述する。
加算部312は、インター予測画像生成部309またはイントラ予測画像生成部310から入力されたPUの予測画像と逆量子化・逆DCT部311から入力された残差信号を画素毎に加算して、PUの復号画像を生成する。ループフィルタ305は、生成したPUの復号画像を参照ピクチャメモリ306に記憶し、生成したPUの復号画像をピクチャ毎に統合した復号画像Tdを外部に出力する。
(逆量子化・逆DCT部311)
図7の(a)は、画像復号装置31における逆量子化・逆DCT部311の構成を示すブロック図である。図7の(a)に示すように、逆量子化・逆DCT部311は、逆量子化部3111、符号予測部3112、誤差修正部3113、および逆DCT部3114を備える。逆量子化・逆DCT部311は、残差画像に関する量子化係数を逆量子化して算出される複数のDCT係数(変換係数)のうち、非0のDCT係数について符号の予測を行う。
図7の(a)は、画像復号装置31における逆量子化・逆DCT部311の構成を示すブロック図である。図7の(a)に示すように、逆量子化・逆DCT部311は、逆量子化部3111、符号予測部3112、誤差修正部3113、および逆DCT部3114を備える。逆量子化・逆DCT部311は、残差画像に関する量子化係数を逆量子化して算出される複数のDCT係数(変換係数)のうち、非0のDCT係数について符号の予測を行う。
逆量子化部3111は、エントロピー復号部301から入力された対象ブロックの量子化係数を逆量子化して、符号情報のないDCT係数を求める。符号予測部3112は、符号情報のないDCT係数を用いてDCT係数の符号を予測する。誤差修正部3113は、エントロピー復号部301から入力された符号予測誤差に基づいて、DCT係数の符号の予測誤差を修正する。具体的には、誤差修正部3113は、予測符号と符号予測誤差のXORを用いることで予測符号を修正して符号を導出する。
(修正後)符号 = 予測符号 XOR 符号予測誤差
なお、誤差修正部3113は、符号予測誤差が0か1かに応じて、予測符号を反転することにより、符号を導出することもできる。
なお、誤差修正部3113は、符号予測誤差が0か1かに応じて、予測符号を反転することにより、符号を導出することもできる。
(修正後)符号 = 符号予測誤差!=0 ? 1-予測符号 : 予測符号
逆DCT部3114は、符号情報のないDCT係数、および予測誤差修正後のDCT係数の符号を用いて逆DCTを行い、残差信号を算出する。
逆DCT部3114は、符号情報のないDCT係数、および予測誤差修正後のDCT係数の符号を用いて逆DCTを行い、残差信号を算出する。
図8は、符号予測における処理の一例の流れを示すフローチャートである。この符号予測においては、符号予測部3112は、まず変数min_costの値を、所定の正の数、例えば整数の上限(MAXINT)に設定する(SA1)。次に符号予測部3112は、予測の対象とするDCT係数の符号が正である場合と負である場合との組み合わせについて、対象ブロックの部分的な復号画像(部分復号画像)を生成する(SA2)。符号予測部3112は、生成した部分復号画像について、上方向および左方向に隣接する画素との関係に基づいて上方向のコストおよび左方向のコストを算出する(SA3)。
さらに符号予測部3112は、算出した上方向のコストおよび左方向のコストを用いて符号の予測を行う。具体的には、符号予測部3112は、上方向のコストおよび左方向のコストの和により表されるコストcostの値がmin_costの値より小さいか判定する(SA4)。コストcostの値がmin_costの値より小さい場合(SA4でY)、符号予測部3112は、min_costの値をコストcostの値で更新するとともに、min_costに対応するDCT係数の組み合わせを更新する(SA5)。一方、コストcostの値がmin_costの値以上である場合(SA4でN)、符号予測部3112はステップSA5の処理を行わない。
符号予測部3112は、ステップSA2~SA5までの処理を、予測対象とするDCT係数の符号の、全ての組み合わせについて繰り返す。符号予測部3112は、ループの終了時点におけるmin_costの値に対応するDCT係数の符号の組み合わせが、予測対象とするDCT係数の符号の組み合わせであると予測する。
(テンプレートを利用した部分復号画像の生成)
符号予測部3112による部分復号画像の生成について、以下に説明する。符号予測部3112は、ブロックの上端の画素および左端の画素の画素値を用いてコストの算出を行う。したがって、符号予測部3112は、上端および左端の画素を復号した部分復号画像を生成する。
符号予測部3112による部分復号画像の生成について、以下に説明する。符号予測部3112は、ブロックの上端の画素および左端の画素の画素値を用いてコストの算出を行う。したがって、符号予測部3112は、上端および左端の画素を復号した部分復号画像を生成する。
符号予測部3112は、予測対象とする係数の、全ての符号の組み合わせについて、逆DCT処理を行うことで部分復号画像を生成してもよい。しかし、符号予測部3112は、テンプレートを用いて計算することで、一部の部分復号画像について、逆DCT処理を行わずに部分復号画像を生成できる。
図9の(a)は、予測対象とする係数の例を示す図である。図9の(b)~(d)は、それぞれ互いに異なるテンプレートについて説明する図である。図9の(a)~(d)を参照して、テンプレートを用いた計算方法について、以下に説明する。
以下の例において、cx,yは、座標(x,y)(x = 0, ... ,3 ;y = 0, ... ,3)におけるDCT係数を示す。以下の例では、図9の(a)に示すように、
・c2,2= -1
・c1,2= -5
・c1,0= +2
という3個のDCT係数について、絶対値が分かっている状態から符号の予測を行うものとする。なお、c2,2、c1,2、およびc1,0以外のDCT係数については予測を行わないため、DCT係数に符号の情報が含まれている。
・c2,2= -1
・c1,2= -5
・c1,0= +2
という3個のDCT係数について、絶対値が分かっている状態から符号の予測を行うものとする。なお、c2,2、c1,2、およびc1,0以外のDCT係数については予測を行わないため、DCT係数に符号の情報が含まれている。
また、以下の例において、部分復号画像をHabcと表す。ここで、a,b,cはそれぞれc2,2、c1,2、およびc1,0の符号に対応し、それぞれ0または1である。a,b,cが0である場合には対応するDCT係数は正であり、1である場合には対応するDCT係数は負である。
この場合において、符号予測部3112は、以下の手順により部分復号画像を生成する。まず、符号予測部3112は、全ての符号の係数が正である場合、すなわち
・c2,2= +1
・c1,2= +5
・c1,0= +2
である場合について、逆DCT処理によって部分復号画像H000を生成する。
・c2,2= +1
・c1,2= +5
・c1,0= +2
である場合について、逆DCT処理によって部分復号画像H000を生成する。
次に、符号予測部3112は、図9の(b)~(d)に示すように、予測対象のDCT係数のいずれか1つだけの符号が正であり、他の係数が0である場合のそれぞれ、すなわち
(A)c1,0= +2、c1,2 = 0、c2,2= 0(図9の(b)参照)
(B)c1,0= 0、c1,2 = +5、c2,2= 0(図9の(c)参照)
(C)c1,0= 0、c1,2 = 0、c2,2= +1(図9の(d)参照)
である場合のそれぞれについて、逆DCT処理によって部分復号画像を生成する。ここで、上記(A)~(C)のそれぞれの場合における部分復号画像を、順にテンプレートT001、T010、T100と表現する。
(A)c1,0= +2、c1,2 = 0、c2,2= 0(図9の(b)参照)
(B)c1,0= 0、c1,2 = +5、c2,2= 0(図9の(c)参照)
(C)c1,0= 0、c1,2 = 0、c2,2= +1(図9の(d)参照)
である場合のそれぞれについて、逆DCT処理によって部分復号画像を生成する。ここで、上記(A)~(C)のそれぞれの場合における部分復号画像を、順にテンプレートT001、T010、T100と表現する。
このとき、符号予測部3112は、H000以外の部分復号画像Habcを、以下の式
・H001 = H000 - 2* T001
・H010 = H000 - 2* T010
・H011 = H010 - 2* T001
・H100 = H000 - 2* T100
・H101 = H100 - 2* T001
・H110 = H100 - 2* T010
・H111 = H110 - 2* T001
により算出することができる。
・H001 = H000 - 2* T001
・H010 = H000 - 2* T010
・H011 = H010 - 2* T001
・H100 = H000 - 2* T100
・H101 = H100 - 2* T001
・H110 = H100 - 2* T010
・H111 = H110 - 2* T001
により算出することができる。
以上の手順によれば、符号予測部3112は、逆DCT処理によって部分復号画像H000、およびテンプレートT001、T010、T100を生成した後、減算処理によって他の部分復号画像を生成することができる。したがって、予測対象とする係数の、全ての符号の組み合わせ(8通り)に対応する部分復号画像をそれぞれ逆DCT処理によって生成する場合と比較して、処理量を削減することができる。
また、予測対象とするDCT係数の数が1、2または4以上である場合であっても同様に、
・全ての予測対象とするDCT係数の符号が正である場合の部分復号画像
・予測対象とするDCT係数のうち、いずれか1つの符号が正であり、他のDCT係数が0であるとした場合の、それぞれのDCT係数ごとの部分復号画像(テンプレート)
のみ逆DCT処理によって生成すれば、予測対象とするDCT係数の符号の、他の組み合わせについては、逆DCT処理を行うことなく部分復号画像を生成することができる。
・全ての予測対象とするDCT係数の符号が正である場合の部分復号画像
・予測対象とするDCT係数のうち、いずれか1つの符号が正であり、他のDCT係数が0であるとした場合の、それぞれのDCT係数ごとの部分復号画像(テンプレート)
のみ逆DCT処理によって生成すれば、予測対象とするDCT係数の符号の、他の組み合わせについては、逆DCT処理を行うことなく部分復号画像を生成することができる。
(コストの計算)
符号予測部3112による部分復号画像のコストの算出方法について以下に説明する。なお、以下の説明において「上」とはy座標が小さくなる方向を意味し、「左」とはx座標が小さくなる方向を意味する。
符号予測部3112による部分復号画像のコストの算出方法について以下に説明する。なお、以下の説明において「上」とはy座標が小さくなる方向を意味し、「左」とはx座標が小さくなる方向を意味する。
図10の(a)は、部分復号画像およびその周囲の画素について説明する図である。それぞれの部分復号画像においては、図10の(a)に示すように、
・上端に位置する座標(0,0)~(3,0)の画素
・左端に位置する座標(0,0)~(0,3)の画素
について復号されている。また、
・部分復号画像の上端に隣接する座標(0,-1)~(3,-1)および座標(0,-2)~(3,-2)の画素
・部分復号画像の左端に隣接する座標(-1,0)~(-1,3)および座標(-2,0)~(-2,3)の画素
についてはすでに復号されており、画素値が既知である。
・上端に位置する座標(0,0)~(3,0)の画素
・左端に位置する座標(0,0)~(0,3)の画素
について復号されている。また、
・部分復号画像の上端に隣接する座標(0,-1)~(3,-1)および座標(0,-2)~(3,-2)の画素
・部分復号画像の左端に隣接する座標(-1,0)~(-1,3)および座標(-2,0)~(-2,3)の画素
についてはすでに復号されており、画素値が既知である。
符号予測部3112は、コストcostを、以下の式
cost = costU +costL
により算出する。costUは部分復号画像の上側に隣接する画素に対するコスト(上方向のコスト)、costLは部分復号画像の左側に隣接する画素に対するコスト(左方向のコスト)をそれぞれ示す。
cost = costU +costL
により算出する。costUは部分復号画像の上側に隣接する画素に対するコスト(上方向のコスト)、costLは部分復号画像の左側に隣接する画素に対するコスト(左方向のコスト)をそれぞれ示す。
符号予測におけるコストの算出方法の例としては、2次微分仮説に基づく方法が挙げられる。当明細書において、2次微分仮説とは、DCT係数(変換係数)の符号が正しければ、隣接する画素(近隣画素)との間での、画素値の変化の勾配の変化が最小になるという仮説である。この仮説が成り立つ場合、画素値の変化の2次微分(1次微分である勾配の変化)が0になることから、この仮説を2次微分仮説と呼ぶ。換言すれば、2次微分仮説とは、部分復号画像の境界における画像の連続性を想定したものである。具体的には、2次微分仮説において符号予測部3112は、costUおよびcostLをそれぞれ以下の式
により算出する。ここで、px,yは、座標(x,y)の画素の画素値である。
なお、上記コストは、境界近傍の各画素p0でのコストcost_p0を、上方向および左方向の部分復号画像全体について和をとることで導出できる。コストcost_p0は下記式で導出できる。
cost_p0 = |p2 -2*p1 + p0|
ここで、p0は、境界近傍の部分復号画像の値(予測符号により復号された画素値)、p1は、復号した上方向もしくは左方向の隣接ブロックにおいてp0に隣接する画素。p2は、p1に隣接する画素である。
ここで、p0は、境界近傍の部分復号画像の値(予測符号により復号された画素値)、p1は、復号した上方向もしくは左方向の隣接ブロックにおいてp0に隣接する画素。p2は、p1に隣接する画素である。
なお、上記、各画素のコストcost_p0は、境界付近の2画素p1, p2の勾配である「p1 - p2」を、境界画素の値p1に加算して得られる部分復号画像の予測値「p1*2 - p2」と部分復号画像の値p0の誤差を測定していることと等しい。
図10の(b)は、2次微分仮説について説明するための図である。ここでは簡単のため、隣接する3つの画素の画素値について、順にp2、p1、p0とする。図10の(b)の上段に示すように、p0とp1との間の変化、およびp1とp2との間の変化が等しい場合、すなわち画素値の変化の勾配が変化しない場合には、上記の式により算出されるコストは0となる。一方、図10の(b)の下段に示すように、p0とp1との間の変化、およびp1とp2との間の変化が等しくない場合、すなわち画素値の変化の勾配が変化する場合には、上記の式により算出されるコストは0より大きい値となる。このコストを最小にする変換係数の符号の組み合わせが、2次微分仮説においては最も元の画像に合致すると考えられる。
しかし、上記の式から明らかな通り、コストの計算は部分復号画像に隣接する画素に依存する。このため、部分復号画像の条件によっては、costUおよびcostLを単純に加算することが適切でない場合がある。そこで、本実施形態の符号予測部3112は、costUおよびcostLにウェイト(重み)を導入して計算を行う。
具体的には、符号予測部3112は、上方向のコストに付与するウェイトcuおよび左方向のコストに付与するウェイトclのそれぞれを変更する重み変更部3112a(重み設定部)を備える。符号予測部3112は、以下の式
cost = cu * costU+ cl * costL (1)
によりコストの計算を行う。これにより、符号予測部3112は、上方向のコストと左方向のコストとの、いずれを重視するかを決定する。重み変更部3112aがcuおよびclを設定する条件については後述する。
cost = cu * costU+ cl * costL (1)
によりコストの計算を行う。これにより、符号予測部3112は、上方向のコストと左方向のコストとの、いずれを重視するかを決定する。重み変更部3112aがcuおよびclを設定する条件については後述する。
なお、符号予測部3112は、ウェイトcuとcostUとの積、および、ウェイトclとcostLとの積を、シフト演算を用いて算出してもよい。つまり、符号予測部3112は、上方向のコストをシフトした値と左方向をシフトした値の和からコストcostを導出してもよい。例えば(cl, cu)=(1, 4)、(1, 3)の場合には、各々、以下の式
cost = (costU<< 2) + costL
cost = (costU<< 1) + costU + costL
で導出できる。
cost = (costU<< 2) + costL
cost = (costU<< 1) + costU + costL
で導出できる。
図11は、符号予測部3112における処理の流れを示すフローチャートである。符号予測部3112における処理は、図8に示す符号予測における処理と比較して、ステップSA1の前にステップSA10が実行される点で相違する。ステップSA10において、重み変更部3112aは、上方向のコストおよび左方向のコストのウェイトcuおよびclを決定する。また、符号予測部3112における処理は、ステップSA3におけるコストの計算に上記の式(1)を使用する点でも相違する。
(ウェイトの決定条件の例1)
例えば、重み変更部3112aは、対象ブロックの形状に基づいてcuおよびclを変更してよい。この場合において、例えば対象ブロックの形状が正方形である場合には、上方向と左方向とで、対象ブロック内の画素と対象ブロックに隣接する画素との相関に差はないと考えられる。したがって、重み変更部3112aはウェイトをcl = cuとする。例えば重み変更部3112aは、(cl, cu)=(1, 1)に設定する。
例えば、重み変更部3112aは、対象ブロックの形状に基づいてcuおよびclを変更してよい。この場合において、例えば対象ブロックの形状が正方形である場合には、上方向と左方向とで、対象ブロック内の画素と対象ブロックに隣接する画素との相関に差はないと考えられる。したがって、重み変更部3112aはウェイトをcl = cuとする。例えば重み変更部3112aは、(cl, cu)=(1, 1)に設定する。
一方、例えば対象ブロックの形状が縦長の長方形である場合、対象ブロック内の画素と対象ブロックに隣接する画素との相関は、上方向の方が左方向より大きいと考えられる。したがって、この場合には重み変更部3112aはウェイトをcl < cu(cl <= cu)を満たす値に設定する。例えば重み変更部3112aは、(cl, cu)=(1, 3)または(cl,cu)=(1, 2)に設定する。
逆に、例えば対象ブロックの形状が横長の長方形である場合、対象ブロック内の画素と対象ブロックに隣接する画素との相関は、左方向の方が上方向より大きいと考えられる。したがって、この場合には重み変更部3112aはウェイトをcl > cu(cl >= cu)を満たす値に設定する。例えば重み変更部3112aは、(cl, cu)=(3, 1) または(cl,cu)=(2, 1)に設定する。
なお、上記の説明で括弧内に記したように、対象ブロックの形状が長方形である場合にもcl = cuに設定する場合があってもよい。この場合、ある条件では対象ブロックの形状にかかわらずcl = cuにより設定し、別の条件では、上記のように対象ブロックの形状により長方形の場合に、cl < cuまたはcl > cuに設定する。
なお、cuおよびclを具体的にどのような値に設定するかについては当業者が適宜設定すればよい。例えば、ウェイトをcl = cuにする場合、重み変更部3112aは(cl, cu)=(1, 1)に設定してよい。また、ウェイトをcl < cuにする場合、例えば重み変更部3112aは(cl, cu)=(1, 3)または(cl,cu)=(1, 2)に設定してよい。また、ウェイトをcl< cu(cl <= cu)にする場合、例えば重み変更部3112aは(cl, cu)=(1, 3)または(cl,cu)=(1, 2)に設定してよい。後述する他の条件においても同様である。
(ウェイトの決定条件の例2)
また、重み変更部3112aは、対象ブロックのアクティビティに基づいてcuおよびclを変更してもよい。ここで、アクティビティとは、対象ブロックの上端および左端の画素と、対象ブロックに隣接する画素との間での画素値の変化である。アクティビティの具体例としては、例えば
・対象ブロック内差分2乗和:Σ(対象ブロックの画素の画素値 - 対象ブロック内画素値の平均値)^2
・対象ブロック内絶対値差分和:Σabs(対象ブロックの画素の画素値 - 対象ブロック内画素値の平均値)
・隣接画素との絶対値差分和:Σabs((対象ブロック内画素値)-(隣接ブロックの画素の画素値))
・隣接画素との絶対値ラプラシアン和:Σabs((xの画素値<<1)-(x-1での画素値)-(x+1での画素値))
などの値が挙げられる。ここで<<は、左シフトを意味する(<<1は×2と等価である)。またxは対象ブロック内の境界に位置する画素である。
また、重み変更部3112aは、対象ブロックのアクティビティに基づいてcuおよびclを変更してもよい。ここで、アクティビティとは、対象ブロックの上端および左端の画素と、対象ブロックに隣接する画素との間での画素値の変化である。アクティビティの具体例としては、例えば
・対象ブロック内差分2乗和:Σ(対象ブロックの画素の画素値 - 対象ブロック内画素値の平均値)^2
・対象ブロック内絶対値差分和:Σabs(対象ブロックの画素の画素値 - 対象ブロック内画素値の平均値)
・隣接画素との絶対値差分和:Σabs((対象ブロック内画素値)-(隣接ブロックの画素の画素値))
・隣接画素との絶対値ラプラシアン和:Σabs((xの画素値<<1)-(x-1での画素値)-(x+1での画素値))
などの値が挙げられる。ここで<<は、左シフトを意味する(<<1は×2と等価である)。またxは対象ブロック内の境界に位置する画素である。
対象ブロックのアクティビティが高い場合には、
・0でないDCT係数の数が多い
・画素値の分散が大きい
等の場合が考えられる。このような場合には、上述した2次微分仮説に基づく予測では適切な予測ができない虞がある。そこで、重み変更部3112aは、ブロックの上側と左側とでそれぞれアクティビティを算出し、アクティビティが高い側のコストについて、ウェイトを小さくする。具体的には、重み変更部3112aはウェイトを、
・ブロックの上側と左側とで、いずれのアクティビティも同様に高い、または低い場合:cl = cu
・ブロックの左側のアクティビティがブロックの上側のアクティビティより高い場合:cl< cu
・ブロックの上側のアクティビティがブロックの左側のアクティビティより高い場合:cl> cu
に設定する。
・0でないDCT係数の数が多い
・画素値の分散が大きい
等の場合が考えられる。このような場合には、上述した2次微分仮説に基づく予測では適切な予測ができない虞がある。そこで、重み変更部3112aは、ブロックの上側と左側とでそれぞれアクティビティを算出し、アクティビティが高い側のコストについて、ウェイトを小さくする。具体的には、重み変更部3112aはウェイトを、
・ブロックの上側と左側とで、いずれのアクティビティも同様に高い、または低い場合:cl = cu
・ブロックの左側のアクティビティがブロックの上側のアクティビティより高い場合:cl< cu
・ブロックの上側のアクティビティがブロックの左側のアクティビティより高い場合:cl> cu
に設定する。
(ウェイトの決定条件の例3)
また、重み変更部3112aは、対象ブロックにおけるイントラ予測の方向に基づいてcuおよびclを変更してもよい。この場合、重み変更部3112aは、イントラ予測モードの値をイントラ予測パラメータ復号部304から取得すればよい。
また、重み変更部3112aは、対象ブロックにおけるイントラ予測の方向に基づいてcuおよびclを変更してもよい。この場合、重み変更部3112aは、イントラ予測モードの値をイントラ予測パラメータ復号部304から取得すればよい。
図12は、イントラ予測モードの値に対応するイントラ予測の方向を示す図である。図12に示すように、イントラ予測の方向は、イントラ予測モードの2~66までの値に対応して65通り存在する。
イントラ予測モードの値が2~34のいずれかである場合には、イントラ予測において主に左側の画素が参照される。このため、対象ブロック内の画素は、当該対象ブロックの左側に隣接する画素との間で高い相関を有する。したがって、重み変更部3112aはウェイトをcl > cuに設定する。例えば、イントラ予測モードの値が左上方向を示すモード(34)以下であれば、重み変更部3112aは(cl, cu)=(3, 1) または(cl,cu)=(2, 1)に設定する。
一方、イントラ予測モードの値が35~66のいずれかである場合には、イントラ予測において主に上側の画素が参照される。このため、対象ブロック内の画素は、当該対象ブロックの上側に隣接する画素との間で高い相関を有する。したがって、重み変更部3112aはウェイトをcl < cuに設定する。例えば、イントラ予測モードの値が左上方向を示すモード(34)より大きい場合には、重み変更部3112aは(cl, cu)=(1, 3)または(cl,cu)=(1, 2)に設定する。また、イントラ予測モードの値が上記のいずれとも異なる場合には、重み変更部3112aはウェイトをcl = cuに設定する。例えば、イントラ予測モードの値が左下方向を示すモード(2)以下であれば、重み変更部3112aは(cl, cu)=(1, 1)に設定する。
重み変更部3112aは、上記の例以外の条件に基づいてウェイトを設定してもよい。その場合にも、上側と左側とのうち、より隣接画素との相関が高いと考えられる側のウェイトを、より隣接画素との相関が低いと考えられる側のウェイトより大きくすることが好ましい。
また、重み変更部3112aは、下記のようにして、イントラ予測モードの値が垂直イントラ予測モードpredModeV、および、水平イントラ予測モードpredModeHの周囲にあるか否か(thRange以下の近さであるか)でウェイトの値を決定してもよい。
|intraPredModeC- predModeV| < thRangeの場合cl < cu、
|intraPredModeC- predModeH| < thRangeの場合cl > cu、
それ以外の場合cl = cu。
|intraPredModeC- predModeH| < thRangeの場合cl > cu、
それ以外の場合cl = cu。
なお、図12に示したように、predModeV= 50(垂直方向)、predModeH = 18(水平方向)、thRange=5である。また、predModeLU =34は左上対角方向である。なお、イントラ予測モード番号および範囲thRangeは、上記(50, 18, 34、5)に限定されない。
(画像符号化装置の構成)
次に、本実施形態に係る画像符号化装置11の構成について説明する。図4は、本実施形態に係る画像符号化装置11の構成を示すブロック図である。画像符号化装置11は、予測画像生成部101、減算部102、DCT・量子化部103、エントロピー符号化部104、逆量子化・逆DCT部105、加算部106、ループフィルタ107、予測パラメータメモリ(予測パラメータ記憶部、フレームメモリ)108、参照ピクチャメモリ(参照画像記憶部、フレームメモリ)109、符号化パラメータ決定部110、予測パラメータ符号化部111を含んで構成される。予測パラメータ符号化部111は、インター予測パラメータ符号化部112及びイントラ予測パラメータ符号化部113を含んで構成される。
次に、本実施形態に係る画像符号化装置11の構成について説明する。図4は、本実施形態に係る画像符号化装置11の構成を示すブロック図である。画像符号化装置11は、予測画像生成部101、減算部102、DCT・量子化部103、エントロピー符号化部104、逆量子化・逆DCT部105、加算部106、ループフィルタ107、予測パラメータメモリ(予測パラメータ記憶部、フレームメモリ)108、参照ピクチャメモリ(参照画像記憶部、フレームメモリ)109、符号化パラメータ決定部110、予測パラメータ符号化部111を含んで構成される。予測パラメータ符号化部111は、インター予測パラメータ符号化部112及びイントラ予測パラメータ符号化部113を含んで構成される。
予測画像生成部101は画像Tの各ピクチャについて、そのピクチャを分割した領域である符号化ユニットCU毎に予測ユニットPUの予測画像Pを生成する。ここで、予測画像生成部101は、予測パラメータ符号化部111から入力された予測パラメータに基づいて参照ピクチャメモリ109から復号済のブロックを読み出す。予測パラメータ符号化部111から入力された予測パラメータとは、例えばインター予測の場合、動きベクトルである。予測画像生成部101は、対象PUを起点として動きベクトルが示す参照画像上の位置にあるブロックを読み出す。またイントラ予測の場合、予測パラメータとは例えばイントラ予測モードである。イントラ予測モードで使用する隣接PUの画素値を参照ピクチャメモリ109から読み出し、PUの予測画像Pを生成する。予測画像生成部101は、読み出した参照ピクチャブロックについて複数の予測方式のうちの1つの予測方式を用いてPUの予測画像Pを生成する。予測画像生成部101は、生成したPUの予測画像Pを減算部102に出力する。
なお、予測画像生成部101は、既に説明した予測画像生成部308と同じ動作である。例えば、図6は、予測画像生成部101に含まれるインター予測画像生成部1011の構成を示す概略図である。インター予測画像生成部1011は、動き補償部10111、重み予測部10112を含んで構成される。動き補償部10111および重み予測部10112については、上述の動き補償部3091、重み予測部3094のそれぞれと同様の構成であるためここでの説明を省略する。
予測画像生成部101は、予測パラメータ符号化部から入力されたパラメータを用いて、参照ピクチャメモリから読み出した参照ブロックの画素値をもとにPUの予測画像Pを生成する。予測画像生成部101で生成した予測画像は減算部102、加算部106に出力される。
減算部102は、予測画像生成部101から入力されたPUの予測画像Pの信号値を、画像Tの対応するPUの画素値から減算して、残差信号を生成する。減算部102は、生成した残差信号をDCT・量子化部103に出力する。
DCT・量子化部103は、減算部102から入力された残差信号についてDCTを行い、DCT係数を算出する。DCT・量子化部103は、算出したDCT係数を量子化して量子化係数を求める。DCT・量子化部103は、求めた量子化係数をエントロピー符号化部104及び逆量子化・逆DCT部105に出力する。
エントロピー符号化部104には、DCT・量子化部103から量子化係数が入力され、予測パラメータ符号化部111から符号化パラメータが入力される。入力される符号化パラメータには、例えば、参照ピクチャインデックスrefIdxLX、予測ベクトルインデックスmvp_LX_idx、差分ベクトルmvdLX、予測モードpredMode、及びマージインデックスmerge_idx等の符号がある。
エントロピー符号化部104は、入力された量子化係数と符号化パラメータをエントロピー符号化して符号化ストリームTeを生成し、生成した符号化ストリームTeを外部に出力する。
逆量子化・逆DCT部105(符号予測装置)は、DCT・量子化部103から入力された量子化係数を逆量子化してDCT係数を求める。逆量子化・逆DCT部105は、求めたDCT係数について逆DCTを行い、残差信号を算出する。逆量子化・逆DCT部105は、算出した残差信号を加算部106に出力する。逆量子化・逆DCT部105の具体的な構成については後述する。
加算部106は、予測画像生成部101から入力されたPUの予測画像Pの信号値と逆量子化・逆DCT部105から入力された残差信号の信号値を画素毎に加算して、復号画像を生成する。加算部106は、生成した復号画像をループフィルタ107に出力する。
ループフィルタ107は加算部106が生成した復号画像に対し、デブロッキングフィルタ、サンプル適応オフセット(SAO)、適応ループフィルタ(ALF)を施す。
予測パラメータメモリ108は、符号化パラメータ決定部110が生成した予測パラメータを、符号化対象のピクチャ及びCU毎に予め定めた位置に記憶する。
参照ピクチャメモリ109は、ループフィルタ107が生成した復号画像を、符号化対象のピクチャ及びCU毎に予め定めた位置に記憶する。
符号化パラメータ決定部110は、符号化パラメータの複数のセットのうち、1つのセットを選択する。符号化パラメータとは、上述した予測パラメータやこの予測パラメータに関連して生成される符号化の対象となるパラメータである。予測画像生成部101は、これらの符号化パラメータのセットの各々を用いてPUの予測画像Pを生成する。
符号化パラメータ決定部110は、複数のセットの各々について情報量の大きさと符号化誤差を示すコスト値を算出する。コスト値は、例えば、符号量と二乗誤差に係数λを乗じた値との和である。符号量は、量子化誤差と符号化パラメータをエントロピー符号化して得られる符号化ストリームTeの情報量である。二乗誤差は、減算部102において算出された残差信号の残差値の二乗値についての画素間の総和である。係数λは、予め設定されたゼロよりも大きい実数である。符号化パラメータ決定部110は、算出したコスト値が最小となる符号化パラメータのセットを選択する。これにより、エントロピー符号化部104は、選択した符号化パラメータのセットを符号化ストリームTeとして外部に出力し、選択されなかった符号化パラメータのセットを出力しない。符号化パラメータ決定部110は決定した符号化パラメータを予測パラメータメモリ108に記憶する。
予測パラメータ符号化部111は、符号化パラメータ決定部110から入力されたパラメータから、符号化するための形式を導出し、エントロピー符号化部104に出力する。符号化するための形式の導出とは、例えば動きベクトルと予測ベクトルから差分ベクトルを導出することである。また予測パラメータ符号化部111は、符号化パラメータ決定部110から入力されたパラメータから予測画像を生成するために必要なパラメータを導出し、予測画像生成部101に出力する。予測画像を生成するために必要なパラメータとは、例えばサブブロック単位の動きベクトルである。
インター予測パラメータ符号化部112は、符号化パラメータ決定部110から入力された予測パラメータに基づいて、差分ベクトルのようなインター予測パラメータを導出する。インター予測パラメータ符号化部112は、予測画像生成部101に出力する予測画像の生成に必要なパラメータを導出する構成として、インター予測パラメータ復号部303(図5等、参照)がインター予測パラメータを導出する構成と一部同一の構成を含む。インター予測パラメータ符号化部112の構成については、後述する。
イントラ予測パラメータ符号化部113は、符号化パラメータ決定部110から入力されたイントラ予測モードIntraPredModeから、符号化するための形式(例えばMPM_idx、rem_intra_luma_pred_mode等)を導出する。
(逆量子化・逆DCT部105)
図7の(b)は、画像符号化装置11における逆量子化・逆DCT部105の構成を示すブロック図である。図7の(b)に示すように、逆量子化・逆DCT部105は、逆量子化部1051、符号予測部1052、誤差算出部1053、および逆DCT部1054を備える。符号予測部1052は、重み変更部1052aを備える。
図7の(b)は、画像符号化装置11における逆量子化・逆DCT部105の構成を示すブロック図である。図7の(b)に示すように、逆量子化・逆DCT部105は、逆量子化部1051、符号予測部1052、誤差算出部1053、および逆DCT部1054を備える。符号予測部1052は、重み変更部1052aを備える。
逆量子化部1051は、DCT・量子化部103から入力された量子化係数を逆量子化してDCT係数を求める。符号予測部1052は、符号予測部3112と同様に、DCT係数を用いてDCT係数の符号を予測する。誤差算出部1053は、符号予測部1052が予測したDCT係数の符号と、本来のDCT係数の符号とを比較し、符号予測誤差を算出する。誤差算出部1053は、具体的には例えば
・予測したDCT係数の符号と本来のDCT係数の符号とが一致:0
・予測したDCT係数の符号と本来のDCT係数の符号とが不一致:1
とする符号予測誤差を算出する。
・予測したDCT係数の符号と本来のDCT係数の符号とが一致:0
・予測したDCT係数の符号と本来のDCT係数の符号とが不一致:1
とする符号予測誤差を算出する。
誤差算出部1053は、上記処理による符号予測誤差を、予測符号と本来の符号のXORを用いることでも算出することができる。
符号予測誤差 = 予測符号 XOR 符号
逆DCT部1054は、DCT係数について逆DCTを行い、予測誤差を算出する。予測誤差は上述した通り加算部106へ出力される。符号予測誤差はエントロピー符号化部104へ出力される。
逆DCT部1054は、DCT係数について逆DCTを行い、予測誤差を算出する。予測誤差は上述した通り加算部106へ出力される。符号予測誤差はエントロピー符号化部104へ出力される。
逆量子化部1051、符号予測部1052、重み変更部1052a、および逆DCT部1054については、それぞれ逆量子化部3111、符号予測部3112、重み変更部3112a、および逆DCT部3114と同じであるため、ここでは説明を省略する。
なお、上述した実施形態における画像符号化装置11、および/または画像復号装置31の一部、例えば、エントロピー復号部301、予測パラメータ復号部302、ループフィルタ305、予測画像生成部308、逆量子化・逆DCT部311、加算部312、予測画像生成部101、減算部102、DCT・量子化部103、エントロピー符号化部104、逆量子化・逆DCT部105、ループフィルタ107、符号化パラメータ決定部110、および予測パラメータ符号化部111をコンピュータで実現するようにしても良い。その場合、この制御機能を実現するためのプログラムをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行することによって実現しても良い。なお、ここでいう「コンピュータシステム」とは、画像符号化装置11、画像復号装置31のいずれかに内蔵されたコンピュータシステムであって、OSや周辺機器等のハードウェアを含むものとする。また、「コンピュータ読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM、CD-ROM等の可搬媒体、コンピュータシステムに内蔵されるハードディスク等の記憶装置のことをいう。さらに「コンピュータ読み取り可能な記録媒体」とは、インターネット等のネットワークや電話回線等の通信回線を介してプログラムを送信する場合の通信線のように、短時間、動的にプログラムを保持するもの、その場合のサーバやクライアントとなるコンピュータシステム内部の揮発性メモリのように、一定時間プログラムを保持しているものも含んでも良い。また上記プログラムは、前述した機能の一部を実現するためのものであっても良く、さらに前述した機能をコンピュータシステムにすでに記録されているプログラムとの組み合わせで実現できるものであっても良い。
(逆量子化・逆DCT部311および105の効果)
以上の通り、本実施形態において、逆量子化・逆DCT部311および105において、符号予測部3112および1052はそれぞれ、上方向のコストおよび左方向のコストに付与する重みを変更する重み変更部3112aまたは1052aを備える。重み変更部3112aおよび1052aは、
・対象ブロックの形状
・対象ブロックと、当該対象ブロックの上および左の隣接ブロックとの境界画素間での画素値の変動
・対象ブロックにおけるイントラ予測の方向
等の条件に基づいて、上記の重みを設定する。したがって、符号予測部3112および1052は、高い精度でDCT係数の符号を予測することができる。
以上の通り、本実施形態において、逆量子化・逆DCT部311および105において、符号予測部3112および1052はそれぞれ、上方向のコストおよび左方向のコストに付与する重みを変更する重み変更部3112aまたは1052aを備える。重み変更部3112aおよび1052aは、
・対象ブロックの形状
・対象ブロックと、当該対象ブロックの上および左の隣接ブロックとの境界画素間での画素値の変動
・対象ブロックにおけるイントラ予測の方向
等の条件に基づいて、上記の重みを設定する。したがって、符号予測部3112および1052は、高い精度でDCT係数の符号を予測することができる。
(変形例)
上述した実施形態では、符号予測部および重み変更部は、画像復号装置31の逆量子化・逆DCT部311、または画像符号化装置11の逆量子化・逆DCT部105に備えられていた。しかし、符号予測部および重み変更部は、画像符号化装置11のDCT・量子化部103(符号予測装置)に備えられていてもよい。
上述した実施形態では、符号予測部および重み変更部は、画像復号装置31の逆量子化・逆DCT部311、または画像符号化装置11の逆量子化・逆DCT部105に備えられていた。しかし、符号予測部および重み変更部は、画像符号化装置11のDCT・量子化部103(符号予測装置)に備えられていてもよい。
図7の(c)は、本実施形態の変形例に係るDCT・量子化部103の構成を示すブロック図である。図7に示すように、本変形例のDCT・量子化部103は、DCT部1031、量子化部1032、逆量子化部1033、符号予測部1034、および誤差修正部1035を備える。符号予測部1034は、重み変更部1034a(重み設定部)を備える。
DCT部1031は、減算部102から入力された残差信号についてDCTを行い、DCT係数を算出する。量子化部1032は、DCT部1031が算出したDCT係数を量子化して量子化係数を求める。逆量子化部1033は、量子化部1032が求めた量子化係数を逆量子化してDCT係数を算出する。符号予測部1034は、符号予測部1052、3112と同様に、DCT係数を用いてDCT係数の符号を予測する。誤差修正部1035は、符号予測部1034が予測した予測符号と、本来のDCT係数の符号とを比較し、符号予測誤差を算出する。重み変更部1034aは、符号予測部1034が算出する、上方向のコストに付与するウェイトcuおよび左方向のコストに付与するウェイトclのそれぞれを変更する。
このように、符号予測部1034および重み変更部1034aが画像符号化装置11のDCT・量子化部103に備えられている場合にも、符号予測部1034は高い精度でDCT係数の符号を予測することができる。
また、本実施形態におけるDCT部および逆DCT部(符号省略)のそれぞれは、DCT以外の変換方法(例えばDST(Discrete Sine Transform)、KLT(Karhuen Loeve Transform)、または非分離変換など)を用いて変換または逆変換を行う変換部または逆変換部であってもよいし、複数の変換(例えば、コア変換とセカンダリ変換との2回の変換)を行って変換を行う変換部または逆変換部であってもよい。
〔実施形態2〕
本発明の別実施形態について、図13~15に基づいて説明する。上述した通り、実施形態1の符号予測部3112は、2次微分仮説に基づいてコストの計算を行う。しかし、対象ブロックの条件によっては、2次微分仮説が成り立たず、そのためにコストの計算結果が不適切なものとなることが考えられる。そこで、本実施形態の符号予測部3112Aは、2次微分仮説の他に、後述する1次微分仮説を用いてコストを算出する。
本発明の別実施形態について、図13~15に基づいて説明する。上述した通り、実施形態1の符号予測部3112は、2次微分仮説に基づいてコストの計算を行う。しかし、対象ブロックの条件によっては、2次微分仮説が成り立たず、そのためにコストの計算結果が不適切なものとなることが考えられる。そこで、本実施形態の符号予測部3112Aは、2次微分仮説の他に、後述する1次微分仮説を用いてコストを算出する。
図13の(a)は、本実施形態の画像復号装置が備える逆量子化・逆DCT部311A(符号予測装置)の構成を示すブロック図である。図13の(a)に示すように、逆量子化・逆DCT部311Aは、符号予測部3112の代わりに符号予測部3112Aを備える。符号予測部3112Aは、符号予測部3112の構成に加えて仮説決定部3112bを備える。
仮説決定部3112bは、部分復号画像の上方向のコストおよび左方向のコストのそれぞれについて、1次微分仮説および2次微分仮説のいずれに基づいて算出するかを決定する。符号予測部3112Aは、仮説決定部3112bが決定した仮説に基づいてコストを算出する。
また、図13の(b)は、本実施形態の画像符号化装置が備える逆量子化・逆DCT部105A(符号予測装置)の構成を示すブロック図である。図13の(b)に示すように、逆量子化・逆DCT部105Aは、符号予測部1052の代わりに符号予測部1052Aを備える。符号予測部1052Aは、符号予測部1052の構成に加えて仮説決定部1052bを備える。
また、図13の(c)は、本実施形態に係るDCT・量子化部103A(符号予測装置)の構成を示すブロック図である。図13の(c)に示すように、DCT・量子化部103Aは、符号予測部1034の代わりに符号予測部1034Aを備える。符号予測部1034Aは、符号予測部1034の構成に加えて仮説決定部1034bを備える。
符号予測部1052Aおよび仮説決定部1052b、ならびに符号予測部1034Aおよび仮説決定部1034bの構成は、それぞれ符号予測部3112Aおよび仮説決定部3112bと同様である。このため、以下では符号予測部3112Aおよび仮説決定部3112bについてのみ説明する。
図15は、本実施形態に係る符号予測部3112Aにおける処理の流れを示すフローチャートである。図15に示すように、符号予測部3112Aにおける処理は、図8に示した符号予測と比較して、ステップSA1の前に仮説を決定するステップ(SA20)を実行する点で相違する。また、ステップSA3におけるコストの計算は、後述するようにステップSA20で決定された仮説に基づいて実行される点で相違する。
(1次微分仮説)
本明細書において、1次微分仮説とは、DCT係数(変換係数)の符号が正しければ、隣接する画素(近隣画素)同士の画素値が変化しないという仮説である。つまり、1次微分である勾配が0となる、との仮説である。具体的には、1次微分仮説においてはcostUおよびcostLはそれぞれ以下の式
により表される。1次微分仮説においては、隣接する画素同士の画素値が等しければコストは0になり、隣接する画素同士の画素値の差が大きくなるにつれてコストが増大する。なお、1次微分仮説では、隣接ブロックの境界画素の値p1と部分復号画像の値p0との誤差を以下の式
cost_p0 = |p1 -p0|
によって算出し、対象ブロックの上および左境界の部分復号画像p0全体について当該誤差の和をとってもよい。
本明細書において、1次微分仮説とは、DCT係数(変換係数)の符号が正しければ、隣接する画素(近隣画素)同士の画素値が変化しないという仮説である。つまり、1次微分である勾配が0となる、との仮説である。具体的には、1次微分仮説においてはcostUおよびcostLはそれぞれ以下の式
cost_p0 = |p1 -p0|
によって算出し、対象ブロックの上および左境界の部分復号画像p0全体について当該誤差の和をとってもよい。
(仮説の決定条件の例1)
仮説決定部3112bは、例えば対象ブロックのアクティビティに応じて、部分復号画像の上方向のコストおよび左方向のコストのそれぞれについて1次微分仮説または2次微分仮説のいずれに基づいて算出するかを決定してよい。アクティビティについては、実施形態1で説明した通りである。アクティビティが高い場合には、0でないDCT係数の数が多い、または画素値の分散が大きいため、2次微分仮説が成り立たなくなる。したがって、アクティビティが高い場合には、仮説決定部3112bは、コストの算出に用いる仮説を1次微分仮説に決定する。
仮説決定部3112bは、例えば対象ブロックのアクティビティに応じて、部分復号画像の上方向のコストおよび左方向のコストのそれぞれについて1次微分仮説または2次微分仮説のいずれに基づいて算出するかを決定してよい。アクティビティについては、実施形態1で説明した通りである。アクティビティが高い場合には、0でないDCT係数の数が多い、または画素値の分散が大きいため、2次微分仮説が成り立たなくなる。したがって、アクティビティが高い場合には、仮説決定部3112bは、コストの算出に用いる仮説を1次微分仮説に決定する。
図16は、図15に示したフローチャートにおける仮説を決定するステップ(SA20)の一例を示すフローチャートである。図16に示す処理においては、仮説決定部3112bは、まず対象ブロックの上側のアクティビティActUが所定の閾値Thより大きいか否か判定する(SB1)。ActU > Thである場合(SB1でY)、仮説決定部3112bは上方向のコストの算出に用いる仮説を1次微分仮説に決定し、符号予測部3112は1次微分仮説に基づいてcostUを導出する(SB2)。一方、ActU> Thでない場合(SB1でN)、仮説決定部3112bは上方向のコストの算出に用いる仮説を2次微分仮説に決定し、符号予測部3112は2次微分仮説に基づいてcostUを導出する(SB3)。
次に、仮説決定部3112bは、対象ブロックの左側のアクティビティActLが所定の閾値Thより大きいか否か判定する(SB4)。ActL> Thである場合(SB4でY)、仮説決定部3112bは左方向のコストの算出に用いる仮説を1次微分仮説に決定し、符号予測部3112は1次微分仮説に基づいてcostLを導出する(SB5)。一方、ActL> Thでない場合(SB4でN)、仮説決定部3112bは左方向のコストの算出に用いる仮説を2次微分仮説に決定し、符号予測部3112は2次微分仮説に基づいてcostLを導出する(SB6)。
その後、符号予測部3112は、既に算出したcostUおよびcostLを用いて、実施形態1と同様、
cost = costU + costL
の式により、部分復号画像のコストを算出する(SB7)。また、このとき、実施形態1と同様にしてcostUおよびcostLのそれぞれに重み付けをしてもよい。
cost = costU + costL
の式により、部分復号画像のコストを算出する(SB7)。また、このとき、実施形態1と同様にしてcostUおよびcostLのそれぞれに重み付けをしてもよい。
(仮説の決定条件の例2)
また、仮説決定部3112bは、対象ブロックのサイズに応じて、部分復号画像の上方向のコストおよび左方向のコストのそれぞれについて1次微分仮説および2次微分仮説のいずれに基づいて算出するかを決定してもよい。対象ブロックのサイズが小さい場合には、画像のテクスチャが細かいと考えられるため、隣接する画素間で画素値が変化しにくいと考えられる。したがって、対象ブロックのサイズが小さい場合には、仮説決定部3112bは、コストの算出に用いる仮説を1次微分仮説に決定する。
また、仮説決定部3112bは、対象ブロックのサイズに応じて、部分復号画像の上方向のコストおよび左方向のコストのそれぞれについて1次微分仮説および2次微分仮説のいずれに基づいて算出するかを決定してもよい。対象ブロックのサイズが小さい場合には、画像のテクスチャが細かいと考えられるため、隣接する画素間で画素値が変化しにくいと考えられる。したがって、対象ブロックのサイズが小さい場合には、仮説決定部3112bは、コストの算出に用いる仮説を1次微分仮説に決定する。
(実施形態2の効果)
上述した通り、本実施形態の符号予測部3112Aは、対象ブロックの条件に基づいて1次微分仮説および2次微分仮説のいずれを用いてコストを算出するか決定することで、DCT変換係数の符号予測の精度を向上させることができる。
上述した通り、本実施形態の符号予測部3112Aは、対象ブロックの条件に基づいて1次微分仮説および2次微分仮説のいずれを用いてコストを算出するか決定することで、DCT変換係数の符号予測の精度を向上させることができる。
(変形例)
図14の(a)および(b)は、本実施形態の変形例に係る逆量子化・逆DCT部の構成を示すブロック図であって、(a)は画像符号化装置における逆量子化・逆DCT部311Bの構成、(b)は画像復号装置における逆量子化・逆DCT部105Bの構成をそれぞれ示す。また、図14の(c)は、本実施形態の変形例に係るDCT・量子化部103Bの構成を示すブロック図である。
図14の(a)および(b)は、本実施形態の変形例に係る逆量子化・逆DCT部の構成を示すブロック図であって、(a)は画像符号化装置における逆量子化・逆DCT部311Bの構成、(b)は画像復号装置における逆量子化・逆DCT部105Bの構成をそれぞれ示す。また、図14の(c)は、本実施形態の変形例に係るDCT・量子化部103Bの構成を示すブロック図である。
図14の(a)に示すように、逆量子化・逆DCT部311Bは、符号予測部3112Aの代わりに符号予測部3112Bを備える点で逆量子化・逆DCT部311Aと相違する。符号予測部3112Bは、重み変更部3112aを備えない点で符号予測部3112Aと相違する。
同様に、図14の(b)および(c)に示すように、逆量子化・逆DCT部105BおよびDCT・量子化部103Bは、それぞれ符号予測部が重み変更部を備えない点で逆量子化・逆DCT部105AおよびDCT・量子化部103Aと相違する。以下では、符号予測部3112Bについてのみ説明する。
上述した例では、符号予測部3112Aは、実施形態1の符号予測部3112と同様に重み変更部3112aを備え、1次微分仮説または2次微分仮説に基づいて算出した上方向のコストおよび左方向のコストに、さらに実施形態1と同様に重み付けを行った。一方、本実施形態の変形例に係る符号予測部3112Bは、図14の(a)に示すように、重み変更部3112aを備えず、仮説決定部3112bのみを備えていてもよい。この場合、仮説決定部3112bが決定した仮説に基づいて、上方向のコストおよび左方向のコストが算出された後、当該上方向のコストおよび左方向のコストの和が部分復号画像のコストとなる。
また、上述した実施形態では、仮説決定部3112bは、1次微分仮説および2次微分仮説のうちいずれかを選択した。しかし、本実施形態の仮説決定部3112bは、1次微分仮説および2次微分仮説に加えて、さらに別の仮説を選択肢としてもよい。
図10の(c)は、1次微分仮説と2次微分仮説と間の仮説について説明するための図である。以下の説明では、上記の仮説について、中間仮説と称する。
中間仮説について以下に説明する。対象ブロックの上端または左端の画素の画素値をp0として、対象ブロックの上または左隣接ブロックにおけるp0の隣接画素を近い方からp1、p2とする。このとき、中間仮説においては、DCT係数の符号が正しければ、p0とp1の画素値の差(勾配)は、p1とp2の画素値の差(勾配)の半分に近くなる。
上記の式において、図10の(c)に実線で示すように、p0とp1の画素値の差(勾配)がp1とp2の画素値の差(勾配)の半分であれば、コストは0となる。一方、例えば図10の(c)に破線で示すように、p0とp1の画素値の差(勾配)がp1とp2の画素値の差(勾配)の半分とは異なる値であれば、コストは0より大きい値となる。
なお、上記コストは、境界近傍の各画素p0でのコストcost_p0を、上方向および左方向の部分復号画像全体について和をとることで導出できる。コストcost_p0は下記式で導出できる。
cost_p0 = |p1 + wk *(p1 - p2) - p0|
ここでwkは、勾配にかけるウェイトである。wk = 0.5の場合には、上述の数式で示したように>>1のシフト関数で導出できる。
ここでwkは、勾配にかけるウェイトである。wk = 0.5の場合には、上述の数式で示したように>>1のシフト関数で導出できる。
ここで、p0は、境界近傍の部分復号画像の値(予測符号により復号された画素値)、p1は、復号した上方向もしくは左方向の隣接ブロックにおいてp0に隣接する画素。p2は、p1に隣接する画素である。
なお、上記、各画素のコストcost_p0は、(i)境界付近の2画素p1, p2の勾配である「p1 - p2」にウェイトwkを乗じて小さくした値を、境界画素の値p1に加算して得られる部分復号画像の予測値「p1 + wk *(p1 - p2)」と、(ii)部分復号画像の値p0と、の誤差を測定していることと等しい。なお、ウェイトwkは0.5によらず0.25でも良い。この場合、シフト量としては>>2となる。
cost_p0 = |p1 + (p1 - p2)>>2 - p0|
また、ウェイトwk=M/N(例えばM=2,N=3)を用いる場合には、
cost_p0 = |p1 + M/N*(p1 - p2) - p0|
であるが、全体にNを乗じることで、以下の等価の式を用いることができる。
また、ウェイトwk=M/N(例えばM=2,N=3)を用いる場合には、
cost_p0 = |p1 + M/N*(p1 - p2) - p0|
であるが、全体にNを乗じることで、以下の等価の式を用いることができる。
cost_p0 = |N*p1 + M*(p1 - p2) - N*p0|
なお、シフト演算を用いる場合には、負の値を考慮して、p1 - p2が負の場合には、一度正の値(絶対値)に変換してからシフトを行い、最後に符号を付加する方法(負の場合には-1をかける)を用いてもよい。
なお、シフト演算を用いる場合には、負の値を考慮して、p1 - p2が負の場合には、一度正の値(絶対値)に変換してからシフトを行い、最後に符号を付加する方法(負の場合には-1をかける)を用いてもよい。
本実施形態の仮説決定部3112bは、例えば1次微分仮説、2次微分仮説、および中間仮説の3種類の仮説のうちいずれかを、対象ブロックのコストを算出するための仮説として選択してもよい。または、仮説決定部3112bは、(i)1次微分仮説または2次微分仮説のいずれかと、(ii)中間仮説と、の2種類の仮説のうちいずれかを、対象ブロックのコストを算出するための仮説として選択してもよい。
また、上述した例では仮説決定部3112bはコストの算出に用いる仮説を1次微分仮説および2次微分仮説のいずれか一方に決定した。符号予測部3112Aは、仮説決定部3112bが決定したいずれか一方の仮説に基づいてコストの算出を行った。しかし、本実施形態の符号予測部3112Aは、仮説決定部3112bを備えず、1次微分仮説および2次微分仮説の両方に基づいてコストを算出してもよい。
例えば、上方向のコストcostUおよび左方向のコストcostLはそれぞれ、1次微分仮説に基づいて算出されるコスト(第1コスト)と、2次微分仮説に基づいて算出されるコスト(第2コスト)との線形和で表されてよい。さらにこの場合に、符号予測部3112Aは、1次微分仮説に基づいて算出されるコストおよび2次微分仮説に基づいて算出されるコストのそれぞれに重み付けをしてコストを算出してもよい。
〔実施形態3〕
本発明の別実施形態について、図17および図18に基づいて説明する。一般に、DCT係数の符号を予測する場合、符号を予測するDCT係数の数が多いほど符号量を削減することができる。しかし一方で、符号を予測するDCT係数の数が多くなればコストの計算に要する時間が多くなる。このため、従来の符号予測においては、予測対象とするDCT係数の数は1ブロック当たり4個までであった。また、例えば高周波成分のDCT係数は予測が困難な場合が多く、そのようなDCT係数を予測しようとすれば逆に符号量の削減効率が低下する虞がある。
本発明の別実施形態について、図17および図18に基づいて説明する。一般に、DCT係数の符号を予測する場合、符号を予測するDCT係数の数が多いほど符号量を削減することができる。しかし一方で、符号を予測するDCT係数の数が多くなればコストの計算に要する時間が多くなる。このため、従来の符号予測においては、予測対象とするDCT係数の数は1ブロック当たり4個までであった。また、例えば高周波成分のDCT係数は予測が困難な場合が多く、そのようなDCT係数を予測しようとすれば逆に符号量の削減効率が低下する虞がある。
そこで、本実施形態では、比較的予測が容易な低周波成分のDCT係数を、サブブロックの数に応じた所定の数だけ予測する符号予測部について説明する。
図17は、本実施形態の符号予測部における処理の流れを示すフローチャートである。本実施形態の符号予測部における処理は、図8に示した符号予測と比較して、ステップSA1の前に予測対象を決定するステップ(SA30)を実行する点で相違する。
(予測対象の決定)
図18の(a)は、変換サイズが4×4である場合における予測の対象範囲を示す図である。図18の(b)は、変換サイズが8×8である場合における予測の対象範囲を示す図である。図18の(c)は、変換サイズが16×16である場合における予測の対象範囲を示す図である。図18の(a)~(c)においては、それぞれの正方形が4×4サブブロックを示し、色を付されたサブブロックが予測の対象となるサブブロックを示す。図18の(a)~(c)を参照して、ステップSA30における予測対象の決定について説明する。
図18の(a)は、変換サイズが4×4である場合における予測の対象範囲を示す図である。図18の(b)は、変換サイズが8×8である場合における予測の対象範囲を示す図である。図18の(c)は、変換サイズが16×16である場合における予測の対象範囲を示す図である。図18の(a)~(c)においては、それぞれの正方形が4×4サブブロックを示し、色を付されたサブブロックが予測の対象となるサブブロックを示す。図18の(a)~(c)を参照して、ステップSA30における予測対象の決定について説明する。
本実施形態の符号予測部は、対象ブロックにおけるサブブロックの位置を示すサブブロックアドレスを(xc,yc)(xc=0, 1, ...;yc=0, 1, ...)として、xcおよびycの和が所定の値以下であるサブブロックの変換係数について符号の予測を行う。具体的には、対象ブロックの変換サイズをN×Nとした場合、符号予測部は例えば
xc + yc ≦ log2N- 2
を満たすサブブロックの変換係数を符号の予測対象とする。サブブロックのサイズが4x4の場合、サブブロックアドレス(xc,yc)は、変換係数の位置(xS, yS)とすると、以下の式
xc = xS >> 2
yc = yS >> 2
で導出できる。
xc + yc ≦ log2N- 2
を満たすサブブロックの変換係数を符号の予測対象とする。サブブロックのサイズが4x4の場合、サブブロックアドレス(xc,yc)は、変換係数の位置(xS, yS)とすると、以下の式
xc = xS >> 2
yc = yS >> 2
で導出できる。
上記の式によれば、例えば変換サイズが4×4である場合には、図18の(a)に示すように、サブブロックアドレスが(0,0)であるサブブロックが予測の対象となる。また、変換サイズが8×8である場合には、図18の(b)に示すように、サブブロックアドレスが(0,0)、(1,0)、および(0,1)であるサブブロックが予測の対象となる。一方で、サブブロックアドレスが(1,1)であるサブブロックは、上記の式を満たさないため、予測の対象とならない。また、変換サイズが16×16である場合には、図18の(c)に示すように、サブブロックアドレスが(0,0)、(1,0)、(0,1)、(2,0)、(1,1)、および(0,2)であるサブブロックが予測の対象となり、それ以外のサブブロックは予測の対象とならない。
一般に、低周波成分のサブブロックにおけるDCT係数の方が、高周波成分のサブブロックにおけるDCT係数より、隣接画素との連続性に寄与する。このため、低周波成分のDCT係数の方が、高周波成分のDCT係数と比較して予測が容易である。本実施形態の符号予測部においては、予測の対象とするDCT係数を、予測が容易な低周波成分のサブブロックにおけるものに限定することで、処理時間の増加を抑制し、かつ符号量を削減することができる。
なお、符号予測部は、上記の式とは異なる式を満たすサブブロックについて符号の予測を行ってもよい。符号予測部は、例えば
xc + yc ≦ 1
または
xc + yc ≦ 2
等の式を満たす範囲のサブブロックについて符号の予測を行ってもよい。
xc + yc ≦ 1
または
xc + yc ≦ 2
等の式を満たす範囲のサブブロックについて符号の予測を行ってもよい。
(変形例)
実施形態3では、予測の対象とするDCT係数を、予測が容易な低周波成分のサブブロックにおけるものに限定する符号予測部について説明した。以下に、実施形態3の変形例として、予測の対象とするDCT係数を、サイズの大きなサブブロックのDCT係数に限定することで、処理時間の増加を抑制し、かつ符号量を削減する符号予測部について説明する。
実施形態3では、予測の対象とするDCT係数を、予測が容易な低周波成分のサブブロックにおけるものに限定する符号予測部について説明した。以下に、実施形態3の変形例として、予測の対象とするDCT係数を、サイズの大きなサブブロックのDCT係数に限定することで、処理時間の増加を抑制し、かつ符号量を削減する符号予測部について説明する。
本変形例では、図17のステップSA30において、対象とするサブブロックの変換サイズをN×Nとした場合、
N+N > THSIZE
を満たすサブブロックを予測の対象とする。つまり、変換の水平および垂直方向の和が所定の閾値THSIZEより大きければ当該サブブロックを予測の対象とし、そうでなければ当該サブブロックを予測の対象としない。例えばTHSIZE=16である。
N+N > THSIZE
を満たすサブブロックを予測の対象とする。つまり、変換の水平および垂直方向の和が所定の閾値THSIZEより大きければ当該サブブロックを予測の対象とし、そうでなければ当該サブブロックを予測の対象としない。例えばTHSIZE=16である。
一般に、変換サイズの大きなサブブロックは平坦であるか、画素の変化が小さいブロックであるため、隣接画素との連続性が高い。そのため、変換サイズの大きなサブブロックの方が変換サイズの小さなサブブロックより、隣接ブロックとの連続性を利用した符号予測が容易である。本実施形態の変形例の符号予測部においては、符号予測の対象とするDCT係数を変換サイズの大きなサブブロックに限定することで、処理時間の増加を抑制し、かつ符号量を削減することができる。
また、以下に、別の変形例として、予測の対象とするDCT係数を、イントラ予測モードがプレーナ予測モード、あるいはDC予測モードであるサブブロックのDCT係数に限定することで、処理時間の増加を抑制し、かつ符号量を削減する符号予測部について説明する。
本変形例では、図17のステップSA30において、対象とするサブブロックのイントラ予測モードIntraPredModeYが、
IntraPredModeY == 0 (プレーナ予測モード)
の場合に当該サブブロックを予測の対象とし、そうでなければ当該サブブロックを予測の対象としない。あるいは、対象とするサブブロックのイントラ予測モードIntraPredModeYが、
IntraPredModeY == 1 (DC予測モード)
の場合に当該サブブロックを予測の対象とし、そうでなければ当該サブブロックを予測の対象としない。あるいは、対象とするサブブロックのイントラ予測モードIntraPredModeYが、
IntraPredModeY == 0 (プレーナ予測モード) || IntraPredModeY == 1 (DC予測モード)
つまり、当該サブブロックのイントラ予測モードがプレーナ予測モード、あるいはDC予測モードの場合、当該サブブロックを予測の対象とし、そうでなければ当該サブブロックを予測の対象としない。
IntraPredModeY == 0 (プレーナ予測モード)
の場合に当該サブブロックを予測の対象とし、そうでなければ当該サブブロックを予測の対象としない。あるいは、対象とするサブブロックのイントラ予測モードIntraPredModeYが、
IntraPredModeY == 1 (DC予測モード)
の場合に当該サブブロックを予測の対象とし、そうでなければ当該サブブロックを予測の対象としない。あるいは、対象とするサブブロックのイントラ予測モードIntraPredModeYが、
IntraPredModeY == 0 (プレーナ予測モード) || IntraPredModeY == 1 (DC予測モード)
つまり、当該サブブロックのイントラ予測モードがプレーナ予測モード、あるいはDC予測モードの場合、当該サブブロックを予測の対象とし、そうでなければ当該サブブロックを予測の対象としない。
一般に、プレーナ予測モードやDC予測モードが選択されるサブブロックは平坦であるか、画素の変化が小さいサブブロックであり、隣接画素との連続性が高い。そのため、それ以外のイントラ予測モードを選択したサブブロックより、隣接ブロックとの連続性を利用した符号予測が容易である。本変形例の符号予測部においては、予測の対象を、イントラ予測モードがプレーナ予測モード、あるいはDC予測モードであるサブブロックのDCT係数に限定することで、処理時間の増加を抑制し、かつ符号量を削減することができる。
〔実施形態4〕
本発明の別実施形態について、図19および20を用いて以下に説明する。画像に含まれる各画素の画素値がとり得る値の範囲(レンジ)は、例えば0以上255以下など、予め決まっている。画像を量子化すると、その影響で一部の画素において画素値がレンジ外の値をとることはあるが、そのような画素は少数である。
本発明の別実施形態について、図19および20を用いて以下に説明する。画像に含まれる各画素の画素値がとり得る値の範囲(レンジ)は、例えば0以上255以下など、予め決まっている。画像を量子化すると、その影響で一部の画素において画素値がレンジ外の値をとることはあるが、そのような画素は少数である。
しかし、変換係数についての符号の予測が誤っている場合、多数の画素の画素値がレンジ外の値を取ることがある。逆に言えば、部分復号画像において多数の画素の画素値がレンジ外の値を取る場合には、当該部分復号画像の生成に用いられた変換係数の符号の組み合わせは誤ったものである可能性が高い。
そこで、本実施形態の符号予測部は、部分復号画像の生成後に、当該部分復号画像に含まれる各画素の画素値が所定の範囲内の値であるか否かを判定する。そして、符号予測部は、画素値が所定の範囲内ではないと判定された画素の数が所定の数以下である場合に、当該部分復号画像について上方向のコストおよび左方向のコストの算出を行う。
図19は、本実施形態の符号予測部が実行する処理を示すフローチャートである。図19に示すように、本実施形態においては、部分復号画像の生成(SA2)後、符号予測部はレンジ外画素数num_overを0にする(SC1)。次に符号予測部は、部分復号画像に含まれる、ある画素について、画素値が
(A)maxValより大きい
(B)minValより小さい
のいずれかを満たしているか判定する(SC2)。
(A)maxValより大きい
(B)minValより小さい
のいずれかを満たしているか判定する(SC2)。
ステップSC2の判定は、画素値がレンジ内の値であるかの判定である。maxValおよびminValはそれぞれ、レンジの上限および下限である。例えば画素値が8bitフルレンジで表されている場合には
・maxVal = 255
・minVal = 0
である。また、例えば画素値が8bitビデオレンジで表されている場合には、輝度で
・maxVal = 236
・minVal = 16
色差で、
・maxVal = 240
・minVal = 16
である。これらのmaxValおよびminValは、パラメータセットなどで符号化してもよいし、ビットデプスの値に応じて設定してもよい。
・maxVal = 255
・minVal = 0
である。また、例えば画素値が8bitビデオレンジで表されている場合には、輝度で
・maxVal = 236
・minVal = 16
色差で、
・maxVal = 240
・minVal = 16
である。これらのmaxValおよびminValは、パラメータセットなどで符号化してもよいし、ビットデプスの値に応じて設定してもよい。
ステップSC2において、画素値が上記(A)および(B)のいずれかを満たす場合(SC2でY)、符号予測部は、num_overをインクリメントする(SC3)。一方、画素値が上記(A)および(B)のいずれも満たさない場合(SC2でN)、符号予測部は、num_overをインクリメントしない。符号予測部は、ステップSC2およびSC3の処理を、部分復号画像の全ての画素について実行する。
その後、符号予測部は、num_overの値が所定の閾値Thより大きいか否か判定する(SC4)。num_overの値が所定の閾値Thより大きくない場合(SC4でN)、符号予測部は、上述したステップSA3~SA5と同様にして、部分復号画像のコストを算出する。一方、num_overの値が所定の閾値Thより大きい場合(SC4でY)、符号予測部は部分復号画像のコストを算出しない。
符号予測部は、上述したステップSA2~SA5、およびSC1~SC4の処理を、部分復号画像のそれぞれに実行する。その後、符号予測部は、コストを算出した部分復号画像のうち、最もコストが低い部分復号画像に対応するDCT係数の符号の組み合わせを、正しいDCT係数の符号の組み合わせとして予測する。
(実施形態4の効果)
上述した通り、DCT係数の予測が正しい場合には、復号された画像のほとんどの画素における画素値は上記レンジ内に収まると考えられる。そこで、本実施形態の符号予測部においては、画素値が上記レンジを超える画素の数が所定の閾値Thより多い場合、部分復号画像に対応する変換係数の符号の組み合わせが適切でないものとして、コストを算出しない。これにより、符号の予測の精度を向上させるとともに、処理量を削減することができる。
上述した通り、DCT係数の予測が正しい場合には、復号された画像のほとんどの画素における画素値は上記レンジ内に収まると考えられる。そこで、本実施形態の符号予測部においては、画素値が上記レンジを超える画素の数が所定の閾値Thより多い場合、部分復号画像に対応する変換係数の符号の組み合わせが適切でないものとして、コストを算出しない。これにより、符号の予測の精度を向上させるとともに、処理量を削減することができる。
なお、本実施形態においても、符号予測部は、実施形態1などと同様に、コストを算出するときに上方向のコストおよび左方向のコストのそれぞれに重み付けをしてよい。また、本実施形態においても、符号予測部は、実施形態2と同様に、上方向のコストおよび左方向のコストのそれぞれについて1次微分仮説または2次微分仮説のうちいずれを適用するか決定してよい。
(変形例)
上述した通り、本実施形態の符号予測部は、部分復号画像における、画素値が所定の範囲内ではないと判定された画素の数に基づいて、コストを算出するか否かを決定した。しかし、本実施形態の符号予測部は、部分復号画像に含まれる各画素の画素値が所定の範囲を逸脱した量を示す逸脱量を算出し、上記上方向のコストおよび上記左方向のコストに加えて、上記各画素における上記逸脱量を用いて上記符号の予測を行ってもよい。
上述した通り、本実施形態の符号予測部は、部分復号画像における、画素値が所定の範囲内ではないと判定された画素の数に基づいて、コストを算出するか否かを決定した。しかし、本実施形態の符号予測部は、部分復号画像に含まれる各画素の画素値が所定の範囲を逸脱した量を示す逸脱量を算出し、上記上方向のコストおよび上記左方向のコストに加えて、上記各画素における上記逸脱量を用いて上記符号の予測を行ってもよい。
図20は、実施形態4の変形例の符号予測部における処理を示すフローチャートである。本変形例においては、部分復号画像の生成(SA2)後、符号予測部は逸脱量overを0にする(SD1)。符号予測部は、部分復号画像に含まれる、座標が(x,y)である画素について、画素値px,yが上記レンジの範囲外であるか否か判定する(SD2)。画素値px,yが上記レンジの範囲外である場合(SD2でY)、符号予測部は、上記画素値の上記レンジからの超過分を逸脱量overの値に加算する(SD3)。ステップSD3の処理を式で示すと
over = Σ(max(px,y- maxval, 0) + max(minval - px,y, 0))
ここでΣはx,yに対する和である(以下同様)。x, yは部分復号画像の画素(上隣接境界画素、左隣接境界画素)の座標である。一方、画素値px,yが上記レンジの範囲外でない場合(SD2でN)、符号予測部は逸脱量overの値を変更しない。符号予測部は、ステップSD2およびSD3の処理を、部分復号画像の全ての画素について実行する。
over = Σ(max(px,y- maxval, 0) + max(minval - px,y, 0))
ここでΣはx,yに対する和である(以下同様)。x, yは部分復号画像の画素(上隣接境界画素、左隣接境界画素)の座標である。一方、画素値px,yが上記レンジの範囲外でない場合(SD2でN)、符号予測部は逸脱量overの値を変更しない。符号予測部は、ステップSD2およびSD3の処理を、部分復号画像の全ての画素について実行する。
なお、上限側の超過分と下限側の超過分のどちらか一方のみを逸脱量overとして計算してもよい。つまり、
over = Σmax(px,y- maxval, 0)
もしくは
over = Σmax(minval- px,y, 0)
なお、上記レンジからの超過分を逸脱量overの計算は非線形としてもよい。すなわち、maxvalから大きく超える場合のコスト、maxvalを大きく下回る場合のコストを大き目に設定してもよい。例えば2次関数を用いて、
over =Σ(pow(overUpper,2) + pow(overLower, 2))
ここで、overUpper = max(px,y - maxval,0)、overLower = max(minval - px,y, 0)、pow(x, y)は、xをy乗する関数である。また、2次関数のコストと1次関数のコストを加算してもよい。
over =Σ(aU1*overUpper+ aU2*pow(overUpper, 2) + aL1*overLower + aL2*pow(overLower, 2))
ここで、aU1,aU2,aL1,aL2は各々overUpperの1次関数コストの重み、overUpperの2次関数コストの重み、各々overLowerの1次関数コストの重み、overLowerの2次関数コストの重み、である。
over = Σmax(px,y- maxval, 0)
もしくは
over = Σmax(minval- px,y, 0)
なお、上記レンジからの超過分を逸脱量overの計算は非線形としてもよい。すなわち、maxvalから大きく超える場合のコスト、maxvalを大きく下回る場合のコストを大き目に設定してもよい。例えば2次関数を用いて、
over =Σ(pow(overUpper,2) + pow(overLower, 2))
ここで、overUpper = max(px,y - maxval,0)、overLower = max(minval - px,y, 0)、pow(x, y)は、xをy乗する関数である。また、2次関数のコストと1次関数のコストを加算してもよい。
over =Σ(aU1*overUpper+ aU2*pow(overUpper, 2) + aL1*overLower + aL2*pow(overLower, 2))
ここで、aU1,aU2,aL1,aL2は各々overUpperの1次関数コストの重み、overUpperの2次関数コストの重み、各々overLowerの1次関数コストの重み、overLowerの2次関数コストの重み、である。
その後、符号予測部は、逸脱量overの値が所定の閾値Thより大きいか否か判定する(SD4)。逸脱量overの値がThの値より大きくない場合(SD4でN)、符号予測部はコストを算出(SD5)した後、上述したステップSA4およびSA5の処理を実行する。一方、逸脱量overの値が所定の閾値Thより大きい場合(SD4でY)、符号予測部は部分復号画像のコストを算出しない。
符号予測部は、上述したステップSA2、SA4、SA5、およびSD1~SD5の処理を、部分復号画像のそれぞれに実行する。その後、コストを算出した部分復号画像のうち、最もコストが低い部分復号画像に対応するDCT係数の符号の組み合わせを、正しいDCT係数の符号の組み合わせとして予測する。
ステップSD5においては、他の実施形態におけるステップSA3とは異なり、符号予測部はコストcostを以下の式
cost = costU + costL + over
により算出する。すなわち、ステップSD5において符号予測部は、ステップSA3における式と同じ式により算出されるコストの値に、逸脱量overの値を加算した値を部分復号画像のコストとして算出する。このため、部分復号画像における逸脱量overの値がTh以下であり、符号予測部が当該部分復号画像のコストを算出する場合であっても、逸脱量overの値が大きければその分コストが高くなる。したがって、符号予測部は、逸脱量overの値が大きい部分復号画像に対応するDCT係数の符号の組み合わせを、正しい符号の組み合わせとして予測しにくくなる。したがって、符号予測部による符号予測の精度が向上する。
cost = costU + costL + over
により算出する。すなわち、ステップSD5において符号予測部は、ステップSA3における式と同じ式により算出されるコストの値に、逸脱量overの値を加算した値を部分復号画像のコストとして算出する。このため、部分復号画像における逸脱量overの値がTh以下であり、符号予測部が当該部分復号画像のコストを算出する場合であっても、逸脱量overの値が大きければその分コストが高くなる。したがって、符号予測部は、逸脱量overの値が大きい部分復号画像に対応するDCT係数の符号の組み合わせを、正しい符号の組み合わせとして予測しにくくなる。したがって、符号予測部による符号予測の精度が向上する。
なお、本変形例においても、符号予測部は、コストを算出するときに、実施形態1などと同様にcostUおよびcostLのそれぞれに重み付けをしてよく、さらに逸脱量overについても重み付けを行ってよい。また、本実施形態においても、符号予測部は、コストを算出するときに、実施形態2と同様にcostUおよびcostLのそれぞれについて、1次微分仮説または2次微分仮説のうちいずれを適用するか決定してよい。
〔付記事項〕
また、上述した実施形態における画像符号化装置11、画像復号装置31の一部、または全部を、LSI(Large Scale Integration)等の集積回路として実現しても良い。画像符号化装置11、画像復号装置31の各機能ブロックは個別にプロセッサ化しても良いし、一部、または全部を集積してプロセッサ化しても良い。また、集積回路化の手法はLSIに限らず専用回路、または汎用プロセッサで実現しても良い。また、半導体技術の進歩によりLSIに代替する集積回路化の技術が出現した場合、当該技術による集積回路を用いても良い。
また、上述した実施形態における画像符号化装置11、画像復号装置31の一部、または全部を、LSI(Large Scale Integration)等の集積回路として実現しても良い。画像符号化装置11、画像復号装置31の各機能ブロックは個別にプロセッサ化しても良いし、一部、または全部を集積してプロセッサ化しても良い。また、集積回路化の手法はLSIに限らず専用回路、または汎用プロセッサで実現しても良い。また、半導体技術の進歩によりLSIに代替する集積回路化の技術が出現した場合、当該技術による集積回路を用いても良い。
以上、図面を参照してこの発明の一実施形態について詳しく説明してきたが、具体的な構成は上述のものに限られることはなく、この発明の要旨を逸脱しない範囲内において様々な設計変更等をすることが可能である。
〔応用例〕
上述した画像符号化装置11及び画像復号装置31は、動画像の送信、受信、記録、再生を行う各種装置に搭載して利用することができる。なお、動画像は、カメラ等により撮像された自然動画像であってもよいし、コンピュータ等により生成された人工動画像(CGおよびGUIを含む)であってもよい。
上述した画像符号化装置11及び画像復号装置31は、動画像の送信、受信、記録、再生を行う各種装置に搭載して利用することができる。なお、動画像は、カメラ等により撮像された自然動画像であってもよいし、コンピュータ等により生成された人工動画像(CGおよびGUIを含む)であってもよい。
まず、上述した画像符号化装置11及び画像復号装置31を、動画像の送信及び受信に利用できることを、図21を参照して説明する。
図21の(a)は、画像符号化装置11を搭載した送信装置PROD_Aの構成を示したブロック図である。図21の(a)に示すように、送信装置PROD_Aは、動画像を符号化することによって符号化データを得る符号化部PROD_A1と、符号化部PROD_A1が得た符号化データで搬送波を変調することによって変調信号を得る変調部PROD_A2と、変調部PROD_A2が得た変調信号を送信する送信部PROD_A3と、を備えている。上述した画像符号化装置11は、この符号化部PROD_A1として利用される。
送信装置PROD_Aは、符号化部PROD_A1に入力する動画像の供給源として、動画像を撮像するカメラPROD_A4、動画像を記録した記録媒体PROD_A5、動画像を外部から入力するための入力端子PROD_A6、及び、画像を生成または加工する画像処理部A7を更に備えていてもよい。図21の(a)においては、これら全てを送信装置PROD_Aが備えた構成を例示しているが、一部を省略しても構わない。
なお、記録媒体PROD_A5は、符号化されていない動画像を記録したものであってもよいし、伝送用の符号化方式とは異なる記録用の符号化方式で符号化された動画像を記録したものであってもよい。後者の場合、記録媒体PROD_A5と符号化部PROD_A1との間に、記録媒体PROD_A5から読み出した符号化データを記録用の符号化方式に従って復号する復号部(不図示)を介在させるとよい。
図21の(b)は、画像復号装置31を搭載した受信装置PROD_Bの構成を示したブロック図である。図21の(b)に示すように、受信装置PROD_Bは、変調信号を受信する受信部PROD_B1と、受信部PROD_B1が受信した変調信号を復調することによって符号化データを得る復調部PROD_B2と、復調部PROD_B2が得た符号化データを復号することによって動画像を得る復号部PROD_B3と、を備えている。上述した画像復号装置31は、この復号部PROD_B3として利用される。
受信装置PROD_Bは、復号部PROD_B3が出力する動画像の供給先として、動画像を表示するディスプレイPROD_B4、動画像を記録するための記録媒体PROD_B5、及び、動画像を外部に出力するための出力端子PROD_B6を更に備えていてもよい。図21の(b)においては、これら全てを受信装置PROD_Bが備えた構成を例示しているが、一部を省略しても構わない。
なお、記録媒体PROD_B5は、符号化されていない動画像を記録するためのものであってもよいし、伝送用の符号化方式とは異なる記録用の符号化方式で符号化されたものであってもよい。後者の場合、復号部PROD_B3と記録媒体PROD_B5との間に、復号部PROD_B3から取得した動画像を記録用の符号化方式に従って符号化する符号化部(不図示)を介在させるとよい。
なお、変調信号を伝送する伝送媒体は、無線であってもよいし、有線であってもよい。また、変調信号を伝送する伝送態様は、放送(ここでは、送信先が予め特定されていない送信態様を指す)であってもよいし、通信(ここでは、送信先が予め特定されている送信態様を指す)であってもよい。すなわち、変調信号の伝送は、無線放送、有線放送、無線通信、及び有線通信の何れによって実現してもよい。
例えば、地上デジタル放送の放送局(放送設備など)/受信局(テレビジョン受像機など)は、変調信号を無線放送で送受信する送信装置PROD_A/受信装置PROD_Bの一例である。また、ケーブルテレビ放送の放送局(放送設備など)/受信局(テレビジョン受像機など)は、変調信号を有線放送で送受信する送信装置PROD_A/受信装置PROD_Bの一例である。
また、インターネットを用いたVOD(Video On Demand)サービスや動画共有サービスなどのサーバ(ワークステーションなど)/クライアント(テレビジョン受像機、パーソナルコンピュータ、スマートフォンなど)は、変調信号を通信で送受信する送信装置PROD_A/受信装置PROD_Bの一例である(通常、LANにおいては伝送媒体として無線または有線の何れかが用いられ、WANにおいては伝送媒体として有線が用いられる)。ここで、パーソナルコンピュータには、デスクトップ型PC、ラップトップ型PC、及びタブレット型PCが含まれる。また、スマートフォンには、多機能携帯電話端末も含まれる。
なお、動画共有サービスのクライアントは、サーバからダウンロードした符号化データを復号してディスプレイに表示する機能に加え、カメラで撮像した動画像を符号化してサーバにアップロードする機能を有している。すなわち、動画共有サービスのクライアントは、送信装置PROD_A及び受信装置PROD_Bの双方として機能する。
次に、上述した画像符号化装置11及び画像復号装置31を、動画像の記録及び再生に利用できることを、図22を参照して説明する。
図22の(a)は、上述した画像符号化装置11を搭載した記録装置PROD_Cの構成を示したブロック図である。図22の(a)に示すように、記録装置PROD_Cは、動画像を符号化することによって符号化データを得る符号化部PROD_C1と、符号化部PROD_C1が得た符号化データを記録媒体PROD_Mに書き込む書込部PROD_C2と、を備えている。上述した画像符号化装置11は、この符号化部PROD_C1として利用される。
なお、記録媒体PROD_Mは、(1)HDD(Hard Disk Drive)やSSD(Solid State Drive)などのように、記録装置PROD_Cに内蔵されるタイプのものであってもよいし、(2)SDメモリカードやUSB(UniversalSerial Bus)フラッシュメモリなどのように、記録装置PROD_Cに接続されるタイプのものであってもよいし、(3)DVD(Digital Versatile Disc)やBD(Blu-ray Disc:登録商標)などのように、記録装置PROD_Cに内蔵されたドライブ装置(不図示)に装填されるものであってもよい。
また、記録装置PROD_Cは、符号化部PROD_C1に入力する動画像の供給源として、動画像を撮像するカメラPROD_C3、動画像を外部から入力するための入力端子PROD_C4、動画像を受信するための受信部PROD_C5、及び、画像を生成または加工する画像処理部PROD_C6を更に備えていてもよい。図22の(a)においては、これら全てを記録装置PROD_Cが備えた構成を例示しているが、一部を省略しても構わない。
なお、受信部PROD_C5は、符号化されていない動画像を受信するものであってもよいし、記録用の符号化方式とは異なる伝送用の符号化方式で符号化された符号化データを受信するものであってもよい。後者の場合、受信部PROD_C5と符号化部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の一例である。
図22の(b)は、上述した画像復号装置31を搭載した再生装置PROD_Dの構成を示したブロック図である。図22の(b)に示すように、再生装置PROD_Dは、記録媒体PROD_Mに書き込まれた符号化データを読み出す読出部PROD_D1と、読出部PROD_D1が読み出した符号化データを復号することによって動画像を得る復号部PROD_D2と、を備えている。上述した画像復号装置31は、この復号部PROD_D2として利用される。
なお、記録媒体PROD_Mは、(1)HDDやSSDなどのように、再生装置PROD_Dに内蔵されるタイプのものであってもよいし、(2)SDメモリカードやUSBフラッシュメモリなどのように、再生装置PROD_Dに接続されるタイプのものであってもよいし、(3)DVDやBDなどのように、再生装置PROD_Dに内蔵されたドライブ装置(不図示)に装填されるものであってもよい。
また、再生装置PROD_Dは、復号部PROD_D2が出力する動画像の供給先として、動画像を表示するディスプレイPROD_D3、動画像を外部に出力するための出力端子PROD_D4、及び、動画像を送信する送信部PROD_D5を更に備えていてもよい。図22の(b)においては、これら全てを再生装置PROD_Dが備えた構成を例示しているが、一部を省略しても構わない。
なお、送信部PROD_D5は、符号化されていない動画像を送信するものであってもよいし、記録用の符号化方式とは異なる伝送用の符号化方式で符号化された符号化データを送信するものであってもよい。後者の場合、復号部PROD_D2と送信部PROD_D5との間に、動画像を伝送用の符号化方式で符号化する符号化部(不図示)を介在させるとよい。
このような再生装置PROD_Dとしては、例えば、DVDプレイヤ、BDプレイヤ、HDDプレイヤなどが挙げられる(この場合、テレビジョン受像機等が接続される出力端子PROD_D4が動画像の主な供給先となる)。また、テレビジョン受像機(この場合、ディスプレイPROD_D3が動画像の主な供給先となる)、デジタルサイネージ(電子看板や電子掲示板等とも称され、ディスプレイPROD_D3または送信部PROD_D5が動画像の主な供給先となる)、デスクトップ型PC(この場合、出力端子PROD_D4または送信部PROD_D5が動画像の主な供給先となる)、ラップトップ型またはタブレット型PC(この場合、ディスプレイPROD_D3または送信部PROD_D5が動画像の主な供給先となる)、スマートフォン(この場合、ディスプレイPROD_D3または送信部PROD_D5が動画像の主な供給先となる)なども、このような再生装置PROD_Dの一例である。
(ハードウェア的実現およびソフトウェア的実現)
また、上述した画像復号装置31および画像符号化装置11の各ブロックは、集積回路(ICチップ)上に形成された論理回路によってハードウェア的に実現してもよいし、CPU(Central Processing Unit)を用いてソフトウェア的に実現してもよい。
また、上述した画像復号装置31および画像符号化装置11の各ブロックは、集積回路(ICチップ)上に形成された論理回路によってハードウェア的に実現してもよいし、CPU(Central Processing Unit)を用いてソフトウェア的に実現してもよい。
後者の場合、上記各装置は、各機能を実現するプログラムの命令を実行するCPU、上記プログラムを格納したROM(ReadOnly Memory)、上記プログラムを展開するRAM(RandomAccess Memory)、上記プログラムおよび各種データを格納するメモリ等の記憶装置(記録媒体)などを備えている。そして、本発明の実施形態の目的は、上述した機能を実現するソフトウェアである上記各装置の制御プログラムのプログラムコード(実行形式プログラム、中間コードプログラム、ソースプログラム)をコンピュータで読み取り可能に記録した記録媒体を、上記各装置に供給し、そのコンピュータ(またはCPUやMPU)が記録媒体に記録されているプログラムコードを読み出し実行することによっても、達成可能である。
上記記録媒体としては、例えば、磁気テープやカセットテープ等のテープ類、フロッピー(登録商標)ディスク/ハードディスク等の磁気ディスクやCD-ROM(Compact Disc Read-Only Memory)/MOディスク(Magneto-Optical disc)/MD(Mini Disc)/DVD(Digital Versatile Disc)/CD-R(CD Recordable)/ブルーレイディスク(Blu-ray Disc:登録商標)等の光ディスクを含むディスク類、ICカード(メモリカードを含む)/光カード等のカード類、マスクROM/EPROM(Erasable Programmable Read-Only Memory)/EEPROM(Electrically Erasable andProgrammable Read-Only Memory:登録商標)/フラッシュROM等の半導体メモリ類、あるいはPLD(Programmable logic device)やFPGA(Field Programmable Gate Array)等の論理回路類などを用いることができる。
また、上記各装置を通信ネットワークと接続可能に構成し、上記プログラムコードを通信ネットワークを介して供給してもよい。この通信ネットワークは、プログラムコードを伝送可能であればよく、特に限定されない。例えば、インターネット、イントラネット、エキストラネット、LAN(Local Area Network)、ISDN(Integrated Services Digital Network)、VAN(Value-Added Network)、CATV(Community Antenna television/Cable Television)通信網、仮想専用網(Virtual Private Network)、電話回線網、移動体通信網、衛星通信網等が利用可能である。また、この通信ネットワークを構成する伝送媒体も、プログラムコードを伝送可能な媒体であればよく、特定の構成または種類のものに限定されない。例えば、IEEE(Institute of Electrical and Electronic Engineers)1394、USB、電力線搬送、ケーブルTV回線、電話線、ADSL(Asymmetric Digital Subscriber Line)回線等の有線でも、IrDA(Infrared Data Association)やリモコンのような赤外線、BlueTooth(登録商標)、IEEE802.11無線、HDR(High Data Rate)、NFC(Near Field Communication)、DLNA(Digital Living Network Alliance:登録商標)、携帯電話網、衛星回線、地上デジタル放送網等の無線でも利用可能である。なお、本発明の実施形態は、上記プログラムコードが電子的な伝送で具現化された、搬送波に埋め込まれたコンピュータデータ信号の形態でも実現され得る。
本発明の実施形態は上述した実施形態に限定されるものではなく、請求項に示した範囲で種々の変更が可能である。すなわち、請求項に示した範囲で適宜変更した技術的手段を組み合わせて得られる実施形態についても本発明の技術的範囲に含まれる。
(関連出願の相互参照)
本出願は、2016年12月14日に出願された日本国特許出願:特願2016-242550に対して優先権の利益を主張するものであり、それを参照することにより、その内容の全てが本書に含まれる。
本出願は、2016年12月14日に出願された日本国特許出願:特願2016-242550に対して優先権の利益を主張するものであり、それを参照することにより、その内容の全てが本書に含まれる。
本発明の実施形態は、画像データが符号化された符号化データを復号する画像復号装置、および、画像データが符号化された符号化データを生成する画像符号化装置に好適に適用することができる。また、画像符号化装置によって生成され、画像復号装置によって参照される符号化データのデータ構造に好適に適用することができる。
103 DCT・量子化部(符号予測装置)
105、311 逆量子化・逆DCT部(符号予測装置)
1052、1052A、3112、3112A 符号予測部
1034a、1052a、3112a 重み変更部(重み設定部)
1034b、1052b、3112b 仮説決定部
105、311 逆量子化・逆DCT部(符号予測装置)
1052、1052A、3112、3112A 符号予測部
1034a、1052a、3112a 重み変更部(重み設定部)
1034b、1052b、3112b 仮説決定部
Claims (15)
- 対象ブロックの残差画像に関する量子化係数を逆量子化して算出される複数の変換係数のうち、非0の上記変換係数について符号の予測を行う符号予測装置であって、
予測の対象とする上記変換係数の符号が正である場合と負である場合との組み合わせについて部分復号画像を生成し、当該部分復号画像について上方向および左方向に隣接する画素との関係に基づいて算出した上方向のコストおよび左方向のコストを用いて上記符号の予測を行う符号予測部を備え、
上記符号予測部は、当該符号予測部が用いる上記上方向のコストおよび上記左方向のコストのそれぞれに付与する重みを設定する重み設定部を備えている
ことを特徴とする符号予測装置。 - 上記重み設定部は、上記対象ブロックの形状に基づいて上記重みを設定する
ことを特徴とする請求項1に記載の符号予測装置。 - 上記重み設定部は、上記対象ブロックの上端および左端の画素と、当該上端および左端の画素に隣接する画素との間での画素値の変化に基づいて上記重みを設定する
ことを特徴とする請求項1に記載の符号予測装置。 - 上記重み設定部は、上記対象ブロックにおけるイントラ予測の方向に基づいて上記重みを設定する
ことを特徴とする請求項1に記載の符号予測装置。 - 上記上方向のコストおよび上記左方向のコストはそれぞれ、1次微分仮説に基づいて算出される第1コストと、2次微分仮説に基づいて算出される第2コストとの線形和で表される
ことを特徴とする請求項1から4のいずれか1項に記載の符号予測装置。 - 上記符号予測部は、上記部分復号画像に含まれる各画素の画素値が所定の範囲内の値であるか否かを判定し、
画素値が所定の範囲内ではないと判定された画素の数が所定の数以下である場合に、当該部分復号画像について上記上方向のコストおよび上記左方向のコストの算出を行う
ことを特徴とする請求項1から5のいずれか1項に記載の符号予測装置。 - 上記符号予測部は、上記部分復号画像に含まれる各画素の画素値が所定の範囲を逸脱した量を示す逸脱量を算出し、
上記上方向のコストおよび上記左方向のコストに加えて、上記各画素における上記逸脱量を用いて上記符号の予測を行う
ことを特徴とする請求項1から6のいずれか1項に記載の符号予測装置。 - 対象ブロックの残差画像に関する量子化係数を逆量子化して算出される複数の変換係数のうち、非0の上記変換係数について符号の予測を行う符号予測装置であって、
予測の対象とする上記変換係数の符号が正である場合と負である場合との組み合わせについて部分復号画像を生成し、当該部分復号画像について上方向および左方向に隣接する画素との関係に基づいて算出した上方向のコストおよび左方向のコストを用いて上記符号の予測を行う符号予測部を備え、
上記符号予測部は、上記上方向のコストおよび上記左方向のコストのそれぞれについて、1次微分仮説および2次微分仮説のいずれに基づいて算出するかを決定する仮説決定部を備える
ことを特徴とする符号予測装置。 - 上記仮説決定部は、(i)上記部分復号画像の上端および左端の画素と、(ii)当該上端および左端の画素に隣接する画素と、の間での画素値の変化を示すアクティビティに応じて、上記上方向のコストおよび上記左方向のコストのそれぞれについて上記1次微分仮説または上記2次微分仮説のいずれに基づいて算出するかを決定する
ことを特徴とする請求項8に記載の符号予測装置。 - 上記仮説決定部は、上記対象ブロックのサイズに応じて、上記上方向のコストおよび上記左方向のコストのそれぞれについて上記1次微分仮説および上記2次微分仮説のいずれに基づいて算出するかを決定する
ことを特徴とする請求項8に記載の符号予測装置。 - 対象ブロックの残差画像に関する量子化係数を逆量子化して算出される複数の変換係数のうち、非0の上記変換係数について符号の予測を行う符号予測装置であって、
予測の対象とする上記変換係数の符号が正である場合と負である場合との組み合わせについて部分復号画像を生成し、当該部分復号画像について上方向および左方向に隣接する画素との関係に基づいて算出した上方向のコストおよび左方向のコストを用いて上記符号の予測を行う符号予測部を備え、
上記符号予測部は、上記対象ブロックにおけるサブブロックの位置を示すサブブロックアドレスを(xc,yc)として、xcおよびycの和が所定の値以下であるサブブロックの変換係数について符号の予測を行う
ことを特徴とする符号予測装置。 - 対象ブロックの残差画像に関する量子化係数を逆量子化して算出される複数の変換係数のうち、非0の上記変換係数について符号の予測を行う符号予測装置であって、
予測の対象とする上記変換係数の符号が正である場合と負である場合との組み合わせについて部分復号画像を生成し、当該部分復号画像について上方向および左方向に隣接する画素との関係に基づいて算出した上方向のコストおよび左方向のコストを用いて上記符号の予測を行う符号予測部を備え、
上記符号予測部は、上記部分復号画像に含まれる各画素の画素値が所定の範囲内の値であるか否か判定し、
画素値が所定の範囲内ではないと判定された画素の数が所定の数以下である場合に、当該部分復号画像について上記上方向のコストおよび上記左方向のコストの算出を行う
ことを特徴とする符号予測装置。 - 対象ブロックの残差画像に関する量子化係数を逆量子化して算出される複数の変換係数のうち、非0の上記変換係数について符号の予測を行う符号予測装置であって、
予測の対象とする上記変換係数の符号が正である場合と負である場合との組み合わせについて部分復号画像を生成し、当該部分復号画像について上方向および左方向に隣接する画素との関係に基づいて算出した上方向のコストおよび左方向のコストを用いて上記符号の予測を行う符号予測部を備え、
上記符号予測部は、上記部分復号画像に含まれる各画素の画素値が所定の範囲を逸脱した量を示す逸脱量を算出し、
上記上方向のコストおよび上記左方向のコストに加えて、上記各画素における上記逸脱量を用いて上記符号の予測を行う
ことを特徴とする符号予測装置。 - 符号化データから対象ブロックの変換係数を復号するエントロピー復号部と、
対象ブロックの予測画像を生成する予測画像生成部と、
対象ブロックの上記変換係数を逆変換し、上記対象ブロックの残差画像を導出する逆変換部と
を備え、上記予測画像と上記残差画像の和から復号画像を導出する画像復号装置であって、
請求項1から13の何れか1項に記載の符号予測装置を更に備え、
上記変換係数の符号を、上記符号予測装置を用いて導出することを特徴とする画像復号装置。 - 対象ブロックの予測画像を生成する予測画像生成部と、
対象ブロックの残差画像から変換係数を導出する変換部と、
上記対象ブロックの変換係数を符号化するエントロピー符号化部と
を備える画像符号化装置であって、
請求項1から13の何れか1項に記載の符号予測装置を更に備え、
上記変換係数の符号を、上記符号予測装置を用いて導出することを特徴とする画像符号化装置。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2016242550 | 2016-12-14 | ||
| JP2016-242550 | 2016-12-14 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2018110281A1 true WO2018110281A1 (ja) | 2018-06-21 |
Family
ID=62558427
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/JP2017/042892 Ceased WO2018110281A1 (ja) | 2016-12-14 | 2017-11-29 | 符号予測装置、画像復号装置および画像符号化装置 |
Country Status (1)
| Country | Link |
|---|---|
| WO (1) | WO2018110281A1 (ja) |
Cited By (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2023103521A1 (en) * | 2021-12-09 | 2023-06-15 | Mediatek Inc. | Method and apparatus for sign coding of transform coefficients in video coding system |
| WO2023162920A1 (ja) * | 2022-02-22 | 2023-08-31 | シャープ株式会社 | 動画像復号装置および動画像符号化装置 |
| WO2023200774A1 (en) * | 2022-04-12 | 2023-10-19 | Dolby Laboratories Licensing Corporation | Sign prediction in video coding |
| WO2023198535A1 (en) * | 2022-04-11 | 2023-10-19 | Interdigital Ce Patent Holdings, Sas | Residual coefficient sign prediction with adaptive cost function for intra prediction modes |
| JP2024500654A (ja) * | 2020-12-29 | 2024-01-10 | クアルコム,インコーポレイテッド | ビデオコーディングにおける複数の色成分に対する符号予測 |
| WO2024209748A1 (ja) * | 2023-04-07 | 2024-10-10 | シャープ株式会社 | 動画像復号装置および動画像符号化装置 |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2015197945A1 (fr) * | 2014-06-27 | 2015-12-30 | B<>Com | Procédé de codage d'une image numérique, procédé de décodage, dispositifs, et programmes d'ordinateurs associés |
| JP2016092589A (ja) * | 2014-11-04 | 2016-05-23 | キヤノン株式会社 | 符号化装置及びその制御方法 |
-
2017
- 2017-11-29 WO PCT/JP2017/042892 patent/WO2018110281A1/ja not_active Ceased
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2015197945A1 (fr) * | 2014-06-27 | 2015-12-30 | B<>Com | Procédé de codage d'une image numérique, procédé de décodage, dispositifs, et programmes d'ordinateurs associés |
| JP2016092589A (ja) * | 2014-11-04 | 2016-05-23 | キヤノン株式会社 | 符号化装置及びその制御方法 |
Non-Patent Citations (1)
| Title |
|---|
| FELIX HENRY ET AL.: "Residual Coefficient Sign Prediction", JVET-D, JVET-D0031, ITU-T, 21 October 2016 (2016-10-21), XP030150258, Retrieved from the Internet <URL:http://phenix.it-sudparis.eu/jvet/doc_end_user/documents/4_Chengdu/wgll/JVET-D0031-v4.zip> * |
Cited By (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2024500654A (ja) * | 2020-12-29 | 2024-01-10 | クアルコム,インコーポレイテッド | ビデオコーディングにおける複数の色成分に対する符号予測 |
| WO2023103521A1 (en) * | 2021-12-09 | 2023-06-15 | Mediatek Inc. | Method and apparatus for sign coding of transform coefficients in video coding system |
| WO2023162920A1 (ja) * | 2022-02-22 | 2023-08-31 | シャープ株式会社 | 動画像復号装置および動画像符号化装置 |
| US12513333B2 (en) | 2022-02-22 | 2025-12-30 | Sharp Kabushiki Kaisha | Video decoding apparatus and video coding apparatus |
| WO2023198535A1 (en) * | 2022-04-11 | 2023-10-19 | Interdigital Ce Patent Holdings, Sas | Residual coefficient sign prediction with adaptive cost function for intra prediction modes |
| WO2023200774A1 (en) * | 2022-04-12 | 2023-10-19 | Dolby Laboratories Licensing Corporation | Sign prediction in video coding |
| WO2024209748A1 (ja) * | 2023-04-07 | 2024-10-10 | シャープ株式会社 | 動画像復号装置および動画像符号化装置 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US12149735B2 (en) | Image decoding device, image encoding device, and image decoding method | |
| JP7223886B2 (ja) | 画像復号方法 | |
| JP7260472B2 (ja) | 画像フィルタ装置 | |
| CN109792535B (zh) | 预测图像生成装置、运动图像解码装置以及运动图像编码装置 | |
| JP7073186B2 (ja) | 画像フィルタ装置 | |
| WO2019182159A1 (ja) | 画像フィルタ装置、画像復号装置、及び画像符号化装置 | |
| WO2018037896A1 (ja) | 画像復号装置、画像符号化装置、画像復号方法、および画像符号化方法 | |
| US20190297320A1 (en) | Image decoding device and image encoding device | |
| WO2018199001A1 (ja) | 画像復号装置及び画像符号化装置 | |
| WO2018110281A1 (ja) | 符号予測装置、画像復号装置および画像符号化装置 | |
| US20250254349A1 (en) | Video decoding apparatus and video decoding method | |
| JP2019216294A (ja) | エントロピー復号装置、エントロピー符号化装置、画像復号装置および画像符号化装置 | |
| WO2019087905A1 (ja) | 画像フィルタ装置、画像復号装置、および画像符号化装置 | |
| US11818363B2 (en) | Video decoding apparatus and video coding apparatus | |
| WO2017138417A1 (ja) | 動きベクトル生成装置、予測画像生成装置、動画像復号装置、および動画像符号化装置。 | |
| JP7139144B2 (ja) | 画像フィルタ装置 | |
| WO2019230904A1 (ja) | 画像復号装置、および画像符号化装置 | |
| JP7425568B2 (ja) | 動画像復号装置、動画像符号化装置、動画像復号方法および動画像符号化方法 | |
| JP7241153B2 (ja) | 画像復号装置 | |
| WO2012077719A1 (ja) | 画像復号装置、および画像符号化装置 | |
| JP2019201332A (ja) | 画像符号化装置、画像復号装置、及び画像符号化システム | |
| WO2018173862A1 (ja) | 画像復号装置及び画像符号化装置 | |
| WO2019131349A1 (ja) | 画像復号装置、画像符号化装置 | |
| JP2020036101A (ja) | 画像復号装置および画像符号化装置 | |
| JP7332753B2 (ja) | 画像フィルタ装置 |
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: 17880296 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: 17880296 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: JP |