HK1187469A - Moving image encoding device, moving image decoding device, moving image encoding method and moving image decoding method - Google Patents
Moving image encoding device, moving image decoding device, moving image encoding method and moving image decoding method Download PDFInfo
- Publication number
- HK1187469A HK1187469A HK13114068.3A HK13114068A HK1187469A HK 1187469 A HK1187469 A HK 1187469A HK 13114068 A HK13114068 A HK 13114068A HK 1187469 A HK1187469 A HK 1187469A
- Authority
- HK
- Hong Kong
- Prior art keywords
- coding
- prediction
- 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 an efficiently encoded moving image.
Background
For example, in an intra prediction mode of luminance in an encoding system of AVC/h.264 (ISO/IEC 14496-10| ITU-T h.264), which is an international standard system, 1 prediction mode can be selected in block units from a plurality of prediction modes (for example, see non-patent document 1).
Fig. 14 is an explanatory diagram showing the intra prediction mode in the case where the block size of the luminance is 4 × 4 pixels.
When the block size of the luminance is 4 × 4 pixels, 9 intra prediction modes (mode 0, mode 1.., mode 8) are defined.
In fig. 14, white circles are pixels within a block to be encoded. The black circles are pixels used for prediction, and are pixels in an already encoded adjacent block.
Mode 2 is average value prediction, and is a mode for predicting pixels in the encoding target block from the average values of adjacent pixels of the upper and left blocks. Modes other than mode 2 are directional predictions.
In particular, mode 0 is vertical direction prediction, and a prediction image is generated by repeating adjacent pixels of the above 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 generates a prediction image by horizontally repeating adjacent pixels of a left block.
In modes 3 to 8, interpolation pixels are generated in a predetermined direction (in the direction indicated by an arrow in the figure) using adjacent pixels of the upper or left block to generate a predicted image.
The block size of the luminance to which the intra prediction is applied can be selected from 4 × 4 pixels, 8 × 8 pixels, and 16 × 16 pixels, and when the block size is 8 × 8 pixels, 9 intra prediction modes are defined as in the case of 4 × 4 pixels.
On the other hand, when the block size is 16 × 16 pixels, 4 intra prediction modes called plane prediction are defined in addition to the average value prediction, the vertical direction prediction, and the horizontal direction prediction.
The plane prediction is a mode in which a pixel generated by interpolating adjacent pixels of the upper block and adjacent pixels of the left block in an oblique direction is used as a prediction value.
In the directional prediction mode in which the block size is 4 × 4 pixels or 8 × 8 pixels, since a prediction value is generated in a direction (for example, 45 degrees) predetermined by the mode, if the direction of the boundary (edge) of an object in the block coincides with the direction indicated by the prediction mode, the prediction efficiency is high and the symbol amount can be reduced, but if the direction of the edge does not coincide with the direction indicated by the prediction mode, the prediction efficiency is reduced.
In contrast, if the number of selectable directional prediction modes is increased, the probability that the direction of the edge and the direction indicated by the prediction mode match increases, and therefore it can be assumed that the prediction efficiency increases.
Non-patent document 1: MPEG-4AVC (ISO/IEC 14496-10)/ITU-T H.264 specification
Disclosure of Invention
Since the conventional moving image encoding device is configured as described above, if the number of selectable directional prediction modes is increased, the probability that the direction of the edge and the direction indicated by the prediction mode match increases, and the prediction efficiency can be improved. However, since similar predicted image options increase even if the number of selectable directional prediction modes increases, improvement in encoding efficiency to the extent commensurate with an increase in the amount of computation accompanying an increase in the number of selectable directional prediction modes cannot be observed, and there is a problem that a contribution to improvement in encoding efficiency is limited.
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 and a moving image encoding method that can improve the degree of improvement in encoding efficiency by increasing the number of modes using directional prediction with a small amount of computation and a small amount of symbols.
Another object of the present invention is to provide a moving picture decoding device and a moving picture decoding method that can accurately decode a moving picture from encoded data that achieves an improvement in encoding efficiency.
In the moving image encoding device of the present invention, the predicted image generation means generates the predicted image by performing intra prediction processing using pixels adjacent to the encoding block divided by the block division means or pixels adjacent to an encoding block of a higher hierarchy of the encoding block when the encoding mode selected by the encoding control means is the intra prediction mode.
The variable length encoding means encodes a flag indicating whether or not the intra prediction direction of the coding block adjacent to the coding block divided by the block division means matches the intra prediction direction of the coding block to be processed when the coding mode selected by the coding control means is the intra prediction mode, and further encodes information indicating whether or not the intra prediction direction matches any of the adjacent coding blocks when the flag indicates that the intra prediction direction matches the intra prediction direction of the coding block to be processed.
According to the present invention, when the encoding mode selected by the encoding control means is the intra prediction mode, the predicted image generation means generates the predicted image by performing the intra prediction processing using the pixels adjacent to the encoding block divided by the block division means or the pixels adjacent to the encoding block of the upper hierarchy of the encoding block, and therefore, there is an effect that the degree of improvement in the encoding efficiency by increasing the number of modes of the directional prediction can be improved with a small amount of computation and a small number of symbols.
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 flowchart showing the processing contents of the moving image coding apparatus according to embodiment 1 of the present invention.
Fig. 3 is an explanatory diagram showing a case where the largest-sized encoded block is hierarchically divided into a plurality of encoded blocks.
FIG. 4 (a) is an explanatory diagram showing the distribution of the divided segments (partition), and (B) is a diagram showing the allocation of the coding mode m (B) to the hierarchically divided segments by means of a quadtree graphn) An explanatory view of the situation of (1).
FIG. 5 is a block diagram illustrating the block B belonging to the coding blocknEach segment P ofi nAn explanatory diagram of an example of the optional intra-frame prediction parameters (intra-frame prediction mode) in (1).
FIG. 6 is a view showingi n=mi nIf =4, segment P is generatedi nAn explanatory diagram of an example of a pixel used for predicting a value of an intra-pixel.
FIG. 7 is a diagram showing a segment Pi nAnd an upper segment Pi n-1An explanatory diagram of the relationship of (1).
FIG. 8 is a block diagram illustrating the assignment of a block B to a code blocknSegment P ofi nThe description of the drawings.
FIG. 9 is a block diagram illustrating the block B belonging to the coding block BnEach segment P ofi nAn explanatory diagram of an example of the optional intra-frame prediction parameters (intra-frame prediction mode) in (1).
Fig. 10 is a block diagram showing a moving picture decoding apparatus according to embodiment 1 of the present invention.
Fig. 11 is a flowchart showing the processing contents of the moving picture decoding apparatus according to embodiment 1 of the present invention.
Fig. 12 is an explanatory diagram showing segmented encoded data.
Fig. 13 is an explanatory diagram showing the adjoining segments.
Fig. 14 is an explanatory diagram illustrating an intra prediction mode in a 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 selector switch (predicted image generation unit); 4: an intra prediction unit (predicted image generation unit); 5: a motion compensation prediction unit (prediction image generation 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); 21: a variable length decoding unit (variable length decoding means); 22: a selector switch (predicted image generation unit); 23: an intra prediction unit (predicted image generation unit); 24: a motion compensation unit (predicted image generation unit); 25: an inverse quantization/inverse transformation unit (difference image generation unit); 26: an adder (decoded image generation means); 27: a memory for intra prediction; 28:
a loop filter section; 29: motion compensated prediction frame memory.
Detailed Description
Hereinafter, embodiments for carrying out the present invention will be described in more detail with reference to the accompanying drawings.
Embodiment 1.
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 to be a processing unit when intra prediction processing (intra prediction processing) or motion compensation prediction processing (inter prediction processing) is performed is determined, and the upper limit of the number of layers 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-frame encoding modes, 1 or more inter-frame 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 difference 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 (current picture) is input, the input image is divided into coding blocks of the maximum size determined by the coding control unit 1, and the coding blocks are hierarchically divided up to the upper limit of the number of layers 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 blocks divided by the block dividing unit 2 are 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 blocks divided by the block dividing unit 2 are output to the motion compensation prediction unit 5 if the encoding mode selected by the encoding control unit 1 is an inter-frame 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 selector switch 3, the intra prediction processing based on the intra prediction parameters output from the encoding control unit 1 is performed on the coded block using the coded pixels adjacent to the coded block stored in the intra prediction memory 10 or the coded pixels adjacent to the coded block of the upper hierarchy of the coded block, thereby generating a predicted image.
The motion compensation prediction unit 5 performs the following processing: when the encoding control unit 1 selects the inter-frame encoding mode as the encoding mode corresponding to the encoding block divided by the block dividing unit 2, the encoding control unit 1 performs the motion compensation prediction process on the encoding block based on the inter-frame prediction parameter output from the encoding control unit 1 using the reference image of 1 frame or more stored in the motion compensation prediction frame memory 12, thereby generating the predicted image.
The selector switch 3, the intra prediction unit 4, and the motion compensation prediction unit 5 constitute a predicted image generation unit.
The subtracting unit 6 performs the following processing: a difference image (= encoded block-predicted image) is generated by subtracting the predicted image generated by the intra prediction unit 4 or the motion compensation prediction unit 5 from the encoded 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 sequence 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 difference 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 difference 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 difference 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 in accordance with the transform block size unit included in the prediction difference coding parameter, and the compressed data after the inverse transform processing is output as a locally decoded prediction difference signal.
The adder 9 performs the following processing: the local decoded prediction difference 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 local decoded image signal indicating a local decoded image.
The intra-frame prediction memory 10 is a recording medium such as a RAM, and 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-frame prediction unit 4 in the next intra-frame 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 with the coding distortion compensated is output to the motion-compensated prediction frame memory 12 as a reference image.
The motion-compensated prediction frame memory 12 is a recording medium such as a RAM, and stores the local decoded image subjected to 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 difference coding parameter output from the coding control unit 1, and the intra prediction parameter output from the intra 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 of coded data in which the compressed data, the coding mode, the prediction difference coding parameter, the intra prediction parameter, and the inter-frame prediction parameter are multiplexed is generated. In addition, the variable length coding part 13 constitutes a variable length coding unit.
In fig. 1, an example is assumed in which each of the encoding 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 encoding apparatus, is 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 encoding apparatus is configured by a computer or the like, all or a part of a program in which processing contents of the encoding 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 are described may be stored in the computer or the like The CPU of the computer executes the program stored in the memory.
Fig. 2 is a flowchart showing the processing contents of the moving image coding apparatus according to embodiment 1 of the present invention.
Fig. 10 is a block diagram showing a moving picture decoding apparatus according to embodiment 1 of the present invention.
In fig. 10, the variable length decoding unit 21 performs the following processing: by determining the maximum size of a coding block which is a processing unit when intra prediction processing or motion compensation prediction processing is performed and the number of layers of coding blocks hierarchically divided from the coding block of the maximum size, coded data relating to the coding block of the maximum size and the coding blocks hierarchically divided is determined among coded data multiplexed in a bit stream, variable length decoding is performed on compressed data relating to the coding blocks, a coding mode, a prediction difference coding parameter, and an intra prediction parameter/inter-frame prediction parameter from each of the coded data, the compressed data and the prediction difference coding parameter are output to an inverse quantization/inverse transformation unit 25, and the coding mode and the intra prediction parameter/inter-frame prediction parameter are output to a switch 22. The variable length decoding unit 21 constitutes a variable length decoding means.
The changeover switch 22 performs the following processing: when the encoding mode of the encoding block outputted from the variable length decoding unit 21 is an intra encoding mode, the intra prediction parameter outputted from the variable length decoding unit 21 is outputted to the intra prediction unit 23, and when the encoding mode is an inter encoding mode, the inter prediction parameter outputted from the variable length decoding unit 21 is outputted to the motion compensation unit 24.
The intra prediction unit 23 performs the following processing: the intra prediction processing for the coding block is performed based on the intra prediction parameter output from the selector switch 22 using the decoded pixel adjacent to the coding block stored in the intra prediction memory 27 or the decoded pixel adjacent to the coding block at the upper layer of the coding block, thereby generating a predicted image.
The motion compensation unit 24 performs the following processing: a prediction image is generated by performing motion compensation prediction processing on the coding block based on the inter-frame prediction parameters output from the switch 22 using the reference image of 1 frame or more stored in the motion compensation prediction frame memory 29.
The selector switch 22, the intra prediction unit 23, and the motion compensation unit 24 constitute predicted image generation means.
The inverse quantization/inverse transformation unit 25 performs the following processing: the compressed data on the coding block output from the variable length decoding unit 21 is inversely quantized using the quantization parameter included in the prediction difference coding parameter output from the variable length decoding unit 21, 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 difference coding parameter, so that the compressed data after the inverse transform processing is output as a decoded prediction difference signal (signal indicating a difference image before compression). The inverse quantization/inverse transformation unit 26 constitutes a difference image generation unit.
The adder 26 performs the following processing: the decoded prediction difference signal output from the inverse quantization/inverse transformation unit 25 and the prediction signal indicating the prediction image generated by the intra prediction unit 23 or the motion compensation unit 24 are added to generate a decoded image signal indicating a decoded image. The adder 26 constitutes decoded image generation means.
The intra prediction memory 27 is a recording medium such as a RAM, and stores a decoded image represented by the decoded image signal generated by the adder 26 as an image to be used by the intra prediction unit 23 in the next intra prediction process.
The loop filter unit 28 performs the following processing: the encoding distortion included in the decoded image signal generated by the adder 26 is compensated, and the decoded image represented by the decoded image signal after compensation of the encoding distortion is output to the motion-compensated prediction frame memory 29 as a reference image and is output to the outside as a reproduced image.
The motion-compensated prediction frame memory 29 is a recording medium such as a RAM, and stores a decoded image subjected to filtering processing by the loop filter unit 28 as a reference image used by the motion compensation unit 24 in the next motion-compensated prediction processing.
In fig. 10, an example is assumed in which each of the variable length decoding unit 21, the switch 22, the intra prediction unit 23, the motion compensation unit 24, the inverse quantization/inverse transformation unit 25, the addition unit 26, and the loop filter unit 28, which are components of the moving image decoding apparatus, is 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 or the like, all or a part of a program describing processing contents of the variable length decoding unit 21, the switch 22, the intra prediction unit 23, the motion compensation unit 24, the inverse quantization/inverse transformation unit 25, the addition unit 26, and the loop filter unit 28 may be stored in a memory of the computer, and the CPU of the computer may execute the program stored in the memory.
Fig. 11 is a flowchart showing the processing contents of the moving picture decoding apparatus according to embodiment 1 of the present invention.
The moving image coding apparatus according to embodiment 1 is characterized in that the video signal is divided into regions of various sizes to perform intra/inter adaptive coding in accordance with local changes in the spatial and temporal directions of the video signal.
Generally, a video signal has a characteristic that the complexity of the signal locally changes in space/time, and if observed in space, a pattern having uniform signal characteristics in a relatively wide image area such as a sky and a wall in a certain video frame, for example, and a pattern having a complicated texture pattern may be mixed in a small image area in a drawing including a person and a fine texture.
Even if the change in the pattern in the temporal direction is small with respect to the sky and the wall as observed over time, the change with time is large with respect to the moving person and object because the outline thereof moves in a rigid body/non-rigid body with time.
In the encoding process, the following processes are performed: the process of reducing the entire symbol amount is performed by generating a prediction difference signal having small signal power and entropy by temporal/spatial prediction, but the symbol amount of the prediction parameter can be reduced as long as the prediction parameter used in the prediction process can be uniformly applied to an image signal region as large as possible.
On the other hand, if the same prediction parameter is applied to a large image area with respect to an image signal pattern that varies greatly in time/space, prediction errors increase, so the symbol amount of the prediction difference signal cannot be reduced.
Therefore, in a region having a large temporal/spatial variation, it is preferable to reduce the power/entropy of the prediction difference signal even if the region to be predicted is reduced to increase the data amount of the prediction parameter used in the prediction processing.
In order to perform encoding processing in accordance with the general properties of such video signals, the moving image encoding device according to embodiment 1 employs the following configuration: a region of a video signal is hierarchically divided from a predetermined maximum block size, and a prediction process and a prediction difference encoding process are adapted 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, 10 bits, 12 bits, or the like.
However, in the following description, the input video signal is a YUV signal unless otherwise specified. Further, let 2 color difference components U, V be 4: 2: a signal in 0 format.
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 described as a signal of a video frame that has been 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.
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 to be a processing unit when performing intra prediction processing (intra prediction processing) or motion compensation prediction processing (inter 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. 2).
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 in advance as a parameter, and the maximum size is determined to be a small value in a picture with a strong motion and a large value in a picture with a small motion.
Consider the following approach: the upper limit of the number of layers is set, for example, such that the finer the motion of the input image is, the deeper the number of layers is, so that the finer 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 corresponding to each hierarchically divided encoding block from among available 1 or more encoding modes (M intra-frame encoding modes and N inter-frame encoding modes) (step ST 2). The M types of intra coding modes prepared in advance will be described later.
However, when each of the coded blocks hierarchically divided by the block dividing unit 2 described later is further divided into segment units, it is possible to select a coding mode corresponding to each segment.
Hereinafter, in embodiment 1, each coding block is further divided into segment units, and the description will be given.
The method of selecting the coding mode by the coding control unit 1 is a known technique, and therefore, a detailed description thereof will be omitted, but for example, there are the following methods: coding processing is performed on the coding block 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 segment included in each encoding block.
The encoding control unit 1 outputs the prediction difference encoding parameter 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 encoding unit 13. The prediction difference encoding parameters are output to the intra prediction unit 4 as needed.
When a video signal representing an input image is input, the block dividing unit 2 divides the input image into coding blocks of the maximum size determined by the coding control unit 1, and hierarchically divides the coding blocks up to the upper limit of the number of layers determined by the coding control unit 1. The coding block is divided into segment units (step ST 3).
Here, fig. 3 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. 3, the coding block of the maximum size is the coding block B of level 00In the luminance component, has (L)0,M0) The size of (c).
In addition, in the example of fig. 3, the largest size coding block B is coded0As a starting point, the coding block B is obtained by hierarchically dividing the coding block B up to a predetermined depth determined separately by the quadtree structuren。
In 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. 3n=MnThe situation (2).
Later, encode block BnIs defined as a code block BnOf the luminance component (L)n,Mn)。
In the block division part 2, quadtree division is performed, so (L)n+1,Mn+1)=(Ln/2,MnThe/2) is always true.
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) However, in the processing 4: 2: in the case of the 0 format, the size of the coding block of the corresponding color difference component is (L)n/2,Mn/2)。
Later, the coding block B at the nth levelnThe selectable coding mode is described 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) Although it may be configured to use an individual mode for each color component, hereinafter, unless otherwise specified, the YUV signal processing device may be configured to instruct the YUV signal processing device to perform the following processing on the YUV signal, 4: 2: the encoding mode of the luminance component of the 0-format encoding block will be described.
In coding mode m (B)n) There are one to a plurality of INTRA-frame coding modes (collectively referred to as "INTRA"), one to a plurality of INTER-frame coding modes (collectively referred to as "INTER"), and the coding control section 1 selects a coding block B for coding from all or a subset of the coding modes available in the picture as described abovenThe coding mode with the best coding efficiency.
Coding block BnIs further divided into one or more prediction processing units (segments) as shown in fig. 3.
Later, it will belong to coding block BnIs described as Pi n(i: segment number in nth level). FIG. 8 is a block diagram illustrating the assignment of a block B to a code blocknSegment P ofi nThe description of the drawings.
In coding mode m (B)n) Includes as information how to partition information belonging to coding block BnSegment P ofi n。
With respect to segment Pi nAll according to coding mode m (B)n) Performing prediction processing, but able to be performed for each segment Pi nIndividual prediction parameters are selected.
The encoding control unit 1 generates a block division state as shown in fig. 4, for example, for a maximum-sized encoding block, and specifies the encoding block Bn。
The hatched portion in fig. 4 (a) shows the distribution of the divided segments, and in fig. 4 (B), the allocation of the coding pattern m (B) to the hierarchically divided segments is shown by a quadtree graphn) The condition of (2).
In fig. 4 (B), the node surrounded by □ indicates that the coding mode m (B) is assignedn) Node (coding block B)n)。
In the switch 3, if the coding control part 1 selects the intra coding mode (m (B)n) E for INTRA), it will belong to the coding block B divided by the block divider 2nSegment P ofi nOutput to the intra prediction unit 4, and if the encoding control unit 1 selects the inter-frame encoding mode (m (B)n) E INTER), it will belong to this coding block BnSegment P ofi nAnd outputs the result to the motion compensation prediction unit 5.
If the intra prediction unit 4 receives a signal from the switch 3 that belongs to the coding block BnSegment P ofi n(step ST 4), the intra prediction parameter determined by the encoding control unit 1 is used to perform the prediction for each segment Pi nThereby generating an intra-prediction image (P)i n) The specific processing contents will be described later (step ST 5).
Hereinafter, in this specification, P is defined asi nRepresents a segment, (P)i n) Represents a segment Pi nThe predicted image of (3).
Intra prediction image (P)i n) The intra prediction parameters used for the generation of (2) require generation of the same intra prediction image (P) even on the moving picture decoding apparatus sidei n) Therefore, the bit stream is multiplexed by the variable length coding unit 13.
The number of intra prediction directions that can be selected as the intra prediction parameters may be different depending on the size of the block to be processed.
In the segment of a large size, the efficiency of intra prediction is reduced, and therefore the number of selectable intra prediction directions is reduced, and in the segment of a small size, the number of selectable intra prediction directions is increased.
For example, the 34 direction may be set for a 4 × 4 pixel segment or an 8 × 8 pixel segment, the 17 direction may be set for a 16 × 16 pixel segment, and the 9 direction may be set for a 32 × 32 pixel segment.
The motion compensation predicting part 5 receives the information belonging to the coding block B from the switch 3nSegment P ofi n(step ST 4), the prediction parameter is applied to each segment P based on the inter-frame prediction parameter determined by the encoding control unit 1i nThereby generating an inter-frame prediction image (P)i n) (step ST 6).
That is, the motion compensation prediction unit 5 generates an inter-frame prediction image (P) by performing motion compensation prediction processing on the coding block based on the inter-frame prediction parameter output from the coding control unit 1 using the reference image of 1 frame or more stored in the motion compensation prediction frame memory 12i n)。
With respect to inter-frame predictionImage (P)i n) The inter-frame prediction parameters used for the generation of (1) require generation of an identical inter-frame prediction image (P) even on the moving picture decoding apparatus sidei n) Therefore, the bit stream is multiplexed by the variable length coding unit 13.
The subtraction unit 6 receives a prediction image (P) from the intra prediction unit 4 or the motion compensation prediction unit 5i n) Is subordinate to the coding block B divided by the block division part 2nSegment P ofi nSubtracting the predicted image (P)i n) Thereby generating a predicted difference signal e representing the difference imagei n(step ST 7).
In the transformation/quantization part 7, if the subtraction part 6 generates the prediction difference signal ei nThen, the prediction difference signal e is applied to the prediction difference signal e in units of transform block sizes included in the prediction difference encoding parameters outputted from the encoding control unit 1i nThe predicted difference signal e is subjected to transform processing (for example, orthogonal transform processing such as DCT (discrete cosine transform) and KL transform in which a base design is performed on a specific learning sequence in advance), and the quantized parameter included in the predicted difference encoding parameter is usedi nThe quantized transform coefficient is quantized, and the compressed data of the difference image, which is the quantized transform coefficient, is output to the inverse quantization/inverse transform unit 8 and the variable length coding unit 13 (step ST 8).
Upon receiving the compressed data from the transform/quantization unit 7, the inverse quantization/inverse transform unit 8 inversely quantizes the compressed data using the quantization parameter included in the prediction difference coding parameter outputted from the coding control unit 1, and performs an inverse transform process (for example, an inverse transform process such as inverse DCT (inverse discrete cosine transform) or inverse KL transform) on the inversely quantized compressed data in units of the transform block size included in the prediction difference coding parameter, thereby outputting the inversely transformed compressed data to the addition unit 9 as a locally decoded prediction difference signal (step ST 9).
Upon receiving the local decoded prediction difference signal from the inverse quantization/inverse transformation unit 8, the adder 9 adds the local decoded prediction difference signal and a prediction image (P) indicating the prediction image generated by the intra prediction unit 4 or the motion compensation prediction unit 5i n) Generates a local decoded image signal indicating a local decoded segmented image or a local decoded coded block image (hereinafter referred to as "local decoded image") as a set thereof, and outputs the local decoded image signal to the loop filter unit 11 (step ST 10).
The intra prediction memory 10 stores the local decoded image for use in intra prediction.
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 11).
The filtering process performed by the loop filter unit 11 may be performed in units of the largest coding block or each coding block of the input local decoded image signal, or may be performed after the local decoded image signals corresponding to 1-picture macroblocks are input and then 1-picture macroblocks are collected.
For all the coding blocks B divided by the block dividing part 2nSegment P ofi nUntil the process of (4) is completed, the processes of steps ST4 to ST10 are repeatedly performed (step ST 12).
The variable length coding unit 13 variable length codes the compressed data output from the transform/quantization unit 7, the coding mode and the prediction difference coding parameter output from the coding control unit 1, and the intra prediction parameter output from the intra prediction unit 4 or the inter-frame prediction parameter output from the motion compensation prediction unit 5, and generates a bit stream of coded data in which the compressed data, the coding mode, the prediction difference coding parameter, and the intra prediction parameter/inter-frame prediction parameter are multiplexed (step ST 13).
Next, the processing content of the frame intra prediction unit 4 will be specifically described.
FIG. 5 is a block diagram illustrating the block B belonging to the coding blocknEach segment P ofi nAn explanatory diagram of an example of the optional intra-frame prediction parameters (intra-frame prediction mode) in (1).
In fig. 5, prediction direction vectors corresponding to intra prediction modes are shown, and it is designed that the relative angles of the prediction direction vectors to each other become smaller as the number of optional intra prediction modes increases.
Here, the intra prediction unit 4 will be described based on the prediction for the segment Pi nThe intra prediction parameter (intra prediction mode) of the luminance signal, and the intra process of generating the intra prediction signal of the luminance signal.
Segment Pi nIs set to bei n×mi nA pixel.
FIG. 6 is a view showingi n=mi nSegment P generation if =4i nAn explanatory diagram of an example of a pixel used for predicting a value of an intra-pixel.
In FIG. 6, segment P is to be associated withi nContiguous encoded upper segmented pixels ((2 × l)i n+ 1) pixels), and left segmented pixels ((2 × m) pixels)i n) Pixels) are pixels used for prediction, but the number of pixels used for prediction may be more or less than the pixels shown in fig. 6.
In fig. 6, 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.
The intra prediction unit 4 is used for the segment 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 segment and the adjacent pixels of the left segment is set as the segment Pi nAnd generating a predicted image by predicting the pixel value of the pixel.
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), generate segment Pi nThe predicted value of the pixel within.
If a segment P of pixels (prediction object pixels) of the prediction value is to be generatedi nWhen the relative coordinates (with the upper left pixel of the segment as the origin) in the pixel are (x, y), the position of the reference pixel used for prediction is L shown below, and the intersection with the adjacent pixel.
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. When the reference pixel is not at the integer pixel position, an interpolation pixel generated from an integer pixel adjacent to the reference pixel is used as a prediction value.
In the example of fig. 6, since the reference pixel is not at the integer pixel position, the average value of 2 pixels adjacent to the reference pixel is used as the prediction value.
Further, the interpolation pixel may be generated as the prediction value not only from the adjacent 2 pixels but also from the adjacent 2 or more pixels.
The intra prediction unit 4 generates the segment P by the same procedure as described abovei nPredicted pixels of all pixels of the intra luminance signal are generated, and the generated intra prediction image (P) is outputtedi n). Intra prediction image (P)i n) The intra-frame prediction parameters used for the generation of (1) are output to the variable length coding unit 13 for multiplexing into a bit stream as described above.
For segment Pi nIntra prediction image (P) of intra luminance signali n) Generated as described above, but as shown in FIG. 7, with respect to segment Pj n-1(j: segment P)i nThe segment number of the upper segment in the n-1 th layer) of the frame intra prediction image (P) is generated in the same manner as the abovej n-1)。
Here, as shown in fig. 6, the segment P is configured as a segment Pi nIntra prediction image (P) of intra luminance signali n) Except according to and segment Pi nIn addition to the intra prediction image generated by the adjacent pixels of the adjacent reference pixels, it is also possible to extract only the upper segment Pj n-1Intra prediction image (P) of (2)j n-1) Of and segment Pi nThe intra prediction image obtained from the corresponding portion is selected as an intra prediction image (P)i n) The candidate of (1).
That is, as shown in fig. 9, when 9-direction intra prediction modes including average value prediction are provided as the intra prediction modes, if there is a higher order segment, 9 prediction modes are further added.
Intra prediction is a means for predicting an unknown region within a screen from a known region, but since a local change is large in an image signal with respect to a spatial direction, it is possible to improve prediction efficiency by selecting from predicted images having different properties.
Therefore, when the number of directions of the intra prediction mode is increased as configured above, the degree of mutual similarity between the generated prediction images is reduced and the prediction images having a large change can be selected from among the prediction images having a large change, as compared with the case where the intra prediction mode is increased.
In addition, in the method of the present invention, since the predictive image of the lower segment can be generated by cutting out a part of the predictive image of the upper segment, there is an effect that the amount of calculation can be reduced as compared with the case where the prediction mode is increased by increasing the prediction direction.
For segment Pi nThe color difference signal (2) is subjected to intra prediction processing based on the intra prediction parameter (intra prediction mode) in the same procedure as the luminance signal, and the intra prediction parameter used for generating the intra prediction image is output to the variable length coding unit 13.
As described above, the variable length coding unit 13 variable-length codes the intra prediction parameters output from the intra prediction unit 4, and multiplexes the codewords of the intra prediction parameters into a bitstream, but when coding the intra prediction parameters, it may be configured to select a representative prediction direction vector (a representative prediction direction vector) from among a plurality of directional prediction direction vectors, represent the intra prediction parameters by an index of the representative prediction direction vector (a representative prediction direction index) and an index representing a difference with the representative prediction direction vector (a difference prediction direction index), and perform Huffman coding such as arithmetic coding corresponding to a probability model for each index to reduce the number of symbols.
Next, the processing contents of the moving image encoding device of fig. 10 will be described.
When a bit stream generated by the moving image encoding device of fig. 1 is input, the variable length decoding unit 21 performs variable length decoding processing on the bit stream (step ST21 of fig. 11), and decodes a frame size in units of a sequence or in units of pictures including 1 or more frames.
When the frame size is decoded, the variable length decoding unit 21 determines the maximum encoding block size (the maximum size of the encoding block that is a processing unit when the intra prediction processing or the motion compensation prediction processing is performed) determined by the moving picture encoding apparatus of fig. 1 and the upper limit of the number of divided layers (the number of layers of the encoding blocks hierarchically divided from the encoding block having the maximum size) by the same procedure as that of the moving picture encoding apparatus (step ST 22).
For example, when the maximum size of the encoding block is determined to be a size corresponding to the resolution of the input image for all pictures, the maximum size of the encoding block is determined by the same procedure as that of the moving image encoding apparatus of fig. 1, based on the frame size decoded before.
When the maximum size of the coding block and the number of layers of the coding block are multiplexed into a bit stream by a moving picture coding apparatus, the maximum size of the coding block and the number of layers of the coding block are decoded from the bit stream.
When the maximum size of the coding block and the number of layers of the coding block are determined, the variable length decoding unit 21 determines the hierarchical division state of each coding block from the maximum coding block as a starting point, specifies the coded data related to each coding block among the coded data multiplexed in the bit stream, and decodes the coded data for the coding mode allocated to each coding block from the specified coded data.
Then, the variable length decoding unit 21 refers to the coded block B belonging to the coding modenSegment P ofi nThe partition information of (2) is determined for each segment P in the encoded data multiplexed in the bit streami nIn connection withThe data is encoded (step ST 23).
The variable length decoding section 21 compares the length of each segment P with the length of each segment Pi nThe coded data is variable-length decoded by the variable-length decoding unit, and the compressed data, the prediction difference encoding parameter, and the intra prediction parameter/inter-frame prediction parameter are output to the inverse quantization/inverse transform unit 25, and the encoding mode and the intra prediction parameter/inter-frame prediction parameter are output to the switch 22 (step ST 24).
For example, in the case where the prediction direction representative index and the prediction direction difference index are multiplexed into a bitstream, the prediction direction representative index and the prediction direction difference index are entropy-decoded by arithmetic decoding or the like corresponding to each probability model, and the intra prediction parameter is determined from the prediction direction representative index and the prediction direction difference index.
This enables the moving image encoding device to accurately decode the intra prediction parameters even when the amount of symbols of the intra prediction parameters is reduced.
The switch 22 is used for switching between the code block B outputted from the variable length decoding unit 21nSegment P ofi nWhen the encoding mode of (2) is an intra encoding mode, the intra prediction parameter outputted from the variable length decoding unit 21 is outputted to the intra prediction unit 23, and when the encoding mode is an inter encoding mode, the inter prediction parameter outputted from the variable length decoding unit 21 is outputted to the motion compensation unit 24.
Upon receiving the intra prediction parameters from the switch 22 (step ST 25), the intra prediction unit 23 performs the intra prediction on each segment P based on the intra prediction parameters, in the same manner as the intra prediction unit 4 in fig. 1i nThereby generating an intra-prediction image (P)i n) (step ST 26).
That is, the intra prediction unit 23 uses the segment P stored in the intra prediction memory 27i nAdjacent decoded pixels or with the segment Pi nSegment P of upper hierarchy of (2)j n-1The adjacent decoded pixels are subjected to the intra prediction parameteri nThereby generating a predicted image (P)i n)。
Upon receiving the inter-frame prediction parameters from the switch 22 (step ST 25), the motion compensation unit 24 performs the inter-frame prediction on each segment P based on the inter-frame prediction parameters, in the same manner as the motion compensation prediction unit 5 of fig. 1i nThereby generating an inter-frame prediction image (P)i n) (step ST 27).
That is, the motion compensation unit 24 performs the segmentation P for the segment P based on the inter-frame prediction parameter using the reference image of 1 frame or more stored in the motion compensation prediction frame memory 29i nThereby generating an inter-frame prediction image (P)i n)。
Upon receiving the prediction difference encoding parameters from the variable length decoding unit 21, the inverse quantization/inverse transformation unit 25 inversely quantizes the compressed data on the coding block outputted from the variable length decoding unit 21 using the quantization parameters included in the prediction difference encoding parameters, and performs inverse transformation processing (for example, inverse transformation processing such as inverse DCT (inverse discrete cosine transform) and inverse KL transform) on the inversely quantized compressed data in accordance with the transform block size unit included in the prediction difference encoding parameters, thereby outputting the compressed data after the inverse transformation processing to the addition unit 26 as a decoded prediction difference signal (a signal indicating a difference image before compression) (step ST 28).
The adder 26 adds the decoded prediction difference signal output from the inverse quantization/inverse transformation unit 25 to a prediction image (P) indicating the prediction generated by the intra prediction unit 23 or the motion compensation unit 24i n) Generating a decoded image signal representing a decoded segmented image or a decoded image as a set thereofThe decoded image signal is output to the loop filter unit 28 (step ST 29).
The intra prediction memory 27 stores the decoded image for use in intra prediction.
Upon receiving the decoded image signal from the adder 26, the loop filter unit 28 compensates for coding distortion included in the decoded image signal, stores the decoded image indicated by the decoded image signal after compensation of coding distortion in the motion-compensated prediction frame memory 29 as a reference image, and outputs the decoded image as a reproduced image (step ST 30).
The filtering process performed by the loop filter unit 28 may be performed in units of the largest coding block or each coding block of the input decoded image signal, or may be performed after the input of the decoded image signals corresponding to 1-picture macroblocks and thereafter, 1-picture macroblocks may be collected.
In the case of all belonging to coding block BnSegment P ofi nUntil the process of (4) is completed, the processes of steps ST23 to ST29 are repeatedly performed (step ST 31).
As described above, according to embodiment 1, the intra prediction unit 4 configured as a moving image encoding device uses the segment P divided by the block dividing unit 2 when the encoding mode selected by the encoding control unit 1 is the intra prediction modei nAdjacent pixels, or with the segment Pi nSegment P of upper hierarchy of (2)j n-1Generating a predicted image (P) by intra prediction processing of adjacent pixelsi n) Therefore, the degree of improvement in coding efficiency can be improved with a small amount of computation.
In addition, according to embodiment 1, the intra prediction unit 23 configured as a moving picture decoding apparatus uses the memory 27 for intra prediction to store the coding mode that is variable-length decoded by the variable-length decoding unit 21 when the coding mode is the intra prediction modeStored and segmented Pi nAdjacent decoded pixels or with the segment Pi nSegment P of upper hierarchy of (2)j n-1Generating a predicted image (P) by intra prediction processing of adjacent decoded pixelsi n) Therefore, it is possible to accurately decode a moving image from encoded data that achieves improvement in encoding efficiency.
Embodiment 2.
In the above-described embodiment 1, the example in which the variable-length encoding unit 13 of the moving image encoding apparatus performs variable-length encoding on the intra prediction parameter in the segment to be encoded has been described, but it is also possible to perform variable-length encoding on an intra merge (merge) flag indicating whether or not the intra prediction parameter in the segment to be encoded is the same as the intra prediction parameter in the segment adjacent to the segment, perform variable-length encoding on an intra merge orientation (direction) specifying the adjacent segment if the intra prediction parameters are the same, and perform variable-length encoding on the intra prediction parameter in the segment to be encoded if the intra prediction parameters are different.
In addition, in embodiment 1 described above, the variable length decoding unit 21 of the moving picture decoding apparatus is shown to decode, from encoded data relating to a segment to be decoded, in the example of variable-length decoding of the intra prediction parameter in the segment, the intra prediction parameter may be obtained from encoded data relating to the segment to be decoded, variable length decoding is performed on an intra merge flag indicating whether intra prediction parameters in the segment and the neighboring segment are the same, and in the case where the intra merge flag indicates that the intra prediction parameters in the segment and the neighboring segment have the same meaning, variable length decoding the intra-frame intra-merge orientation determined for the contiguous segment from the encoded data, in the case where the intra merge flag indicates that the intra prediction parameters in the segment and the neighboring segment are different, the intra prediction parameters in the segment are variable length decoded from the encoded data.
In the moving image encoding device and the moving image decoding device, the portions other than the encoding and decoding of the intra prediction parameters are the same as those in embodiment 1 described above, and therefore, in embodiment 2, only the encoding and decoding of the intra prediction parameters will be described.
As shown in fig. 12 a, the variable length encoding unit 13 of the moving picture encoding device according to embodiment 2 encodes a segment P to be encoded (to be processed)i nWhen variable length coding is performed on the intra prediction parameter of (1), the intra prediction parameter is represented by the sum of the intra prediction parameter and the segment Pi nThe intra merge flag of the adjacent segment having the same intra prediction parameter is variable-length coded.
When the intra prediction flag indicates that the intra prediction parameters are the same, the variable length coding unit 13 performs variable length coding on the intra prediction direction indicating which of the adjacent segments has the same intra prediction parameter.
On the other hand, when the intra merge flag indicates that the intra prediction parameters are not the same, the segment P to be encoded is subjected to intra prediction, as shown in fig. 12 (B)i nThe intra prediction parameters in (1) are variable-length coded (in this case, the same coding as in embodiment 1 above).
For example, as shown in fig. 13 (a), when a left side segment and an upper side segment are listed as candidates as the adjacent segments, the intra-frame merging direction is a flag indicating whether the adjacent segments are the same as the left side segment and the upper side segment.
As shown in fig. 13 (B), the left side segment, the upper left side segment, and the upper side segment can be used as candidates as the adjacent segments, and a flag indicating which of the 3 candidates is the same can be configured.
Of course, when the intra prediction parameters of the target adjacent segments are all the same, it is not necessary to encode the intra merge azimuth. Therefore, in such a case, as shown in fig. 12 (D), the intra-frame merging azimuth may not be encoded.
In addition, when there are a plurality of segments adjacent to the upper side or the left side, for example, the segments may be scanned in a direction away from the upper left side, and the first segment encoded in the intra prediction mode may be set as the upper side or left side adjacent segment.
In addition, when the number of intra prediction directions NumN selectable in adjacent segments and the number of intra prediction directions NumC selectable in a segment to be encoded are not equal to each other, the following configuration is possible.
I.e., in NumN<In the case of NumC, the segment P to be encoded is selected fromi nAnd (3) among the plurality of directional predicted prediction direction vectors, making a representative prediction direction vector correspond to one of selectable intra-frame prediction directions in adjacent segments, thereby judging whether the intra-frame prediction parameters are consistent.
In this case, as shown in fig. 12 (C), when it is determined that the intra prediction parameters match, the segment P to be encoded is further represented by the segment Pi nThe intra prediction direction residual parameter of which one of the corresponding plurality of intra prediction directions is selected for encoding.
On the other hand, in NumN>In the case of NumC, a representative prediction direction vector is set to the segment P to be encoded from among the prediction direction vectors of the directional predictions of the adjacent segmentsi nThe one of the selectable intra-frame prediction directions corresponds to thereby determine whether the intra-frame prediction parameters are consistent.
In this case, there is no need to encode intra prediction direction residual parameters.
The intra prediction mode is considered to have directivity depending on the texture of the encoding target image, and therefore locally, similar prediction modes tend to occur. Therefore, by encoding the intra-prediction parameters using the intra-frame merge flag and the intra-frame merge orientation, the intra-prediction parameters can be encoded with a smaller amount of information.
As shown in fig. 12 a, the variable length decoding unit 21 of the moving picture decoding apparatus according to embodiment 2 decodes a segment P to be decoded (to be processed)i nWhen variable length decoding is performed on the intra prediction parameter of (1), the intra prediction parameter is represented by the sum of the intra prediction parameter and the segment Pi nThe variable length decoding is performed on the intra merge flag having the same intra prediction parameter for the adjacent segments.
When the intra prediction flag indicates that the intra prediction parameter is the same, the variable length decoding unit 21 performs variable length decoding of the intra merging bit indicating which of the adjacent segments the intra prediction parameter is the same.
On the other hand, when the intra merge flag indicates that the intra prediction parameters are not the same, the decoding target segment P is subjected to decoding as shown in fig. 12 (B)i nThe intra prediction parameters in (1) are subjected to variable length decoding (in this case, the same decoding as in embodiment 1 above).
For example, as shown in fig. 13 (a), when a left segment and an upper segment are listed as candidates as adjacent segments, the intra-frame merging azimuth is a flag indicating whether the left segment is the same as the left segment and whether the upper segment is the same as the upper segment.
Alternatively, as shown in fig. 13 (B), when a left segment, an upper left segment, and an upper segment are listed as candidates as adjacent segments, they are the same as any of the 3 candidates.
Of course, when the intra prediction parameters of the target adjacent segments are all the same, it is not necessary to decode the intra merge direction. Therefore, in such a case, as shown in fig. 12 (D), the intra-frame merged azimuth may not be decoded.
In addition, when there are a plurality of segments adjacent to the upper side or the left side, for example, the segments may be scanned in a direction away from the upper left side, and the first segment encoded in the intra prediction mode may be set as the upper side or left side adjacent segment.
In addition, when the number NumN of intra prediction directions selectable in adjacent segments and the number NumC of intra prediction directions selectable in a segment to be decoded are not equal to each other, the following configuration is possible.
I.e., in NumN<In the case of NumC, the segment P to be decodedi nAnd (3) among the plurality of directional predicted prediction direction vectors, making a representative prediction direction vector correspond to one of selectable intra-frame prediction directions in adjacent segments, thereby judging whether the intra-frame prediction parameters are consistent.
In this case, when it is determined that the intra prediction parameters match as shown in fig. 12 (C), the segment P to be decoded is further segmentedi nThe intra prediction direction residual parameter of which one of the corresponding plurality of intra prediction directions is selected for encoding.
On the other hand, in NumN>In the case of NumC, a representative prediction direction vector is set to the segment P to be decoded from among the prediction direction vectors of the directional predictions of the adjacent segmentsi nThe one of the selectable intra-frame prediction directions corresponds to thereby determine whether the intra-frame prediction parameters are consistent.
In this case, there is no need to decode intra prediction direction residual parameters.
With this configuration, the intra prediction parameters encoded by the moving image encoding device according to embodiment 2 can be appropriately decoded.
Needless to say, the variable-length encoding/decoding unit according to embodiment 2 can also be applied to a case where the processing target segment and its adjacent segment are not prediction modes in which a part of the intra predicted image of the upper layer is extracted as described in embodiment 1.
The present invention can realize a free combination of the embodiments, a modification of any component of the embodiments, or an omission of any component of the 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 can improve the degree of improvement in the encoding efficiency by increasing the number of modes using directional prediction with a small amount of computation and a small amount of symbol, and are therefore suitable for a moving image encoding device and a moving image encoding method that efficiently encode a moving image, a moving image decoding device and a moving image decoding method that decode a moving image that is efficiently encoded, and the like.
Claims (9)
1. A moving image encoding device is characterized by comprising:
an encoding control unit that determines the maximum size of an encoding block that is a processing unit of prediction processing, determines the upper limit of the number of layers when the encoding block of the maximum size is hierarchically divided, and selects an encoding mode corresponding to each encoding block that is hierarchically divided from available 1 or more encoding modes;
a block dividing unit that divides an input image into coding blocks of a maximum size determined by the coding control unit and hierarchically divides the coding blocks until reaching an upper limit of the number of layers determined by the coding control unit;
a prediction image generation unit configured to generate a prediction image by performing prediction processing corresponding to the coding mode selected by the coding control unit on the coding block divided by the block division unit;
a difference image generating unit that generates a difference image of the coding block divided by the block dividing unit and the predicted image generated by the predicted image generating unit;
an image compression unit configured to compress the difference image generated by the difference image generation unit and output compressed data of the difference image; and
a variable length coding unit that variable-length-codes the compressed data output from the image compression unit and the coding mode selected by the coding control unit, and generates a bit stream in which the compressed data and the coded data of the coding mode are multiplexed,
the variable length coding unit performs variable length coding on intra-frame prediction parameters used when the predicted image is generated by the predicted image generation unit, in addition to the compressed data and the coding mode, performs variable length coding on an intra-frame merging flag indicating whether or not intra-frame prediction parameters in the segments divided by the block division unit are the same as intra-frame prediction parameters in segments adjacent to the segments when the coded data of the intra-frame prediction parameters are multiplexed into the bitstream, performs variable length coding on an intra-frame merging position that specifies the adjacent segments if the intra-frame prediction parameters are the same, and performs variable length coding on the intra-frame prediction parameters in the segments divided by the block division unit if the intra-frame prediction parameters are different.
2. The moving image encoding apparatus according to claim 1,
the prediction image generation unit generates a prediction image by performing intra prediction processing using pixels adjacent to the coding block divided by the block division unit or pixels adjacent to a coding block of an upper hierarchy of the coding block, when the coding mode selected by the coding control unit is an intra prediction mode.
3. The moving image encoding apparatus according to claim 2,
the encoding control unit selects an encoding mode corresponding to the encoding block to which each segment belongs or an encoding mode corresponding to each segment in the case where the encoding block divided by the block dividing unit is further divided into segments,
the prediction image generation unit generates a prediction image by performing intra prediction processing using pixels adjacent to the segment divided by the block division unit or pixels adjacent to a segment of the upper hierarchy of the segment, when the encoding mode selected by the encoding control unit is an intra prediction mode.
4. The moving image encoding apparatus according to claim 3,
when there are coding blocks or segments of an upper hierarchy, an intra coding mode using pixels adjacent to the coding blocks or segments of the upper hierarchy is prepared among available 1 or more coding modes,
the prediction image generation unit generates a prediction image by performing intra prediction processing using pixels adjacent to an encoding block or segment of a higher hierarchy of the encoding blocks or segments divided by the block division unit, when the intra encoding mode is selected by the encoding control unit.
5. A moving image decoding device is characterized by comprising:
a variable length decoding unit that determines encoded data related to the largest-sized encoded block and hierarchically divided encoded blocks among encoded data multiplexed in a bit stream by determining the largest size of an encoded block that is a processing unit of prediction processing and the number of layers of the encoded blocks hierarchically divided from the largest-sized encoded block, and variably length-decodes compressed data and an encoding mode related to the encoded block from each of the encoded data;
a prediction image generation unit that generates a prediction image by performing prediction processing corresponding to the encoding mode on the encoding block determined by the variable-length decoding unit;
a difference image generating unit that generates a difference image before compression based on the compressed data on the coding block that has been variable-length decoded by the variable-length decoding unit; and
a decoded image generating unit that adds the difference image generated by the difference image generating unit and the predicted image generated by the predicted image generating unit to generate a decoded image,
the variable length decoding means variable length decodes, from encoded data relating to a segment, an intra merge flag indicating whether or not intra prediction parameters in the segment and an adjacent segment are the same, and when the intra merge flag indicates that intra prediction parameters in the segment and the adjacent segment are the same, variable length decodes, from the encoded data, an intra merge orientation specifying the adjacent segment, and when the intra merge flag indicates that intra prediction parameters in the segment and the adjacent segment are different, variable length decodes, from the encoded data, intra prediction parameters in the segment.
6. The moving image decoding apparatus according to claim 5,
the prediction image generation unit generates a prediction image by performing intra prediction processing using a pixel adjacent to the coding block specified by the variable length decoding unit or a pixel adjacent to a coding block of a higher hierarchy of the coding block, when the coding mode variable-length-decoded by the variable length decoding unit is an intra prediction mode.
7. The moving image decoding apparatus according to claim 6,
when the hierarchically divided coding block is further divided into segments, the variable length decoding unit specifies the coded data related to the segments among the coded data multiplexed in the bit stream, performs variable length decoding of the compressed data related to the segments and the coding mode from the coded data,
the prediction image generating unit generates a prediction image by performing intra prediction processing using a pixel adjacent to the segment or a pixel adjacent to a segment of an upper hierarchy of the segment, when the encoding mode variable-length decoded by the variable-length decoding unit is an intra prediction mode.
8. A moving picture encoding method is characterized by comprising:
an encoding control processing step in which an encoding control means determines the maximum size of an encoding block that is a processing unit of prediction processing, determines the upper limit of the number of layers when the encoding block of the maximum size is hierarchically divided, and selects an encoding mode corresponding to each encoding block that is hierarchically divided from available 1 or more encoding modes;
a block division processing step of dividing an input image into coding blocks of the maximum size decided in the coding control processing step, and hierarchically dividing the coding blocks up to the number of layers up to the upper limit decided in the coding control processing step;
a prediction image generation processing step of generating a prediction image by applying a prediction process corresponding to the coding mode selected in the coding control processing step to the coding blocks divided in the block division processing step;
a difference image generation processing step of generating a difference image of the coding block divided in the block division processing step and the predicted image generated in the predicted image generation processing step;
an image compression processing step of compressing the differential image generated in the differential image generation processing step by an image compression unit and outputting compressed data of the differential image;
a variable length coding processing step of variable length coding the compressed data output in the image compression processing step and the coding mode selected in the coding control processing step by a variable length coding unit to generate a bit stream in which the compressed data and the coded data of the coding mode are multiplexed,
in the variable length coding step, when the intra prediction parameters used when the predicted image is generated in the predicted image generating step are variable length coded in addition to the compressed data and the coding mode, and the coded data of the intra prediction parameters are multiplexed into a bit stream, variable-length-coding an intra merge flag indicating whether or not the intra prediction parameter in the segment divided in the block division processing step is the same as the intra prediction parameter in the segment adjacent to the segment, and if the intra prediction parameters are the same, variable length coding the intra merge position determining the contiguous segment, and if the intra-frame prediction parameters are different, performing variable length coding on the intra-frame prediction parameters in the segments divided in the block division processing step.
9. A moving image decoding method comprising:
a variable-length decoding processing step in which a variable-length decoding unit determines encoded data relating to a largest-sized encoded block and hierarchically divided encoded blocks among encoded data multiplexed in a bit stream by determining the largest size of an encoded block that is a processing unit of prediction processing and the number of layers of the encoded block hierarchically divided from the largest-sized encoded block, and variably decodes, from each of the encoded data, compressed data relating to the encoded block and an encoding mode;
a prediction image generation processing step of generating a prediction image by applying a prediction process corresponding to the encoding mode to the encoding block determined in the variable length decoding processing step;
a difference image generation processing step of generating a difference image before compression based on the compressed data on the coding block that has been variable-length decoded in the variable-length decoding processing step; and
a decoded image generation processing step of generating a decoded image by adding the difference image generated in the difference image generation processing step and the predicted image generated in the predicted image generation processing step to each other,
in the variable length decoding processing step, an intra merge flag indicating whether or not intra prediction parameters in a segment are the same as intra prediction parameters in an adjacent segment is variable length decoded from encoded data relating to the segment, and when the intra merge flag indicates that intra prediction parameters in the segment and the adjacent segment are the same, an intra merge orientation specifying the adjacent segment is variable length decoded from the encoded data, and when the intra merge flag indicates that intra prediction parameters in the segment and the adjacent segment are different, the intra prediction parameters in the segment are variable length decoded from the encoded data.
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2010-281743 | 2010-12-17 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| HK1187469A true HK1187469A (en) | 2014-04-04 |
Family
ID=
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP6005087B2 (en) | Image decoding apparatus, image decoding method, image encoding apparatus, image encoding method, and data structure of encoded data | |
| US11831893B2 (en) | Image coding device, image decoding device, image coding method, and image decoding method | |
| JP2013098715A (en) | Moving image encoder, moving image decoder, moving image encoding method and moving image decoding method | |
| JP2012023609A (en) | Moving image encoding device, moving image decoding device, moving image encoding method and moving image decoding method | |
| HK1187469A (en) | Moving image encoding device, moving image decoding device, moving image encoding method and moving image decoding method | |
| HK1183189B (en) | Video encoding device, video decoding device, video encoding method, and video decoding method | |
| HK1183189A1 (en) | Video encoding device, video decoding device, video encoding method, and video decoding method |