CN111093076A - Encoding mode determining method and device - Google Patents
Encoding mode determining method and device Download PDFInfo
- Publication number
- CN111093076A CN111093076A CN201911356101.1A CN201911356101A CN111093076A CN 111093076 A CN111093076 A CN 111093076A CN 201911356101 A CN201911356101 A CN 201911356101A CN 111093076 A CN111093076 A CN 111093076A
- Authority
- CN
- China
- Prior art keywords
- parameter
- coding
- determining
- preset
- preset condition
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 46
- 238000005070 sampling Methods 0.000 claims description 20
- 238000013139 quantization Methods 0.000 description 21
- 230000005540 biological transmission Effects 0.000 description 6
- 238000004364 calculation method Methods 0.000 description 4
- 230000006835 compression Effects 0.000 description 4
- 238000007906 compression Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 238000004891 communication Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 2
- 238000012544 monitoring process Methods 0.000 description 2
- 239000002699 waste material Substances 0.000 description 2
- 230000006978 adaptation Effects 0.000 description 1
- 230000000903 blocking effect Effects 0.000 description 1
- 230000015556 catabolic process Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000006731 degradation reaction Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
- H04N19/124—Quantisation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
- H04N19/103—Selection of coding mode or of prediction mode
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/102—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
- H04N19/132—Sampling, masking or truncation of coding units, e.g. adaptive resampling, frame skipping, frame interpolation or high-frequency transform coefficient masking
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/134—Methods 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/136—Incoming video signal characteristics or properties
- H04N19/14—Coding unit complexity, e.g. amount of activity or edge presence estimation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
- H04N19/186—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a colour or a chrominance component
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
The present disclosure provides a method and a device for determining a coding mode, which relate to the field of computer coding, and the method comprises the following steps: respectively acquiring a first parameter and a second parameter; wherein the first parameter is used for identifying the occupation state of the processor resources, and the second parameter is used for indicating the bandwidth; judging whether the first parameter meets a first preset condition or not and whether the second parameter meets a second preset condition or not; and determining the currently adopted coding mode according to a preset adjusting strategy according to the judgment result. The method and the device can realize dynamic adjustment of the coding mode based on the CPU resource occupancy rate and the bandwidth condition in the coding process.
Description
Technical Field
The present disclosure relates to the field of computer coding technologies, and in particular, to a method and an apparatus for determining a coding mode.
Background
With the development of information technology, the demand of people for communication services is continuously increasing, and the contradiction between image communication and communication network capacity is increasingly prominent.
In the process of image compression and transmission, bandwidth is the key point of attention of people, and at present, image quality is mainly adjusted through bandwidth prediction, so that the problems of picture transmission blocking and frame loss are avoided.
Disclosure of Invention
The embodiment of the disclosure provides a method and a device for determining a coding mode, which can realize dynamic adjustment of the coding mode based on CPU resource occupancy rate and bandwidth conditions in a coding process. The technical scheme is as follows:
according to a first aspect of the embodiments of the present disclosure, there is provided a method for determining a coding scheme, the method including:
respectively acquiring a first parameter and a second parameter; wherein the first parameter is used for identifying the resource occupation state of the processor, and the second parameter is used for indicating the bandwidth;
judging whether the first parameter meets a first preset condition or not and whether the second parameter meets a second preset condition or not;
and determining the currently adopted coding mode according to a preset adjusting strategy according to the judgment result.
In one embodiment, the method further comprises:
a plurality of coding algorithms are preset, wherein each coding algorithm corresponds to an algorithm complexity level.
In one embodiment, the determining whether the first parameter satisfies a first preset condition, and the determining whether the second parameter satisfies a second preset condition includes:
if the first parameter is not larger than a first preset threshold value, judging that the first parameter meets a first preset condition;
and if the second parameter is not greater than the second preset threshold, judging that the second parameter meets a second preset condition.
In one embodiment, determining the currently adopted coding mode according to the preset adjustment strategy according to the judgment result includes:
and when the judgment result indicates that the first parameter meets the first preset condition and the second parameter meets the second preset condition, maintaining the currently adopted coding mode unchanged.
In one embodiment, determining the currently adopted coding mode according to the preset adjustment strategy according to the judgment result includes:
when the judgment result indicates that the first parameter meets the first preset condition and the second parameter does not meet the second preset condition, judging whether a coding algorithm with a higher complexity level than that of the current coding algorithm exists or not;
and if so, determining the coding algorithm with the complexity level higher than that of the current coding algorithm as the currently adopted coding mode.
In one embodiment, determining the currently adopted coding mode according to the preset adjustment strategy according to the judgment result includes:
when the judgment result indicates that the first parameter does not meet the first preset condition and the second parameter meets the second preset condition, judging whether a coding algorithm with a complexity level lower than that of the current coding algorithm exists or not;
and if so, determining the encoding algorithm with the complexity level lower than that of the current encoding algorithm as the currently adopted encoding mode.
In one embodiment, determining the currently adopted coding mode according to the preset adjustment strategy according to the judgment result includes:
and when the judgment result indicates that the first parameter does not meet the first preset condition and the second parameter does not meet the second preset condition, adjusting a third parameter or a sampling mode according to a preset rule.
In one embodiment, the first parameter includes CPU occupancy; the second parameter comprises a bit error rate.
According to a second aspect of the embodiments of the present disclosure, there is provided an encoding method determining apparatus, including:
the acquisition module is used for respectively acquiring a first parameter and a second parameter; wherein the first parameter is used for identifying the occupation state of the processor resources, and the second parameter is used for indicating the bandwidth;
the judging module is used for judging whether the first parameter meets a first preset condition or not and whether the second parameter meets a second preset condition or not;
and the determining module is used for determining the currently adopted coding mode according to the judgment result and the preset adjusting strategy.
In one embodiment, the above apparatus further comprises:
the device comprises a presetting module and a control module, wherein the presetting module is used for presetting a plurality of coding algorithms, and each coding algorithm corresponds to an algorithm complexity grade.
In one embodiment, the determining module is specifically configured to:
if the first parameter is not larger than a first preset threshold value, judging that the first parameter meets a first preset condition;
and if the second parameter is not greater than the second preset threshold, judging that the second parameter meets a second preset condition.
In one embodiment, the determining module is specifically configured to: and when the judgment result indicates that the first parameter meets the first preset condition and the second parameter meets the second preset condition, maintaining the currently adopted coding mode unchanged.
In one embodiment, the determining module includes:
the first judgment submodule is used for judging whether an encoding algorithm with a higher complexity level than that of the current encoding algorithm exists or not when the judgment result indicates that the first parameter meets a first preset condition and the second parameter does not meet a second preset condition;
and the first determining submodule is used for determining the coding algorithm with the complexity level higher than that of the current coding algorithm as the currently adopted coding mode if the coding algorithm exists.
In one embodiment, the determining module includes:
the second judgment submodule is used for judging whether an encoding algorithm with a complexity level lower than that of the current encoding algorithm exists or not when the judgment result indicates that the first parameter does not meet the first preset condition and the second parameter meets the second preset condition;
and the second determining submodule is used for determining the coding algorithm with the complexity level lower than that of the current coding algorithm as the currently adopted coding mode if the coding algorithm exists.
In one embodiment, the determining module is specifically configured to: and when the judgment result indicates that the first parameter does not meet the first preset condition and the second parameter does not meet the second preset condition, adjusting a third parameter or a sampling mode according to a preset rule.
In one embodiment, the first parameter includes CPU occupancy; the second parameter comprises a bit error rate.
The method and the device can realize dynamic adjustment of the encoding mode based on the occupancy rate and the bandwidth condition of the CPU resources in the encoding process, and reduce the waste of the CPU resources due to the considered relation between the calculation capacity of the CPU and the code stream.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a flowchart of a method for determining a coding scheme according to an embodiment of the present disclosure;
fig. 2 is a flowchart of a method for determining a coding scheme according to an embodiment of the present disclosure;
fig. 3 is a structural diagram of an encoding mode determining apparatus according to an embodiment of the present disclosure;
fig. 4 is a structural diagram of an encoding mode determining apparatus according to an embodiment of the present disclosure;
fig. 5 is a structural diagram of an encoding mode determining apparatus according to an embodiment of the present disclosure;
fig. 6 is a structural diagram of an encoding method determining apparatus according to an embodiment of the present disclosure.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
The present disclosure provides a method and an apparatus for determining a coding mode, which can implement dynamic adjustment of the coding mode based on CPU resource occupancy and bandwidth conditions during the coding process. An embodiment of the present disclosure provides a method for determining a coding scheme, as shown in fig. 1, where the method for determining a coding scheme includes the following steps:
the first parameter includes a CPU occupancy rate; the second parameter comprises a bit error rate.
in one embodiment, the determining whether the first parameter satisfies a first preset condition, and the determining whether the second parameter satisfies a second preset condition includes:
if the first parameter is not larger than a first preset threshold value, judging that the first parameter meets a first preset condition;
and if the second parameter is not greater than the second preset threshold, judging that the second parameter meets a second preset condition.
In one embodiment, the first parameter is CPU resource occupancy, and the second parameter is packet loss rate.
Specifically, the detection of the bandwidth may be determined by calculating a packet loss rate, for example, if the packet loss rate is less than or equal to a second preset threshold, for example, 5%, the bandwidth is considered to be low (the bandwidth is sufficient), that is, the second parameter meets the second preset condition, otherwise, if the packet loss rate is greater than 5% of the second preset threshold, the bandwidth is considered to be high (the bandwidth is insufficient), that is, the second parameter does not meet the second preset condition.
The monitoring of the CPU resource occupancy rate and the bandwidth may be performed according to a preset period, and the value of the preset period may be set according to actual needs, for example, set to 10 seconds, 20 seconds, 1 minute, and the like, and may also be set to be longer or shorter.
In practical applications, there are many methods for calculating the packet loss rate, and an exemplary calculation method is given here:
counting the data quantity S sent by the sending end and the data quantity R received by the receiving end in a period of time, wherein the calculation formula of the packet loss rate is as follows: (S-R)/S.
For the CPU resource occupancy rate, the CPU resource occupancy rate can be determined according to a preset mode, specifically: presetting a CPU resource occupancy rate threshold (a first preset threshold), and if the current CPU resource occupancy rate is greater than the CPU resource occupancy rate threshold, considering that the current CPU resource occupancy rate is high, namely the first parameter does not meet a first preset condition; and if the current CPU resource occupancy rate is smaller than the CPU resource occupancy rate threshold value, the current CPU resource occupancy rate is considered to be low, namely the second parameter meets a second preset condition. The actual value of the CPU resource occupancy rate threshold may be set and adjusted according to empirical judgment and actual application requirements, which is not limited herein. For example, the CPU resource occupancy threshold may be set at 50%, 60%, or 70%. It should be noted that the low CPU resource occupancy rate or the high CPU resource occupancy rate is only to distinguish two relative states of the CPU resource occupancy, and does not indicate that the CPU resource occupancy rate is absolutely high or low.
And 103, determining a currently adopted coding mode according to a preset adjustment strategy according to the judgment result.
Before this step, a plurality of coding algorithms are preset, wherein each coding algorithm corresponds to an algorithm complexity level. Specifically, different encoding algorithms correspond to different algorithm complexities, and the algorithm complexities are in direct proportion to the compression rate, that is, the higher the algorithm complexity is, the higher the compression rate of the image is. An exemplary list of coding algorithms can be found in table 1, where all coding algorithms are ranked from low to high algorithm complexity in table 1:
TABLE 1
Specifically, according to whether the first parameter is greater than a first preset threshold and whether the second parameter is greater than a second preset threshold, the judgment results are totally divided into the following four cases:
in the first case: and when the judgment result indicates that the first parameter meets the first preset condition and the second parameter meets the second preset condition, maintaining the currently adopted coding mode unchanged.
The first parameter satisfies a first preset condition, and the second parameter satisfies a second preset condition, that is, the CPU resource occupancy rate is low and the bandwidth is sufficient, and the current coding method is continuously used for coding transmission, that is, the current coding method can adapt to the current CPU resource occupancy condition and ensure that the bandwidth is sufficient, so that the current coding method can be continuously maintained without adjustment in this condition.
In the second case: when the judgment result indicates that the first parameter meets a first preset condition and the second parameter does not meet a second preset condition, judging whether a coding algorithm with a higher complexity level than that of the current coding algorithm exists or not;
and if so, determining the coding algorithm with the complexity level higher than that of the current coding algorithm as the currently adopted coding mode.
Specifically, the complexity of the current coding algorithm is +1, that is, the coding algorithm with complexity level one level higher than that of the current coding algorithm is used for coding; then, go to step 101; if not, the current coding algorithm is kept unchanged; then, go to step 101.
In the third situation, when the judgment result indicates that the first parameter does not meet the first preset condition and the second parameter meets the second preset condition, whether a coding algorithm with a complexity level lower than that of the current coding algorithm exists is judged;
and if so, determining the encoding algorithm with the complexity level lower than that of the current encoding algorithm as the currently adopted encoding mode.
The complexity level of the current coding algorithm is-1, namely, the coding algorithm with the complexity level lower than that of the current coding algorithm by one level is used for coding; then, go to step 101;
if not, the current coding algorithm is kept unchanged; then, go to step 101.
When the CPU resource occupancy rate is high but the bandwidth is sufficient, the algorithm complexity can be reduced, namely, an encoding mode with lower algorithm complexity and lower compression rate is adopted for encoding, so that the CPU resource occupancy rate is reduced by properly increasing code streams, and the image quality is ensured.
And in the fourth situation, when the judgment result indicates that the first parameter does not meet the first preset condition and the second parameter does not meet the second preset condition, adjusting the third parameter or the sampling mode according to a preset rule.
Specifically, the adjusting sampling manner includes, but is not limited to: and adjusting the sampling mode of the acquisition end from YUV444 to YUV422, or from YUV444 to YUV 420.
YUV is a color coding method, mainly separating luminance information (Y) from color information (UV), and displaying a complete image without UV information, but black and white. Moreover, YUV does not require three independent video signals to be transmitted simultaneously as RGB does, so transmission in YUV takes up very little bandwidth.
The storage format of the YUV code stream is closely related to the sampling mode thereof, and the mainstream sampling mode has three types: YUV444, YUV422, and YUV 420. The YUV444 format occupies the largest space, and each pixel has one Y component + one U component + one V component, so that each pixel occupies 3 bytes; YUV422 shares one UV component for every two Y components, so a pixel occupies two bytes; YUV420 shares one UV component for every four y components, so each pixel occupies 1.5 bytes of space.
Adjusting the third parameter according to the preset rule includes: and adjusting the quantization parameter according to the quantization step size.
The quantization parameter QP is the number of quantization step Qstep, and in general, the quantization parameter QP and quantization step Qstep have a direct proportional relationship. The smaller the value of QP is, the finest quantization is represented; conversely, the larger the value of QP, the coarser the quantization, i.e., the higher the QP, the lower the code rate. Therefore, in the fourth situation, the quantization parameter may be increased to reduce the code stream, in practical application, the adjustment of the quantization parameter may be performed according to a certain preset step length, for example, when the adjustment is performed with 2 as the step length, assuming that the current quantization parameter is 8, the quantization parameter may be adjusted to 10, after the adjustment to 10, if the CPU resource occupancy is still high and the memory is still insufficient, the quantization parameter continues to be adjusted to 12, and so on, until the CPU resource occupancy is low and the memory is sufficient, the current quantization parameter is maintained.
In actual implementation, QP or Qstep may set a reference value; meanwhile, the sampling mode may also be a fixed mode, such as YUV422 as a reference sampling mode.
When the CPU occupancy rate is high and the bandwidth is insufficient, the image quality can be directly adjusted by means of down-sampling or adjusting quantization parameters, the code stream is reduced, and the smoothness of transmission is guaranteed.
Preferably, the above scheme further comprises: and when the current quantization parameter is not the reference quantization parameter or the sampling mode is not the reference sampling mode, detecting the packet loss rate, and when the current packet loss rate is detected to be 0, recovering the current sampling mode to be the reference sampling mode. This step is to avoid the sampling mode or the quantization parameter from being maintained in a non-reference state all the time, which results in the degradation of image quality.
The above-described scheme is described in detail below with reference to a specific example.
Still taking table 1 as an example, referring to table 1, six coding algorithms are preset to form a coding algorithm list and stored in a database, and the algorithm complexity of the six coding algorithms is higher from one level to six levels.
Wherein the encoding algorithm 3 is set as a default initial encoding algorithm, and the remaining parameters such as sampling mode or quantization parameter are also set according to the default parameters. An exemplary procedure of an embodiment of the present invention is as follows:
in the initial stage, if an initial coding mode (a coding algorithm 3, a reference sampling mode or a reference quantization parameter) is adopted to carry out coding transmission on the currently acquired image;
step 201, monitoring the current CPU resource occupancy rate and bandwidth condition in real time;
step 202, determining the current coding mode according to the occupancy rate of the CPU resource and the bandwidth condition, wherein four conditions are provided specifically.
In the first case: and under the conditions of low CPU resource occupancy rate and sufficient bandwidth, the current coding mode is kept unchanged.
In the second case: when the CPU resource occupancy rate is low but the bandwidth is insufficient, the complexity of the current coding algorithm is +1, namely, the coding algorithm is adjusted from the coding algorithm 3 to the coding algorithm 4, and at the moment, the coding is continued according to the coding algorithm 4;
when the CPU resource occupancy rate is still low and the bandwidth is insufficient, the complexity of the current coding algorithm is +1, namely, the coding algorithm is adjusted to be a coding algorithm 5, and at the moment, coding is continued according to the coding algorithm;
in the third case: when the CPU resource occupancy rate is high but the bandwidth is sufficient, the complexity of the current coding algorithm is-1, namely, the coding algorithm is adjusted to be a coding algorithm 4, and at the moment, the coding is continued according to the coding algorithm;
by analogy, in the whole encoding process, the encoding mode is dynamically adjusted according to the CPU resource occupancy rate and the bandwidth condition.
In a fourth case: when the CPU resource occupancy rate is high and the bandwidth is insufficient, the sampling mode or the quantization parameter is adjusted, so that the CPU resource occupancy rate and the bandwidth are reduced.
Fig. 3 is a coding scheme determining apparatus according to an embodiment of the present disclosure, where the coding scheme determining apparatus 30 shown in fig. 3 includes: an acquisition module 301, a judgment module 302 and a determination module 303,
an obtaining module 301, configured to obtain a first parameter and a second parameter respectively; wherein the first parameter is used for identifying the occupation state of the processor resource, and the second parameter is used for indicating the bandwidth;
the determining module 302 is configured to determine whether the first parameter meets a first preset condition, and whether the second parameter meets a second preset condition;
and the determining module 303 is configured to determine, according to the determination result, the currently adopted coding mode according to a preset adjustment policy.
In an embodiment, the determining module 302 is specifically configured to:
if the first parameter is not larger than a first preset threshold value, judging that the first parameter meets a first preset condition;
and if the second parameter is not greater than the second preset threshold, judging that the second parameter meets a second preset condition.
In one embodiment, the determining module 303 is specifically configured to: and when the judgment result indicates that the first parameter meets the first preset condition and the second parameter meets the second preset condition, maintaining the currently adopted coding mode unchanged.
In one embodiment, the determining module 302 is specifically configured to: and when the judgment result indicates that the first parameter does not meet the first preset condition and the second parameter does not meet the second preset condition, adjusting a third parameter or a sampling mode according to a preset rule.
In one embodiment, the first parameter includes CPU occupancy; the second parameter comprises a bit error rate.
Fig. 4 is a coding scheme determining apparatus according to an embodiment of the present disclosure, where the coding scheme determining apparatus 40 shown in fig. 4 includes: a presetting module 400, an obtaining module 401, a judging module 402 and a determining module 403,
the presetting module 400 is configured to preset a plurality of coding algorithms, where each coding algorithm corresponds to an algorithm complexity level.
Fig. 5 is a coding scheme determining apparatus according to an embodiment of the present disclosure, where the coding scheme determining apparatus 50 shown in fig. 5 includes: the device comprises a presetting module 500, an obtaining module 501, a judging module 502 and a determining module 503, wherein the determining module 503 comprises:
the first determining sub-module 5031, configured to determine whether there is a coding algorithm with a higher complexity level than the current coding algorithm when the determination result indicates that the first parameter satisfies a first preset condition and the second parameter does not satisfy a second preset condition;
a first determining sub-module 5032, configured to determine, if any, the encoding algorithm with the complexity level higher than that of the current encoding algorithm as the currently adopted encoding mode.
Fig. 6 is a coding scheme determining apparatus according to an embodiment of the present disclosure, where the coding scheme determining apparatus 60 shown in fig. 6 includes: the device comprises a presetting module 600, an obtaining module 601, a judging module 602 and a determining module 603, wherein the determining module 603 comprises:
a second determining submodule 6031, configured to determine whether there is an encoding algorithm with a complexity level lower than that of the current encoding algorithm when the determination result indicates that the first parameter does not satisfy the first preset condition and the second parameter satisfies the second preset condition;
a second determining sub-module 6032, configured to determine, if there is any, the encoding algorithm with the complexity level lower than that of the current encoding algorithm as the currently employed encoding mode.
The method and the device can realize dynamic adjustment of the encoding mode based on the occupancy rate and the bandwidth condition of the CPU resources in the encoding process, and reduce the waste of the CPU resources due to the considered relation between the calculation capacity of the CPU and the code stream.
Based on the encoding method described in the embodiment corresponding to fig. 1, an embodiment of the present disclosure further provides a computer-readable storage medium, for example, the non-transitory computer-readable storage medium may be a Read Only Memory (ROM), a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like. The storage medium stores computer instructions for executing the encoding method determination method described in the embodiment corresponding to fig. 1, which is not described herein again.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
Claims (10)
1. A method for determining a coding scheme, the method comprising:
respectively acquiring a first parameter and a second parameter; wherein the first parameter is used for identifying the occupation state of the processor resources, and the second parameter is used for indicating the bandwidth;
judging whether the first parameter meets a first preset condition or not and whether the second parameter meets a second preset condition or not;
and determining the currently adopted coding mode according to a preset adjusting strategy according to the judgment result.
2. The encoding method according to claim 1, further comprising:
a plurality of coding algorithms are preset, wherein each coding algorithm corresponds to an algorithm complexity level.
3. The method according to claim 2, wherein the determining whether the first parameter satisfies a first predetermined condition and whether the second parameter satisfies a second predetermined condition comprises:
if the first parameter is not larger than a first preset threshold value, judging that the first parameter meets a first preset condition;
and if the second parameter is not greater than the second preset threshold, judging that the second parameter meets a second preset condition.
4. The method according to claim 2, wherein the determining, according to the determination result and according to a preset adjustment policy, the currently-used encoding mode comprises:
and when the judgment result indicates that the first parameter meets the first preset condition and the second parameter meets the second preset condition, maintaining the currently adopted coding mode unchanged.
5. The method according to claim 2, wherein the determining, according to the determination result and according to a preset adjustment policy, the currently-used encoding mode comprises:
when the judgment result indicates that the first parameter meets the first preset condition and the second parameter does not meet the second preset condition, judging whether a coding algorithm with a higher complexity level than that of the current coding algorithm exists or not;
and if so, determining the coding algorithm with the complexity level higher than that of the current coding algorithm as the currently adopted coding mode.
6. The method according to claim 2, wherein the determining, according to the determination result and according to a preset adjustment policy, the currently-used encoding mode comprises:
when the judgment result indicates that the first parameter does not meet the first preset condition and the second parameter meets the second preset condition, judging whether a coding algorithm with a complexity level lower than that of the current coding algorithm exists or not;
and if so, determining the encoding algorithm with the complexity level lower than that of the current encoding algorithm as the currently adopted encoding mode.
7. The method according to claim 2, wherein the determining, according to the determination result and according to a preset adjustment policy, the currently-used encoding mode comprises:
and when the judgment result indicates that the first parameter does not meet the first preset condition and the second parameter does not meet the second preset condition, adjusting a third parameter or a sampling mode according to a preset rule.
8. The encoding system adjusting method according to claim 2, wherein the first parameter includes a CPU occupancy; the second parameter comprises a bit error rate.
9. An encoding method determining apparatus, comprising:
the acquisition module is used for respectively acquiring a first parameter and a second parameter; wherein the first parameter is used for identifying the occupation state of the processor resources, and the second parameter is used for indicating the bandwidth;
the judging module is used for judging whether the first parameter meets a first preset condition or not and whether the second parameter meets a second preset condition or not;
and the determining module is used for determining the currently adopted coding mode according to the judgment result and the preset adjusting strategy.
10. The encoding system adjusting apparatus according to claim 9, further comprising:
the device comprises a presetting module and a control module, wherein the presetting module is used for presetting a plurality of coding algorithms, and each coding algorithm corresponds to the complexity grade of the algorithm.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911356101.1A CN111093076A (en) | 2019-12-25 | 2019-12-25 | Encoding mode determining method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911356101.1A CN111093076A (en) | 2019-12-25 | 2019-12-25 | Encoding mode determining method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111093076A true CN111093076A (en) | 2020-05-01 |
Family
ID=70397130
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911356101.1A Pending CN111093076A (en) | 2019-12-25 | 2019-12-25 | Encoding mode determining method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111093076A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2022206153A1 (en) * | 2021-04-01 | 2022-10-06 | Oppo广东移动通信有限公司 | Electronic device control method and apparatus, and storage medium and electronic device |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102065302A (en) * | 2011-02-09 | 2011-05-18 | 复旦大学 | H.264 based flexible video coding method |
CN103548352A (en) * | 2011-04-15 | 2014-01-29 | Sk普兰尼特有限公司 | Adaptive video transcoding method and system |
CN104219590A (en) * | 2013-06-05 | 2014-12-17 | 华为终端有限公司 | Method for switching coding modes, transmitting end and receiving end |
CN104618473A (en) * | 2015-01-26 | 2015-05-13 | 上海视聪网络信息技术有限公司 | Virtual machine desktop display method and device |
WO2016202286A1 (en) * | 2015-06-19 | 2016-12-22 | 美国掌赢信息科技有限公司 | Real-time video transmission method and electronic apparatus |
US20170195672A1 (en) * | 2015-12-31 | 2017-07-06 | Facebook, Inc. | Dynamic codec adaptation |
CN107872673A (en) * | 2017-11-01 | 2018-04-03 | 北京酷我科技有限公司 | A kind of method and device of Intelligent Dynamic regulation video encoder |
CN108366288A (en) * | 2018-03-01 | 2018-08-03 | 厦门普杰信息科技有限公司 | A kind of efficient decoding and playback method and system for HD video |
-
2019
- 2019-12-25 CN CN201911356101.1A patent/CN111093076A/en active Pending
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102065302A (en) * | 2011-02-09 | 2011-05-18 | 复旦大学 | H.264 based flexible video coding method |
CN103548352A (en) * | 2011-04-15 | 2014-01-29 | Sk普兰尼特有限公司 | Adaptive video transcoding method and system |
CN104219590A (en) * | 2013-06-05 | 2014-12-17 | 华为终端有限公司 | Method for switching coding modes, transmitting end and receiving end |
CN104618473A (en) * | 2015-01-26 | 2015-05-13 | 上海视聪网络信息技术有限公司 | Virtual machine desktop display method and device |
WO2016202286A1 (en) * | 2015-06-19 | 2016-12-22 | 美国掌赢信息科技有限公司 | Real-time video transmission method and electronic apparatus |
US20170195672A1 (en) * | 2015-12-31 | 2017-07-06 | Facebook, Inc. | Dynamic codec adaptation |
CN107872673A (en) * | 2017-11-01 | 2018-04-03 | 北京酷我科技有限公司 | A kind of method and device of Intelligent Dynamic regulation video encoder |
CN108366288A (en) * | 2018-03-01 | 2018-08-03 | 厦门普杰信息科技有限公司 | A kind of efficient decoding and playback method and system for HD video |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2022206153A1 (en) * | 2021-04-01 | 2022-10-06 | Oppo广东移动通信有限公司 | Electronic device control method and apparatus, and storage medium and electronic device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP0593275B1 (en) | Image signal coding device for reducing the amount of the information in the transmitted image by transmitting specified image areas | |
CN112468855B (en) | Data transmission method and device and nonvolatile storage medium | |
US10587874B2 (en) | Real-time video denoising method and terminal during coding, and non-volatile computer readable storage medium | |
US9197904B2 (en) | Networked image/video processing system for enhancing photos and videos | |
US8948253B2 (en) | Networked image/video processing system | |
US11445201B2 (en) | Video encoding and decoding method, device, and system, and storage medium | |
US9137548B2 (en) | Networked image/video processing system and network site therefor | |
US20030095598A1 (en) | Object-based bit rate control method and system thereof | |
CN110149515B (en) | Data transmission method and device | |
CN102884536A (en) | Skin tone and feature detection for video conferencing compression | |
US12003782B2 (en) | Pixel filtering for content | |
CN111182352A (en) | Adaptive code stream control device and method for video playing | |
CN110740316A (en) | Data coding method and device | |
CN111343455B (en) | Encoding mode determining method and device | |
JP2011087090A (en) | Image processing method, image processing apparatus, and imaging system | |
CN111200693A (en) | Image data transmission method, device and system | |
CN111093076A (en) | Encoding mode determining method and device | |
US20110064276A1 (en) | Image transmission device and image reception device | |
US9357170B2 (en) | Device and method for managing bandwidth of video conference | |
US20200106821A1 (en) | Video processing apparatus, video conference system, and video processing method | |
CN112104872B (en) | Image transmission method and device | |
WO2022011916A1 (en) | Video coding method and apparatus | |
CN112788364B (en) | Code stream flow regulating device, method and computer readable storage medium | |
US11496738B1 (en) | Optimized reduced bitrate encoding for titles and credits in video content | |
WO2023000815A1 (en) | Code stream processing method, apparatus, terminal device, 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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20200501 |
|
RJ01 | Rejection of invention patent application after publication |