Video frame processing method and electronic equipment
By estimating the cost of waiting for dependent frames and requesting key frames in real-time video communication, and combining delay and fluency factors to decide whether to request key frames, the delay and fluency problems caused by out-of-order video frames are solved and improved Video communications performance and user experience.
Patent Information
- Application Number
- CN202410431198.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-10
- Publication Date
- 2024-08-23
AI Technical Summary
In real-time video communication, video frame out-of-order or packet loss causes increased latency, and blindly proactively requesting key frames will affect the smoothness of video playback.
After the receiver receives a reference frame that cannot be decoded temporarily, it decides whether to actively request key frames by estimating the cost of waiting for the arrival of the dependent frame and the cost of requesting key frames, taking into account the impact of delay and fluency. The specific method includes calculating the time required to wait for the arrival of the dependent frame and the delay introduced by requesting the key frame, and introducing a penalty factor to express the impact on fluency. If the first cost is greater than the second cost, the key frame is requested, otherwise the reference frame is retained. Wait for dependent frames to arrive.
While effectively reducing latency, it also reduces the impact of blindly requesting key frames on the smoothness of video playback, improving the user experience of real-time video communication.
Smart Images

Figure CN118540513A
Abstract
Description
Technical Field
[0001] The present application relates to the field of real-time video communication technology, and in particular to a video frame processing method and an electronic device. Background Art
[0002] With the continuous development of mobile Internet, the popularity of real-time audio and video communication applications such as high-definition video conferencing, cloud games, and 3D interactive cloud rendering has increased unprecedentedly. For example, in the commodity information service system, 3D interactive cloud rendering technology is used to display high-quality 3D commodities and virtual characters, aiming to provide users with an immersive online shopping experience. Specifically, the user sends instructions to the cloud server through the client, and the server renders the pictures required by the instructions in real time and sends them to the client in the form of a video stream. Finally, the user sees the results of his operation through the client - a high-quality video stream. Such real-time audio and video communication applications usually have extremely stringent requirements for latency. For example, in the cloud gaming scenario, the MTP (Motion To Photons) latency should not exceed 100 to 150 ms, so the receiver needs to decode, render and play the received video frames as quickly as possible.
[0003] When the sender encodes the video frames in the real-time video stream, it usually includes two types of video frames, namely key frames and reference frames. The key frame contains all the information of a frame and can be decoded independently, while the reference frame only contains the residual information of a frame relative to other frames. It depends on the key frame or other reference frames when decoding and cannot be decoded independently. Usually, the sender will send out the encoded video frames in sequence. However, due to the disorder or packet loss during the network transmission process, the video frames sent in sequence by the sender may not arrive at the receiving end in sequence. At this time, the reference frame that arrives out of order must wait for the key frame or other reference frame it depends on to arrive before it can be decoded, rendered and played, which will increase the delay and even cause freezes. Summary of the invention
[0004] The present application provides a video frame processing method and an electronic device, which are beneficial for reducing delay while minimizing the impact on the smoothness of video playback caused by blindly and actively requesting key frames.
[0005] This application provides the following solutions:
[0006] A video frame processing method, comprising:
[0007] After the receiver receives a reference frame that cannot be decoded temporarily, the receiver estimates a first cost of waiting for the dependent frame to arrive and a second cost of initiating a key frame request; wherein the first cost includes a delay introduced by waiting for the dependent frame, and the second cost includes a delay introduced by requesting the key frame and a penalty factor, wherein the penalty factor is used to express the impact on video smoothness caused by skipping of the received reference frame due to requesting the key frame;
[0008] The first cost is compared with the second cost. If the first cost is greater than the second cost, a key frame request is initiated; otherwise, the reference frame is retained in the cache and the dependent frame is continued to be waited for to arrive.
[0009] The first cost specifically includes: a first duration required to wait for the arrival of the dependent frame, and a second duration required to decode and render the dependent frame and the at least one reference frame after the arrival of the dependent frame makes the at least one reference frame decodable.
[0010] When estimating the first duration, assuming that the sender retransmits the dependent frame in the next frame, the first duration is expressed by a period of network round-trip delay.
[0011] When estimating the second duration, the number Q of reference frames in the cache that are temporarily undecodable is determined, and assuming that the Q reference frames directly or indirectly depend on the same dependent frame, the second duration is T*(Q+1), where T is the average duration required for the receiver to decode and render the video frames.
[0012] The delay introduced by requesting the key frame in the second cost includes: the estimated transmission time of the key frame and the time required for decoding and rendering the key frame.
[0013] When estimating the transmission duration of the key frame, the network bandwidth of the receiving party is estimated, and the maximum data volume of the key frame in the real-time video communication is estimated based on the data volume of the video frame received from the start of the session corresponding to the real-time video communication to the current moment;
[0014] The time required to send the key frame through the network is estimated based on the estimated network bandwidth information and the maximum data volume of the key frame. The key frame transmission time is estimated based on the time and a network round-trip delay of one cycle.
[0015] The penalty factor is determined according to the number Q of reference frames in the cache that are temporarily undecodable and a preset control coefficient, and the control system is a positive number.
[0016] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of any of the methods described above.
[0017] An electronic device, comprising:
[0018] one or more processors; and
[0019] A memory associated with the one or more processors, the memory being used to store program instructions, wherein the program instructions, when read and executed by the one or more processors, execute the steps of any of the aforementioned methods.
[0020] A computer program product comprises a computer program / computer executable instructions, wherein the computer program / computer executable instructions are executed by a processor in an electronic device to implement the steps of any of the aforementioned methods.
[0021] According to the specific embodiments provided in this application, this application discloses the following technical effects:
[0022] Through the solution provided by the embodiment of the present application, after the receiver of the video communication receives a reference frame that cannot be decoded temporarily, it does not blindly request a key frame from the sender, but first estimates the first cost of waiting for the arrival of the dependent frame and the second cost of initiating the key frame request. Among them, when estimating the first cost of continuing to wait for the dependent frame, the delay introduced by waiting for the dependent frame can be mainly considered; when estimating the second cost of actively requesting the key frame, in addition to considering the delay introduced by requesting the key frame, a penalty factor is also introduced. The penalty factor can be used to express the impact on the smoothness of the video caused by the skipping of the received reference frame due to the request for the key frame. In other words, in the process of performing the two cost estimates, both the delay and the impact on the smoothness are taken into account. Therefore, in this way, it is beneficial to reduce the delay while minimizing the impact on the smoothness of the video playback caused by blindly and actively requesting key frames.
[0023] Of course, any product implementing the present application does not necessarily need to achieve all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0025] Figure 1 It is a schematic diagram of the system architecture provided by the embodiment of the present application;
[0026] Figure 2 is a flow chart of the method provided in the embodiment of the present application;
[0027] Figure 3 It is a schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0028] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0029] First of all, it should be noted that in order to avoid the situation where the receiver needs to wait for a long time for the arrival of the dependent frame when the video frame arrives out of order or the packet is lost, the receiver can choose to actively initiate a new key frame request to the sender after discovering that a reference frame cannot be decoded, so that the sender can immediately send the next video frame as a key frame. In other words, the sender may originally plan to encode the next video frame as a reference frame, but after receiving the key frame request sent by the receiver, it will encode the next frame as a key frame. The receiver will immediately decode, render and play after receiving the new key frame, thereby reducing the delay. However, since the key frame usually has a larger amount of data, it takes more transmission time than the reference frame. In addition, after the receiver actively requests the key frame, it will discard the previously cached reference frame that cannot be decoded, and instead directly start decoding and rendering from the newly received key frame. In other words, blindly actively requesting key frames will increase the delay and affect the smoothness of video playback. For example, assuming that N reference frames are lost after actively requesting key frames, it means that N frames will be skipped in the picture actually viewed by the user, such as jumping directly from the i-th frame to the i+N-th frame, and the i+1-th, i+2-th frames in the middle are all skipped, which will obviously affect the smoothness of video playback. Therefore, the strategy of actively requesting key frames is a key factor affecting the latency and smoothness of real-time audio and video communications. However, the method in the prior art is to actively request key frames to resume video playback after the receiver determines that decoding is impossible (usually after a freeze occurs), which increases latency and impairs smoothness.
[0030] In view of the above situation, the embodiment of the present application provides a new method for actively requesting key frames, comprehensively considering the corresponding costs of requesting key frames and waiting for the arrival of dependent frames, and by comparing the two costs, determining whether it is necessary to actively request key frames. If the cost of requesting key frames is smaller than the cost of waiting, the key frames can be directly requested actively; on the contrary, if the cost of requesting key frames is relatively large, the request can be temporarily not made, but the reference frame can be put into the cache and the arrival of the dependent frame can be continued. Among them, when estimating the cost of continuing to wait for the dependent frame, the delay introduced by waiting for the dependent frame can be mainly considered; when estimating the cost of actively requesting key frames, in addition to considering the delay introduced by requesting key frames, a penalty factor can also be introduced, which can be used to express the impact of the received reference frame being skipped due to the request for key frames on the smoothness of the video. That is to say, in the process of performing the two cost estimates, the two factors of delay and the impact on smoothness are taken into account. Therefore, in this way, it is beneficial to reduce the delay while minimizing the impact on the smoothness of video playback caused by blindly actively requesting key frames.
[0031] From the perspective of system architecture, see Figure 1 , the embodiment of the present application can be applied in scenarios such as high-definition video conferencing, cloud gaming, and 3D interactive cloud rendering. Specifically, it can involve the sender and receiver of real-time video communication, wherein the sender can be a server (of course, in the case of supporting end-to-end real-time video communication, the sender may also be a user terminal, for example, a high-definition video conferencing scenario, etc.), and the receiver is usually a user terminal. Among them, the sender can encode the real-time video stream and transmit it to the receiver. In the embodiment of the present application, the video frame processing of the receiver can be improved. Specifically, when the receiver receives a reference frame and finds that the reference frame cannot be decoded temporarily when decoding through the decoding component, the cost calculation component can be triggered to start the estimated calculation process of two cost values, which can specifically include estimating the cost of directly actively requesting a key frame (mainly the cost of the impact on fluency), and the cost of continuing to wait for the dependent frame (mainly the cost of delay). Afterwards, by comparing the two costs, it is decided whether to directly actively request a key frame or continue to wait for the dependent frame.
[0032] The specific implementation scheme provided in the embodiments of the present application is described in detail below.
[0033] First, the embodiment of the present application provides a video frame processing method from the perspective of the receiver in a real-time video communication session, see Figure 2 , the method may include:
[0034] S201: After the receiving party receives a reference frame that cannot be decoded temporarily, the first cost of waiting for the dependent frame to arrive and the second cost of initiating a key frame request are estimated; wherein the first cost includes the delay introduced by waiting for the dependent frame, and the second cost includes a penalty factor, and the penalty factor is used to express the impact on the video smoothness caused by the received reference frame being skipped due to requesting the key frame.
[0035] Among them, the specific recipient may be the recipient of the video communication. In the embodiment of the present application, the video communication may specifically refer to real-time video communication (of course, in non-real-time video communication, the solution provided in the embodiment of the present application may also be considered to be implemented). Real-time video communication is real-time video communication involved in scenarios such as high-definition video conferencing, cloud gaming, and 3D interactive cloud rendering. In these scenarios, the requirements for latency and playback smoothness are relatively high. For example, in a high-definition video conferencing scenario, after a participant speaks, other participants may need to respond. In this process, if there is a delay, it may take some time for the last speaker to finish speaking before the speeches of other speakers are received, which will seriously affect the user experience; if the delay is reduced by actively requesting key frames, the playback may not be smooth enough due to the loss of some video frames, and so on.
[0036] In the embodiment of the present application, a solution is provided for the above problem. Specifically, when the receiver is receiving a video frame, if a reference frame that cannot be decoded temporarily is found, it can trigger the estimation of two specific costs. Specifically, the two costs can refer to the first cost caused by waiting for the arrival of the dependent frame and the second cost caused by initiating a key frame request.
[0037] For the former, that is, if you choose to wait for the dependent frame to arrive, the cost brought about by this waiting process is mainly the negative impact that may cause a relatively large delay. Therefore, the first cost can mainly include the delay cost introduced by waiting for the dependent frame.
[0038] Specifically, the first cost can be evaluated in a variety of ways. For example, in one way, it can include: the first duration required to wait for the arrival of the dependent frame, and the second duration required to decode and render the dependent frame and the at least one reference frame after the arrival of the dependent frame makes at least one reference frame decodable. In other words, since the current reference frame has just been received, if you want to wait for the reference frame to be decoded, you need to wait until the dependent frame arrives at the receiver, and then decode, render, and process the newly received dependent frame together with other reference frames that depend on the frame. These processes will introduce delays, so the first cost caused by waiting for the dependent frame can be reflected accordingly.
[0039] Specifically, when estimating the first duration required to wait for the dependent frame to arrive, there may be multiple ways. For example, in one way, when estimating the first duration, it may be assumed that the sender will retransmit the dependent frame in the next frame. Since the sender needs at least one cycle of RTT (Round-Trip Time) to retransmit the dependent frame, the time waiting for the dependent frame to arrive can be expressed by RTT, that is, the first duration can be expressed by one cycle of network round trip delay. Of course, there may be other ways to estimate the first duration. For example, the data volume of the dependent frame and the network bandwidth of the receiver may be estimated. The data volume divided by the network bandwidth may obtain the time required for the dependent frame to be sent to the network. In this way, this duration may be added to the above RTT as the estimated first duration, and so on. Of course, in actual applications, the possibility that the dependent frame belongs to the reference frame is higher, and the data volume of the reference frame itself is relatively small. Therefore, the former method can be preferably used, that is, the time it takes for the dependent frame to be sent to the network can be ignored, and the above-mentioned first duration can be expressed only by the network round-trip delay RTT.
[0040] Specifically, when evaluating the aforementioned second duration required for decoding and rendering after receiving the dependent key frame in the case of waiting for the dependent frame, there may be multiple ways. In one implementation, since in the embodiment of the present application, after receiving a reference frame that cannot be decoded temporarily, it may be retained in the cache waiting for the arrival of the dependent frame, therefore, when a reference frame that cannot be decoded temporarily is received at a certain moment, there may be multiple reference frames that cannot be decoded temporarily in the cache. And these reference frames may directly or indirectly depend on the same dependent frame, therefore, when the dependent frame arrives at the receiving party, it may involve decoding and rendering the dependent frame and multiple reference frames in the cache. In order to facilitate the estimated calculation, specifically when estimating the above second duration, first determine the number of reference frames Q in the cache that are temporarily undecodable, and also assume that the Q reference frames directly or indirectly depend on the same dependent frame, so that the second duration can be estimated by the following formula: T*(Q+1), where T is the average duration required for the receiving party to decode and render the video frame. The "Q+1" in the formula refers to the Q reference frames currently in the cache that cannot be decoded temporarily, and the dependent frames on which these reference frames depend.
[0041] Based on the above, in a specific implementation, the first cost of waiting for the arrival of the dependent frame can be expressed as:
[0042] U wait =RTT+T*(Q+1)
[0043] Regarding the second cost mentioned above, since the data volume of key frames is usually relatively large, their transmission, decoding and rendering processes may cause delays. Therefore, in addition to the cost of the impact on video smoothness caused by the skipping of received reference frames due to requesting key frames, the second cost may also include: the estimated key frame transmission time and the time required to decode and render the key frames.
[0044] Specifically, when estimating the transmission duration of the key frame, the network bandwidth C of the receiving party may be estimated first (this value may change dynamically, and the specific method of estimating the network bandwidth is not the focus of the embodiment of the present application and will not be described in detail here), and the maximum data volume L of the key frame in the current real-time video communication may be estimated. max Then, based on the estimated network bandwidth information C and the maximum value of the key frame data volume L max , estimates the time required to send the key frame through the network, for example, it can be expressed as L max Then, based on this duration and the RTT (network round-trip time) of a cycle, the key frame transmission duration can be estimated. For example, it can be specifically expressed as RTT+L max / C, etc.
[0045] Among them, L max There may be multiple estimation methods, in which one method may be to estimate the maximum data volume L of the key frame in the real-time video communication according to the data volume of the video frame received from the start of the session corresponding to the real-time video communication to the current moment. max Specifically, L max =max(ψ*L max ,L i ). Among them, L i is the size of the currently received i-th frame, and the value of ψ can be 0.9999. That is, assuming that starting from the first frame of the current real-time video communication, the above formula is continuously used to estimate L max For example:
[0046] In the initial state, L max = 0, then when the first frame is received, the L max =L1;
[0047] When the second frame is received, the following formula can be used for judgment: L max =max(ψ*L1,L2), at this time, assuming ψ*L1>L2, then L max =ψ*L1;
[0048] When the third frame is received, the above formula can be used to make judgments: L max=max(ψ*(ψ*L1),L3), and so on.
[0049] That is to say, every time a video frame is received, L can be calculated by the above formula. max After requesting a key frame, the sender sends a key frame, and its data volume is usually relatively large. Therefore, the estimated maximum value of the video frame can be used to represent the data volume of the key frame that the sender will send next frame.
[0050] In addition, since after a key frame request is made and a new key frame is received, the key frame needs to be decoded, so the second cost also involves the time required for decoding and rendering the key frame. Specifically, the time required for decoding and rendering the key frame can be represented by the average video frame decoding and rendering time of the receiver (assuming it is T).
[0051] Therefore, assuming that the key frame is requested from the sender immediately, the specific impact of the second cost on latency can be expressed as: RTT+L max / C+T.
[0052] In addition, as mentioned above, if the key frame is requested from the sender immediately, in addition to the impact on latency, it may also affect the smoothness of playback. Therefore, in an embodiment of the present application, a penalty factor can be introduced when estimating the above-mentioned second cost. The penalty factor can be used to express the impact on video smoothness caused by the skipping of the received reference frame due to the request for the key frame.
[0053] Specifically, there may be multiple ways to express the penalty factor. For example, in one way, it can be expressed as λ*Q. Q refers to the number of reference frames currently cached in a temporarily undecodable state as mentioned above, and λ can be a control coefficient, and its value range can be a positive number. That is, since the number of reference frames currently cached in a temporarily undecodable state is Q, it means that if the key frame is requested immediately, these Q reference frames will be discarded and skipped during playback, affecting the fluency. Obviously, the larger the value of Q, the greater the impact on the fluency. Therefore, the above method can be used as a penalty factor for expressing the impact on the fluency. In the specific implementation, the value of the control coefficient can be a pre-set empirical value, or it can be dynamically adjusted according to the actual application situation. For example, based on experience, the value of λ can be 5, and so on.
[0054] Thus, for the second cost, under a specific estimation method, the complete formula can be:
[0055] U req =RTT+L max / C+T+λ*Q
[0056] It should be noted that the above description introduces the estimation method of the first cost and the second cost. In the estimation process, since it is an estimation of future events, some assumptions are made, and the above formula is derived on this basis. Of course, in practical applications, other assumptions can also be made and corresponding estimation formulas can be derived, which are not limited here.
[0057] S202: Compare the first cost with the second cost. If the first cost is greater than the second cost, initiate a key frame request. Otherwise, put the reference frame into the cache and continue to wait for the dependent frame to arrive.
[0058] After estimating the first cost and the second cost, the two can be compared, and then according to the size of the two, it is determined whether to directly initiate a key frame request or to keep the reference frame in the cache and continue to wait for the arrival of the dependent frame. Specifically, if the first cost is greater than the second cost, the key frame request can be directly initiated, otherwise, the reference frame can be kept in the cache and continue to wait for the arrival of the dependent frame.
[0059] Through the solution provided by the embodiment of the present application, after the receiver of the video communication receives a reference frame that cannot be decoded temporarily, it does not blindly request a key frame from the sender, but first estimates the first cost of waiting for the arrival of the dependent frame and the second cost of initiating the key frame request. Among them, when estimating the first cost of continuing to wait for the dependent frame, the delay introduced by waiting for the dependent frame can be mainly considered; when estimating the second cost of actively requesting the key frame, in addition to considering the delay introduced by requesting the key frame, a penalty factor is also introduced. The penalty factor can be used to express the impact on the smoothness of the video caused by the skipping of the received reference frame due to the request for the key frame. In other words, in the process of performing the two cost estimates, both the delay and the impact on the smoothness are taken into account. Therefore, in this way, it is beneficial to reduce the delay while minimizing the impact on the smoothness of the video playback caused by blindly and actively requesting key frames.
[0060] It should be noted that the embodiments of the present application may involve the use of user data. In actual applications, user-specific personal data can be used in the scheme described herein within the scope permitted by applicable laws and regulations, subject to the requirements of applicable laws and regulations of the country where the user is located (for example, with the user's explicit consent, effective notification to the user, etc.).
[0061] Corresponding to the foregoing method embodiment, the embodiment of the present application further provides a video frame processing device, which may include:
[0062] A cost estimation unit, configured to estimate, after the receiving party receives a reference frame that cannot be decoded temporarily, a first cost caused by waiting for the arrival of a dependent frame and a second cost caused by initiating a key frame request; wherein the first cost includes a delay introduced by waiting for the dependent frame, and the second cost includes a delay introduced by requesting the key frame and a penalty factor, wherein the penalty factor is used to express the impact on video fluency caused by skipping of a received reference frame due to requesting the key frame;
[0063] The decision unit is used to compare the first cost with the second cost, and if the first cost is greater than the second cost, a key frame request is initiated; otherwise, the reference frame is retained in the cache and the dependent frame continues to be waited for to arrive.
[0064] The first cost specifically includes: a first duration required to wait for the arrival of the dependent frame, and a second duration required to decode and render the dependent frame and the at least one reference frame after the arrival of the dependent frame makes the at least one reference frame decodable.
[0065] When estimating the first duration, assuming that the sender retransmits the dependent frame in the next frame, the first duration is expressed by a period of network round-trip delay.
[0066] When estimating the second duration, the number Q of reference frames in the cache that are temporarily undecodable can be determined, and assuming that the Q reference frames directly or indirectly depend on the same dependent frame, the second duration is T*(Q+1), where T is the average duration required for the receiver to decode and render the video frames.
[0067] In a specific implementation, the delay introduced by requesting the key frame in the second cost includes: the estimated key frame transmission time and the time required for decoding and rendering the key frame.
[0068] When estimating the transmission duration of the key frame, the network bandwidth of the receiving party is estimated, and the maximum data volume of the key frame in the real-time video communication is estimated based on the data volume of the video frame received from the start of the session corresponding to the real-time video communication to the current moment;
[0069] The time required to send the key frame through the network is estimated based on the estimated network bandwidth information and the maximum data volume of the key frame. The key frame transmission time is estimated based on the time and a network round-trip delay of one cycle.
[0070] Specifically, the penalty factor is determined according to the number Q of reference frames in the cache that are temporarily undecodable and a preset control coefficient, and the control system is a positive number.
[0071] In addition, an embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the steps of any one of the methods in the aforementioned method embodiments are implemented.
[0072] And an electronic device, comprising:
[0073] one or more processors; and
[0074] A memory associated with the one or more processors, the memory being used to store program instructions, wherein the program instructions, when read and executed by the one or more processors, execute the steps of the method described in any one of the aforementioned method embodiments.
[0075] A computer program product includes a computer program / computer executable instructions, which, when executed by a processor in an electronic device, implement the steps of the method described in the aforementioned method embodiment.
[0076] in, Figure 3 The architecture of an electronic device is exemplarily shown. For example, device 300 can be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, an aircraft, etc.
[0077] Reference Figure 3 , device 300 may include one or more of the following components: a processing component 302 , a memory 304 , a power component 306 , a multimedia component 308 , an audio component 310 , an input / output (I / O) interface 312 , a sensor component 314 , and a communication component 316 .
[0078] The processing component 302 generally controls the overall operation of the device 300, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 302 may include one or more processors 320 to execute instructions to complete all or part of the steps of the method provided by the technical solution of the present disclosure. In addition, the processing component 302 may include one or more modules to facilitate the interaction between the processing component 302 and other components. For example, the processing component 302 may include a multimedia module to facilitate the interaction between the multimedia component 308 and the processing component 302.
[0079] The memory 304 is configured to store various types of data to support operations on the device 300. Examples of such data include instructions for any application or method operating on the device 300, contact data, phone book data, messages, pictures, videos, etc. The memory 304 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0080] The power supply component 306 provides power to the various components of the device 300. The power supply component 306 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 300.
[0081] The multimedia component 308 includes a screen that provides an output interface between the device 300 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 308 includes a front camera and / or a rear camera. When the device 300 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0082] The audio component 310 is configured to output and / or input audio signals. For example, the audio component 310 includes a microphone (MIC), and when the device 300 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 304 or sent via the communication component 316. In some embodiments, the audio component 310 also includes a speaker for outputting audio signals.
[0083] I / O interface 312 provides an interface between processing component 302 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0084] The sensor assembly 314 includes one or more sensors for providing various aspects of status assessment for the device 300. For example, the sensor assembly 314 can detect the open / closed state of the device 300, the relative positioning of components, such as the display and keypad of the device 300, and the sensor assembly 314 can also detect the position change of the device 300 or a component of the device 300, the presence or absence of user contact with the device 300, the orientation or acceleration / deceleration of the device 300, and the temperature change of the device 300. The sensor assembly 314 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 314 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 314 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0085] The communication component 316 is configured to facilitate wired or wireless communication between the device 300 and other devices. The device 300 can access a wireless network based on a communication standard, such as WiFi, or a mobile communication network such as 2G, 3G, 4G / LTE, 5G, etc. In an exemplary embodiment, the communication component 316 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 316 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0086] In an exemplary embodiment, the device 300 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0087] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 304 including instructions, and the above instructions can be executed by a processor 320 of the device 300 to complete the method provided by the technical solution of the present disclosure. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0088] It can be known from the description of the above implementation methods that those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present application can be essentially or partly contributed to the prior art in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present application or certain parts of the embodiments.
[0089] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without creative work.
[0090] The video frame processing method and electronic device provided by the present application are introduced in detail above. The principle and implementation method of the present application are described in detail using specific examples. The description of the above embodiments is only used to help understand the method and core idea of the present application. At the same time, for those skilled in the art, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as limiting the present application.
Claims
1. A video frame processing method, characterized in that: include: After the receiver receives a reference frame that cannot be decoded temporarily, the receiver estimates a first cost of waiting for the dependent frame to arrive and a second cost of initiating a key frame request; wherein the first cost includes a delay introduced by waiting for the dependent frame, and the second cost includes a delay introduced by requesting the key frame and a penalty factor, wherein the penalty factor is used to express the impact on video smoothness caused by skipping of the received reference frame due to requesting the key frame; The first cost is compared with the second cost. If the first cost is greater than the second cost, a key frame request is initiated; otherwise, the reference frame is retained in the cache and the dependent frame is continued to be waited for to arrive.
2. The method according to claim 1, characterized in that The first cost specifically includes: a first duration required to wait for the arrival of the dependent frame, and a second duration required to decode and render the dependent frame and the at least one reference frame after the arrival of the dependent frame makes the at least one reference frame decodable.
3. The method according to claim 2, characterized in that When estimating the first duration, assuming that the sender retransmits the dependent frame in the next frame, the first duration is expressed by a period of network round-trip delay.
4. The method according to claim 2, characterized in that: When estimating the second duration, the number Q of reference frames in the cache that are temporarily undecodable is determined, and assuming that the Q reference frames directly or indirectly depend on the same dependent frame, the second duration is T*(Q+1), where T is the average duration required for the receiver to decode and render the video frames.
5. The method according to claim 1, characterized in that The delay introduced by requesting the key frame in the second cost includes: the estimated key frame transmission time and the time required for decoding and rendering the key frame.
6. The method according to claim 5, characterized in that When estimating the transmission duration of the key frame, estimating the network bandwidth of the receiving party, and estimating the maximum data volume of the key frame in the real-time video communication according to the data volume of the video frame received from the start of the session corresponding to the real-time video communication to the current moment; The time required to send the key frame through the network is estimated based on the estimated network bandwidth information and the maximum data volume of the key frame. The key frame transmission time is estimated based on the time and a network round-trip delay of one cycle.
7. The method according to claim 1, characterized in that The penalty factor is determined according to the number Q of reference frames in the cache that are temporarily undecodable and a preset control coefficient, and the control system is a positive number.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method described in any one of claims 1 to 7 are implemented.
9. An electronic device, characterized in that: include: one or more processors; as well as A memory associated with the one or more processors, the memory being used to store program instructions, wherein when the program instructions are read and executed by the one or more processors, the steps of the method according to any one of claims 1 to 7 are executed.
10. A computer program product comprising a computer program / computer executable instructions, characterized in that: When the computer program / computer executable instructions are executed by a processor in an electronic device, the steps of the method according to any one of claims 1 to 7 are implemented.
