Video coding/decoding method and video coding/decoding device
Technical field
The present invention relates to video coding and decoding technology, relate in particular to method for video coding, video encoding/decoding method, video coding apparatus, video decoder and video encoding/decoding apparatus.
Background technology
Video coding technique is with the digital video information compression, more effectively is transmitted and stores so that realize; The video decode technology then is that encode video information is carried out analytic reconstruction, obtains video image.Usually adopt the coding scheme of block-based motion compensation and transition coding in the present video encoding standard, comprise infra-frame prediction, inter prediction, conversion, quantification and entropy coding etc.Correspondingly, when decoding, comprise a series of decoding and rebuilding processes such as entropy decoding, inverse quantization, inverse transformation and predictive compensation.
Inter prediction is handled and is mainly comprised estimation and motion compensation, has only motion compensation when decoding, and existing estimation has motion compensation again when coding.
So-called estimation, be meant for each piece in the present frame (macro block and sub-macro block thereof) to as finding out the piece the most similar according to certain matching criterior in the former frame of reference frame or the given hunting zone of one frame, back to current block, be match block, calculate motion vector (Motion Vector) by the relative displacement of match block and current block.In order to carry out estimation, need read in the reference frame data (also claiming reference data) of the corresponding search window of this piece.Macro block for one 16 * 16, if the motion estimation search window is: level [64, + 64), vertical [32, + 32), the reference data that then needs to read in be in the reference frame corresponding to this macro block and position image-region on every side thereof, size can be (64+16+64) * (32+16+32)=144 * 80.Under the multi-reference frame situation, may need to read in a plurality of reference frame search window data.
So-called motion compensation is exactly to obtain corresponding region reference block data according to motion vector, i.e. reference block image, and the reference block image of motion compensation output is used for the reconstruction of piece.
In motion estimation process, boundary block for every two field picture, because the zone of the search window correspondence of estimation can exceed the border of reference frame, therefore adopt the search of unrestricted motion vector extension usually, promptly the exterior lateral area of corresponding boundary block is expanded a certain amount of image-region in reference frame.Corner macro block with 16 * 16 is an example, if the motion estimation search window still is: level [64, + 64), vertical [32, + 32), then need in reference frame, the exterior lateral area horizontal direction of corresponding macro block expand 64 pixels, 32 pixels of vertical direction expansion are to reach the image area size of search window correspondence.Promptly for every two field picture, obtain reference picture zone as shown in Figure 1, the middle white zone among Fig. 1 is the zone of image itself, and the gray area in the outside is the zone of expansion.
At present, the pixel of extended area is duplicated by the pixel of boundary point usually and is obtained, and the zone of being expanded is just in order to fill the search window of boundary block correspondence, to make things convenient for boundary block to carry out estimation, the match block that can't influence in the estimation is sought, but, therefore can increase the operand in the image encoding process because the expansion in zone need be carried out a large amount of borders and duplicate computing.
Summary of the invention
In view of this, provide a kind of method for video coding, coding/decoding method on the one hand among the present invention, a kind of video coding apparatus, decoding device, coding and decoding device are provided on the other hand, so that reduce the operand in the image encoding process.
Method for video coding provided by the present invention comprises:
Extract the continuous K two field picture of current desire coding in the video;
Described K two field picture is spliced into the combined frames image of M * N, K=M * N, wherein, K is the integer greater than 1, and M, N are for greater than 1 or equal 1 integer, and described splicing is meant that the border of multiple image is closely adjacent;
Described combined frames image is carried out interframe encode, obtain comprising the compressed bit stream of described combined frames image concatenation information.
Wherein, described video is a single video, and described continuous K two field picture is the continuous K two field picture in the video;
Perhaps, described video is many videos, and described continuous K two field picture is in the video or the continuous K two field picture between video.
Preferably, the described combined frames image that the K two field picture is spliced into M * N comprises:
According to making the adjacent principle in border that has similar pixel in each image, the parts of images in the described K two field picture is carried out mirror image and/or rotation processing;
The combined frames image that image after handling in the described K two field picture and untreated image are spliced into M * N.
Video encoding/decoding method provided by the present invention comprises:
Decode the combined frames image of current M * N from compressed bit stream, the combined frames image of described M * N is to be spliced by continuous K two field picture in the video, and described splicing is meant that the border of multiple image is closely adjacent;
According to the concatenation information of the image of combined frames described in the compressed bit stream, described combined frames image is split as K two field picture continuous in the video, K=M * N;
Wherein, K is the integer greater than 1, and M, N are for greater than 1 or equal 1 integer.
Wherein, described concatenation information according to the image of combined frames described in the compressed bit stream is split as K two field picture continuous in the video with described combined frames image and comprises:
According to the stitching position information in the described concatenation information, the combined frames of M * N is split as the K two field picture from splicing;
According to the image processing data in the described concatenation information,, obtain the reconstructed image of K frame original image with existing the image of mirror image and/or rotation to carry out anti-mirror image and/or despining in the described K two field picture that has split;
According to the image sequence information in the described concatenation information, described K frame original image is sorted, form continuous K two field picture in the video.
Video coding apparatus provided by the present invention comprises:
The image extraction module is used for extracting the continuous K two field picture that current desire is encoded from video;
The image concatenation module is used for the K two field picture that described image extraction module extracts is spliced into the combined frames image of M * N, K=M * N, wherein, K is the integer greater than 1, and M, N are greater than 1 or equal 1 integer that described splicing is meant that the border of multiple image is closely adjacent;
Image coding module is used for the combined frames image of described image concatenation module splicing is carried out interframe encode, obtains comprising the compressed bit stream of described combined frames image concatenation information.
Preferably, described image concatenation module comprises:
Processing sub is used for according to making each image have the adjacent principle in border of similar pixel the parts of images in the described K two field picture being carried out mirror image and/or rotation processing;
The splicing submodule, the combined frames image that image after being used for described K two field picture handled and raw image are spliced into M * N.
Video decoder provided by the present invention comprises:
The picture decoding module is used for decoding from compressed bit stream the combined frames image of current M * N, the combined frames image of described M * N be by in the video continuously the K two field picture be spliced, described splicing is meant that the border of multiple image is closely adjacent;
Image splits module, is used for the concatenation information according to the image of combined frames described in the compressed bit stream, and the combined frames image that described picture decoding module is decoded is split as continuous K two field picture, K=M * N;
Wherein, K is the integer greater than 1, and M, N are for greater than 1 or equal 1 integer.
Wherein, described image fractionation module comprises:
Piece splits submodule, is used for the stitching position information according to described concatenation information, and the combined frames of M * N is split as the K two field picture from splicing;
The image processing submodule is used for the image processing data according to described concatenation information, with existing the image of mirror image and/or rotation to carry out anti-mirror image and/or despining in the described K two field picture that has split, obtains the reconstructed image of K frame original image;
Image ordering submodule is used for the image sequence information according to described concatenation information, and described K frame original image is sorted, and forms continuous K two field picture in the video.
Video encoding/decoding apparatus provided by the present invention comprises:
The image extraction module is used for extracting the continuous K two field picture that current desire is encoded from video;
The image concatenation module is used for the K two field picture that described image extraction module extracts is spliced into the combined frames image of M * N, K=M * N, and described splicing is meant that the border of multiple image is closely adjacent;
Image coding module is used for the combined frames image of described image concatenation module splicing is carried out interframe encode, obtains comprising the compressed bit stream of described combined frames image concatenation information;
The picture decoding module is used for decoding from compressed bit stream the combined frames image of current M * N;
Image splits module, is used for the concatenation information according to the image of combined frames described in the compressed bit stream, and the combined frames image that described picture decoding module is decoded is split as continuous K two field picture, K=M * N;
Wherein, K is the integer greater than 1, and M, N are for greater than 1 or equal 1 integer.
Preferably, described image concatenation module comprises:
Processing sub is used for according to making each image have the adjacent principle in border of similar pixel the parts of images in the described K two field picture being carried out mirror image and/or rotation processing;
The splicing submodule, the combined frames image that image after being used for described K two field picture handled and raw image are spliced into M * N.
From such scheme as can be seen, coding method among the present invention at first is spliced into the continuous K two field picture of current desire coding the combined frames image of M * N, again described combined frames image is encoded, obtain comprising the compressed bit stream of described combined frames image concatenation information, make when carrying out interframe encode, the extended area of reference the combination two field picture of corresponding M * N obtains reduction with comparing originally, thus the operand in the reduction image encoding process.
Description of drawings
Fig. 1 is the reference picture area schematic of every two field picture during inter prediction in the prior art;
Fig. 2 is the exemplary process diagram of method for video coding in the embodiment of the invention;
Fig. 3 is the schematic diagram of continuous 4 two field pictures in the single video;
Fig. 4 a to Fig. 4 b is two kinds of stitching images of 4 two field pictures shown in Figure 3;
The reference picture area schematic of Fig. 5 when 2 * 2 combined frames image being carried out inter prediction in the embodiment of the invention;
Fig. 6 is the schematic flow sheet of a kind of stitching algorithm in the embodiment of the invention;
Fig. 7 is the exemplary process diagram of video encoding/decoding method in the embodiment of the invention;
Fig. 8 is the exemplary block diagram of video coding apparatus in the embodiment of the invention;
Fig. 9 is the exemplary block diagram of video decoder in the embodiment of the invention.
Embodiment
For making the purpose, technical solutions and advantages of the present invention clearer, below in conjunction with embodiment and accompanying drawing, the present invention is described in more detail.
Fig. 2 is the exemplary process diagram of method for encoding images in the embodiment of the invention.As shown in Figure 2, this flow process comprises the steps:
Step 201 is extracted the continuous K two field picture that current desire is encoded in the video, and wherein, K is the integer greater than 1.
In this step, described video can be single video, also can be many videos, a plurality of video sequences that promptly a plurality of video cameras obtain when same object is taken.When single video, described continuous K two field picture is the continuous K two field picture in the video; When many videos, described continuous K two field picture is in the video and/or the continuous K two field picture between video.
Situation with single video is an example, supposes that K is 4, then before the continuous K two field picture of desire coding can be as shown in Figure 34 two field pictures.
Step 202 is spliced into the combined frames image of M * N with described K two field picture, K=M * N, and wherein, M, N are for greater than 1 or equal 1 integer.
In this step, continuous K two field picture directly can be spliced, be spliced into the combined frames image of M * N,, can obtain 2 * 2 combined frames image shown in Fig. 4 a for 4 two field pictures shown in Figure 3; Also can be according to making the adjacent principle in border that has similar pixel in each image, parts of images in the described K two field picture is carried out mirror image and/or rotation processing, afterwards, the combined frames image that image after handling in the described K two field picture and untreated image are spliced into M * N, for 4 two field pictures shown in Figure 3, can obtain 2 * 2 combined frames image shown in Fig. 4 b; In addition, the K two field picture can also be spliced according to alternate manner, enumerate no longer one by one herein.
Step 203 is encoded to described combined frames image, obtains comprising the compressed bit stream of described combined frames image concatenation information.
In this step, to the coding method of described combined frames image with in the prior art to the coding method unanimity of single-frame images, just the side information that is used for decoding in the compressed bit stream also comprises the concatenation information of combined frames image, and this concatenation information can comprise stitching position information, image processing data and image sequence information.Wherein, when predicting between conducting frame, reference picture is the reconstructed image of the combined frames image of M * N, it is the reference combination two field picture of M * N, combined frames image for 2 * 2, when carrying out inter prediction the reference picture zone of every two field picture as shown in Figure 5, as seen, extended area has reduced half with comparing originally, has reduced the operand in the image encoding process.
Below the splicing in the step 202 shown in Figure 2 is illustrated:
For the synthetic wide M * wd of a frame of the high ht image sets of the wide wd of continuous K frame, the combined frames image of high N * ht (K=M * N) wherein, suppose that setting even number line carries out vertical mirror, even column carries out the horizon glass picture, then with n, 1≤n≤K, the two field picture position is placed on the concrete stitching algorithm that the capable J of I lists and can comprises the steps: as shown in Figure 6
Step 601, judge I capable whether be even number line, if then execution in step 602; Otherwise, execution in step 603.
Step 602 is carried out vertical mirror with described image.
Step 603 judges whether the J row are even column, if then execution in step 604; Otherwise, execution in step 605.
Step 604 is carried out the horizon glass picture with described image.
Step 605 lists copying image to the capable I of I.
Corresponding with method for video coding shown in Figure 2, Fig. 7 is the exemplary process diagram of video encoding/decoding method in the embodiment of the invention.As shown in Figure 7, this flow process comprises the steps:
Step 701 decodes the combined frames image of current M * N from compressed bit stream, wherein, M, N are for greater than 1 or equal 1 integer.
In this step, from compressed bit stream the method for the combined frames image of the current M * N of decoding with in the prior art to the coding/decoding method unanimity of single-frame images.Wherein, during motion compensation, reference picture is the reconstructed image of the combined frames image of M * N between conducting frame, i.e. the reference of M * N combination two field picture.
Step 702 according to the concatenation information of the image of combined frames described in the compressed bit stream, is split as K two field picture continuous in the video with described combined frames image, K=M * N, and wherein, K is the integer greater than 1.
A kind of processing procedure in this step can for: at first, combined frames is split from splicing, obtains the K two field picture according to the stitching position information in the concatenation information; If according to the image processing data in the concatenation information, learn the image that wherein has mirror image and/or rotation, then this image is carried out anti-mirror image and/or despining, obtain the reconstructed image of original image; At last,, K frame original image is sorted, form continuous K two field picture in the video according to the image sequence information in the concatenation information.
In the practical application, method for video coding shown in Figure 2 and video encoding/decoding method shown in Figure 7 also can obtain the video coding-decoding method in the embodiment of the invention in conjunction with application.For example, in the coding side, after the image in the video encoded according to method for video coding shown in Figure 2, with compressed bit stream storage or transmission, afterwards in the decoding side, to compressed bit stream according to the video encoding/decoding method shown in Figure 7 video image that back output rebuilds of decoding.
More than the method for video coding in the embodiment of the invention, video encoding/decoding method and video coding-decoding method are described in detail, again the video coding apparatus in the embodiment of the invention, video decoder and video encoding/decoding apparatus are described in detail below.
Fig. 8 is the exemplary block diagram of video coding apparatus in the embodiment of the invention.As shown in Figure 8, this device can comprise: image extraction module, image concatenation module and image coding module.
Wherein, the image extraction module is used for extracting from video the continuous K two field picture of current desire coding.Described video can be single video, also can be many videos, a plurality of video sequences that promptly a plurality of video cameras obtain when same object is taken.When single video, described continuous K two field picture is the continuous K two field picture in the video; When many videos, described continuous K two field picture is in the video and/or the continuous K two field picture between video, and wherein, K is the integer greater than 1.
The image concatenation module is used for the K two field picture that described image extraction module extracts is spliced into the combined frames image of M * N, K=M * N.Wherein, the image concatenation module can directly be spliced continuous K two field picture, is spliced into the combined frames image of M * N; Also can be according to making the adjacent principle in border that has similar pixel in each image, parts of images in the described K two field picture is carried out mirror image and/or rotation processing, afterwards, the combined frames image that the image after handling in the described K two field picture and untreated image are spliced into M * N; In addition, the K two field picture can also be spliced according to alternate manner, enumerate no longer one by one herein.Wherein, M, N are for greater than 1 or equal 1 integer.
Image coding module is used for the combined frames image of described image concatenation module splicing is encoded, and obtains comprising the compressed bit stream of described combined frames image concatenation information.Wherein, to the coding method of described combined frames image with in the prior art to the coding method unanimity of single-frame images, just the side information that is used for decoding in the compressed bit stream also comprises the concatenation information of combined frames image.
During specific implementation, if according to the adjacent principle in border that has similar pixel in each image is spliced, then described image concatenation module can comprise: processing sub and splicing submodule.
Wherein, processing sub is used for according to making each image have the adjacent principle in border of similar pixel the parts of images in the described K two field picture being carried out mirror image and/or rotation processing.
The combined frames image that image after the splicing submodule is used for described K two field picture handled and untreated image are spliced into M * N.
Fig. 9 is the exemplary block diagram of video decoder in the embodiment of the invention.As shown in Figure 9, this device can comprise: picture decoding module and image split module.
Wherein, the picture decoding module is used for decoding from compressed bit stream the combined frames image of current M * N.Wherein, from compressed bit stream the method for the combined frames image of the current M * N of decoding with in the prior art to the coding/decoding method unanimity of single-frame images.Wherein, M, N are for greater than 1 or equal 1 integer
Image fractionation module is used for the concatenation information according to the image of combined frames described in the compressed bit stream, and the combined frames image that described picture decoding module is decoded is split as continuous K two field picture, K=M * N.Wherein, image splits module and can at first combined frames be split from splicing, if there is the image of mirror image and rotation, then with anti-mirror image of this figure and despining, obtains the reconstructed image of original image.Wherein, K is the integer greater than 1.
During specific implementation, a kind of internal structure that image splits module realizes and can comprise as shown in Figure 9: piece splits submodule, image processing submodule and image ordering submodule.
Wherein, piece splits submodule and is used for stitching position information according to described concatenation information, and the combined frames of M * N is split as the K two field picture from splicing;
The image processing submodule is used for the image processing data according to described concatenation information, with existing the image of mirror image and/or rotation to carry out anti-mirror image and/or despining in the described K two field picture that has split, obtains the reconstructed image of K frame original image.
Image ordering submodule is used for the image sequence information according to described concatenation information, and described K frame original image is sorted, and forms continuous K two field picture in the video.
In the practical application, video coding apparatus shown in Figure 8 and video decoder shown in Figure 9 can be arranged in same device, constitute the video encoding/decoding apparatus in the present embodiment jointly.Be that video encoding/decoding apparatus in the present embodiment can comprise: image extraction module, image concatenation module, image coding module, picture decoding module and image split module.In the present embodiment, the concrete operations of each module can be consistent with the concrete operations of corresponding module in Fig. 8 and the device shown in Figure 9 in the video encoding/decoding apparatus, and same, the image concatenation module is when specific implementation, also can comprise processing sub and splicing submodule as shown in Figure 7, give unnecessary details no longer one by one herein.
Above-described specific embodiment; purpose of the present invention, technical scheme and beneficial effect are further described; institute is understood that; the above only is preferred embodiment of the present invention; be not to be used to limit protection scope of the present invention; within the spirit and principles in the present invention all, any modification of being done, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.