CN105554375B - The method and device of video preview in a kind of hard disk video recorder - Google Patents
The method and device of video preview in a kind of hard disk video recorder Download PDFInfo
- Publication number
- CN105554375B CN105554375B CN201510872640.6A CN201510872640A CN105554375B CN 105554375 B CN105554375 B CN 105554375B CN 201510872640 A CN201510872640 A CN 201510872640A CN 105554375 B CN105554375 B CN 105554375B
- Authority
- CN
- China
- Prior art keywords
- picture window
- stream
- sum
- main
- picture
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/60—Control of cameras or camera modules
- H04N23/62—Control of parameters via user interfaces
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/10—Cameras or camera modules comprising electronic image sensors; Control thereof for generating image signals from different wavelengths
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Human Computer Interaction (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
The invention discloses a kind of method and device of video preview in hard disk video recorder, this method is, for the picture window currently shown, first calculates the sum of the corresponding original transmitted data amount of bandwidth of picture window of the first setting number;If the sum of original transmitted data amount of bandwidth is in original transmitted data bandwidth threshold, each picture window in the first setting number shows initial data, if it is greater than original transmitted data bandwidth threshold, then the sum of the corresponding main-stream decoder performance consumption of picture window that calculates the second setting number;If the sum of main-stream decoder performance consumption is in main-stream decoder performance threshold, each picture window decoding main bit stream in the second setting number is shown, if it is greater than main-stream decoder performance threshold, each picture window in the picture window that third sets number decodes corresponding auxiliary code stream and is shown, in this way, the data transmission pressure of PCI E buses is reduced, and then increases expansible channel way.
Description
Technical field
The present invention relates to a kind of methods of video preview in video data processing technology field more particularly to hard disk video recorder
And device.
Background technology
Hard disk video recorder (Digital Video Recorder, DVR), i.e. digital video recorder, relative to traditional
Analog video video recorder, using HD recording, collection video recorder, image splitter, platform-lens control, controlling alarm, network pass
Defeated equal five kinds of functions, due to the plurality of advantages of DVR, are applied more and more extensive.
In the prior art, the specific operation process of the method for video preview is as follows in hard disk video recorder:
First, it is responsible for encoding collecting work from piece CPU, front end analogue video camera is connected with from the A/D converter on piece CPU
The roads x analog video data is converted to the digital video data of corresponding yuv format.
Then, it carries out compressed encoding to it respectively after the digital video data for receiving yuv format from piece CPU and generates phase
The roads x answered the H.264 main bit stream of coded format and auxiliary code stream video data.
In turn, pass through PCI-E bus communications, data exchange from piece CPU and main leaf CPU:From piece CPU by the yuv format on the roads n
Video data and the roads x H.264 the main bit stream of coded format and auxiliary code stream video data transmission to main leaf CPU.
Finally, main leaf CPU exports preview video after converting the digital video data of the roads n yuv format on display terminal
Image, and H.264 the main bit stream of coded format and auxiliary code stream video data write HD recording and carry out storage backup by the roads x.
It can be seen that in hard disk video recorder in the prior art video preview method, when preview is shown in more pictures point
It cuts under state, i.e., the picture window currently shown has multiple, front end analogue camera one picture window of correspondence of each paths
Mouthful, from piece CPU by the video data of all yuv formats and H.264 coded format video data by PCI-E bus transfers to
Main leaf CPU.But for example, simulating camera according to one 200W high definition of actual measurement, wherein yuv video data code flow reaches
500Mb/s, H.264 coded data main bit stream is 8Mb/s, and auxiliary code stream is 2Mb/s, i.e., the corresponding PCI-E buses of each paths
The transmission performance of 510Mb/s will be consumed.Moreover, it is generally relatively low for Embedded CPU PCI-E performances, according to PCI-E x1
Standard speed is 2000Mb/s, at most can only also connect 3 road 200W high definitions simulation cameras, in this way, strong influence multiple pass
The development of high-definition embedded hard video recorder under road increases the data transmission pressure of PCI-E buses.
It can be seen that under the prior art, there are data transmission pressure is big, and the problem that expansible channel way is less.
Invention content
The embodiment of the present invention provides a kind of method and device of video preview in hard disk video recorder, to solve in the prior art
Data transmission pressure is big, and the problem that expansible channel way is few.
Specific technical solution provided in an embodiment of the present invention is as follows:
A kind of method of video preview in hard disk video recorder, including:
The corresponding initial data of each picture window, main bit stream and auxiliary code stream are obtained successively;Wherein, the same picture window
The corresponding initial data of mouth, main bit stream and auxiliary code flow table levy identical picture;
Calculate the sum of the corresponding original transmitted data amount of bandwidth of picture window of the first setting number;
Judge whether the sum of above-mentioned original transmitted data amount of bandwidth is more than preset original transmitted data bandwidth threshold, if
It is no, then show corresponding initial data in each picture window in the picture window for meeting above-mentioned first setting number;
If so, the sum of the corresponding main-stream decoder performance consumption of picture window of the second setting number is calculated, and further in judgement
State whether the sum of main-stream decoder performance consumption is more than preset main-stream decoder performance threshold, if it is not, then meeting above-mentioned the
Corresponding main bit stream is decoded in each picture window in the picture window of two setting numbers and is shown;If so,
Meet each picture window in the picture window of third setting number to decode corresponding auxiliary code stream and shown;Wherein,
The sum of above-mentioned third setting number, above-mentioned first setting number and above-mentioned second setting number are equal to the picture window currently shown
Total number.
In the embodiment of the present invention, the corresponding initial data of each picture window, main bit stream and auxiliary code stream are obtained successively;Meter
Calculate the sum of the corresponding original transmitted data amount of bandwidth of picture window of the first setting number;Judge whether in preset original transmitted
In data bandwidth threshold value, if it is, in each picture window in meeting the picture window that above-mentioned first sets number
Show corresponding initial data;If it is not, then the corresponding main-stream decoder performance of picture window for calculating the second setting number disappears
The sum of consumption, and further determine whether in preset main-stream decoder performance threshold, if it is, being set meeting above-mentioned second
Corresponding main bit stream is decoded in each picture window in fixed number purpose picture window and is shown;If it is not, then according with
It closes each picture window in the picture window of third setting number to decode corresponding auxiliary code stream and shown, in this way, drawing
Face-port mouth not instead of all uses initial data to carry out preview and shows, using initial data, decoding main bit stream, decodes auxiliary code stream
The carry out preview of this combination is shown, substantially reduces the data transmission pressure of PCI-E buses, so that expansible is logical
Road way is more.
Preferably, before obtaining the corresponding initial data of each picture window, main bit stream and auxiliary code stream successively, into one
Step includes:
The area of each picture window, and the area based on each picture window are determined, by each picture window
It is ranked up from big to small according to area, according to above-mentioned sequence from big to small, determination obtains each picture window pair successively
Initial data, main bit stream and the auxiliary code stream answered.
It is sorted according to the size of area to picture window, can be ensured to the maximum extent so from big to small,
Video pictures quality when preview.
Preferably, the sum of the corresponding original transmitted data amount of bandwidth of picture window of the first setting number is calculated, it is specific to wrap
It includes:
It is successively read the corresponding original transmitted data amount of bandwidth of each picture window met in the first setting number;
Accumulative to be added the corresponding initial data amount of bandwidth of each picture window read, acquisition meets the first setting number
In the sum of the corresponding original transmitted data amount of bandwidth of each picture window;
Wherein, above-mentioned first setting number is less than above-mentioned preset original for the sum of accumulative initial data amount of bandwidth being added
Maximum picture window number when beginning transmission data bandwidth threshold.
Preferably, the sum of the corresponding main-stream decoder performance consumption of picture window of the second setting number is calculated, it is specific to wrap
It includes:
It is successively read the corresponding main-stream decoder performance consumption of each picture window met in the second setting number;
Accumulative to be added the corresponding main-stream decoder performance consumption of each picture window read, acquisition meets the second setting
The sum of corresponding main-stream decoder performance consumption of picture window of number;
Wherein, above-mentioned second setting number is less than above-mentioned default for the sum of accumulative main-stream decoder performance consumption being added
Main-stream decoder performance threshold when maximum picture window number.
Preferably, before obtaining the corresponding initial data of each picture window, main bit stream and auxiliary code stream successively, into one
Step includes:
Determine the transmission configuration parameter of equipment and the segmentation number of picture window;
According to above-mentioned transmission configuration parameter and above-mentioned segmentation number, original transmitted data bandwidth threshold and main-stream decoder are calculated
Performance threshold;Wherein, above-mentioned segmentation number characterizes the picture window total number currently shown.
Preferably, above-mentioned initial data is yuv data.
The device of video preview, specifically includes in a kind of hard disk video recorder:
Acquiring unit, for obtaining the corresponding initial data of each picture window, main bit stream and auxiliary code stream successively;Its
In, the corresponding initial data of same picture window, main bit stream and auxiliary code flow table levy identical picture;
First computing unit, for calculates first set number the corresponding original transmitted data amount of bandwidth of picture window it
With;
Processing unit, for judging whether the sum of above-mentioned original transmitted data amount of bandwidth is more than preset original transmitted data
Bandwidth threshold, if it is not, then showing correspondence in each picture window in the picture window for meeting above-mentioned first setting number
Initial data;If so, calculating the sum of the corresponding main-stream decoder performance consumption of picture window of the second setting number, go forward side by side
One step judges whether the sum of above-mentioned main-stream decoder performance consumption is more than preset main-stream decoder performance threshold, if it is not, then existing
Meet the corresponding main bit stream of decoding in each picture window in the picture window of above-mentioned second setting number and is shown;
If so, each picture window in the picture window for meeting third setting number decodes corresponding auxiliary code stream and is shown
Show;Wherein, the sum of above-mentioned third setting number, above-mentioned first setting number and above-mentioned second setting number, which are equal to, currently shows
Picture window total number.
In the embodiment of the present invention, the corresponding initial data of each picture window, main bit stream and auxiliary code stream are obtained successively;Meter
Calculate the sum of the corresponding original transmitted data amount of bandwidth of picture window of the first setting number;Judge whether in preset original transmitted
In data bandwidth threshold value, if it is, in each picture window in meeting the picture window that above-mentioned first sets number
Show corresponding initial data;If it is not, then the corresponding main-stream decoder performance of picture window for calculating the second setting number disappears
The sum of consumption, and further determine whether in preset main-stream decoder performance threshold, if it is, being set meeting above-mentioned second
Corresponding main bit stream is decoded in each picture window in fixed number purpose picture window and is shown;If it is not, then according with
It closes each picture window in the picture window of third setting number to decode corresponding auxiliary code stream and shown, in this way, drawing
Face-port mouth not instead of all uses initial data to carry out preview and shows, using initial data, decoding main bit stream, decodes auxiliary code stream
The carry out preview of this combination is shown, substantially reduces the data transmission pressure of PCI-E buses, so that expansible is logical
Road way is more.
Preferably, before obtaining the corresponding initial data of each picture window, main bit stream and auxiliary code stream successively, into one
Step includes:
Sequencing unit, the area for determining each picture window, and the area based on each picture window, will be every
One picture window is ranked up from big to small according to area, and according to above-mentioned sequence from big to small, determination obtains each successively
The corresponding initial data of a picture window, main bit stream and auxiliary code stream.
It is sorted according to the size of area to picture window, can be ensured to the maximum extent so from big to small,
Video pictures quality when preview.
Preferably, when calculating the sum of the corresponding original transmitted data amount of bandwidth of picture window of the first setting number, first
Computing unit is specifically used for:
It is successively read the corresponding original transmitted data amount of bandwidth of each picture window met in the first setting number;
Accumulative to be added the corresponding initial data amount of bandwidth of each picture window read, acquisition meets the first setting number
In the sum of the corresponding original transmitted data amount of bandwidth of each picture window;
Wherein, above-mentioned first setting number is less than above-mentioned preset original for the sum of accumulative initial data amount of bandwidth being added
Maximum picture window number when beginning transmission data bandwidth threshold.
Preferably, when calculating the sum of the corresponding main-stream decoder performance consumption of picture window of the second setting number, processing
Unit is specifically used for:
It is successively read the corresponding main-stream decoder performance consumption of each picture window met in the second setting number;
Accumulative to be added the corresponding main-stream decoder performance consumption of each picture window read, acquisition meets the second setting
The sum of corresponding main-stream decoder performance consumption of picture window of number;
Wherein, above-mentioned second setting number is less than above-mentioned default for the sum of accumulative main-stream decoder performance consumption being added
Main-stream decoder performance threshold when maximum picture window number.
Preferably, before obtaining the corresponding initial data of each picture window, main bit stream and auxiliary code stream successively, into one
Step includes that the second computing unit is used for:
Determine the transmission configuration parameter of equipment and the segmentation number of picture window;
According to above-mentioned transmission configuration parameter and above-mentioned segmentation number, original transmitted data bandwidth threshold and main-stream decoder are calculated
Performance threshold;Wherein, above-mentioned segmentation number characterizes the picture window total number currently shown.
Preferably, above-mentioned initial data is yuv data.
Description of the drawings
Fig. 1 is that the method for video preview in hard disk video recorder in the embodiment of the present invention summarizes flow chart;
Fig. 2 is the simple structure schematic diagram of data transmission in hard disk video recorder in the embodiment of the present invention;
Fig. 3 is the method detail flowchart of video preview in hard disk video recorder in the embodiment of the present invention;
Fig. 4 is the apparatus structure schematic diagram of video preview in hard disk video recorder in the embodiment of the present invention.
Specific implementation mode
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation describes, it is clear that described embodiments are only a part of the embodiments of the present invention, is not whole embodiment.It is based on
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall within the protection scope of the present invention.
In order to big to solve data transmission pressure in the prior art, the few problem of expansible channel way, the present invention is implemented
In example, default original transmitted data bandwidth threshold and main-stream decoder performance threshold first count the picture window currently shown
It calculates to obtain and meets the sum of corresponding original transmitted data amount of bandwidth of picture window of the first setting number, if in original transmitted number
According in bandwidth threshold, corresponding picture window shows initial data, when more than original transmitted data bandwidth threshold, then calculates acquisition
The sum of the corresponding main-stream decoder performance consumption of picture window for meeting the second setting number, if in main-stream decoder performance threshold
In value, corresponding picture window decoding main bit stream is shown, when more than main-stream decoder performance threshold, is meeting third setting
Each picture window in the picture window of number decodes corresponding auxiliary code stream and is shown.
The present invention program is described in detail below by specific embodiment, certainly, the present invention is not limited to following realities
Apply example.
As shown in fig.1, in the embodiment of the present invention, the detailed process of the method for video preview is as follows in hard disk video recorder:
Step 100:The corresponding initial data of each picture window, main bit stream and auxiliary code stream are obtained successively;Wherein, same
The corresponding initial data of a picture window, main bit stream and auxiliary code flow table levy identical picture.
In the embodiment of the present invention, above-mentioned initial data both can be yuv data, or RGB data, preferably, this
It is only illustrated by taking yuv data as an example in inventive embodiments.
In hard disk video recorder (Digital Video Recorder, DVR), it is divided into main leaf CPU and from piece CPU, wherein from
Piece CPU is responsible for acquisition and the coding of data, and main leaf CPU is responsible for instruction from piece CPU transmission datas, and to the data of reception at
Reason, and then for preview or storage backup.One DVR can show that multiple picture windows, each picture window correspond to simultaneously
One channel, even there are one front end analogue video cameras in each channel, wherein each front end analogue video camera is connected on from piece
On A/D converter on CPU.Analog video data will be received from piece CPU and is converted to corresponding yuv data, then by YUV numbers
According to being encoded, preferably, being encoded to the H.264 main bit stream of format and auxiliary code stream, last main leaf CPU instructions pass through from piece CPU
PCI-E sends yuv data, main bit stream and auxiliary code stream, and main leaf CPU obtains yuv data, main bit stream and the auxiliary code sent from piece CPU
Stream.
Wherein, the channel way that a DVR can be supported is determined by its hardware interface, and an interface can connect a mould
Quasi- video camera.The corresponding yuv data in all channels will be obtained from CPU in this way, and the corresponding yuv data in each channel is carried out
Coding obtains main bit stream and auxiliary code stream, and host CPU might not show the video pictures in all channels, for example, from
CPU supports 4 paths, then the data of this corresponding analog video camera of 4 paths will be received, and the picture that host CPU is shown
Window is 2, then at this moment, will only send the yuv data in this corresponding channel of 2 picture windows from CPU, but can lead to 4 tunnels
The main bit stream and auxiliary code stream in road are all sent to host CPU, when only host CPU carries out video pictures display, to having used YUV numbers
It is no longer used for main bit stream according to the window of the video pictures of display and auxiliary code stream decoding is shown.
Further, before executing step 100, the area of each picture window is first determined, and based on each picture
Each picture window is ranked up by the area of face-port mouth from big to small according to area, according to above-mentioned sequence from big to small,
It determines and executes step 100, in this way, picture window is ranked up according to sequence from big to small, it can be ensured that execute follow-up step
When rapid 110 and 120, and according to sequence from big to small relevant calculating is carried out, in this way, can ensure preview to the maximum extent
The image quality of display.
Further, before executing step 100, following operation is executed:
First, the transmission configuration parameter of equipment and the segmentation number of picture window are determined;
Then, according to above-mentioned transmission configuration parameter and above-mentioned segmentation number, YUV transmission datas bandwidth threshold and main bit stream are calculated
Decoding performance threshold value;Wherein, above-mentioned segmentation number characterizes the picture window total number currently shown.
Wherein, it when calculating YUV transmission datas bandwidth threshold and main-stream decoder performance threshold, specifically includes:
First, determine that PCI-E total bandwidths, device channels number, main bit stream bandwidth, auxiliary code stream bandwidth, the equipment of equipment decode
Overall performance, auxiliary code stream decoding performance and picture window divide number;
Then, it according to the PCI-E total bandwidths of equipment, device channels number, main bit stream bandwidth, auxiliary code stream bandwidth, calculates YUV and passes
Transmission of data bandwidth threshold;
The calculation of specific YUV transmission data bandwidth thresholds is as follows:
YUV transmission datas bandwidth threshold=PCI-E total bandwidths-device channels number * (main bit stream bandwidth+auxiliary code stream bandwidth).
Overall performance, auxiliary code stream decoding performance and picture window are decoded according to equipment and divides number, calculate main-stream decoder performance
Threshold value;
The calculation of specific main-stream decoder performance threshold is as follows:
Main-stream decoder performance threshold=equipment decoding overall performance-picture window divides number * auxiliary code stream decoding performances.
Wherein, device channels number is the largest passages way that can support of equipment, and PCI-E total bandwidths, main bit stream bandwidth, auxiliary
Code stream bandwidth, equipment decoding overall performance, auxiliary code stream decoding performance, can obtain according to the parameter that equipment gives.
Step 110:Calculate the sum of the corresponding original transmitted data amount of bandwidth of picture window of the first setting number.
Wherein, above-mentioned first setting number is less than above-mentioned preset YUV for the sum of accumulative yuv data amount of bandwidth being added
Maximum picture window number when transmission data bandwidth threshold.
When executing step 110, concrete operations are:
First, during obtaining yuv data, it is successively read each picture window met in the first setting number
Corresponding YUV transmission datas amount of bandwidth;
Then, add up to be added the corresponding yuv data amount of bandwidth of each picture window read, acquisition meets the first setting
The sum of corresponding YUV transmission datas amount of bandwidth of each picture window in number.
Wherein, due to obtaining yuv data carried out according to the sequence of picture window from big to small, it calculates YUV and passes
The sum of transmission of data amount of bandwidth, and according to the accumulative addition of the sequence of picture window from big to small, in this way, in the first setting number
Picture window area be comparatively larger, the image quality of larger picture window can be made relatively good, do not influenced
Preview effect.
Step 120:Judge whether the sum of above-mentioned original transmitted data amount of bandwidth is more than preset original transmitted data bandwidth
Threshold value, if it is not, then showing corresponding original in each picture window in the picture window for meeting above-mentioned first setting number
Beginning data;If so, the sum of the corresponding main-stream decoder performance consumption of picture window of the second setting number is calculated, and further
Judge whether the sum of above-mentioned main-stream decoder performance consumption is more than preset main-stream decoder performance threshold, if it is not, then meeting
Corresponding main bit stream is decoded in each picture window in the picture window of above-mentioned second setting number and is shown;If
It is that then each picture window in the picture window for meeting third setting number decodes corresponding auxiliary code stream and shown
Show;Wherein, the sum of above-mentioned third setting number, above-mentioned first setting number and above-mentioned second setting number, which are equal to, currently shows
Picture window total number.
When executing step 120, it is specifically divided into following two situations:
The first situation, if the sum of YUV transmission data amount of bandwidth is less than preset YUV transmission datas bandwidth threshold, tool
Body includes:
Corresponding YUV numbers are shown in each picture window in the picture window for meeting above-mentioned first setting number
According to;
Also, instruction does not retransmit yuv data from piece CPU in residual picture window, that is to say, that main leaf CPU is only obtained
The corresponding yuv data of picture window of first setting number, it is without to indicate from piece CPU that all picture windows are corresponding
Yuv data all sends over, and greatly reduces the data transmission pressure of PCI-E buses.
The second situation:If the sum of YUV transmission data amount of bandwidth is more than preset YUV transmission datas bandwidth threshold, tool
Body includes:
First, the corresponding main-stream decoder performance of each picture window met in the second setting number is successively read to disappear
Consumption;Wherein, above-mentioned second setting number is less than above-mentioned preset primary key for the sum of accumulative main-stream decoder performance consumption being added
Flow maximum picture window number when decoding performance threshold value.
Then, add up to be added the corresponding main-stream decoder performance consumption of each picture window read, acquisition meets the
The sum of the corresponding main-stream decoder performance consumption of picture window of two setting numbers;
Finally, judge whether the sum of above-mentioned main-stream decoder performance consumption is more than preset main-stream decoder performance threshold,
It specifically includes:
If it is not, then being decoded in each picture window in the picture window for meeting above-mentioned second setting number corresponding
Main bit stream is simultaneously shown;If so, each picture window decoding pair in meeting third to set the picture window of number
The auxiliary code stream answered simultaneously is shown.
Wherein, above-mentioned main-stream decoder performance consumption is obtained according to main bit stream resolution ratio, code stream size and coding compression ratio
Go out, in the case where CPU is determined, picture can all consume decoding performance all the way for often decoding display, and resolution ratio is got under normal circumstances
The decoding performance consumed when height, code stream are bigger, coding compression ratio is bigger is bigger.
In practice, all corresponding main bit streams of picture window and auxiliary code stream can be sent to main leaf CPU from piece CPU,
On the one hand main leaf CPU backs up the corresponding main bit stream of all picture windows and auxiliary code stream of acquisition for storing, on the other hand
The corresponding main bit stream of each picture window in decoding the second setting number is shown for preview, in decoding third setting number
The corresponding auxiliary code stream of each picture window shown for preview.
Here, suppose that first sets number as X, second sets number as Y, and third sets number as Z, the picture currently shown
Face-port mouth total number is N, then N=X+Y+Z, that is to say, that in video preview, main leaf CPU is using yuv data, decoding primary key
The realization method that a kind of combine preview of stream or decoding auxiliary code stream is shown.
As shown in fig.2, for the simple structure schematic diagram of data transmission in hard disk video recorder:
First, from piece CPU by analog-digital converter by the analog video data of N paths, be converted to the YUV of N paths
The video data of format;
Then, it is encoded from piece CPU by the video data of the yuv format of N paths, obtains the H.264 lattice of N paths
The video data of formula, wherein H.264 the video data of format includes main bit stream and auxiliary code stream;
Then, main leaf CPU is sent to by PCI-E buses from piece CPU by the video data of the H.264 format of N paths,
The video data of the yuv format of X paths is sent to main leaf CPU by PCI-E buses simultaneously;
Then, main leaf CPU decodes the main bit stream of Y paths, and decodes the auxiliary code stream of Z paths, obtains corresponding YUV lattice
The video data of formula;
Finally, main leaf CPU shows the video data of the yuv format of obtained all paths for preview.
Further description is made to above-described embodiment using a specific application scenarios below, as shown in fig.3,
The method implementation procedure of video preview is specific as follows in hard disk video recorder:
Step 300:The picture window total number (i.e. the segmentation number of picture window) currently shown is N, and main leaf CPU is calculated
YUV transmission datas bandwidth threshold, specific calculation are:
YUV transmission datas bandwidth threshold=PCI-E total bandwidths-device channels number * (main bit stream bandwidth+auxiliary code stream bandwidth).
Main leaf CPU calculates main-stream decoder performance threshold, and specific calculation is:
Main-stream decoder performance threshold=equipment decoding overall performance-picture window divides number * auxiliary code stream decoding performances.
Wherein, device channels number is the largest passages way that can support of equipment, and PCI-E total bandwidths, main bit stream bandwidth, auxiliary
Code stream bandwidth, equipment decoding overall performance, auxiliary code stream decoding performance, can obtain according to the parameter that equipment gives.
Step 301:It determines the area of N number of picture window, and N number of picture window is ranked up from big to small;
Step 302:Main leaf CPU starts to obtain yuv data, main bit stream and auxiliary code stream;
Step 303:X initial values are set as 0, according to the sequence of picture window from big to small, read each picture in X
The corresponding YUV transmission datas amount of bandwidth of window, and added up to obtain the sum of YUV transmission data amount of bandwidth;
Step 304:Judge whether the sum of YUV transmission data amount of bandwidth is more than YUV transmission data bandwidth thresholds;If so,
307 are thened follow the steps, otherwise, executes step 305;
Step 305:X values add 1;
Step 306:Each picture window in X obtains corresponding yuv data and is shown;
Step 307:Y initial values are set as 0, according to the sequence of picture window from big to small, read each picture in Y
The corresponding main-stream decoder performance consumption of window, and added up to obtain the sum of main-stream decoder performance consumption;
Step 308:Judge whether the sum of main-stream decoder performance consumption is more than main-stream decoder performance threshold;If so,
311 are thened follow the steps, otherwise, executes step 309;
Step 309:Y value adds 1;
Step 310:Each picture window in Y decodes corresponding main bit stream and is shown;
Step 311:Remaining channel picture is set as Z (wherein, Z=N-X-Y), each picture window decoding in Z
Corresponding auxiliary code stream is simultaneously shown.
Based on above-described embodiment, as shown in fig.4, in the embodiment of the present invention, the device of video preview in hard disk video recorder,
It specifically includes:
Acquiring unit 42, for obtaining the corresponding initial data of each picture window, main bit stream and auxiliary code stream successively;Its
In, the corresponding initial data of same picture window, main bit stream and auxiliary code flow table levy identical picture;
First computing unit 43, the corresponding original transmitted data amount of bandwidth of picture window for calculating the first setting number
The sum of;
Processing unit 44, for judging whether the sum of above-mentioned original transmitted data amount of bandwidth is more than preset original transmitted number
According to bandwidth threshold, if it is not, then display pair in each picture window in the picture window for meeting above-mentioned first setting number
The initial data answered;If so, the sum of the corresponding main-stream decoder performance consumption of picture window of the second setting number is calculated, and
Further judge whether the sum of above-mentioned main-stream decoder performance consumption is more than preset main-stream decoder performance threshold, if it is not, then
Corresponding main bit stream is decoded in each picture window in the picture window for meeting above-mentioned second setting number and is shown
Show;It goes forward side by side if so, each picture window in the picture window for meeting third setting number decodes corresponding auxiliary code stream
Row display;Wherein, the sum of above-mentioned third setting number, above-mentioned first setting number and above-mentioned second setting number are equal to current aobvious
The picture window total number shown.
Preferably, before obtaining the corresponding initial data of each picture window, main bit stream and auxiliary code stream successively, into one
Step includes:
Sequencing unit 41, the area for determining each picture window, and the area based on each picture window, will
Each picture window is ranked up from big to small according to area, according to above-mentioned sequence from big to small, is determined and is obtained successively often
The corresponding initial data of one picture window, main bit stream and auxiliary code stream.
Preferably, when calculating the sum of the corresponding original transmitted data amount of bandwidth of picture window of the first setting number, first
Computing unit 43 is specifically used for:
It is successively read the corresponding original transmitted data amount of bandwidth of each picture window met in the first setting number;
Accumulative to be added the corresponding initial data amount of bandwidth of each picture window read, acquisition meets the first setting number
In the sum of the corresponding original transmitted data amount of bandwidth of each picture window;
Wherein, above-mentioned first setting number is less than above-mentioned preset original for the sum of accumulative initial data amount of bandwidth being added
Maximum picture window number when beginning transmission data bandwidth threshold.
Preferably, when calculating the sum of the corresponding main-stream decoder performance consumption of picture window of the second setting number, processing
Unit 44 is specifically used for:
It is successively read the corresponding main-stream decoder performance consumption of each picture window met in the second setting number;
Accumulative to be added the corresponding main-stream decoder performance consumption of each picture window read, acquisition meets the second setting
The sum of corresponding main-stream decoder performance consumption of picture window of number;
Wherein, above-mentioned second setting number is less than above-mentioned default for the sum of accumulative main-stream decoder performance consumption being added
Main-stream decoder performance threshold when maximum picture window number.
Preferably, before obtaining the corresponding initial data of each picture window, main bit stream and auxiliary code stream successively, into one
Step includes that the second computing unit 40 is used for:
Determine the transmission configuration parameter of equipment and the segmentation number of picture window;
According to above-mentioned transmission configuration parameter and above-mentioned segmentation number, original transmitted data bandwidth threshold and main-stream decoder are calculated
Performance threshold;Wherein, above-mentioned segmentation number characterizes the picture window total number currently shown.
Preferably, above-mentioned initial data is yuv data.
In conclusion in the embodiment of the present invention, obtain successively the corresponding initial data of each picture window, main bit stream and
Auxiliary code stream;Calculate the sum of the corresponding original transmitted data amount of bandwidth of picture window of the first setting number;Judge whether default
Original transmitted data bandwidth threshold in, if it is, meet it is above-mentioned first setting number picture window in each
The corresponding initial data of display in picture window;If it is not, then calculating the corresponding main bit stream of picture window of the second setting number
The sum of decoding performance consumption, and further determine whether in preset main-stream decoder performance threshold, if it is, meeting
Corresponding main bit stream is decoded in each picture window in the picture window of above-mentioned second setting number and is shown;If
No, then each picture window in the picture window for meeting third setting number decodes corresponding auxiliary code stream and is shown
Show, shown in this way, picture window does not instead of all use initial data to carry out preview, using initial data, decoding main bit stream, solution
The carry out preview of this combination of code auxiliary code stream is shown, substantially reduces the data transmission pressure of PCI-E buses, so that
Expansible channel way is more.
Also, in the embodiment of the present invention, is sorted according to the size of area to picture window, in this way may be used from big to small
To ensure to the maximum extent, the video pictures quality in preview.
It should be understood by those skilled in the art that, the embodiment of the present invention can be provided as method, system or computer program
Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the present invention
Apply the form of example.Moreover, the present invention can be used in one or more wherein include computer usable program code computer
The computer program production implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.)
The form of product.
The present invention be with reference to according to the method for the embodiment of the present invention, the flow of equipment (system) and computer program product
Figure and/or block diagram describe.It should be understood that can be realized by computer program instructions every first-class in flowchart and/or the block diagram
The combination of flow and/or box in journey and/or box and flowchart and/or the block diagram.These computer programs can be provided
Instruct the processor of all-purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce
A raw machine so that the instruction executed by computer or the processor of other programmable data processing devices is generated for real
The device for the function of being specified in present one flow of flow chart or one box of multiple flows and/or block diagram or multiple boxes.
These computer program instructions, which may also be stored in, can guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works so that instruction generation stored in the computer readable memory includes referring to
Enable the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one box of block diagram or
The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device so that count
Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, in computer or
The instruction executed on other programmable devices is provided for realizing in one flow of flow chart or multiple flows and/or block diagram one
The step of function of being specified in a box or multiple boxes.
Although preferred embodiments of the present invention have been described, it is created once a person skilled in the art knows basic
Property concept, then additional changes and modifications may be made to these embodiments.So it includes excellent that the following claims are intended to be interpreted as
It selects embodiment and falls into all change and modification of the scope of the invention.
Obviously, those skilled in the art can carry out the embodiment of the present invention various modification and variations without departing from this hair
The spirit and scope of bright embodiment.In this way, if these modifications and variations of the embodiment of the present invention belong to the claims in the present invention
And its within the scope of equivalent technologies, then the present invention is also intended to include these modifications and variations.
Claims (12)
1. a kind of method of video preview in hard disk video recorder, which is characterized in that including:
The corresponding initial data of each picture window, main bit stream and auxiliary code stream are obtained successively;Wherein, the same picture window pair
Initial data, main bit stream and the auxiliary code flow table answered levy identical picture;
The sum of corresponding original transmitted data amount of bandwidth of the picture window of cumulative calculation X numbers successively;
Judge whether the sum of described original transmitted data amount of bandwidth is more than preset original transmitted data bandwidth threshold, if it is not, then
Corresponding initial data is shown in each picture window in the picture window for meeting the X numbers, and X values add 1;If
Be, then in the residual picture window in addition to the X numbers, the corresponding primary key of the picture window of cumulative calculation Y numbers successively
The sum of decoding performance consumption is flowed, and the sum of further judges the main-stream decoder performance consumption and whether is more than preset main bit stream
Decoding performance threshold value, if it is not, then decoding corresponding master in each picture window in the picture window for meeting the Y numbers
Code stream is simultaneously shown, and Y value adds 1;If so, each picture window in meeting third to set the picture window of number
It decodes corresponding auxiliary code stream and is shown;Wherein, the sum of the third setting number, the X numbers and described Y numbers are equal to
The picture window total number currently shown.
2. the method as described in claim 1, which is characterized in that obtaining the corresponding original number of each picture window successively
Before, main bit stream and auxiliary code stream, further comprise:
Determine the area of each picture window, and the area based on each picture window, by each picture window according to
Area is ranked up from big to small, and according to the sequence from big to small, it is corresponding that determination obtains each picture window successively
Initial data, main bit stream and auxiliary code stream.
3. method as claimed in claim 2, which is characterized in that the picture window of cumulative calculation X numbers is corresponding original successively
The sum of transmission data amount of bandwidth, specifically includes:
It is successively read the corresponding original transmitted data amount of bandwidth of each picture window met in X numbers;
Accumulative to be added the corresponding initial data amount of bandwidth of each picture window read, acquisition meets each in X numbers and draws
The sum of corresponding original transmitted data amount of bandwidth of face-port mouth.
4. method as claimed in claim 2, which is characterized in that the corresponding primary key of the picture window of cumulative calculation Y numbers successively
The sum of decoding performance consumption is flowed, is specifically included:
It is successively read the corresponding main-stream decoder performance consumption of each picture window met in Y numbers;
It is accumulative to be added the corresponding main-stream decoder performance consumption of each picture window read, obtain the picture for meeting Y numbers
The sum of corresponding main-stream decoder performance consumption of window.
5. the method as described in claim 1, which is characterized in that obtaining the corresponding original number of each picture window successively
Before, main bit stream and auxiliary code stream, further comprise:
Determine the transmission configuration parameter of equipment and the segmentation number of picture window;
According to the transmission configuration parameter and the segmentation number, original transmitted data bandwidth threshold and main-stream decoder performance are calculated
Threshold value;Wherein, the segmentation number characterizes the picture window total number currently shown.
6. method as described in any one in claim 1-5, which is characterized in that the initial data is yuv data.
7. the device of video preview in a kind of hard disk video recorder, which is characterized in that including:
Acquiring unit, for obtaining the corresponding initial data of each picture window, main bit stream and auxiliary code stream successively;Wherein, together
The corresponding initial data of one picture window, main bit stream and auxiliary code flow table levy identical picture;
First computing unit, the sum of the corresponding original transmitted data amount of bandwidth of picture window for cumulative calculation X numbers successively;
Processing unit, for judging whether the sum of described original transmitted data amount of bandwidth is more than preset original transmitted data bandwidth
Threshold value, if it is not, then corresponding initial data is shown in each picture window in the picture window for meeting the X numbers,
And X values add 1;If so, in the residual picture window in addition to the X numbers, the picture window of cumulative calculation Y numbers successively
The sum of corresponding main-stream decoder performance consumption, and the sum of further judge the main-stream decoder performance consumption and whether be more than and is pre-
If main-stream decoder performance threshold, if it is not, then being solved in each picture window in the picture window for meeting the Y numbers
The corresponding main bit stream of code is simultaneously shown, and Y value adds 1;If so, each in the picture window for meeting third setting number
A picture window decodes corresponding auxiliary code stream and is shown;Wherein, the third setting number, the X numbers and the Y numbers
The sum of mesh is equal to the picture window total number currently shown.
8. device as claimed in claim 7, which is characterized in that obtaining the corresponding original number of each picture window successively
Before, main bit stream and auxiliary code stream, further comprise:
Sequencing unit, the area for determining each picture window, and the area based on each picture window, by each
Picture window is ranked up from big to small according to area, and according to the sequence from big to small, determination obtains each picture successively
The corresponding initial data of face-port mouth, main bit stream and auxiliary code stream.
9. device as claimed in claim 8, which is characterized in that the picture window of cumulative calculation X numbers is corresponding original successively
When the sum of transmission data amount of bandwidth, the first computing unit is specifically used for:
It is successively read the corresponding original transmitted data amount of bandwidth of each picture window met in X numbers;
Accumulative to be added the corresponding initial data amount of bandwidth of each picture window read, acquisition meets each in X numbers and draws
The sum of corresponding original transmitted data amount of bandwidth of face-port mouth.
10. device as claimed in claim 8, which is characterized in that the corresponding main bit stream solution of the picture window of cumulative calculation Y successively
When the sum of code performance consumption, processing unit is specifically used for:
It is successively read the corresponding main-stream decoder performance consumption of each picture window met in Y numbers;
It is accumulative to be added the corresponding main-stream decoder performance consumption of each picture window read, obtain the picture for meeting Y numbers
The sum of corresponding main-stream decoder performance consumption of window.
11. device as claimed in claim 7, which is characterized in that obtaining the corresponding original number of each picture window successively
Before, main bit stream and auxiliary code stream, further comprise, the second computing unit is used for:
Determine the transmission configuration parameter of equipment and the segmentation number of picture window;
According to the transmission configuration parameter and the segmentation number, original transmitted data bandwidth threshold and main-stream decoder performance are calculated
Threshold value;Wherein, the segmentation number characterizes the picture window total number currently shown.
12. such as claim 7-11 any one of them devices, which is characterized in that the initial data is yuv data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510872640.6A CN105554375B (en) | 2015-12-02 | 2015-12-02 | The method and device of video preview in a kind of hard disk video recorder |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510872640.6A CN105554375B (en) | 2015-12-02 | 2015-12-02 | The method and device of video preview in a kind of hard disk video recorder |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105554375A CN105554375A (en) | 2016-05-04 |
CN105554375B true CN105554375B (en) | 2018-09-21 |
Family
ID=55833293
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510872640.6A Active CN105554375B (en) | 2015-12-02 | 2015-12-02 | The method and device of video preview in a kind of hard disk video recorder |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105554375B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107155093B (en) * | 2017-06-21 | 2020-10-23 | 普联技术有限公司 | Video preview method, device and equipment |
CN110944213B (en) * | 2019-11-26 | 2021-09-10 | 浙江大华技术股份有限公司 | Code stream adjusting method and device and computer storage medium |
CN111064889A (en) * | 2019-12-25 | 2020-04-24 | 惠州Tcl移动通信有限公司 | Shooting method of terminal equipment, terminal equipment and storage medium |
CN113473041A (en) * | 2020-03-30 | 2021-10-01 | 杭州海康威视数字技术股份有限公司 | Method for processing ultra-high-definition analog video image and hard disk video recording equipment |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101232620A (en) * | 2008-02-27 | 2008-07-30 | 杭州华三通信技术有限公司 | Video decoding method and apparatus as well as device and method for implementing video data storage |
CN101370140A (en) * | 2008-09-25 | 2009-02-18 | 浙江大华技术股份有限公司 | Multi-code stream generation method |
CN102111644A (en) * | 2009-12-24 | 2011-06-29 | 华为终端有限公司 | Method, device and system for controlling media transmission |
CN102364945A (en) * | 2011-11-28 | 2012-02-29 | 杭州海康威视数字技术股份有限公司 | Multi-picture image decoding display method and video monitoring terminal |
WO2015085468A1 (en) * | 2013-12-09 | 2015-06-18 | 华为技术有限公司 | Apparatus and method for detecting optical network uplink signal |
-
2015
- 2015-12-02 CN CN201510872640.6A patent/CN105554375B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101232620A (en) * | 2008-02-27 | 2008-07-30 | 杭州华三通信技术有限公司 | Video decoding method and apparatus as well as device and method for implementing video data storage |
CN101370140A (en) * | 2008-09-25 | 2009-02-18 | 浙江大华技术股份有限公司 | Multi-code stream generation method |
CN102111644A (en) * | 2009-12-24 | 2011-06-29 | 华为终端有限公司 | Method, device and system for controlling media transmission |
CN102364945A (en) * | 2011-11-28 | 2012-02-29 | 杭州海康威视数字技术股份有限公司 | Multi-picture image decoding display method and video monitoring terminal |
WO2015085468A1 (en) * | 2013-12-09 | 2015-06-18 | 华为技术有限公司 | Apparatus and method for detecting optical network uplink signal |
Also Published As
Publication number | Publication date |
---|---|
CN105554375A (en) | 2016-05-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105554375B (en) | The method and device of video preview in a kind of hard disk video recorder | |
JP6283108B2 (en) | Image processing method and apparatus | |
US10051271B2 (en) | Coding structure | |
CN107736019B (en) | Vehicle-mounted security monitoring method and system and terminal equipment | |
CN107155093B (en) | Video preview method, device and equipment | |
JP2002517846A (en) | How to segment objects in a video sequence with object tracking and accessibility | |
CN110572695A (en) | media data encoding and decoding methods and electronic equipment | |
CN111818295B (en) | Image acquisition method and device | |
WO2018040428A1 (en) | Screen interface display method and system | |
WO2021143692A1 (en) | Audio encoding and decoding methods and audio encoding and decoding devices | |
US10687066B2 (en) | Low power-consuming encoding method, and apparatus | |
JP2014027658A (en) | Compression encoding and decoding method and apparatus | |
CN101755459A (en) | Systems and methods for adaptively determining I frames for acquisition and base and enhancement layer balancing | |
US20240179353A1 (en) | Method and apparatus for employing dynamic range mapping information for hdr image decoder considering backward compatibility | |
CN112437301A (en) | Code rate control method and device for visual analysis, storage medium and terminal | |
US9560311B2 (en) | Video signal encoding apparatus and video signal encoding method | |
WO2018090600A1 (en) | Method for establishing virtual reference frame, and device | |
CN111263164A (en) | High frame frequency video parallel coding and recombination method | |
US9928452B2 (en) | Image decoding apparatus and method therefor | |
CN108668170B (en) | Image information processing method and device, and storage medium | |
CN103997635B (en) | The synthesis viewpoint distortion prediction method of free viewpoint video and coding method | |
TWI700918B (en) | Coding of video and audio with initialization fragments | |
CN107426611B (en) | multi-path output method and system based on video transcoding | |
WO2024051299A1 (en) | Encoding method and apparatus, and decoding method and apparatus | |
CN103327336B (en) | A kind of method and apparatus of 3-dimensional encoding |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |