CN108111764B - Method and system for switching PDAF (PDAF) in real time - Google Patents

Method and system for switching PDAF (PDAF) in real time Download PDF

Info

Publication number
CN108111764B
CN108111764B CN201810005805.3A CN201810005805A CN108111764B CN 108111764 B CN108111764 B CN 108111764B CN 201810005805 A CN201810005805 A CN 201810005805A CN 108111764 B CN108111764 B CN 108111764B
Authority
CN
China
Prior art keywords
pdaf
module
function
switching
real
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
CN201810005805.3A
Other languages
Chinese (zh)
Other versions
CN108111764A (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 Chuanying Information Technology Co Ltd
Original Assignee
Shanghai Chuanying 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 Shanghai Chuanying Information Technology Co Ltd filed Critical Shanghai Chuanying Information Technology Co Ltd
Priority to CN201810005805.3A priority Critical patent/CN108111764B/en
Publication of CN108111764A publication Critical patent/CN108111764A/en
Application granted granted Critical
Publication of CN108111764B publication Critical patent/CN108111764B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/67Focus control based on electronic image sensor signals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation

Abstract

The invention discloses a method and a system for switching PDAF (PDAF) in real time, wherein the method comprises the following steps: s1, accessing a formal software code base; s2, importing a function of switching PDAF in real time; s3, compiling software of a corresponding version according to the imported function of switching on and off the PDAF in real time, and downloading the compiled software by the mobile phone; s4, inputting a plurality of customized Adb commands through an Adb tool, and opening or closing the PDAF; s5, comparative testing of several problems. The system comprises an import module, a real-time switch PDAF function and a real-time switch PDAF function, wherein the import module imports the real-time switch PDAF function; the compiling and downloading module is connected with the importing module, compiles the software of the corresponding version and downloads the software of the corresponding version; the Adb command execution module is connected with the compiling and downloading module and opens the PDAF or closes the PDAF by inputting a plurality of customized Adb commands; and the comparison module is connected with the Adb command execution module and used for comparing and testing a plurality of problems. The invention has short time for testing and verifying respective problems, which is less than 1 minute, and the working efficiency can be greatly improved.

Description

Method and system for switching PDAF (PDAF) in real time
Technical Field
The invention relates to the field of high-pixel cameras, in particular to a method and a system for switching PDAF (digital video camera function) in real time.
Background
The english name of focusing is Focus, and generally, digital cameras have a plurality of focusing methods, namely, an automatic focusing method, a manual focusing method and a multiple focusing method. For example, 1, auto focus: that is, a non-TTL camera is usually used to implement auto-focusing by a similar visual distance measurement method, and the camera emits an infrared ray (or other rays) to determine the distance to the object according to the reflection of the object, and then adjusts the lens assembly according to the measured result to implement auto-focusing. The automatic focusing mode is direct, fast, easy to implement and low in cost, but sometimes errors occur (the automatic focusing cannot be achieved when other things such as glass exist between a camera and a shot object or under the condition of insufficient light), the precision is poor, and the mode is not generally used by high-grade cameras nowadays. 2. Manual focusing: manual focusing is a focusing method that adjusts a camera lens by manually rotating a focusing ring so as to make a shot picture clear, and the method greatly depends on the discrimination of human eyes on an image on a focusing screen and the proficiency of a photographer or even the eyesight of the photographer. 3. Multiple focusing: many digital cameras have a multi-point focusing function, or an area focusing function. When the focus center is not set at the center of the picture, multi-point focusing, or multi-focusing may be used. 4. Holographic automatic focusing: the holographic automatic focusing function (Hologram AF) is a unique function of a Sony digital camera and is also a brand-new automatic focusing optical system, an advanced laser holographic photographing technology is adopted, the edge of a photographing main body is detected by using laser points, a picture which is accurately focused can be photographed even in a dark environment, and the effective photographing distance reaches 4.5 meters.
With the wider application of high-pixel cameras in mobile phones, the quality of image quality is improved, and the continuous development of camera focusing technology and the increasing requirements of clients on the focusing speed and effect of cameras (cameras) are met, and the initial manual focusing is developed into the current automatic focusing. In the auto-focusing process, devices such as electronic cameras generally use a contrast method or a phase method (i.e., PDAF, phase focus type focusing system) to perform focusing. Contrast detection autofocus is continually adjusted before the maximum contrast is detected, and thus is slow. As more and more items of PDAF are also used, the conventional focusing method is still reserved for the purpose of compatibility with the focusing effect in the dark. The PDAF is also called Phase Detection Auto Focus (Phase Detection Auto Focus), and literally means "Phase Detection Auto Focus". Since the focusing is completed only by one calculation, the focusing speed is extremely high. But the focus tends to be out of alignment in dark places. As early as phase focusing (PDAF) was introduced, the cell phone has been using contrast focusing (CAF), i.e. continuous autofocus to complete focusing; the focusing time of the focusing mode is long, the lens continuously moves from the beginning of focusing to the end of focusing, and the returning process after the lens passes through the station is to increase the focusing stroke and reflect that the focusing speed is slow for a user. However, contrast focus CAF can be focused up in dim light as compared to phase focus PDAF.
For our part, PDAF and CAF are compatible at the same time, and CAF is used only when PDAF is not effective. The PDAF can be manually opened and closed in the debugging process, and the method is very convenient for debugging and testing personnel: (1) sometimes, focusing effect and speed problems are encountered, and it is difficult to determine whether the problem is a PDAF problem or a CAF problem. This time PDAF needs to be switched on and off in real time to confirm the problem. (2) Evaluation in the product development process requires testing the focusing effect and performance of CAF and PDAF. We are then required to turn PDAFs on and off in real time. (3) The PDAF is turned on or off in real time, so that the function of the PDAF can be conveniently and quickly confirmed whether to be turned on or not. When the existing scheme needs to confirm the problems, two versions of software are required to be compiled: step (1): and developing a modification code, generating two versions of software, and turning on a version one PDAF function and turning off a version two PDAF function. Step (2): testing and finding two mobile phones to respectively download (down) the two versions of software, and carrying out comparison testing; or one mobile phone downloads the two versions of software respectively before and after the comparison test, as shown in the figure.
Fig. 1 is a schematic diagram of a method for closing or opening a PDAF by modifying a code library in the prior art. As shown in fig. 1, in the prior art scheme, a formal software code base is accessed first, and then a PDAF is closed or opened by modifying the code base, that is, the method needs to generate two versions of software. Fig. 2 is a schematic flow chart of opening a PDAF in the prior art. As shown in fig. 2, a specific procedure for opening the PDAF in the prior art is as follows: compiling and generating software for opening the PDA, then, the mobile phone down enters the software for opening the PDAF, and finally, testing the problems. Fig. 3 is a schematic flowchart of closing PDAF in the prior art. As shown in fig. 3, a specific procedure for opening the PDAF in the prior art is as follows: compiling and generating software for closing the PDA, then down the mobile phone as the software for closing the PDAF, and finally testing the problems.
In the prior art, the PDAF is closed or opened by modifying the code base code, different mobile phone system software is compiled, and the problem needs to be tested in a comparison manner for 30-60 minutes, so that the time spent for testing the problem is long, a new technical scheme for switching the PDAF on and off in real time needs to be developed, and the problem needs to be tested and verified in a shorter time.
Disclosure of Invention
The invention provides a method and a system for switching PDAF in real time, which lead in the function of switching PDAF in real time, compile the software of the version, and the mobile phone down enters the software, and switches PDAF function in real time by using Adb command, so that the time spent on testing and verifying the problems is greatly reduced, and the working efficiency is greatly improved.
In order to achieve the above object, the present invention provides a method for real-time phase focus (PDAF), comprising the steps of:
s1: accessing a formal software code base;
s2: importing a real-time switch phase focusing function;
s3: compiling software of a corresponding version according to the imported real-time switch phase focusing function, and downloading the compiled software by the mobile phone;
s4: inputting a plurality of customized Adb commands through an Adb tool, and opening phase focusing or closing phase focusing;
s5: several problems were tested against each other.
Preferably, in step S2, the function of real-time on-off phase focusing includes: a function of turning on phase focusing and a function of turning off phase focusing; the function of focusing the real-time switch phase is realized by an import module connected with the formal software code base.
Preferably, in the step S4, the customized Adb command is matched with the function of real-time switch phase focusing.
Preferably, the method for switching the phase focusing in real time is suitable for environments where the phase focusing and the contrast focusing are compatible; in the step S5, the questions include: the problem of judging the focusing effect or speed is caused by phase focusing or caused by contrast focusing, and the evaluation in product development needs to test the focusing effect and performance of the contrast focusing and the phase focusing and determine whether the function of the phase focusing is switched on or not.
Preferably, the method for switching the phase to focus in real time is based on code debugging in an Android system compiling environment; the method for focusing the real-time switch phase is based on codes of HAL layers of MTK platforms; the Android system is an Android 5.0 system or a system with the Android above 5.0.
Preferably, the compiling process of the method for switching phase focusing in real time comprises:
a. using an Android attribute mechanism;
b. controlling the debug phase focusing in real time through an Adb command, and dynamically setting the value of a bool variable debug phase focusing _ onoff to open the phase focusing or close the phase focusing;
c. and judging whether init PD mgr is needed according to the value of the pool variable.
The present invention also provides a system for real-time on-off phase focusing using the method for real-time on-off phase focusing as described above, comprising:
the import module is connected with the formal software code base; the lead-in module leads in a real-time switch phase focusing function;
the compiling and downloading module is connected with the importing module; the compiling and downloading module compiles the software of the corresponding version and downloads the compiled software of the corresponding version;
an Adb command execution module connected with the compiling and downloading module; the Adb command execution module opens phase focusing or closes phase focusing by inputting a plurality of customized Adb commands;
a comparison module connected with the Adb command execution module; the comparison module contrasts and tests a plurality of problems.
Preferably, the compiling and downloading module comprises a compiling unit, and the compiling unit is used for compiling the software of the corresponding version; the compiling and downloading module also comprises a downloading unit which is used for downloading the compiled corresponding version software.
Preferably, the customized Adb command matches the function of the real-time switch phase focusing; the real-time switch phase focusing function comprises the following steps: the function of turning on phase focusing and the function of turning off phase focusing.
Preferably, the system for switching phase focusing in real time is suitable for environments when phase focusing and CAF are compatible; the several problems include: judging whether the focusing effect or speed problem is caused by phase focusing or CAF, and evaluating the focusing effect and performance of contrast focusing and phase focusing and confirming whether the function of phase focusing is switched on or not in product development
Compared with the prior art, the invention has the beneficial effects that: according to the invention, by introducing the PDAF real-time switch function and inputting several customized commands to open and close the PDAF by using an Adb tool, the test verifies that the problem does not take 1 minute, but in the prior art, the PDAF is closed/opened by modifying a code base code, different mobile phone system software is compiled, and the problem needs 30-60 minutes for comparison test, so that the working efficiency of the invention can be obviously improved.
Drawings
FIG. 1 is a diagram illustrating a method for closing or opening a PDAF by modifying a code library in the prior art;
FIG. 2 is a schematic flow chart of opening a PDAF in the prior art;
fig. 3 is a detailed flow chart of PDAF shutdown in the prior art;
FIG. 4 is a schematic flow chart of the present invention for turning on and off the PDAF by introducing the PDAF real-time switch function and using an Adb tool;
FIG. 5 is a diagram illustrating a specific compiling method of the PDAF real-time switch according to the present invention;
FIG. 6 is a block diagram of a PDAF switch in the prior art;
FIG. 7 is a schematic diagram of a module structure of the PDAF real-time switch of the present invention;
the method comprises the following steps of 1, importing a module; 2. compiling and downloading the module; an Adb command execution module; 4. and a comparison module.
Detailed Description
In order to understand the features, contents, advantages and effects achieved by the present invention, the present invention is described in detail below in an embodiment form with reference to the accompanying drawings, wherein the main points of the drawings are only schematic and auxiliary for the specification, and are not necessarily true proportions and precise configurations after the implementation of the present invention, and therefore, the present invention should not be interpreted and limited in terms of the proportion and the configuration relationship of the drawings.
The advantages, features and technical measures of the invention will be more readily understood by reference to the following detailed description of exemplary embodiments and the accompanying drawings, and the invention may be embodied in many different forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art, and the present invention will only be defined by the appended claims.
The method for switching phase focusing in real time is applicable to the case of phase focusing (namely PDAF) + contrast focusing (namely CAF) compatibility. The contrast focusing is used when the phase focusing is not effective, and the phase focusing can be manually opened and closed in the debugging process, so that the method is very convenient for debugging testers.
The principle of contrast focusing is to find the position of the lens with the maximum contrast, i.e. the position of accurate focusing, according to the contrast change of the picture at the focus.
The principle of phase focusing is to reserve some shielding pixel points on the photosensitive element, specially used for phase detection, and determine the focusing offset value through the distance between pixels and the change thereof, thereby realizing accurate focusing. Compared with contrast focusing, the phase focusing does not need repeated movement of a lens, the focusing stroke is much shorter, and the focusing process is clean and not hesitant. On the other hand, the requirement of phase focusing on the light intensity is high because the shielded pixel on the CMOS is needed for phase detection.
However, when the focusing effect and speed problem are encountered, it is difficult to determine whether the phase focusing problem or the contrast focusing problem is solved, and then the phase focusing needs to be switched on and off in real time to confirm the problem, or the focusing effect and performance of the contrast focusing and the phase focusing need to be tested in the product development process. It is necessary to turn on and off the phase focusing in real time, or turn on the phase focusing or turn off the phase focusing in real time can conveniently and quickly confirm whether the function of the phase focusing is turned on or not.
Therefore, the method for switching phase focusing in real time of the present invention is a technical solution applied to confirm the above problems.
In the phase focusing and contrast focusing mode, under the condition of normal light, the focusing speed of the hybrid dual-drive automatic focusing is about 0.1-0.3 seconds, and the photographing is finished for about 2 seconds at the fastest speed theoretically. The presence of the time to focus is hardly felt by the user, which can reach the theoretical 1/15 seconds at the fastest. After the mobile phone is started, phase focusing is carried out immediately, and a focusing frame does not appear. If the focusing point needs to be moved, the traditional focusing mode can be adopted, and the focusing frame is presented at the same time. In brief, the shot photos are transparent and stereoscopic, the portrait is clear and bright, the color is restored to be real, and the problem that good photos cannot be shot in a low-light environment is solved.
Therefore, the most important task of phase focusing is to remove init PD mgr when entering the camera (camera). The basic idea of implementing dynamic switch phase focusing is to dynamically control whether init PD mgr is present by setting corresponding attributes when init PD mgr is present.
Fig. 4 is a schematic flow chart of the method for turning on/off the phase focusing by introducing the PDAF real-time switching function and using the Adb tool. As shown in fig. 4, to confirm the above problem, the method of the present invention for real-time on-off phase focusing includes:
s1: accessing a formal software code base;
s2: importing a real-time switch phase focusing function; the method mainly comprises a function of opening phase focusing and a function of closing phase focusing.
S3: compiling the software of the version, and the mobile phone down enters the software of the version. The software version referred to herein is a software version in which an on/off phase focusing function is introduced.
S4: the phase focus function is switched on and off in real time using the Adb command, i.e. several customized commands are input using the Adb tool to switch the phase focus on and off.
The Adb command is called Android Debug Bridge, and plays a role in debugging the Bridge. With the Adb tool, the state of the device or cell phone simulator can be managed. Many handset operations may also be performed, such as installing software, system upgrades, running shell commands, and so forth. In this embodiment, the Adb tool turns phase focus on or off by entering several customized commands. The customized command corresponds to a function of turning on or off phase focusing.
S5: and performing comparison test on the problems to finish the test process.
From the steps, the function of leading in the phase focusing real-time switch can be clearly seen, the problems of debugging and positioning are convenient, trouble and time are saved, and the method is specifically embodied as follows:
the method for switching phase focusing in real time is obviously different from the prior art, wherein the method in the prior art comprises the following steps: the method comprises the steps of modifying phase focusing related codes in the codes, compiling and generating software for opening phase focusing/closing phase focusing, then conducting down through a mobile phone, and comparing and testing the problems.
Obviously, the invention directly imports the function of real-time switch phase focusing, compiles the software and downloads the software into the software, and the key is to utilize Adb to command the function of real-time switch. Thereby greatly reducing the time for test positioning.
The method for switching phase focusing in real time is implemented based on a Google Android software architecture. The Android is a Linux-based operating system with free and open source codes, and is mainly used for mobile devices such as smart phones and tablet computers. Therefore, the method is used for debugging the code based on the Android system compiling environment.
The Android system is an operating system and a software platform for mobile equipment, and is suitable for the method for switching the phase focusing in real time in the mobile phone. The Android system is based on a Linnux kernel, a user interaction program of the Android system is mainly developed by java language, and the Android system is an open source code. The Android system comprises four components, namely an active component (used for displaying a user interface and monitoring and responding to keys of a user), a service component (without a user interface compared with the active component, and carrying out some monitoring processing or background operation), a content provider component (used for sharing data among a plurality of application programs and providing a uniform data access mode) and a broadcast receiver component (used for receiving necessary actions and responding).
Further, the technical scheme of the invention is realized based on an Android 5.0 system or an Android system with the content of 5.0 or more.
Illustratively, the present invention is MTK platform-based HAL layer code, i.e., the relevant code writing of the present invention involves the HAL layer. The MTK platform adopts a Nucleus OS, the Nucleus is an embedded real-time operating system developed by Accelerated Technology company, and the embedded real-time operating system is developed by using standard C, wherein the Nucleus Plus provides source code downloading. The MTK platform suitable for real-time switch phase focusing of the present invention may be an MT6595 platform, an MT6592WG platform, an MT6592TG platform, an MT6592H platform, an MT6588WG platform, an MT6588TG platform, and the like.
Various attributes of each MTK platform may also be different, for example, a core number attribute, a secondary cache attribute, a DDR attribute, a USB attribute, a core voltage attribute, an encapsulation attribute, a collocation scheme attribute, a 4G scheme attribute, and the like. Therefore, the MTK platform on which the present invention is based is not limited herein, and may be selected according to the specific situation.
The HAL Layer is a Hardware Abstraction Layer (HAL for short), which is a Hardware interface Layer abstracted on a concrete Hardware platform, and the interface Layer is responsible for realizing the functions and control of the concrete Hardware platform and providing a uniform API interface for other software modules. The HAL layer is created to abstract the commonality of hardware operation and control, and to provide a unified control interface to upper layer software to isolate other software modules from the underlying hardware. With the HAL, the migration of the system on a new hardware platform becomes extremely simple, and the whole eCOs system including the application based on the eCOs can be migrated on the new hardware platform only by providing an abstraction layer of new hardware.
The HAL layer is an adaptation layer added by Goold, which is required by some manufacturers not to disclose source codes, and can provide a hardware driving module in a source code closing mode, so that an Android frame layer (Android framework layer) and a linux kernel layer (driving layer) are isolated, an Android system is prevented from being excessively dependent on the realization of the linux kernel layer (driving layer), and the Android framework layer can be independently developed without considering how the driving layer is realized. Wherein the Android HAL layer is positioned between the Android system and the driving layer.
When a system is transplanted or a new module is added, the HAL layer of the Android needs to be modified or added, and the HAL layer of the Android is located at the source code position of the Android: for example, hardware/libhardware/; alternatively, hardware/libhardware _ legacy/; or hardware/xxxx/. And some at other locations. The android hal layer can be implemented in several ways, such as a hardware module way, a C/C + + inheritance way, a direct call driving interface way, or a direct interface way.
As described above, since the method for real-time switch phase focusing of the present invention is different from the prior art, the corresponding module structure for real-time switch phase focusing of the present invention is different from the module structure for switching on or off phase focusing in the prior art.
Fig. 7 is a schematic structural diagram of a module of the real-time PDAF switch according to the present invention.
As shown in fig. 7, the system for switching PDAF in real time according to the present invention comprises: the device comprises an import module 1, a compiling and downloading module 2, an Adb command execution module 3 and a comparison module 4. The system for focusing the phase of the real-time switch is connected with the formal software code base, so that the formal software code base is accessed first, and a foundation is provided for the subsequent specific operation of focusing the phase of the real-time switch.
The import module 1 is used for importing a real-time switch phase focusing function; the compiling and downloading module 2 is used for compiling the software of the edition, and the mobile phone is down-loaded into the software of the edition; the Adb command execution module 3 opens and closes the phase focusing by inputting several customized commands; the comparison module 4 compares and tests the problems to complete the testing process.
The import module 1 is connected with the compiling and downloading module 2, the compiling and downloading module 2 is connected with the Adb command executing module 3, and the Adb command executing module 3 is connected with the comparing module 4.
Illustratively, the compiling and downloading module 2 of the present invention includes a compiling unit for compiling a corresponding version of software; the compiling and downloading module 2 further comprises a downloading unit for downloading the software which is compiled before.
Fig. 6 is a schematic structural diagram of modules for opening or closing a PDAF in the prior art, and as shown in fig. 6, a PDAF opening or closing system in the prior art includes: the device comprises a second compiling module, a second downloading module and a second comparing module. The second compiling module is used for compiling software for generating open phase focusing/close phase focusing, the second downloading module is used for downloading the compiled software for open phase focusing/close phase focusing of corresponding versions, and the second comparing module is used for comparing and testing the problems.
The second compiling module comprises a first compiling unit and a second compiling unit, wherein the first compiling unit is used for compiling and generating software for opening the phase focusing, and the second compiling module further comprises the second compiling unit which is used for compiling and generating software for closing the phase focusing. The second downloading module comprises a first downloading unit and a second downloading unit, wherein the first downloading unit is used for downloading the compiled software with the corresponding version and the open phase focusing, and the second downloading unit is used for downloading the compiled software with the corresponding version and the close phase focusing.
The method is realized based on an Android property (property) mechanism and an Adb command. The operation mechanism of the Property mechanism includes: a. when the system is started, the attribute content can be loaded from a plurality of attribute script files; b. all attributes (key/value) in the system are stored in the same shared memory block; c. each process in the system maps the shared memory to the memory space of the process, so that the attribute content can be directly read; d. only one entity in the system can set and modify the attribute value, which is the attribute Service (Property Service); e. different processes can only send a request for modifying the attribute value to the attribute service in a socket mode, but cannot directly modify the attribute value; f. the key-value content in the shared memory is organized in a dictionary tree. The Property Service entity is actually started in the init process. Wherein init is the first process of the user space in the Linux system. It is responsible for creating the most critical sub-processes in the system, such as zygate, etc.
In summary, the method for switching the PDAF in real time of the present invention specifically includes:
a. using the Android property (property) mechanism:
char value[PROPERTY_VALUE_MAX]={'\0'};
property_get("debug.pdaf.onoff",value,"1");
MBOOL debug_pdaf_onoff=atoi(value);。
b. the debug person can control the debug, pdaf, onoff attribute in real time through the Adb command, so as to dynamically set the value of the pool variable debug _ pdaf _ onoff.
db shell setprop debug, PDAF, onoff 1 — turn on PDAF;
adb shell setprop debug, PDAF, onoff 0- - -turn off PDAF
c. The code judges whether init PD mgr is needed according to the value of the pool variable.
Figure BDA0001538572630000091
In summary, based on the above steps and the corresponding procedures, the function of the dynamic control switch PDAF of the present invention can be realized. According to the invention, by introducing the PDAF real-time switch function and inputting several customized commands to open and close the PDAF by using an Adb tool, the test verifies that the problem does not take 1 minute, but in the prior art, the PDAF is closed/opened by modifying a code base code, different mobile phone system software is compiled, and the problem needs 30-60 minutes for comparison test, so that the working efficiency of the invention can be obviously improved.
It should be noted that, in the above embodiments of the method for switching the PDAF in real time and the system thereof, the division of each functional module is only an example, and in practical applications, the above function allocation may be completed by different functional modules according to needs, for example, configuration requirements of corresponding hardware or convenience of implementation of software, that is, the internal structure of the system for switching the PDAF in real time is divided into different functional modules to complete all or part of the above described functions.
In addition, in practical applications, the corresponding functional modules in this embodiment may be implemented by corresponding hardware, or may be implemented by corresponding hardware executing corresponding software.
For example, the import module may be hardware that executes the function of importing the real-time switch PDAF, or may be a general processor or other hardware device that can execute a corresponding computer program to complete the function. The comparison module may be hardware having a function of performing the comparison for comparing the test problems, such as a comparator, or a general processor or other hardware device capable of executing a corresponding computer program to perform the function. It should be noted that, because the contents of information interaction, execution process, and the like between the modules/units of the apparatus are based on the same concept as the method embodiment of the present invention, the technical effect brought by the contents is the same as the method embodiment of the present invention, and specific contents may refer to the description in the method embodiment of the present invention, and are not described herein again.
While the present invention has been described in detail with reference to the preferred embodiments, it should be understood that the above description should not be taken as limiting the invention. Various modifications and alterations to this invention will become apparent to those skilled in the art upon reading the foregoing description. Accordingly, the scope of the invention should be determined from the following claims.

Claims (6)

1. A method for switching a PDAF in real time, the method comprising the steps of:
s1: accessing a formal software code base;
s2: importing a function of switching PDAF in real time; the functions of the real-time switch PDAF comprise: a function of turning on the PDAF and a function of turning off the PDAF;
s3: compiling software of a corresponding version according to the imported function of switching the PDAF in real time, and downloading the compiled software by the mobile phone;
s4: inputting a plurality of customized Adb commands through an Adb tool, and opening or closing a PDAF;
s5: comparing and testing a plurality of problems; the several problems include: judging whether the focusing effect or the speed problem is generated by PDAF or CAF, and the evaluation in product development needs to test the focusing effect and performance of CAF and PDAF and confirm whether the function of PDAF is switched on or not; the function of the PDAF is switched on and off in real time is realized through an import module (1) connected with the formal software code base; the method for switching the PDAF in real time is suitable for environments when the PDAF and the CAF are compatible;
the compiling process of the method comprises the following steps:
a. using an Android attribute mechanism;
b. controlling a debug _ PDAF _ onoff attribute in real time through an Adb command, and dynamically setting the value of a pool variable debug _ PDAF _ onoff to turn on or turn off the PDAF;
c. and judging whether init PD mgr is needed according to the value of the pool variable.
2. The method of switching PDAF in real time as claimed in claim 1,
in step S4, the customized Adb command matches the function of the real-time switching PDAF.
3. The method of switching PDAF in real time as claimed in claim 1,
the PDAF real-time switching method is used for debugging codes based on an Android system compiling environment;
the method for switching PDAF in real time is based on codes of HAL layer of MTK platform;
the Android system is an Android 5.0 system or a system with the Android above 5.0.
4. A system for switching PDAF in real time using the method of switching PDAF in real time as claimed in any of claims 1-3, the system comprising:
an import module (1) connected to a formal software code base; the importing module (1) imports a real-time switch PDAF function;
a compiling and downloading module (2) connected with the importing module (1); the compiling and downloading module (2) compiles the software of the corresponding version and downloads the compiled software of the corresponding version;
an Adb command execution module (3) connected with the compilation download module (2); the Adb command execution module (3) opens the PDAF or closes the PDAF by inputting a plurality of customized Adb commands;
a comparison module (4) connected with the Adb command execution module (3); the comparison module (4) compares and tests a plurality of problems; the system is suitable for environments when PDAF and CAF are compatible;
the several problems include: the problem of judging focusing effect or speed is generated by PDAF or CAF, and the evaluation in product development needs to test the focusing effect and performance of CAF and PDAF and confirm whether the function of PDAF is switched on or not.
5. The system for switching PDAF in real time as claimed in claim 4,
the compiling and downloading module (2) comprises a compiling unit which is used for compiling software of a corresponding version;
the compiling and downloading module (2) also comprises a downloading unit which is used for downloading the compiled corresponding version software.
6. The system for switching PDAF in real time as claimed in claim 4,
the customized Adb command is matched with the function of the real-time switch PDAF;
the functions of the real-time switch PDAF comprise: a function to turn on the PDAF and a function to turn off the PDAF.
CN201810005805.3A 2018-01-03 2018-01-03 Method and system for switching PDAF (PDAF) in real time Active CN108111764B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810005805.3A CN108111764B (en) 2018-01-03 2018-01-03 Method and system for switching PDAF (PDAF) in real time

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810005805.3A CN108111764B (en) 2018-01-03 2018-01-03 Method and system for switching PDAF (PDAF) in real time

Publications (2)

Publication Number Publication Date
CN108111764A CN108111764A (en) 2018-06-01
CN108111764B true CN108111764B (en) 2021-07-23

Family

ID=62218556

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810005805.3A Active CN108111764B (en) 2018-01-03 2018-01-03 Method and system for switching PDAF (PDAF) in real time

Country Status (1)

Country Link
CN (1) CN108111764B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101566943A (en) * 2008-04-24 2009-10-28 深圳市同洲电子股份有限公司 Method, terminal and system for controlling terminal software functions
CN103246586A (en) * 2013-04-19 2013-08-14 福州瑞芯微电子有限公司 Method for utilizing USB (universal serial bus) storage equipment for ADB (android debug bridge) debugging on android platform
CN103559126A (en) * 2013-10-25 2014-02-05 深圳市欧珀通信软件有限公司 Method, device and computer terminal for testing software versions
CN106649008A (en) * 2016-11-21 2017-05-10 惠州Tcl移动通信有限公司 Method and system for automatically executing mobile terminal physical startup and shutdown pressure test

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7757215B1 (en) * 2006-04-11 2010-07-13 Oracle America, Inc. Dynamic fault injection during code-testing using a dynamic tracing framework
US8106811B2 (en) * 2009-05-15 2012-01-31 Mayflower Communications Company, Inc. Antijam protected GPS-based measurement of roll rate and roll angle of spinning platforms
CN105893238A (en) * 2015-08-04 2016-08-24 乐视致新电子科技(天津)有限公司 Code debugging method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101566943A (en) * 2008-04-24 2009-10-28 深圳市同洲电子股份有限公司 Method, terminal and system for controlling terminal software functions
CN103246586A (en) * 2013-04-19 2013-08-14 福州瑞芯微电子有限公司 Method for utilizing USB (universal serial bus) storage equipment for ADB (android debug bridge) debugging on android platform
CN103559126A (en) * 2013-10-25 2014-02-05 深圳市欧珀通信软件有限公司 Method, device and computer terminal for testing software versions
CN106649008A (en) * 2016-11-21 2017-05-10 惠州Tcl移动通信有限公司 Method and system for automatically executing mobile terminal physical startup and shutdown pressure test

Also Published As

Publication number Publication date
CN108111764A (en) 2018-06-01

Similar Documents

Publication Publication Date Title
TWI649694B (en) Android dynamic framework and method thereof
CN110147326B (en) Microservice automatic test method based on Redis database
CN105573755A (en) Method and device for acquiring application Activity rendering time
CN106648685A (en) Processing method and device of intelligent terminal system and intelligent terminal
CN110659021B (en) Development and test system for micro application in mobile terminal
CN110046100B (en) Packet testing method, electronic device and medium
CN108111764B (en) Method and system for switching PDAF (PDAF) in real time
CN109284222B (en) Software unit, project testing method, device and equipment in data processing system
US11663113B2 (en) Real time fault localization using combinatorial test design techniques and test case priority selection
CN113377370A (en) File processing method and device, electronic equipment and storage medium
Vun et al. Implementation of an Android phone based video streamer
CN114385162A (en) Page editing method, device, equipment and storage medium
CN111385661B (en) Method, device, terminal and storage medium for voice control of full screen playing
CN110825370B (en) Mobile terminal application development method, device and system
Wu et al. CydiOS: A Model-Based Testing Framework for iOS Apps
CN111382076B (en) Application program testing method and device, electronic equipment and computer storage medium
CN111309583B (en) Interface overdrawing detection method, device, medium and computing equipment
CN112559346A (en) Service testing method and device
CN111338961A (en) Application debugging method and device, electronic equipment and storage medium
US11822465B2 (en) Operational multipliers for heterogeneous build architectures
JP2017228191A (en) Image processing apparatus, debug support method, and debug support program
US20180046484A1 (en) Program execution recording and playback
CN109982145A (en) A kind of intelligent television system, smart television and its control method
CN113608996B (en) Mirror image compiling test method, system, device and readable storage medium
CN114049257A (en) Image generation method, device, test terminal and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant