[go: up one dir, main page]

CN103455361B - Method for calling 32-bit decoding library under 64-bit operating system - Google Patents

Method for calling 32-bit decoding library under 64-bit operating system Download PDF

Info

Publication number
CN103455361B
CN103455361B CN201310400814.XA CN201310400814A CN103455361B CN 103455361 B CN103455361 B CN 103455361B CN 201310400814 A CN201310400814 A CN 201310400814A CN 103455361 B CN103455361 B CN 103455361B
Authority
CN
China
Prior art keywords
storehouses
decoding
encapsulation
bit
storehouse
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201310400814.XA
Other languages
Chinese (zh)
Other versions
CN103455361A (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.)
NANJING NANZI INFORMATION TECHNOLOGY Co Ltd
Original Assignee
NANJING NANZI INFORMATION TECHNOLOGY Co Ltd
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 NANJING NANZI INFORMATION TECHNOLOGY Co Ltd filed Critical NANJING NANZI INFORMATION TECHNOLOGY Co Ltd
Priority to CN201310400814.XA priority Critical patent/CN103455361B/en
Publication of CN103455361A publication Critical patent/CN103455361A/en
Application granted granted Critical
Publication of CN103455361B publication Critical patent/CN103455361B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Stored Programmes (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention discloses a method for calling a 32-bit decoding library under a 64-bit operating system. The 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 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

A kind of method calling 32 decoding storehouses under 64 bit manipulation systems
Technical field
The present invention relates to a kind of method calling 32 decoding storehouses under 64 bit manipulation systems, belong to digital information and pass Defeated field.
Background technology
The great advantage of 64 bit manipulation systems, is to provide bigger memory address space, the single process of 32 systems Maximum memory address space is 2GB, and this limits for some application programs that must process mass data, especially video For analysis application, it appears particularly not enough.64 Windows operating systems provide WoW64 compatible layer so that 32 programs can With directly in 64 bit manipulation system operations, although run by compatible layer in theory having some performance loss, actually This difference can be ignored;Similar, 64 (SuSE) Linux OS only need to install corresponding 32 system libraries it is also possible to transport 32 programs of row.But, 64 programs are not supported for 32 modules to be loaded into the process space of oneself, conversely, 32 programs Do not support for 64 modules to be loaded into the process space of oneself.
In order to call original 32 modules under 64 bit manipulation systems, prior art generally adopts below scheme:
1. existing primary control program and Depending module are all transplanted to 64 systems, this needs to recompilate, most of feelings Source code also to be changed under condition, as long as this mode can reach optimal effect, but has any one Depending module no Method is transplanted to 64, and host process just cannot run, and has some 32 decoding storehouses to be that third party provides, does not have source code, no May recompilate as 64 dynamic base, the therefore suitability of the program is subject to larger restriction;
2. task is cut into less process, each process take internal memory be less than 2GB, host process pass through into Between journey, communication sends instruction and obtains implementing result, and this requirement makes larger adjustment to existing Mechanism of Task Allocation, expansible Property is also bad;
3. write the outer 32 COM service ends of a process under Windows to be communicated with 64 clients, but this The mode of kind degraded performance when processing video data, 32 COM service ends also need to do extra open and close maintenance, also cannot Common Linux video analytics server is run;
It is seen that, such scheme is not all suitable for video analysis, and this needs the application processing mass data interaction to lead Domain.
Content of the invention
Proposed by the present invention is a kind of method calling 32 decoding storehouses under 64 bit manipulation systems, and its purpose purport effectively solves The certainly drawbacks described above existing for prior art.Under 64 bit manipulation systems, efficiently call 32 decoding storehouses.
The technical solution of the present invention:A kind of call under 64 bit manipulation systems 32 decoding storehouses methods, comprise with Lower step:
1)64 host process call one 64 encapsulation storehouses, cross over processing border, indirectly in the way of interprocess communication Access 32 decoding storehouses functions;
2)In order to improve the access performance of big flow video data, the original video data that 32 decoding storehouses obtain directly is write Enter in shared drive, read for 64 encapsulation storehouses.
Compared with prior art, the main distinction and its effect are the present invention:
1)In the case of there is no source code, 32 decoding storehouses can be packaged into the corresponding version of 64, have with former The on all four function interface definition of version decoding storehouse and call method;
2)Still have high-performance through the decoding storehouse of encapsulation, through actual measurement, resource overhead is directly held than under former 32 systems Row how 20-30%, but than other implementations easily more than 100% amplification had sizable progress;
3)Host process using 64 so that most of data exchange is carried out in internal memory, apply by suitable video analysis Field;
4)Can be realized with identical principle under 64 Windows and 64 Linux.
Brief description
Fig. 1 is the flow chart of first embodiment of the invention.
Fig. 2 is the flow chart of second embodiment of the invention.
Fig. 3 is a kind of device structure schematic diagram calling 32 decoding storehouses under 64 bit manipulation systems.
Specific embodiment
A kind of method calling 32 decoding storehouses under 64 bit manipulation systems, comprises the steps of:
1)64 host process call one 64 encapsulation storehouses, cross over processing border, indirectly in the way of interprocess communication Access 32 decoding storehouses functions;
2)In order to improve the access performance of big flow video data, the original video data that 32 decoding storehouses obtain directly is write Enter in shared drive, read for 64 encapsulation storehouses.
64 described encapsulation storehouses are a set of definition with 32 on all four function interfaces in decoding storehouse of master, including master The repertoire in decoding storehouse, when host process calls this encapsulation storehouse, consistent with the decoding storehouse that other have had 64 corresponding versions.
Described 64 encapsulate storehouses, and operationally automatic one or several 32 agency services are entered by this encapsulation storehouse Journey, and establish communication connection, automatically terminate all 32 agency service processes being started by it when terminating and running.
Described interprocess communication, is included using pipeline, message queue, socket Socket or shared drive mode The group of one or more of POSIX Shared Memory or Windows API is combined in and carries out data interaction between two processes.
32 described agency service processes, can monitor the call request from 64 encapsulation storehouses, and straight according to request Connect and call 32 corresponding functions in decoding storehouse, then result is returned in the way of interprocess communication 64 encapsulation storehouses.
Comparison Fig. 3, a kind of equipment calling 32 decoding storehouses under 64 bit manipulation systems, it is characterized in that comprising 64 operations When device, 32 devices and shared drive device when running, device during described 64 operations, comprise with lower module:
A. 64 host process, this is the application program that developer writes, and directly invokes 64 encapsulation storehouses;
B. 64 encapsulation storehouses, for providing 64 calling interfaces to developer, and are led to 32 agency service processes Letter.
Device when described 32 run, comprises with lower module:
A. 32 agency service processes, for communicating with 64 encapsulation storehouses, and call 32 decoding storehouses;
B. 32 decoding storehouses, for providing the decoding function of reality;
Described shared drive device, for providing high performance video data to read and writing.
Embodiment 1
As shown in figure 1,
A kind of high performance method calling 32 decoding storehouses under 64 bit manipulation systems, comprises the following aspects:
In step s 110,64 host process decode storehouses by 64 of static linkage or dynamic importing encapsulation. It is pointed out that interprocess communication and provide respective function interface development amount may considerably complicated if it is possible to Obtain primary 64 decoding storehouses, then should directly invoke, scheme of the present invention is only applicable to must be using 32 decodings The situation in storehouse;
Then, in step S111, if necessary to initialize, 64 encapsulation storehouses start 32 agency service processes, and with It sets up communication connection, subsequently into step S112;
Then, in step S112,64 host process call the function in decoding storehouse, such as FunctionA ();
Then, in step S113, interprocess communication is passed through in 64 encapsulation storehouses, calls in 32 agency services FunctionA (), and result is returned 64 host process, complete flow process.
It should be noted that the decoding storehouse changed by such interprocess communication, its efficiency is bound to will than direct operation Low, actual expense is affected by following factor:Specific interprocess communication implementation, 32 compatible layers of operating system are originally The expense of body and loading and initialized expense.
Embodiment 2
As shown in Fig. 2
A kind of high performance method calling 32 decoding storehouses under 64 bit manipulation systems, present embodiment is in the first enforcement Improved on the basis of mode, mainly theed improvement is that, in the present embodiment, for original the regarding of decoding storehouse output Frequency evidence, because the feature of Video processing is that data volume is big, instantaneity has high demands, and the requirement of therefore performance is higher than common application. Specifically, for a road 720P HD video, each second, each internal memory replicated the data needing to process 33MB, if used Traditional Inter-Process Communication, at least needs 2-3 internal memory to replicate(memcpy)Operation, this will have a strong impact on execution efficiency.For This, in the method for data exchange, the present embodiment has been specifically designed one and internal memory has been replicated the shortcut minimizing, and flow process is as schemed Shown in 2:
In step S210,64 host process pass through the decoding through 64 encapsulation of static linkage or dynamic importing Storehouse;
Then, in step S211, if necessary to initialize, 64 encapsulation storehouses start 32 agency service processes, and with It sets up communication connection;
Meanwhile, in step S212, create one piece of shared drive by 32 agency service processes or 64 host processes, use Exchange in video data;
Then, in step S213,64 host process call the function in decoding storehouse, such as FunctionA (), if FunctionA () needs to obtain decoded video data, enters step S214, if generic function calls, enters step S217;
Then, in step S214, the original video data that 32 decoding storehouses obtain is copied to altogether by 32 agency services Enjoy in internal memory;
Then, in step S215,32 agency service processes pass through process communication, have notified 64 encapsulation storehouse new datas Through available;
Then, in step S216,64 host processes are passed through to encapsulate storehouse, read the data in shared drive, complete flow process.
In step S217, interprocess communication is passed through in 64 encapsulation storehouses, calls the FunctionA in 32 agency services (), and result is returned 64 host process, complete flow process.
Embodiment 3
A kind of high performance method calling 32 decoding storehouses under 64 bit manipulation systems, present embodiment is in the first enforcement Improved on the basis of mode, mainly theed improvement is that, in the present embodiment, improved entering of first embodiment Communicate between journey, all of order all directly carries out data interaction using shared drive, in order that 32 and 64 processes directly make Use same internal memory, need to the process carrying out following aspect in reading and writing data:
1. uniform data alignment, directly carrying out data interaction using structure remains one of the most efficient method, but 32 alignment of data modes with 64 bit processors are different.Complicated self-defining data structure is entered to 64 from 32 process transmission Cheng Shi, may will not obtain desired result, vice versa, solve this problem and need to inquire about specific platform compiler to say Bright;
Specifically, this problem can be solved by the following method:After an int32_t member, extra addition is another Individual int32_t member, so, no matter account for 8 byte storages, thus eliminating in 32 systems or in 64 systems Difference between different frameworks;
2. uniform data type, in most cases, the data type of 64 programs and 32 programs is identical, can Different mainly pointer and longs can occur.Solve this problem to support across processor architecture by using some Data type such as intptr_t or typedef conditional compilation is carried out according to different platform, with realize identical code adapt to many Plant platform.
Even if it will be apparent to an ordinarily skilled person in the art that making a change to the details and form of implementation below, Still the technical scheme described in the application claims can be realized.Embodiments of the present invention include falling into claims Spirit and intension in the range of all changes or Equivalent realization.
It should be noted that in order to project explanation innovative part, only illustrating the related module of embodiment of the present invention.Should Work as understanding, following detailed description, be used only for explaining the present invention, be not limited to the present invention." connection " described herein Can be to be mechanically connected, electrical connection, connect or annexation in logic inside original paper, in other words, this area common Technical staff should determine as the case may be for the understanding of above-mentioned term.

