CN112203097A - Adaptive video decoding method and device, terminal equipment and storage medium - Google Patents

Adaptive video decoding method and device, terminal equipment and storage medium Download PDF

Info

Publication number
CN112203097A
CN112203097A CN202011069169.4A CN202011069169A CN112203097A CN 112203097 A CN112203097 A CN 112203097A CN 202011069169 A CN202011069169 A CN 202011069169A CN 112203097 A CN112203097 A CN 112203097A
Authority
CN
China
Prior art keywords
decoding
video stream
terminal device
hard
video
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.)
Pending
Application number
CN202011069169.4A
Other languages
Chinese (zh)
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.)
Suzhou Zhendi Intelligent Technology Co Ltd
Original Assignee
Suzhou Zhendi Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Zhendi Intelligent Technology Co Ltd filed Critical Suzhou Zhendi Intelligent Technology Co Ltd
Priority to CN202011069169.4A priority Critical patent/CN112203097A/en
Publication of CN112203097A publication Critical patent/CN112203097A/en
Pending legal-status Critical Current

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/44Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/40Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using video transcoding, i.e. partial or full decoding of a coded input stream followed by re-encoding of the decoded output stream

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The application provides a self-adaptive video decoding method, a self-adaptive video decoding device, terminal equipment and a storage medium. The method comprises the following steps: receiving a first video stream; wherein the first video stream is encoded using H265; judging whether the terminal equipment supports H265 hard decoding; and when the terminal equipment does not support the H265 hard decoding, carrying out H265 soft decoding on the first video stream. By the method, the terminal equipment can adaptively decode the first video stream coded by the H265, so that the first video stream can be softly decoded by switching the decoding link of the terminal equipment when the terminal equipment does not support the H265 hard decoding, the problem that the user using requirement is influenced due to the fact that part of the terminal equipment cannot normally display video pictures because the terminal equipment does not support the H265 hard decoding is solved, and the user experience is improved.

Description

