HK1182244B - Motion-video encoding apparatus, motion-video decoding apparatus, motion-video encoding method, and motion-video decoding method - Google Patents
Motion-video encoding apparatus, motion-video decoding apparatus, motion-video encoding method, and motion-video decoding method Download PDFInfo
- Publication number
- HK1182244B HK1182244B HK13109293.0A HK13109293A HK1182244B HK 1182244 B HK1182244 B HK 1182244B HK 13109293 A HK13109293 A HK 13109293A HK 1182244 B HK1182244 B HK 1182244B
- Authority
- HK
- Hong Kong
- Prior art keywords
- prediction
- image
- unit
- block
- intra
- Prior art date
Links
Description
Technical Field
The present invention relates to a moving image encoding device and a moving image encoding method for efficiently encoding a moving image, and a moving image decoding device and a moving image decoding method for decoding a moving image that is efficiently encoded.
Background
For example, in an international standard video coding scheme such as MPEG (M0 vingPictureExpertsGroup) and "ITU-t h.26x", an input video frame is divided into rectangular blocks (blocks to be coded), prediction processing using an already-coded image signal is performed on the blocks to be coded, thereby generating a predicted image, and a prediction error signal, which is a difference between the blocks to be coded and the predicted image, is subjected to orthogonal transformation and quantization processing on a block-by-block basis, thereby performing information compression.
For example, in AVC/h.264(ISO/IEC14496-10| ITU-th.264), which is an international standard system, intra prediction processing is performed from neighboring pixels that have already been encoded, or motion compensation prediction processing between adjacent frames is performed (see, for example, non-patent document 1).
In MPEG-4AVC/h.264, 1 prediction mode can be selected from among a plurality of prediction modes in a block unit, among the intra prediction modes of luminance.
Fig. 10 is an explanatory diagram showing intra prediction modes when the block size of luminance is 4 × 4 pixels.
In fig. 10, white circles are pixels in a block to be encoded. The black circles are pixels used for prediction, and are pixels in the adjacent blocks that have already been encoded.
In fig. 10, as the intra prediction mode, 9 modes 0 to 8 are prepared, of which mode 2 is a mode for performing average value prediction, and pixels in the block to be encoded are predicted using the average values of the adjacent pixels of the upper and left blocks.
The modes other than mode 2 are modes for performing directional prediction. Mode 0 is vertical direction prediction, and a prediction image is generated by repeating adjacent pixels of the upper block in the vertical direction. For example, mode 0 is selected in the case of a vertical stripe pattern.
Mode 1 is horizontal direction prediction, and a prediction image is generated by repeating adjacent pixels of a left block in the horizontal direction. For example, mode 1 is selected in the horizontal stripe pattern.
Modes 3 to 8 generate a prediction image by generating interpolation pixels in a predetermined direction (direction indicated by an arrow) using adjacent pixels of the upper or left block.
The block size of the luminance to which intra prediction is applied can be selected from 4 × 4 pixels, 8 × 8 pixels, and 16 × 16 pixels, and in the case of 8 × 8 pixels, 9 intra prediction modes are defined as in the case of 4 × 4 pixels.
In the case of 16 × 16 pixels, 4 intra prediction modes (average value prediction, vertical direction prediction, horizontal direction prediction, plane prediction) are defined.
The plane prediction is a mode in which a pixel generated by interpolating adjacent pixels of an upper block and adjacent pixels of a left block in a diagonal direction is used as a prediction value.
In the directional prediction mode when the block size is 4 × 4 pixels or 8 × 8 pixels, since a prediction value is generated in a direction predetermined in accordance with the mode, for example, 45 degrees, the prediction efficiency is high and the amount of code can be reduced when the direction of the boundary (edge) of the object in the block coincides with the direction indicated by the prediction mode.
However, if a slight deviation occurs between the direction of the edge and the direction indicated by the prediction mode, or if the edge in the block to be encoded is slightly distorted (wobbles, curves, etc.) even if the directions match, a large prediction error occurs locally, and the prediction efficiency extremely decreases.
In order to prevent such a reduction in prediction efficiency, in the 8 × 8-pixel directional prediction, a smoothed predicted image is generated by using the result of smoothing filtering performed on the adjacent pixels that have been encoded as a reference image used in generating a predicted image, and a prediction error that occurs when a slight deviation in the prediction direction occurs or a slight distortion occurs at the edge is reduced.
Non-patent document 1: MPEG-4AVC (ISO/IEC14496-10)/ITU-T H.264 specification
Disclosure of Invention
Since the conventional image encoding device is configured as described above, if a smoothed prediction image is generated by performing filtering, even if a slight deviation in the prediction direction occurs and a slight distortion occurs at the edge, the prediction error that occurs can be reduced. However, in non-patent document 1, filtering processing is not performed except for a block of 8 × 8 pixels, and only one filter is used for the block of 8 × 8 pixels. In fact, even in a block having a size other than 8 × 8 pixels, the following problem similarly occurs: even if the predicted image and the image to be encoded have similar patterns, a large prediction error occurs locally due to slight mismatch of edges, and a large reduction in prediction efficiency may occur.
In addition, there are problems as follows: even in a block of the same size, if a quantization parameter used for quantizing a prediction error signal, a position of a pixel in the block, and the like are different, a filter suitable for reducing a local prediction error is different, but only one filter is prepared, and a prediction error cannot be sufficiently reduced.
The present invention has been made to solve the above-described problems, and an object of the present invention is to provide a moving image encoding device, a moving image decoding device, a moving image encoding method, and a moving image decoding method that can reduce locally generated prediction errors and improve image quality.
An image decoding device according to the present invention includes an intra prediction unit that generates a prediction image by performing intra prediction processing for each of blocks that are units of prediction processing for an encoding block when an encoding mode related to the encoding block is an intra encoding mode; the intra prediction unit generates an intermediate prediction value from the reference pixel in accordance with the intra prediction parameter, and sets a value obtained by filtering the intermediate prediction value as a final prediction value only at a specific position within the block, and sets the intermediate prediction value as a final prediction value at another position within the block.
According to the present invention, since the intra prediction unit generates an intermediate prediction value from a reference pixel in accordance with the intra prediction parameter, generates a final prediction value only at a specific position in the block by using a value obtained by filtering processing for the intermediate prediction value, and generates the final prediction value at another position in the block by using the intermediate prediction value as the final prediction value, the intra prediction unit has the following effects: the locally generated prediction error is reduced, and an intra-prediction image having high image quality similar to the intra-prediction image generated by the moving image encoding apparatus can be generated also on the moving image decoding apparatus side.
Drawings
Fig. 1 is a configuration diagram showing a moving image encoding device according to embodiment 1 of the present invention.
Fig. 2 is a block diagram showing a moving picture decoding apparatus according to embodiment 1 of the present invention.
Fig. 3 is a flowchart showing the processing contents of the moving image coding apparatus according to embodiment 1 of the present invention.
Fig. 4 is a flowchart showing the processing contents of the moving picture decoding apparatus according to embodiment 1 of the present invention.
Fig. 5 is an explanatory diagram showing a case where the largest-sized encoded block is hierarchically divided into a plurality of encoded blocks.
FIG. 6(a) is a diagram showing the distribution of divided blocks, and (B) is a diagram showing the allocation of a coding mode m (B) to a hierarchically divided block by a 4-way tree graphn) An explanatory view of the situation of (1).
FIG. 7 shows a block B being encodednInner each block Pi nAn illustration of an example of the optional intra prediction parameters (intra prediction mode) in (1).
FIG. 8 is a view showingi n=mi nWhen the value is 4, block P is generatedi nAn explanatory diagram of an example of a pixel used for predicting a value of an intra-pixel.
Fig. 9 is an explanatory diagram illustrating an example of the reference pixel arrangement in the case where N is 5.
Fig. 10 is an explanatory diagram showing intra prediction modes in the case where the block size of the luminance is 4 × 4 pixels.
(symbol description)
1: an encoding control unit (encoding control means); 2: a block dividing unit; 3: a switch (intra prediction unit, motion compensation prediction unit); 4: an intra prediction unit (intra prediction unit); 5: a motion compensation prediction unit (motion compensation prediction unit); 6: a subtraction unit (difference image generation means); 7: a transform/quantization unit (image compression unit); 8: an inverse quantization/inverse transformation unit; 9: an addition unit; 10: a memory for intra prediction; 11: a loop filter section; 12: a motion compensated prediction frame memory; 13: a variable length coding unit (variable length coding unit); 51: a variable length decoding unit (variable length decoding means); 52: a switch (intra prediction unit, motion compensation prediction unit); 53: an intra prediction unit (intra prediction unit); 54: a motion compensation prediction unit (motion compensation prediction unit); 55: an inverse quantization/inverse transformation unit (difference image generation unit); 56: an adder (decoded image generation means); 57: a memory for intra prediction; 58: a loop filter section; 59: motion compensated prediction frame memory.
Detailed Description
Hereinafter, specific embodiments will be described with reference to the drawings in order to explain the present invention in more detail.
Embodiment 1.
In embodiment 1, a moving picture encoding device and a moving picture decoding device will be described below: the moving image encoding device receives each frame image of a video, generates a predicted image by performing intra-frame prediction processing or motion compensation prediction processing between adjacent frames based on adjacent pixels that have already been encoded, performs compression processing on a prediction error signal that is a difference image between the predicted image and the frame image by orthogonal transformation and quantization, and then performs variable length encoding to generate a bit stream, and the moving image decoding device decodes the bit stream output from the moving image encoding device.
The moving image encoding device according to embodiment 1 is characterized in that the video signal is divided into regions of various sizes in accordance with local changes in the spatial and temporal directions of the video signal, and intra-frame and inter-frame adaptive encoding is performed.
In general, a video signal has a characteristic that the complexity of the signal locally changes in space/time. In a specific image frame, when viewed spatially, there are not only patterns having uniform signal characteristics in a relatively wide image area such as sky and walls but also patterns having complicated texture patterns in a small image area such as characters and drawings having fine textures.
In a temporal view, a change in a local pattern in a temporal direction is small for a sky or a wall, but a temporal change is large for a moving person or an object because a contour temporally moves between a rigid body and a non-rigid body.
In the encoding process, a prediction error signal having a small signal power and entropy is generated by temporal/spatial prediction, thereby reducing the entire code amount, but if a parameter for prediction can be uniformly applied to an image signal region as large as possible, the code amount of the parameter can be reduced.
On the other hand, if the same prediction parameter is applied to an image signal pattern that varies greatly in time/space, the error of prediction increases, so the amount of code of the prediction error signal cannot be reduced.
Therefore, it is preferable to reduce the region to be predicted for an image signal pattern that varies temporally/spatially largely, thereby reducing the power/entropy of the prediction error signal even if the data amount of the parameter used for prediction is increased.
In order to perform such encoding in accordance with the general properties of video signals, the moving picture encoding apparatus according to embodiment 1 hierarchically divides a region of a video signal from a predetermined maximum block size, and performs prediction processing and encoding processing of a prediction error for each divided region.
The video signal to be processed by the video encoding apparatus according to embodiment 1 includes, in addition to a YUV signal composed of a luminance signal and 2 color difference signals and a color video signal in an arbitrary color space such as an RGB signal output from a digital imaging device, an arbitrary video signal in which a video frame such as a monochrome image signal or an infrared image signal is composed of a horizontal/vertical two-dimensional digital sampling (pixel) array.
The gradation of each pixel may be 8 bits, or may be 10 bits, 12 bits, or the like.
However, in the following description, unless otherwise specified, the input video signal is a YUV signal. In addition, it is assumed that 2 color difference components U, V are sub-sampled 4:2:0 format signals with respect to the luminance component Y.
The unit of processing data corresponding to each frame of a video is referred to as a "picture", and in embodiment 1, the "picture" is a signal of a video frame that is sequentially scanned (progressive scanning). However, when the video signal is an interlaced signal, the "picture" may be a field image signal which is a unit constituting a video frame.
Fig. 1 is a configuration diagram showing a moving image encoding device according to embodiment 1 of the present invention.
In fig. 1, the encoding control unit 1 performs the following processing: the maximum size of an encoding block which is a processing unit when intra prediction processing (intra prediction processing) or motion compensation prediction processing (inter prediction processing) is performed is determined, and the number of layers of the upper limit when the encoding block of the maximum size is hierarchically divided is determined.
Further, the encoding control unit 1 performs the following processing: an encoding mode suitable for each hierarchically divided encoding block is selected from available 1 or more encoding modes (1 or more intra-encoding modes, 1 or more inter-encoding modes).
Further, the encoding control unit 1 performs the following processing: for each coding block, a quantization parameter and a transform block size used when a difference image is compressed are determined, and an intra prediction parameter or an inter prediction parameter used when prediction processing is performed is determined. The quantization parameter and the transform block size are included in the prediction error coding parameter and are output to the transform/quantization unit 7, the inverse quantization/inverse transform unit 8, the variable length coding unit 13, and the like.
The encoding control unit 1 constitutes encoding control means.
The block dividing unit 2 performs the following processing: when a video signal representing an input image is input, the input image represented by the video signal is divided into coding blocks of the maximum size determined by the coding control unit 1, and the coding blocks are hierarchically divided until the number of layers reaches the upper limit determined by the coding control unit 1. In addition, the block division part 2 constitutes a block division unit.
The changeover switch 3 performs the following processing: the encoded block divided by the block dividing unit 2 is output to the intra prediction unit 4 if the encoding mode selected by the encoding control unit 1 is an intra encoding mode, and the encoded block divided by the block dividing unit 2 is output to the motion compensation prediction unit 5 if the encoding mode selected by the encoding control unit 1 is an inter encoding mode.
The intra prediction unit 4 performs the following processing: when the coded block divided by the block dividing unit 2 is received from the switch 3, intra-frame prediction processing is performed on the coded block based on the intra-frame prediction parameters output from the coding control unit 1 using the coded image signal within the frame, thereby generating a predicted image.
After the predicted image is generated, the intra prediction unit 4 selects a filter from among 1 or more filters prepared in advance according to the state of various parameters related to the encoding of the block to be subjected to the filtering process, performs the filtering process on the predicted image using the selected filter, and outputs the filtered predicted image to the subtraction unit 6 and the addition unit 9.
The filter is selected in consideration of at least 1 or more of the next 4 parameters.
Parameter (1)
The block size of the predicted image
Parameter (2)
Quantization parameter determined by encoding control unit 1
Parameter (3)
Distance between an encoded image signal within a frame used for generating a predicted image and a pixel to be subjected to filter processing
Parameter (4)
Intra prediction parameters determined by the encoding control unit 1
The switcher 3 and the intra prediction unit 4 constitute intra prediction means.
The motion compensation prediction unit 5 performs the following processing: when the encoding control unit 1 selects the inter-encoding mode as the encoding mode suitable for the encoding block divided by the block dividing unit 2, a prediction image is generated by performing motion compensation prediction processing on the encoding block using a reference image of 1 frame or more stored in the motion compensation prediction frame memory 12 based on the inter-prediction parameters output from the encoding control unit 1.
The selector switch 3 and the motion compensation prediction unit 5 constitute motion compensation prediction means.
The subtracting unit 6 performs the following processing: the difference image (coding block-prediction image) is generated by subtracting the prediction image generated by the intra prediction unit 4 or the motion compensation prediction unit 5 from the coding block divided by the block division unit 2. The subtraction unit 6 constitutes a difference image generation means.
The transform/quantization unit 7 performs the following processing: the transform processing (for example, orthogonal transform processing such as DCT (discrete cosine transform) and KL transform in which a specific learning series is subjected to base design in advance) of the difference image generated by the subtraction unit 6 is performed in units of transform block sizes included in the prediction error encoding parameters output from the encoding control unit 1, and the transform coefficients of the difference image are quantized using the quantization parameters included in the prediction error encoding parameters, and the quantized transform coefficients are output as compressed data of the difference image. In addition, the transform/quantization section 7 constitutes an image compression unit.
The inverse quantization/inverse transformation unit 8 performs the following processing: the compressed data output from the transform/quantization unit 7 is inversely quantized using the quantization parameter included in the prediction error coding parameter output from the coding control unit 1, and inverse transform processing (for example, inverse transform processing such as inverse DCT (inverse discrete cosine transform) and inverse KL transform) of the inversely quantized compressed data is performed on the transform block size unit included in the prediction error coding parameter, and the compressed data after the inverse transform processing is output as a locally decoded prediction error signal.
The adder 9 performs the following processing: the locally decoded prediction error signal output from the inverse quantization/inverse transformation unit 8 and the prediction signal indicating the prediction image generated by the intra prediction unit 4 or the motion compensation prediction unit 5 are added to generate a locally decoded image signal indicating a locally decoded image.
The intra-prediction memory 10 is a recording medium such as a RAM that stores the local decoded image represented by the local decoded image signal generated by the adder 9 as an image to be used by the intra-prediction unit 4 in the next intra-prediction process.
The loop filter unit 11 performs the following processing: the coding distortion included in the local decoded image signal generated by the adder 9 is compensated, and the local decoded image represented by the local decoded image signal after the coding distortion compensation is output to the motion compensation prediction frame memory 12 as a reference image.
The motion-compensated prediction frame memory 12 is a recording medium such as a RAM that stores the local decoded image after the filtering process by the loop filter unit 11 as a reference image used by the motion-compensated prediction unit 5 in the next motion-compensated prediction process.
The variable length coding unit 13 performs the following processing: the compressed data output from the transform/quantization unit 7, the coding mode and the prediction error coding parameter output from the coding control unit 1, the intra-frame prediction parameter output from the intra-frame prediction unit 4, or the inter-frame prediction parameter output from the motion compensation prediction unit 5 are subjected to variable length coding, and a bit stream in which the compressed data, the coding mode, the prediction error coding parameter, and the encoded data of the intra-frame prediction parameter/inter-frame prediction parameter are multiplexed is generated. In addition, the variable length coding part 13 constitutes a variable length coding unit.
Fig. 2 is a block diagram showing a moving picture decoding apparatus according to embodiment 1 of the present invention.
In fig. 2, the variable length decoding unit 51 performs the following processing: compressed data, a coding mode, a prediction error coding parameter, and an intra prediction parameter/inter prediction parameter relating to each coding block divided hierarchically are variable-length decoded from coded data multiplexed on a bit stream, and the compressed data and the prediction error coding parameter are output to an inverse quantization/inverse transformation unit 55, and the coding mode, the intra prediction parameter, and the inter prediction parameter are output to a switch 52. The variable length decoding unit 51 constitutes a variable length decoding means.
The changeover switch 52 performs the following processing: when the encoding mode for the encoding block outputted from the variable length decoding unit 51 is an intra encoding mode, the intra prediction parameters outputted from the variable length decoding unit 51 are outputted to the intra prediction unit 53, and when the encoding mode is an inter encoding mode, the inter prediction parameters outputted from the variable length decoding unit 51 are outputted to the motion compensation prediction unit 54.
The intra prediction unit 53 performs the following processing: an intra-frame prediction process for the encoded block is performed based on the intra-frame prediction parameter output from the changeover switch 52 using the decoded image signal within the frame, thereby generating a predicted image.
After the predicted image is generated, the intra prediction unit 53 selects a filter from among 1 or more filters prepared in advance according to the state of various parameters related to decoding of the block to be subjected to filtering processing, performs filtering processing on the predicted image using the selected filter, and outputs the filtered predicted image to the adder 56.
The filter is selected in consideration of at least 1 or more of the next 4 parameters.
Parameter (1)
The block size of the predicted image
Parameter (2)
The variable length decoding unit 51 variable length decodes the quantization parameter
Parameter (3)
Distance between decoded image signal and pixel to be filtered within frame used for generating predicted image
Parameter (4)
Intra prediction parameters variable-length decoded by the variable-length decoding unit 51
The switch 52 and the intra prediction unit 53 constitute intra prediction means.
The motion compensation prediction unit 54 performs the following processing: a prediction image is generated by performing motion compensation prediction processing on the coding block based on the inter prediction parameters output from the selector switch 52 using the reference image of 1 frame or more stored in the motion compensation prediction frame memory 59.
The selector switch 52 and the motion compensation prediction unit 54 constitute motion compensation prediction means.
The inverse quantization/inverse transformation unit 55 performs the following processing: the compressed data relating to the coding block output from the variable length decoding unit 51 is inversely quantized using the quantization parameter included in the prediction error coding parameter output from the variable length decoding unit 51, and inverse transform processing (for example, inverse DCT (inverse discrete cosine transform), inverse KL transform, or other inverse transform processing) is performed on the inversely quantized compressed data in units of transform block sizes included in the prediction error coding parameter, so that the compressed data after the inverse transform processing is output as a decoded prediction error signal (signal indicating a difference image before compression). The inverse quantization/inverse transformation unit 55 constitutes a difference image generation unit.
The adder 56 performs the following processing: the decoded prediction error signal output from the inverse quantization/inverse transformation unit 55 and the prediction signal indicating the prediction image generated by the intra prediction unit 53 or the motion compensation prediction unit 54 are added to generate a decoded image signal indicating a decoded image. The adder 56 constitutes decoded image generation means.
The intra-prediction memory 57 is a recording medium such as a RAM that stores the decoded image represented by the decoded image signal generated by the adder 56 as an image to be used by the intra-prediction unit 53 in the next intra-prediction process.
The loop filter unit 58 performs the following processing: the coding distortion included in the decoded image signal generated by the adder 56 is compensated, and the decoded image represented by the decoded image signal after the coding distortion compensation is output to the motion-compensated prediction frame memory 59 as a reference image.
The motion compensation prediction frame memory 59 is a recording medium such as a RAM that stores the decoded image after the filtering process by the loop filter unit 58 as a reference image used by the motion compensation prediction unit 54 in the next motion compensation prediction process.
In fig. 1, it is assumed that the coding control unit 1, the block dividing unit 2, the switch 3, the intra prediction unit 4, the motion compensation prediction unit 5, the subtraction unit 6, the transformation/quantization unit 7, the inverse quantization/inverse transformation unit 8, the addition unit 9, the loop filter unit 11, and the variable length coding unit 13, which are components of the moving image coding apparatus, are each configured by dedicated hardware (for example, a semiconductor integrated circuit on which a CPU is mounted, a monolithic microcomputer, or the like), but in the case where the moving image coding apparatus is configured by a computer, a program describing the processing contents of the coding control unit 1, the block dividing unit 2, the switch 3, the intra prediction unit 4, the motion compensation prediction unit 5, the subtraction unit 6, the transformation/quantization unit 7, the inverse quantization/inverse transformation unit 8, the addition unit 9, the loop filter unit 11, and the variable length coding unit 13 may be stored in a memory of the computer, the program stored in the memory is executed by the CPU of the computer.
Fig. 3 is a flowchart showing the processing contents of the moving image coding apparatus according to embodiment 1 of the present invention.
In fig. 2, it is assumed that the variable length decoding unit 51, the switch 52, the intra prediction unit 53, the motion compensation prediction unit 54, the inverse quantization/inverse transformation unit 55, the addition unit 56, and the loop filter unit 58, which are components of the moving image decoding apparatus, are each configured by dedicated hardware (for example, a semiconductor integrated circuit on which a CPU is mounted, a monolithic microcomputer, or the like), but when the moving image decoding apparatus is configured by a computer, a program describing the processing contents of the variable length decoding unit 51, the switch 52, the intra prediction unit 53, the motion compensation prediction unit 54, the inverse quantization/inverse transformation unit 55, the addition unit 56, and the loop filter unit 58 may be stored in a memory of the computer, and the CPU of the computer may execute the program stored in the memory.
Fig. 4 is a flowchart showing the processing contents of the moving picture decoding apparatus according to embodiment 1 of the present invention.
Next, the operation will be described.
First, the processing contents of the moving image encoding device of fig. 1 are explained.
First, the encoding control unit 1 determines the maximum size of an encoding block that is a processing unit when performing intra prediction processing (intra-frame prediction processing) or motion compensation prediction processing (inter-frame prediction processing), and determines the upper limit number of layers when the encoding block of the maximum size is hierarchically divided (step ST1 in fig. 3).
As a method of determining the maximum size of the coding block, for example, a method of determining a size corresponding to the resolution of the input image for all pictures is considered.
In addition, the following methods and the like are considered: the difference in complexity of local motion of an input image is quantified as a parameter, and the maximum size is determined to be a small value in a picture with a large motion and a large value in a picture with a small motion.
As a method of setting the upper limit number of layers, for example, the following method is considered: the more intense the motion of the input image, the larger the number of layers, the more detailed the motion can be detected, and if the motion of the input image is small, the number of layers is set to be suppressed.
The encoding control unit 1 selects an encoding mode suitable for each hierarchically divided encoding block from among available 1 or more encoding modes (M intra-encoding modes and N inter-encoding modes) (step ST 2).
The method of selecting the coding mode by the coding control unit 1 is a known technique, and therefore, a detailed description thereof is omitted, but for example, there are the following methods: coding processing for a coding block is performed using an arbitrary coding mode that can be used to verify coding efficiency, and among a plurality of available coding modes, a coding mode with the best coding efficiency is selected.
The encoding control unit 1 determines a quantization parameter and a transform block size to be used when compressing a difference image, and determines an intra prediction parameter or an inter prediction parameter to be used when performing prediction processing for each encoding block.
The encoding control unit 1 outputs the prediction error encoding parameters including the quantization parameter and the transform block size to the transform/quantization unit 7, the inverse quantization/inverse transform unit 8, and the variable length coding unit 13. The prediction error encoding parameters are output to the intra prediction unit 4 as necessary.
When a video signal representing an input image is input, the block dividing unit 2 divides the input image represented by the video signal into coding blocks of the maximum size determined by the coding control unit 1, and hierarchically divides the coding blocks until the number of layers reaches the upper limit determined by the coding control unit 1.
Here, fig. 5 is an explanatory diagram showing a case where the coding block of the maximum size is hierarchically divided into a plurality of coding blocks.
In the example of fig. 5, the coding block of the maximum size is the coding block B of the 0 th hierarchy0In the luminance component, has (L)0,M0) The size of (c).
In addition, in the example of fig. 5, the largest-sized code block B is coded0As a starting point, the coding block B is obtained by hierarchically dividing the coding block B into a 4-way tree structure up to a predetermined depth that is separately determinedn。
At depth n, block B is codednIs size (L)n,Mn) The image area of (2).
Wherein L isnAnd MnEither the same or different, but L is shown in the example of FIG. 5n=MnThe situation (2).
Later, encode block BnIs defined as a code block BnOf the luminance component (L)n,Mn)。
The block division unit 2 performs 4-way tree division, so (L)n+1,Mn+1)=(Ln/2,MnThe/2) is always true.
However, in a color video signal (4:4:4 format) in which all color components have the same number of samples, such as an RGB signal, the size of all color components is (L)n,Mn) But in the case of processing the 4:2:0 format, of the coding block of the corresponding color difference componentSize is (L)n/2,Mn/2)。
Later, the coding block B at the nth levelnIn (2) is marked as m (B)n)。
In the case of a color video signal composed of a plurality of color components, the mode m (B) is encodedn) It is possible to use a mode for each color component, but hereinafter, unless otherwise specified, a description will be given of a coding mode indicating a luminance component for a YUV signal or a coding block of 4:2:0 format.
In coding mode m (B)n) There are 1 or more INTRA-coding modes (collectively referred to as "INTRA"), 1 or more INTER-coding modes (collectively referred to as "INTER"), and the coding control unit 1 selects, as described above, all or a subgroup of the coding modes available in the picture for the coding block BnThe coding mode with the best coding efficiency is selected.
Coding block BnAs shown in fig. 5, is further divided into 1 or more prediction processing units (partitions).
Later, it will belong to coding block BnIs described as Pi n(i: block number in nth hierarchy).
How to proceed with belonging to coding block BnIs divided into blocks Pi nIs included as information in the coding mode m (B)n) In (1).
For block Pi nAll according to coding mode m (B)n) Prediction processing is performed, but may be performed for each block Pi nRespective prediction parameters are selected.
The encoding control unit 1 generates a block division state as shown in fig. 6, for example, for the largest-sized encoding block, and specifies the encoding block Bn。
The hatched portion of fig. 6(a) represents the distribution of the divided blocks, andFIG. 6(B) is a 4-way tree diagram showing that the coding mode m (B) is assigned to the hierarchically divided blocksn) The condition of (2).
In fig. 6(B), the node surrounded by □ indicates that the coding mode m (B) is assignedn) Node (coding block B)n)。
When the encoding control part 1 aims at each encoding block BnIs divided into blocks Pi nSelecting the best coding mode m (B)n) If the coding mode m (B)n) In the intra coding mode (step ST3), the switch 3 switches the coding block B divided by the block dividing unit 2 to the other coding block BnIs divided into blocks Pi nAnd outputs the result to the intra prediction unit 4.
On the other hand, if the coding mode m (B)n) In the inter-coding mode (step ST3), the coding block B divided by the block divider 2 is codednIs divided into blocks Pi nAnd outputs the result to the motion compensation prediction unit 5.
If the intra prediction unit 4 receives the coding block B from the switch 3nIs divided into blocks Pi nThen, the coded image signal within the frame is used to implement the intra prediction parameter for the coding block B based on the intra prediction parameter outputted from the coding control unit 1nIs divided into blocks Pi nThereby generating an intra-prediction image Pi n(step ST 4).
The intra prediction unit 4 generates the intra prediction image Pi nThen, a filter is selected from among 1 or more filters prepared in advance according to the state of various parameters related to the encoding of the block to be filtered, and the intra-prediction image P is subjected to the filter using the selected filteri nAnd (4) filtering processing.
If the intra prediction unit 4 performs the intra prediction on the intra prediction image Pi nThe intra prediction image P after the filtering processing is processedi nOutput to the subtracting section 6 and the adding section 9, but in order to do soThe moving picture decoding apparatus of fig. 2 can also generate the same intra-prediction image Pi nThe intra prediction parameters are output to the variable length coding unit 13.
The processing contents of the intra prediction unit 4 are roughly as described above, but the details of the processing contents will be described later.
If the motion compensation prediction unit 5 receives the coding block B from the switch 3nIs divided into blocks Pi nThen, the reference image of 1 frame or more stored in the motion compensation prediction frame memory 12 is used to perform the inter-frame prediction on the coding block B based on the inter-frame prediction parameters outputted from the coding control unit 1nIs divided into blocks Pi nThereby generating an inter-prediction image Pi n(step ST 5).
Since a technique for generating a prediction image by performing motion compensation prediction processing is a known technique, detailed description thereof is omitted.
If the intra prediction unit 4 or the motion compensation prediction unit 5 generates a prediction image (intra prediction image P)i nAnd inter-prediction image Pi n) The subtracting section 6 then subtracts the coded block B divided by the block dividing section 2 from the coded block BnIs divided into blocks Pi nThe prediction image generated by the intra prediction unit 4 or the motion compensation prediction unit 5 (intra prediction image P) is subtractedi nAnd inter-prediction image Pi n) Thereby generating a difference image, and generating a prediction error signal e representing the difference imagei nThe result is output to the transform/quantization unit 7 (step ST 6).
The transformation/quantization unit 7 receives the prediction error signal e representing the difference image from the subtraction unit 6i nThe difference image is subjected to a transform process (for example, an orthogonal transform process such as DCT (discrete cosine transform) or KL transform in which a specific learning series is subjected to base design in advance) in units of transform block sizes included in prediction error coding parameters outputted from the coding control unit 1, and the prediction error coding parameters are usedThe quantization parameter included in (b) quantizes the transform coefficient of the difference image, and outputs the quantized transform coefficient to the inverse quantization/inverse transform unit 8 and the variable length coding unit 13 as compressed data of the difference image (step ST 7).
Upon receiving the compressed data of the difference image from the transform/quantization unit 7, the inverse quantization/inverse transform unit 8 inversely quantizes the compressed data of the difference image using the quantization parameter included in the prediction error coding parameter outputted from the coding control unit 1, and performs inverse transform processing (for example, inverse transform processing such as inverse DCT (inverse discrete cosine transform) and inverse KL transform) on the inversely quantized compressed data in units of the transform block size included in the prediction error coding parameter, thereby using the compressed data after the inverse transform processing as the locally decoded prediction error signal ei nThe cap (the addition of "^" to the alphabetic character is described as a cap due to the relation of the electronic application) is output to the addition section 9 (step ST 8).
The adder 9 receives the local decoding prediction error signal e from the inverse quantization/inverse transformation unit 8i nCap, then the local decoded prediction error signal ei nA cap indicating a prediction image (intra prediction image P) generated by the intra prediction unit 4 or the motion compensation prediction unit 5i nAnd inter-prediction image Pi n) Is added to generate a locally decoded block image Pi nThe cap or the local decoded coded block image, i.e., the local decoded image, as a set thereof (step ST 9).
When the local decoded image is generated, the adder 9 stores the local decoded image signal representing the local decoded image in the intra prediction memory 10, and outputs the local decoded image signal to the loop filter 11.
Up to all coding blocks B hierarchically partitionednUntil the process of (4) is completed, the process of steps ST3 to ST9 is repeatedly performed, and if the process is performed for all the code blocks BnIs completed, the process proceeds to step ST12 (steps ST10, ST11)。
The variable length coding unit 13 entropy-codes the compressed data output from the transform/quantization unit 7, the coding mode (including information indicating the division state of the coding block) and the prediction error coding parameter output from the coding control unit 1, and the intra prediction parameter output from the intra prediction unit 4 or the inter prediction parameter output from the motion compensation prediction unit 5.
The variable length coding unit 13 multiplexes the compressed data, which is the result of the entropy coding, with the coding mode, the prediction error coding parameter, and the coded data of the intra prediction parameter/inter prediction parameter, and generates a bit stream (step ST 12).
Upon receiving the local decoded image signal from the adder 9, the loop filter unit 11 compensates for coding distortion included in the local decoded image signal, and stores the local decoded image represented by the local decoded image signal after compensation of coding distortion in the motion compensated prediction frame memory 12 as a reference image (step ST 13).
The filtering process by the loop filter unit 11 may be performed in units of the largest coding block or each coding block of the local decoded image signal output from the adder 9, may be performed in units of a plurality of largest coding blocks, or may be performed in units of 1 picture after the local decoded image signal of 1 picture is output.
Next, the processing content of the intra prediction unit 4 will be described in detail.
FIG. 7 shows a block B being encodednInner each block Pi nAn illustration of an example of the optional intra prediction parameters (intra prediction mode) in (1).
In the example of fig. 7, the intra prediction mode and the prediction direction vector indicated by the intra prediction mode are shown, and it is designed that the relative angle between the prediction direction vectors becomes smaller as the number of selectable intra prediction modes increases.
The intra prediction unit 4 performs intra prediction on the block Pi nIntra prediction parameter, intra prediction image Pi nFor the block P, the selection parameters of the filter used for the generation of (1)i nThe intra prediction process of (1).
The following description is based on the description for the partition Pi nThe intra prediction parameter (intra prediction mode) of the luminance signal of (1) generates intra processing of the intra prediction signal of the luminance signal.
Here, the block P will be dividedi nIs set to bei n×mi nA pixel.
FIG. 8 is a view showingi n=mi nWhen the value is 4, block P is generatedi nAn explanatory diagram of an example of a pixel used for predicting a value of an intra-pixel.
In FIG. 8, the block P is to be divided into blocksi nContiguous encoded upper block of pixels (2 × l)i n+1) and left-blocked pixels (2 × m)i n) The number of pixels used for prediction is not limited to the number of pixels shown in fig. 8.
In fig. 8, pixels of 1 row or 1 column adjacent to each other are used for prediction, but pixels of 2 rows or 2 columns or more may be used for prediction.
In the case of block Pi nWhen the index value of the intra prediction mode of (2) (average value prediction), the average value of the adjacent pixels of the upper block and the adjacent pixels of the left block is set as the block Pi nAnd generating an intermediate prediction image by predicting the intra-pixel value.
When the index value of the intra prediction mode is other than 2 (average value prediction), the prediction direction vector v represented by the index valuep(dx, dy), block P is generatedi nThe predicted value of the pixel within.
Wherein a block P of a pixel (a pixel to be predicted) which is to generate a predicted valuei nThe relative coordinates (with the upper left pixel of the block as the origin) within (x, y) are set as (x, y).
The position of the reference pixel used for prediction is an intersection point between a and an adjacent pixel as shown below.
Where k is a positive scalar value.
When the reference pixel is at an integer pixel position, the integer pixel is set as a prediction value of the prediction target pixel.
On the other hand, when the reference pixel is not at the integer pixel position, an interpolated pixel generated from the integer pixel adjacent to the reference pixel is used as a predicted value.
In the example of fig. 8, since the reference pixel is not at the integer pixel position, the prediction value is calculated by interpolating 2 pixels adjacent to the reference pixel. However, the predicted value is not limited to being generated from 2 adjacent pixels, and an interpolated pixel may be generated as the predicted value from 2 or more adjacent pixels.
Next, a final predicted image is obtained by performing filtering processing on the intermediate predicted image (predicted value) generated in the above step.
Hereinafter, a specific filtering process will be described.
A filter to be used is selected by a method described later from among at least one or more filters prepared in advance, and filtering processing is performed on each pixel of the intermediate predicted image in accordance with the following expression (1).
In the formula (1), an(N is 0, 1.. times.n) is a coefficient (a) related to the reference pixel0,a1,...,aN-1) And a bias coefficient aNThe constructed filter coefficients.
pn(N-0, 1.., N-1) indicates that the filter processing target pixel p is included0The reference pixel of the filter of (2).
s(pn) A luminance value, s-cap (p) representing each reference pixel0) Indicating a pixel p to be subjected to filter processing0The luminance value after the filtering processing in (1).
However, the filter coefficient may be configured without the offset coefficient aN. N is an arbitrary reference pixel number.
Fig. 9 is an explanatory diagram illustrating an example of the reference pixel arrangement in the case where N is 5.
While performing the above-described filtering process, blocks P are dividedi nSize (l)i n×mi n) The larger the size is, the more likely to be a nonlinear edge or the like in the input image, and the more likely to be a deviation from the prediction direction of the intermediate predicted image, so it is preferable to smooth the intermediate predicted image.
Further, the larger the quantization value of the prediction error, the larger the quantization distortion generated in the decoded image, and the block P is associated withi nSince the prediction accuracy of the inter prediction image generated by the adjacent encoded pixels is lower, it is preferable to prepare for roughly expressing the block Pi nSuch smoothed predicted image.
Further, in the same block Pi nOf the pixels in the intra block, the farther from the intra block P used for generating the intermediate prediction imagei nSince the pixels of adjacent encoded pixels are more likely to have a deviation such as an edge between the intermediate predicted image and the input image, it is preferable to smooth the predicted image and suppress a rapid increase in prediction error when the deviation occurs.
In addition, not only the strength of the filter needs to be changed, but also the reference pixels of the filter need to be appropriately arranged in accordance with the prediction direction of the intermediate predicted image so as to prevent the pattern such as the edge of the intermediate predicted image from being unnaturally distorted.
Therefore, in the filter selection process, the filter is selected in consideration of the following 4 parameters (1) to (4).
(1) Block Pi nSize (l)i n×mi n)
(2) Quantization parameter contained in prediction error coding parameter
(3) The distance between the group of encoded pixels used for generating the intermediate prediction image (the "pixels used for prediction" shown in fig. 8) and the pixel to be subjected to the filtering process
(4) Index value of intra prediction mode when generating inter prediction image
Specifically, the block Pi nSize (l)i n×mi n) The larger the quantization parameter, the larger the quantization value determined by the quantization parameter, the larger the pixel to be subjected to filtering processing and the pixel located in the block Pi nThe larger the distance between the encoded pixel groups used for generating the left and upper intermediate predicted images, the stronger the smoothing intensity is, and the filtering intensity and the reference pixel arrangement in consideration of the prediction direction of the intra prediction mode are used. That is, adaptive selection of a filter corresponding to the parameter is realized by associating an appropriate filter from among filter groups prepared in advance for each combination of the parameters.
However, the type of the filter strength may be any type as long as it is 2 or more, and the weakest filter may be defined as a process equivalent to a process without the filter process as the expression of the strength of the filter. Therefore, the following filtering process may be configured: only a specific pixel in the intermediate prediction image is subjected to filtering processing, and the weakest filtering processing, that is, no filtering processing is performed on the other pixels.
In the above description, the necessary number of filters are prepared in advance, but the filters may be defined as a function of the filter selection parameter and used to calculate the filters from the values of the filter selection parameter.
Further, in the above description, an example in which the filter is selected in consideration of 4 parameters (1) to (4) has been described, but the filter may be selected in consideration of at least 1 or more of the 4 parameters (1) to (4). As an example, the following structure can be given: when (3) and (4) of the 4 parameters are considered, a filter having a stronger intensity is selected as the distance from the pixel used for prediction of each pixel to be filtered (in the example of fig. 8, the distance from the "reference pixel" adjacent to the upper end of the block) is larger according to the prediction direction of the intra prediction mode.
In addition, since the 4 parameters (1) to (4) are parameters known also on the moving image decoding apparatus side, there is no occurrence of any additional information to be encoded by performing the filtering process.
Through the same steps, a block P is generatedi nPredicted pixels of all pixels of the intra luminance signal are output, and the generated intra prediction image P is outputi n。
With respect to intra-predicted image Pi nThe intra prediction parameters used for the generation of (2) are output to the variable length coding unit 13 so as to be multiplexed into a bit stream.
For partition Pi nThe intra color difference signal is also subjected to intra prediction processing based on the intra prediction parameters (intra prediction mode) in the same procedure as the luminance signal, and the intra prediction parameters used for generating the intra prediction image are output to the variable length coding unit 13.
However, the intra prediction of the color difference signal may be configured to perform the filtering process described above in the same manner as the luminance signal, or may be configured not to perform the filtering process described above.
Next, the processing content of the image decoding apparatus of fig. 2 will be described.
When the bit stream output from the image coding apparatus of fig. 1 is input, the variable length decoding unit 51 performs variable length decoding processing on the bit stream, and decodes information on the frame size in units of a sequence or in units of pictures of 1 frame or more (step ST21 of fig. 4).
The variable length decoding unit 51 determines the maximum size of an encoding block to be a processing unit when performing intra prediction processing (intra-frame prediction processing) or motion compensation prediction processing (inter-frame prediction processing) and determines the upper limit number of layers when the encoding block of the maximum size is hierarchically divided, by the same procedure as the encoding control unit 1 of fig. 1 (step ST 22).
For example, in the case where the maximum size of the coding block is determined in accordance with the resolution of the input image in the image coding apparatus, the maximum size of the coding block is determined in accordance with the frame size information decoded before.
When information indicating the maximum size of the coding block and the upper limit number of layers is multiplexed in a bit stream, the information decoded from the bit stream is referred to.
Maximum size coded block B multiplexed in bit stream0Coding mode m (B)0) In (1), an encoded block B representing the maximum size is included0So that the variable length decoding unit 51 decodes the coding block B of the maximum size multiplexed in the bit stream0Coding mode m (B)0) Thereby determining each coding block B divided hierarchicallyn(step ST 23).
If the variable length decoding unit 51 determines each of the encoding blocks BnThen the coding block B is decodednCoding mode m (B)n) According to the coding mode m (B)n) Is divided into blocks Pi nInformation of (2), determining to belong to coding block BnIs divided into blocks Pi n。
If the variable length decoding unit 51 determines that the coded block B belongs to the coded block BnIs divided into blocks Pi nFor each block Pi nOut of decodingCompressed data, encoding mode, prediction error encoding parameters, intra prediction parameters/inter prediction parameters (step ST 24).
I.e. in the coding block BnAssigned coding mode m (B)n) Is intra-coded mode, for each block P belonging to a coded blocki nThe intra prediction parameters are decoded.
In pair of coding block BnAssigned coding mode m (B)n) In the case of inter-coding mode, for each block P belonging to a coding blocki nThe inter prediction parameters are decoded.
The block which becomes a prediction processing unit is further divided into 1 or more blocks which become transform processing units according to the transform block size information included in the prediction error encoding parameter, and compressed data (transform coefficient after transform/quantization) is decoded for each block which becomes a transform processing unit.
The switch 52 switches the encoding block B determined by the variable length decoding unit 51nIs divided into blocks Pi nCoding mode m (B)n) In the case of the intra coding mode (step ST25), the intra prediction parameters output from the variable length decoding unit 51 are output to the intra prediction unit 53.
On the other hand, in block Pi nCoding mode m (B)n) In the inter coding mode (step ST25), the inter prediction parameters output from the variable length decoding unit 51 are output to the motion compensation prediction unit 54.
Upon receiving the intra prediction parameters from the switch 52, the intra prediction unit 53 uses the decoded image signal within the frame, and performs intra prediction on the coding block B based on the intra prediction parameters, in the same manner as the intra prediction unit 4 of fig. 1nIs divided into blocks Pi nThereby generating an intra-prediction image Pi n(step ST 26).
The intra prediction unit 53 generates intra predictionImage Pi nIn this case, a filter is selected from among 1 or more filters prepared in advance by the same method as the intra prediction unit 4 in fig. 1 according to the state of various parameters related to decoding of the block to be filtered, and the intra prediction image P is subjected to the filter using the selected filteri nFiltering the filtered intra-prediction image Pi nAs the final intra-predicted image.
In addition, although the above description has been made on the premise that a necessary number of filters are prepared in advance, in the case where the intra prediction unit 4 in fig. 1 defines a filter as a function of the parameters so as to calculate the filter based on the states of the parameters used for filter selection, the intra prediction unit 53 may be configured to define a filter as a function of the parameters so as to calculate the filter based on the states of various parameters related to decoding of the block to be filtered.
Upon receiving the inter prediction parameter from the switch 52, the motion compensation prediction unit 54 performs the inter prediction parameter for the coding block B using the reference image of 1 frame or more stored in the motion compensation prediction frame memory 59, based on the inter prediction parameternIs divided into blocks Pi nThereby generating an inter-prediction image Pi n(step ST 27).
The inverse quantization/inverse transform unit 55 inversely quantizes the compressed data on the coding block outputted from the variable length decoding unit 51 using the quantization parameter included in the prediction error coding parameter outputted from the variable length decoding unit 51, performs inverse transform processing (for example, inverse DCT (inverse discrete cosine transform), inverse KL transform, or other inverse transform processing) on the inversely quantized compressed data in units of transform block sizes included in the prediction error coding parameter, and outputs the compressed data after the inverse transform processing to the addition unit 56 as a decoded prediction error signal (signal indicating a difference image before compression) (step ST 28).
Upon receiving the decoded prediction error signal from the inverse quantization/inverse transformation unit 55, the adder unit 56 adds the decoded prediction error signal and the prediction signal indicating the prediction image generated by the intra prediction unit 53 or the motion compensation prediction unit 54 to generate a decoded image, stores the decoded image signal indicating the decoded image in the intra prediction memory 57, and outputs the decoded image signal to the loop filter unit 58 (step ST 29).
Up to all coding blocks B hierarchically partitionednThe processing of steps ST23 to ST29 is repeatedly performed at the processing completion position of (1) (step ST 30).
Upon receiving the decoded image signal from the adder 56, the loop filter unit 58 compensates for coding distortion included in the decoded image signal, and stores the decoded image represented by the decoded image signal after compensation of coding distortion in the motion-compensated prediction frame memory 59 as a reference image (step ST 31).
The filtering process by the loop filter unit 58 may be performed in units of the largest coding block or each coding block of the decoded image signal output from the adder unit 56, or may be performed collectively by 1 picture after outputting the decoded image signal corresponding to the macroblock of 1 picture.
As described above, according to embodiment 1, when the intra prediction unit 4 of the moving image encoding apparatus performs intra prediction processing using an encoded image signal within a frame to generate an intra prediction image, the intra prediction unit selects a filter from 1 or more filters prepared in advance according to the state of various parameters related to encoding of a block to be filtered, and performs filtering processing on the prediction image using the selected filter.
In addition, according to embodiment 1, the intra prediction unit 4 performs the intra prediction on (1) the block Pi nSize (l)i n×mi n) Quantization parameter included in prediction error encoding parameter (2), and quantization parameter used for generating inter-prediction image (3)The distance between the encoded pixel group and the pixel to be filtered, and (4) the index value of the intra prediction mode when the intermediate prediction image is generated, the filter is selected in consideration of at least 1 or more parameters, and therefore the following effects are obtained: in the intermediate prediction image having a high correlation with the image to be encoded, a local prediction error generated when a slight deviation occurs between the direction of an edge of the image to be encoded and the prediction direction or a slight distortion occurs in the edge is suppressed, and an effect of improving the prediction efficiency is obtained.
According to embodiment 1, when the intra prediction unit 53 of the moving image decoding apparatus performs intra prediction processing using the decoded image signal within the frame to generate an intra prediction image, the intra prediction unit selects a filter from 1 or more filters prepared in advance according to the state of various parameters related to decoding of a block to be filtered, and performs filtering processing on the prediction image using the selected filter, and therefore the following effects are obtained: the locally generated prediction error is reduced, and the same intra-prediction image as the intra-prediction image generated by the moving image encoding device can be generated also on the moving image decoding device side.
In addition, according to embodiment 1, the intra prediction unit 53 performs the intra prediction on (1) the block Pi nSize (l)i n×mi n) The filter is selected in consideration of at least 1 or more parameter among (1) the quantization parameter included in the prediction error encoding parameter, (3) the distance between the encoded pixel group used when generating the intermediate predicted image and the pixel to be subjected to filtering processing, and (4) the index value of the intra prediction mode when generating the intermediate predicted image, and therefore the following effects are obtained: the present invention has been made in view of the above problems, and an object of the present invention is to provide a video encoding device capable of suppressing a local prediction error generated when a slight deviation occurs between the direction of an edge of an encoding target image and a prediction direction or a slight distortion occurs at the edge in an intermediate prediction image having a high correlation with the encoding target image, and generating an intra prediction image similar to the intra prediction image generated at the video encoding device even at the video decoding device.
Embodiment 2.
In embodiment 1 described above, the following example is shown: when performing intra-frame prediction processing using an already-encoded image signal within a frame to generate an intra-frame prediction image, the intra-frame prediction unit 4 selects a filter from 1 or more filters prepared in advance according to the state of various parameters related to encoding of a block to be subjected to filtering processing, and performs filtering processing on the prediction image using the filter. However, a wiener filter may be designed in which the sum of square errors between a block to be encoded and a predicted image is minimized, and when the degree of reduction in prediction error is higher when the wiener filter is used than when a filter selected from 1 or more filters prepared in advance is used, the wiener filter may be used instead of the selected filter to perform filtering processing on the predicted image.
The following specifically describes the processing contents.
In embodiment 1, the intra prediction units 4 and 53 select a filter from 1 or more filters prepared in advance, based on the state of various parameters related to the encoding of the block to be filtered. However, when the filter is selected in consideration of the 4 parameters (1) to (4), an appropriate filter can be selected from among the selection candidates, but when there is an optimal filter other than the selection candidates, the "optimal filtering process" cannot be performed.
In embodiment 2, an optimum filter is designed and subjected to filtering processing on a picture-by-picture basis on the moving picture encoding apparatus side, and the filter coefficients and the like of the filter are encoded, and the filter coefficients and the like are decoded on the moving picture decoding apparatus side and subjected to filtering processing using the filter.
As in embodiment 1, the intra prediction unit 4 of the moving image encoding apparatus performs intra prediction on the encoding block BnIs divided into blocks Pi nThereby generating an intra-prediction image Pi n。
In addition, the intra prediction unit 4 selects a filter from among 1 or more filters prepared in advance in the same manner as in embodiment 1 described above, according to the state of various parameters related to the encoding of the block to be filtered, and uses the selected filter to intra-predict the image Pi nAnd (6) carrying out filtering processing.
All the coding blocks B within the picture by the intra prediction unit 4nAfter the intra prediction parameters are determined, a wiener filter is designed in which the sum of square errors (average square error in the target region) of the input image and the intra predicted image in each region (region having the same filter index) in the picture using the same filter is the smallest.
With regard to the wiener filter, the autocorrelation matrix R of the intermediate predicted image signal s' can be passeds′s′And a cross-correlation matrix R of the input image signal s and the intermediate predicted image signal sss′The filter coefficient w is obtained from the following expression (4). Matrix Rs′s′,Rss′The size of (d) corresponds to the number of filter taps found.
If a wiener filter is designed, the intra prediction unit 4 determines that the following expression (5) holds true by setting the sum of square errors in a filter design target region when the filter process is performed using the wiener filter to D1, setting the code amount when information (for example, a filter coefficient) related to the wiener filter is encoded to R1, and setting the sum of square errors in the filter design target region when the filter process is performed using a filter selected by the same method as in embodiment 1 to D2.
D1+λ·R1<D2(5)
Where λ is a constant.
When equation (5) is satisfied, the intra prediction unit 4 performs the filtering process using the wiener filter instead of the filter selected by the method similar to that of embodiment 1.
On the other hand, when equation (5) is not satisfied, the filtering process is performed using a filter selected by the same method as in embodiment 1.
Here, although the evaluation is performed using the sum of squared errors D1 and D2, the evaluation is not limited to this, and instead of the sum of squared errors D1 and D2, the evaluation may be performed using other measures indicating the distortion of the prediction, such as the sum of absolute values of the errors.
When the filtering process is performed using a wiener filter, the intra prediction unit 4 needs filter coefficients of the wiener filter and filter update information indicating which index filter is replaced with the wiener filter.
Specifically, when the number of filters that can be selected by the filtering process using the filter selection parameter is L and the indices of 0 to L-1 are assigned to each filter, it is necessary to encode the value of "1" as the filter update information when the designed wiener filter is used for each index, and to encode the value of "0" as the filter update information when a filter prepared in advance is used.
The variable length coding unit 13 performs variable length coding on the filter update information output from the intra prediction unit 4, and multiplexes the coded data of the filter update information into a bitstream.
Here, although an example is shown in which a wiener filter is designed so that the average square error between an input image and a predicted image in a region in which the same filter is used is minimized for each region in a picture, a wiener filter may be configured so that the average square error between an input image and a predicted image in the region is minimized for each region in which the same filter is used, not for each picture but for each other specific region unit, or the filter design may be performed only for a specific picture or only when a specific condition is satisfied (for example, when a scene change detection function is added and a picture of a scene change is detected).
The variable length decoding unit 51 of the moving picture decoding apparatus variably decodes the filter update information from the encoded data multiplexed in the bit stream.
The intra prediction unit 53 performs prediction on the coding block B in the same manner as in embodiment 1 described abovenIs divided into blocks Pi nThereby generating an intra-prediction image Pi n。
Upon receiving the filter update information from the variable length decoding unit 51, the intra prediction unit 53 refers to the filter update information and checks whether or not the filter of the corresponding index is updated.
As a result of this confirmation, when the filter of a certain area is replaced with a wiener filter, the intra prediction unit 53 reads the filter coefficient of the wiener filter included in the filter update information, specifies the wiener filter, and performs an intra prediction image P using the wiener filteri nAnd (4) filtering processing.
On the other hand, in the state not substituted by wiener filterIn the region (b), a filter is selected by the same method as in embodiment 1, and the intra-prediction image P is implemented using the selected filteri nAnd (4) filtering processing.
As described above, according to embodiment 2, the wiener filter that minimizes the sum of square errors between the block to be encoded and the predicted image is designed, and when the degree of reduction in the prediction error is higher when the wiener filter is used than when a filter selected from 1 or more filters prepared in advance is used, the filtering process for the predicted image is performed using the wiener filter instead of the selected filter, so that the effect of reducing locally generated prediction errors can be achieved more than in embodiment 1.
In addition, the present invention can freely combine the respective embodiments, or can change any of the components of the respective embodiments, or can omit any of the components in the respective embodiments, within the scope of the present invention.
Industrial applicability
As described above, the moving image encoding device, the moving image decoding device, the moving image encoding method, and the moving image decoding method according to the present invention are suitable for a moving image encoding device and a moving image encoding method for efficiently encoding a moving image, a moving image decoding device and a moving image decoding method for efficiently decoding a moving image, and the like because the intra prediction means selects a filter from 1 or more filters prepared in advance according to the state of various parameters related to encoding of a block to be filtered, performs filtering processing on the predicted image using the filter, and outputs the predicted image after the filtering processing to the differential image generation means, when generating a predicted image by performing intra prediction processing using an already encoded image signal within a frame.
Claims (4)
1. An image decoding apparatus characterized in that,
an intra prediction unit that generates an intra prediction image by performing intra prediction processing for each of blocks that are units of prediction processing when an encoding mode related to an encoding block is an intra encoding mode;
the intra prediction unit generates an intermediate prediction image from a reference pixel in accordance with an intra prediction mode, performs filtering processing only on a pixel at a specific position of the intermediate prediction image to generate a final prediction image, and does not perform the filtering processing on pixels at other positions of the intermediate prediction image.
2. An image encoding device is characterized in that,
the intra prediction unit generates an intra prediction image by performing intra prediction processing for each of blocks which are units of prediction processing when an encoding mode related to an encoding block is an intra encoding mode,
the intra prediction unit generates an intermediate prediction image from a reference pixel in accordance with an intra prediction mode, performs filtering processing only on a pixel at a specific position of the intermediate prediction image to generate a final prediction image, and does not perform the filtering processing on pixels at other positions of the intermediate prediction image.
3. An image encoding method characterized by comprising, in a frame,
an intra prediction processing step of generating an intra prediction image by performing intra prediction processing for each of blocks which are units of prediction processing when an encoding mode related to an encoding block is an intra encoding mode,
in the intra prediction processing step, an intermediate prediction image is generated from a reference pixel in accordance with an intra prediction mode, a filtering process is performed only on a pixel at a specific position of the intermediate prediction image to generate a final prediction image, and the filtering process is not performed on a pixel at another position of the intermediate prediction image.
4. A method for decoding an image, characterized in that,
an intra prediction processing step of generating an intra prediction image by performing intra prediction processing for each of blocks which are units of prediction processing when an encoding mode related to an encoding block is an intra encoding mode,
in the intra prediction processing step, an intermediate prediction image is generated from a reference pixel in accordance with an intra prediction mode, a filtering process is performed only on a pixel at a specific position of the intermediate prediction image to generate a final prediction image, and the filtering process is not performed on a pixel at another position of the intermediate prediction image.
Applications Claiming Priority (3)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2010221471 | 2010-09-30 | ||
| JP2010-221471 | 2010-09-30 | ||
| PCT/JP2011/004122 WO2012042720A1 (en) | 2010-09-30 | 2011-07-21 | Motion-video encoding apparatus, motion-video decoding apparatus, motion-video encoding method, and motion-video decoding method |
Related Parent Applications (4)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| HK16113211.8A Division HK1225204B (en) | 2010-09-30 | 2013-08-08 | Motion-video encoding apparatus and method and motion-video decoding apparatus and method |
| HK16107127.3A Division HK1219594B (en) | 2010-09-30 | 2013-08-08 | Motion-video encoding apparatus, motion-video decoding apparatus, motion-video encoding method, and motion-video decoding method |
| HK16113209.2A Division HK1225203B (en) | 2010-09-30 | 2013-08-08 | Motion-video encoding apparatus and method and motion-video decoding apparatus and method |
| HK16107126.4A Division HK1219593B (en) | 2010-09-30 | 2013-08-08 | Motion-video encoding apparatus, motion-video decoding apparatus, motion-video encoding method, and motion-video decoding method |
Related Child Applications (4)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| HK16113211.8A Addition HK1225204B (en) | 2010-09-30 | 2013-08-08 | Motion-video encoding apparatus and method and motion-video decoding apparatus and method |
| HK16107127.3A Addition HK1219594B (en) | 2010-09-30 | 2013-08-08 | Motion-video encoding apparatus, motion-video decoding apparatus, motion-video encoding method, and motion-video decoding method |
| HK16113209.2A Addition HK1225203B (en) | 2010-09-30 | 2013-08-08 | Motion-video encoding apparatus and method and motion-video decoding apparatus and method |
| HK16107126.4A Addition HK1219593B (en) | 2010-09-30 | 2013-08-08 | Motion-video encoding apparatus, motion-video decoding apparatus, motion-video encoding method, and motion-video decoding method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| HK1182244A1 HK1182244A1 (en) | 2013-11-22 |
| HK1182244B true HK1182244B (en) | 2017-03-24 |
Family
ID=
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP6851429B2 (en) | Image decoding device, image decoding method, image coding device and image coding method | |
| CN105959706B (en) | Image coding apparatus and method, and image decoding apparatus and method | |
| HK1182244B (en) | Motion-video encoding apparatus, motion-video decoding apparatus, motion-video encoding method, and motion-video decoding method | |
| HK1225203A1 (en) | Motion-video encoding apparatus and method and motion-video decoding apparatus and method | |
| HK1225204A1 (en) | Motion-video encoding apparatus and method and motion-video decoding apparatus and method | |
| HK1219594B (en) | Motion-video encoding apparatus, motion-video decoding apparatus, motion-video encoding method, and motion-video decoding method | |
| HK1186323B (en) | Image encoding device, image decoding device, image encoding method, and image decoding method | |
| HK1219593B (en) | Motion-video encoding apparatus, motion-video decoding apparatus, motion-video encoding method, and motion-video decoding method | |
| HK1225204B (en) | Motion-video encoding apparatus and method and motion-video decoding apparatus and method | |
| HK1225203B (en) | Motion-video encoding apparatus and method and motion-video decoding apparatus and method |