Claims (4)

1. a kind of method calling 32 decoding storehouses under 64 bit manipulation systems, is characterized in that the method includes the steps of:
1)64 host process call one 64 encapsulation storehouses, cross over processing border, indirectly visit in the way of interprocess communication Ask the function in 32 decoding storehouses;
2)In order to improve the access performance of big flow video data, the original video data that 32 decoding storehouses obtain directly writes to In shared drive, read for 64 encapsulation storehouses;
64 described encapsulation storehouses are a set of definition with 32 on all four function interfaces in decoding storehouse of master, including master decoding The repertoire in storehouse, when host process calls this encapsulation storehouse, consistent with the decoding storehouse that other have had 64 corresponding versions;
Described 64 encapsulation storehouses, operationally this encapsulation storehouse is by automatic one or several 32 agency service processes, and Establish communication connection, automatically terminate all 32 agency service processes being started by it when terminating and running.
2. a kind of method calling 32 decoding storehouses under 64 bit manipulation systems according to claim 1, is characterized in that institute The interprocess communication stated, includes POSIX Shared using pipeline, message queue, socket Socket or shared drive mode The group of one or more of Memory or Windows API is combined in and carries out data interaction between two processes.
3. a kind of method calling 32 decoding storehouses under 64 bit manipulation systems according to claim 1, is characterized in that institute The 32 agency service processes stated, can monitor the call request from 64 encapsulation storehouses, and directly invoke 32 according to request Then result is returned to 64 encapsulation storehouses in the way of interprocess communication by the corresponding function in decoding storehouse.
4. a kind of equipment calling 32 decoding storehouses under 64 bit manipulation systems, it is characterized in that comprising 64 devices when running, 32 Device and shared drive device when position is run, device during described 64 operations, comprise with lower module:
A. 64 host process, this is the application program that developer writes, and directly invokes 64 encapsulation storehouses;
B. 64 encapsulation storehouse, for developer provide 64 calling interfaces, and with 32 agency service process communications;
Device when described 32 run, comprises with lower module:
A. 32 agency service processes, for communicating with 64 encapsulation storehouses, and call 32 decoding storehouses;
B. 32 decoding storehouses, for providing the decoding function of reality;
Described shared drive device, for providing high performance video data to read and writing;
64 described encapsulation storehouses are a set of definition with 32 on all four function interfaces in decoding storehouse of master, including master decoding The repertoire in storehouse, when host process calls this encapsulation storehouse, consistent with the decoding storehouse that other have had 64 corresponding versions;
Described 64 encapsulation storehouses, operationally this encapsulation storehouse is by automatic one or several 32 agency service processes, and Establish communication connection, automatically terminate all 32 agency service processes being started by it when terminating and running.
CN201310400814.XA 2013-09-06 2013-09-06 Method for calling 32-bit decoding library under 64-bit operating system Active CN103455361B (en)

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 CN103455361A (en) 2013-12-18
CN103455361B true 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 (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US12346701B2 (en) 2021-11-03 2025-07-01 International Business Machines Corporation Sharing global variables between addressing mode programs

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104298529B (en) * 2014-10-11 2018-03-02 山东理工大学 A kind of application method of Freescale single-chip microcomputer development 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
CN106682494B (en) * 2016-11-16 2021-07-23 腾讯科技(深圳)有限公司 Information access method, device and equipment
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

Citations (5)

* Cited by examiner, † Cited by third party
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

Patent Citations (5)

* Cited by examiner, † Cited by third party
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 (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US12346701B2 (en) 2021-11-03 2025-07-01 International Business Machines Corporation Sharing global variables between addressing mode programs

Also Published As

Publication number Publication date
CN103455361A (en) 2013-12-18

Similar Documents

Publication Publication Date Title
CN103455361B (en) Method for calling 32-bit decoding library under 64-bit operating system
US9823851B2 (en) Secure migratable architecture having security features
WO2010053956A2 (en) Command buffers for web-based graphics rendering
EP1997021B1 (en) Framework for domain-specific run-time environment acceleration using virtualization technology
US20190141145A1 (en) Cloud-scale heterogeneous datacenter management infrastructure
US8145902B2 (en) Methods and apparatus for secure processor collaboration in a multi-processor system
US20160378530A1 (en) Remote-direct-memory-access-based virtual machine live migration
US20200257538A1 (en) Multithreaded rendering for virtualized graphics processing
CN108874506A (en) Virtual machine leads directly to the thermomigration process and device of equipment
BRPI0816037B1 (en) apparatus for downloading data processing, data processing unloading system, and method implemented by data processing unloading machine
CN111833233A (en) Deep Learning Thread Communication
EP2941694A1 (en) Capability based device driver framework
CN101833470A (en) Injecting transactions to support virtualization of a physical device controller
EP4052141B1 (en) System and method for constructing filter graph-based media processing pipelines in a browser
US20200285559A1 (en) System, apparatus and method for dynamic tracing in a system having one or more virtualization environments
US20110072433A1 (en) Method to Automatically ReDirect SRB Routines to a ZIIP Eligible Enclave
US20190303209A1 (en) Data Processing System
US9477518B1 (en) Method to automatically redirect SRB routines to a zIIP eligible enclave
CN113891087A (en) A method and system for implementing virtualization hardware codec acceleration based on Linux system
CN117608835A (en) Distributed kernel architecture for server-free data center
CN117608756A (en) Request processing methods, devices, electronic equipment and storage media
US7702789B2 (en) Apparatus, system, and method for reassigning a client
CN105550050A (en) Hardware communication method and apparatus
CN110852139A (en) Biometric feature recognition method, biometric feature recognition device, biometric feature recognition equipment and storage medium
CN105205031A (en) Distributed Computing System and Computing Method of Distributed System

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