WO2015120778A1 - Image rendering method and apparatus, and electronic device - Google Patents

Image rendering method and apparatus, and electronic device Download PDF

Info

Publication number
WO2015120778A1
WO2015120778A1 PCT/CN2015/072310 CN2015072310W WO2015120778A1 WO 2015120778 A1 WO2015120778 A1 WO 2015120778A1 CN 2015072310 W CN2015072310 W CN 2015072310W WO 2015120778 A1 WO2015120778 A1 WO 2015120778A1
Authority
WO
WIPO (PCT)
Prior art keywords
image rendering
rendering effect
image
effect
level
Prior art date
Application number
PCT/CN2015/072310
Other languages
French (fr)
Inventor
Yufei Han
Original Assignee
Tencent Technology (Shenzhen) Company Limited
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 Tencent Technology (Shenzhen) Company Limited filed Critical Tencent Technology (Shenzhen) Company Limited
Publication of WO2015120778A1 publication Critical patent/WO2015120778A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/20Processor architectures; Processor configuration, e.g. pipelining
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2210/00Indexing scheme for image generation or computer graphics
    • G06T2210/08Bandwidth reduction

Definitions

  • the present disclosure relates to the field of image processing technologies, and in particular, to an image rendering method and apparatus, and an electronic device.
  • Image rendering is mainly applied to fields of games, graphic 3D demonstration (for example, real estate 3D demonstration), virtual simulation, and the like.
  • the number of image frames refers to the number of times that a graphics processing unit (GPU) can refresh per second, and is generally represented by frames per second (fps).
  • Each frame is a static image, and a motion illusion is produced by rapidly and continuously displaying frames.
  • a smoother and realistic animation may be obtained at a higher frame rate, and a displayed movement is smoother if the number of frames (fps) is larger.
  • a main manner of improving the number of image frames is: running a testing program before performing image rendering; testing a software and hardware configuration of an electronic device that performs image rendering, to obtain a score of the software and hardware configuration of the electronic device; and setting a corresponding image rendering effect according to the score. For example, when the score is relatively high, a relatively high image rendering effect may be set correspondingly, and when the score is relatively low, a relatively low image rendering effect may be set correspondingly, so as to ensure that the software and hardware configuration of the electronic device can correspond to a proper image rendering effect, and ensure a relatively large number of image frames.
  • the inventor of the present disclosure find in a research and practice process that the prior art at least has the following technical problems: in an image rendering process, software and hardware configuration performance of an electronic device required by image rendering is continually changed, for example, in the image rendering process, software and hardware configuration performance required by a simple scenario is different from that required by a complicated scenario, and software and hardware configuration performance required by a scenario of an open wilderness is different from that required by a scenario in which multiple persons move at the same time; although in the prior art, an initially set image rendering effect relatively properly corresponds to a software and hardware configuration of the electronic device, when image rendering needs to be performed in a complicated scenario, there is a phenomenon that it is difficult for the software and hardware configuration of the electronic device to satisfy the set image rendering effect; as a result, the number of image frames is substantially reduced, and a relatively large number of image frames cannot be ensured; and in the prior art, an obtained score of the software and hardware configuration of the electronic device only corresponds to a moment of running a testing program, and if software occupying a relatively large
  • An image rendering method is applied to an electronic device and includes:
  • An embodiment of the present invention further provides an image rendering apparatus, applied to an electronic device and including:
  • an image frame rate detecting module configured to detect an image frame rate when image rendering is performed by using a first image rendering effect
  • a first adjusting module configured to regulate an image rendering effect parameter and adjust an image rendering effect to a second image rendering effect from the first image rendering effect when the image frame rate is less than a set image frame rate, the second image rendering effect being lower than the first image rendering effect;
  • a first image rendering module configured to perform image rendering by using the second image rendering effect.
  • An embodiment of the present invention further provides an electronic device, including the foregoing image rendering apparatus.
  • FIG. 1 is a flowchart of an image rendering method according to an embodiment of the present invention
  • FIG. 2 is another flowchart of an image rendering method according to an embodiment of the present invention.
  • FIG. 3 is still another flowchart of an image rendering method according to an embodiment of the present invention.
  • FIG. 4 is yet another flowchart of an image rendering method according to an embodiment of the present invention.
  • FIG. 5 is further another flowchart of an image rendering method according to an embodiment of the present invention.
  • FIG. 6 is still further another flowchart of an image rendering method according to an embodiment of the present invention.
  • FIG. 7 is a structural block diagram of an image rendering apparatus according to an embodiment of the present invention.
  • FIG. 8 is a structural block diagram of a first adjusting module according to an embodiment of the present invention.
  • FIG. 9 is a structural block diagram of a first level-by-level adjusting unit according to an embodiment of the present invention.
  • FIG. 10 is another structural block diagram of a first level-by-level adjusting unit according to an embodiment of the present invention.
  • FIG. 11 is another structural block diagram of an image rendering apparatus according to an embodiment of the present invention.
  • FIG. 12 is a structural block diagram of a second adjusting module according to an embodiment of the present invention.
  • FIG. 13 is still another structural block diagram of an image rendering apparatus according to an embodiment of the present invention.
  • FIG. 14 is yet another structural block diagram of an image rendering apparatus according to an embodiment of the present invention.
  • FIG. 15 is a block diagram of a part of a structure of a mobile phone related to an electronic device according to an embodiment of the present invention.
  • FIG. 1 is a flowchart of an image rendering method according to an embodiment of the present invention.
  • the method is applicable to an electronic device that can perform image rendering, for example, an electronic device having a network game installed, or an electronic device having image rendering software (such as graphic 3D demonstration, and virtual simulation) installed.
  • the electronic device may be a device that can display graphics, such as a mobile phone or a notebook computer. Referring to FIG. 1, the method may include:
  • Step S100 Detect an image frame rate when image rendering is performed by using a first image rendering effect.
  • the image frame rate may be an average number of image frames processed by a GPU in a period of time.
  • the first image rendering effect may be an image rendering effect used when the electronic device starts to perform image rendering, and the first image rendering effect may be manually set by a user, may be an image rendering effect recommended by a system, or may be a set image rendering effect suitable for a score after a software and hardware configuration of the electronic device in the prior art is scored.
  • the first image rendering effect may also be an adjusted image rendering effect after the electronic device starts to perform image rendering, that is, the first image rendering effect may be an image rendering effect used after the electronic device adjusts the image rendering effect for any number of times after starting to perform image rendering.
  • Step S110 Regulate an image rendering effect parameter and adjust an image rendering effect to a second image rendering effect from the first image rendering effect if the image frame rate is less than a set image frame rate, the second image rendering effect being lower than the first image rendering effect.
  • the set image frame rate may correspond to the first image rendering effect.
  • a corresponding set image frame rate may be set under different image rendering effects, and when a current image frame rate is less than a set image frame rate corresponding to a current image rendering effect, the current image rendering effect may be adjusted to lower the image rendering effect, and improve the image frame rate.
  • the set image frame rate may also be a standard value for reflecting image smoothness (that is, the set image frame rate is a constant value), and the standard value may be determined according to an actual application situation.
  • the image rendering effect parameter corresponds to the image rendering effect, and the image rendering effect parameter may represent the image rendering effect.
  • the image rendering effect parameter may be an image quality parameter, for example, a parameter such as a full-screen floodlight parameter, a shadow level parameter, or a special effect level.
  • the second image rendering effect may be determined by using a difference between the detected image frame rate and the set image frame rate, and after the difference between the detected image frame rate and the set image frame rate is determined, an image rendering effect corresponding to the determined difference may be determined according to a correspondence between a predetermined image frame rate difference and an image rendering effect, where the determined image rendering effect is the second image rendering effect.
  • the correspondence between a predetermined image frame rate difference and an image rendering effect may be set according to an actual application situation, and is not limited in this embodiment of the present invention.
  • Step S120 Perform image rendering by using the second image rendering effect.
  • the objective of improving the image frame rate is achieved by lowering the image rendering effect and lowering the image quality.
  • the first image rendering effect and the second image rendering effect are not specified, and represent any two image rendering effects in an image rendering process.
  • image rendering is performed by using the second image rendering effect, if it is detected that the image frame rate is less than the set image frame rate, the image rendering effect may be adjusted by using the method shown in FIG. 1.
  • an image frame rate is detected when image rendering is performed by using a first image rendering effect; and an image rendering effect may be adjusted to a second image rendering effect from the first image rendering effect when the detected image frame rate is less than a set image frame rate, where the second image rendering effect is lower than the first image rendering effect, so that the image rendering effect is lowered, and the image frame rate is improved, thereby ensuring a relatively large number of image frames, and ensuring image rendering smoothness.
  • the relatively large number of image frames and the image rendering smoothness can be ensured by lowering the image rendering effect, thereby reducing the occurrence of image pause, screen stagnation and the like in the image rendering process, and ensuring visual experience of a user.
  • several levels of image rendering effects may be set, the first image rendering effect and the second image rendering effect are two levels in the set several levels of image rendering effects, a difference between neighboring levels of image rendering effects is set within a predetermined range, to ensure that each of the neighboring levels of image rendering effects changes uniformly.
  • An optional manner of ensuring that each of the neighboring levels of image rendering effects changes uniformly may be: controlling a difference between image rendering effect parameters corresponding to the neighboring levels of image rendering effects to be within a predetermined difference range, so as to ensure that a change between the levels of image rendering effects is not very obvious.
  • FIG. 2 shows another procedure of an image rendering method according to an embodiment of the present invention.
  • the method may include:
  • Step S200 Detect an image frame rate when image rendering is performed by using a first image rendering effect.
  • Step S210 If the image frame rate is less than a set image frame rate, determine each level of image rendering effect between a second image rendering effect and the first image rendering effect, and adjust the first image rendering effect to the second image rendering effect in a manner of adjusting an image rendering effect level by level.
  • the second image rendering effect is a final image rendering effect after the adjustment in step S210, and the second image rendering effect is lower than the first image rendering effect.
  • the second image rendering effect may be determined by using a difference between the detected image frame rate and a set image frame rate.
  • the image rendering effect may be adjusted to the second image rendering effect from the first image rendering effect in the manner of adjusting an image rendering effect level by level.
  • Such a level-by-level adjusting manner may be understood by using the following example: if the first image rendering effect is the sixth level of image rendering effect, and the second image rendering effect is the third level of image rendering effect, because in this embodiment of the present invention, several levels of image rendering effects are preset, the fifth level of image rendering effect and the fourth level of image rendering effect further exist between the first image rendering effect and the second image rendering effect.
  • the image rendering effect may be first adjusted to the fifth level of image rendering effect from the first image rendering effect, then the fifth level of image rendering effect is adjusted to the fourth level of image rendering effect, and finally the fourth level of image rendering effect is adjusted to the second image rendering effect, thereby implementing adjustment from the first image rendering effect to the second image rendering effect.
  • Step S210 shown in FIG. 2 may be regarded as a preferred implementation manner of step S110 shown in FIG. 1.
  • Step S220 Perform image rendering by using the second image rendering effect.
  • the first image rendering effect may also be directly adjusted to the second image rendering effect, but in such a manner, when an effect difference between the first image rendering effect and the second image rendering effect is relatively large, the phenomenon of image pause may occur, but when the detected image frame rate is lowered, the objective of improving the image frame rate can also be achieved.
  • FIG. 3 shows still another procedure of an image rendering method according to an embodiment of the present invention.
  • the method may include:
  • Step S300 Detect an image frame rate when image rendering is performed by using a first image rendering effect.
  • Step S310 Determine, when the image frame rate is less than a set image frame rate and load of an electronic device is greater than first load, each level of image rendering effect between a second image rendering effect and the first image rendering effect, and adjust the first image rendering effect to the second image rendering effect in a manner of adjusting an image rendering effect level by level, where one level of image rendering effect is adjusted every a first time.
  • the load of the electronic device may be hardware load of an electronic device related to image rendering, such as load of a CPU (utilization of the CPU), load of memory (a use condition of the memory), or load of a graphics card (a use condition of the graphics card).
  • the first load may be a threshold when preset load is relatively high, and the setting of the first time may be determined according to a specific application situation, and is not limited in this embodiment of the present invention, where the second image rendering effect is lower than the first image rendering effect.
  • the sixth level of image rendering effect when the load of the electronic device is greater than the first load, when a first first time arrives, the sixth level of image rendering effect may be adjusted to the fifth level of image rendering effect, and when a second first time arrives, the fifth level of image rendering effect may be adjusted to the fourth level of image rendering effect, and so on, until the fourth level of image rendering effect is adjusted to the third level of image rendering effect.
  • Step S320 Determine, when the image frame rate is less than the set image frame rate and the load of the electronic device is less than the first load, each level of image rendering effect between the second image rendering effect and the first image rendering effect, and adjust the first image rendering effect to the second image rendering effect in the manner of adjusting an image rendering effect level by level, where one level of image rendering effect is adjusted every a second time.
  • the second time is longer than the first time, and the setting of the second time may be determined according to a specific application situation, and is not limited in this embodiment of the present invention.
  • Step S330 Perform image rendering by using the second image rendering effect.
  • the image rendering effect when the image frame rate is relatively low and the load is relatively high, the image rendering effect may be lowered level by level rapidly and smoothly, thereby improving the image frame rate as soon as possible, and a specific level-by-level adjusting rate may be set according to a specific application situation; and when the image frame rate is relatively low and the load is not high, the image rendering effect is lowered level by level slowly and smoothly, thereby ensuring stable image quality in the process of adjusting the image rendering effect, and ensuring visual experience of a user.
  • FIG. 4 shows yet another procedure of an image rendering method according to an embodiment of the present invention.
  • the method may include:
  • Step S400 Detect an image frame rate.
  • Step S410 Adjust, if the detected image frame rate is not less than a set image frame rate and load of electronic device is less than second load, a first image rendering effect to a third image rendering effect, where the third image rendering effect is higher than the first image rendering effect.
  • the third image rendering effect may be determined according to a difference between the detected image frame rate and the set image frame rate, and apparently, may also be determined with reference to the difference between the detected image frame rate and the set image frame rate, and a difference between the load of the electronic device and the second load.
  • the second load may correspond to low load of the electronic device, and the low load of the electronic device may be determined according to a specific application situation.
  • the first image rendering effect may be adjusted to the third image rendering effect in a manner of adjusting an image rendering effect level by level, where one level of image rendering effect is adjusted every a third time.
  • the image rendering effect may be raised level by level slowly and smoothly (for example, every 35 seconds), to improve image quality and improve visual experience of a user.
  • Step S420 Perform image rendering by using the third image rendering effect.
  • the method shown in FIG. 4 is applicable to the methods shown in FIG. 1 to FIG. 3.
  • FIG. 5 shows further another procedure of an image rendering method according to an embodiment of the present invention.
  • the method may include:
  • Step S500 Detect software and hardware configuration information of an electronic device.
  • Step S510 Set a corresponding image rendering effect for the detected software and hardware configuration information according to a correspondence between predetermined software and hardware configuration information and an image rendering effect.
  • a score of the detected software and hardware configuration information may be given, and a corresponding image rendering effect is set for the given score according to a correspondence between a predetermined score of software and hardware configuration information and an image rendering effect.
  • a manner of establishing the correspondence between a predetermined score of software and hardware configuration information and an image rendering effect may be as follows:
  • Step S1 Collect a large amount of software and hardware configuration information of the electronic device.
  • an information collection and statistics tool may be added to the electronic device, to obtain a large amount of software and hardware configuration information of a computer used by a user, such as a CPU, memory, a hard disk, and a graphics card.
  • a computer used by a user such as a CPU, memory, a hard disk, and a graphics card.
  • deduplication is performed to obtain each target environment, such as an xp system, a Core 1.2-G master frequency CPU, 2-G memory, a 5600-GT graphics card, and an 800-G hard disk.
  • Some software and hardware configuration information with representative significance is selected according to the information, and then a same image rendering testing environment is built for the selected software and hardware configuration information.
  • Step S2 Simulate establishment of an image rendering testing environment according to the collected software and hardware configuration information, establish a key software and hardware testing environment and perform image rendering testing in the testing environment, and perform scoring according to parameters such as the number of frames, image quality performance, and CPU and GPU memory occupation.
  • Scoring is performing data quantization processing on an image rendering capability of the software and hardware configuration information, a higher score indicates that the software and hardware configuration information corresponds to a higher image rendering capability, and a lower score indicates that the software and hardware configuration information corresponds to a lower image rendering capability.
  • Step S3 Ensure that software and hardware configuration information of each score corresponds to an image rendering effect of a set image frame rate, and establish a correspondence between the software and hardware configuration information of each score and a corresponding image rendering effect.
  • one image rendering effect may correspond to software and hardware configuration information within one score interval, and because the image rendering effect is reflected by an image rendering effect parameter, one set of image rendering effect parameters may correspond to software and hardware configuration information within one score interval.
  • the score may be corrected, and a testing environment that cannot be established may be manually set by using a hardware parameter and an experience value.
  • Step S520 Perform, at the beginning of image rendering, image rendering by using the set image rendering effect.
  • Step S530 Detect an image frame rate when image rendering is performed by using a first image rendering effect.
  • the first image rendering effect may be an image rendering effect used at the beginning of image rendering, and may also be an image rendering effect used after the electronic device adjusts the image rendering effect for any number of times after starting to perform image rendering.
  • Step S540 Regulate an image rendering effect parameter and adjust an image rendering effect to a second image rendering effect from the first image rendering effect if the image frame rate is less than a set image frame rate, the second image rendering effect being lower than the first image rendering effect.
  • Step S550 Perform image rendering by using the second image rendering effect.
  • FIG. 6 is still further another flowchart of an image rendering method according to an embodiment of the present invention. Referring to FIG. 6, the method may include:
  • Step S600 Detect an image frame rate when image rendering is performed by using a first image rendering effect.
  • the image frame rate may be detected after every a certain time interval, for example, the image frame rate is detected every 10 seconds.
  • the setting of a specific value may be further set according to an actual use condition.
  • Step S610 Determine whether the image frame rate is less than a set image frame rate, if yes, perform step S620, and if not, perform step S660.
  • the set image frame rate may be set as that an average number of frames in 10 seconds is 20, when the image frame rate is detected per 10 seconds, if the average number of frames is less than 20, step S620 is performed, and if not, step S660 is performed.
  • the setting of the specific value may be further set according to an actual use condition.
  • Step S620 Detect whether load of an electronic device is greater than first load, if yes, perform step S630, and if not, perform step S640.
  • Step S630 Determine each level of image rendering effect between a second image rendering effect and the first image rendering effect, and adjust the first image rendering effect to the second image rendering effect in a manner of adjusting an image rendering effect level by level, where one level of image rendering effect is adjusted every a first time, and the second image rendering effect is lower than the first image rendering effect.
  • the second image rendering effect is an image rendering effect that needs to be adjusted to when the image frame rate is less than the set image frame rate, and multiple manners of determining the second image rendering effect have been described above, which are not described in detail herein again.
  • Step S640 Determine each level of image rendering effect between the second image rendering effect and the first image rendering effect, and adjust the first image rendering effect to the second image rendering effect in the manner of adjusting an image rendering effect level by level, where one level of image rendering effect is adjusted every a second time.
  • Step S650 Perform image rendering by using the second image rendering effect.
  • the second time is longer than the first time.
  • the setting of the first time may be determined according to a specific application situation, as long as it can be ensured that the image rendering effect can be lowered rapidly and smoothly level by level within the first time; and the setting of the second time may be determined according to a specific application situation, as long as it can be ensured that the image rendering effect can be lowered level by level slowly and smoothly within the second time.
  • the first time may be 10 seconds
  • the second time may be 30 seconds.
  • Step S660 Detect whether the load of the electronic device is less than second load, if yes, perform step S670, and if not, perform step S690.
  • the second load may correspond to low load of the electronic device, and the low load of the electronic device may be determined according to a specific application situation.
  • Step S670 Determine each level of image rendering effect between a third image rendering effect and the first image rendering effect, and adjust the first image rendering effect to the third image rendering effect in the manner of adjusting an image rendering effect level by level, where one level of image rendering effect is adjusted every a third time, and the third image rendering effect is higher than the first image rendering effect.
  • the setting of the third time may be determined according to a specific application situation, as long as it can be ensured that the image rendering effect can be raised level by level slowly and smoothly.
  • Step S680 Perform image rendering by using the third image rendering effect.
  • Step S690 End the procedure.
  • adjusted image rendering effect information and corresponding electronic device load information may be saved.
  • corresponding image rendering effect information may be directly invoked according to current electronic device load information, and image rendering is performed by using an image rendering effect corresponding to the invoked image rendering effect information, thereby ensuring that the user can directly match a better image rendering effect when enabling the image rendering function next time.
  • the image rendering method provided by this embodiment of the present invention may be applied to a network game field.
  • a game image may be rendered in a network game by using the image rendering method provided by this embodiment of the present invention, so as to ensure a relatively large number of image frames during a game, and ensure game smoothness.
  • the electronic device when the electronic device renders the scenario in which multiple persons battle on a same screen under the first image rendering effect, if it is detected that the image frame rate is less than the set image frame rate, the first image rendering effect may be adjusted to the second image rendering effect in the manner of adjusting an image rendering effect level by level, where the second image rendering effect is lower than the first image rendering effect.
  • the scenario in which multiple persons battle on a same screen may be rendered under a relatively low image rendering effect, so as to ensure the relatively large number of image frames, and ensure the game smoothness.
  • the image rendering effect may be improved in the manner of adjusting an image rendering effect level by level, thereby ensuring image quality, and maintaining the relatively large number of image frames, and also ensuring the game smoothness and the image quality.
  • FIG. 7 is a structural block diagram of an image rendering apparatus according to an embodiment of the present invention, and the apparatus is applicable to an electronic device.
  • the apparatus may include:
  • an image frame rate detecting module 100 configured to detect an image frame rate when image rendering is performed by using a first image rendering effect
  • a first adjusting module 200 configured to regulate an image rendering effect parameter and adjust an image rendering effect to a second image rendering effect from the first image rendering effect when the image frame rate is less than a set image frame rate, the second image rendering effect being lower than the first image rendering effect;
  • a first image rendering module 300 configured to perform image rendering by using the second image rendering effect.
  • a manner of determining the second image rendering effect may be: determining a difference between the detected image frame rate and the set image frame rate; and determining, according to a correspondence between a predetermined image frame rate difference and an image rendering effect, an image rendering effect corresponding to the determined difference, where the determined image rendering effect is the second image rendering effect.
  • the second image rendering effect may also be determined in another manner.
  • the second image rendering effect may be determined with reference to an image frame rate difference (a difference between the detected image frame rate and the set image frame rate), and an electronic device load difference (a difference between current load and predetermined load).
  • FIG. 8 shows an optional structure of the first adjusting module 200.
  • the first adjusting module 200 may include:
  • a first level-by-level adjusting unit 210 configured to determine, according to preset several levels of image rendering effects, each level of image rendering effect between the second image rendering effect and the first image rendering effect, and adjust the first image rendering effect to the second image rendering effect in a manner of adjusting an image rendering effect level by level.
  • FIG. 9 shows an optional structure of the first level-by-level adjusting unit 210.
  • the first level-by-level adjusting unit 210 may include:
  • a first adjustment executing subunit 2101 configured to adjust, when the image frame rate is less than the set image frame rate and load of the electronic device is greater than first load, the first image rendering effect to the second image rendering effect in the manner of adjusting an image rendering effect level by level, where one level of image rendering effect is adjusted every a first time.
  • the setting of the first time may be determined according to a specific application situation, as long as it can be ensured that the image rendering effect can be lowered level by level rapidly and smoothly within the first time.
  • FIG. 10 shows another optional structure of the first level-by-level adjusting unit 210.
  • the first level-by-level adjusting unit 210 may further include:
  • a second adjustment executing subunit 2102 configured to adjust, when the image frame rate is less than the set image frame rate and the load of the electronic device is less than the first load, the first image rendering effect to the second image rendering effect in the manner of adjusting an image rendering effect level by level, where one level of image rendering effect is adjusted every a second time, and the second time is longer than the first time.
  • the setting of the second time may be determined according to a specific application situation, as long as it can be ensured that the image rendering effect can be lowered level by level slowly and smoothly within the second time.
  • FIG. 11 is another structural block diagram of an image rendering apparatus according to an embodiment of the present invention.
  • the image rendering apparatus shown in FIG. 11 may further include:
  • a second adjusting module 400 configured to adjust, when the image frame rate is not less than the set image frame rate and load of the electronic device is less than second load, the first image rendering effect to a third image rendering effect, where the third image rendering effect is higher than the first image rendering effect.
  • FIG. 12 shows an optional structure of the second adjusting module 400.
  • the second adjusting module 400 may include:
  • a second level-by-level adjusting unit 410 configured to determine each level of image rendering effect between the third image rendering effect and the first image rendering effect according to preset several levels of image rendering effects, and adjust the first image rendering effect to the third image rendering effect in a manner of adjusting an image rendering effect level by level.
  • each of neighboring levels of image rendering effects changes uniformly.
  • the first image rendering effect may be adjusted to the third image rendering effect in the manner of adjusting an image rendering effect level by level, where one level of image rendering effect is adjusted every a third time.
  • the setting of the third time may be determined according to a specific application situation, as long as it can be ensured that the image rendering effect can be raised level by level slowly and smoothly.
  • FIG. 13 is still another structural block diagram of an image rendering apparatus according to an embodiment of the present invention.
  • the image rendering apparatus shown in FIG. 13 may further include:
  • a configuration information detecting module 500 configured to detect software and hardware configuration information of the electronic device before image rendering is performed
  • a corresponding image rendering effect setting module 600 configured to set a corresponding image rendering effect for the detected software and hardware configuration information according to a correspondence between predetermined software and hardware configuration information and an image rendering effect;
  • an initial rendering module 700 configured to perform, at the beginning of image rendering, image rendering by using the image rendering effect set by the corresponding image rendering effect setting module 600.
  • FIG. 14 is yet another structural block diagram of an image rendering apparatus according to an embodiment of the present invention.
  • the image rendering apparatus shown in FIG. 14 may further include:
  • an information saving module 800 configured to save adjusted image rendering effect information and corresponding electronic device load information each time after the image rendering effect is adjusted;
  • a rendering invoking module 900 configured to invoke, when an image rendering function is enabled next time, corresponding image rendering effect information according to current electronic device load information, and perform image rendering by using an image rendering effect corresponding to the invoked image rendering effect information.
  • an image rendering process when an image frame rate is less than a set image frame rate, a relatively large number of image frames and image rendering smoothness can be ensured by lowering an image rendering effect, thereby reducing the occurrence of image pause, screen stagnation and the like in the image rendering process, and ensuring visual experience of a user.
  • An embodiment of the present invention further provides an electronic device, where the electronic device includes the foregoing image rendering apparatus, and for specific description of the image rendering apparatus, reference may be made to the description of corresponding parts in FIG. 7 to FIG. 14.
  • the electronic device may include a mobile phone, a tablet computer, a personal digital assistant (PDA), a Point of Sales (POS), a vehicle-mounted computer, and the like. That the electronic device is a mobile phone is used as an example:
  • FIG. 15 shows a block diagram of a part of a structure of a mobile phone related to an electronic device according to an embodiment of the present invention.
  • the mobile phone includes components such as a radio frequency (RF) circuit 1110, a memory 1120, an input unit 1130, a display unit 1140, a sensor 1150, an audio circuit 1160, a wireless fidelity (WiFi) module 1170, a processor 1180, and a power supply 1190.
  • RF radio frequency
  • the RF circuit 1110 may be configured to receive and send signals during an information receiving and sending process or a call process. Particularly, the RF circuit 1110 receives downlink information from a base station, then delivers the downlink information to the processor 1180 for processing, and sends related uplink data to the base station.
  • the RF circuit includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (LNA), and a duplexer.
  • the RF circuit 1110 may also communicate with a network and another device by wireless communication.
  • the wireless communication may use any communications standard or protocol, which includes, but is not limited to, Global System for Mobile communications (GSM), a General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), e-mail, Short Messaging Service (SMS), and the like.
  • GSM Global System for Mobile communications
  • GPRS General Packet Radio Service
  • CDMA Code Division Multiple Access
  • WCDMA Wideband Code Division Multiple Access
  • LTE Long Term Evolution
  • SMS Short Messaging Service
  • the memory 1120 may be configured to store a software program and module.
  • the processor 1180 runs the software program and module stored in the memory 1120, to implement various functional applications and performs data processing of the mobile phone.
  • the memory 1120 may mainly include a program storage area and a data storage area.
  • the program storage area may store an operating system, an application program required by at least one function (such as a sound playback function and an image display function), and the like.
  • the data storage area may store data (such as audio data and an address book) created according to use of the mobile phone, and the like.
  • the memory 1120 may include a high speed random access memory (RAM), and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory, or another volatile solid-state storage device.
  • RAM high speed random access memory
  • the input unit 1130 may be configured to receive input digit or character information, and generate key signal input related to the user setting and function control of the mobile phone.
  • the input unit 1130 may include a touch panel 1131 and another input device 1132.
  • the touch panel 1131 may also be referred to as a touch screen, and may collect a touch operation of a user on or near the touch panel (such as an operation of a user on or near the touch panel 1131 by using any suitable object or attachment, such as a finger or a touch pen), and drive a corresponding connection apparatus according to a preset program.
  • the touch panel 1131 may include two parts: a touch detection apparatus and a touch controller.
  • the touch detection apparatus detects a touch position of the user, detects a signal generated by the touch operation, and transfers the signal to the touch controller.
  • the touch controller receives touch information from the touch detection apparatus, converts the touch information into touch point coordinates, and sends the touch point coordinates to the processor 1180. Moreover, the touch controller can receive and execute a command sent from the processor 1180.
  • the touch panel 1131 may be implemented by using various types, such as a resistive type, a capacitance type, an infrared type, and a surface acoustic wave type.
  • the input unit 1130 may further include the another input device 1132.
  • the another input device 1132 may include, but is not limited to, one or more of a physical keyboard, a functional key (such as a volume control key or a switch key), a track ball, a mouse, and a joystick.
  • the display unit 1140 may be configured to display information input by the user or information provided for the user, and various menus of the mobile phone.
  • the display unit 1140 may include a display panel 1141.
  • the display panel 1141 may be configured by using a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
  • the touch panel 1131 may cover the display panel 1141. After detecting a touch operation on or near the touch panel 1131, the touch panel 1131 transfers the touch operation to the processor 1180, so as to determine a type of a touch event. Then, the processor 1180 provides corresponding visual output on the display panel 1141 according to the type of the touch event.
  • the touch panel 1131 and the display panel 1141 are used as two separate parts to implement input and output functions of the mobile phone, in some embodiments, the touch panel 1131 and the display panel 1141 may be integrated to implement the input and output functions of the mobile phone.
  • the mobile phone may further include at least one sensor 1150, such as an optical sensor, a motion sensor, and other sensors.
  • the optical sensor may include an ambient light sensor and a proximity sensor.
  • the ambient light sensor may adjust luminance of the display panel 1141 according to brightness of the ambient light.
  • the proximity sensor may switch off the display panel 1141 and/or backlight when the mobile phone is moved to the ear.
  • an acceleration sensor may detect magnitude of accelerations at various directions (generally on three axes), may detect magnitude and a direction of the gravity when static, and may be may be applied to an application that recognizes the attitude of the mobile phone (for example, switching between landscape orientation and portrait orientation, a related game, and magnetometer attitude calibration), a function related to vibration recognition (such as a pedometer and a knock).
  • Other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which may be configured in the mobile phone are not further described herein.
  • the audio circuit 1160, a loudspeaker 1161, and a microphone 1162 may provide audio interfaces between the user and the mobile phone.
  • the audio circuit 1160 may convert received audio data into an electric signal and transmit the electric signal to the loudspeaker 1161.
  • the loudspeaker 1161 converts the electric signal into a sound signal for output.
  • the microphone 1162 converts a collected sound signal into an electric signal.
  • the audio circuit 1160 receives the electric signal and converts the electric signal into audio data, and outputs the audio data to the processor 1180 for processing. Then, the processor 1180 sends the audio data to, for example, another mobile phone by using the RF circuit 1110, or outputs the audio data to the memory 1120 for further processing.
  • WiFi is a short distance wireless transmission technology.
  • the mobile phone may help, by using the WiFi module 1170, a user to receive and send an e-mail, browse a webpage, and access stream media, and the like, which provides wireless broadband Internet access for the user.
  • FIG. 15 shows the WiFi module 1170, it may be understood that, the WiFi module is not a necessary component of the mobile phone, and when required, the WiFi module may be ignored as long as the scope of the essence of the present disclosure is not changed.
  • the processor 1180 is a control center of the mobile phone, and connects to various parts of the whole mobile phone by using various interfaces and lines. By running or executing the software program and/or module stored in the memory 1120, and invoking data stored in the memory 1120, the processor 1180 performs various functions and data processing of the mobile phone, thereby performing overall monitoring on the mobile phone.
  • the processor 1180 may include one or more processing units.
  • the processor 1180 may integrate an application processor and a modem.
  • the application processor mainly processes an operating system, a user interface, an application program, and the like.
  • the modem mainly processes wireless communication. It may be understood that, the foregoing modem may also not be integrated into the processor 1180.
  • the mobile phone further includes the power supply 1190 (such as a battery) for supplying power to the components.
  • the power supply may be logically connected to the processor 1180 by using a power supply management system, thereby implementing functions, such as charging, discharging, and power consumption management, by using the power supply management system.
  • the mobile phone may further include a camera, a Bluetooth module, and the like, which are not further described herein.
  • the processor 1180 included in the electronic device further has the following functions:
  • the methods or algorithm steps may be directly implemented by hardware, a software module executed by a processor, or a combination thereof.
  • the software module may be placed in a RAM, memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or a storage medium in any other form well-known in the technical field.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Graphics (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

An image rendering method and apparatus, and an electronic device are provided. The method includes: detecting an image frame rate when image rendering is performed by using a first image rendering effect (S100); regulating an image rendering effect parameter and adjusting an image rendering effect to a second image rendering effect from the first image rendering effect if the image frame rate is less than a set image frame rate, the second image rendering effect being lower than the first image rendering effect (S110); and performing image rendering by using the second image rendering effect (S120).

Description

IMAGE RENDERING METHOD AND APPARATUS, AND ELECTRONIC DEVICE
FIELD OF THE TECHNOLOGY
The present disclosure relates to the field of image processing technologies, and in particular, to an image rendering method and apparatus, and an electronic device.
BACKGROUND OF THE DISCLOSURE
Image rendering is mainly applied to fields of games, graphic 3D demonstration (for example, real estate 3D demonstration), virtual simulation, and the like. To ensure image rendering smoothness, it is very necessary to ensure a relatively large number of image frames. The number of image frames refers to the number of times that a graphics processing unit (GPU) can refresh per second, and is generally represented by frames per second (fps). Each frame is a static image, and a motion illusion is produced by rapidly and continuously displaying frames. A smoother and realistic animation may be obtained at a higher frame rate, and a displayed movement is smoother if the number of frames (fps) is larger.
In the prior art, a main manner of improving the number of image frames is: running a testing program before performing image rendering; testing a software and hardware configuration of an electronic device that performs image rendering, to obtain a score of the software and hardware configuration of the electronic device; and setting a corresponding image rendering effect according to the score. For example, when the score is relatively high, a relatively high image rendering effect may be set correspondingly, and when the score is relatively low, a relatively low image rendering effect may be set correspondingly, so as to ensure that the software and hardware configuration of the electronic device can correspond to a proper image rendering effect, and ensure a relatively large number of image frames.
The inventor of the present disclosure find in a research and practice process that the prior art at least has the following technical problems: in an image rendering process, software and hardware configuration performance of an electronic device required by image rendering is continually changed, for example, in the image rendering process, software and hardware configuration performance required by a simple scenario is different from that required by a complicated scenario, and software and hardware configuration performance required by a scenario of an open wilderness is different from that required by a scenario in which multiple persons move at the same time; although in the prior art, an initially set image rendering effect relatively properly corresponds to a software and hardware configuration of the electronic device, when image rendering needs to be performed in a complicated scenario, there is a phenomenon that it is difficult for the software and hardware configuration of the electronic device to satisfy the set image rendering effect; as a result, the number of image frames is substantially reduced, and a relatively large number of image frames cannot be ensured; and in the prior art, an obtained score of the software and hardware configuration of the electronic device only corresponds to a moment of running a testing program, and if software occupying a relatively large resource is run during running of the testing program, or software occupying a relatively large resource is enabled in an actual image rendering process, the properness of the set image rendering effect and the software and hardware configuration of the electronic device is affected, the relatively large number of image frames cannot be ensured, and image rendering smoothness is affected.
SUMMARY
To achieve the foregoing objectives, the embodiments of the present invention provide the following technical solutions:
An image rendering method is applied to an electronic device and includes:
detecting an image frame rate when image rendering is performed by using a first image rendering effect;
regulating an image rendering effect parameter and adjusting an image rendering effect to a second image rendering effect from the first image rendering effect if the image frame rate is less than a set image frame rate, the second image rendering effect being lower than the first image rendering effect; and
performing image rendering by using the second image rendering effect.
An embodiment of the present invention further provides an image rendering apparatus, applied to an electronic device and including:
an image frame rate detecting module, configured to detect an image frame rate when image rendering is performed by using a first image rendering effect;
a first adjusting module, configured to regulate an image rendering effect parameter and adjust an image rendering effect to a second image rendering effect from the first image rendering effect when the image frame rate is less than a set image frame rate, the second image rendering effect being lower than the first image rendering effect; and
a first image rendering module, configured to perform image rendering by using the second image rendering effect.
An embodiment of the present invention further provides an electronic device, including the foregoing image rendering apparatus.
BRIEF DESCRIPTION OF THE DRAWINGS
To describe the technical solutions in the embodiments of the present invention or in the prior art more clearly, the following briefly introduces the accompanying drawings required for describing the embodiments or the prior art. Apparently, the accompanying drawings in the following description are merely some embodiments of the present invention, and a person of ordinary skill in the art may still derive other drawings from these accompanying drawings without creative efforts.
FIG. 1 is a flowchart of an image rendering method according to an embodiment of the present invention;
FIG. 2 is another flowchart of an image rendering method according to an embodiment of the present invention;
FIG. 3 is still another flowchart of an image rendering method according to an embodiment of the present invention;
FIG. 4 is yet another flowchart of an image rendering method according to an embodiment of the present invention;
FIG. 5 is further another flowchart of an image rendering method according to an embodiment of the present invention;
FIG. 6 is still further another flowchart of an image rendering method according to an embodiment of the present invention;
FIG. 7 is a structural block diagram of an image rendering apparatus according to an embodiment of the present invention;
FIG. 8 is a structural block diagram of a first adjusting module according to an embodiment of the present invention;
FIG. 9 is a structural block diagram of a first level-by-level adjusting unit according to an embodiment of the present invention;
FIG. 10 is another structural block diagram of a first level-by-level adjusting unit according to an embodiment of the present invention;
FIG. 11 is another structural block diagram of an image rendering apparatus according to an embodiment of the present invention;
FIG. 12 is a structural block diagram of a second adjusting module according to an embodiment of the present invention;
FIG. 13 is still another structural block diagram of an image rendering apparatus according to an embodiment of the present invention;
FIG. 14 is yet another structural block diagram of an image rendering apparatus according to an embodiment of the present invention; and
FIG. 15 is a block diagram of a part of a structure of a mobile phone related to an electronic device according to an embodiment of the present invention.
DESCRIPTION OF EMBODIMENTS
To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the following clearly and completely describes the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Apparently, the described embodiments are a part rather than all of the embodiments of the present invention. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present disclosure.
FIG. 1 is a flowchart of an image rendering method according to an embodiment of the present invention. The method is applicable to an electronic device that can perform image rendering, for example, an electronic device having a network game installed, or an electronic device having image rendering software (such as graphic 3D demonstration, and virtual simulation) installed. The electronic device may be a device that can display graphics, such as a mobile phone or a notebook computer. Referring to FIG. 1, the method may include:
Step S100: Detect an image frame rate when image rendering is performed by using a first image rendering effect.
The image frame rate may be an average number of image frames processed by a GPU in a period of time.
Optionally, the first image rendering effect may be an image rendering effect used when the electronic device starts to perform image rendering, and the first image rendering effect may be manually set by a user, may be an image rendering effect recommended by a system, or may be a set image rendering effect suitable for a score after a software and hardware configuration of the electronic device in the prior art is scored.
Optionally, the first image rendering effect may also be an adjusted image rendering effect after the electronic device starts to perform image rendering, that is, the first image rendering effect may be an image rendering effect used after the electronic device adjusts the image rendering effect for any number of times after starting to perform image rendering.
Step S110: Regulate an image rendering effect parameter and adjust an image rendering effect to a second image rendering effect from the first image rendering effect if the image frame rate is less than a set image frame rate, the second image rendering effect being lower than the first image rendering effect.
Optionally, the set image frame rate may correspond to the first image rendering effect. In this embodiment of the present invention, a corresponding set image frame rate may be set under different image rendering effects, and when a current image frame rate is less than a set image frame rate corresponding to a current image rendering effect, the current image rendering effect may be adjusted to lower the image rendering effect, and improve the image frame rate.
Optionally, the set image frame rate may also be a standard value for reflecting image smoothness (that is, the set image frame rate is a constant value), and the standard value may be determined according to an actual application situation.
The image rendering effect parameter corresponds to the image rendering effect, and the image rendering effect parameter may represent the image rendering effect. The image rendering effect parameter may be an image quality parameter, for example, a parameter such as a full-screen floodlight parameter, a shadow level parameter, or a special effect level.
Optionally, the second image rendering effect may be determined by using a difference between the detected image frame rate and the set image frame rate, and after the difference between the detected image frame rate and the set image frame rate is determined, an image rendering effect corresponding to the determined difference may be determined according to a correspondence between a predetermined image frame rate difference and an image rendering effect, where the determined image rendering effect is the second image rendering effect. The correspondence between a predetermined image frame rate difference and an image rendering effect may be set according to an actual application situation, and is not limited in this embodiment of the present invention.
Step S120: Perform image rendering by using the second image rendering effect.
Because the second image rendering effect is lower than the first image rendering effect, when the image frame rate is less than the set image frame rate, the objective of improving the image frame rate is achieved by lowering the image rendering effect and lowering the image quality.
It should be noted that, the first image rendering effect and the second image rendering effect are not specified, and represent any two image rendering effects in an image rendering process. When image rendering is performed by using the second image rendering effect, if it is detected that the image frame rate is less than the set image frame rate, the image rendering effect may be adjusted by using the method shown in FIG. 1.
According to the image rendering method provided by this embodiment of the present invention, an image frame rate is detected when image rendering is performed by using a first image rendering effect; and an image rendering effect may be adjusted to a second image rendering effect from the first image rendering effect when the detected image frame rate is less than a set image frame rate, where the second image rendering effect is lower than the first image rendering effect, so that the image rendering effect is lowered, and the image frame rate is improved, thereby ensuring a relatively large number of image frames, and ensuring image rendering smoothness. In this embodiment of the present invention, in an image rendering process, when the image frame rate is less than the set image frame rate, the relatively large number of image frames and the image rendering smoothness can be ensured by lowering the image rendering effect, thereby reducing the occurrence of image pause, screen stagnation and the like in the image rendering process, and ensuring visual experience of a user.
Optionally, in this embodiment of the present invention, several levels of image rendering effects may be set, the first image rendering effect and the second image rendering effect are two levels in the set several levels of image rendering effects, a difference between neighboring levels of image rendering effects is set within a predetermined range, to ensure that each of the neighboring levels of image rendering effects changes uniformly. An optional manner of ensuring that each of the neighboring levels of image rendering effects changes uniformly may be: controlling a difference between image rendering effect parameters corresponding to the neighboring levels of image rendering effects to be within a predetermined difference range, so as to ensure that a change between the levels of image rendering effects is not very obvious. Using an example in which 7 levels of image rendering effects are set, a difference between the seventh level of image rendering effect and the sixth level of image rendering effect is set within a predetermined range, a difference between the sixth level of image rendering effect and the fifth level of image rendering effect is also set within the predetermined range, and so on, so as to ensure that a difference between neighboring levels of image rendering effects in the 7 levels of image rendering effects is set within the predetermined range, thereby implementing that each of the neighboring levels of image rendering effects changes uniformly, so that a change between the neighboring levels of image rendering effects is not very obvious. On this basis, FIG. 2 shows another procedure of an image rendering method according to an embodiment of the present invention. Referring to FIG. 2, the method may include:
Step S200: Detect an image frame rate when image rendering is performed by using a first image rendering effect.
Step S210: If the image frame rate is less than a set image frame rate, determine each level of image rendering effect between a second image rendering effect and the first image rendering effect, and adjust the first image rendering effect to the second image rendering effect in a manner of adjusting an image rendering effect level by level.
The second image rendering effect is a final image rendering effect after the adjustment in step S210, and the second image rendering effect is lower than the first image rendering effect. Optionally, the second image rendering effect may be determined by using a difference between the detected image frame rate and a set image frame rate. On the basis of presetting several levels of image rendering effects, and ensuring that each of neighboring levels of image rendering effects changes uniformly, in this embodiment of the present invention, after each level of image rendering effect between the second image rendering effect and the first image rendering effect is determined, the image rendering effect may be adjusted to the second image rendering effect from the first image rendering effect in the manner of adjusting an image rendering effect level by level.
Such a level-by-level adjusting manner may be understood by using the following example: if the first image rendering effect is the sixth level of image rendering effect, and the second image rendering effect is the third level of image rendering effect, because in this embodiment of the present invention, several levels of image rendering effects are preset, the fifth level of image rendering effect and the fourth level of image rendering effect further exist between the first image rendering effect and the second image rendering effect. In this embodiment of the present invention, by using the level-by-level adjusting manner, the image rendering effect may be first adjusted to the fifth level of image rendering effect from the first image rendering effect, then the fifth level of image rendering effect is adjusted to the fourth level of image rendering effect, and finally the fourth level of image rendering effect is adjusted to the second image rendering effect, thereby implementing adjustment from the first image rendering effect to the second image rendering effect.
Because each of the neighboring levels of image rendering effects changes uniformly, adjustment of the first image rendering effect to the second image rendering effect in the level-by-level adjusting manner can ensure that in a process of adjusting an image rendering effect, the image rendering effect is adjusted smoothly and seamlessly, the phenomenon such as image pause in the process of adjusting an image rendering effect is reduced, and visual experience of a user is ensured.
Step S210 shown in FIG. 2 may be regarded as a preferred implementation manner of step S110 shown in FIG. 1.
Step S220: Perform image rendering by using the second image rendering effect.
Apparently, in this embodiment of the present invention, the first image rendering effect may also be directly adjusted to the second image rendering effect, but in such a manner, when an effect difference between the first image rendering effect and the second image rendering effect is relatively large, the phenomenon of image pause may occur, but when the detected image frame rate is lowered, the objective of improving the image frame rate can also be achieved.
On the basis of adjusting the image rendering effect level by level, a consideration factor of load of an electronic device may be further added to the image rendering method provided by this embodiment of the present invention, and the load of the electronic device may determine a level-by-level adjusting rate. Correspondingly, FIG. 3 shows still another procedure of an image rendering method according to an embodiment of the present invention. Referring to FIG. 3, the method may include:
Step S300: Detect an image frame rate when image rendering is performed by using a first image rendering effect.
Step S310: Determine, when the image frame rate is less than a set image frame rate and load of an electronic device is greater than first load, each level of image rendering effect between a second image rendering effect and the first image rendering effect, and adjust the first image rendering effect to the second image rendering effect in a manner of adjusting an image rendering effect level by level, where one level of image rendering effect is adjusted every a first time.
Optionally, the load of the electronic device may be hardware load of an electronic device related to image rendering, such as load of a CPU (utilization of the CPU), load of memory (a use condition of the memory), or load of a graphics card (a use condition of the graphics card). The first load may be a threshold when preset load is relatively high, and the setting of the first time may be determined according to a specific application situation, and is not limited in this embodiment of the present invention, where the second image rendering effect is lower than the first image rendering effect.
Using an example in which the sixth level of image rendering effect is adjusted to the third level of image rendering effect, in this embodiment of the present invention, when the load of the electronic device is greater than the first load, when a first first time arrives, the sixth level of image rendering effect may be adjusted to the fifth level of image rendering effect, and when a second first time arrives, the fifth level of image rendering effect may be adjusted to the fourth level of image rendering effect, and so on, until the fourth level of image rendering effect is adjusted to the third level of image rendering effect.
Step S320: Determine, when the image frame rate is less than the set image frame rate and the load of the electronic device is less than the first load, each level of image rendering effect between the second image rendering effect and the first image rendering effect, and adjust the first image rendering effect to the second image rendering effect in the manner of adjusting an image rendering effect level by level, where one level of image rendering effect is adjusted every a second time.
The second time is longer than the first time, and the setting of the second time may be determined according to a specific application situation, and is not limited in this embodiment of the present invention.
Step S330: Perform image rendering by using the second image rendering effect.
It can be seen that, in this embodiment of the present invention, when the image frame rate is relatively low and the load is relatively high, the image rendering effect may be lowered level by level rapidly and smoothly, thereby improving the image frame rate as soon as possible, and a specific level-by-level adjusting rate may be set according to a specific application situation; and when the image frame rate is relatively low and the load is not high, the image rendering effect is lowered level by level slowly and smoothly, thereby ensuring stable image quality in the process of adjusting the image rendering effect, and ensuring visual experience of a user.
Optionally, in this embodiment of the present invention, besides that when the image frame rate is less than the set image frame rate, the image frame rate may be improved by lowering the image rendering effect, the image rendering effect may be further improved when the image frame rate is not less than the set image frame rate and the load of the electronic device is relatively low, thereby ensuring the image quality and visual experience of a user. Correspondingly, FIG. 4 shows yet another procedure of an image rendering method according to an embodiment of the present invention. Referring to FIG. 4, the method may include:
Step S400: Detect an image frame rate.
Step S410: Adjust, if the detected image frame rate is not less than a set image frame rate and load of electronic device is less than second load, a first image rendering effect to a third image rendering effect, where the third image rendering effect is higher than the first image rendering effect.
The third image rendering effect may be determined according to a difference between the detected image frame rate and the set image frame rate, and apparently, may also be determined with reference to the difference between the detected image frame rate and the set image frame rate, and a difference between the load of the electronic device and the second load. Optionally, the second load may correspond to low load of the electronic device, and the low load of the electronic device may be determined according to a specific application situation.
Optionally, on the basis that several levels of image rendering effects are set in this embodiment of the present invention, and each of neighboring levels of image rendering effects changes uniformly, in this embodiment of the present invention, the first image rendering effect may be adjusted to the third image rendering effect in a manner of adjusting an image rendering effect level by level, where one level of image rendering effect is adjusted every a third time. Optionally, in this embodiment of the present invention, when an average number of frames is relatively large and the load is relatively low, for example, the average number of frames is less than 35 within 30 seconds, the image rendering effect may be raised level by level slowly and smoothly (for example, every 35 seconds), to improve image quality and improve visual experience of a user.
Step S420: Perform image rendering by using the third image rendering effect.
Optionally, the method shown in FIG. 4 is applicable to the methods shown in FIG. 1 to FIG. 3.
Optionally, in this embodiment of the present invention, software and hardware configuration information of the electronic device may also be detected before image rendering is performed, to set a proper image rendering effect for the electronic device. Correspondingly, FIG. 5 shows further another procedure of an image rendering method according to an embodiment of the present invention. Referring to FIG. 5, the method may include:
Step S500: Detect software and hardware configuration information of an electronic device.
Step S510: Set a corresponding image rendering effect for the detected software and hardware configuration information according to a correspondence between predetermined software and hardware configuration information and an image rendering effect.
Optionally, after the software and hardware configuration information of the electronic device is detected, in this embodiment of the present invention, a score of the detected software and hardware configuration information may be given, and a corresponding image rendering effect is set for the given score according to a correspondence between a predetermined score of software and hardware configuration information and an image rendering effect.
Optionally, a manner of establishing the correspondence between a predetermined score of software and hardware configuration information and an image rendering effect may be as follows:
Step S1: Collect a large amount of software and hardware configuration information of the electronic device.
In this embodiment of the present invention, an information collection and statistics tool may be added to the electronic device, to obtain a large amount of software and hardware configuration information of a computer used by a user, such as a CPU, memory, a hard disk, and a graphics card. After the collection, deduplication is performed to obtain each target environment, such as an xp system, a Core 1.2-G master frequency CPU, 2-G memory, a 5600-GT graphics card, and an 800-G hard disk. Some software and hardware configuration information with representative significance (high-occupation, representative, typical, and relatively special) is selected according to the information, and then a same image rendering testing environment is built for the selected software and hardware configuration information.
Step S2: Simulate establishment of an image rendering testing environment according to the collected software and hardware configuration information, establish a key software and hardware testing environment and perform image rendering testing in the testing environment, and perform scoring according to parameters such as the number of frames, image quality performance, and CPU and GPU memory occupation.
Scoring is performing data quantization processing on an image rendering capability of the software and hardware configuration information, a higher score indicates that the software and hardware configuration information corresponds to a higher image rendering capability, and a lower score indicates that the software and hardware configuration information corresponds to a lower image rendering capability.
Step S3: Ensure that software and hardware configuration information of each score corresponds to an image rendering effect of a set image frame rate, and establish a correspondence between the software and hardware configuration information of each score and a corresponding image rendering effect.
Optionally, one image rendering effect may correspond to software and hardware configuration information within one score interval, and because the image rendering effect is reflected by an image rendering effect parameter, one set of image rendering effect parameters may correspond to software and hardware configuration information within one score interval. Optionally, after the scoring ends, the score may be corrected, and a testing environment that cannot be established may be manually set by using a hardware parameter and an experience value.
Step S520: Perform, at the beginning of image rendering, image rendering by using the set image rendering effect.
Step S530: Detect an image frame rate when image rendering is performed by using a first image rendering effect.
Optionally, the first image rendering effect may be an image rendering effect used at the beginning of image rendering, and may also be an image rendering effect used after the electronic device adjusts the image rendering effect for any number of times after starting to perform image rendering.
Step S540: Regulate an image rendering effect parameter and adjust an image rendering effect to a second image rendering effect from the first image rendering effect if the image frame rate is less than a set image frame rate, the second image rendering effect being lower than the first image rendering effect.
Step S550: Perform image rendering by using the second image rendering effect.
The following introduces a preferred image rendering method provided by an embodiment of the present invention. FIG. 6 is still further another flowchart of an image rendering method according to an embodiment of the present invention. Referring to FIG. 6, the method may include:
Step S600: Detect an image frame rate when image rendering is performed by using a first image rendering effect.
Optionally, in this embodiment of the present invention, the image frame rate may be detected after every a certain time interval, for example, the image frame rate is detected every 10 seconds. Apparently, the setting of a specific value may be further set according to an actual use condition.
Step S610: Determine whether the image frame rate is less than a set image frame rate, if yes, perform step S620, and if not, perform step S660.
Optionally, the set image frame rate may be set as that an average number of frames in 10 seconds is 20, when the image frame rate is detected per 10 seconds, if the average number of frames is less than 20, step S620 is performed, and if not, step S660 is performed. Apparently, the setting of the specific value may be further set according to an actual use condition.
Step S620: Detect whether load of an electronic device is greater than first load, if yes, perform step S630, and if not, perform step S640.
Step S630: Determine each level of image rendering effect between a second image rendering effect and the first image rendering effect, and adjust the first image rendering effect to the second image rendering effect in a manner of adjusting an image rendering effect level by level, where one level of image rendering effect is adjusted every a first time, and the second image rendering effect is lower than the first image rendering effect.
The second image rendering effect is an image rendering effect that needs to be adjusted to when the image frame rate is less than the set image frame rate, and multiple manners of determining the second image rendering effect have been described above, which are not described in detail herein again.
Step S640: Determine each level of image rendering effect between the second image rendering effect and the first image rendering effect, and adjust the first image rendering effect to the second image rendering effect in the manner of adjusting an image rendering effect level by level, where one level of image rendering effect is adjusted every a second time.
Step S650: Perform image rendering by using the second image rendering effect.
The second time is longer than the first time. The setting of the first time may be determined according to a specific application situation, as long as it can be ensured that the image rendering effect can be lowered rapidly and smoothly level by level within the first time; and the setting of the second time may be determined according to a specific application situation, as long as it can be ensured that the image rendering effect can be lowered level by level slowly and smoothly within the second time. Optionally, the first time may be 10 seconds, and the second time may be 30 seconds.
Step S660: Detect whether the load of the electronic device is less than second load, if yes, perform step S670, and if not, perform step S690.
The second load may correspond to low load of the electronic device, and the low load of the electronic device may be determined according to a specific application situation.
Step S670: Determine each level of image rendering effect between a third image rendering effect and the first image rendering effect, and adjust the first image rendering effect to the third image rendering effect in the manner of adjusting an image rendering effect level by level, where one level of image rendering effect is adjusted every a third time, and the third image rendering effect is higher than the first image rendering effect.
The setting of the third time may be determined according to a specific application situation, as long as it can be ensured that the image rendering effect can be raised level by level slowly and smoothly.
Step S680: Perform image rendering by using the third image rendering effect.
Step S690: End the procedure.
Optionally, each time after the image rendering effect is adjusted, in this embodiment of the present invention, adjusted image rendering effect information and corresponding electronic device load information may be saved. In this way, when a user enables an image rendering function next time (for example, the image rendering function is re-enabled after exiting midway, re-enabled after a breakdown, or re-enabled after a computer is changed), corresponding image rendering effect information may be directly invoked according to current electronic device load information, and image rendering is performed by using an image rendering effect corresponding to the invoked image rendering effect information, thereby ensuring that the user can directly match a better image rendering effect when enabling the image rendering function next time.
Optionally, the image rendering method provided by this embodiment of the present invention may be applied to a network game field. A game image may be rendered in a network game by using the image rendering method provided by this embodiment of the present invention, so as to ensure a relatively large number of image frames during a game, and ensure game smoothness. Using a scenario in which multiple persons battle on a same screen (which corresponds to a complicated scenario) and a scenario of an open wilderness (which corresponds to a simple scenario) as an example, when the electronic device renders the scenario in which multiple persons battle on a same screen under the first image rendering effect, if it is detected that the image frame rate is less than the set image frame rate, the first image rendering effect may be adjusted to the second image rendering effect in the manner of adjusting an image rendering effect level by level, where the second image rendering effect is lower than the first image rendering effect. In this way, the scenario in which multiple persons battle on a same screen may be rendered under a relatively low image rendering effect, so as to ensure the relatively large number of image frames, and ensure the game smoothness. When the electronic device changes to render the scenario of an open wilderness from the scenario in which multiple persons battle on a same screen, if it is detected that the image frame rate is not less than the set image frame rate, and when the load of the electronic device is lowered, the image rendering effect may be improved in the manner of adjusting an image rendering effect level by level, thereby ensuring image quality, and maintaining the relatively large number of image frames, and also ensuring the game smoothness and the image quality.
The following introduces the image rendering apparatus provided by the this embodiment of the present invention, and cross-reference may be correspondingly made to an image rendering apparatus described below and the image rendering method described above.
FIG. 7 is a structural block diagram of an image rendering apparatus according to an embodiment of the present invention, and the apparatus is applicable to an electronic device. Referring to FIG. 7, the apparatus may include:
an image frame rate detecting module 100, configured to detect an image frame rate when image rendering is performed by using a first image rendering effect;
a first adjusting module 200, configured to regulate an image rendering effect parameter and adjust an image rendering effect to a second image rendering effect from the first image rendering effect when the image frame rate is less than a set image frame rate, the second image rendering effect being lower than the first image rendering effect; and
a first image rendering module 300, configured to perform image rendering by using the second image rendering effect.
Optionally, a manner of determining the second image rendering effect may be: determining a difference between the detected image frame rate and the set image frame rate; and determining, according to a correspondence between a predetermined image frame rate difference and an image rendering effect, an image rendering effect corresponding to the determined difference, where the determined image rendering effect is the second image rendering effect. Apparently, in this embodiment of the present invention, the second image rendering effect may also be determined in another manner. For example, the second image rendering effect may be determined with reference to an image frame rate difference (a difference between the detected image frame rate and the set image frame rate), and an electronic device load difference (a difference between current load and predetermined load).
Optionally, in this embodiment of the present invention, several levels of image rendering effects may be set, where the first image rendering effect and the second image rendering effect are two levels of image rendering effects in the set several levels of image rendering effects. In the preset several levels of image rendering effects, each of neighboring levels of image rendering effects changes uniformly. Correspondingly, FIG. 8 shows an optional structure of the first adjusting module 200. Referring to FIG. 8, the first adjusting module 200 may include:
a first level-by-level adjusting unit 210, configured to determine, according to preset several levels of image rendering effects, each level of image rendering effect between the second image rendering effect and the first image rendering effect, and adjust the first image rendering effect to the second image rendering effect in a manner of adjusting an image rendering effect level by level.
Optionally, FIG. 9 shows an optional structure of the first level-by-level adjusting unit 210. Referring to FIG. 9, the first level-by-level adjusting unit 210 may include:
a first adjustment executing subunit 2101, configured to adjust, when the image frame rate is less than the set image frame rate and load of the electronic device is greater than first load, the first image rendering effect to the second image rendering effect in the manner of adjusting an image rendering effect level by level, where one level of image rendering effect is adjusted every a first time.
The setting of the first time may be determined according to a specific application situation, as long as it can be ensured that the image rendering effect can be lowered level by level rapidly and smoothly within the first time.
FIG. 10 shows another optional structure of the first level-by-level adjusting unit 210. With reference to FIG. 9 and FIG. 10, the first level-by-level adjusting unit 210 may further include:
a second adjustment executing subunit 2102, configured to adjust, when the image frame rate is less than the set image frame rate and the load of the electronic device is less than the first load, the first image rendering effect to the second image rendering effect in the manner of adjusting an image rendering effect level by level, where one level of image rendering effect is adjusted every a second time, and the second time is longer than the first time.
The setting of the second time may be determined according to a specific application situation, as long as it can be ensured that the image rendering effect can be lowered level by level slowly and smoothly within the second time.
FIG. 11 is another structural block diagram of an image rendering apparatus according to an embodiment of the present invention. With reference to FIG. 7 and FIG. 11, on the basis of the image rendering apparatus shown in FIG. 7, the image rendering apparatus shown in FIG. 11 may further include:
a second adjusting module 400, configured to adjust, when the image frame rate is not less than the set image frame rate and load of the electronic device is less than second load, the first image rendering effect to a third image rendering effect, where the third image rendering effect is higher than the first image rendering effect.
Optionally, FIG. 12 shows an optional structure of the second adjusting module 400. Referring to FIG. 12, the second adjusting module 400 may include:
a second level-by-level adjusting unit 410, configured to determine each level of image rendering effect between the third image rendering effect and the first image rendering effect according to preset several levels of image rendering effects, and adjust the first image rendering effect to the third image rendering effect in a manner of adjusting an image rendering effect level by level.
In the preset several levels of image rendering effects, each of neighboring levels of image rendering effects changes uniformly.
Optionally, in the process of adjusting the first image rendering effect to the third image rendering effect in the manner of adjusting an image rendering effect level by level, in this embodiment of the present invention, the first image rendering effect may be adjusted to the third image rendering effect in the manner of adjusting an image rendering effect level by level, where one level of image rendering effect is adjusted every a third time. The setting of the third time may be determined according to a specific application situation, as long as it can be ensured that the image rendering effect can be raised level by level slowly and smoothly.
FIG. 13 is still another structural block diagram of an image rendering apparatus according to an embodiment of the present invention. With reference to FIG. 7 and FIG. 13, on the basis of the image rendering apparatus shown in FIG. 7, the image rendering apparatus shown in FIG. 13 may further include:
a configuration information detecting module 500, configured to detect software and hardware configuration information of the electronic device before image rendering is performed;
a corresponding image rendering effect setting module 600, configured to set a corresponding image rendering effect for the detected software and hardware configuration information according to a correspondence between predetermined software and hardware configuration information and an image rendering effect; and
an initial rendering module 700, configured to perform, at the beginning of image rendering, image rendering by using the image rendering effect set by the corresponding image rendering effect setting module 600.
FIG. 14 is yet another structural block diagram of an image rendering apparatus according to an embodiment of the present invention. With reference to FIG. 7 and FIG. 14, on the basis of the image rendering apparatus shown in FIG. 7, the image rendering apparatus shown in FIG. 14 may further include:
an information saving module 800, configured to save adjusted image rendering effect information and corresponding electronic device load information each time after the image rendering effect is adjusted; and
a rendering invoking module 900, configured to invoke, when an image rendering function is enabled next time, corresponding image rendering effect information according to current electronic device load information, and perform image rendering by using an image rendering effect corresponding to the invoked image rendering effect information.
In this embodiment of the present invention, in an image rendering process, when an image frame rate is less than a set image frame rate, a relatively large number of image frames and image rendering smoothness can be ensured by lowering an image rendering effect, thereby reducing the occurrence of image pause, screen stagnation and the like in the image rendering process, and ensuring visual experience of a user.
An embodiment of the present invention further provides an electronic device, where the electronic device includes the foregoing image rendering apparatus, and for specific description of the image rendering apparatus, reference may be made to the description of corresponding parts in FIG. 7 to FIG. 14.
The following describes a hardware structure of the electronic device provided by this embodiment of the present invention, and cross-reference may be correspondingly made to the part of the image rendering method in the following description and the image rendering method in above description.
The electronic device may include a mobile phone, a tablet computer, a personal digital assistant (PDA), a Point of Sales (POS), a vehicle-mounted computer, and the like. That the electronic device is a mobile phone is used as an example:
FIG. 15 shows a block diagram of a part of a structure of a mobile phone related to an electronic device according to an embodiment of the present invention. Referring to FIG. 15, the mobile phone includes components such as a radio frequency (RF) circuit 1110, a memory 1120, an input unit 1130, a display unit 1140, a sensor 1150, an audio circuit 1160, a wireless fidelity (WiFi) module 1170, a processor 1180, and a power supply 1190. A person skilled in the art may understand that the structure of the mobile phone shown in FIG. 15 does not constitute a limitation to the mobile phone, and the mobile phone may include more components or fewer components than those shown in the figure, or some components may be combined, or a different component deployment may be used.
The following specifically introduces each component part of the mobile phone with reference to FIG. 15:
The RF circuit 1110 may be configured to receive and send signals during an information receiving and sending process or a call process. Particularly, the RF circuit 1110 receives downlink information from a base station, then delivers the downlink information to the processor 1180 for processing, and sends related uplink data to the base station. Generally, the RF circuit includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (LNA), and a duplexer. In addition, the RF circuit 1110 may also communicate with a network and another device by wireless communication. The wireless communication may use any communications standard or protocol, which includes, but is not limited to, Global System for Mobile communications (GSM), a General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), e-mail, Short Messaging Service (SMS), and the like.
The memory 1120 may be configured to store a software program and module. The processor 1180 runs the software program and module stored in the memory 1120, to implement various functional applications and performs data processing of the mobile phone. The memory 1120 may mainly include a program storage area and a data storage area. The program storage area may store an operating system, an application program required by at least one function (such as a sound playback function and an image display function), and the like. The data storage area may store data (such as audio data and an address book) created according to use of the mobile phone, and the like. In addition, the memory 1120 may include a high speed random access memory (RAM), and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory, or another volatile solid-state storage device.
The input unit 1130 may be configured to receive input digit or character information, and generate key signal input related to the user setting and function control of the mobile phone. Specifically, the input unit 1130 may include a touch panel 1131 and another input device 1132. The touch panel 1131 may also be referred to as a touch screen, and may collect a touch operation of a user on or near the touch panel (such as an operation of a user on or near the touch panel 1131 by using any suitable object or attachment, such as a finger or a touch pen), and drive a corresponding connection apparatus according to a preset program. Optionally, the touch panel 1131 may include two parts: a touch detection apparatus and a touch controller. The touch detection apparatus detects a touch position of the user, detects a signal generated by the touch operation, and transfers the signal to the touch controller. The touch controller receives touch information from the touch detection apparatus, converts the touch information into touch point coordinates, and sends the touch point coordinates to the processor 1180. Moreover, the touch controller can receive and execute a command sent from the processor 1180. In addition, the touch panel 1131 may be implemented by using various types, such as a resistive type, a capacitance type, an infrared type, and a surface acoustic wave type. In addition to the touch panel 1131, the input unit 1130 may further include the another input device 1132. Specifically, the another input device 1132 may include, but is not limited to, one or more of a physical keyboard, a functional key (such as a volume control key or a switch key), a track ball, a mouse, and a joystick.
The display unit 1140 may be configured to display information input by the user or information provided for the user, and various menus of the mobile phone. The display unit 1140 may include a display panel 1141. Optionally, the display panel 1141 may be configured by using a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like. Further, the touch panel 1131 may cover the display panel 1141. After detecting a touch operation on or near the touch panel 1131, the touch panel 1131 transfers the touch operation to the processor 1180, so as to determine a type of a touch event. Then, the processor 1180 provides corresponding visual output on the display panel 1141 according to the type of the touch event. Although, in FIG. 15, the touch panel 1131 and the display panel 1141 are used as two separate parts to implement input and output functions of the mobile phone, in some embodiments, the touch panel 1131 and the display panel 1141 may be integrated to implement the input and output functions of the mobile phone.
The mobile phone may further include at least one sensor 1150, such as an optical sensor, a motion sensor, and other sensors. Specifically, the optical sensor may include an ambient light sensor and a proximity sensor. The ambient light sensor may adjust luminance of the display panel 1141 according to brightness of the ambient light. The proximity sensor may switch off the display panel 1141 and/or backlight when the mobile phone is moved to the ear. As one type of motion sensor, an acceleration sensor may detect magnitude of accelerations at various directions (generally on three axes), may detect magnitude and a direction of the gravity when static, and may be may be applied to an application that recognizes the attitude of the mobile phone (for example, switching between landscape orientation and portrait orientation, a related game, and magnetometer attitude calibration), a function related to vibration recognition (such as a pedometer and a knock). Other sensors, such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which may be configured in the mobile phone are not further described herein.
The audio circuit 1160, a loudspeaker 1161, and a microphone 1162 may provide audio interfaces between the user and the mobile phone. The audio circuit 1160 may convert received audio data into an electric signal and transmit the electric signal to the loudspeaker 1161. The loudspeaker 1161 converts the electric signal into a sound signal for output. On the other hand, the microphone 1162 converts a collected sound signal into an electric signal. The audio circuit 1160 receives the electric signal and converts the electric signal into audio data, and outputs the audio data to the processor 1180 for processing. Then, the processor 1180 sends the audio data to, for example, another mobile phone by using the RF circuit 1110, or outputs the audio data to the memory 1120 for further processing.
WiFi is a short distance wireless transmission technology. The mobile phone may help, by using the WiFi module 1170, a user to receive and send an e-mail, browse a webpage, and access stream media, and the like, which provides wireless broadband Internet access for the user. Although FIG. 15 shows the WiFi module 1170, it may be understood that, the WiFi module is not a necessary component of the mobile phone, and when required, the WiFi module may be ignored as long as the scope of the essence of the present disclosure is not changed.
The processor 1180 is a control center of the mobile phone, and connects to various parts of the whole mobile phone by using various interfaces and lines. By running or executing the software program and/or module stored in the memory 1120, and invoking data stored in the memory 1120, the processor 1180 performs various functions and data processing of the mobile phone, thereby performing overall monitoring on the mobile phone. Optionally, the processor 1180 may include one or more processing units. Preferably, the processor 1180 may integrate an application processor and a modem. The application processor mainly processes an operating system, a user interface, an application program, and the like. The modem mainly processes wireless communication. It may be understood that, the foregoing modem may also not be integrated into the processor 1180.
The mobile phone further includes the power supply 1190 (such as a battery) for supplying power to the components. Preferably, the power supply may be logically connected to the processor 1180 by using a power supply management system, thereby implementing functions, such as charging, discharging, and power consumption management, by using the power supply management system.
Although not shown in the figure, the mobile phone may further include a camera, a Bluetooth module, and the like, which are not further described herein.
In this embodiment of the present invention, the processor 1180 included in the electronic device further has the following functions:
detecting an image frame rate when image rendering is performed by using a first image rendering effect;
regulating an image rendering effect parameter and adjusting an image rendering effect to a second image rendering effect from the first image rendering effect if the image frame rate is less than a set image frame rate, the second image rendering effect being lower than the first image rendering effect; and
performing image rendering by using the second image rendering effect.
The embodiments in this specification are all described in a progressive manner. Description of each of the embodiments focuses on differences from other embodiments, and reference may be made to each other for the same or similar parts among respective embodiments. The apparatus disclosed in the embodiments corresponds to the method disclosed in the embodiments and therefore are only briefly described, and reference may be made to the method parts for the associated part.
A person skilled in the art may be further aware that, in combination with the examples described in the embodiments disclosed in this specification, units and algorithm steps may be implemented by electronic hardware, computer software, or a combination of thereof. To clearly describe the interchangeability between the hardware and the software, the foregoing has generally described compositions and steps of each example according to functions. Whether the functions are performed by hardware or software depends on particular applications and design constraint conditions of the technical solutions. A person skilled in the art may use different methods to implement the described functions for each particular application, but it should not be considered that the implementation goes beyond the scope of the present disclosure.
In combination with the description in the embodiments disclosed in this specification, the methods or algorithm steps may be directly implemented by hardware, a software module executed by a processor, or a combination thereof. The software module may be placed in a RAM, memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or a storage medium in any other form well-known in the technical field.
The above description of the disclosed embodiments enables a person skilled in the art to implement or use the present disclosure. Various modifications to these embodiments are obvious to a person skilled in the art, and the general principles defined in this specification may be implemented in other embodiments without departing from the spirit and scope of the present disclosure. Therefore, the present disclosure is not limited to these embodiments shown in this specification, but needs to conform to the widest scope consistent with the principles and novel features disclosed in this specification.

Claims (17)

  1. An image rendering method, applied to an electronic device and comprising:
    detecting an image frame rate when image rendering is performed by using a first image rendering effect;
    regulating an image rendering effect parameter;
    adjusting an image rendering effect to a second image rendering effect from the first image rendering effect if the image frame rate is less than a set image frame rate, the second image rendering effect being lower than the first image rendering effect; and
    performing image rendering by using the second image rendering effect.
  2. The image rendering method according to claim 1, wherein the adjusting an image rendering effect to a second image rendering effect from the first image rendering effect comprises:
    determining each level of image rendering effect between the second image rendering effect and the first image rendering effect according to preset several levels of image rendering effects, and adjusting the first image rendering effect to the second image rendering effect in a manner of adjusting an image rendering effect level by level, wherein in the preset several levels of image rendering effects, each of neighboring levels of image rendering effects changes uniformly, and the first image rendering effect and the second image rendering effect are two levels of image rendering effects in the set several levels of image rendering effects.
  3. The image rendering method according to claim 2, wherein the adjusting the first image rendering effect to the second image rendering effect in a manner of adjusting an image rendering effect level by level comprises:
    adjusting, if the image frame rate is less than the set image frame rate and load of the electronic device is greater than first load, the first image rendering effect to the second image rendering effect in the manner of adjusting an image rendering effect level by level, wherein one level of image rendering effect is adjusted every a first time.
  4. The image rendering method according to claim 3, wherein the adjusting the first image rendering effect to the second image rendering effect in a manner of adjusting an image rendering effect level by level further comprises:
    adjusting, if the image frame rate is less than the set image frame rate and the load of the electronic device is less than the first load, the first image rendering effect to the second image rendering effect in the manner of adjusting an image rendering effect level by level, wherein one level of image rendering effect is adjusted every a second time, and the second time is longer than the first time.
  5. The image rendering method according to any one of claims 1 to 4, wherein a process of determining the second image rendering effect comprises:
    determining a difference between the image frame rate and the set image frame rate; and
    determining, according to a correspondence between a predetermined image frame rate difference and an image rendering effect, an image rendering effect corresponding to the determined difference, wherein the determined image rendering effect is the second image rendering effect.
  6. The image rendering method according to claim 1, wherein the method further comprises:
    adjusting, if the image frame rate is not less than the set image frame rate and load of the electronic device is less than second load, the first image rendering effect to a third image rendering effect, wherein the third image rendering effect is higher than the first image rendering effect.
  7. The image rendering method according to claim 6, wherein the adjusting the first image rendering effect to a third image rendering effect comprises:
    determining each level of image rendering effect between the third image rendering effect and the first image rendering effect according to preset several levels of image rendering effects, and adjusting the first image rendering effect to the third image rendering effect in a manner of adjusting an image rendering effect level by level, wherein in the preset several levels of image rendering effects, each of neighboring levels of image rendering effects changes uniformly.
  8. The image rendering method according to claim 1, wherein the method further comprises:
    detecting software and hardware configuration information of the electronic device before image rendering is performed;
    setting a corresponding image rendering effect for the detected software and hardware configuration information according to a correspondence between predetermined software and hardware configuration information and an image rendering effect; and
    performing, at the beginning of image rendering, image rendering by using the set image rendering effect.
  9. The image rendering method according to claim 1, wherein the method further comprises:
    saving adjusted image rendering effect information and corresponding electronic device load information each time after the image rendering effect is adjusted; and
    invoking, when an image rendering function is enabled next time, corresponding image rendering effect information according to current electronic device load information, and performing image rendering by using an image rendering effect corresponding to the invoked image rendering effect information.
  10. An image rendering apparatus, applied to an electronic device, the electronic device comprising one or more processors and memory storing program modules within the image rendering apparatus configured for being executed by one or more processors, the program modules comprising:
    an image frame rate detecting module, configured to detect an image frame rate when image rendering is performed by using a first image rendering effect;
    a first adjusting module, configured to regulate an image rendering effect parameter and adjust an image rendering effect to a second image rendering effect from the first image rendering effect when the image frame rate is less than a set image frame rate, the second image rendering effect being lower than the first image rendering effect; and
    a first image rendering module, configured to perform image rendering by using the second image rendering effect.
  11. The image rendering apparatus according to claim 10, wherein the first adjusting module comprises:
    a first level-by-level adjusting unit, configured to determine each level of image rendering effect between the second image rendering effect and the first image rendering effect according to preset several levels of image rendering effects, and adjust the first image rendering effect to the second image rendering effect in a manner of adjusting an image rendering effect level by level, wherein in the preset several levels of image rendering effects, each of neighboring levels of image rendering effects changes uniformly, and the first image rendering effect and the second image rendering effect are two levels of image rendering effects in the set several levels of image rendering effects.
  12. The image rendering apparatus according to claim 11, wherein the first level-by-level adjusting unit comprises:
    a first adjustment executing subunit, configured to adjust, when the image frame rate is less than the set image frame rate and load of the electronic device is greater than first load, the first image rendering effect to the second image rendering effect in the manner of adjusting an image rendering effect level by level, wherein one level of image rendering effect is adjusted every a first time.
  13. The image rendering apparatus according to claim 12, wherein the first level-by-level adjusting unit further comprises:
    a second adjustment executing subunit, configured to adjust, when the image frame rate is less than the set image frame rate and the load of the electronic device is less than the first load, the first image rendering effect to the second image rendering effect in the manner of adjusting an image rendering effect level by level, wherein one level of image rendering effect is adjusted every a second time, and the second time is longer than the first time.
  14. The image rendering apparatus according to claim 10, wherein the apparatus further comprises:
    a second adjusting module, configured to adjust, when the image frame rate is not less than the set image frame rate and load of the electronic device is less than second load, the first image rendering effect to a third image rendering effect, wherein the third image rendering effect is higher than the first image rendering effect.
  15. The image rendering apparatus according to claim 14, wherein the second adjusting module comprises:
    a second level-by-level adjusting unit, configured to determine each level of image rendering effect between the third image rendering effect and the first image rendering effect according to preset several levels of image rendering effects, and adjust the first image rendering effect to the third image rendering effect in a manner of adjusting an image rendering effect level by level, wherein in the preset several levels of image rendering effects, each of neighboring levels of image rendering effects changes uniformly.
  16. The image rendering apparatus according to any one of claims 10 to 15, wherein the apparatus further comprises:
    a configuration information detecting module, configured to detect software and hardware configuration information of the electronic device before image rendering is performed;
    a corresponding image rendering effect setting module, configured to set a corresponding image rendering effect for the detected software and hardware configuration information according to a correspondence between predetermined software and hardware configuration information and an image rendering effect; and
    an initial rendering module, configured to perform, at the beginning of image rendering, image rendering by using the image rendering effect set by the corresponding image rendering effect setting module.
  17. The image rendering apparatus according to claim 10, wherein the apparatus further comprises:
    an information saving module, configured to save adjusted image rendering effect information and corresponding electronic device load information each time after the image rendering effect is adjusted; and
    a rendering invoking module, configured to invoke, when an image rendering function is enabled next time, corresponding image rendering effect information according to current electronic device load information, and perform image rendering by using an image rendering effect corresponding to the invoked image rendering effect information.
PCT/CN2015/072310 2014-02-12 2015-02-05 Image rendering method and apparatus, and electronic device WO2015120778A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410049102.2A CN103778656B (en) 2014-02-12 2014-02-12 A kind of image rendering method, device and electronic equipment
CN201410049102.2 2014-02-12

Publications (1)

Publication Number Publication Date
WO2015120778A1 true WO2015120778A1 (en) 2015-08-20

Family

ID=50570851

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/072310 WO2015120778A1 (en) 2014-02-12 2015-02-05 Image rendering method and apparatus, and electronic device

Country Status (3)

Country Link
CN (1) CN103778656B (en)
TW (1) TWI566575B (en)
WO (1) WO2015120778A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108269223A (en) * 2017-01-04 2018-07-10 腾讯科技(深圳)有限公司 A kind of web page graphics method for drafting and terminal
CN110020981A (en) * 2019-03-27 2019-07-16 阿里巴巴集团控股有限公司 A kind of image information processing method, device and electronic equipment
US10510175B2 (en) 2015-12-03 2019-12-17 Huawei Technologies Co., Ltd. Method and portable electronic device for changing graphics processing resolution according to scenario
US11409547B2 (en) 2018-03-13 2022-08-09 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Method for rendering user interface and terminal

Families Citing this family (31)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103778656B (en) * 2014-02-12 2018-09-07 腾讯科技(深圳)有限公司 A kind of image rendering method, device and electronic equipment
CN104740873A (en) * 2015-04-13 2015-07-01 四川天上友嘉网络科技有限公司 Image rendering method for game
CN106341436B (en) * 2015-07-08 2021-03-19 深圳市腾讯计算机***有限公司 Method and device for detecting acceleration effect
US10127883B2 (en) * 2015-10-27 2018-11-13 Mediatek Inc. Frame rate control method and image processing apparatus selectively limiting frame rate
CN105582672B (en) * 2015-12-23 2019-06-04 厦门光趣投资管理有限公司 A kind of scene of game figure layer display methods and calculate equipment
JP6542706B2 (en) * 2016-04-13 2019-07-10 ファナック株式会社 Numerical control device
CN105930535A (en) * 2016-06-20 2016-09-07 微景天下(北京)科技有限公司 Adaptive image display system and adaptive image display method
CN106210859B (en) * 2016-08-11 2020-03-27 合一网络技术(北京)有限公司 Panoramic video rendering method and device
CN106447595A (en) * 2016-09-23 2017-02-22 努比亚技术有限公司 Distributed image and graph rendering method and terminal
CN106902513A (en) * 2017-03-02 2017-06-30 苏州蜗牛数字科技股份有限公司 A kind of method that VR game pictures are optimized
CN107038736B (en) * 2017-03-17 2021-07-06 腾讯科技(深圳)有限公司 Animation display method based on frame rate and terminal equipment
CN108737761B (en) * 2017-04-21 2021-08-10 腾讯科技(深圳)有限公司 Video recording method and device
CN107273080B (en) * 2017-05-25 2020-05-22 深圳市彬讯科技有限公司 Multithreading-based mobile terminal picture rendering method and device
CN108010117B (en) * 2017-11-30 2021-09-28 杭州电魂网络科技股份有限公司 Full screen rendering method and device
CN107978014B (en) * 2017-12-21 2021-06-18 卓米私人有限公司 Particle rendering method and device, electronic equipment and storage medium
CN108635851B (en) * 2018-05-16 2021-07-27 网易(杭州)网络有限公司 Game picture processing method and device
CN110798738B (en) * 2018-08-01 2022-01-28 Oppo广东移动通信有限公司 Frame rate control method, device, terminal and storage medium
CN109413337A (en) * 2018-08-30 2019-03-01 北京达佳互联信息技术有限公司 Video Rendering method, apparatus, electronic equipment and storage medium
CN109302523B (en) * 2018-10-22 2020-11-06 竞技世界(北京)网络技术有限公司 Mobile phone performance evaluation method for mobile phone side and server side
CN109499059B (en) * 2018-11-15 2020-08-11 腾讯科技(深圳)有限公司 Object rendering method and device, storage medium and electronic device
CN109675321B (en) * 2018-12-18 2022-02-15 网易(杭州)网络有限公司 Method and device for controlling number of people displayed on same screen in game
CN109842533A (en) * 2019-01-17 2019-06-04 珠海金山网络游戏科技有限公司 A kind of method and device detecting game Caton frame
CN110559659B (en) * 2019-07-09 2023-06-20 深圳市瑞立视多媒体科技有限公司 Game rendering optimization method, device, equipment and storage medium
CN110493456B (en) * 2019-07-29 2020-10-30 创新先进技术有限公司 Animation playing method and device, terminal equipment and server
CN111045816B (en) * 2019-11-06 2021-07-16 腾讯科技(深圳)有限公司 Performance optimization method and related device
WO2021249358A1 (en) * 2020-06-08 2021-12-16 华为技术有限公司 Rendering method, device and system
CN112184575A (en) * 2020-09-16 2021-01-05 华为技术有限公司 Image rendering method and device
CN116091292B (en) * 2022-08-17 2023-11-21 荣耀终端有限公司 Data processing method and related device
CN116688495B (en) * 2022-11-04 2024-04-19 荣耀终端有限公司 Frame rate adjusting method and related device
CN115942131B (en) * 2023-02-09 2023-09-01 蔚来汽车科技(安徽)有限公司 Method for guaranteeing vehicle looking-around function, cabin system, vehicle and storage medium
CN117221654B (en) * 2023-11-09 2024-04-30 深圳市达瑞电子科技有限公司 Video rendering method and system based on video frame analysis

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5384908A (en) * 1991-12-30 1995-01-24 Xerox Corporation Avoiding oscillation in interactive animation
US6072498A (en) * 1997-07-31 2000-06-06 Autodesk, Inc. User selectable adaptive degradation for interactive computer rendering system
US20080055311A1 (en) * 2006-08-31 2008-03-06 Ati Technologies Inc. Portable device with run-time based rendering quality control and method thereof
US20110096077A1 (en) * 2009-10-27 2011-04-28 Microsoft Corporation Controlling animation frame rate of applications
CN102831630A (en) * 2012-07-26 2012-12-19 北京小米科技有限责任公司 Method and device for rendering animation
CN103366391A (en) * 2013-06-26 2013-10-23 广州市动景计算机科技有限公司 Picture rendering method and picture rendering device of dynamic picture
CN103778656A (en) * 2014-02-12 2014-05-07 腾讯科技(深圳)有限公司 Image rendering method and device and electronic equipment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102857791B (en) * 2012-09-14 2015-07-08 武汉善观科技有限公司 Method for processing and displaying image data in PACS system by mobile terminal
CN103077015B (en) * 2012-12-25 2015-08-05 福州博远无线网络科技有限公司 A kind of method of Dynamic controlling frame rate of game

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5384908A (en) * 1991-12-30 1995-01-24 Xerox Corporation Avoiding oscillation in interactive animation
US6072498A (en) * 1997-07-31 2000-06-06 Autodesk, Inc. User selectable adaptive degradation for interactive computer rendering system
US20080055311A1 (en) * 2006-08-31 2008-03-06 Ati Technologies Inc. Portable device with run-time based rendering quality control and method thereof
US20110096077A1 (en) * 2009-10-27 2011-04-28 Microsoft Corporation Controlling animation frame rate of applications
CN102831630A (en) * 2012-07-26 2012-12-19 北京小米科技有限责任公司 Method and device for rendering animation
CN103366391A (en) * 2013-06-26 2013-10-23 广州市动景计算机科技有限公司 Picture rendering method and picture rendering device of dynamic picture
CN103778656A (en) * 2014-02-12 2014-05-07 腾讯科技(深圳)有限公司 Image rendering method and device and electronic equipment

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10510175B2 (en) 2015-12-03 2019-12-17 Huawei Technologies Co., Ltd. Method and portable electronic device for changing graphics processing resolution according to scenario
US10872455B2 (en) 2015-12-03 2020-12-22 Huawei Technologies Co., Ltd. Method and portable electronic device for changing graphics processing resolution according to scenario
CN108269223A (en) * 2017-01-04 2018-07-10 腾讯科技(深圳)有限公司 A kind of web page graphics method for drafting and terminal
CN108269223B (en) * 2017-01-04 2021-08-31 腾讯科技(深圳)有限公司 Webpage graph drawing method and terminal
US11409547B2 (en) 2018-03-13 2022-08-09 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Method for rendering user interface and terminal
CN110020981A (en) * 2019-03-27 2019-07-16 阿里巴巴集团控股有限公司 A kind of image information processing method, device and electronic equipment

Also Published As

Publication number Publication date
CN103778656B (en) 2018-09-07
CN103778656A (en) 2014-05-07
TWI566575B (en) 2017-01-11
TW201532422A (en) 2015-08-16

Similar Documents

Publication Publication Date Title
WO2015120778A1 (en) Image rendering method and apparatus, and electronic device
AU2019231476B2 (en) Electronic device with flexible display and method for operating same
WO2020145697A1 (en) Method for providing image using foldable display and electronic device for supporting the same
WO2015161778A1 (en) Webpage generating method and apparatus
WO2016099031A1 (en) Portable apparatus and method of controlling location information of portable apparatus
WO2021101189A1 (en) Method and device for providing user interface in electronic device having foldable display
WO2017026712A1 (en) Antenna device and electronic device including the same
AU2015340213B2 (en) Method for controlling operation of electronic device and electronic device using the same
WO2018143674A1 (en) Electronic apparatus and controlling method thereof
WO2016165556A1 (en) Data processing method, device and system for video stream
WO2016035984A1 (en) Electronic device and method for operating the same
WO2016010202A1 (en) Mobile terminal and control method for the mobile terminal
WO2021006705A1 (en) Electronic device and method for outputting audio signal
WO2017039125A1 (en) Electronic device and operating method of the same
WO2018227869A1 (en) Display screen picture adjusting method, display terminal, and readable storage medium
WO2018223607A1 (en) Television terminal, method for converting hdr image into sdr image, and computer readable storage medium
WO2021162320A1 (en) Electronic device and method for operating high speed screen of electronic device
WO2016129920A1 (en) Method for reducing battery consumption on basis of user's usage pattern and apparatus therefor
WO2018113187A1 (en) Display control method and display device
EP3170330A1 (en) Method and electronic device for providing data
WO2019017665A1 (en) Electronic apparatus for processing user utterance for controlling an external electronic apparatus and controlling method thereof
WO2020149722A1 (en) Working environment provisioning method and apparatus for execution of application program between electronic device and external server
WO2015180584A1 (en) Sound effect playback method and apparatus
EP3292461A1 (en) Electronic device and operating method of the same
WO2022080814A1 (en) Electronic device and screen control method thereof

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15749017

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 25.01.2017)

122 Ep: pct application non-entry in european phase

Ref document number: 15749017

Country of ref document: EP

Kind code of ref document: A1