Adaptive video decoding method and device, terminal equipment and storage medium
Technical Field
The present application relates to the field of video decoding technologies, and in particular, to a method and an apparatus for adaptive video decoding, a terminal device, and a storage medium.
Background
With the rapid development of intelligent hardware and internet streaming media technologies, the intelligent hardware and the internet streaming media technologies are combined, so that better updating experience can be brought to users.
However, terminal devices produced by global manufacturers are various, and the same software is on different terminal devices, which may cause some software functions not to be used normally due to incompatibility of hardware and system. For example, on some terminal devices, there is a compatibility problem in the hardware decoding of H265, and the terminal devices cannot perform normal decoding, rendering and displaying of video pictures, so that some current terminal devices can only perform error reporting when H265 hard decoding is not supported, and the use requirements of users cannot be met.
Disclosure of Invention
An object of the embodiments of the present application is to provide a method and an apparatus for adaptive video decoding, a terminal device, and a storage medium, so as to improve the problem that "some current terminal devices can only report an error and cannot meet the user requirement when H265 hard decoding is not supported".
The invention is realized by the following steps:
in a first aspect, an embodiment of the present application provides an adaptive video decoding method, which is applied to a terminal device, and the method includes: receiving a first video stream; wherein the first video stream is encoded using H265; judging whether the terminal equipment supports H265 hard decoding; and when the terminal equipment does not support the H265 hard decoding, carrying out H265 soft decoding on the first video stream.
In the embodiment of the application, after receiving a first video stream encoded by using H265, a terminal device first determines whether H265 hard decoding is supported; when the H265 hard decoding is not supported, the decoding link is switched to carry out H265 soft decoding on the first video stream. By the method, the terminal equipment can adaptively decode the first video stream coded by the H265, so that the first video stream can be softly decoded by switching the decoding link of the terminal equipment when the terminal equipment does not support the H265 hard decoding, the problem that the user using requirement is influenced due to the fact that part of the terminal equipment cannot normally display video pictures because the terminal equipment does not support the H265 hard decoding is solved, and the user experience is improved.
With reference to the technical solution provided by the first aspect, in some possible implementation manners, the determining whether the terminal device supports H265 hard decoding includes: receiving a state code sent by a system API; and judging whether the terminal equipment supports the H265 hard decoding or not based on the state code.
In the embodiment of the application, after receiving the first video stream, the terminal device may implement compatibility detection according to the status code sent by the system API interface. Taking the android system as an example, after receiving the first video stream, the terminal device receives two types of status codes from the system API interface, where the value of the first type of status code is-10000, and the second type of status code is 0 and-1. And the terminal equipment can only carry out H265 hard decoding when receiving the second type status code, and cannot carry out H265 hard decoding when receiving the status code with the value of-10000, so that the compatibility detection can be effectively realized through the value of the status code received by the terminal equipment.
With reference to the technical solution provided by the first aspect, in some possible implementation manners, the determining whether the terminal device supports H265 hard decoding includes: decoding the first video stream using a hard decoding link; judging whether the first video stream is displayed in a display interface; when the display interface displays the first video stream, the terminal device is characterized to support the H265 hard decoding; when the display interface does not display the first video stream, the terminal equipment is characterized not to support the H265 hard decoding.
In the embodiment of the application, after receiving the first video stream, the terminal device may also directly decode the first video stream through the hard decoding link, and then implement compatibility detection according to the display condition of the display interface. That is, when the display interface displays the first video stream, the terminal device is characterized to support H265 hard decoding; when the display interface does not display the first video stream, the characterization terminal device does not support the H265 hard decoding. This method is also applicable to the case when the terminal device supports H265 hard decoding, but H265 hard decoding is unstable. That is, although the terminal device supports H265 hard decoding, when the first video stream is not displayed in the current display interface, the decoding link may be switched through the subsequent steps. Through the steps, the terminal equipment can be effectively detected, and then the corresponding decoding link is reasonably selected.
With reference to the technical solution provided by the first aspect, in some possible implementations, the performing H265 soft decoding on the first video stream includes: decoding the first video stream through a first thread to obtain YUV data; performing format conversion on the YUV data to obtain first data with a format type of RGB 565; and calling an android native window _ update interface in a rendering thread to render the first data.
In this embodiment of the application, when the first video stream is subjected to H265 soft decoding, the first video stream is decoded by a first thread to obtain YUV data, and then the YUV data is converted into first data in an RGB565 format required by an android native window _ update rendering interface, and then the android native window _ update interface is called in a rendering thread to render the first data. By the method, H265 soft decoding of the first video stream can be realized in the existing interface of the terminal equipment, and the utilization rate of the processor can be improved through different threads.
With reference to the technical solution provided by the first aspect, in some possible implementation manners, the terminal device is in communication connection with a streaming media device; the receiving a first video stream, comprising: and receiving the first video stream transmitted by the streaming media equipment in real time.
In the embodiment of the application, the terminal device is in communication connection with the streaming media device. That is, the terminal device may receive the first video stream delivered by the streaming media device in real time to perform adaptive video decoding.
With reference to the technical solution provided by the first aspect, in some possible implementations, when the terminal device does not support the H265 hard decoding, the method further includes: and sending an adaptation instruction to the streaming media device to enable the streaming media device to reduce the resolution of the transmitted second video stream.
In the embodiment of the present application, since the soft decoding puts extra data processing pressure on the processor, when the H265 soft decoding is adopted, an adaptation instruction is sent to the streaming media device in communication connection with the terminal device, so that the streaming media device reduces the resolution of the transmitted second video stream, thereby reducing the data processing pressure of the processor and the occupancy rate of the processor during subsequent decoding.
In a second aspect, an embodiment of the present application provides an adaptive video decoding apparatus, which is applied to a terminal device, and the apparatus includes: a receiving module, configured to receive a first video stream; wherein the first video stream is encoded using H265; the judging module is used for judging whether the terminal equipment supports H265 hard decoding; a soft decoding module, configured to perform H265 soft decoding on the first video stream when the terminal device does not support the H265 hard decoding.
In a third aspect, an embodiment of the present application provides a terminal device, including: a processor and a memory, the processor and the memory connected; the memory is used for storing programs; the processor is configured to invoke a program stored in the memory to perform a method as provided in the above-described first aspect embodiment and/or in combination with some possible implementations of the above-described first aspect embodiment.
With reference to the technical solution provided by the third aspect, in some possible implementations, the processor is connected to a streaming media device in a communication manner, and the processor is configured to receive the first video stream transmitted by the streaming media device.
In a fourth aspect, embodiments of the present application provide a storage medium having stored thereon a computer program, which, when executed by a processor, performs a method as provided in the above-described first aspect embodiment and/or in connection with some possible implementations of the above-described first aspect embodiment.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
Fig. 2 is a flowchart illustrating steps of an adaptive decoding method according to an embodiment of the present application.
Fig. 3 is an interaction diagram of a terminal device and a streaming media device according to an embodiment of the present application.
Fig. 4 is an application scene diagram of a terminal device and an unmanned aerial vehicle provided in an embodiment of the present application.
Fig. 5 is a block diagram of an adaptive decoding apparatus according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
Based on the problem that some current terminal devices can only report errors and cannot meet the use requirements of users when the H265 hard decoding is not supported, the inventors of the present application have conducted long-term research and propose a method and an apparatus for adaptive video decoding, a terminal device and a storage medium to solve the above problems.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a terminal device 100 applying an adaptive video decoding method and apparatus according to an embodiment of the present disclosure. In this embodiment, the terminal device 100 may be, but is not limited to, a smart phone (such as a smart phone with an android system), a tablet computer, and the like. Structurally, terminal device 100 may include a processor 110, a memory 120, and a display 130.
The processor 110, the memory 120, and the display 130 are electrically connected directly or indirectly to enable data transmission or interaction, for example, the components may be electrically connected to each other via one or more communication buses or signal lines. The adaptive video decoding apparatus 200 includes at least one software module that can be stored in the memory 120 in the form of software or Firmware (Firmware) or solidified in an Operating System (OS) of the terminal device 100. The processor 110 is used for executing executable modules stored in the memory 120, such as software functional modules and computer programs included in the adaptive video decoding apparatus 200, to realize the adaptive video decoding method. The processor 110 may execute the computer program upon receiving the execution instruction.
The processor 110 may be an integrated circuit chip having signal processing capabilities. The Processor 110 may also be a general-purpose Processor, for example, a Central Processing Unit (CPU), a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a discrete gate or transistor logic device, or a discrete hardware component, which may implement or execute the methods, steps, and logic blocks disclosed in the embodiments of the present Application. Further, a general purpose processor may be a microprocessor or any conventional processor or the like.
The Memory 120 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), and an electrically Erasable Programmable Read-Only Memory (EEPROM). The memory 120 is used for storing a program, and the processor 110 executes the program after receiving the execution instruction.
The Display 130 may be, but is not limited to, an OLED (organic light-emitting diode) Display, a TFT (thin film transistor) Display, and an LCD (Liquid Crystal Display) Display.
It should be noted that the structure shown in fig. 1 is merely an illustration, and the terminal device 100 provided in the embodiment of the present application may also have fewer or more components than those shown in fig. 1, or have a different configuration from that shown in fig. 1. Further, the components shown in fig. 1 may be implemented by software, hardware, or a combination thereof.
Referring to fig. 2, fig. 2 is a flowchart illustrating steps of an adaptive video decoding method according to an embodiment of the present application, where the method is applied to the terminal device 100 shown in fig. 1. It should be noted that, the adaptive video decoding method provided in the embodiment of the present application is not limited by the order shown in fig. 2 and the following, and the method includes: step S11-step S14.
Step S11: receiving a first video stream; wherein the first video stream is encoded using H265.
It is to be explained that a video stream refers to the transmission of video data, which can be processed as a stable and continuous stream over a network, for example. Because of the streaming, the client browser or plug-in is able to display the multimedia data before the entire file is transferred. H265 is a new video coding standard made following H264. The H265 standard surrounds the existing video coding standard H264, retaining the original techniques, while some related techniques are improved. The new technology uses advanced technology to improve the relationship between code stream, coding quality, time delay and algorithm complexity, so as to achieve the optimal setting. Such as improving compression efficiency, improving robustness and error resilience, reducing real-time delay, reducing channel acquisition time and random access delay, reducing complexity, etc. Therefore, more and more video streams are encoded using H265 encoding techniques.
Step S12: and judging whether the terminal equipment supports H265 hard decoding.
Since more and more video streams are encoded by using the H265 encoding technology, when the terminal device receives the first video stream encoded by using H265, compatibility detection is performed to detect whether H265 hard decoding is locally supported.
As an optional compatibility detection method, determining whether the terminal device supports H265 hard decoding includes: receiving a status code sent by an Application Programming Interface (API) Interface; and judging whether the terminal equipment supports H265 hard decoding or not based on the state code.
Taking the android system as an example, the AMediaCodec _ dequeuoutputBuffer interface is a standard API interface of the android system. After receiving the first video stream, the terminal device receives two types of status codes from the AMediaCodec _ dequeuoutputbuffer interface, wherein the value of the first type of status code is-10000, and the value of the second type of status code is 0 and-1. And the terminal device can only perform H265 hard decoding when receiving the second type status code, and cannot perform H265 hard decoding when receiving the status code with the value of-10000, so in the embodiment of the present application, the compatibility detection can be effectively realized through the value of the status code received by the terminal device.
Correspondingly, in other operating systems, compatibility detection may be performed according to the status code sent by the system API interface, but the values of the status codes received by different operating systems may differ.
As another optional compatibility detection manner, the determining whether the terminal device supports H265 hard decoding includes: decoding the first video stream using a hard decoding link; and judging whether the first video stream is displayed in the display interface.
That is, after receiving the first video stream, the decoding test may be directly performed on the first video stream through the hard decoding link of the playing software, and then it is determined whether the first video stream is displayed in the display interface. The display interface is an interface presented by a display of the terminal device. When the display interface displays the first video stream, the terminal equipment is characterized to support H265 hard decoding; when the display interface does not display the first video stream, the characterization terminal device does not support the H265 hard decoding.
In addition, the method is also applicable to the case when the terminal device supports H265 hard decoding, but H265 hard decoding is unstable. For example, when a hardware GPU (Graphics Processing Unit) that implements H265 hard decoding is abnormal, the GPU cannot normally perform H265 hard decoding. Therefore, through the compatibility detection method, when the terminal device supports H265 hard decoding but does not display the first video stream in the current display interface, it is determined that the current terminal device does not support H265 hard decoding, and the decoding link is switched through the subsequent steps. That is, the terminal device can be effectively detected through the steps, and then the corresponding decoding link can be reasonably selected.
Since the initial frame of the first video stream may be black, which may affect the determination result, a preset time may be set to determine whether the first video stream is displayed in the display interface. For example, the preset time may be 10 seconds or 20 seconds, and after the first video stream is received and the first video stream is decoded by using the hard decoding link, if the current display interface is still in the black screen state after 20 seconds, the representation terminal device does not support H265 hard decoding. The present application is not limited thereto.
After the terminal device passes the compatibility detection, if H265 hard decoding is not supported, step S13 is executed, and if H265 hard decoding is supported, step S14 is executed.
Step S13: the first video stream is H265 soft decoded.
And when the terminal equipment does not support H265 hard decoding, switching a decoding link and carrying out H265 soft decoding on the first video stream.
When the first compatibility detection method in the above embodiment is adopted, specific codes thereof are as follows:
the specific codes are as follows:
Figure BDA0002712653120000081
Figure BDA0002712653120000091
that is, the above code may be understood as that when the received status code is-10000, the notify function is used to perform the link switching, and further, the hard decoding link is switched to the soft decoding link.
It should be noted that the first video stream is subjected to H265 soft decoding, that is, decoding is implemented by a processor of the terminal device. Specifically, the process of H265 soft decoding includes: decoding the first video stream through a first thread to obtain YUV (Luminance-Bandwidth-Chrominance) data; format conversion is carried out on the YUV data to obtain first data with a format type of RGB 565; and calling an android native window _ update interface in a rendering thread to render the first data.
RGB565 is a color model, r (red) represents red, g (green) represents green, b (blue) represents blue, each pixel in RGB565 model is represented by 16 bits, one pixel occupies two bytes, and RGB components are 5 bits, 6 bits, and 5 bits respectively. The called android native window _ update interface is an existing interface of the terminal device, and the interface can only render data in an RGB565 format, so in the embodiment of the application, the first video stream is decoded into YUV data, format conversion is performed on the YUV data to obtain first data in the RGB565 format, and finally rendering of the data is realized through the android native window _ update interface, and H265 soft decoding of the first video stream is completed. By the method, H265 soft decoding of the first video stream is realized in the existing interface of the terminal equipment, and the utilization rate of the processor can be improved through different threads. Of course, in other embodiments, the same thread may be used to perform the above steps, and the present application is not limited thereto.
Wherein, the complete name of the android native WINDOW _ update interface is android native WINDOW _ update (pANwindow, mPixels, mWidth, mHeight, WINDOW _ FORMAT _ RGB _ 565). That is, the full FORMAT expression of the first data is WINDOW _ FORMAT _ RGB _ 565.
The above-mentioned decoding of the first video stream to obtain YUV data and the conversion of the YUV data into the first data in RGB565 format may all adopt ffmpeg (fast Forward mpeg) software technology. FFmpeg is a set of open source computer programs that can be used to record, convert digital audio, video, and convert them into streams. It contains the advanced audio/video codec library libavcodec.
Step S14: the first video is H265 hard decoded using an H265 hard decoding link.
When the terminal device supports H265 hard decoding, the first video stream is then H265 hard decoded directly using the hard decoding link. Continuing with the android system as an example, if the terminal device is compatible with H265 hard decoding, the terminal device uses a hard decoding link for decoding, such as using an android Native NDK (Native Development Kit, software Development Kit based on Native program interface) hard decoding display rendering interface ameediacodec _ releaseOutputBuffer (mediacod, status, bRender) to render and display the first video stream.
In summary, in the embodiment of the present application, after receiving the first video stream encoded by using H265, the terminal device determines whether to support H265 hard decoding; when the H265 hard decoding is not supported, the decoding link is switched to carry out H265 soft decoding on the first video stream. By the method, the terminal equipment can adaptively decode the first video stream coded by the H265, so that the first video stream can be softly decoded by switching the decoding link of the terminal equipment when the terminal equipment does not support the H265 hard decoding, the problem that the user using requirement is influenced due to the fact that part of the terminal equipment cannot normally display video pictures because the terminal equipment does not support the H265 hard decoding is solved, and the user experience is improved.
As an application scene, the terminal device is in communication connection with the streaming media device. That is, the first video stream received by the terminal device is the first video stream delivered by the streaming media device in real time. For easy understanding, please refer to fig. 3, where fig. 3 is an interaction diagram of a terminal device and a streaming media device according to an embodiment of the present application. Specifically, the method comprises the following steps: step S21-step S24.
Step S21: the streaming media equipment sends a first video stream to the terminal equipment; wherein the first video stream is encoded using H265.
It should be noted that the streaming media device may refer to a streaming media server, and may also refer to a device capable of directly generating a video stream, such as an unmanned aerial vehicle, a monitoring device, and the like. When the streaming media device is a drone, reference may be made to the scene diagram shown in fig. 4. Unmanned aerial vehicle is at the flight in-process, can be real-timely carry out video acquisition to with video stream transmission to terminal equipment. At present, most unmanned aerial vehicles also adopt H265 coding when transmitting video streams, so that terminal equipment can receive the first video stream which is transmitted by the unmanned aerial vehicle and adopts H265 coding, then decoding is carried out through subsequent steps, and pictures shot by the unmanned aerial vehicle are displayed in real time. When the streaming media device is a streaming media server, the terminal device may receive the first video stream through the playing software, and then perform decoding through subsequent steps to display the first video stream.
Step S22: the terminal device determines whether H265 hard decoding is supported.
Step S23 is performed when the terminal device does not support H265 hard decoding, and step S24 is performed when the terminal device supports H265 hard decoding.
Step S23: the first video stream is H265 soft decoded.
Step S24: the first video is H265 hard decoded using a hard decoding link.
It should be noted that steps S22 to S24 have been described in detail in steps S12 to S14 in the above embodiments, and for avoiding redundancy, the same parts may be referred to each other without redundancy.
Optionally, when the terminal device does not support H265 hard decoding, the method further includes step S25, that is, the terminal device sends an adaptation instruction to the streaming media device to enable the streaming media device to reduce the resolution of the transmitted second video stream.
It should be noted that, because the H265 soft decoding may bring extra data processing pressure to the processor, in this embodiment of the application, when the H265 soft decoding is adopted, an adaptation instruction is sent to a streaming media device communicatively connected thereto, so that the streaming media device reduces the resolution of the transmitted second video stream, for example, the second video stream with the resolution of 1080P is changed into the second video stream with the resolution of 720P for transmission, and by this way, the data processing pressure of the processor and the occupied amount of the processor during subsequent decoding are reduced, and the flow of the H265 soft decoding process is improved.
Optionally, when the H265 soft decoding is performed on the first video stream in step S23, the method further includes: acquiring the occupancy rate of the processor, judging whether the occupancy rate of the processor is greater than a preset threshold value, if so, sending a change instruction to the streaming media equipment so that the streaming media equipment changes the video coding mode, and coding by adopting H264.
The preset threshold may be set to 80%, 90%, etc., and the present application is not limited thereto. The method is mainly applied to scenes that the streaming media equipment is an unmanned aerial vehicle and monitoring equipment. That is, when the processor is overloaded when the H265 soft decoding is adopted, a change instruction for changing the video coding mode may be sent to the drone or the monitoring device, so that the drone or the monitoring device performs coding by using H264. And after receiving the video stream coded by the unmanned aerial vehicle or the monitoring equipment by adopting the H264, the subsequent terminal equipment can directly adopt H264 hard decoding.
Accordingly, when the terminal device receives the video stream transmitted by the streaming media device, the method may further include identifying an encoding format of the video stream. That is, after receiving the video stream transmitted by the streaming media device, the terminal device first determines the encoding format of the video stream transmitted by the streaming media device. And then different subsequent decoding is performed according to different encoding formats. For example, after the terminal device recognizes that the encoding format of the video stream transmitted by the streaming media device is H264, it directly adopts the H264 hard decoding link to decode. If the terminal device identifies that the encoding format of the video stream transmitted by the streaming media device is H265, it determines whether H265 hard decoding is supported, and then selects to use an H265 hard decoding link or an H265 soft decoding link for decoding.
Referring to fig. 5, based on the same inventive concept, an embodiment of the present application further provides an adaptive video decoding apparatus 200, which is applied to a terminal device 100, and the apparatus includes: a receiving module 201, a judging module 202 and a soft decoding module 203.
A receiving module 201, configured to receive a first video stream; wherein the first video stream is encoded using H265.
A determining module 202, configured to determine whether the terminal device supports H265 hard decoding.
A soft decoding module 203, configured to perform H265 soft decoding on the first video stream when the terminal device does not support the H265 hard decoding.
Optionally, the determining module 202 is specifically configured to receive a status code sent by a system API interface; and judging whether the terminal equipment supports the H265 hard decoding or not based on the state code.
Optionally, the determining module 202 is specifically configured to decode the first video stream by using a hard decoding link; judging whether the first video stream is displayed in a display interface; when the display interface displays the first video stream, the terminal device is characterized to support the H265 hard decoding; when the display interface does not display the first video stream, the terminal equipment is characterized not to support the H265 hard decoding.
Optionally, the soft decoding module 203 is specifically configured to decode the first video stream through a first thread to obtain YUV data; performing format conversion on the YUV data to obtain first data with a format type of RGB 565; and calling an android native window _ update interface in a rendering thread to render the first data.
Optionally, the receiving module 201 is further configured to receive the first video stream transmitted by the streaming media device in real time.
Optionally, the adaptive video decoding apparatus 200 further includes a sending module 204. The sending module 204 is configured to send an adaptation instruction to the streaming media device when the terminal device does not support the H265 hard decoding, so that the streaming media device reduces the resolution of the transmitted second video stream.
It should be noted that, as those skilled in the art can clearly understand, 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.
Based on the same inventive concept, the present application further provides a storage medium, on which a computer program is stored, and when the computer program is executed, the computer program performs the method provided in the foregoing embodiments.
The storage medium may be any available medium that can be accessed by a computer or a data storage device including one or more integrated servers, data centers, and the like. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and 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 of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
In addition, 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.
Furthermore, the functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
In this document, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (10)

