CN1375993A - PCMCIA MPEG code stream generating, analyzing and recording method and equipment - Google Patents

PCMCIA MPEG code stream generating, analyzing and recording method and equipment Download PDF

Info

Publication number
CN1375993A
CN1375993A CN 02111541 CN02111541A CN1375993A CN 1375993 A CN1375993 A CN 1375993A CN 02111541 CN02111541 CN 02111541 CN 02111541 A CN02111541 A CN 02111541A CN 1375993 A CN1375993 A CN 1375993A
Authority
CN
China
Prior art keywords
data
module
buffer
file
code stream
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
Application number
CN 02111541
Other languages
Chinese (zh)
Other versions
CN1194541C (en
Inventor
惠新标
戚丹青
陈骏逸
顾燕玲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai City Inst. of Broadcast Science
Shanghai Wenguang Technology Development Co., Ltd.
Original Assignee
SHANGHAI CITY INST OF BROADCAST SCIENCE
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by SHANGHAI CITY INST OF BROADCAST SCIENCE filed Critical SHANGHAI CITY INST OF BROADCAST SCIENCE
Priority to CNB021115419A priority Critical patent/CN1194541C/en
Publication of CN1375993A publication Critical patent/CN1375993A/en
Application granted granted Critical
Publication of CN1194541C publication Critical patent/CN1194541C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Abstract

This invention provides a measurement apparatus combined with hardware and software used in the record of generating and analysis of code stream of PCMCIA MPEG transmission in the digital test TV broadcast in which the hardware contains input control, process and buffer of code stream and PMCIA interface control, and the software adopts three independent software layers of application software, software of support and drive program nessary for the hardware management of operation system, and other software operations to hardnware all through the drive program and the separation of the support software and the application software can screen details of the base layer thereto analyze all kinds of code streams containing CA stream, DVB standard input stream and ATSC standard input code stream with a small, flexible and convenient device suitable for real time test.

Description

The generation of PCMCIA MPEG code stream, analysis, recording method and equipment
Skill is stated the field
The present invention relates in the broadcasting of a kind of digital TV video generation, analysis, recording method and corresponding apparatus thereof to transmission code stream.
Background technology
Along with the formulation of Moving Picture Experts Group-2, the Application and Development of digital audio/video and MPEG is just entering the stage that develops rapidly both at home and abroad; In the coding and use of MPEG-2 code stream, need know the code stream of generation or whether the code stream that obtains meets corresponding standard, also to analyze the coding efficiency and the transmission performances of code stream sometimes.The code stream that generates or receive is difficult to understand, also can't be as the anolog TV signals direct viewing, therefore need the instrument that can analyze the MPEG code stream.Simultaneously, have to need corresponding checking code stream in some equipment debugging processes, this needs to take place the instrument of MPEG code stream.Though several main measuring test instrument both domestic and external and broadcasting equipment manufacturer have the equipment of this respect, but mostly adopt the PCI computer interface to realize, though what have relates to PCMCIA, but also just as an interface, do not have real PCMCIA specialty analysis instrument, therefore for some technical staff that often need carry out field survey, their volume is too huge, gives and carries and carry and bring many inconvenience; And the analytic function of some equipment is incomplete, for the user, can not understand the MPEG code stream well, intuitively, and is inconvenient when debugging, inspection and Authentication devices yet.Based on this a series of situation, the Shanghai Broadcasting exploitation has also been finished PCMCIA-MPEG code stream analysis instrument functional and that volume is little.It is applicable to the fault monitoring and the specificity analysis of MPEG-2 digital television standard definition and each link output code flow of high definition field, and the checking of equipment and Installation and Debugging: in the installation and debugging process of digital television system, can analyze, checking and fault location to each link of system; In the monitoring link of digital television system, can the main node of system be monitored; In digital television devices exploitation and development process, can debug with performance evaluation to it etc.
Summary of the invention
The purpose of this invention is to provide a kind of method that adopts hardware, software combination, the instrument and equipment that utilizes pcmcia interface that the MPEG transmission code stream is taken place, analyzes, writes down.
The present invention includes hardware and software, hardware is made analytical instrument, hardware comprises code stream input control and treatment facility, pcmcia interface hardware, software adopts independently three software levels: application software, support software and driver, driver is finished and hardware controls and operating system related work, support software is used for the contact application software and driver, the shielding hardware details, for application software provides data, the analysis process management, the interface function of access hardware is provided, carry out data preparation, application software is finished the processing of user's input, by customer requirements the data that obtain is analyzed, statistics, show.
Described hardware comprises input module, the clock information logging modle, and input is analyzed and control module, input-buffer and control module, output buffers and control module, output is handled and control module, output module, clock processing and control module, PCI status control module, register and control module, the Data Transmission Controlling module, the interruption controls module, Computer Interface Module, energy supply control module, initialization and programming module, wherein:
Input module is finished the conversion of input signal format.Input signal is the ASI form.The ASI interface is the signal of serial 270M, and interface circuit is finished signal coupling and shaping, adopts an ASIC to finish bit clock and recovers, and line decoding and 10 bits/8 bits switch convert thereof into parallel signal.
The clock information module is responsible for monitoring and record PCR clock value.PCR is a system clock reference in the MPEG code stream, and its accuracy is bigger to the influence of Digital Video System with shake, so must be accurately to its analysis, and this just requires its record is also wanted instant, accurate.The temporal information register is deposited above-mentioned temporal information, and offers software by computer interface in due course and carry out analyzing and processing.
Input is analyzed and control module, and the parameter and the operation of control input chip receive the data of coming in from input module, according to control signal wherein code stream is analyzed, and is write data to input buffer.
Input buffering and control module are carried out buffer memory to data, and for simplifying circuit, buffer adopts the block RAM of FPGA inside to realize.Module also is responsible for checking the full level of buffer, provides corresponding indicating signals.The indication of binding data transmission control section is passed to software with the input code flow data through pcmcia interface and is analyzed and handle again.
Output buffering and control module are carried out buffer memory to dateout, and the buffer here also adopts the block RAM of FPGA inside to realize.Module also is responsible for checking the full level of buffer, provides corresponding indicating signals.The indication of binding data transmission control section obtains the output code flow data through pcmcia interface from software again.
Output is handled and control module, and the parameter and the operation of control pio chip according to canonical reference clock and the output clock that comprehensively comes out, are fetched data from buffer and issued pio chip, insert some padding datas simultaneously with speed on the line that keeps output.
Output module is finished the conversion of output signal form.Here adopted an ASIC to do the coding of bit stream data to the ASI signal, the serial signal of output 270M also has partial circuit to finish the driving of ASI signal and the output etc. that is coupled in addition.
Clock is handled and control module, finishes the task of two parts: the one, finish the shaping and the generation of reference clock, and mainly be the system clock that generates 27M according to the clock source of a 108M; The 2nd, the 108M clock is carried out frequency synthesis, generate the needed byte output of output signal clock, to generate the code stream of required various different code checks.
The PCI status control module is mainly finished PCI standard in the pcmcia interface, realizes function and the control of PCI.The PCI standard is a more complicated, and its State Control is more complicated also, comprises the control etc. of selection, data transmission procedure and state of explanation, address and data of control, the order in pci interface space here.
Register and control module, register are the main means that Control Parameter and hardware information are provided in the hardware, and in the PCI standard, register is an important part in the space.Its control comprises that mainly address resolution, reading and writing data, initialization, parameter are to control of other module etc.
The Data Transmission Controlling module, mainly finishing of task has: judge and initiation data PCI transmission course, notice relevant hardware and buffer are prepared this, control corresponding PCI hardware and carry out correct address date selection, select correct buffer and find corresponding address, finishing of affirmation task finished transmission course etc.
The interruption controls module, the parameter of number of times that transmits according to input transfer of data and dateout and relevant control register, produce after finishing certain transfer of data and interrupt, related software carries out the record analysis processing or prepares and provide new data data in the notice computer.
Computer Interface Module is mainly finished the direct-connected buffering with computer, guarantees the electric property compliant requirement of computer interface part.
Energy supply control module, that mainly finishes has: change out other DC power supply that various chips require from the single power supply of PCMCIA, this is comprising booster circuit and reduction voltage circuit.In addition, also to finish the needed power supply control of economize on electricity, at the power supply that cuts off some partial circuit in some cases.
Initialization and programming module, this part are the necessary initializing circuits of FPGA, and it is loaded into the needed relevant configuration information of FPGA in the configuration space of FPGA when powering on, and makes FPGA can realize desired function.
The job step of described driver is:
Match with operating system and to finish hardware initialization, equipment is set up, the distribution of interruption, input/output port and each resource of buffer, make hardware become the addressable equipment of operating system, and as seen to support program and application program, operating system is after finding hardware and beginning to start driver, and job step is:
1. at first be that hardware is carried out initialization, Resources allocation and finish system's control structure.
2. next be the distribution of carrying out buffer, divide to be used in the buffer of analyzing and taking place.
3. after this resident part of driver is waited for the order that support program is sent.
4. the back that receives orders makes an explanation to it, and resolves into access hardware is operated.
5. require hardware to be conducted interviews according to the accessing operation that decomposites by pcmcia interface.
After initialization is finished, driver is also resident another part, i.e. interrupt response program:
1. receive that interrupt response activates corresponding interrupt response program.
2. share interruption because the PCI standard adopts, at first need to judge the source of interruption.
3. if the interruption that the equipment here produces, then check the state of buffer.
4. if buffer has obtained data or needed new data, then the state of buffer is adjusted.
6. send the request that buffer need be handled to support software then, handle the data that obtain or new data is provided by support program.
Support software comprises generation control module, generation file process process module, data processing process module, analysis and Control module, log file treatment progress module take place, analyzes data processing process module, hardware parameter setting and acquisition module, and each module job step is as follows:
Control module takes place:
1. soft, the hardware parameter of initialization is for the operation that code stream takes place is prepared.
2. the buffer of usefulness takes place in distribution, and code stream takes place needs bigger buffer to guarantee the continuous of code stream.
3. set the parameter of hardware, begin to take place the hardware action of code stream.
4. generate the process that file process takes place, it will be obtained from file on request needed initial data will take place.
5. generate the process that data processing takes place, it will be handled the data that obtain from file, guarantee that last sent code stream meets user's needs.Document processing module takes place:
1. the file to the output code flow data carries out initialization, obtains the information of file, and opens file.
2. initialization files are handled buffer, and the speed of file read-write can not cooperate fully with the speed that code stream is handled, so need the file process buffer here.
3. after this enter the practical operation circulation, wait for the request of reading file from driver.
4. after receiving the request of reading file, at first check buffer, confirm that the state of buffer is correct.
5. begin file operation then, data are read from file in the file process buffer.
6. revise buffer state after running through data, notify other program can use this buffer.Data processing module takes place:
1. process begins the data processing request of back wait from driver.
2. at first buffer is put in order, data are moved to the data processing buffer, change the state of file process buffer and data processing buffer then from the file process buffer.
3. send the request of reading file when needing to fill the file process buffer.
4. the invokes application call back function is handled in the time of need further handling modification to obtained bit stream data.
5. the bit stream data of handling well is offered driver, the code stream in this buffer will pass in the hardware by hardware interface in driver and send.The analysis and Control module:
1. soft, the hardware parameter of initialization is for the input-buffer and the analysis operation of code stream are prepared.
2. distribute the buffer of analyzing usefulness, analyzing code stream needs bigger buffer with the sliding analytic process of buffer code levelling.
3. set the parameter of hardware, begin to analyze the hardware action of code stream.
4. generate the process that log file is handled, it will record needed bit stream data in the file on request.
5. generate the process of analyzing data processing, it will be handled the data that obtain from input buffer, and call the application call back function and carry out the detail analysis processing.The log file processing module:
1. the file to the record code flow data carries out initialization, obtains the information of file, and opens file.
2. initialization files are handled buffer, and the speed of file read-write can not cooperate fully with the speed that code stream is handled, so need the file process buffer here.
3. after this enter the practical operation circulation, wait for request from the log file of driver.
4. after receiving the request of log file, at first check buffer, confirm that the state of buffer is correct.
5. begin file operation then, data are write in the file from the file process buffer.
6. revise buffer state after having write data, notify other program can use this buffer.Analyze data processing module:
1. process begins the data processing request of back wait from driver.
2. at first buffer is put in order, data are moved to the file process buffer, change the state of file process buffer and data processing buffer then from the data processing buffer.
3. need be with the request of sending written document during data record in the file process buffer.
4. need be to the further analyzing and processing of bit stream data, the invokes application call back function is handled.
5. put buffer at last in order, the buffer of handling is cleaned out, be used for the buffering of new data.Hardware parameter is provided with acquisition module:
1. the function and the requirement of at first application being called analyzed.
2. calculate relevant parameter according to required function.
3. select the register relevant with requiring function.
4. according to the analog value of the property calculation register of parameter and related register.
5. open equipment, prepare to carry out hardware operation.
6. call driver is carried out the read-write of register.
7. return the register value that reads.
8. calculate the information parameter value that needs are understood according to register value
Application software comprises the real-time analysis of MPEG code stream, logging software and MPEG code stream off-line analysis software, wherein the real-time analysis of MPEG code stream, logging software at first obtain system's control by the bottom hardware module, start-up routine view then, create each function pages, the program view framework comprises that toolbar and menu bar, tree framework, real-time analysis framework, pcr analysis framework, program analytical framework, tabular analysis framework, Buffer analytical framework, hardware analysis framework, code stream write down framework, code stream generation framework; Wherein system is provided with the job step of modular program and is:
(1). system is provided with module after startup, creates that at first dialog box being set;
(2). the Set For Current parameter of reading system also shows;
(3). the user can be provided with at each and select to meet the option (also can just check, not elect) that oneself requires on button;
(4). after finishing (3) step, the user selects whether to agree existing parameter setting, if disagree with then inquire the parameter setting that whether logs off, if do not withdraw from then return step (3), otherwise withdraws from setting;
(5) if. in step (4), select to agree existing parameter setting, parameter input system nucleus module then will be set, and the setting that logs off.
MPEG code stream off-line analysis software, at first obtain system's control by the bottom hardware module, start-up routine view then, create each function pages, the program view framework comprises toolbar and menu bar, tree framework, analysis-by-synthesis framework, pcr analysis framework, program analytical framework, tabular analysis framework, video analysis framework.Calling system nucleus module when entering real-time analysis, its job step is:
1. start-up system nucleus module begins to wait for the interrupt call of bottom hardware module;
2. start the bottom hardware module, bottom hardware module catch code flow data from input signal cable is packed into the buffer 1 of Installed System Memory, after the data in the buffer 1 are filled up, produce system break, interrupt response function in the calling system nucleus module, and the address of buffer, the size and the hardware clock of buffer passed to the interrupt response function.After finishing above step, the bottom hardware module continues to catch bit stream data, and be packed in the Installed System Memory buffer 2, after the data of buffer 2 are filled up, produce system break, the interrupt response function of calling system nucleus module, repeating step 2 send the control command that stops to analyze up to analytical system;
3. system core module is after the interrupt call of receiving the bottom hardware module, the outage response function.The interrupt response function obtains the internal memory pointer of bit stream data, the size of bit stream data piece and the clock information of system hardware.It is long that at first the size by bit stream data is calculated the bag of the bag number of bit stream data and each packet; Respectively each packet is analyzed by the bag number;
4. many special information on services forms are arranged in the transport stream of MPEG, and they are distributed in the data flow with the form of bag data.(the Program associationtable: Program Association Table) be the crucial form that produces whole code flow structure of pat table lattice wherein.In step 3,, enter pat table case analysis process at once in case the packet of pat table occurs.
5. in step 3, whether first byte of each packet being analyzed the preceding packet of inspection earlier is sync byte 0 * 47.If not, show that error in data may appear in this packet or data are not synchronous.The fault processing module is sent in error message, and carried out the analysis of next packet; After above step is finished, check the highest order (error of transmission flag bit) of second byte in the packet, if " 1 " is then represented to have the error of transmission that can't correct in the packet, the fault processing module is sent in error message, and carried out the analysis of next packet; After above step is finished, whether back 4 (bag continuous counter positions) checking the 4th byte in the packet are continuous counter+1 (0 * f+1=0) of a last identical PID bag, if not, in code stream loss of data or repetition may appear then, the fault processing module is sent in error message, and carried out the analysis of next packet;
6. behind completing steps 5, the header data of each packet is analyzed, checked the clock information that whether has program.If clock information is arranged, then search the program number of this packet correspondence, obtain last clock information according to program number, from the clock information of hardware, search corresponding clock information again, calculate the spacing value and the accuracy value of PCR clock; Result of calculation is sent among the FIFO (buffer of first in first out), judged whether its spacing value and accuracy value have exceeded the scope that standard allows.If go beyond the scope, then error message is sent into the error message processing module;
7. behind completing steps 6, the PID in the packet header of each packet (Packet ID:13 bit) is taken out, according to the attribute of standard analysis bag data;
8. in step 7,, then take out the form identification code (Table ID) in the packet, carry out the analysis of different forms according to Table ID respectively if the PID of bag belongs to a kind of (PSI-SI form) in the service information table.Wherein, then carry out described step 4, and refresh code flow structure if pat table occurs;
9. in step 7, if the PID of bag belongs to the audio/video flow data, then search this audio/video data and belong to any programs, and from packet, the attribute of audio/video is taken out, put into the data structure of corresponding programme attribute;
10. in step 7, if the PID of bag does not belong to the PID of any prescribed by standard and does not belong to data flow in any program, then the packet of this PID is thought the unspecified PID of code stream, it is listed in do not specify in the PID tabulation, and the error message processing module is sent in error message;
11. in step 1, in case the bottom hardware module is activated, timing is incited somebody to action to the current hardware information data of hardware application by system, and the hardware information that obtains is sent into the hardware information analysis module, and hardware information is shown to the user.
After entering system, click " code stream record ", enter the setting before the code stream record, comprise log file path and filename, record length (by the bag number), whether carry out the setting that PID filters, PID filters of code stream, the job step that writes down code stream is:
1, file path and filename that user's input will be write down, or use file browser to select path and filename;
2, whether stream packet number that will be write down by family input (as be input as " 0 ", then recording occurring continuously manually stops up to the user) and selection carry out the code stream record filtering;
3, on user's click tools hurdle " code stream record ", the ASCII stream file ASCII name that system will write down and and recording parameters send into the bottom hardware module, and send the control command of opening entry, system's opening entry code stream to the bottom hardware module;
4, after finishing the step poly-1,2,3, if the record bag number of input was " 0 " during the user gathered in the 2nd step, then by " code stream record " on user's click tools hurdle, system sends to the bottom hardware module and stops record order, and system stops the code stream record, otherwise, when the bag that code stream records user input is counted, bottom hardware module automatic stop stream recording process;
5, if the user has selected the code stream filtration in the step poly-2, the PID that in the code stream recording setting, selects to filter by the user PID that maybe will store then;
6, in the step poly-5,, then can obtain the PID tabulation of input source by " scanning input " knob if which PID the user does not know to exist in the input source, select for the user.
After entering system, click " code stream generation ", enter the setting before code stream takes place,
Comprise that the file path of generation and effective bag that length, generation are wrapped in filename, generation code check, generation are long, the interface attributes during generation, occurrence positions, the step that code stream takes place gathers:
1, ASCII stream file ASCII path and filename that user's input will take place, or use the browser select File;
2, system core module analysis code stream file, the clock of recovery file;
3, finish every setting that code stream takes place by the user;
4, parameter takes place and sends into the bottom hardware module in the ASCII stream file ASCII name that will take place;
5, finish after the step assembles 1-4, by " code stream generations " on user's click tools hurdle, the order that system begins to take place to the transmission of bottom hardware module, system's generation code stream;
6, after the step poly-5, if " code stream generation " on user's click tools hurdle, system sends the control command that stops to take place to the bottom hardware module, and system stops to take place code stream;
Described code stream off-line analysis software, wherein, the job step of file identification program is:
1, the stream file that selection will be analyzed;
2, obtain filename and suffix thereof, and judge whether to be the transport stream suffix, if not, warn then that this stream file of user may not be analyzable transport stream;
3, search sync byte OX47, write down current location, think its be file begin side-play amount;
4, continue to look into OX47, if spacing value is write down greater than 188 in the interval of two adjacent OX47, otherwise current location is the code stream original position, continues the step poly-4;
5, repeat the step and gather 4, after obtaining 5 continuous spacing values, judge wherein whether there is legal value (whether being 188 or 204 promptly); If exist, then the value of spacing value and file header side-play amount is sent into system core core module, otherwise, then return the step poly-1 and reselect file.
Described code stream off-line analysis software, wherein, the program work of file clock recovery module goes on foot to gather and is:
1, obtain the PID of the PCR of program;
2, search the packet that contains PCR information, write down its position and PCR value;
3, search a back packet that contains PCR information, write down its position and PCR value;
4, judge whether to find 6 PCR bag, or the end of file, as not being to return 3;
5, the PCR bag number pcmum that record finds altogether;
6, from file not tail search the packet that first contains PCR information, write down its position and PCR value;
7, search the packet of the previous PCR of containing information, write down its position and PCR value;
8, find pcmum PCR bag? as not being then to return 7;
9, (the individual PCR of i<=pcmum) is with afterwards (j<=pcmum) bit number between the individual PCR and PCR clock interval go out code check with the 27MHZ clock calculation to pcmum-j to calculate forward direction i;
10, judge whether to calculate pcmum code check, as not being to return 9;
11, calculate the error between each code check, remove the code check value of apparent error, correct relatively code check value is averaged;
12, result of calculation is sent into system core module.
Described code stream off-line analysis software, wherein, the job step that audio/video is poured out modular program is:
1, obtain the pid value of audio/video flow, is PES or ES by what select that decision derives; Gather 2 if ES then continues the step, otherwise jump to the step poly-4;
2, what judge selection is audio stream or video flowing, if audio stream is then searched first audio frequency head, otherwise, then search first video sequence head, and write down its position, ignore a data of its PES and TS bag, the opening entry valid data;
3, judging whether all derives the data flow in the range of choice, if do not have, continue the step and gather 2, otherwise, then jump to and withdraw from this module;
4, in selectable scope, search the packet that the next one contains the PES head, write down the data length of PES bag;
5, ignore the data that TS wraps, the opening entry valid data are till the ED of a PES;
6, judging whether all derives the PES data in the range of choice, if do not have, continue the step and gather 4, otherwise, withdraw from out this module.After entering system program, the step of record code stream is poly-to be:
1. the user imports the file path and the filename that will write down, or uses file browser to select path and filename;
2. whether stream packet number that will be write down by user's input (as input " 0 ", then recording occurring continuously knows that the user manually stops) and selection carry out the code stream record filtering;
3. the user clicks " code stream record " button on the toolbar on the front view, and ASCII stream file ASCII name and recording parameters that system will write down are sent into the bottom hardware module, and sends the control command of opening entry, system's opening entry code stream to the bottom hardware module;
4. behind completing steps 1,2,3, if the record bag number that the user imports in the 2nd step is " 0 ", then click " code stream record " button of the toolbar of front view by the user, system sends the control command that stops to write down to the bottom hardware module, system stops the record of code stream, otherwise when the bag that records user input when code stream is counted, bottom hardware module automatic stop stream recording process.
5. if the user has selected the code stream filtration in step 2, the PID that in the code stream recording setting, selects to filter by the user PID that maybe will store then;
6. in step 5,, then can obtain the PID tabulation of input source, select for the user by " scanning input " button if which PID the user does not know to exist in the input source.The step that code stream takes place is:
1. the user imports the path and the filename of the ASCII stream file ASCII that will take place, or uses the file browser select File;
2. system core module analysis code stream file, the clock of recovery file (referring to the file clock recovery 2.2.5 in the off-line analysis);
3. finish every setting that code stream takes place by the user;
4. the ASCII stream file ASCII name that will take place, generation parameter are sent into the bottom hardware module;
5. behind the completing steps 1-4, click " code stream generation " button on the toolbar on the front view by the user, system sends the control command that begins to take place to the bottom hardware module, and system begins to take place code stream;
After step 5, if the user clicks " code stream generation " button on the toolbar on the front view, system sends the control command that stops to take place to the bottom hardware module, and system stops to take place code stream.
Advantage of the present invention is: can make full use of soft, hardware advantage separately, use flexibly.According to circumstances adjust the division of labor soft, hardware, increased the not available function of some other similar analysis products.Like this, do not increasing under the condition of cost, make this product integrate multiple analytic function, and wherein each function can realize separately, powerful, volume is little, and is easy to carry, is fit to the technical staff system is carried out on the spot measurement at any time.As analysis, measuring instrument, the software interface close friend that it provides makes things convenient for the user to use, and understands code stream information intuitively.
Description of drawings
Accompanying drawing 1 is a system configuration schematic diagram of the present invention.
Accompanying drawing 2 is hardware configuration block diagrams of the present invention.
Accompanying drawing 3 is driver flow process and hardware interface schematic diagram.
Accompanying drawing 4 is support software module and flow chart.
Accompanying drawing 5 is real-time analysis software flow patterns.
Accompanying drawing 6 is that system is provided with the module flow chart.
Accompanying drawing 7 is system core module flow charts.
Accompanying drawing 8 is pat table lattice process charts.
Accompanying drawing 9 is tabular analysis module flow charts.
Accompanying drawing 10 is off-line analysis module software flow charts.
Accompanying drawing 11 is file identification program flow diagrams.
Accompanying drawing 12 is file clock recovery program flow charts.
Accompanying drawing 13 is that audio/video is poured out the modular program flow chart.
Embodiment
Be described in detail main software of the present invention and modular character and the course of work thereof below: support software:
The main modular of support software can be referring to Fig. 4.It is that the equipment that driver is set up is conducted interviews that support software provides the mechanism of the interface of application software control and access hardware devices, and shields the detail (as register address etc.) of hardware resource.Equipment is had no progeny in producing, what at first response was interrupted is driver, but driver operates in priority higher system layer, be not suitable for carrying out a large amount of computings, so the notice support software of having no progeny in the design driven program response, be responsible for the more computings such as processing of data by the lower support software of priority.Aspect the operational order of support software response application software, for general operation, the support software invocation facility has once just been finished processing, but operates for code stream analysis and code stream, equipment will be in the state of continuous operation, and once-through operation can not reach requirement.When the design receives above-mentioned requirements at support software, generate relevant treatment progress, be responsible for the continuous operation of service equipment by support software, the processing of control data and file, and after receiving the interrupt response notice of driver, the call back function of invokes application is finished the processing of data.
The main modular of support software and flow process as shown in Figure 4, main modular comprises: control, take place the file process process, the data processing process takes place, analysis and Control, log file treatment progress, analyze data processing process, hardware parameter setting and obtain.Many independently treatment progress modules are arranged in the support program, and the effect of doing like this is to make many operations to carry out simultaneously, can't carry out and be unlikely to when a certain operation takes place other operation.As must the data of new input being cushioned when analyzing, otherwise new data will lose, and may also will carry out recorded and stored to the data that cushion simultaneously.
Control module takes place mainly be to finish relevant operation after ordering receiving, guaranteeing that needed various hardware resources take place to put in place with software resource, and the data processing and the process control of assurance generation are carried out.The file process process taking place generate by control module takes place, can correctly get required data when mainly being responsible for needing new data in the process that code stream takes place from corresponding literary composition, and offer or notify relevant driver.Take place the data processing process act in the generating process code stream that after file or other source obtain data, can not directly be used as generation the time embody, at this moment need obtained data are handled, need invokes application to carry out more deep processing sometimes.The order of the analysis code stream that analysis and Control module responds application program is sent, finish necessary hardware, software operation, guarantee that resource puts in place, make that data processing and the process control analyzed are carried out, also distribute code stream record resource needed simultaneously and generate the needed file process process of record.The log file treatment progress mainly is responsible for the bit stream data of input in buffer filtered, selects and revise, and the state of buffer is controlled, and obtains needed data and record hereof.Analysis data processing process monitors that to the full state of sky of input buffer the selection of controller buffer the code stream of input is put in order, and the call back function of invokes application is carried out more detailed analyzing and processing when needed.The hardware parameter setting provides an interface that hardware is controlled with obtaining.According to different operation requirement or functional requirements, often need to change hardware setting, this interface can be provided with relevant hardware, so that hardware can be operated according to the requirement of using.Application program also need be known the state that hardware is current through regular meeting, and with the working condition of differentiating hardware and the characteristic of obtaining external signal etc., this interface is also according to requiring to obtain corresponding information, and the groundwork step of each module is seen before and stated summary of the invention.Application software:
Application software is translated into corresponding order in the auxiliary process user down input of operating system, to the work by the support software control hardware after the command interpretation and obtain data.After obtaining bit stream data, it is analyzed, adds up, press customer requirements and show the structure of code stream, the shake of PCR, the information of program, the explanation of code stream parameter etc. according to relevant standard.
See also the code stream analysis of PCMCIA MPEG shown in the accompanying drawing 5, generation, recorder software flow pattern: real-time analysis, generation, recording section: system connects----before starting analytical system, the code stream source is connected to the input interface (referring to " system block diagram ") of analytical system.
Application software initiated, operation application software " MPEG code stream real-time analyzer ", program at first obtains the control authority of system by the bottom hardware module, and start-up routine view is then created the display page of each function." toolbar and menu bar " in Fig. 5, " tree framework ", " real-time analysis framework ", " pcr analysis framework ", " program analytical framework ", " tabular analysis framework ", " Buffer analytical framework ", " hardware information framework " are respectively the view framework of each function.
System is provided with module, if the user needs each monitoring project is carried out certain setting (so that analyzing by user's oneself requirement) before using system in the system monitoring process, click the button of " parameter is set " in the toolbar in the front view, " system is provided with module " will be called by system.The flow process of " system is provided with module " such as Fig. 6, its job step see before and state summary of the invention.The generation of code stream, record:
Opening entry, after the user entered system program, the view page or leaf mark of clicking " code stream record " in the front view entered the preceding setting of code stream record.The project of setting comprises: the path of log file and filename, record length (by the bag number), whether carry out the setting that PID filters, PID filters of code stream.The step of record code stream is summary of the invention as the aforementioned.
Begin to take place, after the user entered system program, the view page or leaf mark of clicking " code stream generation " in the front view entered code stream preceding setting takes place.The project of setting comprises: effective bag of the file path of generation and filename, generation code check, generation bag length, generation is long, the interface attributes during generation, and occurrence positions, the step that code stream takes place is summary of the invention as described above.System core module:
System core module is the core of whole analytical system, and its major function is to finish every analysis and system's control of bit stream data.This module receives by the bit stream data of bottom hardware module (when bottom hardware takes place to interrupt, receiving data), and data are classified according to the standard of DVB (or ATSC); Then the data of classification being sent into different processing sub handles; The result that will finish dealing with sends into each page demonstration of main window framework at last.
In order to reach higher real-time performance, system core module adopts the data qualification processing mode, this mode also is the data pattern (Transport Stream) that meets mpeg transport stream---the data of mpeg transport stream are transmitted with the data of packing, each different audio/videos stream and the data flow that is used for controlling with other services all are present in code stream simultaneously with the speed of oneself, it does not have certain rule in proper order, and they just distinguish with the identification code (PID) of each packet.
In the analysis of transport stream, accurate real-time clock is the key of analyzing.But, the requirement of adopting computer-internal clock (clock on BIOS or the pci bus) its precision and stability not to reach prescribed by standard far away.(what adopt in hardware is high accuracy constant temperature crystal, and its precision is higher than 10 so the real-time clock in this system adopts hardware clock to come the internal clocking of replacement computer -7).Clock relevant portion in nucleus module all adopts this clock signal.And in the bottom hardware module, not only to provide the information of this clock, also to finish the extraction and the analysis of code stream clock information, could guarantee the correctness of real-time analysis like this, can not handle more senior analysis thereby reserve more time because of the processing time of computer too much system that takies when handling highly accurate and real-time data yet.The code flow structure analysis module:
This module be the foundation of whole code stream analysis, only after the analysis of finishing code flow structure, could analyze in more detail sundry item.Code flow structure also is the most normal analysis result that will obtain of mpeg transport stream analysis (even only need analysis code flow structure in some occasion).
Because native system is supported DVB (European standard) and ATSC (Unite States Standard) simultaneously, and there is very big difference in many aspects in their code flow structure.Therefore in analytic process, need code stream is discerned.Generally, the sign of some ATSC standards is arranged in mpeg transport stream, whether what can determine certain transport stream employing when there are these signs in system discovery is the ATSC standard.But also have a lot of transport stream not have such sign, also similar sign not in the DVB standard simultaneously is so adopt automatically in the code stream identification of native system is handled and the mode that manually combines is determined the type of code stream.
In the code flow structure analytic process, can be intuitively and understand the structure of whole code stream and the relation between each data flow clearly for making the user, system adopts the mode of tree type to represent a code flow structure.Yet in other like product, adopt tree can't reach the requirement (the continuous variation of tree can produce the result who glimpses) of real-time.The tree that native system adopts uses the tree mode of simplifying, and the obsolete function of user is removed.Adopting when showing tree does not have the display mode that dodges.The reference clock analysis module:
The reference clock analysis is that the whole system real-time requires the highest module, and the relation of he and bottom hardware module is the closest.This module adopts on display mode does not dynamically have the graphical demonstration of dodging, and can give user's information the most intuitively.Two important analysis parts are arranged in this analysis module---reference clock (back claims PCR) precision analysis and reference clock compartment analysis.The PCR precision analysis is the error when analyzing each clock signal of every programs in the code stream and coming, each clock information in code stream is with the frequency counting of 27MHz, the hardware of native system is also counted same clock at the same time, in order to obtain the clock jitter situation of code stream in various transmission channels.Frequency to the PCR timing point in the mpeg transport stream standard also has regulation, and can cause the error of code stream time precision long blanking time.The PCR compartment analysis of native system can show PCR actual conditions at interval with graphics mode.
At two kinds of analysis parts, system has all used represented as histograms that clock jitter is provided and at interval at the ratio of whole time domain appearance, has provided the degree of PCR clocking error.The error message processing module:
The error message processing module is the module that runs through whole system.Produce various alert messages by him.As the standard set analytical equipment, the most important thing is to detect whether conformance with standard of analyzed data, and when data make a mistake, the user is sounded a warning, to solve the problem that takes place, guarantee the quality of broadcasting.Native system detects in strict accordance with the standard (mpeg transport stream testing standard) of ETR290.Therefore each analysis link in system all has and the mutual interface of error message processing module, and the error message processing module itself has set-up mode in detail flexibly.The mode that can self-defined warning under user's control and the content of monitoring, not exclusively the data flow of symbol and standard can autotelic analysis part mistake to some, and can not obscured by a large amount of unconcerned mistake.
The error message processing module provides trigger condition for the erroneous trigger storage simultaneously.Therefore, error message is flexibly handled and has also been guaranteed to trigger flexibly simultaneously storage mode.The tabular analysis module:
In the process that mpeg transport stream is analyzed, the analysis of form data (information on services) is the most key.The overall structure of code stream and the service function of various numerous and complicated are all controlled by form data.Under the environment of high code check, it is very difficult extracting corresponding form data and show from code stream, because the data processing complex of information on services, data volume are big.And the form data processing module in the native system can be analyzed the various information on services forms of demonstration in real time.This framework for digital television system provides good instrument.
Can finish real-time form data processing capacity mainly is because adopted the data qualification mode in system core module.Promising each form is handled and the data structure of definition and modular processing method flexibly in the system.Its processing procedure as shown in Figure 9.Code stream generation processing module:
The code stream generation function of native system realizes by code stream generation processing module.This module comprises: control four parts take place and form in the structural analysis of file, file clock recovery, the control of the code stream way of output and built-in debugging code stream.
Document structure analysis adopts the subclass of the file identification module of off-line analysis, is used to judge whether file can be occurred to hardware port as code stream by hardware.Equally, the file clock recovery module in the off-line analysis is also adopted in the file clock recovery, is used for the generation rate of determining that file should use when taking place.
Code stream way of output control section can be divided into again: parts such as output format control, output format adjustment, insertion test pack information.The data of output format control setting output code flow and hardware interface form are with the needs (this function also is not have in the same category of device) that adapt to different rear end equipment.The output format adjustment is the adjustment of the code stream of input source being carried out certain format and clock, makes its complete conformance with standard.Exclusive PCR adjustment technology and code stream loop play technology are adopted in code stream clock adjustment wherein, and they can make code stream the most original approaching transmission state when taking place.Inserting the test pack message part is the test pack analysis part that cooperates the real-time analysis module, and he can produce a pseudo random sequence by the bottom hardware module, in order to test the error of transmission probability of equally distributed data flow on channel.
Control takes place built-in debugging code stream also is one of exclusive functional module of native system.Can produce the data flow of some regular textures by him, in order to detect rear end equipment in some data-handling capacity in particular cases.(as: code stream that produces a parlor continuous counter can be used for detecting rear end equipment and whether can produce situation of loss of data or the like).The code stream record processing module:
The processing of code stream record is relatively simple, and its major function is to finish (because the speed bottle-neck of recording medium only may adopt hardware mode to finish) by hardware.This functional module can provide to be handled the data filter in input code flow source, and the unconcerned data of user are filtered.Therefore before the record code stream, the subclass that functional packet contains real-time code flow structure analysis module is set.Produce the allowed band that the user is provided with by simple analysis, carry out detailed filtration setting by the user again input code flow.The hardware information analysis module:
Hardware information is the exclusive functional module of native system.When the mpeg transport stream system architecture; run into the connection (or line quality problem) of line errors etc. through regular meeting; but can't distinguish on its form of expression and between the plant issue, therefore can be at too much time of waste on the unnecessary link (always at first suspecting the problem of hardware device when going wrong usually).The hardware information analysis is exactly at this situation and independent analysis module.He adopts port to separate, and the discrete pattern of level is shown to the user with the RST on the hardware circuit.Make the user can find the problem of system aspect circuit rapidly, accelerate the speed of system constructing.
The hardware information module itself is the interactive module of systems soft ware and bottom hardware.Because the state of hardware circuit can only be obtained by bottom hardware,, the hardware information processing is shown to the user so being actually the real-time hardware circuit information that bottom hardware is obtained.The off-line analysis module frame is off-line analysis module software flow chart as shown in Figure 10.Off-line analysis module workflow:
Application software initiated, operation application software " MPEG code stream off-line analysis system ", program at first obtains the control authority of system by the bottom hardware module, and start-up routine view is then created the display page of each function." toolbar and menu bar " in Figure 10, " tree framework ", " analysis-by-synthesis framework ", " pcr analysis framework ", " program analytical framework ", " tabular analysis framework ", " video analysis framework ", " error analysis framework " are respectively the view framework of each function.
Open the stream file that will analyze, " opening file " of (or the respective selection in the menu bar) item in toolbar, system shows a FileDialog, need to be selected the stream file of analysis by the user.Certain filtration is carried out in demonstration to each path file in FileDialog, shows the file of stream file type that may be analyzed.
File type identification, system sends into file pointer the file identification module earlier and carries out finer file type judgement, its identification process such as accompanying drawing 11.
The file identification module is searched the sync byte of transport stream and the side-play amount (issuable mistake when considering the user at the memory code stream file) of file beginning at the file the beginning part.But owing to may have 0 * 47 many byte (being not to be the sync byte of bag) in the bit stream data, so the beginning side-play amount of sync byte that finds at the beginning in the file identification module and code stream is not necessarily correct.Therefore, in the file identification module, adopt the method for searching 5 times backward further to determine the code stream original position.If synchronous again initial above step is all failed when searching at every turn, judge that then code stream is non-transport stream.
Code flow structure is analyzed, the start-up system nucleus module, and this moment, the code stream input interface of system core module was not the bottom hardware module, but by the interface of file read module.
File clock recovery, system core module obtain the structure of code stream, learn the stream of the PCR clock existence of every programs.Begin from code stream then, calculate the clock of every programs, its flow process as shown in Figure 12.
The extraction and the multidata tolerance algorithm of file head and the tail time tag adopted in the calculating of file code check, promptly is to extract several clock informations at top of file, extracts the clock information of same quantity at tail of file, gets the corresponding clock information of head and the tail then and carries out computing.Such algorithm almost comprises the length of whole file, and the error of each result of calculation is all little, more a plurality of result of calculations is averaged, and error further is diffused among each result, further reduces error.Therefore, when file was relatively large, the error of calculation was less relatively.The local module of selecting of file:
When file is analyzed, because its Data Source is different with real-time analysis, data are to obtain from file, and the user may analyze (as: 1 hour code stream of file record itself at the arbitrary portion of file, the user is concerned about the data that it is last 1 minute, system just provides analysis result after can not allowing the user wait for 59 minutes), display result (file comparatively big time will spend long time) just after also the analysis of whole file can not being finished during the network analysis file.Therefore, native system adopts the method for partial analysis to the analysis of file.Operate one " subrange selection control " by the user and come the analyst coverage of appointing system file.And system core module also is that control is controlled thus to the location of file at this moment.(system default analysis package number is<=100000, and the user can select: the overall budget of 1-file several, when file was big, analysis time was longer).Audio/video is poured out module:
After finishing above each step, the user can check the result of system to file analysis by different view frameworks.When the user need further analyze or when using other playout softwares to check programme content a certain independent audio/video stream in the code stream, user's " audio/video is poured out " function in can using system extracts data from ASCII stream file ASCII, save as independent file.In the tree that shows code flow structure, with the audio/video subitem of clicking selection by mouse right button, system ejects " audio/video is poured out " menu.The file format that selection will be poured out (PES stream or ES stream).System core module is called " audio/video is poured out module ".The operational process of this module is as shown in Figure 13:
When audio/video data is poured out ES stream, in order to allow other software or instrument be familiar with this document (the code stream type is judged with the initial data of file header by common broadcast or software for editing), module starts the header of searching audio/video earlier at audio/video stream, just begins to handle later data after finding.The characteristic of off-line analysis main modular and the course of work:
System core module, this module adopts same module with real-time analysis neutralized system nucleus module.
The file identification module, the main operation of off-line analysis is the operation at file, and the form of data file can be multiple (comprising: transport stream-TS, program stream-PS, program element stream-PES or ES etc.), so the identification of file format is the basis of off-line analysis.
The file identification module of off-line analysis not only will identify the type of ASCII stream file ASCII, and to check the mistake that the user produces in the file storage process (such as: file header location mistake etc.).Most of software is only judged file type and can't be discerned vicious file by the information of file header when file identification.In fact the file identification module of native system has certain Intelligent Recognition function.
The mode that the file identification module adopts multiple recognition mode to combine reaches the function of Intelligent Recognition.Utilize the data characteristic of different-format, with different levels fuzzy Judgment.
The file data statistical module in off-line analysis, because data are from file, obtains each data in the code stream so the user can be detailed.File data display part in the file data statistical module, native system does not adopt simple data display mode, but the data qualification function of coupling system nucleus module is separated the important information in the data, show with different colors, and pointed out, allow the user can clearly understand the meaning of each the member's representative in the data.This display mode is not only directly perceived, and easy to operate, and the interface is clear.
The file clock recovery module carries out another unique analysis module that the analysis of code stream reference clock is a native system to file.In the file analysis of static state, can not adopt the real-time clock of hardware to analyze data in time-related characteristic.And native system extracts clock information to whole ASCII stream file ASCII in advance when the analysis code stream file, passes through fault-tolerant (minimizing cumulative errors) algorithm repeatedly again, can obtain relatively accurate file original clock.The accuracy assurance of file clock recovery has also guaranteed the correctness that the reference clock of static code stream is analyzed.
The derivation module of audio/video data, the derivation module of audio/video data is in fact finished is conversion work between the various ASCII stream file ASCIIs.By the function of this module, the part in file or the file is converted to another kind of form, to be used for carrying out other deeper analyses (or playback of audio/video).

Claims (10)

1, a kind of PCMCIA MPEG code stream takes place, analyze, recording method and equipment, comprise hardware and software, hardware is made instrument, it is characterized in that: hardware comprises code stream input control and treatment facility, pcmcia interface hardware, software adopts independently three software levels: application software, support software and driver, driver is finished and hardware controls and operating system related work, support software is used for the contact application software and driver, the shielding hardware details, for application software provides data, the analysis process management, the interface function of access hardware is provided, carry out data preparation, application software is finished the processing of user's input, by customer requirements the data that obtain is analyzed, statistics, show.
2, by the generation of the described PCMCIA MPEG of claim 1 code stream, analysis, recording method and equipment, it is characterized in that: described hardware includes module, the clock information logging modle, input is analyzed and control module, input-buffer and control module, output buffers and control module, output is handled and control module, output module, clock processing and control module, PCI status control module, register and control module, the Data Transmission Controlling module, the interruption controls module, Computer Interface Module, energy supply control module, initialization and programming module, wherein:
Input module; Finish the conversion of input signal format, interface circuit is finished signal coupling and shaping, adopts an ASIC to finish bit clock and recovers, and line decoding and 10 bits/8 bits switch convert thereof into parallel signal.
The clock information module; Monitor and record PCR clock value that the temporal information register is deposited above-mentioned temporal information, and carries generation by computer interface in due course and carry out analyzing and processing to software.
Input is analyzed and control module; The parameter and the operation of control input chip receive the data of coming in from input module, according to control signal wherein code stream are analyzed, and are write data to input buffer.
Input buffering and control module; Data are carried out buffer memory, check the full level of buffer, provide corresponding indicating signals.The indication of binding data transmission control section is passed to software with the input code flow data through pcmcia interface and is analyzed and handle again.
Output buffering and control module; Dateout is carried out buffer memory, check the full level of buffer, provide corresponding indicating signals.The indication of binding data transmission control section obtains the output code flow data through pcmcia interface from software again.
Output is handled and control module; The parameter and the operation of control pio chip are fetched data from buffer and are issued pio chip.
Output module; Finish the conversion of output signal form.Adopt an ASIC to do the coding of bit stream data to the ASI signal, the serial signal of output 270M is finished the driving of ASI signal and the output etc. that is coupled.
Clock is handled and control module; The generation of reference clock and shaping, the system clock of generation 27M carries out frequency synthesis with the 108M clock, generates the code stream of various different code checks.
The PCI status control module; Finish PCI standard in the pcmcia interface, realize function and the control of PCI, comprise the control of selection, data transmission procedure and state of explanation, address and data of control, the order in pci interface space.
Register and control module; Comprise address resolution, reading and writing data, initialization, parameter control to other module.
The Data Transmission Controlling module; Judge and initiation data PCI transmission course, control corresponding PCI hardware and carry out correct address date selection, select correct buffer and find corresponding address.
The interruption controls module; According to the parameter of the number of times of input transfer of data and dateout transmission and relevant control register, finish generation interruption after certain transfer of data.
Computer Interface Module; Finish direct-connected buffering with computer.
Energy supply control module; Change out other DC power supply that various chips require from the single power supply of PCMCIA.
Initialization and programming module; When powering on the needed relevant configuration information of FPGA is loaded in the configuration space of FPGA, makes FPGA can realize desired function.
3. by the generation of the described PCMCIA MPEG of claim 1 code stream, analysis, recording method and equipment, it is characterized in that: described driver matches with operating system and finishes hardware initialization, equipment is set up, the distribution of interruption, input/output port and each resource of buffer, make hardware become the addressable equipment of operating system, and to support program and application program as seen, operating system is after finding hardware and beginning to start driver, and job step is:
1. at first be that hardware is carried out initialization, Resources allocation and finish system's control structure.
2. next be the distribution of carrying out buffer, divide to be used in the buffer of analyzing and taking place.
3. after this resident part of driver is waited for the order that support program is sent.
4. the back that receives orders makes an explanation to it, and resolves into access hardware is operated.
5. require hardware to be conducted interviews according to the accessing operation that decomposites by pcmcia interface.
After initialization is finished, driver is also resident another part, i.e. interrupt response program:
1. receive that interrupt response activates corresponding interrupt response program.
2. share interruption because the PCI standard adopts, at first need to judge the source of interruption.
3. if the interruption that the equipment here produces, then check the state of buffer.
4. if buffer has obtained data or needed new data, then the state of buffer is adjusted.
6. send the request that buffer need be handled to support software then, handle the data that obtain or new data is provided by support program.
4. by the generation of the described PCMCIA MPEG of claim 1 code stream, analysis, recording method and equipment, it is characterized in that: described support software comprises generation control module, generation file process process module, data processing process module, analysis and Control module, log file treatment progress module take place, analyzes data processing process module, hardware parameter setting and acquisition module, and each module job step is as follows:
Control program takes place:
1. soft, the hardware parameter of initialization is for the operation that code stream takes place is prepared.
2. the buffer of usefulness takes place in distribution, and code stream takes place needs bigger buffer to guarantee the continuous of code stream.
3. set the parameter of hardware, begin to take place the hardware action of code stream.
4. generate the process that file process takes place, it will be obtained from file on request needed initial data will take place.
5. generate the process that data processing takes place, it will be handled the data that obtain from file, guarantee that last sent code stream meets user's needs.The file process process takes place:
1. the file to the output code flow data carries out initialization, obtains the information of file, and opens file.
2. initialization files are handled buffer, and the speed of file read-write can not cooperate fully with the speed that code stream is handled, so need the file process buffer here.
3. after this enter the practical operation circulation, wait for the request of reading file from driver.
4. after receiving the request of reading file, at first check buffer, confirm that the state of buffer is correct.
5. begin file operation then, data are read from file in the file process buffer.
6. revise buffer state after running through data, notify other program can use this buffer.The data processing process takes place:
1. process begins the data processing request of back wait from driver.
2. at first buffer is put in order, data are moved to the data processing buffer, change the state of file process buffer and data processing buffer then from the file process buffer.
3. send the request of reading file when needing to fill the file process buffer.
4. the invokes application call back function is handled in the time of need further handling modification to obtained bit stream data.
5. the bit stream data of handling well is offered driver, the code stream in this buffer will pass in the hardware by hardware interface in driver and send.Analysis and Control:
1. soft, the hardware parameter of initialization is for the input-buffer and the analysis operation of code stream are prepared.
2. distribute the buffer of analyzing usefulness, analyzing code stream needs bigger buffer with the sliding analytic process of buffer code levelling.
3. set the parameter of hardware, begin to analyze the hardware action of code stream.
4. generate the process that log file is handled, it will record needed bit stream data in the file on request.
5. generate the process of analyzing data processing, it will be handled the data that obtain from input buffer, and call the application call back function and carry out the detail analysis processing.The log file treatment progress:
1. the file to the record code flow data carries out initialization, obtains the information of file, and opens file.
2. initialization files are handled buffer, and the speed of file read-write can not cooperate fully with the speed that code stream is handled, so need the file process buffer here.
3. after this enter the practical operation circulation, wait for request from the log file of driver.
4. after receiving the request of log file, at first check buffer, confirm that the state of buffer is correct.
5. begin file operation then, data are write in the file from the file process buffer.
6. revise buffer state after having write data, notify other program can use this buffer.Analyze the data processing process:
1. process begins the data processing request of back wait from driver.
2. at first buffer is put in order, data are moved to the file process buffer, change the state of file process buffer and data processing buffer then from the data processing buffer.
3. need be with the request of sending written document during data record in the file process buffer.
4. need be to the further analyzing and processing of bit stream data, the invokes application call back function is handled.
5. put buffer at last in order, the buffer of handling is cleaned out, be used for the buffering of new data.The hardware parameter setting is obtained:
1. the function and the requirement of at first application being called analyzed.
2. calculate relevant parameter according to required function.
3. select the register relevant with requiring function.
4. according to the analog value of the property calculation register of parameter and related register.
5. open equipment, prepare to carry out hardware operation.
6. call driver is carried out the read-write of register.
7. return the register value that reads.
8 information parameter values according to the understanding of register value calculating needs.
5, by the described PACMIA MPEG of claim 1 code stream analysis, take place, recording method and equipment, it is characterized in that: described application software comprises the real-time analysis of MPEG code stream, logging software and MPEG code stream off-line analysis software, wherein MPEG code stream real-time analysis, logging software at first obtains system's control by the bottom hardware module, start-up routine view then, create each function pages, the program view framework comprises toolbar and menu bar, the tree framework, the real-time analysis framework, the pcr analysis framework, the program analytical framework, the tabular analysis framework, the Buffer analytical framework, the hardware analysis framework, code stream generation framework, code stream record framework; Wherein system is provided with the job step of modular program and is:
(1). system is provided with module after startup, creates that at first dialog box being set;
(2). the Set For Current parameter of reading system also shows;
(3). the user can be provided with at each and select to meet the option (also can just check, not elect) that oneself requires on button;
(4). after finishing (3) step, the user selects whether to agree existing parameter setting, if disagree with then inquire the parameter setting that whether logs off, if do not withdraw from then return step (3), otherwise withdraws from setting;
(5) if. in step (4), select to agree existing parameter setting, parameter input system nucleus module then will be set, and the setting that logs off.
MPEG code stream off-line analysis software, at first obtain system's control by the bottom hardware module, start-up routine view then, create each function pages, the program view framework comprises toolbar and menu bar, tree framework, analysis-by-synthesis framework, pcr analysis framework, program analytical framework, tabular analysis framework, video analysis framework.
6, by the generation of the described PACMIA MPEG of claim 5 code stream, analysis, recording method and equipment, it is characterized in that: calling system nucleus module when entering real-time analysis, its job step is:
1. start-up system nucleus module begins to wait for the interrupt call of bottom hardware module;
2. start the bottom hardware module, bottom hardware module catch code flow data from input signal cable is packed into the buffer 1 of Installed System Memory, after the data in the buffer 1 are filled up, produce system break, interrupt response function in the calling system nucleus module, and the address of buffer, the size and the hardware clock of buffer passed to the interrupt response function.After finishing above step, the bottom hardware module continues to catch bit stream data, and be packed in the Installed System Memory buffer 2, after the data of buffer 2 are filled up, produce system break, the interrupt response function of calling system nucleus module, repeating step 2 send the control command that stops to analyze up to analytical system;
3. system core module is after the interrupt call of receiving the bottom hardware module, the outage response function.The interrupt response function obtains the internal memory pointer of bit stream data, the size of bit stream data piece and the clock information of system hardware.It is long that at first the size by bit stream data is calculated the bag of the bag number of bit stream data and each packet; Respectively each packet is analyzed by the bag number;
4. many special information on services forms are arranged in the transport stream of MPEG, and they are distributed in the data flow with the form of bag data.(the Program associationtable: Program Association Table) be the crucial form that produces whole code flow structure of pat table lattice wherein.In step 3,, enter pat table case analysis process at once in case the packet of pat table occurs.
5. in step 3, whether first byte of each packet being analyzed the preceding packet of inspection earlier is sync byte 0 * 47.If not, show that error in data may appear in this packet or data are not synchronous.The fault processing module is sent in error message, and carried out the analysis of next packet; After above step is finished, check the highest order (error of transmission flag bit) of second byte in the packet, if " 1 " is then represented to have the error of transmission that can't correct in the packet, the fault processing module is sent in error message, and carried out the analysis of next packet; After above step is finished, whether back 4 (bag continuous counter positions) checking the 4th byte in the packet are continuous counter+1 (0 * f+1=0) of a last identical PID bag, if not, in code stream loss of data or repetition may appear then, the fault processing module is sent in error message, and carried out the analysis of next packet;
6. behind completing steps 5, the header data of each packet is analyzed, checked the clock information that whether has program.If clock information is arranged, then search the program number of this packet correspondence, obtain last clock information according to program number, from the clock information of hardware, search corresponding clock information again, calculate the spacing value and the accuracy value of PCR clock; Result of calculation is sent among the FIFO (buffer of first in first out), judged whether its spacing value and accuracy value have exceeded the scope that standard allows.If go beyond the scope, then error message is sent into the error message processing module;
7. behind completing steps 6, the PID in the packet header of each packet (Packet ID:13 bit) is taken out, according to the attribute of standard analysis bag data;
8. in step 7,, then take out the form identification code (Table ID) in the packet, carry out the analysis of different forms according to Table ID respectively if the PID of bag belongs to a kind of (PSI-SI form) in the service information table.Wherein, then carry out described step 4, and refresh code flow structure if pat table occurs;
9. in step 7, if the PID of bag belongs to the audio/video flow data, then search this audio/video data and belong to any programs, and from packet, the attribute of audio/video is taken out, put into the data structure of corresponding programme attribute;
10. in step 7, if the PID of bag does not belong to the PID of any prescribed by standard and does not belong to data flow in any program, then the packet of this PID is thought the unspecified PID of code stream, it is listed in do not specify in the PID tabulation, and the error message processing module is sent in error message;
11. in step 1, in case the bottom hardware module is activated, timing is incited somebody to action to the current hardware information data of hardware application by system, and the hardware information that obtains is sent into the hardware information analysis module, and hardware information is shown to the user.
7, by the generation of the described PCMCIA MPEG of claim 5 code stream, analysis, recording method and equipment, it is characterized in that: enter that the job step of record code stream is after the system:
1, file path and filename that user's input will be write down;
2, whether stream packet number and selection that user's input will be write down carry out the code stream record filtering;
3, open " code stream record ", the ASCII stream file ASCII name that system will write down and and recording parameters send into the bottom hardware module, and send the control command of opening entry, system's opening entry code stream to the bottom hardware module;
4, after finishing the step poly-1,2,3, if the record bag number that the user imported in poly-in the 2nd step is " 0 ", system sends to the bottom hardware module and stops record order, and system stops the code stream record, otherwise, when the bag that code stream records user input is counted, bottom hardware module automatic stop stream recording process;
5, if the user has selected the code stream filtration in the step poly-2, the PID that in the code stream recording setting, selects to filter by the user PID that maybe will store then;
6, in the step poly-5,, then can obtain the PID tabulation of input source by " scanning input " knob if which PID the user does not know to exist in the input source, select for the user.
After entering system, the step that code stream takes place is poly-to be:
1, ASCII stream file ASCII path and filename that the family input will take place;
2, system core module analysis code stream file, the clock of recovery file;
3, the user finishes every setting that code stream takes place;
4, parameter takes place and sends into the bottom hardware module in the ASCII stream file ASCII name that take place;
5, the one-tenth step is opened " code stream generation " after assembling 1-4, and system sends the order that begins to take place, system's generation code stream to the bottom hardware module;
7, after the step poly-5, system sends the control command that stops to take place to the bottom hardware module, and system stops to take place code stream;
8, by the generation of the described PCMCIA MPEG of claim 5 code stream, analysis, recording method and equipment, it is characterized in that: described code stream off-line analysis software, wherein the job step of file identification program is:
1, the stream file that selection will be analyzed;
2, obtain filename and suffix thereof, and judge whether to be the transport stream suffix, if not, warn then that this stream file of user may not be analyzable transport stream;
3, search sync byte OX47, write down current location, think its be file begin side-play amount;
4, continue to look into OX47, if spacing value is write down greater than 188 in the interval of two adjacent OX47, otherwise current location is the code stream original position, continues the step poly-4;
5, repeat the step and gather 4, after obtaining 5 continuous spacing values, judge wherein whether there is legal value (whether being 188 or 204 promptly); If exist, then the value of spacing value and file header side-play amount is sent into system core core module, otherwise, then return the step poly-1 and reselect file.
9, by claim 5 described PCMCIA MPEG code stream analyzing method and equipment, it is characterized in that: described code stream off-line analysis software, wherein, the program work of file clock recovery module goes on foot to gather and is:
1, obtain the PID of the PCR of program;
2, look for the packet that contains PCR information, write down its position and PCR value;
3, search a back packet that contains PCR information, write down its position and PCR value;
4, judge whether to find 6 PCR bag, or the end of file, as not being to return 3;
5, the PCR bag number pcmum that record finds altogether;
6, from file not tail search the packet that first contains PCR information, write down its position and PCR value;
7, search the packet of the previous PCR of containing information, write down its position and PCR value;
8, find pcmum PCR bag? as not being then to return 7;
9, (the individual PCR of i<=pcmum) is with afterwards (j<=pcmum) bit number between the individual PCR and PCR clock interval go out code check with the 27MHZ clock calculation to pcmum-j to calculate forward direction i;
10, judge whether to calculate pcmum code check, as not being to return 9;
11, calculate the error between each code check, remove the code check value of apparent error, correct relatively code check value is averaged;
12, result of calculation is sent into system core module.
10, by claim 5 described PCMCIA MPEG code stream analyzing method and equipment, it is characterized in that: described code stream off-line analysis software, wherein, the job step that audio/video is poured out modular program is:
1, obtain the pid value of audio/video flow, is PES or ES by what select that decision derives; Gather 2 if ES then continues the step, otherwise jump to the step poly-4;
2, what break selection is audio stream or video flowing, if audio stream is then searched first audio frequency head, otherwise, then search first video sequence head, and write down its position, ignore a data of its PES and TS bag, the opening entry valid data;
3, judging whether all derives the data flow in the range of choice, if do not have, continue the step and gather 2, otherwise, then jump to and withdraw from this module;
4, in selectable scope, search the packet that the next one contains the PES head, write down the data length of PES bag;
5, ignore the data that TS wraps, the opening entry valid data are till the ED of a PES;
6, judging whether all derives the PES data in the range of choice, if do not have, continue the step and gather 4, otherwise, withdraw from out this module.
CNB021115419A 2002-04-28 2002-04-28 PCMCIA MPEG code stream generating, analyzing and recording method and equipment Expired - Fee Related CN1194541C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB021115419A CN1194541C (en) 2002-04-28 2002-04-28 PCMCIA MPEG code stream generating, analyzing and recording method and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB021115419A CN1194541C (en) 2002-04-28 2002-04-28 PCMCIA MPEG code stream generating, analyzing and recording method and equipment

Publications (2)

Publication Number Publication Date
CN1375993A true CN1375993A (en) 2002-10-23
CN1194541C CN1194541C (en) 2005-03-23

Family

ID=4741621

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB021115419A Expired - Fee Related CN1194541C (en) 2002-04-28 2002-04-28 PCMCIA MPEG code stream generating, analyzing and recording method and equipment

Country Status (1)

Country Link
CN (1) CN1194541C (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102421005A (en) * 2011-11-22 2012-04-18 广州中大电讯科技有限公司 Embedded type based code stream analysis system
CN102708832A (en) * 2012-06-26 2012-10-03 上海华兴数字科技有限公司 Liquid crystal graph display controller and implementation method
CN103220549A (en) * 2013-05-16 2013-07-24 北京大学 Video generator and system
CN106454293A (en) * 2016-10-13 2017-02-22 昆明鑫銮科技有限公司 Projector debugging method
CN115174442A (en) * 2022-06-24 2022-10-11 硕橙(厦门)科技有限公司 Multi-mode process data transmission method and device

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102421005A (en) * 2011-11-22 2012-04-18 广州中大电讯科技有限公司 Embedded type based code stream analysis system
CN102708832A (en) * 2012-06-26 2012-10-03 上海华兴数字科技有限公司 Liquid crystal graph display controller and implementation method
CN102708832B (en) * 2012-06-26 2014-09-17 上海华兴数字科技有限公司 Liquid crystal graph display controller and implementation method
CN103220549A (en) * 2013-05-16 2013-07-24 北京大学 Video generator and system
CN106454293A (en) * 2016-10-13 2017-02-22 昆明鑫銮科技有限公司 Projector debugging method
CN115174442A (en) * 2022-06-24 2022-10-11 硕橙(厦门)科技有限公司 Multi-mode process data transmission method and device
CN115174442B (en) * 2022-06-24 2024-04-05 硕橙(厦门)科技有限公司 Multi-mode process data transmission method and device

Also Published As

Publication number Publication date
CN1194541C (en) 2005-03-23

Similar Documents

Publication Publication Date Title
CN1302660C (en) Editing system and control method thereof
CN1241118C (en) System and method for realizing automatic on/off test of computer
CN1278560C (en) Video data Sending/receiving method and video monitoring system
CN1203383C (en) Automatic measuring apapratus, automatic measurement data processing and control apparatus, network system and record medium of automatic measurement processing and control program
CN1264336C (en) Image processor and image processing method
CN1327655A (en) Data distribution method and apparatus, and data reception method and apparatus
CN1680959A (en) Process editing apparatus and method and process management apparatus and method
CN1858786A (en) Electronic file formatting annotate and comment system and method
CN1489765A (en) Innformation recording apparatus and method
CN1460940A (en) Content using method and system, servicer and electronic equipment for said system
CN1512390A (en) Fault predicting system and program and method and device, printer and management server
CN101069181A (en) Storage device and recording medium
CN1885273A (en) Function coverage ratio analysis method for logic test
CN1551212A (en) Information processing device and method
CN1817038A (en) Contents storage system, home server apparatus, information supply apparatus, integrated circuit, and program
CN1194541C (en) PCMCIA MPEG code stream generating, analyzing and recording method and equipment
CN1229728C (en) WEB application system having management/distributed management function and mechanism for operating the same
CN1790957A (en) Apparatus testing method
CN101075233A (en) Member, system and method for collecting multi-medium content
CN101047555A (en) Detection method for quality of equipment
CN1673977A (en) Recording-and-reproducing apparatus, information transfer-and-management method, and recording medium
CN1968376A (en) Chinese EPG making method and system
CN100345116C (en) Program automatic converting method and program automatic converting device
CN1376959A (en) PCMCIA MPEG code stream analyzing method and equipment
CN1220373C (en) Editing device, reproducing device and storage medium

Legal Events

Date Code Title Description
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
ASS Succession or assignment of patent right

Owner name: SHANGHAI WENGUANG TECHNOLOGY DEVELOPMENT CO., LTD

Free format text: FORMER OWNER: SHANGHAI CITY INST. OF BROADCAST SCIENCE

Owner name: SHANGHAI CITY INST. OF BROADCAST SCIENCE

Effective date: 20050916

C41 Transfer of patent application or patent right or utility model
TR01 Transfer of patent right

Effective date of registration: 20050916

Address after: 200041 Kangding Road, Shanghai City No. 211 Arts Building 19 floor

Co-patentee after: Shanghai City Inst. of Broadcast Science

Patentee after: Shanghai Wenguang Technology Development Co., Ltd.

Address before: 200041 No. 647, Lane 15, Weihai Road, Shanghai

Patentee before: Shanghai City Inst. of Broadcast Science

C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20050323

Termination date: 20120428