CN103455361A - Design method for calling 32-bit decoding library under 64-bit operating system - Google Patents
Design method for calling 32-bit decoding library under 64-bit operating system Download PDFInfo
- Publication number
- CN103455361A CN103455361A CN201310400814XA CN201310400814A CN103455361A CN 103455361 A CN103455361 A CN 103455361A CN 201310400814X A CN201310400814X A CN 201310400814XA CN 201310400814 A CN201310400814 A CN 201310400814A CN 103455361 A CN103455361 A CN 103455361A
- Authority
- CN
- China
- Prior art keywords
- storehouses
- decoding
- bit
- encapsulation
- under
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- Stored Programmes (AREA)
- Computer And Data Communications (AREA)
Abstract
The invention discloses a design method for calling a 32-bit decoding library under a 64-bit operating system. The design method comprises the following steps: (1) calling a 64-bit encapsulation library by a 64-bit master control process, and crossing the process boundary in an inter-process communication mode to indirectly access the 32-bit decoding library; (2) directly writing original video data obtained by the 32-bit decoding library into a shared memory for the 64-bit encapsulation library to read. The design method has the advantages that (1) the 32-bit decoding library is encapsulated into a corresponding 64-bit edition under the condition of no source code and has the same function interface definition and calling method as those of the decoding library of the original edition, (2) the resource overhead is increased by 20-30 percent compared with direct execution under the original 32-bit system through actual measurement, (3) the exchange of most of data can be performed in the memory by the master control process by using the 64 bit, and the method is suitable for the field of application of video analysis, and (4) the method can be realized on the same principle under the 64-bit Windows and 64-bit Linux.
Description
Technical field
What the present invention relates to is a kind of method for designing of calling 32 decoding storehouses under 64 bit manipulation systems, belongs to the digital information transmission field.
Background technology
The great advantage of 64 bit manipulation systems, be the memory address space that can provide larger, the memory address space of 32 single process maximums of system is 2GB, and this restriction must be processed the application program of mass data for some, especially video analysis application, seem particularly not enough.64 Windows operating systems provide the WoW64 compatible layer, make 32 programs directly to move in 64 bit manipulation systems, although move and have some performance losss by compatible layer in theory, in fact this difference can be ignored; Similarly, only need on 64 (SuSE) Linux OS corresponding 32 system libraries are installed, also can move 32 programs.But 64 programs do not support 32 modules are loaded into the process space of oneself, otherwise 32 programs do not support 64 modules are loaded into the process space of oneself yet.
In order to call original 32 modules under 64 bit manipulation systems, prior art adopts following scheme usually:
1. will have primary control program and Depending module now and all be transplanted to 64 systems, this needs to recompilate, also to revise source code in most of situation, this mode can reach optimal effect, as long as but there is any one Depending module can't be transplanted to 64, the master control process just can't be moved, it is that the third party provides that some 32 decoding storehouses are arranged, there is no source code, can not recompilate is 64 dynamic base, so the applicability of this scheme is subject to larger restriction;
2. task is cut into to less process, the internal memory that each process takies is no more than 2GB, and the master control process sends instruction and obtains execution result by interprocess communication, and this requirement is made larger adjustment to existing Mechanism of Task Allocation, and extensibility is also bad;
3. writing 32 COM service ends and 64 clients outside a process under Windows communicates, but this mode performance when processing video data is low, 32 COM service ends also need to do extra open and close to be safeguarded, also can't in common Linux video analytics server, move;
Be not difficult to find, such scheme all is not suitable for video analysis, and this need to process the mutual application of mass data.
Summary of the invention
What the present invention proposed is a kind of method for designing of calling 32 decoding storehouses under 64 bit manipulation systems, and its purpose purport effectively solves the existing above-mentioned defect of prior art.Call efficiently 32 decoding storehouses under 64 bit manipulation systems.
Technical solution of the present invention: a kind of method for designing of calling 32 decoding storehouses under 64 bit manipulation systems comprises following steps:
1) one 64 encapsulation storehouses of 64 master control process transfers, cross over processing border in the mode of interprocess communication, indirectly accesses the function in 32 decoding storehouses;
2), in order to improve the access performance of large flow video data, 32 original video data of obtaining of decoding storehouse directly write in shared drive, for 64 encapsulation storehouses, read.
Compared with prior art, the key distinction and effect thereof are in the present invention:
1) can 32 decoding storehouses be packaged into to the corresponding version of 64 in the situation that there is no source code, have and the on all four function interface definition in master decoding storehouse and call method;
2) the decoding storehouse through encapsulation still has high-performance, and through actual measurement, resource overhead has been than directly having carried out under former 32 systems 20-30% many, still than other implementations easily the amplification more than 100% sizable progress has been arranged;
3) master control process is used 64 can, so that most of exchanges data is carried out in internal memory, be applicable to the video analysis application;
4) can under 64 Windows and 64 Linux, with identical principle, realize.
The accompanying drawing explanation
Fig. 1 is the process flow diagram of first embodiment of the invention.
Fig. 2 is the process flow diagram of second embodiment of the invention.
Fig. 3 is a kind of device structure schematic diagram that calls 32 decoding storehouses under 64 bit manipulation systems.
Embodiment
A kind of method for designing of calling 32 decoding storehouses under 64 bit manipulation systems comprises following steps:
1) one 64 encapsulation storehouses of 64 master control process transfers, cross over processing border in the mode of interprocess communication, indirectly accesses the function in 32 decoding storehouses;
2), in order to improve the access performance of large flow video data, 32 original video data of obtaining of decoding storehouse directly write in shared drive, for 64 encapsulation storehouses, read.
Described 64 encapsulation storehouses are a set of and the on all four function interfaces definition in 32 decoding storehouses of master, comprise the repertoire in master decoding storehouse, during this encapsulation storehouse of master control process transfer, with other, have had the decoding storehouse of 64 corresponding versions consistent.
Described 64 encapsulation storehouses, when operation, this encapsulation storehouse will start one or several 32 agency service processes automatically, and establish a communications link with it, automatically finish all 32 the agency service processes by its startup when finishing operation.
Described interprocess communication, used pipeline, message queue, socket Socket or shared drive mode to comprise that being combined between two processes of one or more in POSIX Shared Memory or Windows API carry out data interaction.
Described 32 agency service processes, can monitor the call request from 64 encapsulation storehouses, and directly call 32 decoding storehouse corresponding functions according to request, then result returned to 64 encapsulation storehouses in the mode of interprocess communication.
Contrast Fig. 3, a kind of equipment that calls 32 decoding storehouses under 64 bit manipulation systems, is characterized in that comprising 64 operation timers, 32 operations timer and shared drive devices, and described 64 operation timers comprise with lower module:
A. 64 master control processes, this is the application program that the developer writes, and directly calls 64 encapsulation storehouses;
B. 64 the encapsulation storehouses, for 64 calling interfaces are provided to the developer, and with 32 agency service process communications.
Described 32 operation timers comprise with lower module:
A. 32 agency service processes, for communicating by letter with 64 encapsulation storehouses, and call 32 decoding storehouses;
B. 32 the decoding storehouses, for actual decoding function is provided;
Described shared drive device, read and write for high performance video data is provided.
Embodiment 1
As shown in Figure 1,
A kind of high performance method of calling 32 decoding storehouses under 64 bit manipulation systems comprises the following aspects:
In step S110,64 master control processes are by static linkage or dynamically be written into 64 decoding storehouses that encapsulated.It is to be noted, interprocess communication and the development amount possibility very complex that the respective function interface is provided, if can obtain primary 64 decoding storehouses, should directly call so, scheme of the present invention is only applicable to use the situation in 32 decoding storehouses;
Then, in step S111, if need initialization, 64 encapsulation storehouses start 32 agency service processes, and establish a communications link with it, then enter step S112;
Then, in step S112, the function in 64 master control process transfer decoding storehouses, as FunctionA ();
Then, in step S113,64 encapsulation storehouses, by interprocess communication, are called 32 FunctionA () on agency service, and result are returned to 64 master control processes, complete flow process.
It should be noted that, decoding storehouse by interprocess communication conversion like this, its efficiency is bound to lower than direct operation, and actual expense is subject to the impact of following factor: the expense of concrete interprocess communication implementation, 32 compatible layers of operating system itself and being written into and initialized expense.
Embodiment 2
As shown in Figure 2,
A kind of high performance method of calling 32 decoding storehouses under 64 bit manipulation systems, present embodiment is improved on the basis of the first embodiment, main improvements are, in the present embodiment, original video data for the output of decoding storehouse, because the characteristics of Video processing are that data volume is large, instantaneity requires high, so the requirement of performance is higher than common application.Concrete, for a road 720P HD video, p.s., each internal memory copied the data that need to process 33MB, if use traditional Inter-Process Communication, at least needed 2-3 internal memory to copy (memcpy) operation, and this will have a strong impact on execution efficiency.For this reason, on the method for exchanges data, the present embodiment special design one internal memory is copied to minimized shortcut, flow process as shown in Figure 2:
In step S210,64 master control processes are by static linkage or dynamically be written into the decoding storehouse through 64 encapsulation;
Then, in step S211, if need initialization, 64 encapsulation storehouses start 32 agency service processes, and establish a communications link with it;
Simultaneously, in step S212, by 32 agency service processes or 64 host processes, create a shared drive, exchange for video data;
Then, in step S213, the function in 64 master control process transfer decoding storehouses, as FunctionA (), if FunctionA () need to obtain decoded video data, enter step S214, if generic function calls, enters step S217;
Then, in step S214, the original video data that 32 agency services obtain 32 decoding storehouses copies in shared drive;
Then, in step S215,32 agency service processes, by process communication, notify 64 encapsulation storehouse new datas available;
Then, in step S216,64 host processes, by the encapsulation storehouse, read the data in shared drive, complete flow process.
In step S217,64 encapsulation storehouses, by interprocess communication, are called 32 FunctionA () on agency service, and result are returned to 64 master control processes, complete flow process.
Embodiment 3
A kind of high performance method of calling 32 decoding storehouses under 64 bit manipulation systems, present embodiment is improved on the basis of the first embodiment, main improvements are, in the present embodiment, improved the interprocess communication of the first embodiment, all orders are all directly used shared drive to carry out data interaction, in order to make 32 and 64 processes, directly use same internal memories, need to be to carrying out the processing aspect following when the reading and writing data:
1. uniform data alignment, directly use structure to carry out data interaction and remain one of the most efficient method, but 32 alignment of data modes with 64 bit processors are different.Complicated self-defining data structure during from 32 process transmission to 64 process, may not can obtain the result of wishing, vice versa, addresses this problem the platform compiler explanation that needs inquiry concrete;
Concrete, can address this problem by the following method: an int32_t member back, additionally add another int32_t member, like this, no matter all account for 8 bytes store on 32 systems or on 64 systems, thereby eliminated the difference between different frameworks;
2. uniform data type, in most of situation, the data type of 64 programs and 32 programs is identical, may occur that different is mainly pointer and long.Address this problem and can carry out the typedef conditional compilation across the data type of processor architecture as intptr_t or according to different platform by using some supports, to realize identical code, adapt to kinds of platform.
Will be understood by those skilled in the art that, even details and the form of following embodiment made a change, still can realize the described technical scheme of the application's claims.Embodiments of the present invention comprise spirit and interior all changes or the Equivalent realization of intension scope that falls into claims.
It should be noted that, for outstanding explanation innovation part, only shown the relevant module of embodiment of the present invention.Should be appreciated that following embodiment, only, for explaining the present invention, be not limited to the present invention." connection " described herein can be mechanical connection, electrical connection, original paper is inner connects or annexation in logic, and in other words, those of ordinary skill in the art should determine as the case may be for the understanding of above-mentioned term.
Claims (6)
- One kind under 64 bit manipulation systems, call 32 the decoding storehouses method for designing, it is characterized in that the method includes the steps of:1) one 64 encapsulation storehouses of 64 master control process transfers, cross over processing border in the mode of interprocess communication, indirectly accesses the function in 32 decoding storehouses;2), in order to improve the access performance of large flow video data, 32 original video data of obtaining of decoding storehouse directly write in shared drive, for 64 encapsulation storehouses, read.
- According to claim 1 a kind of under 64 bit manipulation systems, call 32 the decoding storehouses method for designing, it is characterized in that described 64 encapsulation storehouses are a set of and the on all four function interfaces definition in 32 decoding storehouses of master, the repertoire that comprises master decoding storehouse, during this encapsulation storehouse of master control process transfer, with other, there is the decoding storehouse of 64 corresponding versions consistent.
- According to claim 2 a kind of under 64 bit manipulation systems, call 32 the decoding storehouses method for designing, it is characterized in that described 64 encapsulation storehouses, when operation, this encapsulation storehouse will start one or several 32 agency service processes automatically, and establish a communications link with it, automatically finish all 32 the agency service processes by its startup when finishing operation.
- According to claim 2 a kind of under 64 bit manipulation systems, call 32 the decoding storehouses method for designing, it is characterized in that described interprocess communication, use pipeline, message queue, socket Socket or shared drive mode to comprise that being combined between two processes of one or more in POSIX Shared Memory or Windows API carry out data interaction.
- According to claim 2 a kind of under 64 bit manipulation systems, call 32 the decoding storehouses method for designing, it is characterized in that described 32 agency service processes, can monitor the call request from 64 encapsulation storehouses, and directly call 32 decoding storehouse corresponding functions according to request, then result is returned to 64 encapsulation storehouses in the mode of interprocess communication.
- 6. an equipment that calls 32 decoding storehouses under 64 bit manipulation systems, is characterized in that comprising 64 operation timers, 32 operations timer and shared drive devices, and described 64 operation timers comprise with lower module:A. 64 master control processes, this is the application program that the developer writes, and directly calls 64 encapsulation storehouses;B. 64 the encapsulation storehouses, for 64 calling interfaces are provided to the developer, and with 32 agency service process communications;Described 32 operation timers comprise with lower module:A. 32 agency service processes, for communicating by letter with 64 encapsulation storehouses, and call 32 decoding storehouses;B. 32 the decoding storehouses, for actual decoding function is provided;Described shared drive device, read and write for high performance video data is provided.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310400814.XA CN103455361B (en) | 2013-09-06 | 2013-09-06 | Method for calling 32-bit decoding library under 64-bit operating system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310400814.XA CN103455361B (en) | 2013-09-06 | 2013-09-06 | Method for calling 32-bit decoding library under 64-bit operating system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103455361A true CN103455361A (en) | 2013-12-18 |
CN103455361B CN103455361B (en) | 2017-02-08 |
Family
ID=49737768
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310400814.XA Active CN103455361B (en) | 2013-09-06 | 2013-09-06 | Method for calling 32-bit decoding library under 64-bit operating system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103455361B (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104298529A (en) * | 2014-10-11 | 2015-01-21 | 山东理工大学 | Use method of Freescale single chip microcomputer developing system |
CN105446732A (en) * | 2015-05-13 | 2016-03-30 | 北京天诚盛业科技有限公司 | Operation realization method, device and system of 64-bit program |
CN105630599A (en) * | 2014-10-28 | 2016-06-01 | 龙芯中科技术有限公司 | Video memory distribution method and device based on 32/64-bit hybrid operating system |
CN106682494A (en) * | 2016-11-16 | 2017-05-17 | 腾讯科技(深圳)有限公司 | Information access method, device and equipment |
CN107729132A (en) * | 2017-10-09 | 2018-02-23 | 武汉斗鱼网络科技有限公司 | A kind of video decoding process guard method and device |
CN111142969A (en) * | 2019-12-27 | 2020-05-12 | 贵阳动视云科技有限公司 | Method, device, medium and equipment for calling 32-bit program module by 64-bit program |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5828865A (en) * | 1995-12-27 | 1998-10-27 | Intel Corporation | Dual mode bus bridge for interfacing a host bus and a personal computer interface bus |
US6018810A (en) * | 1997-12-12 | 2000-01-25 | Compaq Computer Corporation | Fault-tolerant interconnection means in a computer system |
US6178478B1 (en) * | 1998-12-11 | 2001-01-23 | Vlsi Technology, Inc. | Smart target mechanism for eliminating dual address cycles in a peripheral component interconnect environment |
CN101272501A (en) * | 2008-05-07 | 2008-09-24 | 北京数码视讯科技股份有限公司 | Video/audio encoding and decoding method and device |
CN102098510A (en) * | 2010-11-25 | 2011-06-15 | 深圳市融创天下科技发展有限公司 | Methods and devices for decoding and coding audio/video data |
-
2013
- 2013-09-06 CN CN201310400814.XA patent/CN103455361B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5828865A (en) * | 1995-12-27 | 1998-10-27 | Intel Corporation | Dual mode bus bridge for interfacing a host bus and a personal computer interface bus |
US6018810A (en) * | 1997-12-12 | 2000-01-25 | Compaq Computer Corporation | Fault-tolerant interconnection means in a computer system |
US6178478B1 (en) * | 1998-12-11 | 2001-01-23 | Vlsi Technology, Inc. | Smart target mechanism for eliminating dual address cycles in a peripheral component interconnect environment |
CN101272501A (en) * | 2008-05-07 | 2008-09-24 | 北京数码视讯科技股份有限公司 | Video/audio encoding and decoding method and device |
CN102098510A (en) * | 2010-11-25 | 2011-06-15 | 深圳市融创天下科技发展有限公司 | Methods and devices for decoding and coding audio/video data |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104298529A (en) * | 2014-10-11 | 2015-01-21 | 山东理工大学 | Use method of Freescale single chip microcomputer developing system |
CN104298529B (en) * | 2014-10-11 | 2018-03-02 | 山东理工大学 | A kind of application method of Freescale single-chip microcomputer development system |
CN105630599A (en) * | 2014-10-28 | 2016-06-01 | 龙芯中科技术有限公司 | Video memory distribution method and device based on 32/64-bit hybrid operating system |
CN105630599B (en) * | 2014-10-28 | 2019-02-15 | 龙芯中科技术有限公司 | Video memory distribution method and device based on 32/64 hybrid operating system |
CN105446732A (en) * | 2015-05-13 | 2016-03-30 | 北京天诚盛业科技有限公司 | Operation realization method, device and system of 64-bit program |
CN106682494A (en) * | 2016-11-16 | 2017-05-17 | 腾讯科技(深圳)有限公司 | Information access method, device and equipment |
CN107729132A (en) * | 2017-10-09 | 2018-02-23 | 武汉斗鱼网络科技有限公司 | A kind of video decoding process guard method and device |
CN107729132B (en) * | 2017-10-09 | 2019-10-25 | 武汉斗鱼网络科技有限公司 | A kind of video decoding process guard method and device |
CN111142969A (en) * | 2019-12-27 | 2020-05-12 | 贵阳动视云科技有限公司 | Method, device, medium and equipment for calling 32-bit program module by 64-bit program |
Also Published As
Publication number | Publication date |
---|---|
CN103455361B (en) | 2017-02-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9823851B2 (en) | Secure migratable architecture having security features | |
ES2617303T3 (en) | Communication techniques between processors in a multi-processor computing platform | |
CN113287286B (en) | Input/output processing in distributed storage nodes over RDMA | |
CN103455361A (en) | Design method for calling 32-bit decoding library under 64-bit operating system | |
KR101517258B1 (en) | Apparatus, system, and method for cross-system proxy-based task offloading | |
US20190141145A1 (en) | Cloud-scale heterogeneous datacenter management infrastructure | |
US20220091911A1 (en) | Method and apparatus for inter-process communication, and computer device | |
US20100118039A1 (en) | Command buffers for web-based graphics rendering | |
CN111708738B (en) | Method and system for realizing interaction of hadoop file system hdfs and object storage s3 data | |
TWI525546B (en) | Apparatus and method for providing multiple virtual device controllers by redirecting an interrupt from a physical device controller | |
KR20150104592A (en) | Software interface for a hardware device | |
JP2020087470A (en) | Data access method, data access device, apparatus, and storage medium | |
CN104714792A (en) | Multi-process shared data processing method and device | |
CA3155494A1 (en) | System and method for constructing filter graph-based media processing pipelines in a browser | |
CN100349121C (en) | Embedded type parallel computation system and embedded type parallel computing method | |
CN115242563B (en) | Network communication method, computing device and readable storage medium | |
US10303507B2 (en) | Off-the-shelf software component reuse in a cloud computing environment | |
WO2021203591A1 (en) | Data processing method for heterogeneous cloud storage system, and readable medium and system therefor | |
Enberg et al. | Transcending POSIX: The End of an Era? | |
US11954510B2 (en) | Native-image in-memory cache for containerized ahead-of-time applications | |
US9251101B2 (en) | Bitmap locking using a nodal lock | |
US20220050700A1 (en) | Virtual bond for efficient networking of virtual machines | |
WO2023194938A1 (en) | System, method and computer-accessible medium for a zero-copy data-coherent shared-memory inter-process communication system | |
CN114356594A (en) | Inter-partition communication method and system for multi-domain isolation operating system | |
CN113448880A (en) | Storage and compute in memory enabling coherent multiprocessing |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
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 |