CN112601074B - Method and device for evaluating encoder, computer equipment and storage medium - Google Patents

Method and device for evaluating encoder, computer equipment and storage medium Download PDF

Info

Publication number
CN112601074B
CN112601074B CN202011377850.5A CN202011377850A CN112601074B CN 112601074 B CN112601074 B CN 112601074B CN 202011377850 A CN202011377850 A CN 202011377850A CN 112601074 B CN112601074 B CN 112601074B
Authority
CN
China
Prior art keywords
speed gear
preset speed
preset
coding
rate
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011377850.5A
Other languages
Chinese (zh)
Other versions
CN112601074A (en
Inventor
张文杰
樊鸿飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Kingsoft Cloud Network Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network 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 Beijing Kingsoft Cloud Network Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN202011377850.5A priority Critical patent/CN112601074B/en
Publication of CN112601074A publication Critical patent/CN112601074A/en
Application granted granted Critical
Publication of CN112601074B publication Critical patent/CN112601074B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N17/00Diagnosis, testing or measuring for television systems or their details
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • 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/154Measured or subjectively estimated visual quality after decoding, e.g. measurement of distortion

Abstract

The application relates to a method, a device, a computer device and a storage medium for evaluating an encoder. The method comprises the following steps: acquiring a first coding result of a plurality of code rate points corresponding to each preset speed gear of an original encoder, and acquiring a second coding result of a plurality of code rate points corresponding to each preset speed gear of an encoder to be evaluated; calculating to obtain the BD-rate and the speed ratio of each preset speed gear according to the first coding result and the second coding result of each preset speed gear; calculating the weighted sum of the BD-rate and the speed ratio of each preset speed gear to obtain the coding performance of each preset speed gear; and evaluating the encoder to be evaluated according to the encoding performance of each preset speed gear to obtain an evaluation result. And weighting and summing the BD-rate and the speed ratio of each preset speed gear, and determining the coding performance of each preset speed gear according to a summation result, wherein the coding performance can reflect and accurately reflect the coding quality of the coder, and is more stable compared with the judgment based on manual experience.

Description

Method and device for evaluating encoder, computer equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for evaluating an encoder, a computer device, and a storage medium.
Background
Video coding refers to the way of converting a file in an original video format into a file in another video format by compression techniques. The most important codec standards in video streaming are h.264, h.265, AVS, etc. Video coding is performed by an encoder, and the quality of the encoder determines the quality of the coding. Improving the coding quality of the encoder is always an important direction of research, and optimizing the encoder can improve the coding quality. A common method of optimizing an encoder includes: adding new coding tools, adding acceleration algorithms, parameter tuning and the like.
The existing effect evaluation mode for adjusting new tools/new acceleration algorithms/parameters is to compare the coding result of a new coder added with the new tools/acceleration algorithms/parameters with the coding result (anchor) of the original coder, calculate the BD-rate and the velocity ratio, comprehensively measure the two indexes according to experience, and judge the quality of the two indexes, wherein the quality of the two indexes cannot be accurately judged under the condition of insufficient experience or opposite indexes.
Disclosure of Invention
In order to solve the above technical problem, the present application provides a method, an apparatus, a computer device, and a storage medium for evaluating an encoder.
The application provides a method for evaluating an encoder, comprising the following steps:
acquiring coding results of a plurality of code rate points corresponding to each preset speed gear of an original encoder to obtain a first coding result, and acquiring coding results of a plurality of code rate points corresponding to each preset speed gear of an encoder to be evaluated to obtain a second coding result;
according to the first coding result and the second coding result corresponding to each preset speed gear, calculating to obtain the BD-rate of each preset speed gear and the speed ratio of each preset speed gear;
calculating the BD-rate of each preset speed gear and the weighted sum of the speed ratio of each preset speed gear to obtain the coding performance corresponding to each preset speed gear;
and evaluating the encoder to be evaluated according to the encoding performance of each preset speed gear to obtain an evaluation result.
The application provides an apparatus for evaluating an encoder, comprising:
the device comprises a coding result acquisition module, a coding result evaluation module and a coding result evaluation module, wherein the coding result acquisition module is used for acquiring the coding results of a plurality of code rate points corresponding to each preset speed gear of an original encoder to obtain a first coding result, acquiring the coding results of a plurality of code rate points corresponding to each preset speed gear of an encoder to be evaluated to obtain a second coding result;
the data processing module is used for calculating the BD-rate of each preset speed gear and the speed ratio of each preset speed gear according to the first coding result and the second coding result corresponding to each preset speed gear;
the coding performance calculation module is used for calculating the BD-rate of each preset speed gear and the weighted sum of the speed ratio of each preset speed gear to obtain the coding performance corresponding to each preset speed gear;
and the evaluation module is used for evaluating the encoder to be evaluated according to the encoding performance of each preset speed gear to obtain an evaluation result.
A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
acquiring coding results of a plurality of code rate points corresponding to each preset speed gear of an original encoder to obtain a first coding result, and acquiring coding results of a plurality of code rate points corresponding to each preset speed gear of an encoder to be evaluated to obtain a second coding result;
according to the first coding result and the second coding result corresponding to each preset speed gear, calculating to obtain the BD-rate of each preset speed gear and the speed ratio of each preset speed gear;
calculating the BD-rate of each preset speed gear and the weighted sum of the speed ratio of each preset speed gear to obtain the coding performance corresponding to each preset speed gear;
and evaluating the encoder to be evaluated according to the encoding performance of each preset speed gear to obtain an evaluation result.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
acquiring coding results of a plurality of code rate points corresponding to each preset speed gear of an original encoder to obtain a first coding result, and acquiring coding results of a plurality of code rate points corresponding to each preset speed gear of an encoder to be evaluated to obtain a second coding result;
according to the first coding result and the second coding result corresponding to each preset speed gear, calculating to obtain the BD-rate of each preset speed gear and the speed ratio of each preset speed gear;
calculating the BD-rate of each preset speed gear and the weighted sum of the speed ratio of each preset speed gear to obtain the coding performance corresponding to each preset speed gear;
and evaluating the encoder to be evaluated according to the encoding performance of each preset speed gear to obtain an evaluation result.
The method, the device, the computer equipment and the storage medium for evaluating the encoder comprise the following steps: acquiring coding results of a plurality of code rate points corresponding to each preset speed gear of an original encoder to obtain a first coding result, and acquiring coding results of a plurality of code rate points corresponding to each preset speed gear of an encoder to be evaluated to obtain a second coding result; calculating to obtain the BD-rate of each preset speed gear and the speed ratio of each preset speed gear according to the first coding result and the second coding result corresponding to each preset speed gear; calculating the BD-rate of each preset speed gear and the weighted sum of the speed ratio of each preset speed gear to obtain the coding performance corresponding to each preset speed gear; and evaluating the encoder to be evaluated according to the encoding performance of each preset speed gear to obtain an evaluation result. The BD-rate of each preset speed gear and the speed ratio of each preset speed gear are subjected to weighted summation, and the coding performance of each preset speed gear is determined according to the summation result, so that the coding quality of the coder can be reflected accurately, and the judgment is more stable compared with manual judgment according to experience.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present invention, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without inventive labor.
FIG. 1 is a diagram of an embodiment of an environment in which a method of evaluating an encoder is used;
FIG. 2 is a flow diagram illustrating a method of evaluating an encoder in one embodiment;
FIG. 3 is a graphical illustration of a rate speed curve in one embodiment;
FIG. 4 is a block diagram of an apparatus for evaluating an encoder according to an embodiment;
FIG. 5 is a diagram of the internal structure of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without making creative efforts shall fall within the protection scope of the present application.
FIG. 1 is a diagram of an embodiment of a method for evaluating an encoder. Referring to fig. 1, the method of evaluating an encoder is applied to a system for evaluating an encoder. The system for evaluating an encoder includes a terminal 110 and a server 120. The terminal 110 or the server 120 obtains the coding results of the multiple code rate points corresponding to each preset speed gear of the original encoder to obtain a first coding result, obtains the coding results of the multiple code rate points corresponding to each preset speed gear of the encoder to be evaluated to obtain a second coding result; calculating to obtain the BD-rate of each preset speed gear and the speed ratio of each preset speed gear according to the first coding result and the second coding result corresponding to each preset speed gear; calculating the BD-rate of each preset speed gear and the weighted sum of the speed ratio of each preset speed gear to obtain the coding performance corresponding to each preset speed gear; and evaluating the encoder to be evaluated according to the encoding performance of each preset speed gear to obtain an evaluation result.
The terminal 110 and the server 120 are connected through a network. The terminal 110 may be a desktop terminal or a mobile terminal, and the mobile terminal may be at least one of a mobile phone, a tablet computer, a notebook computer, and the like. The server 120 may be implemented as a stand-alone server or a server cluster composed of a plurality of servers.
In one embodiment, as shown in fig. 2, a method of evaluating an encoder is provided. The embodiment is mainly illustrated by applying the method to the terminal 110 (or the server 120) in fig. 1. Referring to fig. 2, the method for evaluating an encoder specifically includes the following steps:
step S201, obtaining the coding results of the original encoder at the multiple code rate points corresponding to each preset speed gear to obtain a first coding result, and obtaining the coding results of the encoder to be evaluated at the multiple code rate points corresponding to each preset speed gear to obtain a second coding result.
Step S202, calculating to obtain the BD-rate of each preset speed gear and the speed ratio of each preset speed gear according to the first coding result and the second coding result corresponding to each preset speed gear.
Specifically, the encoder to be evaluated refers to different encoding of the original encoder. For example, the encoder after adding a new encoding tool, adding a new optimization algorithm and/or adjusting the parameters of the original encoder is the encoder to be evaluated. Encoders typically have different encoding quality and different encoding speed at different complexities. Typically, the encoder presets several speed steps, each speed step having a set of parameters. The faster the speed gear, the faster the coding speed and the worse the coding quality. The preset speed gear may be a full speed gear or a partial speed gear.
The code rate refers to the size of data compiled by the encoder per second, in kbps, e.g., 800kbps represents the encoder producing 800KB (or 100 KB) of data per second. The first encoding result and the second encoding result are divided into encoding results of the original encoder and the encoder to be evaluated under the respective presets. The coding result comprises coding quality and coding speed, the coding quality comprises two parameters of code rate and distortion, and the BD-rate can be calculated according to the coding quality. The speed ratio can be calculated from the encoding speed. The BD-rate is used for evaluating an index of the quality of the codes of the 2 encoders, and the physical significance is a relative code rate difference value of the encoder to be tested (the encoder to be evaluated) relative to the anchor (the original encoder) under the same distortion, and the unit is%. A BD-rate less than 0 indicates that the encoder to be tested performs better than the anchor, and a more negative value indicates better performance, i.e. more code rate is saved under the same distortion. The specific calculation method of BD-rate is as follows: firstly, testing multiple groups of coded data (distortion and code rate) of the Anchor under multiple code rate points, and then testing the coded data of the encoder to be tested under multiple code rate points; and using the multi-group coded data as input to calculate the BD-rate. The speed ratio is the encoding speed of the encoder to be evaluated divided by the encoding speed of the original encoder.
Step S203, calculating the BD-rate of each preset speed gear and the weighted sum of the speed ratio of each preset speed gear to obtain the corresponding coding performance of each preset speed gear.
And step S204, evaluating the encoder to be evaluated according to the encoding performance of each preset speed gear to obtain an evaluation result.
Specifically, the BD-rate of each preset speed gear and the speed ratio of the preset speed gear are weighted and summed to obtain the encoding performance of the preset speed gear. The weighting coefficient corresponding to each preset speed gear may be self-defined, for example, a group of unique weighting coefficients may be defined for each preset speed gear, or the same weighting coefficient may be defined for a plurality of preset speed gears, that is, the same weighting coefficient is used for a plurality of different preset speed gears, or the weighting coefficient corresponding to each preset speed gear may be defined as a slope corresponding to the preset speed gear, where the slope is calculated according to a slope between encoded data between each preset speed gear and an adjacent preset speed gear. The weighting factor may also be an empirical value.
The coding performance can carry out quantitative evaluation on coding tools in each preset, guide the decision of which presets are suitable for using new coding tools or new acceleration algorithms, and can guide the automatic parameter adjustment of the coder. And determining the evaluation result of the encoder to be evaluated according to the encoding performance, namely that the improvement of the encoding performance indicates that the encoder to be evaluated is superior to the original encoder on the whole, and the reduction of the encoding performance indicates that the original encoder is superior to the encoder to be evaluated on the whole.
In one embodiment, evaluating the encoder to be evaluated according to the encoding performance of each preset speed gear to obtain an evaluation result, including: if the coding performance of the current preset speed gear is larger than a preset threshold value, the evaluation result is performance improvement; evaluating the encoder to be evaluated according to the encoding performance of each preset speed gear to obtain an evaluation result, wherein the evaluation result comprises the following steps: if the coding performance of the current preset speed gear is larger than a preset threshold value, the evaluation result is performance improvement; and if the coding performance of the current preset speed gear is smaller than the preset threshold, the performance is reduced as an evaluation result.
Specifically, the preset threshold is a preset threshold for judging whether the encoder to be evaluated is better than the original encoder. The threshold value can be self-defined, and if the calculation formula of the coding performance is different, the preset threshold value is different.
The method for evaluating the encoder comprises the following steps: acquiring coding results of a plurality of code rate points corresponding to each preset speed gear of an original encoder to obtain a first coding result, and acquiring coding results of a plurality of code rate points corresponding to each preset speed gear of an encoder to be evaluated to obtain a second coding result; according to the first coding result and the second coding result corresponding to each preset speed gear, calculating to obtain the BD-rate of each preset speed gear and the speed ratio of each preset speed gear; calculating the BD-rate of each preset speed gear and the weighted sum of the speed ratio of each preset speed gear to obtain the coding performance corresponding to each preset speed gear; and evaluating the encoder to be evaluated according to the encoding performance of each preset speed gear to obtain an evaluation result. The BD-rate of each preset speed gear and the speed ratio of each preset speed gear are subjected to weighted summation, and the coding performance of each preset speed gear is determined according to the summation result, so that the coding quality of the coder can be reflected accurately, and the coding performance is more stable compared with the judgment manually according to experience.
In an embodiment, the method for evaluating an encoder further includes: selecting any one preset speed gear from each preset speed gear as a reference gear; according to the first coding result, calculating the BD-rate of each preset speed gear relative to the reference gear and the corresponding speed ratio; drawing a code rate speed curve according to the BD-rates of the preset speed gears relative to the reference gear and the corresponding speed ratios; and determining the weighting coefficient of the preset speed gear according to the slope corresponding to each preset speed gear in the code rate speed curve.
In this embodiment, step S203 includes: and calculating to obtain the coding performance corresponding to each preset speed gear according to the weighting coefficient, the BD-rate and the speed ratio of the BD-rate of each preset speed gear.
Specifically, the reference gear may be any one of preset speed gears, such as the slowest or fastest speed gear is selected as the reference gear. And taking the coding result of the original coder corresponding to the reference gear as a reference coding result, and calculating the BD-rate and the speed ratio of the coding result of the preset speed gear except the reference gear relative to the coding result. The method comprises the steps of calculating speed improvement and code rate saving relative to a coding result according to a reference coding result and a coding result of a preset speed gear, drawing a code rate speed curve according to the speed improvement and the code rate saving, wherein the horizontal axis of the code rate speed curve corresponds to the code rate increase percentage, and the vertical axis of the code rate speed curve is the speed improvement percentage. And calculating a weighting coefficient corresponding to each preset speed gear according to the code rate speed curve. The weighting factor can be self-defined, for example, it can be defined as a slope of a connecting line between a preset speed gear and adjacent or a preset number of preset speed gears at intervals, or a weighted value of a slope of a connecting line between a preset speed gear and two adjacent preset speed gears, or a weighted value of a slope of a connecting line between a part of preset speed gears and adjacent preset speed gears. And calculating the coding performance corresponding to the preset speed gear according to the weighting coefficient of the BD-rate of the preset speed gear, the BD-rate of the preset speed gear and the speed ratio of the preset speed gear, and calculating the coding performance of each preset speed gear by the method. By adopting the slope of each encoder in the preset speed gear, the appropriate weighting coefficient of the encoder in each preset speed gear can be set according to the original performance of the encoder. Thereby more accurately optimizing the encoder. Different encoders, the weighting coefficient is different, and compared with the use of an empirical value, the slope is more accurate, because the slope is a value calculated according to actual encoded data, the empirical value is generally a statistical value, and the pertinence of the slope is stronger.
In one embodiment, determining a weighting factor of a preset speed gear according to a slope corresponding to each preset speed gear in a rate-speed curve includes: if the current preset speed gear is positioned at two ends of the code rate speed curve, taking the slope between the current preset speed gear and the adjacent preset speed gear as a weighting coefficient corresponding to the current preset speed gear; if the current preset speed gear is located in the middle of the code rate speed curve, calculating the slope between the current preset speed gear and two adjacent preset speed gears respectively, and calculating the weighted value of the slope between the current preset speed gear and the two adjacent preset speed gears to obtain the weighting coefficient corresponding to the current preset speed gear.
Specifically, the preset speed gear located in the middle of the code rate speed curve, the adjacent preset speed gears include two preset speed gears, and the weighted value of the slope of the connection line between the preset speed gear and the adjacent two preset speed gears is adopted as the slope corresponding to the preset speed gear, that is, the weighted coefficient of the preset speed gear. And if the adjacent preset speed gears only comprise one preset speed gear, adopting the slope of a connecting line between the preset speed gear and the only adjacent preset speed gear of the preset speed gear as a weighting coefficient corresponding to the preset speed gear.
In one embodiment, a plurality of preset speed gears are classified to obtain a plurality of classes, each class comprises at least one preset speed gear, and each class corresponds to a preset weighting coefficient; and acquiring a preset weighting coefficient of each preset speed gear according to the category of each preset speed gear.
In this embodiment, step S203 includes: and taking the preset weighting coefficient of each preset speed gear as the weighting coefficient of the BD-rate of the preset speed gear, and calculating to obtain the coding performance corresponding to each preset speed gear according to the weighting coefficient of the BD-rate of each preset speed gear, the BD-rate of the preset speed gear and the speed ratio of the preset speed gear.
Specifically, the preset speed gear is classified to obtain a plurality of classes, each class may include one or more preset speed gears, and the preset speed gears included in each class may correspond to or may be different from each other. The number of the classification categories and the number of the preset speed gears corresponding to each category can be customized. If the encoder comprises nine preset speed gears, three categories can be obtained through average division, each category comprises three preset speed gears, and the three categories can also be divided into a first two gears, a middle five gears and a second two gears which correspond to one category respectively. And can be divided into two types or four types, etc. The preset weighting coefficients corresponding to each category are the same, and the preset weighting coefficients corresponding to each category are empirical values. The empirical value is generally a value summarized by technicians after multiple experiments, and can well represent each category, so that the coding performance of each preset speed gear can be calculated more accurately.
In one embodiment, the preset speed gears include nine gears, and classifying a plurality of the preset speed gears to obtain a plurality of categories includes: dividing a plurality of preset speed gears from slow to fast according to the speed gears to obtain three categories, wherein each category comprises the preset speed gears of the three gears.
Specifically, the preset speed gears in the encoder include nine gears, and the three types are obtained by performing average division from slow to fast according to the speed gears, and the preset weighting coefficients corresponding to each type are different from each other. If the speed represented by the speed gear is faster, the corresponding preset weighting coefficient is smaller.
In one embodiment, the three classes in the gear classification module are a first class, a second class and a third class, respectively, the speed of the first class is faster than that of the second class, the speed of the second class is faster than that of the third class, the preset weighting coefficient corresponding to the third class is greater than that corresponding to the second class, and the preset weighting coefficient corresponding to the second class is greater than that corresponding to the first class.
In a specific embodiment, the method for evaluating an encoder includes:
anchor data of the original encoder was tested:
testing the encoding result (including encoding quality and encoding speed) of an original encoder under a plurality of code rate points (usually 4 commonly used code rate points) under each preset (preset speed gear) as Anchor data; this Anchor data is used as reference data for a new encoder (encoder to be evaluated). The encoder to be evaluated is obtained by adding a new encoding tool/an acceleration algorithm/parameter tuning into an original encoder. Preset includes 9 gears such as very slow (placebo), very slow (veryslow), slow (slow), medium (medium), fast (fast), very fast (veryfast), and very fast (superfast).
The weighting coefficients at each preset are calculated:
the weighting coefficients refer to the weighting coefficients for the BD-rate or speed ratio at each pre-set for which the encoding performance is calculated. Where coding performance = λ × (-BD _ rate) + (speed ratio-100), or coding performance = (-BD _ rate) + λ (speed ratio-100), where λ is a weighting coefficient. The way in which λ is calculated can be replaced with a fixed set of empirical values, such as λ =5 when preset is faster than fast gear, λ =20 when preset is slower than slow gear, λ =10 when preset is between fast and slow. Or determined according to the slope corresponding to each preset, for example, selecting the coding result under a certain preset of the original encoder as an Anchor '(where the Anchor' is different from the Anchor, and the Anchor is used as the reference of the new encoder and contains the coding results of all presets; here, the Anchor 'is used as the reference of different presets of the same encoder and only refers to the coding result of a certain preset), comparing the coding result under each different preset with the Anchor' to obtain a BD-rate and coding rate ratio, and drawing a rate-rate graph of the original encoder, as shown in fig. 3, calculating the slope of each preset point as λ of each preset.
Fig. 3 shows a speed-code rate diagram of an encoder. The figure has 9 different speed gears preset (from the slowest gear placebo to the fastest gear superfast), the abscissa is the code rate increase (BD-rate), the unit is, and the ordinate is the speed increase, the unit is double.
Fig. 3 takes the speed gear "placebo" as the anchor', calculates the BD-rate and speed ratio of each preset relative placebo, for example, the "fast" relative placebo encoding speed is improved by about 60 times, and the code rate is increased by about 28%. And calculating the slope at the fast point as the average value of the slopes of two sections of connecting lines of medium-fast and fast-fast, wherein the average value is about 2.1. And similarly calculating the lambda values of other points, wherein the slopes of the "placebo" and the "superfast" at the two end points are respectively the slope of the connection line between the placebo and the veryslow section and the slope of the connection line between the veryfast and the superfast section. The specific lambda values at each preset in FIG. 3 are shown in Table 1:
table 1 shows the lambda values corresponding to the presets
Figure BDA0002807592340000141
Generally, the slope of the speed-code rate graph is higher and the lambda value is larger as the optimization of the encoder is deeper. Therefore, in the continuous optimization process of the encoder (after continuously adding new tools or algorithms or parameters), the speed-code rate graph needs to be continuously updated.
Testing the encoding result of the new encoder:
and after a new coding tool is added to the original encoder or an acceleration algorithm or parameter tuning is carried out, the original encoder is called a new encoder, and the coding results of the new encoder under each preset and the same other settings of the Anchor are tested. For example, if parameter tuning is performed, the new encoder needs to be tested in accordance with the other parameters except the tuned parameter of the Anchor.
Calculating BD-rate and velocity ratio:
the new encoding result is compared to the Anchor to calculate the BD-rate and the velocity ratio at each preset for the new encoder.
Calculating the coding performance:
and according to the calculated BD-rate and speed ratio under each preset, calculating the encoding performance of the new tool/acceleration algorithm/parameter tuning under each preset by the following formula = lambda x (-BD _ rate) + (speed ratio-100).
The BD-rate and the speed ratio are both in units, and the range of the encoding performance is (- ∞, + ∞).
For example, assuming that an encoder =10 when preset is fast, and it is 4.35% relative to BD-rate of anchor after adding a fast algorithm (the code rate is 4.35% higher under the same distortion), and the speed ratio is 122% (the speed is 1.22 times of anchor), the encoding performance is 10 × (-4.35) + (122-100) = -21.5.
In one embodiment, for the formula: the coding performance = λ × (-BD _ rate) + (speed ratio-100) is deformed, yielding: coding performance = (-BD _ rate) + λ '(speed ratio-100), where λ' is the inverse of λ.
A threshold T (e.g. an empirical value T = 0) may be set, and if the coding performance > T, the coding performance after adding a new tool/accelerating algorithm/parameter is considered to be improved, otherwise, the coding performance is indicated to be reduced. By utilizing the calculated coding performance, quantitative evaluation can be carried out on the coding tool in each preset, a decision on which presets are suitable for using a new coding tool or a new acceleration algorithm is guided, and meanwhile, automatic parameter adjustment of the coder can be guided.
FIG. 2 is a flow diagram illustrating a method for evaluating an encoder, according to one embodiment. It should be understood that, although the steps in the flowchart of fig. 2 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not limited to being performed in the exact order illustrated and, unless explicitly stated herein, may be performed in other orders. Moreover, at least a portion of the steps in fig. 2 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 4, there is provided an apparatus 300 for evaluating an encoder, comprising:
the encoding result obtaining module 301 is configured to obtain encoding results of multiple code rate points corresponding to each preset speed gear of the original encoder, obtain a first encoding result, obtain encoding results of multiple code rate points corresponding to each preset speed gear of the encoder to be evaluated, and obtain a second encoding result;
the data processing module 302 is configured to calculate a BD-rate of each preset speed gear and a speed ratio of each preset speed gear according to a first encoding result and a second encoding result corresponding to each preset speed gear;
the coding performance calculation module 303 is configured to calculate a weighted sum of a BD-rate of each preset speed gear and a speed ratio of each preset speed gear, so as to obtain a coding performance corresponding to each preset speed gear;
and the evaluation module 304 is configured to evaluate the encoder to be evaluated according to the encoding performance of each preset speed gear to obtain an evaluation result.
In one embodiment, the apparatus 300 for evaluating an encoder further comprises:
the reference gear determining module is used for selecting any one preset speed gear from each preset speed gear as a reference gear;
the curve drawing module is used for calculating the BD-rate of each preset speed gear relative to the reference gear and the corresponding speed ratio according to the first coding result, and drawing a code rate speed curve according to the BD-rate of each preset speed gear relative to the reference gear and the corresponding speed ratio;
the coefficient determining module is used for determining the weighting coefficient of the preset speed gear according to the slope corresponding to each preset speed gear in the code rate speed curve;
the coding performance calculation module 303 is configured to use the weighting coefficient of the preset speed gear as the weighting coefficient of the BD-rate, and calculate the coding performance corresponding to each preset speed gear according to the weighting coefficient of the BD-rate, and the speed ratio of each preset speed gear.
In one embodiment, the encoding performance calculating module 303 is configured to, if the current preset speed gear is located at two ends of the rate-speed curve, use a slope between the current preset speed gear and an adjacent preset speed gear as a weighting coefficient corresponding to the current preset speed gear; if the current preset speed gear is located in the middle of the code rate speed curve, calculating the slope between the current preset speed gear and two adjacent preset speed gears respectively, and calculating the weighted value of the slope between the current preset speed gear and the two adjacent preset speed gears to obtain the weighting coefficient corresponding to the current preset speed gear.
In one embodiment, the apparatus 300 for evaluating an encoder further comprises:
the gear classification module is used for classifying a plurality of preset speed gears to obtain a plurality of classes, each class comprises at least one preset speed gear, and each class corresponds to a preset weighting coefficient;
the coefficient acquisition module is used for acquiring a preset weighting coefficient of each preset speed gear according to the category of each preset speed gear;
the coding performance calculation module 303 is configured to use the preset weighting coefficient of each preset speed gear as a weighting coefficient of the BD-rate of the preset speed gear, and calculate, according to the BD-rate weighting coefficient of each preset speed gear, the BD-rate of the preset speed gear, and a speed ratio of the preset speed gear, a coding performance corresponding to each preset speed gear.
In one embodiment, the predetermined speed gears include nine gears,
the gear classification module is used for classifying a plurality of preset speed gears from slow to fast according to the speed gears to obtain three categories, and each category comprises the preset speed gears of three gears.
In one embodiment, the three classes in the gear classification module are a first class, a second class and a third class, respectively, the speed of the first class is faster than the second class, the speed of the second class is faster than the third class, the preset weighting coefficient corresponding to the third class is greater than the preset weighting coefficient corresponding to the second class, and the preset weighting coefficient corresponding to the second class is greater than the preset weighting coefficient corresponding to the first class.
In one embodiment, the coding performance in the coding performance calculation module 303 = λ x (-BD _ rate) + (speed ratio-100), or coding performance = (-BD _ rate) + λ (speed ratio-100), where is a weighting coefficient.
In one embodiment, the evaluation module 304 is configured to evaluate that the performance is improved if the coding performance of the current preset speed gear is greater than a preset threshold; and if the coding performance of the current preset speed gear is smaller than the preset threshold, the performance is reduced as an evaluation result.
FIG. 5 is a diagram illustrating an internal structure of a computer device in one embodiment. The computer device may specifically be the terminal 110 (or the server 120) in fig. 1. As shown in fig. 5, the computer apparatus includes a processor, a memory, a network interface, an input device, and a display screen, which are connected via a system bus. Wherein the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program which, when executed by the processor, causes the processor to implement a method of evaluating an encoder. The internal memory may also have stored therein a computer program that, when executed by the processor, causes the processor to perform a method of evaluating an encoder. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 5 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, the apparatus for evaluating an encoder provided in the present application may be implemented in the form of a computer program, which is executable on a computer device as shown in fig. 5. The memory of the computer device may store various program modules constituting the apparatus of the evaluation encoder, such as an encoding result acquisition module 301, a data processing module 302, an encoding performance calculation module 303, and a price module 304 shown in fig. 4. The computer program constituted by the respective program modules causes the processor to execute the steps in the method of evaluating an encoder of the respective embodiments of the present application described in the present specification.
For example, the computer device shown in fig. 5 may execute, by using the encoding result obtaining module 301 in the apparatus for evaluating an encoder shown in fig. 4, obtaining the encoding results of multiple rate points corresponding to each preset speed gear of the original encoder to obtain a first encoding result, obtaining the encoding results of multiple rate points corresponding to each preset speed gear of the encoder to be evaluated to obtain a second encoding result. The computer device may calculate, by the data processing module 302, a BD-rate of each preset speed gear and a speed ratio of each preset speed gear according to the first encoding result and the second encoding result corresponding to each preset speed gear. The computer device may calculate, by the encoding performance calculating module 303, a weighted sum of the BD-rate of each preset speed gear and the speed ratio of each preset speed gear, so as to obtain the encoding performance corresponding to each preset speed gear. The computer device may perform, by using the evaluation module 304, evaluation of the encoder to be evaluated according to the encoding performance of each preset speed gear, so as to obtain an evaluation result.
In one embodiment, a computer device is provided, comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of any of the embodiments of the method of evaluating an encoder described above when executing the computer program.
In an embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which computer program, when being executed by a processor, is adapted to carry out the steps of any of the embodiments of the method of evaluating an encoder as described above.
In one embodiment, a computer program product or computer program is provided that includes computer instructions stored in a computer-readable storage medium. The computer instructions are read by a processor of a computer device from a computer-readable storage medium, and the computer instructions are executed by the processor to cause the computer device to perform the steps of any one embodiment of the method of evaluating an encoder described above.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above may be implemented by a computer program, which may be stored in a non-volatile computer readable storage medium, and when executed, may include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), rambus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising one of 8230; \8230;" 8230; "does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
The foregoing are merely exemplary embodiments of the present invention, which enable those skilled in the art to understand or practice the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (11)