1. An adaptive video decoding method, applied to a terminal device, the method comprising:
receiving a first video stream; wherein the first video stream is encoded using H265;
judging whether the terminal equipment supports H265 hard decoding;
and when the terminal equipment does not support the H265 hard decoding, carrying out H265 soft decoding on the first video stream.
2. The adaptive video decoding method according to claim 1, wherein the determining whether the terminal device supports H265 hard decoding comprises:
receiving a state code sent by a system API;
and judging whether the terminal equipment supports the H265 hard decoding or not based on the state code.
3. The adaptive video decoding method according to claim 1, wherein the determining whether the terminal device supports H265 hard decoding comprises:
decoding the first video stream using a hard decoding link;
judging whether the first video stream is displayed in a display interface; when the display interface displays the first video stream, the terminal device is characterized to support the H265 hard decoding; when the display interface does not display the first video stream, the terminal equipment is characterized not to support the H265 hard decoding.
4. The adaptive video decoding method according to claim 1, wherein said H265 soft decoding the first video stream comprises:
decoding the first video stream through a first thread to obtain YUV data; performing format conversion on the YUV data to obtain first data with a format type of RGB 565;
and calling an android native window _ update interface in a rendering thread to render the first data.
5. The adaptive video decoding method according to claim 1, wherein the terminal device is communicatively connected to a streaming media device;
the receiving a first video stream, comprising:
and receiving the first video stream transmitted by the streaming media equipment in real time.
6. The adaptive video decoding method according to claim 5, wherein when the terminal device does not support the H265 hard decoding, the method further comprises:
and sending an adaptation instruction to the streaming media device to enable the streaming media device to reduce the resolution of the transmitted second video stream.
7. An adaptive video decoding apparatus, applied to a terminal device, the apparatus comprising:
a receiving module, configured to receive a first video stream; wherein the first video stream is encoded using H265;
the judging module is used for judging whether the terminal equipment supports H265 hard decoding;
a soft decoding module, configured to perform H265 soft decoding on the first video stream when the terminal device does not support the H265 hard decoding.
8. A terminal device, comprising: a processor and a memory, the processor and the memory connected;
the processor is used for storing programs;
the processor is configured to execute a program stored in the memory to perform the method of any of claims 1-6.
9. The terminal device of claim 8, wherein the processor is communicatively coupled to a streaming media device, and wherein the processor is configured to receive the first video stream transmitted by the streaming media device.
10. A storage medium, having stored thereon a computer program which, when executed by a computer, performs the method of any one of claims 1-6.
CN202011069169.4A 2020-09-30 2020-09-30 Adaptive video decoding method and device, terminal equipment and storage medium Pending CN112203097A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011069169.4A CN112203097A (en) 2020-09-30 2020-09-30 Adaptive video decoding method and device, terminal equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011069169.4A CN112203097A (en) 2020-09-30 2020-09-30 Adaptive video decoding method and device, terminal equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112203097A true CN112203097A (en) 2021-01-08

