CN108737825A - Method for coding video data, device, computer equipment and storage medium - Google Patents
Method for coding video data, device, computer equipment and storage medium Download PDFInfo
- Publication number
- CN108737825A CN108737825A CN201710241529.6A CN201710241529A CN108737825A CN 108737825 A CN108737825 A CN 108737825A CN 201710241529 A CN201710241529 A CN 201710241529A CN 108737825 A CN108737825 A CN 108737825A
- Authority
- CN
- China
- Prior art keywords
- encoded
- frames
- original image
- image
- frame
- 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.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/134—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
- H04N19/142—Detection of scene cut or scene change
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/50—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
- H04N19/503—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
- H04N19/51—Motion estimation or motion compensation
- H04N19/573—Motion compensation with multiple frame prediction using two or more reference frames in a given prediction direction
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N7/00—Television systems
- H04N7/14—Systems for two-way working
- H04N7/141—Systems for two-way working between two video terminals, e.g. videophone
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N7/00—Television systems
- H04N7/14—Systems for two-way working
- H04N7/15—Conference systems
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
The present invention relates to a kind of method for coding video data, device, computer equipment and storage mediums.Wherein, this method includes:Obtain video frame to be encoded;When having encoded an I frame, then caching is encoded to the original image of I frames;When being encoded to next I frames, it would be desirable to which the original image being encoded in the original image and caching of I frames is compared;When comparing result be image it is opposing stationary, then need the original image for being encoded to I frames to be encoded to P frames by described;When comparing result be image relative motion, then the original image for being encoded to I frames will be needed to be encoded to I frames.Pass through above-mentioned method for coding video data, device, computer equipment and storage medium so that receive terminal after receiving the coded frame data, when decoding and playing video frame, taken into account the clarity and fluency of the broadcasting of video frame.
Description
Technical field
The present invention relates to technical field of video coding, more particularly to a kind of method for coding video data, device, computer
Equipment and storage medium.
Background technology
Video is made of multiple continuous pictures, and each tableaux is a video frame.In order to improve transmission of video
Efficiency, it usually needs transmitted again after being encoded to the video in network, receive terminal receive coding after video after, press
According to corresponding decoding process, the video is decoded, to realize the broadcasting to decoded video.
Traditional technology, it is higher and higher with the quality of video capture, in meeting is shared and the applications such as desktop is shared,
It is generally necessary to which transmission is large-sized video, for example, size is 1000*2000.For this large-sized video, if hair
Make arrangements for his funeral end code check setting it is too small, the coded data of video can be made not transferred out completely, cause receive terminal solved
The video pictures that code goes out are fuzzy, not enough clearly.If the code check setting for sending terminal is excessive, and is accessible to the bandwidth upper limit and causes
Coded data packet loss in transmission process so that receive terminal and be difficult to, to the data decoding received, cannot normally show and regard
The fluency of frequency picture, video playing is relatively low.
To sum up, traditional method for coding video data can not take into account the video pictures of the reception terminal reception display of video
Clarity and fluency.
Invention content
Based on this, it is necessary in view of the above technical problems, provide a kind of can take into account and receive the video that terminal receives display
The clarity of picture and the method for coding video data of fluency, device, computer equipment and storage medium.
A kind of method for coding video data, including:
Obtain video frame to be encoded;
When having encoded an I frame, then caching is encoded to the original image of I frames;
When being encoded to next I frames, it would be desirable to which the original image being encoded in the original image and caching of I frames carries out pair
Than;
When comparing result be image it is opposing stationary, then need the original image for being encoded to I frames to be encoded to P frames by described;
When comparing result be image relative motion, then the original image for being encoded to I frames will be needed to be encoded to I frames.
A kind of video data coding device, including:
Video frame acquisition module, for obtaining video frame to be encoded;
Image buffer storage module, for when having encoded an I frame, then caching to be encoded to the original image of I frames;
Image comparison module, for when being encoded to next I frames, it would be desirable to be encoded to the original image and caching of I frames
In original image compared;
Video encoding module then needs to be encoded to the original of I frames for being that image is opposing stationary when comparing result by described
Image is encoded to P frames;When comparing result be image relative motion, then the original image for being encoded to I frames will be needed to be encoded to I frames.
A kind of computer equipment, including memory, processor and storage can be run on a memory and on a processor
Computer program, the processor realize the method for coding video data when executing described program.
A kind of computer readable storage medium, is stored thereon with computer program, which realizes when being executed by processor
The method for coding video data.
Above-mentioned method for coding video data, device, computer equipment and storage medium, when being encoded to next I frames,
Original image in the original image and caching that need to be encoded to I frames is compared;By comparing result come determine be should
It needs the original image for being encoded to I frames to be encoded to I frames and is still encoded to P frames.If comparing result is that image is opposing stationary, illustrate
Similarity between two frame original images is larger, needs the original image for being encoded to I frames to be encoded to P frames by described, is needed with reducing
It is encoded to the amount of coded data of the original image of I frames, the probability of packet loss, while coded number occurs in transmission to reduce
According to the reduction of amount, the efficiency for improving and receiving decoding terminals can be also corresponded to, improves the fluency of corresponding presentation of video frames.If comparison knot
Fruit is image relative motion, then illustrates differing greatly between two frame original images, it would be desirable to which the original image for being encoded to I frames is compiled
Code is I frames to be prevented from being encoded as P frames to retain the complete information of the original image, and the picture that reception decoding terminals are shown is made to become
It obtains fuzzyyer.The coding mode that the original image for needing to be encoded to I frames is dynamically adjusted by comparative situation, to realize
Terminal is received after receiving the coded frame data, when decoding and playing video frame, has taken into account the clarity of the broadcasting of video frame
And fluency.
Description of the drawings
Fig. 1 is the application scenario diagram of method for coding video data in one embodiment;
Fig. 2 is the application scenario diagram of method for coding video data in another embodiment;
Fig. 3 is the internal structure chart of first terminal in one embodiment;
Fig. 4 is the flow chart of method for coding video data in one embodiment;
Fig. 5 is the demonstration graph of coding video frames in one embodiment;
Fig. 6 is the flow chart of method for coding video data in another embodiment;
Fig. 7 is the schematic diagram of the region division of original image in one embodiment;
Fig. 8 is the schematic diagram that the picture in terminal frame of display video is received in one embodiment;
Fig. 9 is the structure diagram of video data coding device in one embodiment;
Figure 10 is the structure diagram of video data coding device in another embodiment.
Specific implementation mode
In order to make the purpose , technical scheme and advantage of the present invention be clearer, with reference to the accompanying drawings and embodiments, right
The present invention is further elaborated.It should be appreciated that specific embodiment described herein is only used to explain the present invention, not
For limiting the present invention.
The method for coding video data that the embodiment of the present invention is provided can be applied in application environment as shown in Figure 1.Ginseng
Fig. 1 is examined, first terminal 110 and second terminal 120 can be carried out data transmission by network.First terminal 110 can be used as video counts
According to transmission terminal, second terminal 120 can be used as the reception terminal of video data.First terminal 110 can obtain to be encoded regard
Frequency frame;And the video frame images of each frame are encoded to I frames or P frames.Complete the volume to the video frame images of a frame or multiframe
Code after, can by after coding I frames or P frame data be sent to second terminal.I frame of the second terminal 120 after receiving coding
Or when P frames, it can decode corresponding video according to corresponding decoding process and play.It is understood that in other scenes
Under, first terminal 110 can also be used as the reception terminal of video data, and second terminal 120 is then as the transmission of video data end
End, second terminal 120 will be sent to first terminal 110 and be decoded and play after video data encoding.
In one embodiment, as shown in Fig. 2, providing a kind of concrete application environment of method for coding video data.
The application environment is also using first terminal 110 as the terminal for sending video data, and second terminal 120 is as reception video data
Terminal is illustrated.Wherein, first terminal 110 can be according to the picture shown on preset frequency collection itself desktop window
Information, as video frame to be encoded.By the collected coding video frames of institute it is I frames or P frames according to preset coding mode, and
In real time by after coding I frames or P frames be sent to second terminal, wherein transmitted data also carry code identification.Second eventually
End 120 can use corresponding decoding process according to the code identification, will be connect after receiving the data transmitted by first terminal
The I frames or P frame decodings received is corresponding picture, and the picture to being decoded carries out rendering and shows.Answering in the present embodiment
Can be the scene of real-time recording transmission with scene, for example, can be the scene for carrying out video conference, first terminal 110 be encoded
Video data can be video conference in video data or share desktop data.
In one embodiment, as shown in figure 3, being the internal structure chart of first terminal in one embodiment.First end
End includes the processor connected by system bus, non-volatile memory medium, built-in storage, encoder, network interface and shows
Display screen.Wherein, the processor of the first terminal supports the operation of entire server for providing calculating and control ability.The end
It is stored with operating system and video data coding device in the non-volatile memory medium at end.The video data coding device is used for
Realize a kind of method for coding video data that following embodiment provides.Computer-readable finger can be stored in the built-in storage
It enables, when which is executed by processor, processor may make to execute following embodiment is provided one
Kind method for coding video data.The network interface is used to be communicated with external terminal or server, realizes the transmission of data.
For example send the data after encoding to second terminal.Display screen can be used for showing video pictures, for example can show desktop presentation
Image.
It will be understood by those skilled in the art that structure shown in Fig. 3, is only tied with the relevant part of application scheme
The block diagram of structure, does not constitute the restriction for the first terminal being applied thereon to application scheme, and specific first terminal can be with
Including than more or fewer components as shown in the figure, either combining certain components or being arranged with different components.For example,
It may also include camera in the first terminal, for being scanned to visible area, generate video frame.
In one embodiment, as shown in figure 4, providing a kind of method for coding video data, this method can be applied to as
In application environment shown in fig. 1 or fig. 2.The present embodiment is applied to illustrate for above-mentioned first terminal in this way, wraps
It includes:
Step S402 obtains video frame to be encoded.
In one embodiment, video frame to be encoded is one group of original image in video to be encoded.This is to be encoded
Video frame include all original images constituted in corresponding video, or only include the original for constituting the part in corresponding video
Beginning image.For example, can be according to the original image in preset extraction frequency abstraction video, the original image set that will be extracted
As video frame to be encoded.The video to be encoded can be already existing complete video, can also be to be scanned by camera
The video generated in real time.
In one embodiment, first terminal can call camera to be scanned visible area, according to preset frame per second
Video frame is generated, and is presented on display interface in real time.For the original image presented in real time, can according to less than or equal to
The sample frequency of the frame per second is acquired it, is video frame to be encoded by the original image set cooperation acquired.At one
In embodiment, first terminal can also be directly according to the picture on preset frequency collection desktop window, as video to be encoded
Frame.
Step S404, when having encoded an I frame, then caching is encoded to the original image of I frames.
In the present embodiment, I frames refer to being encoded using intraframe prediction algorithm, and so-called intra prediction refers to being carried out in spatial domain
Predictive coding algorithm.I frames are typically the first frame of each GOP (Group of Pictures, picture group).One GOP is one
The continuous coded frame of group is set of the I frame plus the P frames encoded with reference to it after it.P frames refer to being calculated using inter-prediction
Method encodes, and so-called inter-prediction refers to the predictive coding algorithm carried out in time-domain, such as can refer to former frame and carry out in advance
What is obtained after survey coding present frame coding is P frames.P frame recordings are between the original image being encoded and other original images
Differential information, decoding P frames need coded frame ability decodable code referenced by it to go out corresponding video frame.
The length of GOP be the I frames being encoded and positioned at P frames thereafter quantity and.When original image to be encoded is compiled
When code is I frames, i.e. the beginning of one GOP of expression and the end of a upper GOP.
In one embodiment, first terminal can pre-set the length of GOP, and according to the length of set GOP, right
Video frame is encoded.Wherein, set GOP length can be the length being arbitrarily designated in advance, can also be a variety of different length
Degree, to switch over or adjust, it is not limited to a kind of fixed length.
For the first frame original image in video frame to be encoded, I frames can be encoded to.When having encoded an I frame
When, the original image of the I frames can be cached.
In one embodiment, original image can be the complete video requency frame data of corresponding video frame, can also be to the frame
Data have carried out after data reject, the video requency frame data that is preserved.For example, the luminance component in extractable video frame, and give up
Color component will remain the video frame of luminance component as the original image of the I frames.By only retaining luminance component, can drop
Low cached data volume, saves memory space.
In one embodiment, acquired video frame to be encoded can be compiled according to preset encoding and decoding standard
Code.Wherein, preset encoding and decoding standard can be H264 coding standards, can be also VP8, VP9, H263, H265 volume of any one
Decoding standard.For example, the original image encoded can will be needed to be encoded to I frames or P frames according to H264 coding standards.
Step S406, when being encoded to next I frames, it would be desirable to be encoded to original in the original image and caching of I frames
Image is compared, and judges that comparing result is that image is opposing stationary or image relative motion.
In one embodiment, next I frames are encoded to, indicate to prepare current original image to be encoded being encoded to I
The case where frame.Specifically, when being encoded to next I frames, indicate that the GOP for preparing to terminate a current length, entrance are next
The GOP of a length.
For example, as shown in figure 5, preset GOP length is 30, then it represents that by the first frame under a preset GOP
Original image 501 is as the original image for needing to be encoded to I frames, and remaining 29 frame original image is as needing to be encoded to P frames
Original image.30 frames in original image 501 to original image 503 are the original image under current GOP.When by original image
502 are encoded to P frames to original image 503, and when being encoded to original image 504, i.e., presentation code has arrived the feelings of next I frames
Shape.
In one embodiment, the previous frame of the original image and caching that are encoded to I frames can will be needed to be encoded as I frames
Original image is compared, and needs to be encoded to the caching of the original images of I frames relative to comparison according to comparing result judgement
Original image is static or movement.Specifically, all data that two frame original images are included can be compared, it also can be only
Compare the data of the luminance component in two frame original images.
Step S408, when comparing result be image it is opposing stationary, then the original image for being encoded to I frames will be needed to be encoded to P
Frame.
When judge the needs be encoded to I frames original image it is static relative to the original image of the caching of comparison when, i.e.,
Indicate that the similarity between two frame original images is higher, the original image which can be encoded to I frames is encoded to P frames.Specifically
, any one coded frame from last I frames and its later is can refer to, the original image which is encoded to I frames encodes
For P frames.For example, can P frames be encoded to the original image 504 in such as Fig. 5.
In one embodiment, can refer to an I frame will need the original image for being encoded to I frames to be encoded to P frames, or
The original image for being encoded to I frames will be needed to be encoded to P frames with reference to a upper coded frame.
What it is due to the reflection of P frames is different information between corresponding original image and reference picture, needs to encode original
Similarity between image and the original image of corresponding reference is higher, then the data volume occupied by the corresponding I frames being encoded also is got over
It is small, it is that opposing stationary original image is encoded to P frames by comparing result, the occupancy of the data after coding can be reduced.So that
It is higher to the coding quality of the original image under same code rate.And it when the receipt of subsequent terminal-pair P frames are decoded, can carry
High decoded efficiency, to which the fluency to decoded video playing can be improved.
Step S410, when comparing result be image relative motion, then the original image for being encoded to I frames will be needed to be encoded to I
Frame.
When judging that the needs are encoded to original image movement of the original image of I frames relative to the caching of comparison, i.e.,
Show differing greatly between two frame original images.If continuing to be encoded to P frames, due to needing to refer to the original graph of upper I frames
The frame data of picture are encoded generated data volume also can be relatively large, and compared to I frames are encoded to, data volume can not
There is larger reduction.Terminal is received when decoding the P frames, the decoding efficiency relative to I frames can not be greatly improved, even
It can reduce instead and corresponding picture can not be decoded in time.And when continuing to be encoded to P frames, since data volume is larger, can also it increase
The probability that big coding or decoding go wrong, makes the image that reception terminal is decoded thicken.It is therefore not necessary to change needs
It is encoded to the coding mode of the original image of I frames, is encoded to I frames, to retain the complete of the original image after image change
Information makes reception terminal decode the I frame images, and the picture shown is with certain clarity.
Above-mentioned method for coding video data, when being encoded to next I frames, it would be desirable to be encoded to the original image of I frames
It is compared with the original image in caching;By comparing result come determine be by the needs be encoded to I frames original image compile
Code is that I frames are still encoded to P frames.If comparing result is that image is opposing stationary, illustrate the similarity between two frame original images
It is larger, need the original image for being encoded to I frames to be encoded to P frames by described, to reduce the volume for the original image for needing to be encoded to I frames
There is the probability of packet loss, while the reduction of amount of coded data in transmission to reduce, can also correspond to raising and connect in code data volume
The efficiency of decoding terminals is received, the fluency of corresponding presentation of video frames is improved.If comparing result is image relative motion, illustrate two
Differing greatly between frame original image, it would be desirable to which the original image for being encoded to I frames is encoded to I frames, is differed greatly with retaining this
Original image complete information, prevent from being encoded as P frames, make reception decoding terminals show picture become fuzzyyer.Pass through
Comparative situation dynamically adjusts the coding mode for the original image for needing to be encoded to I frames, receives terminal to realize and is connecing
After receiving the coded frame data, when decoding and playing video frame, the clarity and fluency of the broadcasting of video frame have been taken into account.
In one embodiment, above-mentioned method for coding video data further includes:When being encoded to a P frame, detection needs
Whether the original image for being encoded to P frames there is scene change relative to the original image of former frame, if so, will need to encode
P frames are encoded to for the original image of P frames, otherwise, it would be desirable to which the original image for being encoded to P frames is encoded to I frames.
In one embodiment, it is encoded to a P frame, indicates to prepare current original image to be encoded being encoded to P frames
The case where.
It is similar with image relative motion, between scene change also illustrates that the opposite original image compared of original image, tool
There is certain difference.When to needing the original image for being encoded to P frames to encode, the original image is detected relative to former frame
Original image whether there is scene change, determine the volume that the needs are encoded to the original image of P frames according to testing result
Code mode.
When determining existing scene change, for the original image for needing to be encoded to P frames, it is encoded to I frames.Work as judgement
When not occurring scene change, for the original image for needing to be encoded to P frames, it is encoded to P frames.
In one embodiment, when the original image for being encoded to P frames will be needed to be encoded to I frames, it can perform above-mentioned step
Rapid S404, the original image that the needs are encoded to P frames cache.And further using the I frames as the default length of current GOP
The frame data of first frame in degree, as the reference frame positioned at the original image for needing to be encoded to P frames thereafter.
In the present embodiment, by needing the original image for being encoded to P frames to carry out scene change detection, being occurred according to judgement
When scene change, it would be desirable to which the original image for being encoded to P frames is encoded to I frames.If continuing to be encoded to P frames, compared to being compiled
Code is I frames, and data volume can not have larger reduction.Terminal is received when decoding the P frames, the decoding efficiency relative to I frames is simultaneously
It cannot be greatly improved, or even can reduce instead and corresponding picture can not be decoded in time.And when continuing to be encoded to P frames,
Since data volume is larger, coding or the probability that decoding goes wrong also are will increase, the image that reception terminal is decoded is made to become
It is fuzzy.So it would be desirable to which the original image for being encoded to P frames is encoded to I frames, to retain the complete of the original image after image change
Information makes reception terminal decode the I frame images, and the picture shown is with certain clarity.It is moved by comparative situation
The coding mode for adjusting to state the original image for needing to be encoded to P frames is receiving the coded frame to realize reception terminal
After data, when decoding and playing video frame, the clarity and fluency of the broadcasting of video frame have been taken into account.
In one embodiment, it would be desirable to which the original image being encoded in the original image and caching of I frames carries out comparison and adopts
At least one of with the following methods:The binary data for comparing two field pictures, comparing result is that image is opposite if equal
Static, otherwise comparing result is image relative motion;Individual element compares two field pictures, calculates the absolute of the pixel of two field pictures
Error, if absolute error is less than preset error threshold, comparing result is that image is opposing stationary, and otherwise comparing result is image
Relative motion;Two field pictures are respectively classified into the region of preset quantity, compare one by one two field pictures each region binary system
Data, if the equal region quantity of binary data is more than predetermined number, comparison result is that image is opposing stationary, is otherwise compared
As a result it is image relative motion.
In one embodiment, the binary data of image includes all binary numbers in original image to be compared
According to.If the original image cached is the luminance component in original image, binary data to be compared is corresponding brightness
The binary data of component.When the two comparing result is identical, then it represents that the picture that the two field pictures are shown is also identical, judgement comparison
As a result it is that image is opposing stationary.If the two comparing result is different, then it represents that the picture that the two field pictures are shown is also different, judgement pair
It is image relative motion than result.By directly comparing the binary data of two field pictures, comparison can be rapidly obtained
As a result, improve two field pictures to specific efficiency.
In one embodiment, first terminal can obtain the pixel data of two field pictures, and compare in two field pictures one by one
Each corresponding position pixel, calculate the absolute error of the pixel at each position, and the picture at each position of adding up
The absolute error of element, the absolute error of the pixel of obtained absolute error and as two field pictures.It is more calculated absolute
Error and the size between preset error threshold, if when absolute error is less than preset error threshold, comparing result is
Image is opposing stationary, and otherwise comparing result is image relative motion.
Specifically, can be according to formula S AD=∑ abs (i1-i0) calculate the absolute error of two field pictures.Wherein, i1It indicates
Need the pixel value for the ith pixel being encoded in the original image of I frames;i0Indicate the of the original image of the previous frame of caching
The pixel value of i pixel.Obtained SAD is the absolute error of two field pictures.Absolute error is smaller, that is, indicate two field pictures it
Between difference it is smaller.By the calculated absolute error of institute, it can accurately reflect the difference size between two field pictures.
In one embodiment, second terminal can be by two field pictures to be compared according to the dividing mode of preset quantity, will
The two is divided into the region of preset quantity.Wherein, the size in each region can be identical, or different.First terminal comparable two
In frame image, whether the binary data in the region of each pair of division is identical, and calculates the quantity of identical binary data, if two
The equal region quantity of binary data is more than predetermined number, then comparison result is that image is opposing stationary, and otherwise comparison result is figure
As relative motion.Wherein, predetermined number may be less than or equal to the region divided preset quantity.For example, can be present count
The half of amount or three/second-class.
By to two field pictures carry out region division, and compare one by one two field pictures each region binary data,
Judge comparing result according to the equal region quantity of binary data, can take into account two field pictures to specific efficiency and contrast difference
Accuracy.
In one embodiment, above-mentioned method further includes:When receiving the request of newly-increased video reception terminal, then will
The coding video frames that need to currently encode are I frames.
In the present embodiment, first terminal can in real time by original image in collected video frame encoded and passed
It is defeated, coded data is sent to reception terminal.Wherein, reception terminal may include multiple.First terminal can appoint what is encoded
Reception of anticipating increases the request of video reception terminal newly.
When receiving the request of newly-increased video reception terminal, then no matter whether the video frame that need to currently encode is encoded
Next I frames original image, the original image for the next P frames being also encoded into, then directly by the original that need to be encoded
Beginning image is encoded to I frames.And executable above-mentioned step S404, to cache the original image.
In the present embodiment, when detecting the reception terminal for having increased video newly, the video reception terminal newly-increased relative to this,
The video frame that need to currently encode is first frame, thus can be directly I frames by the coding video frames that need to currently encode.It prevents from encoding
For P frames when, newly-increased reception terminal due to do not have receive before reference frame and be difficult to be decoded it and show.Therefore,
It is I frames by the coding video frames that need to currently encode so that newly-increased reception terminal can be solved without reference to the coded frame of other frames
Code goes out corresponding picture, improves the promptness of newly-increased reception terminal display video pictures.
In one embodiment, P frames are encoded using the first quantization parameter, I frames are encoded using the second quantization parameter, wherein
Second quantization parameter is more than the first quantization parameter.
In the present embodiment, first terminal is also provided with the first quantization parameter and the second quantization parameter, wherein the first quantization ginseng
Number is more than the second quantization parameter.It is approximately limited more that quantization, which refers to the continuous value (or a large amount of possible discrete values) of signal,
The process of a (or less) centrifugal pump.Quantization parameter (Quantization Parameter, abbreviation QP), which can reflect, to be quantized
Data afterwards are compared to the compression ratio before quantization.The numerical value of quantization parameter is smaller, indicates finer, the corresponding compression ratio of quantization
It is smaller, to initial data be lost it is also more.The numerical value of quantization parameter is bigger, indicates more coarse, the corresponding pressure of quantization
Shrinkage is bigger, to initial data be lost it is also more.
Since I frame data are with respect to for P frame data, the data volume occupied is larger, so as to according to the second larger quantization
Parameter will determine that the original image for being encoded as I frames is encoded to I frames, suitably to reduce the data volume of I frames, reduces and is sending the I
When frame data, there is the probability of packet loss.It will determine that the original image for being encoded as P frames encodes according to the first smaller quantization parameter
For P frames, retain more data volumes so that receipt of subsequent end can get more visible picture when decoding P frames.
In one embodiment, it can be correspondingly arranged or adjust the first quantization parameter according to set code check (i.e. bit rate)
With the second quantization parameter.Wherein, if code check is larger, it can be correspondingly arranged smaller the first quantization parameter and the second quantization parameter,
To properly increase according to the encoded data volume of quantization parameter, to improve the quality of coding, reception terminal is set to get apparent
Picture.If code check is smaller, it can be correspondingly arranged smaller the first quantization parameter and the second quantization parameter, suitably to reduce basis
The encoded data volume of quantization parameter, makes reception terminal get more smooth picture.
In one embodiment, using coding rate encoded video frame corresponding with cpu busy percentage, and in an encoding process
According to the cpu busy percentage dynamic adjustment coding rate obtained in real time.
In the present embodiment, coding rate is smaller, then the quality of corresponding coding is higher, correspondingly, can also occupy more CPU
Utilization rate.Coding rate is bigger, then the quality of corresponding coding is lower, correspondingly, can also occupy less cpu busy percentage.
First terminal can pre-establish the correspondence between the cpu busy percentage and coding rate of different terminal itself.
Wherein, cpu busy percentage is bigger, then corresponding coding rate is bigger, to improve the occupancy for reducing coding to CPU;Cpu busy percentage
Smaller, then corresponding coding rate is smaller, to properly increase occupancy of the coding to CPU, improves coding quality.
First terminal can be utilized according to the current cpu busy percentage of certain frequency acquisition according to acquired current CPU
Rate obtains corresponding coding rate, according to the coding rate come encoded video frame.Wherein, quilt can will be determined according to the coding rate
The original image for being encoded to I frames is encoded to I frames;It will determine that the original image for being encoded as P frames is encoded to P according to the coding rate
Frame.It, can by the cpu busy percentage dynamic adjustment coding rate obtained in real time, and according to the coding rate encoded video frame of adjustment
The play quality for receiving the video that terminal obtains is improved on the whole.
In one embodiment, as shown in fig. 6, providing another method for coding video data, this method is to be applied to
First terminal is illustrated, including:
Step S602 obtains video frame to be encoded.
In one embodiment, video frame is made of the original image of multiframe.First terminal can obtain every in video frame
One frame original image is encoded, or can be encoded according to the original image in certain extraction frequency abstraction video.
The original image can be the frame image that acquires in real time of camera, can also be the image that shows on the desktop of first terminal.
Step S604, when having encoded an I frame, then caching is encoded to the original image of I frames.
In one embodiment, the original image cached is used for and the original image for being encoded to I frames is subsequently needed to carry out
Comparison, compares the difference between two field pictures.The data of the luminance component in the original image of I frames thus can be only encoded to, are made
It obtains in the case where not influencing the difference of comparison, reduces the data volume of caching.
Step S606 judges that original image to be encoded needs to be encoded to the original image of I frames or needs to be encoded to P
The original image of frame.If the original image for needing to be encoded to I frames, S608 is thened follow the steps, if the original for needing to be encoded to P frames
Beginning image, thens follow the steps S610.
In one embodiment, by current original image to be encoded and it can be located at periodically according to the length of current GOP
The original image of preset quantity afterwards is respectively set to need to be encoded to the original image of I frames or needs to be encoded to the original of I frames
Image.
Step S608, it would be desirable to which the original image being encoded in the original image and caching of I frames is compared, and judges to compare
As a result it is that image is opposing stationary or image relative motion.It is opposing stationary if image, S612 is thened follow the steps, if image phase
To movement, S614 is thened follow the steps.
In one embodiment, it can judge that the original image is encoded to relative to the previous frame in caching according to comparing result
I frame original images are that image relative motion or image are opposing stationary.
In one embodiment, two field pictures can be respectively classified into the region of preset quantity, compare two field pictures one by one and exist
The binary data in each region, if the equal region quantity of binary data is more than predetermined number, comparison result is image
It is opposing stationary, otherwise, it is determined that comparison result is image relative motion.
For example, it is 6 that preset quantity, which can be arranged, and predetermined number is 3.As shown in fig. 7, the previous frame that will be cached
The original image equivalent for being encoded to I frames is divided into 6 regions, and each region corresponds to a binary data.It simultaneously will be to be encoded
Original image be also divided into 6 regions according to corresponding dividing mode, obtain the binary data in 6 regions, and one by one
Compare in two field pictures, whether the binary data in each region is equal.When equal number is more than 3, then judge to wait compiling
It is that image is opposing stationary that the original image of code is encoded to I frame original images relative to the previous frame in caching, executes step S612.
Otherwise, it is determined that comparison result is image relative motion, step S614 is executed.
Whether step S610, the original image for detecting original image to be encoded relative to former frame there is scene change.
If so, thening follow the steps S614, otherwise, step S612 is executed.
When original image to be encoded needs to be encoded to the original image of P frames in current GOP coding modes, inspection
Whether the original image for surveying original image to be encoded relative to former frame there is scene change.
In one embodiment, can detect whether difference of the original image between the image of previous frame is more than pre-
If difference size, determine whether scene change occurred according to the difference size.
In one embodiment, first terminal can pre-set scenecut parameter values, which is to be needed for decision
Whether the original image to be encoded there is the critical value of scene change relative to the original image of former frame.First terminal can pass through
Encoder is that the original image of each frame calculates a metric, and the metric is for reflecting itself and the original image of former frame
Difference degree.Metric is bigger, then illustrates that the difference degree of the original image of the original image and former frame that need to edit is bigger.
First terminal it is comparable calculated metric and the scenecut parameter values size, if more than the scenecut parameters
Value determines live scape if illustrating to need difference of the original image encoded between the original image of former frame excessive
Transformation;Otherwise, it is determined that not occurring scene change.
When determining existing scene change, S614 is thened follow the steps, otherwise, executes step S612.
Current original image to be encoded is encoded to P frames by step S612.
Current original image to be encoded is encoded to I frames by step S614.
In one embodiment, coding rate encoded video frame corresponding with cpu busy percentage can be used, and in cataloged procedure
The cpu busy percentage dynamic adjustment coding rate that middle basis obtains in real time.
First terminal can pre-establish the correspondence between the cpu busy percentage and coding rate of different terminal itself.
For example, pre-set coding rate is respectively the first coding rate, the second coding rate and third coding rate from small to large
Three grades.Pre-set cpu busy percentage is the first cpu busy percentage threshold value and the second cpu busy percentage threshold value from small to large.
First terminal can taken at regular intervals cpu busy percentage, when the utilization rate be less than the first cpu busy percentage threshold value when, if currently
Coding rate not be minimum coding rate, then reduced a grade.For example, current coding rate can be compiled by third
Code speed is reduced to the second coding rate, or current coding rate is reduced to the first coding rate by the second coding rate.
When the utilization rate is more than the second cpu busy percentage threshold value, if current coding rate is not highest coding rate, increased
One grade.For example, can the second coding rate be increased to by the first coding rate for current coding rate, or by current volume
Code speed is increased to third coding rate by the second coding rate.
According to the coding mode of coding rate and judgement after adjustment, current original image correspondence to be encoded is encoded to
I frames or P frames.By the cpu busy percentage dynamic adjustment coding rate obtained in real time, and according to the coding rate encoded video of adjustment
Frame can improve the play quality for receiving the video that terminal obtains on the whole.
Above-mentioned method for coding video data, by comparing the otherness between two field pictures, to determine original to be encoded
The coding mode of beginning image.When differing greatly between continuous original image in video frame, then corresponding original image is compiled
Code is I frames to be prevented from being encoded as P frames to retain the complete information of the original image to differ greatly, makes reception decoding terminals exhibition
The picture shown becomes fuzzyyer.When the difference between continuous original image in video frame is smaller, then will need to be encoded to I frames
Original image is encoded to P frames, to reduce the data volume of the coded data, while the reduction of amount of coded data, can also correspond to raising
The efficiency of decoding terminals is received, the fluency of corresponding presentation of video frames is improved.
In one embodiment, above-mentioned method further includes:When determination will need the original image for being encoded to I frames to be encoded to
P frames, or after the original image for being encoded to P frames being needed to be encoded to I frames, adjust the length of current GOP.
The GOP of two kinds of length, respectively the first length and the second length can be pre-set, wherein the first length is more than second
Length.Using the corresponding first frame original images of each GOP as the original image for needing to be encoded to I frames.As the next GOP of entrance
When, the length of next GOP can be kept identical as the upper length of a GOP.Wherein, however, it is determined that by current original graph to be encoded
As when being encoded to I frames, then it represents that enter next GOP.
Specifically, if it is determined that the original image for being encoded to I frames will be needed to be encoded to P frames, and the length of current GOP is first
Length, then by its length adjustment be the second length, using reduce original image to be encoded as image it is opposing stationary when, entire video
The quantity of I frames is encoded as in frame.If it is determined that the original image for being encoded to P frames will be needed to be encoded to I frames, and the length of current GOP
Degree is the second length, then is the first length by its length adjustment, whole when there are scene changes to reduce original image to be encoded
The quantity of P frames is encoded as in a video frame.
Since in video file, the otherness between continuous video frame images can there is a situation where suddenly big or suddenly small.According to
Above-mentioned method for coding video data illustrates to connect when it is that image is opposing stationary to detect the original image for needing to be encoded to I frames
Difference between continuous video frame images is smaller, can extend the length of current GOP, is encoded to P frames.It needs to compile detecting
Code is the original image of P frames when there is scene change, illustrates differing greatly between continuous video frame images, can shorten current
The length of GOP is encoded to I frames.The size according to the otherness between video frame images to be encoded is realized come adaptive
Adjust the length of current GOP with answering.So that video reception terminal is receiving the coded data, decoding and is playing in video frame
When picture, the clarity and fluency of the video pictures of display can be taken into account.
In one embodiment, the data after coding can be sent to second terminal by first terminal in real time, wherein be sent out
Code identification is carried in the coded data sent.And first terminal can be compiled after the original image for having encoded a frame in real time
The transmission of code data, or after the original image for having encoded preset quantity frame, transmit to second terminal.
Second terminal obtains the coding entrained by the coded data after the coded data for receiving first terminal transmission
Mark may recognize that coding standard and the coded data used by corresponding coded data for I frames also according to the code identification
It is the coding modes such as P frames, according still further to corresponding decoding process, decodes corresponding frame image and show.As shown in figure 8, being the
Two terminals are in the coded data for the method for coding video data that decoding is provided by above-described embodiment, the decoding picture that is shown
Face.The data of first I frame are by the picture Relative Fuzzy of decoding display, and subsequent P frames picture is then more and more clear, and not shadow
Ring the process of video playing.So that the coded data sent according to above-mentioned method for coding video data in decoding first terminal
It is lower in code check and during showing, the fluency of video playing is maintained, and video pictures can be allowed from fuzzy
It is finally very clear to clearly showing.
In one embodiment, as shown in figure 9, providing a kind of video data coding device.The device includes video frame
Acquisition module 902, image buffer storage module 904, image comparison module 906 and video encoding module 908.Wherein:
Video frame acquisition module 902, for obtaining video frame to be encoded.
Image buffer storage module 904, for when having encoded an I frame, then caching to be encoded to the original image of I frames.
Image comparison module 906, for when being encoded to next I frames, it would be desirable to be encoded to the original image of I frames and delay
Original image in depositing is compared.
Video encoding module 908 will then need to be encoded to the original of I frames for being that image is opposing stationary when comparing result
Image is encoded to P frames;When comparing result be image relative motion, then the original image for being encoded to I frames will be needed to be encoded to I frames.
In one embodiment, as shown in Figure 10, another video data coding device is provided.The device further includes:
Scene change detection module 910, for when being encoded to a P frame, detection to need the original image for being encoded to P frames
Whether the original image relative to former frame there is scene change.
Video encoding module 908 is additionally operable to when there is scene change, it would be desirable to which the original image for being encoded to P frames is encoded to
P frames, otherwise, it would be desirable to which the original image for being encoded to P frames is encoded to I frames.
In one embodiment, image comparison module 906 is additionally operable to need to compile at least one of in the following ways
Code is that the original image in the original image and caching of I frames is compared:
The binary data for comparing two field pictures, comparing result is that image is opposing stationary if equal, otherwise comparison knot
Fruit is image relative motion;
Individual element compares two field pictures, calculates the absolute error of the pixel of two field pictures, is preset if absolute error is less than
Error threshold, then comparing result be image it is opposing stationary, otherwise comparing result be image relative motion;
Two field pictures are respectively classified into the region of preset quantity, compare one by one two field pictures each region binary number
According to if the equal region quantity of binary data is more than predetermined number, comparison result is that image is opposing stationary, otherwise compares knot
Fruit is image relative motion.
In one embodiment, video encoding module 908 is additionally operable to when receiving the request of newly-increased video reception terminal,
It is then I frames by the coding video frames that need to currently encode.
In one embodiment, video encoding module 908 is additionally operable to encode P frames using the first quantization parameter, using second
Quantization parameter encodes I frames, wherein the second quantization parameter is more than the first quantization parameter.
In one embodiment, video encoding module 908 is additionally operable to encode using coding rate corresponding with cpu busy percentage
Video frame, and in an encoding process according to the cpu busy percentage dynamic adjustment coding rate obtained in real time.
Modules in above-mentioned video data coding device can come real fully or partially through software, hardware and combinations thereof
It is existing.Above-mentioned each module can be embedded in or independently of in the memory of terminal, can also be stored in a software form in the form of hardware
In the memory of terminal, the corresponding operation of the above modules is executed in order to which processor calls.The processor can be center
Processing unit (CPU), microprocessor, microcontroller etc..
Above-mentioned video data coding device, when being encoded to next I frames, it would be desirable to be encoded to the original image of I frames
It is compared with the original image in caching;By comparing result come determine be by the needs be encoded to I frames original image compile
Code is that I frames are still encoded to P frames.If comparing result is that image is opposing stationary, illustrate the similarity between two frame original images
It is larger, need the original image for being encoded to I frames to be encoded to P frames by described, to reduce the volume for the original image for needing to be encoded to I frames
There is the probability of packet loss, while the reduction of amount of coded data in transmission to reduce, can also correspond to raising and connect in code data volume
The efficiency of decoding terminals is received, the fluency of corresponding presentation of video frames is improved.If comparing result is image relative motion, illustrate two
Differing greatly between frame original image, it would be desirable to which the original image for being encoded to I frames is encoded to I frames, is differed greatly with retaining this
Original image complete information, prevent from being encoded as P frames, make reception decoding terminals show picture become fuzzyyer.Pass through
Comparing result dynamically adjusts the coding mode for the original image for needing to be encoded to I frames, receives terminal to realize and is connecing
After receiving the coded frame data, when decoding and playing video frame, the clarity and fluency of the broadcasting of video frame have been taken into account.
In one embodiment, a kind of computer equipment is provided, including memory, processor and storage are on a memory
And the computer program that can be run on a processor, processor realize following steps when executing program:Obtain video to be encoded
Frame;When having encoded an I frame, then caching is encoded to the original image of I frames;When being encoded to next I frames, it would be desirable to encode
It is compared for the original image in the original image and caching of I frames;When comparing result be image it is opposing stationary, then will need to compile
Code is that the original image of I frames is encoded to P frames;When comparing result be image relative motion, then will need the original graph for being encoded to I frames
As being encoded to I frames.
In one embodiment, following steps are also realized when above-mentioned processor executes program:When being encoded to a P frame
When, detection needs whether the original image for being encoded to P frames scene change occurs relative to the original image of former frame, if so,
The original image for being encoded to P frames will be needed to be encoded to P frames, otherwise, it would be desirable to which the original image for being encoded to P frames is encoded to I frames.
In one embodiment, when above-mentioned processor executes program, that is realized is encoded to the original graph of I frames by needing
As being compared at least one of in the following ways with the original image in caching:Compare the binary number of two field pictures
According to comparing result is that image is opposing stationary if equal, and otherwise comparing result is image relative motion;Individual element compares two
Frame image calculates the absolute error of the pixel of two field pictures, if absolute error is less than preset error threshold, comparing result is
Image is opposing stationary, and otherwise comparing result is image relative motion;Two field pictures are respectively classified into the region of preset quantity, one by one
Compare two field pictures each region binary data, if the equal region quantity of binary data is more than predetermined number,
Comparison result is that image is opposing stationary, and otherwise comparison result is image relative motion.
In one embodiment, following steps are also realized when above-mentioned processor executes program:When receiving newly-increased video
Then it is I frames by the coding video frames that need to currently encode when receiving the request of terminal.
In one embodiment, P frames are encoded using the first quantization parameter, I frames are encoded using the second quantization parameter, wherein
Second quantization parameter is more than the first quantization parameter.
In one embodiment, using coding rate encoded video frame corresponding with cpu busy percentage, and in an encoding process
According to the cpu busy percentage dynamic adjustment coding rate obtained in real time.
A kind of computer readable storage medium, is stored thereon with computer program, which realizes when being executed by processor
Following steps:Obtain video frame to be encoded;When having encoded an I frame, then caching is encoded to the original image of I frames;Work as volume
When code is to next I frames, it would be desirable to which the original image being encoded in the original image and caching of I frames is compared;When comparison is tied
Fruit is that image is opposing stationary, then the original image for being encoded to I frames will be needed to be encoded to P frames;It is transported when comparing result is that image is opposite
It is dynamic, then the original image for being encoded to I frames will be needed to be encoded to I frames.
In one embodiment, following steps are also realized when which is executed by processor:When being encoded to a P frame,
Detection needs whether the original image for being encoded to P frames scene change occurs relative to the original image of former frame, if so, need to
The original image for being encoded to P frames is encoded to P frames, otherwise, it would be desirable to which the original image for being encoded to P frames is encoded to I frames.
In one embodiment, that is realized when which is executed by processor is encoded to the original image of I frames by needing
It is compared at least one of in the following ways with the original image in caching:Compare the binary data of two field pictures,
Comparing result is that image is opposing stationary if equal, and otherwise comparing result is image relative motion;Individual element compares two frames
Image calculates the absolute error of the pixel of two field pictures, if absolute error is less than preset error threshold, comparing result is figure
As opposing stationary, otherwise comparing result is image relative motion;Two field pictures are respectively classified into the region of preset quantity, are compared one by one
Binary data compared with two field pictures in each region compares if the equal region quantity of binary data is more than predetermined number
It is that image is opposing stationary to result, otherwise comparison result is image relative motion.
In one embodiment, following steps are also realized when which is executed by processor:It is connect when receiving newly-increased video
Then it is I frames by the coding video frames that need to currently encode when receiving the request of terminal.
In one embodiment, P frames are encoded using the first quantization parameter, I frames are encoded using the second quantization parameter, wherein
Second quantization parameter is more than the first quantization parameter.
In one embodiment, using coding rate encoded video frame corresponding with cpu busy percentage, and in an encoding process
According to the cpu busy percentage dynamic adjustment coding rate obtained in real time.
One of ordinary skill in the art will appreciate that realizing all or part of flow in above-described embodiment method, being can be with
Relevant hardware is instructed to complete by computer program, the program can be stored in a non-volatile computer and can be read
In storage medium, the program is when being executed, it may include such as the flow of the embodiment of above-mentioned each method.Wherein, the storage is situated between
Matter can be magnetic disc, CD, read-only memory (Read-Only Memory, ROM) etc..
Each technical characteristic of embodiment described above can be combined arbitrarily, to keep description succinct, not to above-mentioned reality
It applies all possible combination of each technical characteristic in example to be all described, as long as however, the combination of these technical characteristics is not deposited
In contradiction, it is all considered to be the range of this specification record.
Several embodiments of the invention above described embodiment only expresses, the description thereof is more specific and detailed, but simultaneously
It cannot therefore be construed as limiting the scope of the patent.It should be pointed out that coming for those of ordinary skill in the art
It says, without departing from the inventive concept of the premise, various modifications and improvements can be made, these belong to the protection of the present invention
Range.Therefore, the protection domain of patent of the present invention should be determined by the appended claims.
Claims (14)
1. a kind of method for coding video data, including:
Obtain video frame to be encoded;
When having encoded an I frame, then caching is encoded to the original image of I frames;
When being encoded to next I frames, it would be desirable to which the original image being encoded in the original image and caching of I frames is compared;
When comparing result be image it is opposing stationary, then need the original image for being encoded to I frames to be encoded to P frames by described;
When comparing result be image relative motion, then the original image for being encoded to I frames will be needed to be encoded to I frames.
2. according to the method described in claim 1, it is characterized in that, the method further includes:
When being encoded to a P frame, detection needs whether the original image for being encoded to P frames goes out relative to the original image of former frame
Otherwise existing scene change, needs to encode if so, needing the original image for being encoded to P frames to be encoded to P frames by described by described
It is encoded to I frames for the original image of P frames.
3. according to the method described in claim 1, it is characterized in that, described will need the original image and caching that are encoded to I frames
In original image compared at least one of in the following ways:
The binary data for comparing two field pictures, comparing result is that image is opposing stationary if equal, and otherwise comparing result is
Image relative motion;
Individual element compares two field pictures, calculates the absolute error of the pixel of two field pictures, is preset if the absolute error is less than
Error threshold, then comparing result be image it is opposing stationary, otherwise comparing result be image relative motion;
Two field pictures are respectively classified into the region of preset quantity, compare one by one two field pictures each region binary data,
If the equal region quantity of binary data is more than predetermined number, comparison result is that image is opposing stationary, otherwise comparison result
For image relative motion.
4. according to the method described in claim 1, it is characterized in that, the method further includes:
Then it is I frames by the coding video frames that need to currently encode when receiving the request of newly-increased video reception terminal.
5. according to the method described in claim 1, it is characterized in that, P frames are encoded using the first quantization parameter, using the second quantization
Parameter coding I frames, wherein the second quantization parameter is more than the first quantization parameter.
6. according to the method described in claim 1, it is characterized in that, being regarded using coding rate corresponding with cpu busy percentage coding
Frequency frame, and in an encoding process according to the cpu busy percentage dynamic adjustment coding rate obtained in real time.
7. a kind of video data coding device, which is characterized in that described device includes:
Video frame acquisition module, for obtaining video frame to be encoded;
Image buffer storage module, for when having encoded an I frame, then caching to be encoded to the original image of I frames;
Image comparison module, for when being encoded to next I frames, it would be desirable to be encoded in the original image and caching of I frames
Original image is compared;
Video encoding module, for being that image is opposing stationary when comparing result, then by the original image for needing to be encoded to I frames
It is encoded to P frames;When comparing result be image relative motion, then the original image for being encoded to I frames will be needed to be encoded to I frames.
8. device according to claim 7, which is characterized in that described device further includes:
Scene change detection module, for when being encoded to a P frame, detection need to be encoded to the original images of P frames relative to
Whether the original image of former frame there is scene change;
The video encoding module is additionally operable to when there is scene change, needs the original image for being encoded to P frames to encode by described
Otherwise the original image for being encoded to P frames is needed to be encoded to I frames by described for P frames.
9. device according to claim 7, which is characterized in that during described image contrast module is additionally operable in the following ways
At least one original image by the original image and caching that need to be encoded to I frames compare:
The binary data for comparing two field pictures, comparing result is that image is opposing stationary if equal, and otherwise comparing result is
Image relative motion;
Individual element compares two field pictures, calculates the absolute error of the pixel of two field pictures, is preset if the absolute error is less than
Error threshold, then comparing result be image it is opposing stationary, otherwise comparing result be image relative motion;
Two field pictures are respectively classified into the region of preset quantity, compare one by one two field pictures each region binary data,
If the equal region quantity of binary data is more than predetermined number, comparison result is that image is opposing stationary, otherwise comparison result
For image relative motion.
10. device according to claim 7, which is characterized in that
The video encoding module is additionally operable to when receiving the request of newly-increased video reception terminal, then regard what need to currently be encoded
Frequency frame is encoded to I frames.
11. device according to claim 7, which is characterized in that
The video encoding module is additionally operable to encode P frames using the first quantization parameter, and I frames are encoded using the second quantization parameter,
In, the second quantization parameter is more than the first quantization parameter.
12. device according to claim 7, which is characterized in that
The video encoding module is additionally operable to use coding rate encoded video frame corresponding with cpu busy percentage, and encoded
According to the cpu busy percentage dynamic adjustment coding rate obtained in real time in journey.
13. a kind of computer equipment, including memory, processor and storage are on a memory and the meter that can run on a processor
Calculation machine program, which is characterized in that the processor realizes any one of claim 1 to 6 side when executing described program
The step of method.
14. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is by processor
The step of any one of claim 1 to 6 the method is realized when execution.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710241529.6A CN108737825B (en) | 2017-04-13 | 2017-04-13 | Video data encoding method, apparatus, computer device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710241529.6A CN108737825B (en) | 2017-04-13 | 2017-04-13 | Video data encoding method, apparatus, computer device and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108737825A true CN108737825A (en) | 2018-11-02 |
CN108737825B CN108737825B (en) | 2023-05-02 |
Family
ID=63923724
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710241529.6A Active CN108737825B (en) | 2017-04-13 | 2017-04-13 | Video data encoding method, apparatus, computer device and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108737825B (en) |
Cited By (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110113610A (en) * | 2019-04-23 | 2019-08-09 | 西安万像电子科技有限公司 | Data transmission method and device |
CN110430339A (en) * | 2019-07-19 | 2019-11-08 | 长沙理工大学 | Altering detecting method and system in digital video frame |
CN110730364A (en) * | 2019-10-14 | 2020-01-24 | 广州微算互联信息技术有限公司 | Cloud mobile phone data transmission method and device and storage medium |
CN111541897A (en) * | 2020-04-21 | 2020-08-14 | 西安万像电子科技有限公司 | Data transmission method and device |
CN111866443A (en) * | 2019-04-25 | 2020-10-30 | 黄河 | Video stream data storage method, device, system and storage medium |
CN112218066A (en) * | 2020-11-20 | 2021-01-12 | 上海足下文化传媒有限公司 | VR video encoding and decoding method and device |
WO2021102992A1 (en) * | 2019-11-29 | 2021-06-03 | 深圳市大疆创新科技有限公司 | Data transmissio method, device and system as well as storage medium |
CN113473228A (en) * | 2021-06-11 | 2021-10-01 | 深圳锐取信息技术股份有限公司 | Transmission control method, device, storage medium and equipment for 8K recorded and played video |
CN114070950A (en) * | 2020-07-30 | 2022-02-18 | 北京市商汤科技开发有限公司 | Image processing method and related device and equipment |
CN114245127A (en) * | 2021-12-13 | 2022-03-25 | 北京百度网讯科技有限公司 | Parameter adjusting method, device, equipment and medium for cloud desktop encoder |
CN114422792A (en) * | 2021-12-28 | 2022-04-29 | 北京华夏电通科技股份有限公司 | Video image compression method, device, equipment and storage medium |
CN115633176A (en) * | 2022-12-08 | 2023-01-20 | 北京蔚领时代科技有限公司 | Method, device and storage medium for dynamically adjusting length of picture group |
CN116708845A (en) * | 2023-08-04 | 2023-09-05 | 佳木斯大学 | Gastrointestinal medical image communication transmission method based on 5G technology |
WO2024109701A1 (en) * | 2022-11-24 | 2024-05-30 | 维沃移动通信有限公司 | Video encoding/decoding method and apparatus, electronic device, and medium |
Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2001094976A (en) * | 1999-09-20 | 2001-04-06 | Matsushita Electric Ind Co Ltd | Image extracting device |
JP2001251631A (en) * | 2000-03-06 | 2001-09-14 | Toshiba Corp | Data transmission system and its communication unit |
CN1471321A (en) * | 2003-07-14 | 2004-01-28 | 大唐微电子技术有限公司 | Method for coding and recoding ripple video frequency based on motion estimation |
CN101322413A (en) * | 2005-10-17 | 2008-12-10 | 高通股份有限公司 | Adaptive gop structure in video streaming |
US20090226105A1 (en) * | 2008-03-10 | 2009-09-10 | Yu-Wen Huang | Adaptive motion estimation coding |
CN101868816A (en) * | 2007-10-25 | 2010-10-20 | 马维尔国际贸易有限公司 | Motion-adaptive alternating gamma drive for a liquid crystal display |
US20120163674A1 (en) * | 2010-12-24 | 2012-06-28 | Hon Hai Precision Industry Co., Ltd. | Motion detection module, electronic device applying the motion detection module, and motion detection method |
CN102546917A (en) * | 2010-12-31 | 2012-07-04 | 联想移动通信科技有限公司 | Mobile terminal with camera and video processing method therefor |
CN103501439A (en) * | 2012-04-23 | 2014-01-08 | 英特尔公司 | Frame level rate control using motion estimated distortions |
CN105898296A (en) * | 2015-12-24 | 2016-08-24 | 乐视云计算有限公司 | Video coding frame selection method and device |
-
2017
- 2017-04-13 CN CN201710241529.6A patent/CN108737825B/en active Active
Patent Citations (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2001094976A (en) * | 1999-09-20 | 2001-04-06 | Matsushita Electric Ind Co Ltd | Image extracting device |
JP2001251631A (en) * | 2000-03-06 | 2001-09-14 | Toshiba Corp | Data transmission system and its communication unit |
CN1471321A (en) * | 2003-07-14 | 2004-01-28 | 大唐微电子技术有限公司 | Method for coding and recoding ripple video frequency based on motion estimation |
CN101322413A (en) * | 2005-10-17 | 2008-12-10 | 高通股份有限公司 | Adaptive gop structure in video streaming |
CN101868816A (en) * | 2007-10-25 | 2010-10-20 | 马维尔国际贸易有限公司 | Motion-adaptive alternating gamma drive for a liquid crystal display |
US20090226105A1 (en) * | 2008-03-10 | 2009-09-10 | Yu-Wen Huang | Adaptive motion estimation coding |
US20120163674A1 (en) * | 2010-12-24 | 2012-06-28 | Hon Hai Precision Industry Co., Ltd. | Motion detection module, electronic device applying the motion detection module, and motion detection method |
CN102546917A (en) * | 2010-12-31 | 2012-07-04 | 联想移动通信科技有限公司 | Mobile terminal with camera and video processing method therefor |
CN103501439A (en) * | 2012-04-23 | 2014-01-08 | 英特尔公司 | Frame level rate control using motion estimated distortions |
CN105898296A (en) * | 2015-12-24 | 2016-08-24 | 乐视云计算有限公司 | Video coding frame selection method and device |
Cited By (21)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110113610A (en) * | 2019-04-23 | 2019-08-09 | 西安万像电子科技有限公司 | Data transmission method and device |
CN111866443A (en) * | 2019-04-25 | 2020-10-30 | 黄河 | Video stream data storage method, device, system and storage medium |
CN110430339A (en) * | 2019-07-19 | 2019-11-08 | 长沙理工大学 | Altering detecting method and system in digital video frame |
CN110730364A (en) * | 2019-10-14 | 2020-01-24 | 广州微算互联信息技术有限公司 | Cloud mobile phone data transmission method and device and storage medium |
CN110730364B (en) * | 2019-10-14 | 2021-08-31 | 广州微算互联信息技术有限公司 | Cloud mobile phone data transmission method and device and storage medium |
WO2021102992A1 (en) * | 2019-11-29 | 2021-06-03 | 深圳市大疆创新科技有限公司 | Data transmissio method, device and system as well as storage medium |
CN111541897A (en) * | 2020-04-21 | 2020-08-14 | 西安万像电子科技有限公司 | Data transmission method and device |
CN114070950A (en) * | 2020-07-30 | 2022-02-18 | 北京市商汤科技开发有限公司 | Image processing method and related device and equipment |
CN114070950B (en) * | 2020-07-30 | 2024-05-17 | 北京市商汤科技开发有限公司 | Image processing method, related device and equipment |
CN112218066A (en) * | 2020-11-20 | 2021-01-12 | 上海足下文化传媒有限公司 | VR video encoding and decoding method and device |
CN113473228B (en) * | 2021-06-11 | 2022-12-27 | 深圳锐取信息技术股份有限公司 | Transmission control method, device, storage medium and equipment for 8K recorded and played video |
CN113473228A (en) * | 2021-06-11 | 2021-10-01 | 深圳锐取信息技术股份有限公司 | Transmission control method, device, storage medium and equipment for 8K recorded and played video |
CN114245127A (en) * | 2021-12-13 | 2022-03-25 | 北京百度网讯科技有限公司 | Parameter adjusting method, device, equipment and medium for cloud desktop encoder |
CN114245127B (en) * | 2021-12-13 | 2024-03-19 | 北京百度网讯科技有限公司 | Parameter adjustment method, device, equipment and medium of cloud desktop encoder |
CN114422792B (en) * | 2021-12-28 | 2023-06-09 | 北京华夏电通科技股份有限公司 | Video image compression method, device, equipment and storage medium |
CN114422792A (en) * | 2021-12-28 | 2022-04-29 | 北京华夏电通科技股份有限公司 | Video image compression method, device, equipment and storage medium |
WO2024109701A1 (en) * | 2022-11-24 | 2024-05-30 | 维沃移动通信有限公司 | Video encoding/decoding method and apparatus, electronic device, and medium |
CN115633176A (en) * | 2022-12-08 | 2023-01-20 | 北京蔚领时代科技有限公司 | Method, device and storage medium for dynamically adjusting length of picture group |
CN115633176B (en) * | 2022-12-08 | 2023-03-21 | 北京蔚领时代科技有限公司 | Method, device and storage medium for dynamically adjusting length of picture group |
CN116708845A (en) * | 2023-08-04 | 2023-09-05 | 佳木斯大学 | Gastrointestinal medical image communication transmission method based on 5G technology |
CN116708845B (en) * | 2023-08-04 | 2023-10-31 | 佳木斯大学 | Gastrointestinal medical image communication transmission method based on 5G technology |
Also Published As
Publication number | Publication date |
---|---|
CN108737825B (en) | 2023-05-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108737825A (en) | Method for coding video data, device, computer equipment and storage medium | |
CN110024398B (en) | Local hash-based motion estimation for screen teleprocessing scenes | |
US8351513B2 (en) | Intelligent video signal encoding utilizing regions of interest information | |
CN106507117B (en) | Method and apparatus for encoder optimization for stereoscopic video delivery systems | |
US7924917B2 (en) | Method for encoding and decoding video signals | |
US10009628B2 (en) | Tuning video compression for high frame rate and variable frame rate capture | |
RU2573257C2 (en) | Image signal decoding device, image signal decoding method, image signal encoding device, image signal encoding method and programme | |
US9414086B2 (en) | Partial frame utilization in video codecs | |
US20220058775A1 (en) | Video denoising method and apparatus, and storage medium | |
US10356434B2 (en) | Picture encoding device and picture encoding method | |
US10205953B2 (en) | Object detection informed encoding | |
CN108810545B (en) | Method, apparatus, computer readable medium and electronic device for video encoding | |
US20220188976A1 (en) | Image processing method and apparatus | |
CN108012163B (en) | Code rate control method and device for video coding | |
US20110299604A1 (en) | Method and apparatus for adaptive video sharpening | |
US20200236359A1 (en) | Apparatus and method for image coding with boundary partition processing | |
CN109640179B (en) | Video decoding control method and device and electronic equipment | |
US20150365698A1 (en) | Method and Apparatus for Prediction Value Derivation in Intra Coding | |
JP2021525485A (en) | Multi-type tree depth extension for picture border processing | |
US20190014332A1 (en) | Content-aware video coding | |
US20110038416A1 (en) | Video coder providing improved visual quality during use of heterogeneous coding modes | |
CN116848843A (en) | Switchable dense motion vector field interpolation | |
EP3939275A1 (en) | Video coding involving gop-based temporal filtering | |
EP4320861A1 (en) | Video coding with dynamic groups of pictures | |
CN101494718A (en) | Method and apparatus for encoding image |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |