CN115065824A - Decoder determination method, device, chip, electronic equipment and medium - Google Patents

Decoder determination method, device, chip, electronic equipment and medium Download PDF

Info

Publication number
CN115065824A
CN115065824A CN202210989531.2A CN202210989531A CN115065824A CN 115065824 A CN115065824 A CN 115065824A CN 202210989531 A CN202210989531 A CN 202210989531A CN 115065824 A CN115065824 A CN 115065824A
Authority
CN
China
Prior art keywords
decoder
software
target
hardware
application
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210989531.2A
Other languages
Chinese (zh)
Other versions
CN115065824B (en
Inventor
赵宇龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202210989531.2A priority Critical patent/CN115065824B/en
Publication of CN115065824A publication Critical patent/CN115065824A/en
Application granted granted Critical
Publication of CN115065824B publication Critical patent/CN115065824B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/44Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Telephone Function (AREA)

Abstract

The embodiment of the application provides a decoder determining method, a decoder determining device, a chip, electronic equipment and a medium, wherein the method comprises the following steps: determining whether a first operation for creating a first decoder corresponding to a first application program is failed to be performed; in the event of a failure to perform the first operation, determining whether the first decoder has a target feature, the target feature comprising a feature not supported by the software decoder; in the case where the first decoder does not have the target feature, a decoder corresponding to the first application is set as a software decoder. The video decoding method and device can solve the problem that the video cannot be decoded continuously when the hardware resources are insufficient.

Description

Decoder determination method, device, chip, electronic equipment and medium
Technical Field
The present application relates to the field of video decoding technologies, and in particular, to a method, an apparatus, a chip, an electronic device, and a medium for determining a decoder.
Background
Hardware resources on electronic devices (e.g., smartphones, etc.) are limited. When the hardware decoder that has been created at present has exhausted the hardware resources (the user of the electronic device does not perceive this), if there is a new hardware decoder that needs to be created for use, an error is reported, and the video cannot be decoded continuously.
Disclosure of Invention
The embodiment of the application provides a decoder determining method, a decoder determining device, a chip, electronic equipment and a medium, and can solve the problem that a video cannot be continuously decoded when hardware resources are insufficient.
In a first aspect, an embodiment of the present application provides a decoder determining method, including: determining whether a first operation for creating a first decoder corresponding to a first application program is failed to be performed; in the event of a failure of execution of the first operation, determining whether the first decoder has a target feature, the target feature comprising a feature not supported by a software decoder; setting a decoder corresponding to the first application as a software decoder in a case where the first decoder does not have the target feature.
Optionally, the target feature comprises: corresponding to at least one of the first characteristics of the secure decoder, corresponding to the second characteristics of the low latency decoder.
Optionally, the case where the first decoder does not have the target feature includes: a case where the first decoder does not have the first feature and the second feature.
Optionally, the target feature comprises: corresponding to a third characteristic of the real-time decoder having a resolution greater than the first threshold.
Optionally, in a case that the first operation fails to be executed, the method further includes: determining whether the reason for the first operation execution failure is insufficient hardware resources; and in the case that the reason for the failure in executing the first operation is insufficient hardware resources, executing the step of setting a decoder corresponding to the first application program as a software decoder.
Optionally, in a case that the first operation fails to be executed, the method further includes: determining whether the first operation is for creating a pre-specified hardware decoder; in the case where the first operation is not used to create a pre-specified hardware decoder, performing the step of setting a decoder corresponding to the first application as a software decoder.
Optionally, in case the first decoder does not have the target feature, the method further comprises: determining whether a software decoder is in the first storage module; under the condition that a software decoder exists in the first storage module, determining a specification supported by a target software decoder, wherein the target software decoder is any one software decoder in the first storage module; determining whether the target software decoder supports a target specification corresponding to the first decoder according to the specification supported by the target software decoder;
the setting of the decoder corresponding to the first application as a software decoder includes: if the target specification is supported by the specification supported by the target software decoder, setting a decoder corresponding to the first application as the target software decoder.
Optionally, the specification includes at least one of a resolution and a frame rate.
In a second aspect, an embodiment of the present application provides a decoder determining apparatus, including: a first determining module for determining whether a first operation for creating a first decoder corresponding to a first application program is failed to be performed; a second determining module for determining whether the first decoder has a target feature in the event of a failure of the first operation to execute, the target feature comprising a feature not supported by a software decoder; a processing module, configured to set a decoder corresponding to the first application as a software decoder if the first decoder does not have the target feature.
In a third aspect, an embodiment of the present application provides an electronic chip, including: a processor for executing computer program instructions stored on a memory, wherein the computer program instructions, when executed by the processor, trigger the electronic chip to perform the method of any of the first aspects.
In a fourth aspect, embodiments of the present application provide an electronic device comprising a memory for storing computer program instructions, a processor for executing the computer program instructions, and a communication apparatus, wherein the computer program instructions, when executed by the processor, trigger the electronic device to perform the method according to any one of the first aspect.
In a fifth aspect, embodiments of the present application provide a computer-readable storage medium, having stored thereon a computer program, which, when run on a computer, causes the computer to perform the method according to any one of the first aspect.
In a sixth aspect, embodiments of the present application provide a computer program product comprising a computer program which, when run on a computer, causes the computer to perform the method according to any one of the first aspect.
The video decoding method and device can solve the problem that the video cannot be decoded continuously when the hardware resources are insufficient.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure;
fig. 2 is a flowchart illustrating a method for determining a decoder according to an embodiment of the present application;
fig. 3 is a flowchart illustrating another method for determining a decoder according to an embodiment of the present application;
fig. 4 is a flowchart illustrating a method for determining a decoder according to an embodiment of the present application.
Detailed Description
For better understanding of the technical solutions of the present application, the following detailed descriptions of the embodiments of the present application are provided with reference to the accompanying drawings.
It should be understood that the embodiments described are only a few embodiments of the present application, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terminology used in the embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the examples of this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It is to be understood that the term "at least one" as used herein refers to one or more, and "a plurality" refers to two or more. The term "and/or" as used herein is merely an associative relationship that describes an associated object, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. Wherein A and B can be singular or plural. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship. "at least one of the following" and similar expressions refer to any combination of these items, including any combination of singular or plural items. For example, at least one of a, b, and c may represent: a, b, c, a-b, a-c, b-c, or a-b-c, wherein a, b, c may be single or multiple.
It should be understood that although the terms first, second, etc. may be used to describe the set thresholds in the embodiments of the present application, the set thresholds should not be limited to these terms. These terms are used only to distinguish the set thresholds from each other. For example, the first set threshold value may also be referred to as a second set threshold value, and similarly, the second set threshold value may also be referred to as a first set threshold value, without departing from the scope of the embodiments of the present application.
The terminology used in the description of the embodiments section of the present application is for the purpose of describing particular embodiments of the present application only and is not intended to be limiting of the present application.
The decoder determination method provided by any embodiment of the present application can be applied to the electronic device 100 shown in fig. 1. Fig. 1 shows a schematic structural diagram of an electronic device 100.
The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a Universal Serial Bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display screen 194, a Subscriber Identification Module (SIM) card interface 195, and the like. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
It is to be understood that the illustrated structure of the embodiment of the present application does not specifically limit the electronic device 100. In other embodiments of the present application, electronic device 100 may include more or fewer components than shown, or some components may be combined, some components may be split, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Processor 110 may include one or more processing units, such as: the processor 110 may include an Application Processor (AP), a modem processor, a Graphics Processing Unit (GPU), an Image Signal Processor (ISP), a controller, a video codec, a Digital Signal Processor (DSP), a baseband processor, and/or a neural-Network Processing Unit (NPU), etc. The different processing units may be separate devices or may be integrated into one or more processors.
The controller can generate an operation control signal according to the instruction operation code and the timing signal to complete the control of instruction fetching and instruction execution.
A memory may also be provided in processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Avoiding repeated accesses reduces the latency of the processor 110, thereby increasing the efficiency of the system.
In some embodiments, processor 110 may include one or more interfaces. The interface may include an integrated circuit (I2C) interface, an integrated circuit built-in audio (I2S) interface, a Pulse Code Modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a Mobile Industry Processor Interface (MIPI), a general-purpose input/output (GPIO) interface, a Subscriber Identity Module (SIM) interface, and/or a Universal Serial Bus (USB) interface, etc.
The USB interface 130 is an interface conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. It should be understood that the interface connection relationship between the modules illustrated in the embodiments of the present application is only an illustration, and does not limit the structure of the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection manners or a combination of multiple interface connection manners in the above embodiments.
The charging management module 140 is configured to receive a charging input from a charger. The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 100 may be used to cover a single or multiple communication bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution including 2G/3G/4G/5G wireless communication applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a Low Noise Amplifier (LNA), and the like. The mobile communication module 150 may receive the electromagnetic wave from the antenna 1, filter, amplify, etc. the received electromagnetic wave, and transmit the electromagnetic wave to the modem processor for demodulation. The mobile communication module 150 may also amplify the signal modulated by the modem processor, and convert the signal into electromagnetic wave through the antenna 1 to radiate the electromagnetic wave. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the same device as at least some of the modules of the processor 110.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating a low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then passes the demodulated low frequency baseband signal to a baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.) or displays an image or video through the display screen 194. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 150 or other functional modules, independent of the processor 110.
The wireless communication module 160 may provide a solution for wireless communication applied to the electronic device 100, including Wireless Local Area Networks (WLANs) (e.g., wireless fidelity (Wi-Fi) networks), bluetooth (bluetooth, BT), Global Navigation Satellite System (GNSS), Frequency Modulation (FM), Near Field Communication (NFC), Infrared (IR), and the like. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, performs frequency modulation and filtering processing on electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, perform frequency modulation and amplification on the signal, and convert the signal into electromagnetic waves through the antenna 2 to radiate the electromagnetic waves.
In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150 and antenna 2 is coupled to wireless communication module 160 so that electronic device 100 can communicate with networks and other devices through wireless communication techniques. The wireless communication technology may include global system for mobile communications (GSM), General Packet Radio Service (GPRS), code division multiple access (code division multiple access, CDMA), Wideband Code Division Multiple Access (WCDMA), time-division code division multiple access (time-division code division multiple access, TD-SCDMA), Long Term Evolution (LTE), LTE, BT, GNSS, WLAN, NFC, FM, and/or IR technologies, etc. The GNSS may include a Global Positioning System (GPS), a global navigation satellite system (GLONASS), a beidou satellite navigation system (BDS), a quasi-zenith satellite system (QZSS), and/or a Satellite Based Augmentation System (SBAS).
The electronic device 100 implements display functions via the GPU, the display screen 194, and the application processor. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and an application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
The display screen 194 is used to display images, video, and the like. The display screen 194 includes a display panel. The display panel may adopt a Liquid Crystal Display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (active-matrix organic light-emitting diode, AMOLED), a flexible light-emitting diode (FLED), a miniature, a Micro-oeld, a quantum dot light-emitting diode (QLED), and the like. In some embodiments, the electronic device 100 may include 1 or N display screens 194, with N being a positive integer greater than 1.
The electronic device 100 may implement a shooting function through the ISP, the camera 193, the video codec, the GPU, the display 194, the application processor, and the like.
The ISP is used to process the data fed back by the camera 193. The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image to the photosensitive element.
The digital signal processor is used for processing digital signals, and can process digital image signals and other digital signals. For example, when the electronic device 100 selects a frequency bin, the digital signal processor is used to perform fourier transform or the like on the frequency bin energy.
Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 may play or record video in a variety of encoding formats, such as: moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, and the like.
The NPU is a neural-network (NN) computing processor that processes input information quickly by using a biological neural network structure, for example, by using a transfer mode between neurons of a human brain, and can also learn by itself continuously.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to extend the storage capability of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music, video, etc. are saved in an external memory card.
The internal memory 121 may be used to store computer-executable program code, which includes instructions. The internal memory 121 may include a program storage area and a data storage area. The storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required by at least one function, and the like. The storage data area may store data (such as audio data, phone book, etc.) created during use of the electronic device 100, and the like. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (UFS), and the like. The processor 110 executes various functional applications of the electronic device 100 and data processing by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
The electronic device 100 may implement audio functions via the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor. Such as music playing, recording, etc.
The pressure sensor 180A is used for sensing a pressure signal, and converting the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194. The pressure sensor 180A can be of a wide variety, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, and the like. The capacitive pressure sensor may be a sensor comprising at least two parallel plates having an electrically conductive material. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the strength of the pressure from the change in capacitance. When a touch operation is applied to the display screen 194, the electronic apparatus 100 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic apparatus 100 may also calculate the touched position from the detection signal of the pressure sensor 180A. In some embodiments, the touch operations that are applied to the same touch position but have different touch operation intensities may correspond to different operation instructions. For example: and when the touch operation with the touch operation intensity smaller than the first pressure threshold value acts on the short message application icon, executing an instruction for viewing the short message. And when the touch operation with the touch operation intensity larger than or equal to the first pressure threshold value acts on the short message application icon, executing an instruction of newly building the short message.
The gyro sensor 180B may be used to determine the motion attitude of the electronic device 100. The air pressure sensor 180C is used to measure air pressure. In some embodiments, electronic device 100 calculates altitude, aiding in positioning and navigation, from barometric pressure values measured by barometric pressure sensor 180C. The magnetic sensor 180D includes a hall sensor. The acceleration sensor 180E may detect the magnitude of acceleration of the electronic device 100 in various directions (typically three axes). A distance sensor 180F for measuring a distance. The electronic device 100 may measure the distance by infrared or laser. In some embodiments, taking a picture of a scene, electronic device 100 may utilize range sensor 180F to range for fast focus. The proximity light sensor 180G may include, for example, a Light Emitting Diode (LED) and a light detector, such as a photodiode. The ambient light sensor 180L is used to sense the ambient light level. The fingerprint sensor 180H is used to collect a fingerprint. The electronic device 100 may utilize the collected fingerprint characteristics to unlock a fingerprint, access an application lock, photograph a fingerprint, answer an incoming call with a fingerprint, and so on. The temperature sensor 180J is used to detect temperature.
The touch sensor 180K is also called a "touch device". The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen". The touch sensor 180K is used to detect a touch operation applied thereto or nearby. The touch sensor can communicate the detected touch operation to the application processor to determine the touch event type. Visual output associated with the touch operation may be provided through the display screen 194. In other embodiments, the touch sensor 180K may be disposed on a surface of the electronic device 100, different from the position of the display screen 194.
The SIM card interface 195 is used to connect a SIM card. The SIM card can be attached to and detached from the electronic device 100 by being inserted into the SIM card interface 195 or being pulled out of the SIM card interface 195. The electronic device 100 may support 1 or N SIM card interfaces, N being a positive integer greater than 1. The SIM card interface 195 may support a Nano SIM card, a Micro SIM card, a SIM card, etc. The same SIM card interface 195 can be inserted with multiple cards at the same time. The types of the plurality of cards can be the same or different. The SIM card interface 195 may also be compatible with different types of SIM cards. The SIM card interface 195 may also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as communication and data communication. In some embodiments, the electronic device 100 employs esims, namely: an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100. The software system of the electronic device 100 may employ a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture.
Before describing embodiments of the present application, a description of key terms will first be provided.
The decoder (decoder) may be a hardware/software device that decodes the digital video audio data stream back into an analog video audio signal.
Hardware resources on electronic devices (e.g., smartphones, etc.) are limited. When the hardware decoder that has been created currently has exhausted the hardware resources (the user of the electronic device does not perceive this), if there is a new hardware decoder that needs to be created for use, an error is reported. The required hardware decoder fails to create, so the video cannot be decoded continuously.
In one embodiment, when the hardware decoder that has been created currently consumes the hardware resources, if a new hardware decoder needs to be created for use, there is an error report of NO MEMORY. NO MEMORY, can indicate insufficient hardware resources.
For example, high pass 6375
Figure 666195DEST_PATH_IMAGE001
High pass 4350
Figure 131812DEST_PATH_IMAGE001
The chip platform only supports at most 4 720P @30 (the resolution is 720, P refers to progressive scanning, and the frame rate is 30 frames per second) simultaneous coding and decoding, and if a picture is projected at 1080P @60 and a gallery is opened to play 1080P @60 video, the situation that the played picture is still occurs. As shown belowA portion of the corresponding LOG (assumed to be logged 1) is shown through which the content can be seen as "H/W is overloaded", i.e., NO MEMORY.
As shown below, log 1 may include the following:
Figure 594017DEST_PATH_IMAGE002
referring to fig. 2, fig. 2 is a schematic flowchart illustrating a method for determining a decoder according to an embodiment of the present application, where the method may include the following steps 201 to 207.
In step 201, a creation operation for creating a hardware decoder is performed.
When the current application needs to use a new hardware decoder, a creation operation for creating the hardware decoder may be performed to attempt to create the hardware decoder required by the current application.
Wherein the creation operation can usually be successfully performed (i.e. the new hardware decoder creation is successful) in case the hardware resources are sufficient. However, in the case of insufficient hardware resources, the creation operation usually fails to be performed (i.e., the new hardware decoder fails to be created). When the execution fails, an error (such as NO MEMORY) indicating that NO MEMORY exists may be reported.
Step 202, determining whether there is an error report indicating that there is no memory, if yes, executing step 203, otherwise, ending.
In one embodiment, the set video decoding processing flow may involve an operation of creating a hardware decoder as needed, and when the hardware decoder is failed to be created, an error indicating whether there is a memory is reported. In addition, the video decoding process flow may also involve reporting of other types of errors (such as device failure, hardware decoder creation failure due to other reasons than insufficient hardware resources, etc.).
The embodiment shown in fig. 2 can monitor whether there is an error reporting indicating that there is no memory in real time during the operation of the video decoding processing flow, and does not monitor the reporting of other types of errors.
For example, whether there is an error report indicating that there is no memory can be determined by checking the log.
In step 203, a reclamation operation for reclaiming the created hardware decoder is performed.
There may be one or more hardware decoders that have been created.
In one embodiment, it may be determined whether the hardware decoder occupied by the other application program (the other application program is different from the current application program) is available for recovery. If it can be reclaimed, it can try to close the other application program to reclaim the hardware decoder occupied by it.
The influencing factors for determining whether the other application programs can be closed can be: the current usage status of the other application, the user's personalized setting information for the other application, etc.
For example, if the other application is currently in use, the occupied hardware decoder of the other application is not recycled, otherwise, the hardware decoder can be recycled.
For example, the information about whether to allow the other application to be recycled, which is preset by the user or confirmed in real time, may be combined to determine whether to recycle the occupied hardware decoder of the other application.
In another embodiment, the priority of the other application program can be further limited to be lower than that of the current application program. Based on the defined priority, the hardware decoder occupied by the application program with lower priority (i.e. the application program has lower priority than the current application program) can be recycled correspondingly, and the hardware decoder occupied by the application program with higher priority (i.e. the application program has higher priority than the current application program) is not recycled.
Step 204, determining whether the recycling operation is successfully executed, if yes, executing step 205, otherwise, ending.
For example, after performing the reclaiming operation, if the application occupying the hardware decoder to be reclaimed is closed, it may indicate that the reclaiming operation was successfully performed. On the contrary, if the application program occupying the hardware decoder to be recycled is not closed, it may indicate that the recycling operation fails to be executed.
In one embodiment, if the recycling operation fails to be performed, a prompt indicating an error may be returned, and then the process is terminated.
Step 205, releasing the hardware resources occupied by the recycled hardware decoder.
Illustratively, after an application occupying a hardware decoder to be reclaimed is closed, the hardware decoder occupied by the application is reclaimed, so that the hardware resource occupied by the reclaimed hardware decoder can be released.
In step 206, an initialization operation is performed.
Since the creation failed when the hardware decoder was previously created for the current application, in the event that the hardware resources were released such that the hardware resources may be sufficient, an initialization operation may be performed to restart to again attempt to create the hardware decoder for the current application.
Step 207, a configuration operation corresponding to the creation of the hardware decoder is performed.
After the initialization is completed, the corresponding configuration operation can be executed, and after the configuration is completed, the hardware decoder can be tried to be created for the current application program again.
The Android system may provide a set of hardware decoders and a set of software decoders for decoding video. In order to solve the problem that the video cannot be decoded continuously when the hardware resources are insufficient, the video decoding method can be switched to create a software decoder when the hardware resources are insufficient, and the purpose of continuous decoding can be achieved by using the software decoder.
Referring to fig. 3, fig. 3 is a flowchart illustrating a method for determining a decoder according to an embodiment of the present application, where the method includes the following steps 301 to 311.
Step 301, determining whether the first operation fails to be executed, if so, executing step 302, otherwise, ending the first operation, where the first operation is used to create a first decoder corresponding to the first application program.
The first application may be a currently running application. The first operation may be performed when the decoder is required for the execution of the first application.
Step 302, determining whether the reason for the first operation execution failure is that the hardware resources are insufficient, if yes, executing step 303, otherwise, ending.
If the first operation fails to be performed due to insufficient hardware resources, the first operation may be considered as an operation for creating a hardware decoder (rather than a software decoder), i.e., the first decoder is a hardware decoder.
In case of a software decoder creation failure, there may be no need to try again to create a software decoder.
As such, in one implementation, step 302 may be implemented by determining whether the first decoder is a software decoder. If the first decoder is a software decoder, it may be considered that the reason for the execution failure of the first operation is not insufficient hardware resources, and if the first decoder is not a software decoder, it may be considered that the reason for the execution failure of the first operation is insufficient hardware resources.
Since the embodiment shown in fig. 3 can switch to creating a software decoder when the hardware decoder is failed to be created due to insufficient hardware resources, the process ends when the determination in step 302 is no.
Step 303, determining whether the first operation is used for creating a pre-specified hardware decoder, if not, executing step 304, otherwise, ending.
Illustratively, for the case of a specified hardware decoder, a unique identification of the decoder (such as the name of the decoder) may be specified. It is feasible that the hardware decoder can be created based on different interfaces (or different creation means, etc.).
For example, interface 1 indicates that a pre-specified hardware decoder needs to be created, and interface 2 indicates that switching to creating a software decoder is allowed when hardware resources are insufficient so that hardware decoder creation fails.
Since the interface 1 specifies a hardware decoder to be created, the creation is terminated if the creation fails, and the interface is not switched to creating a software decoder.
In one implementation, step 303 may be implemented by determining whether to perform the first operation based on interface 2. If it is determined that the first operation is performed based on interface 2, step 304 is performed, otherwise, the process ends.
In one embodiment, interface 2 may be written as "mediacodec. In this case, step 303 may specifically be to determine whether the first decoder is a decoder created based on "mediacode.
MediaCodec is a codec component in the android operating system. The "Type" in the "createByType" may be a format Type of a video to be decoded, and the format Type of the video may be, for example, AVC (advanced video coding), HEVC (high efficiency video coding), or the like. When a decoder is created according to a video type, the specification of the corresponding decoder, such as parameters of resolution, frame rate, etc., can be obtained.
Step 304, determining whether to allow switching to create a software decoder according to the first configuration information, if yes, executing step 305, otherwise, ending, where the first configuration information includes: configuration information indicating whether switching to creating a software decoder is allowed when hardware resources are insufficient so that hardware decoder creation fails.
For example, the user may configure the corresponding first configuration information for different applications as desired.
The corresponding first configuration information may be preset for different applications.
Step 305, determining whether the first decoder is a decoder having at least one of the first characteristic and the second characteristic, if not, executing step 306, otherwise, ending, wherein the first characteristic is a characteristic corresponding to a secure decoder, and the second characteristic is a characteristic corresponding to a low-latency decoder.
The first feature and the second feature are both features that are supported by a hardware decoder but not supported by a software decoder.
Characteristics, or requirements, criteria, attributes, etc. Both the first and second features may be used to distinguish between a hardware decoder and a software decoder.
Corresponding to the first and second features, the hardware decoder that can be created can have: a hardware decoder belonging to a secure decoder type, a hardware decoder belonging to a low latency decoder type, a hardware decoder belonging to a secure decoder type and a low latency decoder type, etc. The software decoders that can be created are not typically of the secure decoder type nor of the low-latency decoder type.
It should be noted that, whether the first decoder is created successfully or not, the related information of the first decoder (for example, information of whether the first decoder is a secure decoder or not, information of whether the first decoder is a low-latency decoder or not, and the like) already exists.
If the first decoder has at least one of the first characteristic and the second characteristic, i.e., a decoder having at least one of the first characteristic and the second characteristic needs to be created (i.e., the software decoder does not meet the creation requirement), the process may end without switching to creating the software decoder if the determination in step 305 is yes.
In one implementation, step 305 may specifically be determining whether the first decoder is a secure decoder, and whether the first decoder is a low latency decoder. Step 306 is performed when the first decoder is neither a secure decoder nor a low latency decoder, otherwise it ends.
In another implementation, step 305 may specifically be determining whether the first decoder is a secure decoder. If the first decoder is not a secure decoder, step 306 may be performed, otherwise, the process ends.
In yet another implementation, step 305 may specifically be determining whether the first decoder is a low latency decoder. If the first decoder is not a low latency decoder, step 306 may be performed, otherwise, it ends.
Step 306, determining whether the first decoder is a decoder having a third characteristic, if not, executing step 307, otherwise, ending, where the third characteristic is a characteristic corresponding to a real-time decoder having a resolution greater than the first threshold.
The third feature is a feature supported by a hardware decoder but supported by a software decoder.
When the decoder creation requirement of the application program is high (for example, having the third feature), so that the software decoder does not support the requirement and the hardware decoder can support the requirement, the hardware decoder needs to be created. And ending if the hardware decoder is failed to be established.
In this case, if the first decoder is a decoder having the third characteristic, the determination in step 306 is yes.
When the decoder creation requirement of the application program is low (for example, the third characteristic, the fourth characteristic corresponding to the non-real-time decoder or the fifth characteristic corresponding to the real-time decoder with the resolution not greater than the first threshold value is not required), so that the software decoder and the hardware decoder can support the requirement, the hardware decoder can be created, and the software decoder can also be created. If the hardware decoder is failed to be created, the method can be continued so as to switch to the creation of the software decoder.
The value of the first threshold may be set as needed, for example, 1080P, or may be set to another suitable value.
In this case, if the first decoder is a decoder having the fourth feature or the fifth feature, the step 306 determines no.
In one embodiment, step 306 may specifically be determining whether the first decoder is a non-real-time decoder and whether the first decoder is a real-time decoder having a resolution not greater than a first threshold. If the first decoder is a non-real-time decoder, step 307 is performed, and if the first decoder is a real-time decoder with a resolution not greater than the first threshold, step 307 is also performed.
In another embodiment, step 306 may be specifically determining whether the first decoder is a real-time decoder having a resolution greater than the first threshold. Ending when the first decoder is a real-time decoder with a resolution greater than the first threshold, otherwise executing step 307.
Step 307, the software decoder is looked up in the first storage module.
In one embodiment, the first storage module may store a software decoder.
In another embodiment, the first storage module may record only the software decoder, such as the name of the software decoder, without storing the software decoder.
In one embodiment, the first storage module may be a Multipurpose Internet Mail Extensions (MIME) in an electronic device (e.g., a smart phone), which is determined according to factors such as an operating system and hardware of the electronic device. Searching the decoder list by taking the MIME as a key word to search the software decoder can enable the software decoder used by the first application program for decoding the video to be matched with the electronic equipment.
In other embodiments, the first storage module may also be other physical or virtual storage modules storing decoders compatible with the electronic device.
In one embodiment, part or all of the decoders in the first storage module may be obtained, and the obtained decoders may include a hardware decoder or a software decoder.
Step 308, determining whether the software decoder is found in the first storage module, if yes, executing step 309, otherwise, ending.
In step 309, the specification supported by the searched software decoder is determined.
In one embodiment, a tool (e.g., a file, a storage module, etc.) for recording the specifications supported by the software decoder may be queried to determine the specifications supported by the located software decoder.
This tool for recording the supported specifications of the software decoder may be denoted as "imedia codeclist (media decoder list)", in which the maximum supported specifications of the software decoder may be recorded.
The specification may include resolution, frame rate, and the like.
Step 310, according to the specification supported by the searched software decoder, determining whether the searched software decoder supports the target specification corresponding to the first decoder, if yes, executing step 311, otherwise, ending.
For example, by comparing the maximum rule of the located software decoder with the target specification of the first decoder, it may be determined whether the located software decoder is used by the first application to decode the video.
In one embodiment, each found software decoder may be compared in turn until a software decoder supporting the target specification is obtained. In another embodiment, more than one software decoder supporting the target specification may be obtained by comparing each searched software decoder, and any one or the best one of the software decoders may be selected for the first application.
Step 311, set the decoder corresponding to the first application as one of the searched software decoders supporting the target specification.
As such, the first application may use the software decoder to decode video.
In one embodiment, information for configuring a decoder used by the first application (e.g., denoted as mlnitName, "mlnitName is a variable name in the code") may be assigned to a unique identification of the software decoder (e.g., the name of the software decoder) so that the first application decodes video using the software decoder.
In one embodiment, referring to fig. 3, a prompt indicating an error may be returned first, and then the process is ended.
The decoder determination method provided by the embodiment shown in fig. 3 can dynamically and automatically switch the software decoders, thereby improving the decoding success rate.
According to the embodiment of the application, the hardware decoder is established when the hardware resources are sufficient, and the hardware decoder is tried to be switched to the software decoder when the hardware resources are insufficient, so that the aim of continuing decoding can be achieved, and the decoding effect can be ensured.
According to the method and the device, the process of dynamically switching the software decoder is added in the video frame, so that the aim of continuously decoding by using the software decoder can be fulfilled when the hardware resources are insufficient and a new hardware decoder cannot be created.
It should be noted that the decoder determining method according to the embodiment of the present application is not limited to the content shown in fig. 3, for example, in other feasible implementations, the order of execution of some of the above determining steps may not be fixed, and the steps may also be executed in parallel. This is not a limitation of the present application.
For example, in another embodiment, step 303 may be executed first, and then step 302 may be executed, step 302 may be executed when step 303 determines no, and step 304 may be executed when step 302 determines yes.
For another example, in another embodiment, step 306 may be executed first, step 305 may be executed, step 306 is executed if no, step 305 is executed, and step 307 is executed if no, step 305 is executed.
In addition, some of the above determination steps may be performed entirely or partially. This is not a limitation of the present application.
For example, in another embodiment, step 302 may not be performed.
As another example, in yet another embodiment, step 304 described above may not be performed.
For another example, in another embodiment, the steps 304 and 302 may not be performed.
For another example, in another embodiment, steps 309 and 310 may not be performed.
In the embodiment shown in fig. 3, based on steps 301 to 303, it may be determined whether the operation of creating the decoder fails to be executed, if the operation fails to be executed, it may be further determined whether the operation of creating the decoder fails to be executed due to insufficient hardware resources (which may exclude the case of creating the decoder by software), and if the operation fails to be executed due to insufficient hardware resources, it may be further determined whether a pre-specified hardware decoder needs to be created (which may exclude the case of creating the decoder by hardware based on interface 1). If the first operation is not used to create the pre-specified hardware decoder, as determined in step 303, it means that the operation performed based on the interface 2 to create the hardware decoder fails to be performed due to insufficient hardware resources.
In another embodiment different from the embodiment shown in fig. 3, the above steps 301 to 303 may not be executed, but the step of "determining whether the operation of creating a decoder performed based on the interface 2 fails to be performed" may be directly executed (assumed to be referred to as step one), and the step 304 may be executed if the operation of creating a decoder performed based on the interface 1 fails to be performed, without monitoring whether the operation of creating a decoder performed based on the interface 1 fails to be performed.
For example, the step one may be specifically to only monitor whether an error report of "NO MEMORY" occurs during the process of creating the decoder through the above "media code.
Further, considering that the interface 2 indicates switching to creating a soft decoder when the hardware decoder fails to be created due to insufficient hardware, the operation of creating a decoder performed based on the interface 2 may be an operation of creating a hardware decoder, or an operation of creating a software decoder. As such, in the case where it is determined that the operation of creating the decoder performed based on the interface 2 fails to be performed, and before the above-described step 311 is performed, a step of determining whether the first decoder is a software decoder may also be performed. If not, step 311 is executed, otherwise, step 311 is not executed.
In one embodiment, the above steps 203 and 204 may be performed after the first operation is determined to fail to be performed, and if the recycling operation fails to be performed, the step 304 may be performed.
Based on the above, in a feasible implementation manner, if an error report of "NO MEMORY" occurs during the process of creating a hardware decoder by "mediacode.
1) The hardware decoder that failed in creation is neither a secure decoder nor a low-latency decoder;
2) the hardware decoder failed in creation is a non-real-time decoder or a real-time decoder but the resolution is lower than or equal to 1080P;
3) for the specification of the hardware decoder which fails to be created, a software decoder capable of supporting the specification exists in the mime.
After reassigning the name of the decoder, the decoder creation process can be re-executed (e.g., the following steps 1 to 3 can be executed after step 311).
Step 1, release the old decoder before. The hardware decoder is not created for the current application, so the old decoder is released first, so that the new decoder can be configured by initialization and configuration.
And step 2, executing initialization operation.
The creation of the corresponding software decoder for the current application is started with a restart by performing an initialization operation.
Step 3, executing configuration operation corresponding to creating the software decoder.
After the initialization is completed, corresponding configuration operations can be performed according to the assigned names of the software decoders to create corresponding software decoders for the current application program.
The implementation based on the embodiment of the application can dynamically switch the soft decoding, so that the playing picture can be normally played and cannot be still. In one embodiment, a portion of the corresponding LOG (assumed to be logged 2) through which the switch to soft decoding was successful is shown as follows.
In one embodiment, as shown below, log 2 may include the following:
Figure 941822DEST_PATH_IMAGE003
the "NO MEMORY" is seen through this part of the log content, i.e. the hardware decoder was created unsuccessfully, and switched to create the software decoder. Wherein "c 2. qti.av.decoder" is the name of the corresponding hardware decoder and "c 2. android.av.decoder" is the name of the corresponding software decoder. According to the log content, when the hardware decoder is failed to be created due to insufficient memory, the hardware decoder is switched to the software decoder and the switching is successful.
In another embodiment, as shown below, log 2 may include the following:
Figure 413254DEST_PATH_IMAGE004
it can be seen through this part of the log content that the create hardware decoder switches to the create software decoder. Wherein "c 2. qti.av.decoder" is the name of the corresponding hardware decoder and "c 2. android.av.decoder" is the name of the corresponding software decoder.
In one embodiment, the confirmation may be checked by "dump media. resourcemanager" or "media. hncodec" or "filter LOG by logcat" as to whether the software decoder is switched and the switch is successful.
Illustratively, "dump media manager" may be understood as "view media resource manager", "media hncodec" may be understood as "view media codec", and "filter LOG by logcat" may be understood as "view LOG by logcat output", which is not limited in this embodiment of the present application.
logcat is a command line tool in Android, and can be used to obtain log information of a program.
Taking the example of checking to confirm whether the software decoder is switched and the switching is successful by "filtering the LOG that was typed out at logcat", in one implementation, a portion of the corresponding LOG (assumed to be logged 3) is shown as follows. Referring to this part, it can be seen from adb logcat-s MediaCodec that 0 xffffffff 4 appears when the hardware decoder c2. qti.av.decoder is created, i.e. NO MEMORY is switched to the software decoder c2. android.av.decoder.
adb, full spelling is Android Debug Bridge, and Chinese paraphrasing is Android Debug Bridge.
In this implementation, "c 2. qti.av.decoder" is the name of the corresponding hardware decoder and "c 2. android.av.decoder" is the name of the corresponding software decoder.
"adb logcat-s MediaCodec" may be understood as "looking at the MediaCodec portion of log of logcat output".
As shown below, log 3 may include the following:
Figure 530115DEST_PATH_IMAGE005
it can be seen from this partial log content that the hardware decoder is switched to the creation software decoder when the hardware decoder fails to be created. Wherein "c 2. qti.av.decoder" is the name of the corresponding hardware decoder and "c 2. android.av.decoder" is the name of the corresponding software decoder.
Taking the example of checking to confirm whether the software decoder was switched and the switching was successful by "filtering the LOG that was popped up" in another implementation, a portion of the corresponding LOG (assumed to be logged 4) is shown below. Referring to this part, it can be seen that the hardware decoder c2. qti.av.decoder is first followed by the software decoder c2. android.av.decoder, i.e. the software decoder is switched and the switching is successful, by the adb shell dual clock system media.
In this implementation, "c 2. qti.av.decoder" is the name of the corresponding hardware decoder and "c 2. android.av.decoder" is the name of the corresponding software decoder.
As shown below, log 4 may include the following:
Figure 428801DEST_PATH_IMAGE006
referring to fig. 4, fig. 4 is a flow chart illustrating another decoder determining method, which may include the following steps 401 to 403. For understanding the method shown in fig. 4, reference may be made to the above technical description of the method shown in fig. 3, which is not repeated herein.
Step 401, determining whether the first operation fails to be executed, where the first operation is used to create a first decoder corresponding to the first application program, if yes, executing step 402, otherwise, ending.
Step 402, determining whether the first decoder has target characteristics, wherein the target characteristics comprise characteristics which are not supported by the software decoder, if not, executing step 403, otherwise, ending.
The target feature is a feature that is supported by a hardware decoder but not supported by a software decoder, such as a feature corresponding to a secure decoder, a feature corresponding to a low latency decoder, a feature corresponding to a real-time decoder having a resolution greater than a first threshold, and so forth.
If the decoder to be created has the target characteristics, that is, only the hardware decoder can be created, the hardware decoder cannot be switched to the software decoder when the hardware decoder is failed to be created.
In one embodiment, the target features include: corresponding to at least one of the first characteristics of the secure decoder, corresponding to the second characteristics of the low latency decoder.
Based on this, in one embodiment, the case where the first decoder does not have the target feature includes: the first decoder does not have the first feature.
In another embodiment, the case where the first decoder does not have the target feature includes: the first decoder does not have the second characteristic.
In yet another embodiment, the case where the first decoder does not have the target feature includes: the first decoder does not have the first feature and the second feature. I.e. the first decoder that failed to be created is neither a secure decoder nor a low latency decoder.
In one embodiment, the target features include: corresponding to a third characteristic of the real-time decoder having a resolution greater than the first threshold.
If the first decoder that failed in creation is a non-real-time decoder, it does not have the third feature. If the first decoder that failed in creation is a real-time decoder with a resolution not greater than the first threshold, it does not have the third feature.
In step 403, the decoder corresponding to the first application is set as a software decoder.
The end is in case the first decoder has the target feature, i.e. the hardware decoder creation fails and it cannot be switched to create a software decoder. If there is more than one target feature, the first decoder ends as long as it has any target feature (i.e., has at least one target feature), and need not have all of the target features.
In one embodiment, in the case that the first decoder does not have the target feature, the method further comprises: determining whether a software decoder is in the first storage module; under the condition that the first storage module has a software decoder, determining the specification supported by a target software decoder, wherein the target software decoder is any one software decoder in the first storage module; determining whether the target software decoder supports the target specification corresponding to the first decoder according to the specification supported by the target software decoder; step 403 comprises: in the case where the specification supported by the target software decoder supports the target specification, the decoder corresponding to the first application is set as the target software decoder.
The specification includes at least one of a resolution and a frame rate.
The embodiment can be specifically realized through the steps 307 to 311. The target software decoder may be any one of the software decoders supporting the target specification found in the embodiment shown in fig. 3, or may be a specific one (for example, the first one).
It is feasible that the name of the decoder corresponding to the first application may be set to the name of the target software decoder.
In one embodiment, in case of a failure of the first operation execution, the method may further include: and determining whether the reason for the execution failure of the first operation is insufficient hardware resources, if so, executing step 403, and otherwise, ending.
In one embodiment, in case of failure of the first operation execution, the method may further include: it is determined whether the first operation is for creating a pre-specified hardware decoder, if not, step 403 is performed, otherwise, the process ends.
An embodiment of the present application further provides a decoder determining apparatus, including: a first determining module, configured to determine whether a first operation is failed to be performed, the first operation being used to create a first decoder corresponding to a first application; a second determining module for determining whether the first decoder has a target feature in case of a failure of the first operation, the target feature including a feature not supported by the software decoder; and the processing module is used for setting the decoder corresponding to the first application program as a software decoder under the condition that the first decoder does not have the target characteristic.
An embodiment of the present application further provides an electronic chip, where the task processing chip is installed in an electronic device (UE), and the electronic chip includes: a processor for executing computer program instructions stored on the memory, wherein the computer program instructions, when executed by the processor, trigger the electronic chip to perform the method steps provided by any of the method embodiments of the present application.
An embodiment of the present application further provides a terminal device, where the terminal device includes a communication module, a memory for storing computer program instructions, and a processor for executing the program instructions, where the computer program instructions, when executed by the processor, trigger the terminal device to execute the method steps provided in any of the method embodiments of the present application.
An embodiment of the present application also provides a server device comprising a communication module, a memory for storing computer program instructions, and a processor for executing the program instructions, wherein the computer program instructions, when executed by the processor, trigger the server device to perform the method steps provided by any of the method embodiments of the present application.
An embodiment of the present application further provides an electronic device comprising a plurality of antennas, a memory for storing computer program instructions, a processor for executing the computer program instructions, and a communication apparatus (such as a communication module that may implement 5G communication based on NR protocol), wherein the computer program instructions, when executed by the processor, trigger the electronic device to perform the method steps provided by any of the method embodiments of the present application.
In particular, in an embodiment of the present application, one or more computer programs are stored in the memory, the one or more computer programs including instructions that, when executed by the apparatus, cause the apparatus to perform the method steps described in the embodiments of the present application.
Specifically, in an embodiment of the present application, a processor of the electronic device may be a System On Chip (SOC), and the processor may include a Central Processing Unit (CPU), and may further include other types of processors. Specifically, in an embodiment of the present application, the processor of the electronic device may be a PWM control chip.
Specifically, in an embodiment of the present application, the processor may include, for example, a CPU, a DSP (digital Signal processor) or a microcontroller, and may further include a GPU (graphics Processing unit), an embedded Neural Network Processor (NPU), and an Image Signal Processing (ISP), and the processor may further include a necessary hardware accelerator or a logic Processing hardware circuit, such as an ASIC, or one or more integrated circuits for controlling execution of the program according to the present application. Further, the processor may have the functionality to operate one or more software programs, which may be stored in the storage medium.
Specifically, in an embodiment of the present application, the memory of the electronic device may be a read-only memory (ROM), another type of static storage device capable of storing static information and instructions, a Random Access Memory (RAM), or another type of dynamic storage device capable of storing information and instructions, an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM), or another optical disc storage, an optical disc storage (including a compact disc, a laser disc, an optical disc, a digital versatile disc, a blu-ray disc, etc.), a magnetic disc storage medium, or another magnetic storage device, or any computer readable medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer.
In particular, in an embodiment of the present application, the processor and the memory may be combined into a processing device, and more generally, independent components, and the processor is configured to execute the program code stored in the memory to implement the method described in the embodiment of the present application. In particular implementations, the memory may be integrated within the processor or may be separate from the processor.
Further, the apparatuses, devices, and modules described in the embodiments of the present application may be implemented by a computer chip or an entity, or by a product with certain functions.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, apparatus, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media having computer-usable program code embodied in the medium.
In the several embodiments provided in the present application, any function, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application.
Specifically, an embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, and when the computer program runs on a computer, the computer is caused to execute the method steps provided in the embodiment of the present application.
An embodiment of the present application also provides a computer program product, which comprises a computer program that, when run on a computer, causes the computer to perform the method steps provided by the embodiments of the present application.
The embodiments herein are described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (devices), and computer program products according to embodiments herein. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions in actual implementation, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The integrated unit, which is implemented in the form of a software functional unit, may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) or a Processor (Processor) to execute some steps of the methods according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
In the embodiments of the present application, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present application are described in a progressive manner, and the same and similar parts among the embodiments can be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, as for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
Those of ordinary skill in the art will appreciate that the various elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of electronic hardware and computer software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The above description is only a preferred embodiment of the present application and should not be taken as limiting the present application, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (12)

1. A decoder determination method, comprising:
determining whether a first operation for creating a first decoder corresponding to a first application program is failed to be performed;
in the event of a failure of execution of the first operation, determining whether the first decoder has a target feature, the target feature comprising a feature not supported by a software decoder;
setting a decoder corresponding to the first application as a software decoder in a case where the first decoder does not have the target feature.
2. The method of claim 1, wherein the target feature comprises: corresponding to at least one of the first characteristics of the secure decoder, corresponding to the second characteristics of the low latency decoder.
3. The method of claim 2, wherein the case where the first decoder does not have the target feature comprises: a case where the first decoder does not have the first feature and the second feature.
4. The method of claim 1, wherein the target feature comprises: corresponding to a third characteristic of the real-time decoder having a resolution greater than the first threshold.
5. The method of claim 1, wherein in the event of a failure of the first operation to execute, the method further comprises:
determining whether the reason for the first operation execution failure is insufficient hardware resources;
and in the case that the reason for the failure in executing the first operation is insufficient hardware resources, executing the step of setting a decoder corresponding to the first application program as a software decoder.
6. The method of claim 1, wherein in the event of a failure of the first operation to execute, the method further comprises:
determining whether the first operation is for creating a pre-specified hardware decoder;
in the case where the first operation is not used to create a pre-specified hardware decoder, performing the step of setting a decoder corresponding to the first application as a software decoder.
7. The method of claim 1, wherein in the case that the first decoder does not have the target feature, the method further comprises:
determining whether a software decoder is in the first storage module;
under the condition that a software decoder exists in the first storage module, determining a specification supported by a target software decoder, wherein the target software decoder is any one software decoder in the first storage module;
determining whether the target software decoder supports a target specification corresponding to the first decoder according to the specification supported by the target software decoder;
the setting of the decoder corresponding to the first application as a software decoder includes:
if the target specification is supported by the specification supported by the target software decoder, setting a decoder corresponding to the first application as the target software decoder.
8. The method of claim 7, wherein the specification comprises at least one of a resolution and a frame rate.
9. A decoder determination apparatus, comprising:
a first determining module for determining whether a first operation for creating a first decoder corresponding to a first application program is failed to be performed;
a second determining module for determining whether the first decoder has a target feature in the event of a failure of the first operation to execute, the target feature comprising a feature not supported by a software decoder;
a processing module, configured to set a decoder corresponding to the first application as a software decoder if the first decoder does not have the target feature.
10. An electronic chip, comprising:
a processor for executing computer program instructions stored on a memory, wherein the computer program instructions, when executed by the processor, trigger the electronic chip to perform the method of any of claims 1-8.
11. An electronic device, characterized in that the electronic device comprises a memory for storing computer program instructions, a processor for executing the computer program instructions and communication means, wherein the computer program instructions, when executed by the processor, trigger the electronic device to perform the method according to any of claims 1-8.
12. A computer-readable storage medium, in which a computer program is stored which, when run on a computer, causes the computer to carry out the method according to any one of claims 1-8.
CN202210989531.2A 2022-08-18 2022-08-18 Decoder determination method, device, chip, electronic equipment and medium Active CN115065824B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210989531.2A CN115065824B (en) 2022-08-18 2022-08-18 Decoder determination method, device, chip, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210989531.2A CN115065824B (en) 2022-08-18 2022-08-18 Decoder determination method, device, chip, electronic equipment and medium

Publications (2)

Publication Number Publication Date
CN115065824A true CN115065824A (en) 2022-09-16
CN115065824B CN115065824B (en) 2023-02-24

Family

ID=83207706

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210989531.2A Active CN115065824B (en) 2022-08-18 2022-08-18 Decoder determination method, device, chip, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN115065824B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140146895A1 (en) * 2012-11-28 2014-05-29 Cisco Technology, Inc. Fast Switching Hybrid Video Decoder
CN105992056A (en) * 2015-01-30 2016-10-05 腾讯科技(深圳)有限公司 Video decoding method and device
CN106658174A (en) * 2016-10-31 2017-05-10 努比亚技术有限公司 Video decoding terminal and method
CN106792066A (en) * 2016-12-20 2017-05-31 暴风集团股份有限公司 The method and system that the video decoding of optimization is played
CN108282164A (en) * 2017-01-05 2018-07-13 腾讯科技(深圳)有限公司 A kind of data encoding and coding/decoding method and device
CN110381322A (en) * 2019-07-15 2019-10-25 腾讯科技(深圳)有限公司 Method for decoding video stream, device, terminal device and storage medium
CN113722058A (en) * 2021-06-16 2021-11-30 荣耀终端有限公司 Resource calling method and electronic equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140146895A1 (en) * 2012-11-28 2014-05-29 Cisco Technology, Inc. Fast Switching Hybrid Video Decoder
CN105992056A (en) * 2015-01-30 2016-10-05 腾讯科技(深圳)有限公司 Video decoding method and device
CN106658174A (en) * 2016-10-31 2017-05-10 努比亚技术有限公司 Video decoding terminal and method
CN106792066A (en) * 2016-12-20 2017-05-31 暴风集团股份有限公司 The method and system that the video decoding of optimization is played
CN108282164A (en) * 2017-01-05 2018-07-13 腾讯科技(深圳)有限公司 A kind of data encoding and coding/decoding method and device
CN110381322A (en) * 2019-07-15 2019-10-25 腾讯科技(深圳)有限公司 Method for decoding video stream, device, terminal device and storage medium
CN113722058A (en) * 2021-06-16 2021-11-30 荣耀终端有限公司 Resource calling method and electronic equipment

