CN117135353A - Dynamic adjustment method, device, equipment and storage medium for coding frame rate - Google Patents

Dynamic adjustment method, device, equipment and storage medium for coding frame rate Download PDF

Info

Publication number
CN117135353A
CN117135353A CN202210555276.0A CN202210555276A CN117135353A CN 117135353 A CN117135353 A CN 117135353A CN 202210555276 A CN202210555276 A CN 202210555276A CN 117135353 A CN117135353 A CN 117135353A
Authority
CN
China
Prior art keywords
frame rate
noise ratio
peak signal
determining
coding frame
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210555276.0A
Other languages
Chinese (zh)
Inventor
刘家翔
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Maile Information Technology Co ltd
Original Assignee
Guangzhou Maile Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Maile Information Technology Co ltd filed Critical Guangzhou Maile Information Technology Co ltd
Priority to CN202210555276.0A priority Critical patent/CN117135353A/en
Publication of CN117135353A publication Critical patent/CN117135353A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/146Data rate or code amount at the encoder output
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/136Incoming video signal characteristics or properties

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The invention discloses a dynamic adjustment method, a device, equipment and a storage medium for coding frame rate. The method comprises the following steps: responding to the code triggering instruction, and determining the average peak signal-to-noise ratio at the current moment; determining the coding frame rate adjustment quantity at the next moment according to the average peak signal-to-noise ratio at the current moment, the target peak signal-to-noise ratio and a preset proportional differential algorithm; and determining the coding frame rate of the next moment according to the coding frame rate adjustment quantity of the next moment so as to enable the difference value between the average peak signal-to-noise ratio of the next moment and the target peak signal-to-noise ratio to be within a preset threshold. The embodiment solves the technical problem of poor user watching experience caused by unsmooth conversion of the coding frame rate in the prior art or reduced picture quality caused by instantaneous reduction of the coding frame rate in a picture with sudden and severe changes, realizes dynamic adjustment of the coding frame rate according to the average PSNR and the target PSNR at the current moment, achieves optimal picture quality, and improves the user watching experience.

Description

Dynamic adjustment method, device, equipment and storage medium for coding frame rate
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a method, a device, equipment and a storage medium for dynamically adjusting a coding frame rate.
Background
Because different eyes have different perceptions of fluency, eyes with frame rate more than 24hz hardly feel difference, most people with frame rate more than 15hz cannot feel blocking, traditional video conference software uses coding frame rates of different gear to solve the coding quality problem under the condition of low code rate, for example, 720p30hz coding is used when the bandwidth is less than 2M, 720p15hz coding is used when the bandwidth is less than 1M, and the mode has two major defects: firstly, the coded frame rate conversion is not smooth, and can be perceived by partial users, so that the user experience is poor; secondly, when dealing with the sudden scene with the severe change of the pictures, the coding frame rate is instantaneously reduced, or the gear direct adjustment of the coding frame rate can lead to the instantaneous quality reduction of the pictures, thereby influencing the watching experience of users.
Disclosure of Invention
The invention provides a dynamic adjustment method, a device, equipment and a storage medium for coding frame rate, which are used for solving the technical problems of poor user watching experience caused by unsmooth coding frame rate conversion or reduced picture quality caused by instantaneous reduction of coding frame rate in a picture with sudden and severe change in the prior art, realizing dynamic adjustment of coding frame rate to achieve optimal picture quality and improving user watching experience.
According to an aspect of the present invention, there is provided a dynamic adjustment method of a coding frame rate, including:
responding to the code triggering instruction, and determining the average peak signal-to-noise ratio at the current moment;
determining the coding frame rate adjustment quantity at the next moment according to the average peak signal-to-noise ratio at the current moment, the target peak signal-to-noise ratio and a preset proportional differential algorithm;
and determining the coding frame rate of the next moment according to the coding frame rate adjustment quantity of the next moment so as to enable the difference value between the average peak signal-to-noise ratio of the next moment and the target peak signal-to-noise ratio to be within a preset threshold value.
According to another aspect of the present invention, there is provided a dynamic adjustment apparatus for coding frame rate, including:
the first determining module is used for responding to the code triggering instruction and determining the average peak signal-to-noise ratio PSNR at the current moment;
the second determining module is used for determining the coding frame rate adjustment quantity at the next moment according to the average peak signal-to-noise ratio at the current moment, the target peak signal-to-noise ratio and a preset proportional differential algorithm;
and the third determining module is used for determining the coding frame rate of the next moment according to the coding frame rate adjustment quantity of the next moment so as to enable the difference value between the average peak value signal-to-noise ratio of the next moment and the target peak value signal-to-noise ratio to be within a preset threshold value.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the method for dynamically adjusting the encoded frame rate according to any one of the embodiments of the present invention.
According to another aspect of the present invention, there is provided a computer readable storage medium storing computer instructions for causing a processor to implement the method for dynamically adjusting a coding frame rate according to any embodiment of the present invention when executed.
According to the technical scheme provided by the embodiment of the invention, the average peak signal-to-noise ratio of the current coded image at the current moment is determined, and the coding frame rate at the next moment is dynamically adjusted according to the comparison result between the average peak signal-to-noise ratio and the target peak signal-to-noise ratio and a preset proportional-differential algorithm, so that the difference value between the average peak signal-to-noise ratio at the next moment and the target peak signal-to-noise ratio is within a preset threshold, the technical problem that in the prior art, the user watching experience is poor due to unsmooth coding frame rate conversion or the picture quality is reduced due to instantaneous reduction of the coding frame rate in a picture with sudden and severe change is solved, and the coding frame rate is dynamically adjusted according to the average PSNR at the current moment and the target PSNR, so that the optimal picture quality is achieved, and the watching experience of the user is improved.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a method for dynamically adjusting a coding frame rate according to an embodiment of the present invention;
FIG. 2 is a flowchart of another method for dynamically adjusting a coding frame rate according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a dynamic adjustment device for coding frame rate according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
Fig. 1 is a flowchart of a method for dynamically adjusting a coding frame rate according to an embodiment of the present invention, where the method may be performed by a device for dynamically adjusting a coding frame rate of a video, the device for dynamically adjusting a coding frame rate may be implemented in hardware and/or software, and the device for dynamically adjusting a coding frame rate may be configured in an electronic device. By way of example, the electronic device may be a personal computer (Personal Computer, PC), a smart phone, an iPad, or the like, which may be a video processing enabled terminal. As shown in fig. 1, the method includes: S110-S130.
S110, in response to the code triggering instruction, determining an average peak signal-to-noise ratio (Peak Signal to Noise Ratio, PSNR) at the current moment.
The coding trigger instruction refers to an instruction for triggering the coder to start and code the image. In an embodiment, after the video conference connection of at least two parties is artificially established and the video conference is started, the encoder is automatically started, so that the encoder encodes the current encoded image according to the encoding frame rate of the preset configuration. Of course, during the encoding process, the encoder can directly calculate the objective loss degree of the current encoded image and use the PSNR representation. Wherein, the value range of PSNR is 0-60db. It should be noted that, because of the different experiences of different users, when different PSNR values are adopted, the video quality with respect to the video presented to the users is also different. Generally, at a PSNR value of 40db, the corresponding video quality is relatively good.
Wherein, the average PSNR refers to an average value of the objective loss degree of the current encoded image in a period of time. For example, assuming that the time for adjusting the encoding frame rate is 1s, the average PSNR encoded in a period of 1 second is determined and the average PSNR is taken as the minimum calculation unit.
It should be noted that, when the coding rate is fixed, the higher the coding frame rate, the lower the coding rate allocated to each frame, the lower the corresponding coding quality, i.e., the lower the average PSNR, and the lower the picture quality of the video; conversely, when the coding rate is fixed, the lower the coding frame rate, the higher the corresponding coding rate allocated to each frame, the higher the corresponding coding command, i.e., the higher the average PSNR, and the higher the picture quality of the video.
S120, determining the coding frame rate adjustment quantity at the next moment according to the average peak signal-to-noise ratio at the current moment, the target peak signal-to-noise ratio and a preset proportional differential algorithm.
Where the target peak signal-to-noise ratio refers to the PSNR that is required after the encoder encodes the video image. It can be understood that the target PSNR is a PSNR that can ensure that the encoding quality can be relatively optimized after the image is encoded. In an embodiment, the preset proportional-differential algorithm refers to an algorithm for achieving approximation and maintenance of the average PSNR to the target PSNR. Wherein the encoded frame rate adjustment amount refers to a difference between the encoded frame rate at the next time and the encoded frame rate at the current time. It can be understood that, in the case where the encoded frame rate adjustment amount is a positive number, the encoded frame rate at the next time is smaller than the encoded frame rate at the current time; when the encoding frame rate adjustment amount is negative, the encoding frame rate at the next time is larger than the encoding frame rate at the current time.
In the embodiment, firstly, a PSNR difference value between the average PSNR at the current moment and the target PSNR is determined, the coding frame rate adjustment amount at the next moment is determined according to the PSNR difference value and a preset proportional differential algorithm, the coding frame rate at the next moment is dynamically adjusted according to the coding frame rate adjustment rate at the next moment, so that the coding frame rate is smoothly changed in a certain coding frame rate interval, and the average PSNR at the next moment is determined according to the coding frame rate at the next moment, so that the average PSNR at the next moment approaches to the preconfigured target PSNR, the average PSNR at each moment is enabled to be loitered near the target PSNR, the influence of the picture content of a video and the continuously changed bandwidth on the picture quality is adapted through the dynamic adjustment of the coding frame rate, and the viewing experience of a user on a picture is further improved.
S130, determining the coding frame rate of the next moment according to the coding frame rate adjustment quantity of the next moment so that the difference value between the average peak signal-to-noise ratio of the next moment and the target peak signal-to-noise ratio is within a preset threshold.
The preset threshold value refers to a preset peak signal-to-noise ratio difference value threshold value. It will be appreciated that in order to ensure the picture quality of the video, the average peak snr at each moment in the video process is as close as possible to the target peak snr, i.e. the difference between the average peak snr and the target peak snr is as small as possible. In the actual operation process, in order to make the preset threshold more approximate to the actual situation, the preset threshold may be configured according to actual multiple experience values, which is not limited.
In one embodiment, the encoded frame rate is within a predetermined encoded frame rate range. It can be understood that, when the coding frame rate is dynamically adjusted by the average PSNR at the previous time, it is also required to ensure that the coding frame rate is adjusted within a certain coding frame rate value range, so as to ensure the picture quality of the video. It should be noted that, when the coding frame rate reaches the upper limit value of the preset coding frame rate value range and the code rate is certain, the picture quality of the video is at the lowest value, if the difference between the average PSNR and the target PSNR is within the preset threshold value at this time, the picture quality of the video is at a higher level; if the average PSNR is smaller than the target PSNR, the average PSNR can be improved by reducing the coding frame rate, so as to achieve the effect of improving the video picture quality.
In an embodiment, after determining the encoding frame rate of the next time according to the average PSNR of the current time, the target PSNR, and the preset proportional-derivative algorithm, the average PSNR of the next time is determined according to the encoding frame rate of the next time so that the average PSNR of the next time approximates the target PSNR. The current time is set as the previous time relative to the next time, and the next time is set as the current time. For example, assuming that time 1, time 2, time 3 and time 4 are consecutive times, and that time 1 is an initial time of the video conference, taking time 2 as a current time, time 1 is a time previous to time 2, and time 3 is a time next to time 2, determining an average PSNR of time 2 according to an average PSNR of time 1, a target PSNR and a preset proportional-differential algorithm; then determining the coding frame rate of the moment 3 according to the average PSNR of the moment 2, the average PSNR of the moment 1 and the target PSNR and combining a preset proportional differential algorithm so as to enable the average PSNR of the moment 3 to approach the target PSNR; then taking the time 3 as the current time, the time 2 as the time previous to the time 3, the time 4 as the time next to the time 3, and determining the coding frame rate of the time 4 according to the average PSNR of the time 2, the average PSNR of the time 3 and the target PSNR, so that the average PSNR of the time 4 approaches the target PSNR, and the coding frame rate of the next time is dynamically adjusted through a preset proportional-differential algorithm in a sequential cycle, and the average PSNR of the next time fluctuates up and down at the target PSNR.
According to the technical scheme provided by the embodiment of the invention, the average PSNR of the current coded image at the current moment is determined, and the coding frame rate at the next moment is dynamically adjusted according to the comparison result between the average PSNR and the target PSNR and a preset proportional differential algorithm, so that the difference value between the average peak signal-to-noise ratio at the next moment and the target peak signal-to-noise ratio is within the preset threshold, the technical problem that in the prior art, the coding frame rate is not smooth, so that the user watching experience is poor, or the picture quality is reduced due to the fact that the coding frame rate is instantaneously reduced in a picture with abrupt and severe changes is solved, and the coding frame rate is dynamically adjusted according to the average PSNR at the current moment and the target PSNR, so that the optimal picture quality is achieved, and the watching experience of the user is improved.
In an embodiment, fig. 2 is a flowchart of another method for dynamically adjusting a coding frame rate according to an embodiment of the present invention, where the process of determining an average PSNR at a current time and the process of dynamically adjusting a coding frame rate at a next time are further refined based on the above embodiment. As shown in fig. 2, the method includes:
s210, responding to the coding triggering instruction, and determining the coding frame rate of the current moment according to the pre-acquired average PSNR of the last moment, the target PSNR and a preset proportional-derivative algorithm.
In an embodiment, a dynamic adjustment strategy of the coding frame rate is determined according to a comparison result between the average PSNR of the previous time and the target PSNR. In the embodiment, in the case where the average PSNR at the previous time is smaller than the target PSNR, it is necessary to reduce the encoding frame rate to improve the encoding quality; in the case where the average PSNR at the previous time is greater than the target PSNR, it is necessary to increase the encoding frame rate to ensure the smoothness of the video.
In one embodiment, S210 includes: S2101-S2102:
s2101, determining the coding frame rate adjustment quantity at the current moment according to the pre-acquired average PSNR at the last moment, the target PSNR and a preset proportional-derivative algorithm.
The coding frame rate adjustment amount refers to a value that needs to be adjusted for the coding frame rate at the previous time. In the embodiment, the coding frame rate of the current time can be obtained by subtracting the coding frame rate adjustment amount from the coding frame rate of the previous time. The frame rate adjustment amount may be positive or negative. When the code frame rate adjusting quantity is negative, adding the code frame rate at the last moment and the absolute value of the code frame rate adjusting quantity to obtain the code frame rate at the current moment.
In one embodiment, S2101 includes: determining a PSNR difference value between the average PSNR at the previous moment and the target PSNR as a first PSNR difference value; and determining the coding frame rate adjustment amount of the current moment according to the first PSNR difference value, the first coefficient and the second coefficient.
Wherein the first coefficient and the second coefficient are both preset constant values. In the embodiment, the first coefficient and the second coefficient may be the same value or different values, which is not limited and may be adjusted according to practical situations. It should be noted that, at the initial time when the encoder starts and performs encoding, since encoding is not performed, it may be assumed that the average PSNR and the encoding frame rate at the previous time are a preset constant value, and then the PSNR difference at the previous time may be determined according to the average PSNR and the target PSNR at the previous time, as the first PSNR difference, and the encoding frame rate adjustment amount at the current time may be calculated according to the first coefficient and the second coefficient.
S2102, determining the coding frame rate of the current moment according to the coding frame rate adjustment quantity of the current moment.
In the embodiment, the coding frame rate of the current time is obtained by subtracting the coding frame rate adjustment amount of the current time from the coding frame rate of the previous time.
S220, determining the average PSNR of the current moment according to the coding frame rate of the current moment.
In the embodiment, the determined relationship between the average PSNR and the encoded frame rate may be calculated according to an implementation of the prior art, which is not described herein.
S230, determining a PSNR difference value between the average PSNR at the current moment and the target PSNR as a second PSNR difference value.
In an embodiment, the average PSNR at the current time and the target PSNR are subjected to difference, and the absolute value of the obtained PSNR difference is used as the second PSNR difference.
S240, determining the coding frame rate adjustment amount of the next moment according to the second PSNR difference value, the first coefficient and the second coefficient.
In an embodiment, the method for determining the adjustment amount of the coding frame rate at the next time includes: determining a peak signal-to-noise ratio adjustment amount according to the second peak signal-to-noise ratio difference value and the first peak signal-to-noise ratio difference value; and determining the coding frame rate adjustment amount at the next moment according to the peak signal-to-noise ratio adjustment amount, the first coefficient, the second coefficient and the second peak signal-to-noise ratio difference value. In the embodiment, the second peak signal-to-noise ratio difference value and the first peak signal-to-noise ratio difference value are subjected to difference to obtain a corresponding peak signal-to-noise ratio adjustment quantity, and then the peak signal-to-noise ratio adjustment quantity is multiplied by a second coefficient to obtain a product value; multiplying the second peak signal-to-noise ratio difference value with the first coefficient to obtain another product value; and then adding the two product values to obtain the code frame rate adjustment quantity at the next moment.
In an embodiment, the relation between the encoded frame rate adjustment amount and the average PSNR and the target PSNR at the current time and the average PSNR and the target PSNR at the previous time may include:
Δdiff=K p *error(t)+K d *(error(t)-error(t-1));
wherein K is p Representing a first coefficient; k (K) d Representing a second coefficient; error (t) represents the difference between the average PSNR at the current time and the target PSNR; error (t-1) represents the difference between the average PSNR at the previous time and the target PSNR. In an embodiment, the difference between the first PSNR difference and the second PSNR difference is multiplied by a second coefficient, the first coefficient is multiplied by the first PSNR difference, and then the two product values are added to obtain the corresponding encoded frame rate adjustment amount.
S250, determining the coding frame rate of the next moment according to the coding frame rate adjustment quantity of the next moment so that the difference value between the average peak signal-to-noise ratio of the next moment and the target peak signal-to-noise ratio is within a preset threshold.
In the embodiment, the coding frame rate of the current moment and the coding frame rate adjustment of the next moment are subjected to difference, so that the coding frame rate of the next moment can be obtained. Then, according to the determined relation between the encoded frame rate and the average PSNR at the next time, the average PSNR at the next time is determined so that the average PSNR at the next time approximates to the preconfigured target PSNR.
According to the technical scheme of the embodiment, on the basis of the embodiment, the average PSNR of the last moment, the target PSNR and the average PSNR of the current moment are combined with a preset proportional differential algorithm to dynamically adjust the coding frame rate, so that the average PSNR of each moment is ensured to fluctuate up and down at the target PSNR, the coding quality of a coded image is further maintained at a higher level, and the coding frame rate is smoothly changed in a certain interval, so that the viewing experience of a user in a video conference process is improved.
In one embodiment, it is assumed that the target PSNR is 40db, the adjustment time of the encoded frame rate is 1s, and the average PSNR of the last second is 35db, the encoded frame rate is 30 frames/s, the first coefficient K p Is 0.5, a second coefficient K d At 0.5, the first PSNR difference error (t) is 40-35=5db, and the encoded frame rate adjustment Δdiff=k for this second p *error(t)+K d * (error (t) -error (t-1))=0.5×5+0.5×5 (5-0) =5, i.eThe code frame rate for this second is 30-5=25 frames/s.
At this time, since the encoded frame rate is reduced with respect to the last second, the corresponding average PSNR increases, and it is assumed that this second encodes an average psnr=38db.
At this time, error (t) =40-38=2, error (t) -error (t-1) =2-5= -3; the coding frame rate adjustment amount for the next second is 0.5×2+0.5× (-3) = -0.5, adjusted to 25- (-0.5) is rounded to 26 frames, and the coding frame rate for the next second is 26 frames/s. The PSNR starts to increase rapidly at this time due to the delay effect of the encoding.
The final state is that the actual PSNR at each moment fluctuates up and down at the target PSNR, the coding quality is maintained at a higher level, and the coding frame rate changes smoothly in a certain interval, namely, the dynamic adjustment of the coding frame rate is adopted to adapt to the influence of the picture content of the video and the continuously changing bandwidth on the picture quality, so that the viewing experience of a user on a viewing picture is improved.
Example two
Fig. 3 is a schematic structural diagram of a dynamic adjustment device for coding frame rate according to an embodiment of the present invention. As shown in fig. 3, the apparatus includes: the first determination module 310, the second determination module 320, and the third determination module 330.
Wherein, the first determining module 310 is configured to determine an average peak signal-to-noise ratio PSNR at the current time in response to the code trigger instruction;
a second determining module 320, configured to determine an adjustment amount of the encoded frame rate at the next time according to the average peak signal-to-noise ratio at the current time, the target peak signal-to-noise ratio and a preset proportional-derivative algorithm;
and a third determining module 330, configured to determine the coding frame rate at the next time according to the coding frame rate adjustment amount at the next time, so that the difference between the average peak signal-to-noise ratio at the next time and the target peak signal-to-noise ratio is within a preset threshold.
Optionally, the first determining module 310 includes:
a first determining unit, configured to determine a coding frame rate at a current time according to a pre-acquired average PSNR at a previous time, a target PSNR, and a preset proportional-derivative algorithm;
and the second determining unit is used for determining the average PSNR of the current moment according to the coding frame rate of the current moment.
Optionally, the first determining unit includes:
a first determining subunit, configured to determine an encoding frame rate adjustment amount at the current time according to a pre-acquired average PSNR at the previous time, a target PSNR, and a preset proportional-derivative algorithm;
and the second determining subunit is used for determining the coding frame rate of the current moment according to the coding frame rate adjustment quantity of the current moment.
Optionally, the first determining subunit is specifically configured to: determining a PSNR difference value between the average PSNR at the previous moment and the target PSNR as a first PSNR difference value; and determining the coding frame rate adjustment amount of the current moment according to the first PSNR difference value, the first coefficient and the second coefficient.
Optionally, the second determining module 320 includes:
a third determination unit configured to determine a PSNR difference between the average PSNR at the current time and the target PSNR as a second PSNR difference;
and a fourth determining unit for determining the encoding frame rate adjustment amount at the next time according to the second PSNR difference value, the first coefficient and the second coefficient.
Optionally, the determining method of the coding frame rate adjustment amount at the next moment includes:
determining a peak signal-to-noise ratio adjustment amount according to the second peak signal-to-noise ratio difference value and the first peak signal-to-noise ratio difference value;
and determining the coding frame rate adjustment quantity at the next moment according to the peak signal-to-noise ratio adjustment quantity, the first coefficient, the second coefficient and the second peak signal-to-noise ratio difference value.
In one embodiment, the encoded frame rate is within a predetermined encoded frame rate range.
The dynamic adjustment device for the coding frame rate provided by the embodiment of the invention can execute the dynamic adjustment method for the coding frame rate provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Example III
Fig. 4 shows a schematic diagram of the structure of an electronic device 10 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 4, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, in which the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various appropriate actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM 12 and the RAM 13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as dynamic adjustment of the encoded frame rate of any of the embodiments described above.
In some embodiments, the method of dynamic adjustment of the encoded frame rate may be implemented as a computer program tangibly embodied on a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM 12 and/or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the above-described dynamic adjustment method of the encoding frame rate may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the method of dynamic adjustment of the encoded frame rate in any other suitable way (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (10)

1. A method for dynamically adjusting a coding frame rate, comprising:
responding to the code triggering instruction, and determining the average peak signal-to-noise ratio at the current moment;
determining the coding frame rate adjustment quantity at the next moment according to the average peak signal-to-noise ratio at the current moment, the target peak signal-to-noise ratio and a preset proportional differential algorithm;
and determining the coding frame rate of the next moment according to the coding frame rate adjustment quantity of the next moment so as to enable the difference value between the average peak signal-to-noise ratio of the next moment and the target peak signal-to-noise ratio to be within a preset threshold value.
2. The method of claim 1, wherein said determining an average peak signal-to-noise ratio at the current time comprises:
determining the coding frame rate at the current moment according to the average peak signal-to-noise ratio, the target peak signal-to-noise ratio and a preset proportional differential algorithm which are acquired in advance at the last moment;
and determining the average peak signal-to-noise ratio of the current moment according to the coding frame rate of the current moment.
3. The method according to claim 2, wherein the determining the coding frame rate at the current time according to the pre-obtained average peak signal-to-noise ratio at the previous time, the target peak signal-to-noise ratio, and the preset proportional-differential algorithm comprises:
determining the coding frame rate adjustment quantity at the current moment according to the average peak signal-to-noise ratio, the target peak signal-to-noise ratio and a preset proportional differential algorithm which are acquired in advance at the last moment;
and determining the coding frame rate of the current moment according to the coding frame rate adjustment quantity of the current moment.
4. A method according to claim 3, wherein said determining the coding frame rate adjustment for the current time based on the pre-obtained average peak signal to noise ratio at the previous time, the target peak signal to noise ratio and the preset proportional-derivative algorithm comprises:
determining a peak signal-to-noise ratio difference value between the average peak signal-to-noise ratio at the last moment and the target peak signal-to-noise ratio as a first peak signal-to-noise ratio difference value;
and determining the coding frame rate adjustment quantity at the current moment according to the first peak signal-to-noise ratio difference value, the first coefficient and the second coefficient.
5. The method of claim 1, wherein the determining the encoded frame rate adjustment for the next time according to the average peak signal-to-noise ratio at the current time, the target peak signal-to-noise ratio, and the preset proportional-derivative algorithm comprises:
determining a peak signal-to-noise ratio difference value between the average peak signal-to-noise ratio at the current moment and the target peak signal-to-noise ratio as a second peak signal-to-noise ratio difference value;
and determining the coding frame rate adjustment quantity of the next moment according to the second peak signal-to-noise ratio difference value, the first coefficient and the second coefficient.
6. The method according to claim 5, wherein the determining the coding frame rate adjustment amount at the next time includes:
determining a peak signal-to-noise ratio adjustment amount according to the second peak signal-to-noise ratio difference value and the first peak signal-to-noise ratio difference value;
and determining the coding frame rate adjustment quantity at the next moment according to the peak signal-to-noise ratio adjustment quantity, the first coefficient, the second coefficient and the second peak signal-to-noise ratio difference value.
7. The method of claim 1, wherein the encoded frame rate is within a predetermined encoded frame rate range.
8. A dynamic adjustment device for a coding frame rate, comprising:
the first determining module is used for responding to the code triggering instruction and determining the average peak signal-to-noise ratio PSNR at the current moment;
the second determining module is used for determining the coding frame rate adjustment quantity at the next moment according to the average peak signal-to-noise ratio at the current moment, the target peak signal-to-noise ratio and a preset proportional differential algorithm;
and the third determining module is used for determining the coding frame rate of the next moment according to the coding frame rate adjustment quantity of the next moment so as to enable the difference value between the average peak value signal-to-noise ratio of the next moment and the target peak value signal-to-noise ratio to be within a preset threshold value.
9. An electronic device, the electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the method of dynamically adjusting the encoded frame rate of any of claims 1-7.
10. A computer readable storage medium storing computer instructions for causing a processor to implement the method of dynamically adjusting the encoded frame rate of any of claims 1-7 when executed.
CN202210555276.0A 2022-05-19 2022-05-19 Dynamic adjustment method, device, equipment and storage medium for coding frame rate Pending CN117135353A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210555276.0A CN117135353A (en) 2022-05-19 2022-05-19 Dynamic adjustment method, device, equipment and storage medium for coding frame rate

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210555276.0A CN117135353A (en) 2022-05-19 2022-05-19 Dynamic adjustment method, device, equipment and storage medium for coding frame rate

Publications (1)

Publication Number Publication Date
CN117135353A true CN117135353A (en) 2023-11-28

Family

ID=88855114

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210555276.0A Pending CN117135353A (en) 2022-05-19 2022-05-19 Dynamic adjustment method, device, equipment and storage medium for coding frame rate

Country Status (1)

Country Link
CN (1) CN117135353A (en)

Similar Documents

Publication Publication Date Title
WO2021068598A1 (en) Encoding method and device for screen sharing, and storage medium and electronic equipment
CN111757107B (en) Video coding method, device, equipment and medium
CN110166796B (en) Video frame processing method and device, computer readable medium and electronic equipment
US20230050250A1 (en) Method and apparatus for encoding video, and storage medium
CN113490055B (en) Data processing method and device
WO2022000298A1 (en) Reinforcement learning based rate control
CN113573101A (en) Video encoding method, device, equipment and storage medium
CN117135353A (en) Dynamic adjustment method, device, equipment and storage medium for coding frame rate
CN116866658A (en) Video data processing method, device, equipment and medium
CN116567246A (en) AVC coding method and device
CN115767149A (en) Video data transmission method and device
CN115278289A (en) Cloud application rendering video frame processing method and device
CN115567712A (en) Screen content video coding perception code rate control method and device based on just noticeable distortion by human eyes
CN114827662B (en) Video resolution adaptive adjustment method, device, equipment and storage medium
WO2023087177A1 (en) Method and system of video coding with fast low-latency bitstream size control
CN117097904A (en) Video coding method, device, electronic equipment and medium
CN117459671A (en) Audio and video call method and device, electronic equipment and storage medium
CN117615137B (en) Video processing method, device, equipment and storage medium
CN114422718B (en) Video conversion method and device, electronic equipment and storage medium
CN117528141A (en) Video encoding method, video encoding device, electronic device, storage medium, and program product
CN114827662A (en) Video resolution self-adaptive adjusting method, device, equipment and storage medium
WO2016107215A1 (en) Image processing method and device
CN117676239A (en) Video transmission method, device, equipment and medium
CN117336548A (en) Video coding processing method, device, equipment and storage medium
CN117459719A (en) Reference frame selection method and device, electronic 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