CN110740313B - Hardware coding capability detection method and device - Google Patents

Hardware coding capability detection method and device Download PDF

Info

Publication number
CN110740313B
CN110740313B CN201911025139.0A CN201911025139A CN110740313B CN 110740313 B CN110740313 B CN 110740313B CN 201911025139 A CN201911025139 A CN 201911025139A CN 110740313 B CN110740313 B CN 110740313B
Authority
CN
China
Prior art keywords
code stream
hardware
coding
server
encoding
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911025139.0A
Other languages
Chinese (zh)
Other versions
CN110740313A (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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201911025139.0A priority Critical patent/CN110740313B/en
Publication of CN110740313A publication Critical patent/CN110740313A/en
Application granted granted Critical
Publication of CN110740313B publication Critical patent/CN110740313B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N17/00Diagnosis, testing or measuring for television systems or their details
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • H04N21/4402Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/442Monitoring of processes or resources, e.g. detecting the failure of a recording device, monitoring the downstream bandwidth, the number of times a movie has been viewed, the storage space available from the internal hard disk
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/478Supplemental services, e.g. displaying phone caller identification, shopping application
    • H04N21/4788Supplemental services, e.g. displaying phone caller identification, shopping application communicating with other users, e.g. chatting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/14Systems for two-way working
    • H04N7/141Systems for two-way working between two video terminals, e.g. videophone

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Databases & Information Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • General Health & Medical Sciences (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The invention provides a hardware coding capability detection method, a hardware coding capability detection device, electronic equipment and a storage medium; the method comprises the following steps: receiving a reference code stream which is issued by a server and accords with a video standard to be tested; carrying out software decoding on the received reference code stream, and encoding a decoded image obtained by the software decoding through a hardware encoder; and reporting the coded code stream coded by the hardware coder to a server so that the server performs code control detection and similarity detection on the coded code stream, and determining the hardware coding capacity of the equipment type of the equipment running the playing client side aiming at the video standard to be tested according to the corresponding detection result. According to the invention, the hardware coding capability of the equipment can be determined.

Description

Hardware coding capability detection method and device
Technical Field
The present invention relates to multimedia technologies, and in particular, to a method and an apparatus for detecting hardware encoding capability, an electronic device, and a storage medium.
Background
In recent years, with the development of internet technology and mobile terminal technology, users can watch videos or make video calls on mobile terminals at any time.
Aiming at the fragmentation of systems provided by various manufacturers at present, before formally using a hardware encoder of equipment to encode collected video data, the hardware encoding compatibility of the equipment needs to be verified, whether the volatility of hard encoding time control meets requirements, whether a hard encoding code stream meets corresponding standards, whether the hard encoding code stream possibly generates screen splash, screen greenness, decoding failure and the like when the hard encoding code stream is decoded.
However, the related art lacks an effective scheme for detecting the hardware encoding capability possessed by the device.
Disclosure of Invention
The embodiment of the invention provides a method and a device for detecting hardware coding capacity, electronic equipment and a storage medium, which can determine the hardware coding capacity of the equipment.
The technical scheme of the embodiment of the invention is realized as follows:
the embodiment of the invention provides a hardware coding capacity detection method, which comprises the following steps:
receiving a reference code stream which is issued by a server and meets the standard of the video to be tested through a playing client;
carrying out software decoding on the received reference code stream, and encoding a decoded image obtained by the software decoding through a hardware encoder;
reporting the code stream coded by the hardware coder to a server so as to ensure that
And the server performs code control detection and similarity detection on the coded code stream, and determines the hardware coding capacity of the equipment type of the equipment operating the playing client side aiming at the video standard to be tested according to the corresponding detection result.
The embodiment of the invention provides another hardware coding capability detection method, which comprises the following steps:
sending a reference code stream meeting a to-be-tested video standard to a playing client;
receiving a coding code stream obtained by coding through a hardware coder and reported by the playing client;
and carrying out code control detection and similarity detection on the received coding code stream, and determining the hardware coding capacity of the equipment type of the equipment operating the playing client side aiming at the video standard to be tested according to the corresponding detection result.
The embodiment of the invention provides a hardware coding capability detection device, which comprises:
the receiving module is used for receiving a reference code stream which is issued by the server and accords with the video standard to be tested through the playing client;
the decoding module is used for carrying out software decoding on the reference code stream received by the receiving module;
the coding module is used for coding a decoded image obtained by the decoding module through software decoding through a hardware coder;
a reporting module for reporting the code stream obtained by the coding module to a server so as to ensure that the code stream is encoded by the coding module
And the server performs code control detection and similarity detection on the coded code stream, and determines the hardware coding capacity of the equipment type of the equipment operating the playing client aiming at the video standard to be tested according to the corresponding detection result.
In the foregoing solution, the reporting module is further configured to report, to a server, an encoded code stream composed of an encoding result corresponding to each frame in the reference code stream, so that the server executes the following operations: and when detecting that the code rate fluctuation of the coding code stream is smaller than a fluctuation threshold value and the similarity between the decoding image of the coding code stream and the decoding image of the reference code stream is larger than a similarity threshold value, determining that the equipment type to which the equipment operating the playing client belongs has the hardware coding capability compatible with the video standard to be tested.
In the above scheme, the reporting module is further configured to report, to the server, a coded code stream composed of coding results corresponding to each frame in the reference code stream, and an average number of frames of the to-be-coded image frames accumulated in the hardware encoder buffer area during the coding process; to cause the server to perform the following operations:
and when determining that the similarity between the decoded image of the coding code stream and the decoded image of the reference code stream is greater than a similarity threshold, the code rate fluctuation of the coding code stream is less than a fluctuation threshold, and the average frame number is less than a frame number threshold, determining that the type of the equipment to which the equipment operating the playing client belongs has the hardware coding capability compatible with the video standard to be tested.
In the foregoing scheme, the reporting module is further configured to report the encoded code stream to a server, so that the server performs the following operations:
when abnormal information is generated in the process of decoding the coded code stream, recording coding error information in a report;
when the frame number of the coding code stream is determined to be smaller than the frame number of the reference code stream, recording coding error information in the report;
the coding error information is used for indicating that the type of the equipment which runs the playing client does not have the hardware coding capability compatible with the video standard to be tested.
In the foregoing solution, the reporting module is further configured to report, when the playing client generates abnormal information in a process of encoding a decoded image of the reference code stream, the abnormal information to the server, so that the server reports the abnormal information to the playing client, so that the playing client can encode the decoded image of the reference code stream
And the server determines that the type of the equipment which runs the playing client does not have the hardware coding capability compatible with the video standard to be tested.
In the above scheme, the reporting module is further configured to report, to a server, an encoded code stream generated by a playing client in multiple devices of the same type for the reference code stream and an average stocked frame number in an encoding process, so that the server performs the following operations:
and when the number of the devices with the hardware coding capability compatible with the video standard to be tested is determined to be larger than a preset threshold value, determining that the devices of the same type have the hardware coding capability compatible with the video standard to be tested.
The embodiment of the present invention provides another apparatus for detecting hardware encoding capability, including:
the sending module is used for sending the reference code stream meeting the video standard to be tested to the playing client;
the receiving module is used for receiving a coding code stream which is obtained by coding through a hardware coder and reported by the playing client;
and the detection module is used for carrying out code control detection and similarity detection on the coded code stream received by the receiving module, and determining the hardware coding capacity of the equipment type to which the equipment operating the playing client belongs, aiming at the video standard to be tested, according to the corresponding detection result.
In the above scheme, the detection module is further configured to determine that a device type to which a device operating the playing client belongs has a hardware encoding capability compatible with the video standard to be tested when it is detected that the similarity between the decoded image of the encoded code stream and the decoded image of the reference code stream is greater than a similarity threshold and the code rate volatility of the encoded code stream is less than a volatility threshold.
In the above scheme, the receiving module is further configured to receive an average frame number of images to be encoded that are accumulated in a hardware encoder cache area in an encoding process and reported by the playing client, so that the detecting module determines that a device type to which a device operating the playing client belongs has a hardware encoding capability compatible with the video standard to be encoded when detecting that the average frame number is less than a frame number threshold, a similarity between a decoded image of the encoded code stream and a decoded image of the reference code stream is greater than a similarity threshold, and a code stream volatility of the encoded code stream is less than a volatility threshold.
In the above solution, the detecting module is further configured to, when detecting that abnormal information is generated in the process of decoding the encoded code stream, or,
and when the frame number of the coding code stream is smaller than that of the reference code stream, determining that the equipment type of the equipment running the playing client side does not have the hardware coding capability compatible with the video standard to be tested.
In the above scheme, the detection module is further configured to determine that a device type to which a device running the playing client belongs does not have a hardware encoding capability compatible with the video standard to be tested when detecting abnormal information reported by the playing client in a process of encoding a decoded image of the received reference code stream.
An embodiment of the present invention provides an electronic device, including:
a memory for storing executable instructions;
and the processor is used for realizing any hardware coding capability detection method provided by the embodiment of the invention when the processor executes the executable instructions stored in the memory.
The embodiment of the invention provides a storage medium, which stores executable instructions and is used for causing a processor to execute the executable instructions so as to realize any hardware coding capability detection method provided by the embodiment of the invention.
The embodiment of the invention has the following beneficial effects:
the server sends a reference code stream meeting the video standard to be tested to a playing client of a user, the playing client performs soft decoding and hard coding, and the coding code stream is reported to the server for further detection. After receiving the coded code stream reported by the playing client, the server performs code control detection and similarity detection on the coded code stream, and further determines the hardware coding capability of the equipment type to which the equipment operating the playing client belongs, aiming at the video standard to be tested, according to the corresponding detection result.
Drawings
FIG. 1 is an alternative architecture diagram of a hardware coding capability detection system according to an embodiment of the present invention;
fig. 2A is an alternative structural schematic diagram of a hardware coding capability detection device according to an embodiment of the present invention;
fig. 2B is an alternative structural schematic diagram of a hardware coding capability detection device according to an embodiment of the present invention;
FIG. 3 is a schematic flow chart of an alternative method for detecting hardware encoding capability according to an embodiment of the present invention;
FIG. 4 is a schematic flow chart of an alternative method for detecting hardware encoding capability according to an embodiment of the present invention;
FIG. 5 is a schematic flow chart of an alternative method for detecting hardware encoding capability according to an embodiment of the present invention;
FIG. 6 is a schematic flow chart of an alternative method for detecting hardware encoding capability according to an embodiment of the present invention;
fig. 7 is an alternative flowchart of the hardware coding capability detection method according to the embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail with reference to the accompanying drawings, the described embodiments should not be construed as limiting the present invention, and all other embodiments obtained by a person of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
In the following description, reference is made to "some embodiments" which describe a subset of all possible embodiments, but it is understood that "some embodiments" may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. The terminology used herein is for the purpose of describing embodiments of the invention only and is not intended to be limiting of the invention.
The inventor finds that, in the process of implementing the embodiment of the invention, when the hardware coding capability is detected in the related art, the hardware coding capability of the device is obtained by looking up the parameter description of a manufacturer, and then, whether the compatibility problem of the hardware coding capability exists in a certain model is verified in a mode of continuous gray scale. However, when determining whether the hardware coding capability of a certain model has a compatibility problem by continuous gray scale, the product application on the model with incompatible hardware coding capability is inevitably influenced. If the user model is not determined to have stable hard-coding capability, the hard-coding function is enabled for the user model, so that the application flash back of the model which does not support hard-coding in the application using process can be caused, and decoding problems such as screen splash, screen greenness and the like can also occur on the hard-coded code stream on other models.
In addition, the related technology also provides a method for detecting the hardware coding capacity of the user machine type through a cloud real machine platform. After the hard-programming capability detection is verified through the cloud real machine platform, the user machine type with compatibility problems found in the cloud real machine verification process cannot be influenced. However, the cloud-real machine platform also has limitations, the number of most machine types is small, even some machine types are not available, and in addition, whether the machine type has stable hard-programming compatibility or not cannot be judged only by performing verification on a few mobile phones.
For this, a reference code stream is issued to a playing client of a user, and the collected code stream is detected to determine the hardware coding capacity of the equipment of different equipment types by collecting a code stream generated by coding a decoded image decoded aiming at the reference code stream reported by the playing client, so that the reference code stream which is issued by a server and meets the standard of the video to be tested can be received by the playing client; traversing and reading each frame in the received reference code stream, performing software decoding on each read frame, and encoding a decoded image obtained through the software decoding through a hardware encoder; when the coding of the decoded image of any frame in the reference code stream is finished, storing a coding result corresponding to any frame and the number of frames of the image to be coded currently stocked in a cache region of a hardware coder; when the decoded image of each frame in the reference code stream is completely encoded, reporting an encoded code stream consisting of the encoding result corresponding to each frame in the reference code stream and an average frame number of the image frames to be encoded accumulated in the hardware encoder cache region in the encoding process to the server, so that the server determines the hardware encoding capacity of the equipment type of the equipment operating the playing client side for the video standard to be tested according to the encoded code stream and the average frame number.
In view of this, embodiments of the present invention provide a method and an apparatus for detecting a hardware encoding capability, an electronic device, and a storage medium, which are capable of determining the hardware encoding capability of a device.
The following describes an exemplary application of the hardware coding capability detection device provided in the embodiment of the present invention, and the hardware coding capability detection device provided in the embodiment of the present invention may be implemented as various types of user terminals such as a notebook computer, a tablet computer, a desktop computer, a set-top box, a mobile device (e.g., a mobile phone, a portable music player, a personal digital assistant, a dedicated messaging device, and a portable game device), and may also be implemented as a server or a server cluster, and may also be implemented in a manner that the user terminal and the server cooperate with each other.
Referring to fig. 1, fig. 1 is an alternative architecture diagram of a hardware coding capability detection system 100 provided in an embodiment of the present invention, in which a user terminal 400 (illustratively, a terminal 400-1 and a terminal 400-2) is connected to a server 200 through a network 300, and the network 300 may be a wide area network or a local area network, or a combination of both.
As shown in fig. 1, the hardware encoding capability detection system 100 includes a server 200, a network 300, and a user terminal 400. The server 200 sends a reference code stream conforming to the video standard to be tested to the playing client 410 of the user terminal 400 through the network 300. After confirming that the reference code stream issued by the server 200 is received, the playing client 410 invokes a central processing unit in the user terminal 400 to perform software decoding on the read reference code stream by running decoding software. Then, the decoded image obtained by software decoding is sent to a hardware encoder of the user terminal 400 for hardware encoding, the hard coded stream obtained by encoding is reported to the server 200 for further detection, and meanwhile, the average frame number of the image to be encoded accumulated in a cache region of the hardware encoder in the encoding process is reported. After receiving the hard coded stream reported by the playing client 410, the server 200 decodes the received hard coded stream, determines the similarity between the decoded image of the reference code stream and the decoded image of the hard coded stream, and evaluates the code control fluctuation of the hard coded stream in the encoding process, and further, the server 200 determines the hardware encoding capability of the device type to which the device running the playing client 410 belongs, for the video standard to be tested, according to the similarity, the code control fluctuation and the reported average stocked frame number.
Referring to fig. 2A, fig. 2A is a schematic structural diagram of a server 200 according to an embodiment of the present invention, and taking the example that the hardware encoding capability detection device is the server 200, the server 200 shown in fig. 2A includes: at least one processor 210, memory 250, at least one network interface 220, and a user interface 230. The various components in server 200 are coupled together by a bus system 240. It is understood that the bus system 240 is used to enable communications among the components. The bus system 240 includes a power bus, a control bus, and a status signal bus in addition to a data bus. For clarity of illustration, however, the various buses are labeled as bus system 240 in fig. 2A.
The Processor 210 may be an integrated circuit chip having Signal processing capabilities, such as a general purpose Processor, a Digital Signal Processor (DSP), or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like, wherein the general purpose Processor may be a microprocessor or any conventional Processor, or the like.
The user interface 230 includes one or more output devices 231, including one or more speakers and/or one or more visual display screens, that enable the presentation of media content. The user interface 230 also includes one or more input devices 232, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.
The memory 250 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid state memory, hard disk drives, optical disk drives, and the like. Memory 250 optionally includes one or more storage devices physically located remotely from processor 210.
The memory 250 includes volatile memory or nonvolatile memory, and may include both volatile and nonvolatile memory. The nonvolatile memory may be a Read Only Memory (ROM), and the volatile memory may be a Random Access Memory (RAM). The memory 250 described in embodiments of the invention is intended to comprise any suitable type of memory.
In some embodiments, memory 250 is capable of storing data, examples of which include programs, modules, and data structures, or a subset or superset thereof, to support various operations, as exemplified below.
An operating system 251 including system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks;
a network communication module 252 for communicating to other computing devices via one or more (wired or wireless) network interfaces 220, exemplary network interfaces 220 including: bluetooth, wireless compatibility authentication (WiFi), and Universal Serial Bus (USB), etc.;
a presentation module 253 to enable presentation of information (e.g., a user interface for operating peripherals and displaying content and information) via one or more output devices 231 (e.g., a display screen, speakers, etc.) associated with the user interface 230;
an input processing module 254 for detecting one or more user inputs or interactions from one of the one or more input devices 232 and translating the detected inputs or interactions.
In some embodiments, the hardware encoding capability detection apparatus provided by the embodiments of the present invention may be implemented in a software manner, and fig. 2A illustrates the hardware encoding capability detection apparatus 255 stored in the memory 250, which may be software in the form of programs and plug-ins, and includes the following software modules: a sending module 2551, a receiving module 2552 and a detecting module 2553, which are logical and therefore can be arbitrarily combined or further split according to the implemented functions. The functions of the respective modules will be explained below.
In other embodiments, the hardware coding capability detection apparatus provided in the embodiments of the present invention may be implemented in hardware, and for example, the hardware coding capability detection apparatus provided in the embodiments of the present invention may be a processor in the form of a hardware decoding processor, which is programmed to execute the hardware coding capability detection method provided in the embodiments of the present invention, for example, the processor in the form of the hardware decoding processor may employ one or more Application Specific Integrated Circuits (ASICs), DSPs, Programmable Logic Devices (PLDs), Complex Programmable Logic devices (cpds), Field Programmable Gate Arrays (FPGAs), or other electronic components.
Referring to fig. 2B, fig. 2B is a schematic structural diagram of a user terminal 400 according to an embodiment of the present invention, and taking a hardware coding capability detection device as the user terminal 400 as an example, the user terminal 400 shown in fig. 2B includes: at least one processor 410, memory 450, at least one network interface 420, and a user interface 430.
In some embodiments, the hardware coding capability detection apparatus provided by the embodiments of the present invention may be implemented in software, and fig. 2B illustrates the hardware coding capability detection apparatus 455 stored in the memory 450, which may be software in the form of programs and plug-ins, and includes the following software modules: a receiving module 4551, a decoding module 4552, an encoding module 4553 and a reporting module 4554, which are logical and thus may be arbitrarily combined or further split depending on the functions implemented. Of course, the decoding capability detection apparatus 455 provided in the embodiment of the present invention may also be implemented in a hardware manner, and details of the embodiment of the present invention are not described herein again.
An exemplary application of the hardware coding capability detection device provided in the embodiment of the present invention will be described below with reference to the accompanying drawings, which illustrate the hardware coding capability detection method provided in the embodiment of the present invention.
It should be noted that whether the device has the hardware coding capability compatible with the video standard to be tested or not may be detected only for the encoded code stream, for example, whether the code control and the similarity of the encoded code stream are within a certain range or not may be detected; the average number of frames of the images to be coded in the buffer of the hardware coder accumulated in the coding process can also be combined to perform detection more comprehensively. The following describes a method for detecting hardware coding capability according to an embodiment of the present invention, by taking an example of detecting a coded code stream and an average accumulated frame number in a coding process at the same time.
Referring to fig. 3, fig. 3 is an alternative flowchart of a hardware coding capability detection method according to an embodiment of the present invention, which can be applied to the hardware coding capability detection system 100 shown in fig. 1 to determine the hardware coding capability of a device. The following is a detailed description of the hardware coding capability detection method provided by the embodiment of the present invention from the user terminal 400 side, and as shown in fig. 3, the hardware coding capability detection method provided by the embodiment of the present invention includes the following steps:
in step S301, the server issues a reference code stream meeting the standard of the video to be tested to the playing client of the user terminal.
Here, the reference code stream includes a standard reference test code stream compliant with H264 or H265.
In some embodiments, the server may issue the standard reference test code stream conforming to H264 to different types of devices, and determine the hardware encoding capability of the different types of devices for the H264 standard by analyzing the encoded code stream generated by encoding the decoded image of the standard reference test code stream conforming to H264 by the different types of devices.
In other embodiments, the server may also issue a reference test code stream conforming to the H264 standard to a plurality of devices of the same type, and determine the hardware encoding capability of the device type for the H264 standard by collecting an encoded code stream generated by encoding a decoded image of the reference code stream conforming to the H264 standard by the plurality of devices of the same type, and analyzing the collected encoded code stream.
In step S302, after the playing client confirms that the reference code stream issued by the server is received, the playing client reads each frame in the received reference code stream in a traversing manner, and performs software decoding on each read frame.
After receiving the reference code stream issued by the server, the playing client reads each frame in the received reference code stream in a traversing manner, and invokes a central processing unit in the user terminal to perform software decoding on each read frame in a manner of running decoding software.
In step S303, it is determined whether the encoding is normal, and if abnormal information is generated during the encoding process, step S304 is performed; if the encoding is completed, step S305 is performed.
Here, the playing client sends the decoded image obtained by decoding the reference code stream by the software into a hardware encoder of the user terminal for encoding, if the hardware encoder throws out abnormal information in the encoding process, indicating that the encoding is failed, executing step S304; if the hardware encoder does not return a failure indicating that the encoding is complete, step S305 is performed.
In step S304, the playing client reports the abnormal encoding information to the server.
Here, the hardware encoder of the user terminal throws an exception when encoding the decoded image of the reference code stream, indicating that the hardware encoder of the user terminal does not have a hardware encoding capability for the video standard to be tested. When receiving the coding abnormal information reported by the playing client, the server can directly log the user terminal into a list without hardware coding capability, and simultaneously inform the playing client to stop coding the residual image frames so as to reduce the consumption of system resources.
For example, assuming that the reference code stream is 50 frames, the decoded images of the first 19 frames can all be normally encoded, and the hardware encoder throws out the abnormal information when encoding the decoded image of the 20 th frame, the server, when receiving the encoded abnormal information reported by the playing client, logs the encoded abnormal information into a list without hardware encoding capability, and notifies the user terminal to stop the software decoding and subsequent encoding processes of the remaining 30 frames of reference code streams.
In step S305, the playing client saves the encoding result of the current frame decoded image in the reference code stream and the number of frames of the image to be encoded currently stocked in the hardware encoder buffer of the playing client.
Here, each frame of decoded image after decoding the reference code stream is sent to a hardware encoder of the user terminal for encoding, and when encoding is completed, the encoding result of the current frame of decoded image and the number of frames of the image to be encoded currently accumulated in the buffer of the hardware encoder are saved.
For example, assuming that the reference code stream is 50 frames, and the currently decoded frame is the 19 th frame in the reference code stream, the decoded image of the 19 th frame after decoding is sent to a hardware encoder for encoding, and when encoding is completed, the encoding result of the 19 th frame of decoded image is saved, and the number of frames of the image to be encoded, which is accumulated in a cache region of the hardware encoder when the 19 th frame is encoded, is saved.
In step S306, the playing client reports the encoded code stream and the average storage frame number to the server.
When the decoded image of each frame in the reference code stream sent by the server is completely encoded, reporting an encoded code stream composed of the encoding result corresponding to each frame in the reference code stream and the average frame number of the frame numbers of the image to be encoded accumulated in the hardware encoder cache region in the encoding process to the server.
In an example, assuming that the reference code stream is 50 frames, when each frame of decoded image in 50 frames of decoded images obtained after decoding the reference code stream is completely encoded, the playing client a reports to the server an encoded code stream generated by hardware encoding of the 50 frames of decoded images, and accumulates the average number of frames of images to be encoded in the encoder cache region in the process of encoding the 50 frames of decoded images.
In step S307, the server determines, according to the encoded code stream and the average storage frame number reported by the playing client, a hardware encoding capability of a device type to which the device operating the playing client belongs, for the video standard to be tested.
The server extracts the coded code stream contained in the coded data after receiving the coded data reported by the playing client, performs software decoding on the coded code stream, compares a decoded image of the coded code stream with a decoded image of a reference code stream, determines the similarity between the decoded image of the coded code stream and the decoded image of the reference code stream, evaluates the code control fluctuation of the coded code stream in the coding process, and determines that the equipment operating the playing client has the hardware coding capacity compatible with the video standard only when the similarity between the decoded image of the coded code stream and the decoded image of the reference code stream and the code rate fluctuation of the coded code stream are within a certain range and the average accumulated frame number in the coding process is smaller than the accumulated frame number threshold value.
In some embodiments, when it is determined that the device running the playing client has the hardware coding capability compatible with the video standard to be tested, the default other devices of the same type each have the hardware coding capability compatible with the video standard to be tested.
It should be noted that, when detecting the hardware coding capability of the device, the device may detect only one video standard (for example, only detect whether the device has the hardware coding capability for the standard reference test code stream conforming to H264), and when the detection is passed, default that the device also has the hardware coding capability for the other video standard. Of course, the reference code streams of different video standards may be detected respectively, and when all the reference code streams of the video standards to be tested pass the detection, it is determined that the device has the corresponding hardware encoding capability.
In other embodiments, the server may also determine, according to the detection result of the multiple playing clients for the same reference code stream, the hardware encoding capability of the device type to which the device running the playing client belongs for the video standard to be tested.
For example, referring to fig. 4, fig. 4 is a schematic flowchart of a hardware coding capability detection method according to an embodiment of the present invention. As shown in fig. 4, the server issues reference code streams to N (where N is a positive integer, for example, N may be 200 or 500, etc.) playing clients, and receives detection results of the N playing clients for the reference code streams. The server carries out statistical analysis on the detection results reported by the N playing clients, judges whether the encoding success quantity reported by the equipment of the same type exceeds a defined threshold (for example, more than 85% of the equipment encoding success or all the equipment encoding success), further judges whether the average stocked frame number of the equipment of the type in the encoding process is less than the stocked frame number threshold when the encoding success quantity reported by the equipment of the same type is determined to be greater than the defined threshold, only when the two conditions are met simultaneously, the equipment type of the equipment is determined to have the hardware encoding capability compatible with the video standard to be tested, and adds the equipment type into a white list correspondingly configured. For the devices in the white list, when a playing client of the device carries out video call, a hardware encoder of the device is started to encode the collected video data.
Referring to fig. 5, fig. 5 is an alternative flowchart of a hardware coding capability detection method provided by an embodiment of the present invention, which can be applied to the hardware coding capability detection system 100 shown in fig. 1 to determine hardware coding capabilities of devices of different device types. The following is a detailed description of the hardware coding capability detection method provided by the embodiment of the present invention from the server 200 side, and as shown in fig. 5, the hardware coding capability detection method provided by the embodiment of the present invention includes the following steps:
in step S501, the server issues a reference code stream meeting the standard of the video to be tested to the playing client of the user terminal.
In step S502, the server receives a coded code stream composed of coding results corresponding to each frame in the reference code stream reported by the playing client, and an average number of frames of images to be coded accumulated in a cache region of a hardware encoder during the coding process.
Here, the specific process of the playing client encoding the decoded image of the reference code stream issued by the server to generate the encoded code stream may refer to the above step S302 to step S306, and the embodiment of the present invention is not described herein again.
In step S503, after confirming that the encoded code stream reported by the playing client is received, the server alternately reads the reference code stream and each frame of the encoded code stream in a traversing manner, and performs software decoding on each frame of the read reference code stream and the read encoded code stream.
Here, the server detects the received encoded code stream after receiving the encoded code stream reported by the playing client. The server firstly reads a frame in the reference code stream, performs soft decoding on the read frame in the reference code stream, and then reads a corresponding frame in the coding code stream, and performs soft decoding on the read corresponding frame in the coding code stream.
For example, assuming that the reference code stream is 50 frames and the encoded code stream is also 50 frames, the server first reads the 1 st frame of the reference code stream and performs soft decoding, and then reads the 1 st frame of the encoded code stream and also performs soft decoding.
In some embodiments, when each frame in the read reference code stream and the encoded code stream is traversed alternately, before the reading of the reference code stream is finished, the reading of the encoded code stream is finished, which indicates that the number of frames of the encoded code stream is less than that of the reference code stream, that is, the encoded code stream is in an encoding error, and the server reports the encoding error information to a report of the server.
For example, assuming that the reference code stream is 50 frames, when the 48 th frame of the reference code stream is read, the encoded code stream is already read, that is, the encoded code stream has only 47 frames, which is less than the number of frames of the reference code stream, indicating that the encoded code stream is encoded incorrectly.
In step S504, it is determined whether the current frame in the read encoded code stream is decoded successfully, and if the decoding fails, step S505 is executed; if the decoding is successful, step S506 is performed.
In step S505, the server sends the encoded code stream error information to a report of the server.
Here, the decoding of the software decoder fails when the encoded code stream reported by the playing client is decoded, which indicates that the encoded code stream reported by the playing client does not meet the corresponding standard, i.e., the encoded code stream is in an encoded error, and the server records the encoded error information in the report.
In step S506, the server determines the similarity between the decoded image of the current frame in the encoded code stream and the decoded image of the corresponding frame in the reference code stream, and the current code stream of the encoded code stream.
For example, assuming that the currently decoded frame 17 in the encoded code stream, the server determines the similarity between the decoded image decoded by the frame 17 in the encoded code stream and the decoded image decoded by the frame 17 in the reference code stream, and the code rate of the encoded code stream when the frame 17 is decoded.
In step S507, the server evaluates the total similarity between the decoded image after decoding the encoded code stream and the decoded image after decoding the reference code stream, and the code rate fluctuation of the encoded code stream in the encoding process, and if the total similarity and the code rate fluctuation of the encoded code stream are not within a preset range, then step S508 is executed; if the total similarity and the code rate fluctuation of the encoded code stream are within the preset range, step S509 is executed.
Here, the server compares each decoded image of the encoded code stream with each decoded image of the reference code stream to determine the total similarity between the decoded images of the encoded code stream and the decoded images of the reference code stream.
For example, assuming that the reference code stream is 50 frames and the encoded code stream is also 50 frames, the decoded image of the 1 st frame of the reference code stream is compared with the decoded image of the 1 st frame of the encoded code stream, and the decoded image of the 2 nd frame of the reference code stream is compared with the decoded image of the 2 nd frame of the encoded code stream in sequence until the decoded image of the 50 th frame of the reference code stream is compared with the decoded image of the 50 th frame of the encoded code stream, so as to determine the total similarity between the decoded image of the reference code stream and the decoded image of the encoded code stream.
In step S508, the server determines that the device type of the device running the playing client does not have the hardware encoding capability compatible with the video standard to be tested.
When the total similarity between the decoded image of the reference code stream and the decoded image of the encoded code stream is smaller than a preset similarity threshold (for example, the total similarity is smaller than 85%), or the code rate fluctuation of the encoded code stream is larger than a fluctuation threshold (for example, larger than 30%), it is indicated that the quality of the encoded code stream is poor and the encoded code stream cannot be used practically, it is indicated that the device operating the playing client does not have the hardware encoding capability compatible with the video standard to be tested, and the server adds the device type to which the device belongs to a correspondingly configured blacklist.
In some embodiments, the server may issue the reference code stream to a plurality of devices of the same type, and determine that the device type does not have the hardware coding capability only when more than a predetermined number of devices do not have the hardware coding capability compatible with the video standard to be tested.
In step S509, the server determines that the device type to which the device running the playing client belongs has a hardware encoding capability compatible with the video standard to be tested.
When the total similarity between the decoded image of the reference code stream and the decoded image of the encoded code stream is greater than a preset similarity threshold (for example, the total similarity is greater than 85%), and the code rate fluctuation of the encoded code stream is less than a fluctuation threshold (for example, less than 30%), which indicates that the quality of the encoded code stream is better and meets the requirement of practical application, the server determines that the type of the device to which the device operating the playing client belongs has the hardware encoding capability compatible with the video standard to be tested.
An exemplary structure of the hardware encoding capability detection apparatus 255 provided by the embodiment of the present invention, which is implemented as a software module, may be operated in the server 200 shown in fig. 1. In some embodiments, as shown in fig. 2A, the software modules stored in the hardware encoding capability detection device 255 of the memory 250 may include: a transmitting module 2551, a receiving module 2552 and a detecting module 2553.
The sending module 2551 is configured to send a reference code stream meeting a video standard to be tested to the playing client;
the receiving module 2552 is configured to receive an encoded code stream obtained by encoding with a hardware encoder and reported by the playing client;
the detection module 2553 is configured to perform code control detection and similarity detection on the coded code stream received by the receiving module 2552, and determine, according to a corresponding detection result, a hardware coding capability of a device type to which the device operating the playing client belongs, for the video standard to be tested.
In some embodiments, the detecting module 2553 is further configured to determine that the type of the device to which the device operating the playing client belongs has a hardware encoding capability compatible with the video standard to be tested when it is detected that the similarity between the decoded image of the encoded code stream and the decoded image of the reference code stream is greater than a similarity threshold and the code rate volatility of the encoded code stream is less than a volatility threshold.
In some embodiments, the receiving module 2552 is further configured to receive an average frame number of images to be encoded that are accumulated in a hardware encoder cache area in an encoding process and reported by the playing client, so that the detecting module 2553 determines that a device type to which a device operating the playing client belongs has a hardware encoding capability compatible with the video standard to be encoded when detecting that the average frame number is less than a frame number threshold, that a similarity between a decoded image of the encoded code stream and a decoded image of the reference code stream is greater than a similarity threshold, and that a code stream volatility of the encoded code stream is less than a volatility threshold. (ii) a
In some embodiments, the detecting module 2553 is further configured to, when detecting that abnormal information is generated in the process of decoding the encoded code stream, or,
and when the frame number of the coding code stream is smaller than that of the reference code stream, determining that the equipment type of the equipment running the playing client side does not have the hardware coding capability compatible with the video standard to be tested.
In some embodiments, the detecting module 2553 is further configured to determine that a device type to which a device running the playing client belongs does not have a hardware encoding capability compatible with the video standard to be tested when receiving abnormal information reported by the playing client in a process of encoding a decoded image of the received reference code stream.
The following proceeds to describe an exemplary structure implemented as a software module of the hardware coding capability detection apparatus 455 provided by the embodiment of the present invention, which can be operated in the user terminal 400 shown in fig. 1. In some embodiments, as shown in fig. 2B, the software modules stored in the hardware encoding capability detection apparatus 455 of the memory 450 may include: a receiving module 4551, a decoding module 4552, an encoding module 4553 and a reporting module 4554.
The receiving module 4551 is configured to receive, by a playing client, a reference code stream that meets the video standard to be tested and is issued by a server;
the decoding module 4552 is configured to perform software decoding on the received reference code stream;
the encoding module 4553 is configured to encode a decoded image obtained through software decoding by the decoding module 4552 through a hardware encoder;
the reporting module 4554 is configured to report the encoded code stream obtained through encoding by the encoding module 4553 to a server, so that the server can report the encoded code stream
And the server performs code control detection and similarity detection on the coded code stream, and determines the hardware coding capacity of the equipment type of the equipment operating the playing client aiming at the video standard to be tested according to the corresponding detection result.
In some embodiments, the reporting module 4554 is further configured to report, to a server, an encoded code stream composed of an encoding result corresponding to each frame in the reference code stream, so that the server performs the following operations:
and when detecting that the code rate fluctuation of the coding code stream is smaller than a fluctuation threshold value and the similarity between the decoding image of the coding code stream and the decoding image of the reference code stream is larger than a similarity threshold value, determining that the equipment type to which the equipment operating the playing client belongs has the hardware coding capability compatible with the video standard to be tested.
In some embodiments, the reporting module 4554 is further configured to report, to a server, an encoded code stream formed by an encoding result corresponding to each frame in the reference code stream, and an average frame number of frames of the image to be encoded that are accumulated in the hardware encoder buffer in the encoding process; to cause the server to perform the following operations:
and when determining that the similarity between the decoded image of the coding code stream and the decoded image of the reference code stream is greater than a similarity threshold, the code rate fluctuation of the coding code stream is less than a fluctuation threshold, and the average frame number is less than a frame number threshold, determining that the type of the equipment to which the equipment operating the playing client belongs has the hardware coding capability compatible with the video standard to be tested.
In some embodiments, the reporting module 4554 is further configured to report the encoded code stream to a server, so that the server performs the following operations:
when abnormal information is generated in the process of decoding the coded code stream, recording coding error information in a report;
when the frame number of the coding code stream is determined to be smaller than the frame number of the reference code stream, recording coding error information in the report;
the coding error information is used for indicating that the type of the equipment which runs the playing client does not have the hardware coding capability compatible with the video standard to be tested.
In some embodiments, the reporting module 4554 is further configured to report, when the playing client generates abnormal information in a process of encoding a decoded image of the reference code stream, the abnormal information to the server, so that the server reports the abnormal information to the playing client, so that the playing client can encode the decoded image of the reference code stream
And the server determines that the type of the equipment which runs the playing client does not have the hardware coding capability compatible with the video standard to be tested.
In some embodiments, the reporting module 4554 is further configured to report, to a server, an encoded code stream generated by a playing client in multiple devices of the same type with respect to the reference code stream, and an average stocked frame number, so that the server performs the following operations:
and when the number of the devices with the hardware coding capability compatible with the video standard to be tested is determined to be larger than a preset threshold value, determining that the devices of the same type have the hardware coding capability compatible with the video standard to be tested.
It should be noted that, for inexhaustible technical details in the hardware encoding capability detection apparatus provided in the embodiment of the present invention, the details can be understood from the description of any one of the drawings in fig. 3 to 7.
In the following, an exemplary application of the embodiments of the present invention in a practical application scenario will be described.
Aiming at the fragmentation of the systems of all android manufacturers at present, before the hardware coding capability is formally used, the hardware coding compatibility of the machine type needs to be verified, for example, whether the fluctuation of code control during hardware coding meets the requirement, whether the hard coded code stream meets the corresponding standard, whether the hard coded code stream is likely to generate screen splash, screen green, decoding failure and other problems during decoding of the hard coded code stream.
When the compatibility of the hardware coding capability is detected in the related technology, the problem that whether the machine type of a user has the compatibility of the hardware coding capability is usually verified in a mode of continuous gray level for the machine type with the hardware coding capability in the machine type parameters. And adding a hard-coded switch for judging whether a certain type of standard code is started or not at the client, continuously transmitting the gray level of the hard-coded switch to a user by the server according to the type, and reporting the hard-coded state to the server at the client. For a certain type of model, if the number of reported hard-coding failures of a certain standard reference test code stream (for example, H264, H265) exceeds a defined threshold, the standard hard-coding enabling configuration is not issued to the certain type of model any more, and the model is recorded in a configured blacklist. If the number of failed reports of the H264 or H265 standard code stream of a certain type of machine model is always below a defined threshold value, the machine model is recorded into a configured white list. And continuously carrying out gray level on the models of the white list until the models of the white list are full, and closing the function of hard programming on the models of the black list. The hardware coding capability information source of the scheme is obtained by consulting the parameter specification of a manufacturer, but the use of products on models with incompatible hardware coding capabilities is necessarily influenced in the process of determining the hardware coding capability compatibility of a certain model through continuous gray scale. If the user model is not determined to have stable hard-programming capability, the hard-programming capability is enabled for the user, and application flash-back may occur in the process of using the application for the model which does not support hard-programming. In addition, decoding problems such as screen splash or green screen and the like may occur on other machine types of the hard coded code stream.
In addition, the related art also provides a YUV test sequence for verifying that the maximum resolution supported by a product is in demo through a cloud-real machine platform installation verification d emo similar to wet. Firstly, YUV data with different resolutions is obtained by intercepting from a test YUV (an image coding method, Y represents brightness (Luma) and is a gray value, U and V represent Chroma (Chroma or Chroma) which is used for describing image color and saturation and is used for specifying the color of a pixel), then hard coding is carried out according to code control parameters set by different resolutions, finally soft decoding is carried out on a code stream generated by the hard coding by a software decoder, if the soft decoding is successful, the model corresponding to the mobile phone is judged to have the hard coding capability, and the model corresponding to the mobile phone is recorded into a white list of the standard hard coding success. If the hard coding fails or the code stream of the soft decoding hard coding fails, the model corresponding to the mobile phone is recorded into the blacklist of the standard hard coding failure. And adding a hard-programming switch of whether the H264 or H265 standard is started at the client, verifying a white list machine type list obtained by the cloud-real machine platform, and continuously performing hard-programming capability switching on the gray level of a user using the machine type. If the number of the failed reports of the type of standard code stream hard-coded by the type of machine exceeds the defined threshold value, the hard-coded start configuration of the type of code stream is not issued to the type of machine, the type of machine is deleted from the white list, and the type of machine is recorded into the black list of the type of standard hard-coded. After the hard-programming capability detection is verified through the cloud real machine platform, the user machine type with compatibility problems found in the cloud real machine verification process cannot be influenced. However, the cloud real machine platform also has limitations, and firstly, most of the machine types are few, and some machine types are even none; secondly, verification on only a few mobile phones cannot well judge whether the phone model has stable hard-coded compatibility.
Further, if the above two schemes are adopted, for the model with the hard-coding compatibility problem, not only some users receiving the hard-coding start configuration will be affected, but also the code stream with the hard-coding problem will affect other users through the network.
The embodiment of the invention provides a method for detecting the encoding capacity of android hardware by combining code control and similarity, wherein a server randomly issues a reference code stream to a user, a client performs soft decoding on the received reference code stream firstly, YUV data after the soft decoding is used as the input of a hardware encoder, after the hard encoding is finished, the hard encoded stream is uploaded to the server for further detection, and meanwhile, the average storage frame number in the hard encoding process is reported. On the server side, for each record reported by the client, calculating the similarity between the YUV data decoded by the reference code stream and the YUV data decoded by the hard coded stream reported by the client, and simultaneously evaluating the code control fluctuation of the hard coded stream in the coding process, wherein only when the similarity and the code control fluctuation of all reported code streams of a certain type are within a certain threshold range, the type is determined to have the stable hardware coding capacity.
Referring to fig. 6, fig. 6 is a schematic flowchart of a hardware coding capability detection method provided by an embodiment of the present invention, and is applied to a client side. As shown in fig. 6, the method comprises the steps of:
step S601: and the server transmits the reference code stream to the client.
Here, the reference code stream refers to a standard reference test code stream conforming to H264 or H265.
Step S602: after confirming that the reference code stream issued by the server is received, the client sets corresponding code control parameters according to the file name of the reference code stream issued by the server to start hardware coding capability detection.
Step S603: and traversing and reading each frame in the received reference code stream.
Step S604: judging whether the reading of the received reference code stream is finished, if so, executing the step S610; if no reading is finished, step S605 is executed.
Step S605: and sending the current frame in the read reference code stream to a software decoder for decoding.
Step S606: and sending the YUV data obtained by decoding the current frame through software into a hardware encoder for encoding.
Step S607: judging whether the encoding of the sent YUV data is finished, if the hardware encoder does not return failure, indicating that the encoding is finished, executing step S608; if the hardware encoder throws the exception information indicating that the encoding failed, step S609 is executed.
Step S608: and storing the coding result of the hardware coding of the YUV data obtained by decoding the current frame, and updating the number of frames currently stocked in a buffer area of a hardware coder.
Step S609: an encoding error code is determined.
Step S610: and finishing hard weaving.
Here, the hard-coding end means that each decoded image in the reference code stream issued by the server can be coded until the end.
Step S611: and storing a hard coded stream generated by hardware coding of the image decoded by the reference code stream, and calculating the average accumulation frame number in the hard coding process.
Step S612: and reporting the hard coding stream after the hard coding or the error code generated in the hard coding process to a server.
And the server determines whether a certain model has the hardware coding capability aiming at the standard code stream according to the hard coding stream reported by the client.
Referring to fig. 7, fig. 7 is a schematic flowchart of a hardware coding capability detection method provided in an embodiment of the present invention, and is applied to a server side. As shown in fig. 7, the method comprises the steps of:
step S701: and after confirming that the hard coding stream reported by the client is received, the server starts the detection of the received hard coding stream.
Step S702: and traversing and reading each frame in the reference code stream.
Step S703: judging whether the reading of the reference code stream is finished, if not, executing the step S704; if so, step S712 is performed.
Step S704: and performing soft decoding on the current frame in the read reference code stream.
Step S705: and traversing and reading each frame in the hard coding stream reported by the client.
Step S706: judging whether the reading of the hard coded stream is finished, if not, executing the step S707; if so, step S711 is performed.
Step S707: and performing soft solution on the current frame in the read hard coded stream.
Step S708: judging whether the current frame in the hard coded stream is decoded successfully or not, and if the decoding is successful, executing step S709; if the decoding fails, step S711 is performed.
Step S709: and updating the similarity between the decoded YUV data of the current frame in the hard coded stream and the decoded YUV data of the current frame in the corresponding reference code stream.
Step S710: and updating the code rate of the current hard coded stream.
Step S711: and reporting the coding error information of the hard coded stream to a report.
Here, the hard coded stream coding error information includes that the hard coded stream fails to decode, that is, the hard coded stream does not meet the corresponding standard, and that the hard coded stream has already read the end of the file before the end of the reference code stream, that is, the number of frames of the hard coded stream is less than the number of frames of the reference code stream.
Step S712: and finishing the soft solution.
Here, the soft decoding end means that the frame number of the hard coded stream is the same as the frame number of the reference code stream, and each frame in the hard coded stream can be normally soft decoded until the decoding is ended.
Step S713: and determining the similarity between the YUV data decoded by the hard coded stream and the YUV data decoded by the reference code stream and the code rate fluctuation of the hard coded stream in the decoding process.
Step S714: judging whether the similarity between the YUV data decoded by the hard coded stream and the YUV data decoded by the reference code stream is larger than a defined threshold (for example: 85%) and whether the code rate volatility of the hard coded stream in the decoding process is smaller than a volatility threshold (for example: 30%), if so, executing a step S715; if not, step S716 is performed.
Step S715: and reporting the successful information of the hard-coded detection to a report.
Step S716: and reporting the hard-coded detection failure information to a report.
Step S717: and summarizing and analyzing the data in the report, and adding the type into a hard-coded configuration white list corresponding to the standard code stream only when the hard-coded power of the H264 or H265 standard code stream reported by the type is above a defined threshold value and the average accumulated frame number reported by the client in the hard-coded process meets the delay requirement of the product.
The method for detecting the encoding capability of the android hardware combining code control and similarity randomly issues a reference code stream to a client of a user through a server, the client performs soft decoding on the reference code stream at first, sends the YUV data after the soft decoding to a hardware encoder for hard encoding, reports the hard encoded stream to the server for further detection after the hard encoding is completed, and reports the average stocked frame number in the hard encoding process. And at the server, calculating the similarity of the decoded YUV data of the reference code stream and the hard code stream aiming at each record reported by the client, evaluating the code control fluctuation of the hard code stream in the coding process, and determining that one model has the stable hardware coding capability only when the similarity and the code control fluctuation of the decoded YUV data of all reported hard code streams and reference code streams of a certain model are within a certain threshold range. In practical application, the hardware coding capability detection method provided by the embodiment of the invention can be used as a functional module of product application, when a user uses the product application on a terminal, a server randomly issues a reference code stream to the user terminal, the user terminal independently starts a thread to perform soft decoding on the reference code stream, hard coding is performed on YUV data obtained by the soft decoding, and the hard coded stream after the hard coding is reported to the server for code control and similarity detection. Whether a certain type of machine type has the hardware coding capacity aiming at the H264 or H265 standard is judged by analyzing the code control and similarity detection results of each type of machine type. When a user conducts video chat, a hard-programming function during the video conversation is started for the machine type detected through the hardware coding capacity, so that the hard-programming utilization rate of the corresponding machine type is improved.
Embodiments of the present invention provide a storage medium storing executable instructions, where the executable instructions are stored, and when executed by a processor, will cause the processor to execute any one of the hardware coding capability detection methods provided by the embodiments of the present invention, for example, the hardware coding capability detection methods shown in fig. 3 to 7.
In some embodiments, the storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EE PROM, flash, magnetic surface memory, optical disk, or CD-ROM; or may be various devices including one or any combination of the above memories.
In some embodiments, executable instructions may be written in any form of programming language (including compiled or interpreted languages), in the form of programs, software modules, scripts or code, and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.
By way of example, executable instructions may correspond, but do not necessarily have to correspond, to files in a file system, and may be stored in a portion of a file that holds other programs or data, such as in one or more scripts in a hypertext Markup Language (H TML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files that store one or more modules, sub-programs, or portions of code).
By way of example, executable instructions may be deployed to be executed on one computing device or on multiple computing devices at one site or distributed across multiple sites and interconnected by a communication network.
In summary, the embodiment of the invention has the following beneficial effects:
the server sends a reference code stream meeting the video standard to be tested to a playing client of a user, the playing client firstly carries out soft decoding on the received reference code stream, an image after the soft decoding is sent to a hardware encoder for encoding, after the hard encoding is finished, the hard encoded stream is reported to the server for further detection, and meanwhile, the average accumulated frame number in the hard encoding process is reported. After receiving the hard coded stream reported by the playing client, the server calculates the similarity between the reference code stream and the decoded image of the hard coded stream, evaluates the code control volatility of the hard coded stream in the coding process, and further determines the hardware coding capacity of the equipment type to which the equipment operating the playing client belongs, aiming at the video standard to be tested, according to the similarity, the code control volatility and the average stocked frame number. Furthermore, the server can issue reference code streams to multiple playing clients of the same type, and perform statistical analysis on detection results reported by the multiple playing clients, so as to more accurately determine the hardware coding capability of the device type to which the device operating the playing client belongs, for the video standard to be tested. Aiming at the fragmentation ecology provided by various manufacturers at present, the hardware coding capability detection method provided by the embodiment of the invention can provide a reliable device type list supporting the coding function.
The above description is only an example of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, and improvement made within the spirit and scope of the present invention are included in the protection scope of the present invention.

Claims (11)

1. A hardware coding capability detection method, the method comprising:
receiving a reference code stream which is issued by a server and meets the standard of the video to be tested through a playing client;
traversing and reading each frame in the received reference code stream, performing software decoding on each read frame, and encoding a decoded image obtained through the software decoding through a hardware encoder;
when the coding of the decoded image of any frame in the reference code stream is finished, storing a coding result corresponding to any frame and the number of frames of the image to be coded currently stocked in the cache region of the hardware coder;
when the decoded image of each frame in the reference code stream is completely encoded, reporting an encoded code stream consisting of the encoding result corresponding to each frame in the reference code stream and the average frame number of the images to be encoded accumulated in the cache region of the hardware encoder in the encoding process to the server so as to ensure that the average frame number of the images to be encoded is accumulated in the cache region of the hardware encoder in the encoding process
And the server performs code control detection and similarity detection on the coded code stream, and determines the hardware coding capacity of the equipment type of the equipment running the playing client aiming at the video standard to be tested according to the corresponding detection result and the average frame number.
2. The method of claim 1,
the code control detection result comprises the code rate fluctuation of the coding code stream;
the similarity detection result comprises the similarity of the decoded image of the coding code stream and the decoded image of the reference code stream;
the determining, according to the corresponding detection result and the average frame number, the hardware encoding capability of the device type to which the device running the playing client belongs for the video standard to be tested includes:
and when detecting that the code rate fluctuation of the coded code stream is smaller than a fluctuation threshold, the similarity between the decoded image of the coded code stream and the decoded image of the reference code stream is larger than a similarity threshold, and the average frame number is smaller than a frame number threshold, determining that the type of the equipment to which the equipment operating the playing client belongs has the hardware coding capability compatible with the video standard to be tested.
3. The method of claim 2,
the code stream is further configured to cause the server to perform the following operations:
when abnormal information is generated in the process of decoding the coded code stream, recording coding error information in a report;
when the frame number of the coding code stream is determined to be smaller than the frame number of the reference code stream, recording coding error information in the report;
the coding error information is used for indicating that the type of the equipment which runs the playing client does not have the hardware coding capability compatible with the video standard to be tested.
4. The method of claim 1, further comprising:
the encoded code stream and the average frame number reported to the server by the playing clients operating in a plurality of devices of the same type are used for enabling the server to execute the following operations:
and when the number of the devices with the hardware coding capability compatible with the video standard to be tested is determined to be larger than a preset threshold value, determining that the devices of the same type have the hardware coding capability compatible with the video standard to be tested.
5. A hardware coding capability detection method, the method comprising:
sending a reference code stream meeting a to-be-tested video standard to a playing client;
receiving a coding code stream consisting of coding results corresponding to each frame in the reference code stream reported by the playing client and an average number of frames of images to be coded accumulated in a cache region of a hardware coder in the coding process; the coding code stream is reported when the playing client finishes coding each decoded image in the reference code stream through the hardware coder;
and carrying out code control detection and similarity detection on the received coded code stream, and determining the hardware coding capacity of the equipment type of the equipment operating the playing client side aiming at the video standard to be tested according to the corresponding detection result and the average frame number.
6. The method of claim 5,
the code control detection result comprises the code rate fluctuation of the coding code stream;
the similarity detection result comprises the similarity of the decoded image of the coding code stream and the decoded image of the reference code stream;
the determining, according to the corresponding detection result and the average frame number, the hardware encoding capability of the device type to which the device running the playing client belongs for the video standard to be tested includes:
and when detecting that the code rate fluctuation of the coded code stream is smaller than a fluctuation threshold, the similarity between the decoded image of the coded code stream and the decoded image of the reference code stream is larger than a similarity threshold, and the average frame number is smaller than a frame number threshold, determining that the type of the equipment to which the equipment operating the playing client belongs has the hardware coding capability compatible with the video standard to be tested.
7. An apparatus for detecting hardware encoding capability, the apparatus comprising:
the receiving module is used for receiving a reference code stream which is issued by the server and accords with the video standard to be tested through the playing client;
the decoding module is used for traversing and reading each frame in the reference code stream received by the receiving module and performing software decoding on each read frame;
the coding module is used for coding a decoded image obtained by the decoding module through software decoding through a hardware coder;
a storage module, configured to store, when encoding of a decoded image of any frame in the reference code stream is completed, an encoding result corresponding to the any frame and a number of frames of an image to be encoded currently stocked in the hardware encoder cache region;
a reporting module, configured to report, to the server, an encoded code stream composed of encoding results corresponding to each frame in the reference code stream and an average number of frames of images to be encoded accumulated in the hardware encoder cache area during an encoding process, when encoding of each decoded frame in the reference code stream is completed, so that the average number of frames of images to be encoded is allowed to be accumulated in the hardware encoder cache area during the encoding process
And the server performs code control detection and similarity detection on the coded code stream, and determines the hardware coding capacity of the equipment type of the equipment running the playing client aiming at the video standard to be tested according to the corresponding detection result and the average frame number.
8. An apparatus for detecting hardware encoding capability, the apparatus comprising:
the sending module is used for sending the reference code stream meeting the video standard to be tested to the playing client;
a receiving module, configured to receive a coded code stream composed of coding results corresponding to each frame in the reference code stream and reported by the playing client, and an average number of frames of images to be coded that are accumulated in a hardware encoder cache area during a coding process; the coding code stream is reported when the playing client finishes coding each decoded image in the reference code stream through a hardware coder;
and the detection module is used for carrying out code control detection and similarity detection on the coded code stream received by the receiving module, and determining the hardware coding capacity of the equipment type of the equipment operating the playing client aiming at the video standard to be tested according to the corresponding detection result and the average frame number.
9. A terminal device, characterized in that the terminal device comprises:
a memory for storing executable instructions;
a processor, configured to execute the executable instructions stored in the memory, and to implement the hardware coding capability detection method according to any one of claims 1 to 4.
10. A server, characterized in that the server comprises:
a memory for storing executable instructions;
a processor, configured to execute the executable instructions stored in the memory, and to implement the hardware coding capability detection method according to any one of claims 5 to 6.
11. A computer-readable storage medium storing executable instructions for implementing the hardware coding capability detection method of any one of claims 1 to 4 or any one of claims 5 to 6 when executed by a processor.
CN201911025139.0A 2019-10-25 2019-10-25 Hardware coding capability detection method and device Active CN110740313B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911025139.0A CN110740313B (en) 2019-10-25 2019-10-25 Hardware coding capability detection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911025139.0A CN110740313B (en) 2019-10-25 2019-10-25 Hardware coding capability detection method and device

Publications (2)

Publication Number Publication Date
CN110740313A CN110740313A (en) 2020-01-31
CN110740313B true CN110740313B (en) 2021-12-10

Family

ID=69271574

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911025139.0A Active CN110740313B (en) 2019-10-25 2019-10-25 Hardware coding capability detection method and device

Country Status (1)

Country Link
CN (1) CN110740313B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111510706B (en) * 2020-04-21 2022-03-22 咪咕文化科技有限公司 Hardware encoding and decoding support degree detection method, terminal and storage medium
CN111737134B (en) * 2020-06-23 2023-09-26 湖南国科微电子股份有限公司 Chip testing method and device, electronic equipment and storage medium
CN112004112A (en) * 2020-07-03 2020-11-27 北京博雅慧视智能技术研究院有限公司 Verification method and device of hardware video encoder, electronic equipment and storage medium
CN114390363A (en) * 2021-12-22 2022-04-22 广州方硅信息技术有限公司 Adaptation method, device, system and storage medium of encoder
CN114501017A (en) * 2022-03-04 2022-05-13 百果园技术(新加坡)有限公司 Video coding adaptation method, device, equipment and storage medium
CN115209223A (en) * 2022-05-12 2022-10-18 广州方硅信息技术有限公司 Control processing method, device, terminal and storage medium for video coding/decoding
CN116437070B (en) * 2023-03-29 2023-12-29 东方空间技术(山东)有限公司 Terminal state detection system, method, computer equipment and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101895788B (en) * 2010-07-21 2013-07-03 深圳市融创天下科技股份有限公司 Method and system for objectively evaluating video coding performance
CN105915890B (en) * 2016-04-27 2018-01-30 山东大学 SVAC coding and decoding video chip checking device and methods based on FPGA
CN107835423A (en) * 2017-09-06 2018-03-23 国家新闻出版广电总局广播电视规划院 A kind of statistical-multiplexing encoding performance test and evaluation method

Also Published As

Publication number Publication date
CN110740313A (en) 2020-01-31

Similar Documents

Publication Publication Date Title
CN110740313B (en) Hardware coding capability detection method and device
CN110636284B (en) Decoding capability detection method and device
CN112087633B (en) Video decoding method, device and storage medium
US9609387B2 (en) Communication device, communication system, and communication control method
CN104837052A (en) Playing method of multimedia data and device
CN113891153A (en) Cloud game streaming processing method, device and medium
CN113230660B (en) Application program updating method, device and equipment
US11044278B2 (en) Transcoding capability configuration method and device and computer storage medium
CN110662017B (en) Video playing quality detection method and device
US20200204296A1 (en) Conditional forward error correction for network data
CN114245209A (en) Video resolution determination method, video resolution determination device, video model training method, video coding device and video coding device
WO2018171548A1 (en) Decoding method, terminal and computer-readable storage medium
CN110958468B (en) Adaptation method and device of coder and decoder, computer readable medium and equipment
CN110891195B (en) Method, device and equipment for generating screen image and storage medium
CN113709447B (en) Method and device for detecting playing performance of terminal equipment
CN106254873B (en) Video coding method and video coding device
CN114760309A (en) Business interaction method, device, equipment and medium of terminal based on cloud service
CN114390300B (en) Live broadcast control method and device, electronic equipment and computer storage medium
CN112738571B (en) Method and device for determining streaming media parameters
CN115914228B (en) Data processing method, device, storage medium and computer program product
CN111935545B (en) Method, device and equipment for transcoding video data and storage medium
CN112243135B (en) Multimedia playing method and device
CN115460189B (en) Processing equipment testing method and device, computer and storage medium
EP4102838A1 (en) Video decoding method and apparatus, video encoding method and apparatus, and device and storage medium
CN114765677A (en) Multi-person video session method, device, computer equipment and storage medium

Legal Events

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