CN105163117B - A kind of image encoding method and device - Google Patents
A kind of image encoding method and device Download PDFInfo
- Publication number
- CN105163117B CN105163117B CN201510532058.5A CN201510532058A CN105163117B CN 105163117 B CN105163117 B CN 105163117B CN 201510532058 A CN201510532058 A CN 201510532058A CN 105163117 B CN105163117 B CN 105163117B
- Authority
- CN
- China
- Prior art keywords
- frame
- macro block
- row
- predictive coding
- intraframe predictive
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Abstract
The invention discloses a kind of image codings, processing method and processing device, the image encoding method includes: that the P frame for including intraframe predictive coding macro block at least two in a picture group GOP successively encodes, so that covering a complete frame image by the intraframe predictive coding macro block line number of at least two P frame of coding.Using the present invention, it can be avoided and carry out very big impact to wireless channel transmission belt, while using intraframe predictive coding macro block by continuous several frames when there is error of transmission or frame losing, whole image can be allowed to restore normal.
Description
Technical field
The present invention relates to the image coding staffs in technical field of video processing more particularly to coded video sequence about P frame
Method and device.
Background technique
With popularizing for mobile Internet 3G, 4G and WIFI, more and more Video coding products start coded video bitstream
Stream is by radio channel transmission and program request, preview and playback in mobile device or program request platform.The characteristics of wireless channel is band
Width is smaller, network fluctuation is bigger, network packet loss rate is relatively high, how is solved at this time unstable, finite bandwidth wireless
The smooth playing that video is carried out on network, is a problem in the urgent need to address.
Since code error rate of wireless channel is generally relatively high, current Video Coding Scheme is typically all to use GOP (group
Of picture) mode, by video sequence block encoding, the group of a GOP=N includes an every IDR frame and N-1 P frame,
As shown in Figure 1.The effect for being periodically inserted every IDR frame is: it is transmitted in video code flow and error code occurs and when frame losing, it can be when fixed
Between be spaced in restore.
Since every IDR frame cannot use inter prediction encoding, compression performance has obvious gap compared with P frame, under normal conditions
The size of every IDR frame all can be bigger than P frame, in static and details than under more rich scene, the size of ISR frame even P frame it is several
Ten times.The bit number of every IDR frame rises the moment congestion that will cause channel in wireless channel, and bit error rate rising and network is caused to pass
Defeated delay increases, and user experience is deteriorated.
In the prior art, it usually solves the above problems by the following two kinds of programs: scheme one, by adjusting every IDR frame quantization
Parameter increases quantization step, reduces the coding quality of every IDR frame to meet the requirement of channel;Scheme two increases in network transmitting terminal
Buffer area increases every IDR frame network sending time, and the temporary impact to network is reduced with the method for increasing network delay.
But above-described two schemes with the following drawback that: scheme one, the image matter of every IDR frame under same sequence
Amount can be significantly lower than the picture quality of P frame, cause I frame relatively fuzzyyer, and P frame is relatively clear, bring cell breath, and for multiple
Miscellaneous static scene is only capable of playing the role of alleviation, and every IDR frame still can be bigger.Scheme two, network delay increase, transmitting terminal and
Rx-side buffering area will all increase, and increase memory and use.
Summary of the invention
In view of this, the present invention provides a kind of image coding, processing method and processing device, to solve in the prior art in shakiness
The technical issues of smooth playing of video is carried out on fixed, finite bandwidth wireless network.
To solve the above problems, the application first aspect provides a kind of image encoding method, this method comprises: drawing to one
In the group GOP of face at least two include intraframe predictive coding macro block P frames successively encoded so that by coding this at least
The intraframe predictive coding macro block line number of two P frames covers a complete frame image.
With reference to first aspect, in the first possible implementation, which includes the first P frame and the 2nd P
Frame, this includes the steps that the P frame of intraframe predictive coding macro block successively carries out encoding packet at least two in a picture group GOP
It includes: the first P frame in a picture group GOP is encoded.Wherein, any frame in the GOP includes L row macro block, the first P
Frame includes a row intraframe predictive coding macro block, and L is positive integer, 0 < a < L.The 2nd P frame in the GOP is encoded.Wherein, should
2nd P frame it is adjacent with the first P frame or it is intermediate at least be spaced one only include inter prediction encoding macro block P frame, the 2nd P frame
Comprising b row intraframe predictive coding macro block, b that a row intraframe predictive coding macro block that the first P frame includes and the 2nd P frame include
There is the macro block for serial number of mutually going together in row intraframe predictive coding macro block.
The possible implementation of with reference to first aspect the first, in the second possible implementation, the 2nd P frame
M row more than a row intraframe predictive coding macro block that the b row intraframe predictive coding macro block for including includes than the first P frame, m is natural number.
With reference to first aspect the first or second of possible implementation, in the third possible implementation,
The a row intraframe predictive coding macro block that first P frame includes mutually is gone together with the b row intraframe predictive coding macro block that the 2nd P frame includes
The number of macroblocks N of serial number meets following relationship: N × X >=G.Wherein, X is the basic coding unit height of encoder, and G is coding
The maximum perpendicular search range of device search window, N, X, G are natural number.
With reference to first aspect the first or second of possible implementation, in the fourth possible implementation,
The step of encoding to the 2nd P frame in the GOP includes: a row intraframe predictive coding macro block for including by the first P frame
The first row moves down y row to determine the first row of the intraframe predictive coding macro block of the 2nd P frame.Wherein, 0 < y < L-a.And
The b row intraframe predictive coding macro block of the 2nd P frame is determined, to encode to the 2nd P frame.
With reference to first aspect the first or second of possible implementation, in a fifth possible implementation,
The step of encoding to the 2nd P frame in the GOP includes: a row intraframe predictive coding macro block for including by the first P frame
Last line moves up z row to determine the last line of the 2nd P frame intraframe predictive coding macro block.Wherein, 0 < z < L-a.With
And determine the b row intraframe predictive coding macro block of the 2nd P frame, to be encoded to the 2nd P frame.
To solve the above problems, the application second aspect provides a kind of picture coding device, which includes: coding mould
Block, the P frame for including intraframe predictive coding macro block at least two in a picture group GOP successively encode, so that
A complete frame image is covered by the intraframe predictive coding macro block line number of at least two P frame of coding.
In conjunction with second aspect, in the first possible implementation, which includes the first P frame and the 2nd P
Frame, the coding module include: the first encoding submodule, for encoding to the first P frame in a picture group GOP.Wherein,
Any frame in the GOP includes L row macro block, and the first P frame includes a row intraframe predictive coding macro block, and L is positive integer, and 0 < a <
L.Second encoding submodule encodes the 2nd P frame in the GOP.Wherein, the 2nd P frame it is adjacent with the first P frame or
Intermediate to be at least spaced one only comprising the P frame of inter prediction encoding macro block, the 2nd P frame includes that b row intraframe predictive coding is macro
Block, the b row intraframe predictive coding macro block that a row intraframe predictive coding macro block and the 2nd P frame that the first P frame includes include exist
The macro block for serial number of mutually going together.
In the first possible implementation in conjunction with second aspect, in the second possible implementation, this second
Encoding submodule is also used to the first row for a row intraframe predictive coding macro block that the first P frame includes moving down y row with determination
The first row of the intraframe predictive coding macro block of 2nd P frame, and determine the b row intraframe predictive coding macro block of the 2nd P frame, with
2nd P frame is encoded.Wherein, 0 < y < L-a.
In conjunction with the first possible implementation of second aspect, in the third possible implementation, second volume
Numeral module is also used to the last line for a row intraframe predictive coding macro block that the first P frame includes moving up z row with determination
The last line of 2nd P frame intraframe predictive coding macro block and the b row intraframe predictive coding macro block for determining the 2nd P frame, with
2nd P frame is encoded.Wherein, 0 < z < L-a.
In above scheme, successively compiled by the P frame for including intraframe predictive coding macro block at least two in GOP
Code, so that a complete frame image is covered by the line number of the intraframe predictive coding macro block of at least two P frames of coding, thus
Complete the image coding of a GOP.Intraframe predictive coding is carried out in P frame, since the macro block line number of every frame refreshing can control,
So that the size of P frame may be limited to smaller range without greatly impacting to wireless channel transmission belt.Meanwhile by
It can be decoded in intraframe predictive coding macro block without necessarily referring to frame, therefore occur mistake or frame losing during bit stream
When, intraframe predictive coding macro block can make the image of corresponding region restore normal, and be further advanced by continuous several frames and make
Image is set to restore normal with intraframe predictive coding.
Detailed description of the invention
Fig. 1 is the flow diagram of image encoding method in first embodiment of the invention;
Fig. 2 is the flow diagram of image encoding method in second embodiment of the invention;
Fig. 3 is the flow diagram encoded in first embodiment of the invention to the 2nd P frame in GOP;
Fig. 4 is the schematic diagram using image encoding method of the invention to each P frame coding in GOP;
Fig. 5 is the structural schematic diagram of P0 frame and P1 frame of the present invention;
Fig. 6 is the flow diagram encoded in second embodiment of the invention to the 2nd P frame in GOP;
Fig. 7 is the structural schematic diagram of picture coding device in first embodiment of the invention;
Fig. 8 is the structural schematic diagram of coding module in the picture coding device of embodiment of the present invention.
Specific embodiment
Below to it is involved in the present invention to technical term explain.
P frame: when being directed to continuous moving picture encoding, being divided into P, B, I three types for continuous several width images, P frame by
Perhaps I frame predicts that it compares identical information or data between the P frame or I frame before it to P frame before it,
Namely consider that the characteristic of movement carries out interframe compression.
I frame: intracoded frame is a kind of independent frame of included all information, can independently be carried out without reference to other images
It decodes, first frame in video sequence is all I frame always.
Every IDR frame: Instantaneous Decoding Refresh, instantaneous decoding refresh.In coding and decoding in order to
It is convenient, it first I frame and other I frames to differentiate, so first I frame is called every IDR frame, facilitates control coding and decoding process.
The effect of every IDR frame is to refresh at once, propagate mistake will not, is encoded calculating a new sequence again since every IDR frame.
Every IDR frame has the ability of random access, also results in DPB (Decoded Picture Buffer, reference frame lists) and empties.
The content of frame before all frames after every IDR frame all cannot quote any every IDR frame is broadcast from random-access video flowing
Putting device can play forever from an every IDR frame, because after it without the frame before the reference of any frame.It can however not one
It is played since arbitrary point in the video of a not every IDR frame, because subsequent frame can always quote the frame of front.
Inter prediction encoding: using the correlation of video image interframe, i.e. temporal correlation, to reach the mesh of compression of images
, it is widely used in the compressed encoding of common TV, video conferencing, visual telephone, high-definition television.Live image is by the time
On the temporal image sequence that forms of successive image frame using the frame period as interval, it is bigger than spatially having in time
Correlation.The adjacent interframe variations in detail of most of television images is very little, i.e., video image interframe has very strong correlation,
Using interframe encode is carried out possessed by frame the characteristics of correlation, the compression ratio more much higher than intraframe coding can get.For quiet
Only image or movable very slow image, can pass some frames less, such as transmit every frame, the frame not transmitted is deposited using the frame of receiving end
What the data of former frame influence vision as the frame data without in reservoir.
Intraframe predictive coding: a kind of new technology H.264 used, when coding Intra image Shi Keyong intra prediction.For
4 × 4 pieces each (other than edge block is especially disposed), each pixel can use 17 immediate previously encoded pixels
Different weights and (weight having can be 0) predict, i.e. 17 pixels in the upper left corner of block where this pixel.Obviously, this
Not instead of not in time, the predictive coding algorithm carried out in spatial domain can remove the sky between adjacent block to intra prediction
Between redundancy, obtain more efficiently compression.
Macro block: Macro block is a basic conception in video coding technique.In Video coding, a coding
Image is commonly divided into several macro block compositions, and a macro block is by a luminance pixel block and additional two chroma pixels block group
At.In general, luminance block is the block of pixels of 16 × 16 sizes, and the size of two coloration block of image pixels is according to its image
Depending on sample format.In each image, several macro blocks are arranged sheet of form, video coding algorithm as unit of macro block, by
A macro block is encoded, and continuous video code flow is organized into.
Embodiment of the present invention is described in detail with reference to the accompanying drawing.
Referring to Fig. 1, being the flow diagram of image encoding method first embodiment of the present invention, the figure of present embodiment
As coding method includes but is not limited to following steps.
Step S10, the P frame for including intraframe predictive coding macro block at least two in a picture group GOP successively carry out
Coding, so that covering a complete frame image by the intraframe predictive coding macro block line number of at least two P frames of coding.
In the present embodiment, the first frame in the GOP is encoded to instantaneous decoding refresh IDR frame.In step slo,
When initiate point sowing time, the first frame in GOP is encoded to every IDR frame by encoder, and all frames later are all encoded to P frame.Every IDR frame
Normal original image coding can be used, also can choose a virtual image coding, it is, for example, possible to use completely black images
Coding.
First frame is encoded using every IDR frame, is the compatibility in order to decode display end.The picture quality of this frame itself is to net
Network is played to be influenced without for what.
Further, which includes the first P frame and the 2nd P frame, referring to Fig. 2, to a picture group GOP
Interior at least two are successively encoded including the P frame of intraframe predictive coding macro block and are realized especially by following steps:
Step S20 encodes the first P frame in a picture group GOP.Wherein, any frame in the GOP includes L
Row macro block, the first P frame include a row intraframe predictive coding macro block, and L is positive integer, and 0 < a < L.
Specifically, each P frame in a GOP includes L row macro block, a behavior intraframe predictive coding macro block therein, L-
A behavior inter prediction encoding macro block.
Step S21 encodes the 2nd P frame in the GOP.
Wherein, the 2nd P frame and the first P frame are adjacent or intermediate be at least spaced one only comprising inter prediction encoding macro block
P frame.Also, the 2nd P frame includes b row intraframe predictive coding macro block, a row intraframe predictive coding macro block that the first P frame includes
There is the macro block for serial number of mutually going together, 0 <b < L in the b row intraframe predictive coding macro block for including with the 2nd P frame.
Further, the b row intraframe predictive coding macro block that the 2nd P frame includes is than a row intra prediction that the first P frame includes
The more m rows of coded macroblocks, m is natural number.
The b row intraframe predictive coding macro block that a row intraframe predictive coding macro block and the 2nd P frame that first P frame includes include
Mutually the number of macroblocks N of colleague's serial number meets following relationship:
N×X≥G;
Wherein, X be encoder basic coding unit height, G be encoder searches window maximum perpendicular search range, N,
X, G is natural number.
Parameter a can be adjusted according to the needs of transmission channel, and the value of a is bigger, and the speed of intraframe predictive coding is faster,
P frame maximum number bits containing intraframe predictive coding macro block are bigger.
Referring to Fig. 3, in one embodiment, being encoded the 2nd P frame in the GOP especially by following steps reality
It is existing:
The first row for a row intraframe predictive coding macro block that first P frame includes is moved down y row with determination by step S30
The first row of the intraframe predictive coding macro block of 2nd P frame.Wherein, 0 < y < L-a.
Step S31 determines the b row frame predictive coding macro block of the 2nd P frame, to encode to the 2nd P frame.
Please refer to Fig. 4, below to include that several P frames are illustrated present embodiment in a GOP.Specifically
Several P frames for including in a GOP are numbered in ground, the Pk that is respectively labeled as P0, P1, P2 ..., and k is natural number.As above
The first P frame can be first P frame in several P frames that GOP includes, that is, P0 frame is but it is also possible to be positioned at it
P frame on his position.2nd P frame as described above can be the P1 frame on the first P frame adjacent position, be also possible to position
Mono- P frame of Yu Yu (P0 frame) interval one or more only includes the P frame on the position of inter prediction encoding macro block P frame.
In the present embodiment, the b row intraframe predictive coding macro block that the 2nd P frame (P1 frame) is included is than the first P frame (P0
Frame) the more m rows of a row intraframe predictive coding macro block that are included, m is natural number.Also, it is pre- in the b row frame that the 2nd P frame is included
The first row for a row intraframe predictive coding macro block that the first P frame of the first behavior of survey coded macroblocks is included obtains after moving down y row
It arrives, y is natural number.That is, taking top-down mode to be encoded when the intra-frame macro block to P frame encodes.
Please refer to Fig. 5, specifically, by taking P0 frame and P1 frame as an example, the dash area of each frame indicates that intra prediction is compiled
Decoding macroblock, the blank parts of each frame then indicate inter prediction encoding macro block.The intraframe predictive coding macro block of P0 frame be the 0th row extremely
A-1 row, a row to L-1 behavior inter prediction encoding macro block.0th row of P1 frame is to (y-2) behavior inter prediction encoding
Macro block, y-1 row to (b+y-2) behavior intraframe predictive coding macro block, (b+y-1) row to (L-1) behavior inter-prediction
Coded macroblocks.Wherein, (y-1) that P1 frame includes goes includes to intraframe predictive coding macro block of (N+y-2) row and P0 frame
The row serial number of intraframe predictive coding macro block is identical, that is, has N row macro block in the b row intraframe predictive coding macro block that P1 frame is included
Row serial number is identical as the row serial number of intraframe predictive coding macro block that P0 frame is included.
The rest may be inferred, and for including that the continuation of several P frames encodes according to the method described above in the GOP: P2 frame is included
Intraframe predictive coding macro block the line number amount ratio P1 frame intraframe predictive coding macro block that is included line number amount more than m row, and P2 frame
It is identical with the row serial number of P1 frame N row macro block therein.Until the last line for the intraframe predictive coding macro block that Pi frame is included is
The last line of its L row macro block for being included shows that existing several include intraframe predictive coding macro block in the GOP at this time
P frame completes coding, so that the line number of whole intraframe predictive coding macro blocks covers a complete frame image.Wherein, i is
Natural number, and 0 < i≤k.
Referring to Fig. 6, in another embodiment, being encoded the 2nd P frame in the GOP especially by following steps
It realizes:
The last line for a row intraframe predictive coding macro block that first P frame includes is moved up z row with determination by step S40
The last line of the intraframe predictive coding macro block of 2nd P frame.Wherein, 0 < z < L-a.
Step S41 determines the b row intraframe predictive coding macro block of the 2nd P frame, to encode to the 2nd P frame.
In the present embodiment, the last line for the b row intraframe predictive coding macro block that the 2nd P frame is included is the first P
The last line for a row intraframe predictive coding macro block that frame is included obtains after moving up z row.That is, to macro in the frame of P frame
When block coding, mode from bottom to top is taken to be encoded.Coding principle and top-down coding principle class as described above
Seemingly, it is not added and repeats herein.
Coding mode as described above, when encoding to the intra-frame macro block of P frame, the intra prediction of latter P frame is compiled
Decoding macroblock m row more than the intraframe predictive coding macro block of previous P frame.In another embodiment, to several P frames in GOP
Intra-frame macro block when being encoded, the line number amount that can also set the intraframe predictive coding macro block of each P frame is identical.Alternatively,
The intraframe predictive coding macro block of latter P frame is more different from each other than the line number amount that the intraframe predictive coding macro block of previous P frame has more, example
Such as, m row more than the intraframe predictive coding macro block of the intraframe predictive coding macro block ratio P0 frame of P1 frame, the intraframe predictive coding of P2 frame are macro
N row more than the intraframe predictive coding macro block of block ratio P1 frame, wherein m ≠ n.Therefore, when being encoded to the intra-frame macro block of P frame, to P
The selection mode of the intraframe predictive coding macro block of frame is not limited in present invention embodiment as described above.
Similarly, when carrying out coded treatment to one section of image, this section of image includes several GOP, is carried out such as to each GOP
The upper coding, to complete the coding of this section of image.
Image encoding method as described above, by the P frame for at least two in GOP including intraframe predictive coding macro block
It is successively encoded, so that covering one completely by the line number of the intraframe predictive coding macro block of at least two P frames of coding
Frame image, to complete the image coding of a GOP.Intraframe predictive coding is carried out in P frame, due to the macro-block line of every frame refreshing
Number can control, so that the size of P frame may be limited to smaller range without coming greatly to wireless channel transmission belt
Impact.Simultaneously as intraframe predictive coding macro block can be decoded without necessarily referring to frame, therefore occur during bit stream
When mistake or frame losing, intraframe predictive coding macro block can make the image of corresponding region restore normal, and be further advanced by continuous
Several frames so that image is restored normal using intraframe predictive coding.
Further, it when needing to show the image by encoding as described above, receives and saves in a GOP
By the every IDR frame of coding.Wherein, which is obtained from encoding to the first frame in the picture.Specifically, in point
When broadcasting receiving end and receiving first every IDR frame, every IDR frame is needed individually to save.Then, it receives in the GOP by the P frame of coding.
Wherein, the line number of whole intraframe predictive coding macro blocks of the P frame including intraframe predictive coding macro block is covered in the P frame of process coding
One, lid complete frame image, and the intraframe predictive coding that the latter P frame in the P frame including intraframe predictive coding macro block includes
Macro block is identical as the intraframe predictive coding macro block at least partly row serial number that previous P frame includes.Also, to the every IDR frame received with
And P frame is decoded to play the image of GOP.
When program request end needs to record a video or saves code stream, every IDR frame is stored first, later again from the starting P frame of next GOP
Start to store P frame in order, and forms a file.
When program request end needs to play back video recording, every IDR frame is obtained from file first, and IDR frame is individually saved.Then
Every IDR frame and subsequent P frame are decoded and are shown in order.When player need among the file sometime broadcast
When putting, the position of the starting P frame of GOP where finding that moment first, the P frame code that then every IDR frame and this position are started
Stream is decoded and shows in order.
Referring to Fig. 7, being the structural schematic diagram of picture coding device first embodiment of the present invention, the figure of present embodiment
As code device includes but is not limited to coding module 51.
The coding module 51 is used for the P frame at least two in a picture group GOP including intraframe predictive coding macro block
It is successively encoded, so that covering a complete frame by the intraframe predictive coding macro block line number of at least two P frames of coding
Image.
Referring to Fig. 8, further, which includes the first P frame and the 2nd P frame.The coding module 51 includes
First encoding submodule 510 and the second encoding submodule 511.
First encoding submodule 510 is for encoding the first P frame in GOP.Wherein, any frame in the GOP
Comprising L row macro block, the first P frame includes a row intraframe predictive coding macro block, and L is positive integer, and 0 < a < L.Specifically, a GOP
Interior each P frame includes L row macro block, a behavior intraframe predictive coding macro block therein, and L-a behavior inter prediction encoding is macro
Block.
Second encoding submodule 511 is for encoding the 2nd P frame in the GOP.Wherein, the 2nd P frame and
One P frame it is adjacent or it is intermediate at least be spaced one only include inter prediction encoding macro block P frame.Also, the 2nd P frame includes b row
In the b row frame that intraframe predictive coding macro block, a row intraframe predictive coding macro block that the first P frame includes and the 2nd P frame include
There is the macro block for serial number of mutually going together, 0 <b < L in predictive coding macro block.
Further, the b row intraframe predictive coding macro block that the 2nd P frame includes is than a row intra prediction that the first P frame includes
The more m rows of coded macroblocks, m is natural number.
The b row intraframe predictive coding macro block that a row intraframe predictive coding macro block and the 2nd P frame that first P frame includes include
Mutually the number of macroblocks N of colleague's serial number meets following relationship:
N×X≥G;
Wherein, X be encoder basic coding unit height, G be encoder searches window maximum perpendicular search range, N,
X, G is natural number.
In one embodiment, which is also used to a row intra prediction for including by the first P frame
The first row of coded macroblocks moves down y row to determine the first row of the intraframe predictive coding macro block of the 2nd P frame, and determines
The b row frame predictive coding macro block of 2nd P frame, to be encoded to the 2nd P frame.Wherein, 0 < y < L-a.
The first row for the b row intraframe predictive coding macro block that 2nd P frame is included is by second encoding submodule 511 by
The first row for a row intraframe predictive coding macro block that one P frame is included obtains after moving down y row.That is, second encoding submodule
When the intra-frame macro block coding of 511 pairs of P frames, top-down mode is taken to be encoded.
In another embodiment, which is also used to a row intra prediction for including by the first P frame
The last line of coded macroblocks moves up z row to determine the last line of the intraframe predictive coding macro block of the 2nd P frame, and
The b row intraframe predictive coding macro block of the 2nd P frame is determined, to encode to the 2nd P frame.Wherein, 0 < z < L-a.
The last line for the b row intraframe predictive coding macro block that 2nd P frame is included should by second encoding submodule 511
The last line for a row intraframe predictive coding macro block that first P frame is included obtains after moving up z row.That is, the second coding
When module 511 encodes the intra-frame macro block of P frame, mode from bottom to top is taken to be encoded.
Similarly, when carrying out coded treatment to one section of image, this section of image includes several GOP, is carried out such as to each GOP
The upper coding, to complete the coding of this section of image.
Image encoding method as described above and device, by including that intraframe predictive coding is macro at least two in GOP
The P frame of block is successively encoded, so that covering one by the line number of the intraframe predictive coding macro block of at least two P frames of coding
Complete frame image, to complete the image coding of a GOP.Intraframe predictive coding is carried out in P frame, due to every frame refreshing
Macro block line number can control so that the size of P frame may be limited to smaller range without to wireless channel transmission belt
Greatly to impact.Simultaneously as intraframe predictive coding macro block can be decoded without necessarily referring to frame, therefore work as bit stream mistake
When occurring mistake or frame losing in journey, intraframe predictive coding macro block can make the image of corresponding region restore normal, and further
Image is set to restore normal using intraframe predictive coding by continuous several frames.
In several embodiments provided by the present invention, it should be understood that disclosed system, device and method can
To realize by another way.For example, device embodiments described above are only schematical, for example, the mould
The division of block or unit, only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple
Unit or assembly can be combined or can be integrated into another system, or some features can be ignored or not executed.It is another
Point, shown or discussed mutual coupling or direct-coupling or communication connection can be through some interfaces, device or
The INDIRECT COUPLING or communication connection of unit can be electrical property, mechanical or other forms.
Mode the above is only the implementation of the present invention is not intended to limit protection scope of the present invention, all to utilize this
Equivalent structure or equivalent flow shift made by description of the invention and accompanying drawing content, it is relevant to be applied directly or indirectly in other
Technical field is included within the scope of the present invention.
Claims (10)
1. a kind of image encoding method, which is characterized in that the described method includes:
The P frame for including intraframe predictive coding macro block at least two in a picture group GOP successively encodes, so that by
The intraframe predictive coding macro block line number of at least two P frame of coding covers a complete frame image;
Wherein, it is described by coding at least two P frame between exist mutually go together serial number intraframe predictive coding macro block or
There are the intraframe predictive coding macro blocks of adjacent rows serial number by person, alternatively, existing between at least two P frame by coding
The intraframe predictive coding macro block of same column serial number or intraframe predictive coding macro block there are adjacent column serial number.
2. image encoding method according to claim 1, which is characterized in that at least two P frame include the first P frame and
2nd P frame, at least two in a picture group GOP include that the P frame of intraframe predictive coding macro block successively encodes
The step of include:
The first P frame in one picture group GOP is encoded;Wherein, any frame in the GOP includes L row macro block, described
First P frame includes a row intraframe predictive coding macro block, and L is positive integer, 0 < a < L;
The 2nd P frame in the GOP is encoded;Wherein, the 2nd P frame and the first P frame it is adjacent or it is intermediate at least
One, interval only includes the P frame of inter prediction encoding macro block, and the 2nd P frame includes b row intraframe predictive coding macro block, and described the
There are identical for the b row intraframe predictive coding macro block that a row intraframe predictive coding macro block and the 2nd P frame that one P frame includes include
The macro block of row serial number, 0 <b < L.
3. image encoding method according to claim 2, which is characterized in that the b row intra prediction that the 2nd P frame includes
M row more than a row intraframe predictive coding macro block that coded macroblocks includes than the first P frame, m is natural number.
4. image encoding method according to claim 2 or 3, which is characterized in that in a row frame that the first P frame includes
Mutually the go together number of macroblocks N of serial number of predictive coding macro block and the b row intraframe predictive coding macro block that the 2nd P frame includes meets such as
Lower relationship:
N×X≥G;
Wherein, X is the basic coding unit height of encoder, and G is the maximum perpendicular search range of encoder searches window, N, X, G
It is natural number.
5. image encoding method according to claim 2 or 3, which is characterized in that carried out to the 2nd P frame in the GOP
The step of coding includes:
The first row for a row intraframe predictive coding macro block that the first P frame includes is moved down into y row with determination the 2nd P
The first row of the intraframe predictive coding macro block of frame;Wherein, 0 < y < L-a;And
The b row intraframe predictive coding macro block of the 2nd P frame is determined, to encode to the 2nd P frame.
6. image encoding method according to claim 2 or 3, which is characterized in that carried out to the 2nd P frame in the GOP
The step of coding includes:
The last line for a row intraframe predictive coding macro block that the first P frame includes is moved up into z row with determination described second
The last line of P frame intraframe predictive coding macro block;Wherein, 0 < z < L-a;And
The b row intraframe predictive coding macro block of the 2nd P frame is determined, to encode to the 2nd P frame.
7. a kind of picture coding device, which is characterized in that described device includes:
Coding module, the P frame for including intraframe predictive coding macro block at least two in a picture group GOP successively carry out
Coding, so that covering a complete frame image by the intraframe predictive coding macro block line number of at least two P frame of coding;
Wherein, it is described by coding at least two P frame between exist mutually go together serial number intraframe predictive coding macro block or
There are the intraframe predictive coding macro blocks of adjacent rows serial number by person, alternatively, existing between at least two P frame by coding
The intraframe predictive coding macro block of same column serial number or intraframe predictive coding macro block there are adjacent column serial number.
8. picture coding device according to claim 7, which is characterized in that at least two P frame include the first P frame and
2nd P frame, the coding module include:
First encoding submodule, for being encoded to the first P frame in a picture group GOP;Wherein, appointing in the GOP
One frame includes L row macro block, and the first P frame includes a row intraframe predictive coding macro block, and L is positive integer, and 0 < a < L;
Second encoding submodule encodes the 2nd P frame in the GOP;Wherein, the 2nd P frame and the first P frame
Adjacent or intermediate at least one, interval only includes the P frame of inter prediction encoding macro block, and the 2nd P frame includes b row intra prediction
Coded macroblocks, the b row intra prediction that a row intraframe predictive coding macro block and the 2nd P frame that the first P frame includes include are compiled
There is the macro block for serial number of mutually going together in decoding macroblock.
9. picture coding device according to claim 8, which is characterized in that second encoding submodule is also used to institute
The first row for stating a row intraframe predictive coding macro block that the first P frame includes moves down y row in the frame of determination the 2nd P frame
The first row of predictive coding macro block, and determine the b row intraframe predictive coding macro block of the 2nd P frame, to the 2nd P frame
It is encoded;Wherein, 0 < y < L-a.
10. picture coding device according to claim 8, which is characterized in that second encoding submodule be also used to by
The last line for a row intraframe predictive coding macro block that the first P frame includes moves up z row with determination the 2nd P frame frame
The last line of intraprediction encoding macro block and the b row intraframe predictive coding macro block for determining the 2nd P frame, to described second
P frame is encoded;Wherein, 0 < z < L-a.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510532058.5A CN105163117B (en) | 2015-08-26 | 2015-08-26 | A kind of image encoding method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510532058.5A CN105163117B (en) | 2015-08-26 | 2015-08-26 | A kind of image encoding method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105163117A CN105163117A (en) | 2015-12-16 |
CN105163117B true CN105163117B (en) | 2019-08-16 |
Family
ID=54803858
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510532058.5A Active CN105163117B (en) | 2015-08-26 | 2015-08-26 | A kind of image encoding method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105163117B (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107529069A (en) * | 2016-06-21 | 2017-12-29 | 中兴通讯股份有限公司 | A kind of video stream transmission method and device |
CN109982069B (en) * | 2017-12-28 | 2020-12-29 | 浙江宇视科技有限公司 | Method and system for measuring respiratory effect |
EP3846471A4 (en) | 2018-08-31 | 2022-02-23 | SZ DJI Technology Co., Ltd. | Encoding method, decoding method, encoding apparatus, and decoding apparatus |
CN112929667B (en) * | 2021-03-26 | 2023-04-28 | 咪咕文化科技有限公司 | Encoding and decoding method, device, equipment and readable storage medium |
CN117412053A (en) * | 2022-07-08 | 2024-01-16 | 中兴通讯股份有限公司 | Video encoding method, video encoding device, electronic equipment and storage medium |
CN115580723B (en) * | 2022-12-09 | 2023-06-09 | 中南大学 | Method, system, equipment and medium for optimizing coding of screen content image |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007020213A (en) * | 1996-09-20 | 2007-01-25 | At & T Corp | Video coder providing implicit coefficient prediction and scan adaptation for image coding and intra coding of video |
CN102186079A (en) * | 2011-05-11 | 2011-09-14 | 北京航空航天大学 | Motion-vector-based H.264 baseline profile intra mode decision method |
-
2015
- 2015-08-26 CN CN201510532058.5A patent/CN105163117B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007020213A (en) * | 1996-09-20 | 2007-01-25 | At & T Corp | Video coder providing implicit coefficient prediction and scan adaptation for image coding and intra coding of video |
CN102186079A (en) * | 2011-05-11 | 2011-09-14 | 北京航空航天大学 | Motion-vector-based H.264 baseline profile intra mode decision method |
Also Published As
Publication number | Publication date |
---|---|
CN105163117A (en) | 2015-12-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105163117B (en) | A kind of image encoding method and device | |
US11902567B2 (en) | Method, system and apparatus for intra-refresh in video signal processing | |
CN101341757B (en) | Local macroblock information buffer | |
US9578326B2 (en) | Low-delay video buffering in video coding | |
RU2409005C2 (en) | Method of scalable coding and decoding of video signal | |
CN1981537B (en) | Method and apparatus to enable acquisition of media in streaming applications | |
JP4649615B2 (en) | Video encoding / decoding device, video encoding / decoding method, and program thereof | |
US10264254B2 (en) | Image coding and decoding method, image data processing method, and devices thereof | |
US6304295B1 (en) | Region-based refresh strategy for video compression | |
US20110206125A1 (en) | Adaptive motion resolution for video coding | |
EP1713280A2 (en) | Scalable video coding | |
WO2012060459A1 (en) | Dynamic image distribution system, dynamic image distribution method, and dynamic image distribution program | |
EP2744203A2 (en) | Method for multiview video prediction encoding and device for same, and method for multiview video prediction decoding and device for same | |
JP2001285876A (en) | Image encoding device, its method, video camera, image recording device and image transmitting device | |
CN102598673A (en) | Dynamic reference frame reordering for frame sequential stereoscopic video encoding | |
KR20140048808A (en) | Method and apparatus for video stream encoding according to inter layer prediction for multi-view video, method and apparatus for video stream decoding according to inter layer prediction for multi-view video | |
CN103918258A (en) | Reducing amount of data in video encoding | |
WO2007129911A2 (en) | Method and device for video encoding and decoding | |
KR20080077430A (en) | Image codec system for supporting spatial random access and image encoding/decoding equipment and method thereof | |
CN115914648A (en) | Video image processing method and device | |
US20140294091A1 (en) | Method of and apparatus for compression encoding a picture in a picture sequence | |
KR101051040B1 (en) | Deblocking filtering method | |
KR20070045737A (en) | Method and apparatus for a temporal & spatial scalable encoding/decoding based on multiple reference frames | |
CN117812268A (en) | Video transcoding method, device, equipment and medium | |
KR100968808B1 (en) | Variable length code decoding system and decoding method thereof |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |