A kind of method of the video segmentation storage based on PSNR threshold values
Technical field
The present invention relates to multi-media processing field, the method for espespecially a kind of video segmentation storage based on PSNR threshold values.
Background technology
Due to the requirement of channel width and coding transmission real-time and codec to buffering area, code check control is being compiled
Most important, a good code check control program in code device, in network real-time Transmission and video quality control and codec
Cost control on, positive effect can be played.
Patent document CN 101198042A disclosed a kind of bit rate control method of Video coding on June 11st, 2008,
Sender controls feedback link periodically to send control packet by real-time Transmission, when receiving feedback control packet, according to described anti-
Packet loss in feedback control packet obtains bit rate output, and video data is carried out according to the code check obtained by real-time Transmission link
It sends.The bit rate control method and transmitting equipment for the Video coding that the program provides are by considering the factor of packet loss to output code
Rate is controlled, and the data that coding comes out is enable to better adapt to the transmission of current network conditions, so as to reach better video
Display effect.
The code check control that 104113761 A of patent document CN are disclosed on October 22nd, 2014 in a kind of Video coding
Method and encoder, to improve the accuracy of bit rate control method and reduce complexity, this method is:It first determines current
The first gradient value of video image and the second Grad of previous video image calculate current video further according to default average bit rate
Then the target bit rate of image determines the performance parameter of at least one encoded video image specified, then, in first gradient
It is true according to target bit rate, first gradient value, the second Grad and performance parameter in the case that value and/or the second Grad are not 0
Determine the QP of current video image;In the case of for 0, the QP of current video image is determined according to target bit rate and performance parameter,
Finally, current video image is encoded according to QP, in this way, improving the accuracy of bit rate control method, while also reduced
Complexity.
All the time, the code rate selection of video file is to ensure subjective viewing quality as target.The video text to complete
Part has specific code check (as shown in Figure 1), and subsequent download and storage use the cbr (constant bit rate).It downloads and deposits for downlink
Store up for subsequent video processing and the application scenarios distributed, how to save memory space, be the mesh that industry is pursued always
Mark.
Invention content
The object of the present invention is to provide it is a kind of can save memory space, based on PSNR threshold values video segmentation storage side
Method.
To reach the purpose, the present invention provides a kind of method of the video segmentation storage based on PSNR threshold values, this method
It is achieved through the following technical solutions:Segment processing is carried out to pending video;Using the upper limit threshold of Y-PSNR,
The lowest bit rate of every section of video content is calculated respectively;With lowest bit rate fragmented storage video.
Further, the calculating step of the lowest bit rate of every section of video includes:Set the upper limit threshold of Y-PSNR
Value;Different code checks is selected by trial-and-error method, by the different corresponding videos of code check respectively compared with upper limit threshold, until finding
The Y-PSNR of every section of video is less than the lowest bit rate of the upper limit threshold.
Further, the step of pending video carries out segment processing includes:Pending video is embedded basic
Information is indicated;Segment processing is carried out to pending video according to essential information.
Further, the setting procedure of the lowest bit rate includes:The essential information embedded to every section of video indicates;
Estimate the lowest bit rate under each essential information;According to the lowest bit rate under each essential information, obtain every section of video and fit
Lowest bit rate.
Further, the lowest bit rate under each described essential information is to select every section of video different by trial-and-error method
Code check, by the corresponding video of the different code check respectively compared with the upper limit threshold of setting, until finding the peak value letter of video
It makes an uproar than the lowest bit rate for being less than the upper limit threshold.
Further, the lowest bit rate under each described essential information is compared, selects wherein minimum code check
Lowest bit rate as whole section of video.
Further, the essential information includes state, the scene of video capture or the picture packet count of video object.
Further, the state includes motion state or stationary state.
Further, the scene of the video capture includes ball match scene or network courses scene.
Beneficial effects of the present invention:The present invention carries out segment processing to pending video, and every section of video is with Y-PSNR
Upper limit threshold determine lowest bit rate for reference data, the lowest bit rate of every section of video can be different, as shown in Fig. 2, phase
Than that in a manner of the single cbr (constant bit rate) on the basis of subjective viewing quality, can be substantially reduced the capacity of video file, saving is deposited
Space is stored up, and bandwidth demand can be effectively reduced in subsequent video online distribution.
Description of the drawings
Fig. 1 is the storage effect diagram of the method for existing video storage;
Fig. 2 is the storage effect diagram after method and video processor using video segmentation of the present invention storage;
Fig. 3 is the method schematic diagram of one video segmentation of embodiment of the present invention storage;
Fig. 4 is one video processor principle schematic of the embodiment of the present invention;
Fig. 5 is the method schematic diagram of two video segmentation of embodiment of the present invention storage;
Fig. 6 is the method schematic diagram of three video segmentation of embodiment of the present invention storage;
Fig. 7 is the method schematic diagram of four video segmentation of embodiment of the present invention storage;
Fig. 8 is five video processor principle schematic of the embodiment of the present invention;
Fig. 9 is six video processor principle schematic of the embodiment of the present invention.
Wherein:
1st, sectioning;11st, Video segmentation device;2nd, code check setting device;21st, Y-PSNR unit;
22nd, selecting unit;23rd, comparing unit;24th, unit is indicated;3rd, memory.
Specific embodiment
The invention will be further described with preferred embodiment below in conjunction with the accompanying drawings.
Embodiment one
As shown in figure 3, present embodiment discloses a kind of method of the video segmentation storage based on PSNR threshold values, including step
Suddenly:
A:Segment processing is carried out to pending video;
B:Using the upper limit threshold of Y-PSNR, the lowest bit rate of every section of video is calculated respectively;The upper limit threshold is
Empirical value.
C:With lowest bit rate fragmented storage video.
As shown in figure 4, a kind of video processor is also disclosed in present embodiment, including,
Sectioning 1:Segment processing is carried out to pending video;
Code check sets device 2:Video is handled with lowest bit rate, the Y-PSNR (PSNR) of treated video is less than upper
Limit threshold value;
Memory 3:With lowest bit rate fragmented storage video.
The present invention carries out segment processing to pending video, and every section of video is using the upper limit threshold of Y-PSNR as with reference to base
Standard determines lowest bit rate, compared in a manner of the single cbr (constant bit rate) on the basis of subjective viewing quality, can be substantially reduced and regard
The capacity of frequency file saves memory space.And bandwidth demand can be effectively reduced in subsequent video online distribution.
Embodiment two
As shown in figure 5, present embodiment discloses a kind of method of the video segmentation storage based on PSNR threshold values, including step
Suddenly:
A:Segment processing is carried out to pending video.
B1-1:Set the upper limit threshold of Y-PSNR
B1-2:Every section of video selects different code checks by trial-and-error method.
B1-3:By its corresponding video respectively with upper limit threshold value comparison, until the Y-PSNR for finding video is less than institute
State the lowest bit rate of upper limit threshold.
C:With lowest bit rate fragmented storage video.
Trial-and-error method is pursued a goal by constantly testing and eliminating error, explores the side of the system with black box property
Method.This method is unconsciously applied in the behavior of animal, is then conscious in the behavior of people.Trial-and-error method is pure
The learning method of experience.Main body using trial-and-error method tests black box by intermittently or continuously changing the parameter of Black smoker
Made response, to seek the approach for reaching target.The success or failure of subject behavior are in being approached the degree of target with it or reached
Between target process evaluation.The information of target is approached to main body, main body will continue to take successful behavior;Deviate mesh
Target information feeds back to main body, and main body will avoid taking the behavior of failure.By this continuous trial and constantly
Evaluation, main body is with regard to that can progressively reach the target to be pursued.
Present embodiment uses trial-and-error method, using result to be oriented to, as long as successfully solving the problems, such as, requires no knowledge about minimum
How code check is calculated on earth.Even if not needing to advanced knowledge, the Y-PSNR that still can find video is less than institute
State the lowest bit rate of upper limit threshold.
Embodiment three
As shown in fig. 6, present embodiment discloses a kind of method of the video segmentation storage based on PSNR threshold values, including step
Suddenly:
A2-1:The essential information embedded to pending video indicates.
A2-1:Segment processing is carried out to pending video according to essential information.
B2-1:Set the upper limit threshold of the Y-PSNR of every section of video.
B2-2:Every section of video selects different code checks by trial-and-error method.
B2-3:By its corresponding video respectively compared with upper limit threshold, until the Y-PSNR for finding video is less than institute
State the lowest bit rate of upper limit threshold.
C:With lowest bit rate fragmented storage video.
The setting method of lowest bit rate includes:Lowest bit rate under each essential information is compared, selection is wherein
Lowest bit rate of the minimum code check as whole section of video.For example, 3 kinds of minimum code rates such as known A, B, C, with D to this section of video into
During row code storage, in part, by D compared with A, B, C, minimum code of the lower code check among the two as this section of video is selected
Rate.This section of video is stored with this lowest bit rate, just effectively reduces memory capacity.
Essential information includes state, the scene of video capture or the picture packet count of video object.State includes movement shape
State or stationary state.The scene of the video capture includes ball match scene or network courses scene.
Trial-and-error method is pursued a goal by constantly testing and eliminating error, explores the side of the system with black box property
Method.This method is unconsciously applied in the behavior of animal, is then conscious in the behavior of people.Trial-and-error method is pure
The learning method of experience.Main body using trial-and-error method tests black box by intermittently or continuously changing the parameter of Black smoker
Made response, to seek the approach for reaching target.The success or failure of subject behavior are in being approached the degree of target with it or reached
Between target process evaluation.The information of target is approached to main body, main body will continue to take successful behavior;Deviate mesh
Target information feeds back to main body, and main body will avoid taking the behavior of failure.By this continuous trial and constantly
Evaluation, main body is with regard to that can progressively reach the target to be pursued.
Present embodiment uses trial-and-error method, using result to be oriented to, as long as successfully solving the problems, such as, requires no knowledge about minimum
How code check is calculated on earth.Even if not needing to advanced knowledge, the Y-PSNR that still can find video is less than institute
State the lowest bit rate of upper limit threshold.Present embodiment combination video content is segmented video.In segmentation, pass through trial-and-error method
It is preferred that go out to be suitble to the lowest bit rate of this section of video content.
Example IV
As shown in fig. 7, present embodiment discloses a kind of method of the video segmentation storage based on PSNR threshold values, including step
Suddenly:
A:Segment processing is carried out to pending video.
B3-1:The essential information embedded to every section of video indicates.
B3-2:Estimate the lowest bit rate under each essential information.
B3-3:According to the lowest bit rate under each essential information, the lowest bit rate that every section of video is applicable in is estimated.
C:With lowest bit rate fragmented storage video.
Lowest bit rate under each essential information is that different code checks is selected by trial-and-error method, by its corresponding video point
Not with upper limit threshold value comparison, until the Y-PSNR for finding video is less than the lowest bit rate of the upper limit threshold.
The setting method of lowest bit rate includes:Lowest bit rate under each essential information is compared, selection is wherein
Lowest bit rate of the minimum code check as whole section of video.For example, 3 kinds of minimum code rates such as known A, B, C, with D to this section of video into
During row code storage, in part, by D compared with A, B, C, minimum code of the lower code check among the two as this section of video is selected
Rate.This section of video is stored with this lowest bit rate, just effectively reduces memory capacity.
Essential information includes state, the scene of video capture or the picture packet count of video object.State includes movement shape
State or stationary state.The scene of the video capture includes ball match scene or network courses scene.
In order to further lower memory space.The video-frequency band of each essential information can be corresponded to a kind of upper limit threshold;
Lowest bit rate of the lowest bit rate estimated according to minimum upper limit threshold as whole section of video.
Present embodiment is first segmented video, and big video first is resolved into small video, reduces point of every section of video
Analysis amount and analysis difficulty.Then secondary segmenting will be carried out according to the essential information of video in every section, the video of each subsegment passes through
Trial-and-error method preferably goes out to be suitble to the lowest bit rate of this subsegment video content.Then the lowest bit rate of all subsegment videos of Integrated comparative again
Obtain the lowest bit rate of whole section of video.
Embodiment five
As shown in figure 8, a kind of video processor of present embodiment, including sectioning 1, the code check coupled with sectioning
Device 2 is set, the memory 3 coupled with code check setting device;Sectioning carries out segment processing to pending video;Code check is set
Put the lowest bit rate that device calculates every section of video;Memory is with lowest bit rate fragmented storage video.The sectioning 1 further includes
Video segmentation device 11:The Video segmentation device carries out segment processing according to essential information to pending video.
The code check setting device further includes the Y-PSNR unit 21 coupled with Video segmentation device, with Y-PSNR
The selecting unit 22 that unit 21 couples, the comparing unit 23 coupled respectively with selecting unit 22 and Y-PSNR unit 21;Institute
The upper limit threshold that Y-PSNR unit 21 sets Y-PSNR is stated, the selecting unit 22 selects different by trial-and-error method
Code check, the comparing unit 23 by the corresponding video of each code check respectively with upper limit threshold value comparison, until finding the peak value of video
Signal-to-noise ratio is less than lowest bit rate of the lowest bit rate of the upper limit threshold as whole section of video.
The setting method of lowest bit rate includes:Lowest bit rate under each essential information is compared, selection is wherein
Lowest bit rate of the minimum code check as whole section of video.For example, 3 kinds of minimum code rates such as known A, B, C, with D to this section of video into
During row code storage, in part, by D compared with A, B, C, minimum code of the lower code check among the two as this section of video is selected
Rate.This section of video is stored with this lowest bit rate, just effectively reduces memory capacity.
Essential information includes state, the scene of video capture or the picture packet count of video object.State includes movement shape
State or stationary state.The scene of the video capture includes ball match scene or network courses scene.
Trial-and-error method is pursued a goal by constantly testing and eliminating error, explores the side of the system with black box property
Method.This method is unconsciously applied in the behavior of animal, is then conscious in the behavior of people.Trial-and-error method is pure
The learning method of experience.Main body using trial-and-error method tests black box by intermittently or continuously changing the parameter of Black smoker
Made response, to seek the approach for reaching target.The success or failure of subject behavior are in being approached the degree of target with it or reached
Between target process evaluation.The information of target is approached to main body, main body will continue to take successful behavior;Deviate mesh
Target information feeds back to main body, and main body will avoid taking the behavior of failure.By this continuous trial and constantly
Evaluation, main body is with regard to that can progressively reach the target to be pursued.
Present embodiment uses trial-and-error method, using result to be oriented to, as long as successfully solving the problems, such as, requires no knowledge about minimum
How code check is calculated on earth.Even if not needing to advanced knowledge, the Y-PSNR that still can find video is less than institute
State the lowest bit rate of upper limit threshold.Present embodiment combination video content is segmented video.In segmentation, pass through trial-and-error method
It is preferred that go out to be suitble to the lowest bit rate of this section of video content.
Embodiment six
As shown in figure 9, a kind of video processor of present embodiment, including sectioning 1, the code check coupled with sectioning
Device 2 is set, the memory 3 coupled with code check setting device;Sectioning carries out segment processing to pending video;Code check is set
Put the lowest bit rate that device calculates every section of video;Memory is with lowest bit rate fragmented storage video.
The code check setting device further includes mark unit 24, and mark unit carries out the essential information that every section of video embeds
Mark;Code check setting device estimates the lowest bit rate under each essential information;According to the minimum code under each essential information
Rate estimates the lowest bit rate that every section of video is applicable in.
Code check setting device further includes the selecting unit 22 coupled with mark unit, the comparing unit coupled with selecting unit
23;The selecting unit 22 selects the video of each segmentation by trial-and-error method different code checks, and the comparing unit 23 will be every
The corresponding video of kind code check therefrom finds out lowest bit rate respectively with upper limit threshold value comparison.Comparing unit 23 will be also segmented per height
The lowest bit rate of video be compared, select lowest bit rate of the wherein minimum code check as whole section of video.
Essential information includes state, the scene of video capture or the picture packet count of video object.State includes movement shape
State or stationary state.The scene of the video capture includes ball match scene or network courses scene.
The video-frequency band of each essential information can be corresponded to a kind of upper limit threshold to further lower memory space;Root
Lowest bit rate of the lowest bit rate estimated according to minimum upper limit threshold as whole section of video.
Present embodiment is first segmented video, and big video first is resolved into small video, reduces point of every section of video
Analysis amount and analysis difficulty.Then secondary segmenting will be carried out according to the essential information of video in every section, the video of each subsegment passes through
Trial-and-error method preferably goes out to be suitble to the lowest bit rate of this subsegment video content.Then the lowest bit rate of all subsegment videos of Integrated comparative again
Obtain the lowest bit rate of whole section of video.
The above content is a further detailed description of the present invention in conjunction with specific preferred embodiments, it is impossible to assert
The specific implementation of the present invention is confined to these explanations.For those of ordinary skill in the art to which the present invention belongs, exist
Under the premise of not departing from present inventive concept, several simple deduction or replace can also be made, should all be considered as belonging to the present invention's
Protection domain.