Also Published As

Publication number Publication date
CN115065824B (en) 2023-02-24

Similar Documents

Publication Publication Date Title
CN111191213B (en) Method for deleting security service and electronic equipment
EP3859576B1 (en) Application permission management method and electronic device
CN110780929B (en) Method for calling hardware interface and electronic equipment
CN114461375B (en) Memory resource management method and electronic equipment
CN114116191A (en) Memory cold page processing method and electronic equipment
CN112947947A (en) Downloading method and distribution method of installation package, terminal equipment, server and system
CN111865646A (en) Terminal upgrading method and related device
CN113138878B (en) Method for processing crash of trusted execution environment operating system and electronic equipment
CN114077519B (en) System service recovery method and device and electronic equipment
CN115119048B (en) Video stream processing method and electronic equipment
CN115065824B (en) Decoder determination method, device, chip, electronic equipment and medium
WO2023051094A1 (en) Memory recovery method and apparatus, electronic device, and readable storage medium
CN114915747B (en) Video call method, electronic device and readable storage medium
CN111330284B (en) Archiving method, archiving device, electronic device and computer readable storage medium for game
CN114253737A (en) Electronic device, memory recovery method thereof and medium
CN113741911A (en) Function package loading method and device, server and electronic equipment
CN114690849A (en) Clock skew determination method, device and storage medium
CN116208705B (en) Equipment abnormality recovery method and electronic equipment
CN116048772B (en) Method and device for adjusting frequency of central processing unit and terminal equipment
CN113938256B (en) PDCCH candidate blind detection method based on log-likelihood ratio and related products
CN116048769B (en) Memory recycling method and device and terminal equipment
CN116719569B (en) Method and device for starting application
CN115460445B (en) Screen projection method of electronic equipment and electronic equipment
CN117369985A (en) Processor resource isolation method and device, electronic equipment and medium
CN117708009A (en) Signal transmission method and electronic equipment

Legal Events

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