1. A method of evaluating an encoder, the method comprising:
acquiring coding results of a plurality of code rate points corresponding to each preset speed gear of an original encoder to obtain a first coding result, and acquiring coding results of a plurality of code rate points corresponding to each preset speed gear of an encoder to be evaluated to obtain a second coding result;
according to the first coding result and the second coding result corresponding to each preset speed gear, calculating to obtain the BD-rate of each preset speed gear and the speed ratio of each preset speed gear, wherein the speed ratio is the coding speed of the coder to be evaluated divided by the coding speed of the original coder;
calculating the BD-rate of each preset speed gear and the weighted sum of the speed ratio of each preset speed gear to obtain the coding performance corresponding to each preset speed gear;
and evaluating the encoder to be evaluated according to the encoding performance of each preset speed gear to obtain an evaluation result.
2. The method of claim 1, further comprising:
selecting any one preset speed gear from each preset speed gear as a reference gear;
according to the first coding result, calculating the BD-rate and the corresponding speed ratio of each preset speed gear relative to the reference gear;
drawing a code rate speed curve according to the BD-rate of each preset speed gear relative to the reference gear and the corresponding speed ratio;
determining a weighting coefficient of a preset speed gear according to the slope corresponding to each preset speed gear in the code rate speed curve;
the calculating a weighted sum of the BD-rate of each preset speed gear and the speed ratio of each preset speed gear to obtain the coding performance corresponding to each preset speed gear includes: and calculating to obtain the coding performance corresponding to each preset speed gear according to the weighting coefficient of the BD-rate of each preset speed gear, the BD-rate and the speed ratio by using the weighting coefficient of the preset speed gear as the weighting coefficient of the BD-rate.
3. The method according to claim 2, wherein the determining the weighting coefficients of the preset speed steps according to the slopes corresponding to the preset speed steps in the rate-rate speed curve comprises:
if the current preset speed gear is positioned at two ends of the code rate speed curve, taking the slope between the current preset speed gear and the adjacent preset speed gear as a weighting coefficient corresponding to the current preset speed gear;
if the current preset speed gear is located in the middle of the code rate speed curve, calculating the slope between the current preset speed gear and two adjacent preset speed gears respectively, and calculating the weighted value of the slope between the current preset speed gear and two adjacent preset speed gears to obtain the weighting coefficient corresponding to the current preset speed gear.
4. The method of claim 1, further comprising:
classifying the preset speed gears to obtain a plurality of classes, wherein each class comprises at least one preset speed gear and corresponds to a preset weighting coefficient;
acquiring the preset weighting coefficient of each preset speed gear according to the category of each preset speed gear;
the calculating a weighted sum of the BD-rate of each preset speed gear and the speed ratio of each preset speed gear to obtain the coding performance corresponding to each preset speed gear includes: and taking the preset weighting coefficient of each preset speed gear as the weighting coefficient of the BD-rate of the preset speed gear, and calculating to obtain the coding performance corresponding to each preset speed gear according to the weighting coefficient of the BD-rate of each preset speed gear, the BD-rate of the preset speed gear and the speed ratio of the preset speed gear.
5. The method of claim 4, wherein the preset speed gear comprises a nine speed gear,
the classifying the plurality of preset speed gears to obtain a plurality of categories comprises: and dividing the preset speed gears from slow to fast according to the speed gears to obtain three categories, wherein each category comprises the preset speed gears of the three gears.
6. The method according to claim 5, wherein the three categories are a first category, a second category and a third category, respectively, the first category has a faster speed gear than the second category, the second category has a faster speed gear than the third category, the third category corresponds to the preset weighting factor that is greater than the preset weighting factor that corresponds to the second category, and the second category corresponds to the preset weighting factor that is greater than the preset weighting factor that corresponds to the first category.
7. The method according to any of claims 1-6, wherein the coding performance = λ x ((-BD _ rate) + (speed ratio-100), or the coding performance (= (-BD _ rate) + λ (speed ratio-100), where λ is a weighting coefficient.
8. The method according to claim 1, wherein the evaluating the encoder to be evaluated according to the encoding performance of each preset speed gear to obtain an evaluation result comprises:
if the coding performance of the current preset speed gear is larger than a preset threshold value, the performance is improved according to the evaluation result;
and if the coding performance of the current preset speed gear is smaller than the preset threshold, the performance is reduced as the evaluation result.
9. An apparatus for evaluating an encoder, the apparatus comprising:
the device comprises a coding result acquisition module, a coding result evaluation module and a coding result evaluation module, wherein the coding result acquisition module is used for acquiring the coding results of a plurality of code rate points corresponding to each preset speed gear of an original encoder to obtain a first coding result, acquiring the coding results of a plurality of code rate points corresponding to each preset speed gear of an encoder to be evaluated to obtain a second coding result;
the data processing module is used for calculating the BD-rate of each preset speed gear and the speed ratio of each preset speed gear according to the first coding result and the second coding result corresponding to each preset speed gear, wherein the speed ratio is obtained by dividing the coding speed of the coder to be evaluated by the coding speed of the original coder;
the coding performance calculation module is used for calculating the BD-rate of each preset speed gear and the weighted sum of the speed ratio of each preset speed gear to obtain the coding performance corresponding to each preset speed gear;
and the evaluation module is used for evaluating the encoder to be evaluated according to the encoding performance of each preset speed gear to obtain an evaluation result.
10. A computer arrangement comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1 to 8 when executing the computer program.
11. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 8.
CN202011377850.5A 2020-11-30 2020-11-30 Method and device for evaluating encoder, computer equipment and storage medium Active CN112601074B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011377850.5A CN112601074B (en) 2020-11-30 2020-11-30 Method and device for evaluating encoder, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011377850.5A CN112601074B (en) 2020-11-30 2020-11-30 Method and device for evaluating encoder, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112601074A CN112601074A (en) 2021-04-02
CN112601074B true CN112601074B (en) 2022-10-11

Family

ID=75187387

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011377850.5A Active CN112601074B (en) 2020-11-30 2020-11-30 Method and device for evaluating encoder, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112601074B (en)

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8582647B2 (en) * 2007-04-23 2013-11-12 Qualcomm Incorporated Methods and systems for quality controlled encoding
US8295356B2 (en) * 2008-03-07 2012-10-23 International Business Machines Corporation Method and system for coding mode selection in video compression systems
CN111385563B (en) * 2018-12-29 2022-03-01 广州市百果园信息技术有限公司 Hardware encoder detection method and device and terminal
CN110139111B (en) * 2019-04-25 2021-11-05 上海大学 Evaluation method of video coding algorithm
CN111565315A (en) * 2020-04-14 2020-08-21 上海大学 Evaluation method of video coding algorithm
CN111669594B (en) * 2020-06-23 2022-12-02 浙江大华技术股份有限公司 Video coding method and device and computer readable storage medium

Also Published As

Publication number Publication date
CN112601074A (en) 2021-04-02

Similar Documents

Publication Publication Date Title
CN112365029B (en) Missing value processing method for air conditioner load prediction and air conditioner load prediction system
CN109379240B (en) Internet of vehicles flow prediction model construction method and device and electronic equipment
CN112734494A (en) Sales prediction method and device, terminal equipment and readable storage medium
CN112132485A (en) Index data processing method and device, electronic equipment and storage medium
CN111443163A (en) Interpolation method and device for ozone missing data and interpolation equipment
CN112215398A (en) Power consumer load prediction model establishing method, device, equipment and storage medium
CN112601074B (en) Method and device for evaluating encoder, computer equipment and storage medium
CN105630880A (en) Score data prediction method and apparatus
CN112257958A (en) Power saturation load prediction method and device
CN112633583A (en) Generator set vibration prediction method and device, computer equipment and storage medium
CN110968835A (en) Approximate quantile calculation method and device
CN112601088B (en) Method, apparatus, computer device and storage medium for adjusting encoder parameters
CN112601073B (en) Encoder evaluation method, encoder evaluation device, computer device, and storage medium
CN112584147B (en) Method, apparatus, computer device and storage medium for adjusting encoder parameters
CN115221731A (en) Transformer life evaluation method based on data fusion and Wiener model
CN110795255B (en) Data batch value adjusting method and device, readable storage medium and equipment
CN105338360A (en) Image decoding method and apparatus
CN108599976B (en) Network quality evaluation model construction method and device and computer equipment
CN117288570B (en) Automatic overpressure control method and system based on pressure testing machine
CN111126659A (en) Power load prediction method and system
CN114781278B (en) Electromechanical equipment service life prediction method and system based on data driving
CN116365520B (en) Power transmission line equipment risk prediction method and device and computer equipment
CN115064206B (en) Polyurethane elastomer optimization method and system based on performance evaluation
CN113657677B (en) Transformer oil temperature prediction method and system based on variable weight combination model
CN111260191B (en) Test bed maturity quantization method, device, computer equipment and storage medium

Legal Events

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