Family

ID=74014160

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011069169.4A Pending CN112203097A (en) 2020-09-30 2020-09-30 Adaptive video decoding method and device, terminal equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112203097A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112788430A (en) * 2021-01-19 2021-05-11 深圳乐播科技有限公司 Detection method and device for screen projection black screen and computer readable storage medium
CN114401445A (en) * 2021-12-31 2022-04-26 深圳云天励飞技术股份有限公司 Video processing control method and device, monitoring equipment, client and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104980788A (en) * 2015-02-11 2015-10-14 腾讯科技(深圳)有限公司 Video decoding method and device
CN106131319A (en) * 2016-06-29 2016-11-16 努比亚技术有限公司 A kind of information processing method and device, terminal
US20170026648A1 (en) * 2015-07-24 2017-01-26 Mediatek Inc. Hybrid video decoder and associated hybrid video decoding method
CN106713937A (en) * 2016-12-30 2017-05-24 广州虎牙信息科技有限公司 Video playing control method and device as well as terminal equipment
CN108040258A (en) * 2017-11-21 2018-05-15 北京臻迪科技股份有限公司 A kind of coding, coding/decoding method, apparatus and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104980788A (en) * 2015-02-11 2015-10-14 腾讯科技(深圳)有限公司 Video decoding method and device
US20170026648A1 (en) * 2015-07-24 2017-01-26 Mediatek Inc. Hybrid video decoder and associated hybrid video decoding method
CN106131319A (en) * 2016-06-29 2016-11-16 努比亚技术有限公司 A kind of information processing method and device, terminal
CN106713937A (en) * 2016-12-30 2017-05-24 广州虎牙信息科技有限公司 Video playing control method and device as well as terminal equipment
CN108040258A (en) * 2017-11-21 2018-05-15 北京臻迪科技股份有限公司 A kind of coding, coding/decoding method, apparatus and system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112788430A (en) * 2021-01-19 2021-05-11 深圳乐播科技有限公司 Detection method and device for screen projection black screen and computer readable storage medium
CN114401445A (en) * 2021-12-31 2022-04-26 深圳云天励飞技术股份有限公司 Video processing control method and device, monitoring equipment, client and storage medium
CN114401445B (en) * 2021-12-31 2024-03-22 深圳云天励飞技术股份有限公司 Video processing control method, device, monitoring equipment, client and storage medium

