Filter format determination method, apparatus and electronic device
By redefining the format of only the filter to be negotiated based on filter creation and running status detection, the problem of low filter negotiation efficiency is solved, and the processing efficiency and resource utilization of the filter are improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING XIAOMI MOBILE SOFTWARE CO LTD
- Filing Date
- 2022-03-23
- Publication Date
- 2026-07-31
AI Technical Summary
In existing technologies, filters are inefficient during format negotiation, resulting in wasted computational resources and an inability to efficiently process noise in digital images.
By creating filters and determining the final input format of the filters based on the output format of the video input source, the filter's running status is detected, and only the format of the filters to be negotiated is redefined, avoiding global negotiation and improving filtering efficiency.
This technology enables the format to be redefined only for relevant filters when the video input source format changes, thus avoiding wasted computing resources and improving filtering efficiency.
Smart Images

Figure CN116847151B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of video filtering technology, and in particular to a method, apparatus and electronic device for determining filtering format. Background Technology
[0002] In related technologies, due to imperfections in imaging systems, transmission media, and recording equipment, digital images are often contaminated by various types of noise during their formation, transmission, and recording processes. Furthermore, noise is introduced into the resulting image when the input image object is not as expected at certain stages of image processing. This noise often manifests as isolated pixels or pixel blocks in the image. Using filters to process images can suppress noise in the target image while preserving as much detail as possible. However, before filtering, a unified format negotiation is required to determine the final input filtering format for each filter. If the filter format changes, all filters must stop running and undergo re-format negotiation before they can run again, resulting in low overall filtering efficiency and wasted computational resources. Summary of the Invention
[0003] This disclosure provides a method, apparatus, and electronic device for determining a filtering format, to at least solve the problem of low filtering efficiency in related technologies. The technical solution of this disclosure is as follows:
[0004] According to a first aspect of the present disclosure, a method for determining a filtering format is provided, comprising:
[0005] Create at least one filter and connect the output of at least one video input source to the input of the at least one filter;
[0006] The first final input filter format of the at least one filter is determined based on the filter format output by the at least one video input source;
[0007] Control the at least one filter to start filtering, and determine the filter to be negotiated among the at least one filters based on the operating status of the at least one filter;
[0008] The second final input filtering format of the filter to be negotiated is determined based on the video input source corresponding to the filter to be negotiated.
[0009] Optionally, determining the first final input filter format of the at least one filter based on the filter format output by the at least one video input source includes:
[0010] Obtain a first output filter format list for the at least one video input source, wherein the first output filter format list includes output filter formats supported by the video input source;
[0011] Obtain a first input filter format list for the at least one filter, wherein the first input filter format list includes input filter formats supported by the filter;
[0012] Obtain the first filter format that is the same as the first output filter format list and the corresponding first input filter format list, and determine it as the first filter format. Then, determine the first final input filter format from the first filter format.
[0013] Optionally, after controlling the at least one filter to start filtering, the method further includes:
[0014] Configure the filter such that it stops filtering when the output filtering format of the corresponding video input source is different from the first final input filtering format.
[0015] Optionally, determining the filter to be negotiated among the at least one filters based on the operating state of the at least one filter includes:
[0016] The operating status of each filter is detected. If the filter is in a stopped filtering state, the filter is determined as the filter to be negotiated, and the video input source corresponding to the filter is determined as the video input source to be negotiated.
[0017] Otherwise, allow the filter to continue filtering.
[0018] Optionally, determining the second final input filtering format of the filter to be negotiated based on the video input source corresponding to the filter to be negotiated includes:
[0019] Obtain the second output filter format list of the video input source to be negotiated and the second input filter format list of the filter to be negotiated;
[0020] Obtain the same filter format in the second output filter format list and the second input filter format list and determine it as the second filter format; determine the second final input filter format from the second filter format.
[0021] The filter to be negotiated is restarted to filter according to the second final input filtering format.
[0022] According to a second aspect of the present disclosure, a filter format determination apparatus is provided, comprising:
[0023] A filter creation module is used to create at least one filter and connect the output of at least one video input source to the input of the at least one filter.
[0024] The first format determination module is used to determine the first final input filtering format of the at least one filter based on the filtering format output by the at least one video input source;
[0025] The judgment module is used to control the at least one filter to start filtering and to determine the filter to be negotiated among the at least one filters based on the operating status of the at least one filter.
[0026] The second format determination module is used to determine the second final input filtering format of the filter to be negotiated based on the video input source corresponding to the filter to be negotiated.
[0027] Optionally, the first format determination module includes:
[0028] The first list acquisition submodule is used to acquire a first output filter format list of the at least one video input source, wherein the first output filter format list includes output filter formats supported by the video input source;
[0029] The second list acquisition submodule is used to acquire a first input filter format list of the at least one filter, wherein the first input filter format list includes the input filter formats supported by the filter;
[0030] The first final input filter format determination submodule is used to obtain the same filter format in the at least one first output filter format list and the corresponding first input filter format list and determine it as the first filter format, and determine the first final input filter format from the first filter format.
[0031] Optionally, the determination module further includes:
[0032] A configuration module is used to configure the filter so that the filter stops filtering when the output filtering format of the corresponding video input source is different from the first final input filtering format.
[0033] Optionally, the determination module further includes:
[0034] The judgment submodule is used to detect the operating status of each filter. If the filter is in a stopped filtering state, the filter is determined as a filter to be negotiated, and the video input source corresponding to the filter is determined as a video input source to be negotiated; otherwise, the filter is allowed to continue filtering.
[0035] Optionally, the second format determination module includes:
[0036] The third list acquisition submodule is used to acquire the second output filter format list of the video input source to be negotiated and the second input filter format list of the filter to be negotiated.
[0037] The fourth list acquisition submodule is used to acquire the same filter format in the second output filter format list and the second input filter format list and determine it as the second filter format, and determine the second final input filter format from the second filter format.
[0038] The filtering submodule is used to restart the filter to be negotiated based on the second final input filtering format.
[0039] According to a third aspect of the present disclosure, an electronic device is provided, characterized in that it includes:
[0040] processor;
[0041] Memory used to store the processor's executable instructions;
[0042] The processor is configured to execute the instructions to implement the filter format determination method as described in any of the first aspects above.
[0043] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, wherein when instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the filtering format determination method as described in any one of the first aspects above.
[0044] According to a fifth aspect of the present disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the filtering format determination method according to any one of the first aspects described above.
[0045] The technical solutions provided by the embodiments of this disclosure have at least the following beneficial effects:
[0046] The filter to be negotiated is determined based on the filter's operating status, and its second final input filter format is also determined. This ensures that when the input format of the video input source changes, the format is determined only for the relevant filter. This avoids wasting computational resources and improves filtering efficiency.
[0047] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0048] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure, and are not intended to unduly limit this disclosure.
[0049] Figure 1 This is a flowchart illustrating a method for determining a filter format according to an exemplary embodiment.
[0050] Figure 2 This is a flowchart illustrating a method for determining a filter format according to an exemplary embodiment.
[0051] Figure 3 This is a flowchart illustrating a method for determining a filter format according to an exemplary embodiment.
[0052] Figure 4 This is a block diagram illustrating a filter format determination apparatus according to an exemplary embodiment.
[0053] Figure 5 This is a block diagram illustrating a filter format determination apparatus according to an exemplary embodiment.
[0054] Figure 6 This is a block diagram illustrating an electronic device according to an exemplary embodiment. Detailed Implementation
[0055] To enable those skilled in the art to better understand the technical solutions of this disclosure, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings.
[0056] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0057] Due to imperfections in imaging systems, transmission media, and recording equipment, digital images are often contaminated by various types of noise during their formation, transmission, and recording processes. Furthermore, noise can be introduced into the final image at certain stages of image processing when the input image does not meet expectations. This noise often manifests as isolated pixels or pixel blocks in the image. Using filters to process images can suppress noise in the target image while preserving as much detail as possible.
[0058] In related technologies, before filtering with filters, it is necessary to perform a unified format negotiation on all filters and their corresponding input sources to determine the input filtering format of each filter and the output filtering format of its corresponding output source. Once the output filtering format of the output source or the input filtering format of the filter changes, all filters need to stop running and re-perform the negotiation to determine the new input filtering format and output filtering format before all filters can start running again to perform filtering work. The overall filtering efficiency is low and computational resources are wasted.
[0059] Figure 1 This is a flowchart illustrating a method for determining a filter format according to an exemplary embodiment. Figure 1 As shown, the method includes the following steps:
[0060] Step 101: Create at least one filter and connect the output of at least one video input source to the input of the at least one filter.
[0061] In this embodiment, FFmpeg is used to process the video. FFmpeg is an open-source computer program that can record, convert, and stream digital audio and video. It is licensed under the LGPL or GPL. It provides a complete solution for recording, converting, and streaming audio and video. It includes a rich set of audio / video codec libraries, ensuring high portability and encoding / decoding quality.
[0062] Filters have two main uses in video processing. First, they can denoise the video, reducing noise in both video frames and corresponding audio. Second, they can transform the video in specific ways, such as mirroring video frames horizontally or vertically, cropping video frames to a specific resolution, delaying the corresponding audio by 0.5 seconds, or merging multiple audio channels into one.
[0063] At least one filter is created using the AVFilter function in FFmpeg. The number of filters is determined by the number of video input sources. Each video input source can be connected to one filter for filtering and output, or connected to multiple filters in series for filtering and output.
[0064] The video output source can output image frames or audio.
[0065] Step 102: Determine the first final input filter format of the at least one filter based on the filter format output by the at least one video input source.
[0066] In this embodiment, the FFmpeg filter performs filtering based on frames, which naturally places requirements on the frame format. The frame can be an image frame or an audio frame. If the filter does not know the frame format, it cannot process the frame. When filtering image frames, the filtering format is the pixel format of the video; when filtering audio frames, the filtering format includes the audio sampling format, sampling rate, and number of channels.
[0067] Step 103: Control the at least one filter to start filtering, and determine the filter to be negotiated among the at least one filters according to the operating status of the at least one filter.
[0068] In this embodiment of the application, after determining the first final input filtering format of the filter, the filter can filter the image frames or audio frames input from the video input source according to the first final input filtering format.
[0069] Step 104: Determine the second final input filtering format of the filter to be negotiated based on the video input source corresponding to the filter to be negotiated.
[0070] In this embodiment, the filter to be negotiated is stopped, while other filters continue to operate and perform filtering operations. To ensure that the input filtering format of the filter to be negotiated is the same as the output filtering format of the video input source, a second final input filtering format for the filter to be negotiated needs to be determined again based on the video input source.
[0071] Figure 2 This is a flowchart illustrating a method for determining a filter format according to an exemplary embodiment. Figure 2 As shown, step 102 above includes the following steps:
[0072] Step 201: Obtain a first output filter format list of the at least one video input source, wherein the first output filter format list includes output filter formats supported by the video input source.
[0073] In this embodiment, during video filtering, the AVFilterLink structure in FFmpeg is used for format negotiation. The AVFilterLink structure is used to negotiate the format of connected video input sources and filters. The video input source supports at least one output filtering format, and the first list of output filtering formats includes the output filtering formats supported by the video input source.
[0074] Step 202: Obtain a first input filter format list for the at least one filter, wherein the first input filter format list includes input filter formats supported by the filter.
[0075] In this embodiment of the application, the filter supports at least one input filtering format, and the first input filtering format list includes the input filtering formats supported by the filter.
[0076] Step 203: Obtain the filter formats that are the same in the at least one first output filter format list and the corresponding first input filter format list and determine them as the first filter format; determine the first final input filter format from the first filter formats.
[0077] In this embodiment, the frame format input to the filter needs to be the same as the filter format supported by the filter. Each AVFilterLink structure compares its obtained first output filter format list with the corresponding first input filter format list, and selects the same filter format from the two filter format lists, which is the first filter format. If one of the first filter formats is included, the first filter format can be used as the first final filter format; if multiple first filter formats are included, one format can be selected from the first filter formats as the first final filter format.
[0078] This application embodiment determines the filter to be negotiated based on the filter's operating state and determines its second final input filtering format. This enables the format to be determined only for the relevant filter when the input format of the video input source changes. This avoids wasting computational resources and improves filtering efficiency.
[0079] Optionally, after controlling the at least one filter to start filtering, the method further includes:
[0080] Configure the filter such that it stops filtering when the output filtering format of the corresponding video input source is different from the first final input filtering format.
[0081] In this embodiment, the filters are configured, and the operating status of each filter is detected. If the image frame or audio frame input from the corresponding video input source changes during the operation of the filter, i.e., it is different from the previously determined first final input filtering format, then continuing filtering will result in errors in the image frame or audio frame output by the filter. Therefore, the filter needs to be stopped, and it needs to be identified as the filter to be negotiated.
[0082] Optionally, step 103, which determines the filter to be negotiated among the at least one filters based on the operating state of the at least one filter, includes:
[0083] The operating status of each filter is detected. If the filter is in a stopped filtering state, the filter is determined as the filter to be negotiated, and the video input source corresponding to the filter is determined as the video input source to be negotiated.
[0084] Otherwise, allow the filter to continue filtering.
[0085] In this embodiment, the filter is configured to stop filtering when the output filtering format of the corresponding video input source differs from the first final input filtering format. Therefore, after the filter starts filtering, its operating status needs to be monitored and its status detected. If the filter is in a stopped filtering state, i.e., it has stopped working, it indicates that the filtering format of the video input source corresponding to the filter has changed and is different from the first final filtering format, requiring a re-determination of the input filtering format. For filters that have not stopped filtering, in order to avoid affecting their filtering process and allow them to continue filtering, it is not necessary to re-determine their input filtering format.
[0086] Figure 3 This is a flowchart illustrating a method for determining a filter format according to an exemplary embodiment. Figure 3 As shown, step 104 above also includes the following steps:
[0087] Step 301: Obtain the second output filter format list of the video input source to be negotiated and the second input filter format list of the filter to be negotiated.
[0088] In this embodiment, the output filtering format of the video input source to be negotiated and the input filtering format of the filter to be negotiated are redefined. The input filtering format of the video input source to be negotiated changes relative to the previously determined first final input filtering format; that is, the second output filtering format list of the video input source to be negotiated changes relative to the previous first output filtering format list.
[0089] Step 302: Obtain the same filter format in the second output filter format list and the second input filter format list and determine it as the second filter format; determine the second final input filter format from the second filter format.
[0090] In this embodiment, the frame format of the input filter to be negotiated needs to be the same as the filter format supported by the filter to be negotiated. Each AVFilterLink structure compares its acquired second output filter format list with the corresponding second input filter format list, and selects the same filter format from the two filter format lists, which is the second filter format. If one of the second filter formats is included, the second filter format can be used as the second final input filter format; if multiple second filter formats are included, one format can be selected from the second filter formats as the second final input filter format.
[0091] Step 303: Re-start the filter to be negotiated according to the second final input filtering format.
[0092] Figure 4 This is a block diagram illustrating a filter format determination apparatus according to an exemplary embodiment. Figure 4 As shown in the diagram, both `amovie` and `adevsrc` are video input sources. `amovie` can input image frames, and `adevsrc` can input audio frames. `volume` is the filter. `amix` is a filter used for mixing, which can combine the input image and audio frames and output them, realizing the function of audio-video merging. `out_format` is the output filter format, and `in_format` is the input filter format. Before the filter starts working, the `AVFilterLink` structure is used to obtain the list of filter formats supported by the video output source and the filter connected to it. The filter formats that are the same in the two lists are compared and selected as the final filter format.
[0093] After filtering begins, the operating status of each filter is monitored. If a filter stops operating, it is identified as a filter to be negotiated, and the corresponding video input source is identified as an input source to be negotiated. Only the filtering format of the filter to be negotiated and the input source to be negotiated are redefined, without affecting the normal operation of other filters. This improves filtering efficiency and saves computational resources.
[0094] Figure 5 This is a block diagram illustrating a filter format determination apparatus according to an exemplary embodiment. Figure 5 As shown, the device 500 includes:
[0095] The filter creation module 510 is used to create at least one filter and connect the output of at least one video input source to the input of the at least one filter.
[0096] The first format determination module 520 is used to determine the first final input filtering format of the at least one filter based on the filtering format output by the at least one video input source.
[0097] The judgment module 530 is used to control the at least one filter to start filtering and to determine the filter to be negotiated among the at least one filters according to the operating status of the at least one filter.
[0098] The second format determination module 540 is used to determine the second final input filtering format of the filter to be negotiated based on the video input source corresponding to the filter to be negotiated.
[0099] Optionally, the first format determination module includes:
[0100] The first list acquisition submodule is used to acquire a first output filter format list of the at least one video input source, wherein the first output filter format list includes output filter formats supported by the video input source;
[0101] The second list acquisition submodule is used to acquire a first input filter format list of the at least one filter, wherein the first input filter format list includes the input filter formats supported by the filter;
[0102] The first final input filter format determination submodule is used to obtain the same filter format in the at least one first output filter format list and the corresponding first input filter format list and determine it as the first filter format, and determine the first final input filter format from the first filter format.
[0103] Optionally, the determination module further includes:
[0104] A configuration module is used to configure the filter so that the filter stops filtering when the output filtering format of the corresponding video input source is different from the first final input filtering format.
[0105] Optionally, the determination module further includes:
[0106] The judgment submodule is used to detect the operating status of each filter. If the filter is in a stopped filtering state, the filter is determined as a filter to be negotiated, and the video input source corresponding to the filter is determined as a video input source to be negotiated; otherwise, the filter is allowed to continue filtering.
[0107] Optionally, the second format determination module includes:
[0108] The third list acquisition submodule is used to acquire the second output filter format list of the video input source to be negotiated and the second input filter format list of the filter to be negotiated.
[0109] The fourth list acquisition submodule is used to acquire the same filter format in the second output filter format list and the second input filter format list and determine it as the second filter format, and determine the second final input filter format from the second filter format.
[0110] The filtering submodule is used to restart the filter to be negotiated based on the second final input filtering format.
[0111] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0112] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0113] Figure 6 A schematic block diagram of an example electronic device 600 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0114] like Figure 6 As shown, device 600 includes a computing unit 601, which can perform various appropriate actions and processes based on a computer program stored in read-only memory (ROM) 602 or a computer program loaded from storage unit 608 into random access memory (RAM) 603. RAM 603 may also store various programs and data required for the operation of device 600. The computing unit 601, ROM 602, and RAM 603 are interconnected via bus 604. Input / output (I / O) interface 605 is also connected to bus 604.
[0115] Multiple components in device 600 are connected to I / O interface 605, including: input unit 606, such as keyboard, mouse, etc.; output unit 607, such as various types of monitors, speakers, etc.; storage unit 608, such as disk, optical disk, etc.; and communication unit 609, such as network card, modem, wireless transceiver, etc. Communication unit 609 allows device 600 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0116] The computing unit 601 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 601 performs the various methods and processes described above, such as the filter format determination method. For example, in some embodiments, the filter format determination method may be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 608. In some embodiments, part or all of the computer program may be loaded and / or installed on device 600 via ROM 602 and / or communication unit 609. When the computer program is loaded into RAM 603 and executed by the computing unit 601, one or more steps of the filter format determination method described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to perform the filter format determination method by any other suitable means (e.g., by means of firmware).
[0117] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0118] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0119] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0120] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0121] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), the Internet, and blockchain networks.
[0122] Computer systems can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. A server can be a cloud server, also known as a cloud computing server or cloud host, a hosting product within the cloud computing service ecosystem, addressing the shortcomings of traditional physical hosts and VPS (Virtual Private Server, or simply "VPS") services, such as high management difficulty and weak business scalability. Servers can also be servers for distributed systems or servers incorporating blockchain technology.
[0123] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0124] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A filter format determination method, characterized by, include: Create at least one filter and connect the output of at least one video input source to the input of the at least one filter; The first final input filter format of the at least one filter is determined based on the filter format output by the at least one video input source; Control the at least one filter to start filtering, and determine the filter to be negotiated among the at least one filters based on the operating status of the at least one filter; The process of determining the filter to be negotiated among the at least one filters based on the operating state of the at least one filter includes: The filter in the stopped filtering state is identified as the filter to be negotiated; wherein, the output filtering format of the video input source of the filter in the stopped filtering state is different from the first final input filtering format; the video input source corresponding to the filter to be negotiated is the video input source to be negotiated. The second final input filtering format of the filter to be negotiated is determined based on the video input source corresponding to the filter to be negotiated.
2. The method of claim 1, wherein, Determining the first final input filter format of the at least one filter based on the filter format output by the at least one video input source includes: Obtain a first output filter format list for the at least one video input source, wherein the first output filter format list includes output filter formats supported by the video input source; Obtain a first input filter format list for the at least one filter, wherein the first input filter format list includes input filter formats supported by the filter; Obtain the first filter format that is the same as the first output filter format list and the corresponding first input filter format list, and determine it as the first filter format. Then, determine the first final input filter format from the first filter format.
3. The method of claim 1, wherein, The step of determining the second final input filtering format of the filter to be negotiated based on the video input source corresponding to the filter to be negotiated includes: Obtain the second output filter format list of the video input source to be negotiated and the second input filter format list of the filter to be negotiated; Obtain the same filter format in the second output filter format list and the second input filter format list and determine it as the second filter format; determine the second final input filter format from the second filter format. The filter to be negotiated is restarted to filter according to the second final input filtering format.
4. A filter format determination apparatus characterized by comprising: include: A filter creation module is used to create at least one filter and connect the output of at least one video input source to the input of the at least one filter. The first format determination module is used to determine the first final input filtering format of the at least one filter based on the filtering format output by the at least one video input source; The judgment module is used to control the at least one filter to start filtering and to determine the filter to be negotiated among the at least one filters based on the operating status of the at least one filter. The process of determining the filter to be negotiated among the at least one filters based on the operating state of the at least one filter includes: The filter in the stopped filtering state is identified as the filter to be negotiated; wherein, the output filtering format of the video input source of the filter in the stopped filtering state is different from the first final input filtering format; the video input source corresponding to the filter to be negotiated is the video input source to be negotiated. The second format determination module is used to determine the second final input filtering format of the filter to be negotiated based on the video input source corresponding to the filter to be negotiated.
5. An electronic device, comprising: include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the filtering format determination method as described in any one of claims 1 to 3.
6. A computer-readable storage medium, wherein instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the filtering format determination method as described in any one of claims 1 to 3.
7. A computer program product comprising a computer program that, when executed by a processor, implements the filtering format determination method according to any one of claims 1 to 3.