Similar Documents

Publication Publication Date Title
US10728594B2 (en) Method and apparatus for transmitting data of mobile terminal
WO2017219896A1 (en) Method and device for transmitting video stream
US11930197B2 (en) Video decoding method and apparatus, computer device, and storage medium
US12108065B2 (en) Encoding method and apparatus for screen sharing, storage medium, and electronic device
US9699099B2 (en) Method of transmitting data in a communication system
CN103841389B (en) A kind of video broadcasting method and player
US20110109792A1 (en) Adaptive Display Compression for Wireless Transmission of Rendered Pixel Data
US20210281911A1 (en) Video enhancement control method, device, electronic device, and storage medium
CN112203097A (en) Adaptive video decoding method and device, terminal equipment and storage medium
US11949853B2 (en) Data decoding method and apparatus, and data coding method and apparatus
US20220148141A1 (en) Image Processing Method and Apparatus and Terminal Device
WO2021057697A1 (en) Video encoding and decoding methods and apparatuses, storage medium, and electronic device
CN111641804A (en) Video data processing method and device, terminal, camera and video conference system
CN113709447B (en) Method and device for detecting playing performance of terminal equipment
CN111510706B (en) Hardware encoding and decoding support degree detection method, terminal and storage medium
CN109587555B (en) Video processing method and device, electronic equipment and storage medium
CN114466246A (en) Video processing method and device
US20230388526A1 (en) Image processing method and apparatus, computer device, storage medium and program product
CN109379630B (en) Video processing method and device, electronic equipment and storage medium
CN115665485A (en) Video picture optimization method and device, storage medium and video terminal
US12034944B2 (en) Video encoding method and apparatus, video decoding method and apparatus, electronic device and readable storage medium
CN115190359A (en) Automatic conversion method and system for video playing format
TWI700918B (en) Coding of video and audio with initialization fragments
CN113825016A (en) Video rendering method, device, equipment, storage medium and computer program product
CN103607552A (en) Network video recorder (NVR) video hard decoding chip system resource allocation method

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
AD01 Patent right deemed abandoned
AD01 Patent right deemed abandoned

Effective date of abandoning: 20230728