Video code stream quality evaluation method, computer equipment and readable medium
By performing macroblock-level quality evaluation on the video code stream, especially the statistics of the central error macroblock, the problem of inaccurate data block control in the video code stream in the prior art is solved, and more efficient decoding and display effects are achieved.
Patent Information
- Application Number
- CN202310801019.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-30
- Publication Date
- 2025-01-07
AI Technical Summary
The existing video code stream control method is not accurate enough in the data block control of the video stream internally, resulting in poor decoding and display effects.
By decoding each frame of the image in the video code stream, the type of error macroblocks, especially the number of center error macroblocks, and evaluating the frame image quality based on this, thereby achieving more refined quality control and improving the decoding display effect .
The unit of quality control is reduced from encoding slices to macroblock levels, improving decoding and display effects, and achieving lower scale control of the code stream error rate by quickly and effectively evaluating the quality of frame images.
Smart Images

Figure CN119277082A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of image processing technology, and specifically to a video code stream quality assessment method, a computer device, and a readable medium. Background Art
[0002] At present, there are several main methods for video error bitstream control: (1) extract important data from the video for separate transmission. Extract key information through parameter set semantics and data segmentation in video standards (such as H.264, HEVC) and then open up another reliable path for separate transmission; (2) add one or more redundant representations of the same macroblock in the same video bitstream through redundant slices. The decoder can compare and select the main slice and redundant slice during reconstruction. Transmitting redundant slices will increase the load and reduce the bitstream transmission efficiency; (3) The resynchronization performance of video frames can be used to enhance error recovery capabilities. The resynchronization performance can be improved by adopting rate-distortion optimization coding and setting intra-frame prediction flags.
[0003] The above-mentioned video code stream control method can achieve efficient video compression performance and low-distortion image effect of the code stream to a certain extent, but the control of the data blocks within the video stream is not accurate. Summary of the invention
[0004] The present disclosure provides a video code stream quality assessment method, a computer device and a readable medium.
[0005] In a first aspect, an embodiment of the present disclosure provides a method for evaluating video bitstream quality, including:
[0006] For each frame image in the video code stream, macroblock decoding is performed on the frame image to obtain multiple macroblocks; in the macroblock decoding process, for an erroneous macroblock generated due to an error in macroblock decoding information, the type of the erroneous macroblock is determined, and the type of the erroneous macroblock at least includes a central erroneous macroblock;
[0007] Determine the number of central erroneous macroblocks of the frame image;
[0008] The quality of the frame image is evaluated based on at least the number of central error macroblocks and the total number of macroblocks in the frame image.
[0009] In another aspect, the embodiment of the present disclosure further provides a video code stream quality assessment device, comprising: a decoding module, a processing module and an assessment module, wherein the decoding module is used to, for each frame image in the video code stream, perform macroblock decoding on the frame image to obtain multiple macroblocks; during the macroblock decoding process, for an error macroblock generated due to an error in macroblock decoding information, determine the type of the error macroblock, wherein the type of the error macroblock at least includes a central error macroblock;
[0010] The processing module is used to determine the number of central error macroblocks of the frame image;
[0011] The evaluation module is used to evaluate the quality of the frame image at least according to the number of central error macroblocks and the total number of macroblocks in the frame image.
[0012] On the other hand, the embodiments of the present disclosure further provide a computer device, comprising: one or more processors; a storage device on which one or more programs are stored; when the one or more programs are executed by the one or more processors, the one or more processors implement the video bitstream quality assessment method as described above.
[0013] On the other hand, the embodiments of the present disclosure further provide a computer-readable medium having a computer program stored thereon, wherein the program, when executed, implements the video bitstream quality assessment method as described above.
[0014] The video bitstream quality assessment method provided by the embodiment of the present disclosure includes: for each frame image in the video bitstream, performing macroblock decoding on the frame image to obtain multiple macroblocks; in the macroblock decoding process, for the error macroblock generated due to the error of macroblock decoding information, determining the type of the error macroblock; determining the number of central error macroblocks of the frame image, and assessing the quality of the frame image at least based on the number of central error macroblocks and the total number of macroblocks of the frame image; by assessing the quality of the video bitstream at the macroblock level, the embodiment of the present disclosure can reduce the unit of quality control from the current coding slice to the macroblock level, so as to facilitate more precise control of the decoding process and improve the decoding and display effects; and based on the central error macroblock located at the center of the frame image, the frame image quality can be quickly and effectively assessed. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 The video code stream quality evaluation process provided by the embodiment of the present disclosure is shown in FIG. Figure 1 ;
[0016] Figure 2 A planar schematic diagram of macroblock division and decoding reference when decoding macroblocks in a frame image;
[0017] Figure 3 A schematic diagram of macroblock decoding errors in a video bitstream;
[0018] Figure 4 The video code stream quality evaluation process provided by the embodiment of the present disclosure is shown in FIG. Figure 2 ;
[0019] Figure 5 A schematic diagram of a video bitstream quality assessment process for a specific example of the present disclosure;
[0020] Figure 6A schematic diagram of the results of the video bitstream quality assessment device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0021] Example embodiments will be described more fully below with reference to the accompanying drawings, but the example embodiments may be embodied in different forms and should not be construed as limited to the embodiments set forth herein. On the contrary, the purpose of providing these embodiments is to make the present disclosure thorough and complete and to enable those skilled in the art to fully understand the scope of the present disclosure.
[0022] As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.
[0023] The terms used herein are only used to describe specific embodiments and are not intended to limit the present disclosure. As used herein, the singular forms "a", "an" and "the" are also intended to include the plural forms, unless the context clearly indicates otherwise. It will also be understood that when the terms "comprising" and / or "made of" are used in this specification, the presence of the features, wholes, steps, operations, elements and / or components is specified, but the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups thereof is not excluded.
[0024] The embodiments described herein may be described with reference to plan views and / or cross-sectional views by means of idealized schematic diagrams of the present disclosure. Therefore, the example illustrations may be modified according to manufacturing techniques and / or tolerances. Therefore, the embodiments are not limited to the embodiments shown in the accompanying drawings, but include modifications of the configurations formed based on the manufacturing process. Therefore, the regions illustrated in the accompanying drawings have schematic properties, and the shapes of the regions shown in the figures illustrate the specific shapes of the regions of the elements, but are not intended to be limiting.
[0025] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and the present disclosure, and will not be interpreted as having an idealized or overly formal meaning unless explicitly defined as such herein.
[0026] The present disclosure provides a method for evaluating the quality of a video stream. Figure 1 As shown, the video code stream quality assessment method includes the following steps:
[0027] Step S11, for each frame image in the video code stream, the frame image is macroblock decoded to obtain multiple macroblocks; in the macroblock decoding process, for the erroneous macroblocks generated due to the error in the macroblock decoding information, the type of the erroneous macroblock is determined, and the type of the erroneous macroblock at least includes the central erroneous macroblock.
[0028] In the embodiment of the present disclosure, the format of the video code stream is the YUV format, which is a unified data processing format specified by the video compression standards formulated by the International Standards Association (ISO) and the International Telecommunication Union (ITU), where Y represents brightness information, and U and V represent chrominance information. If the video code stream is in other color coding formats, such as RGB format and HSV format, the video code stream in other color formats can be converted into a video code stream in YUV format.
[0029] The video code stream to be evaluated is input into the video codec system, and the video codec system performs macroblock decoding on each frame image of the video code stream frame by frame, and decodes a frame image block by block to obtain macroblocks, thereby obtaining multiple macroblocks of the frame image. It should be noted that the macroblock size is preset, and in the macroblock decoding process, the frame image is first sliced to obtain slices, and then the slices are decoded to obtain multiple macroblocks.
[0030] Errors may occur during the macroblock decoding process, which is the main reason for the loss of details of the frame image on the display end. During the macroblock decoding process, if the bitstream is normal, normal macroblocks will be decoded, and if the bitstream is abnormal, erroneous macroblocks will be obtained.
[0031] Figure 2 This is a schematic diagram of the macroblock division and decoding reference when decoding macroblocks in a frame image. Figure 2 As shown, when decoding the macroblocks divided into the current frame image, there are two error macroblocks with error information. The first error macroblock is due to the error information of the macroblock itself, which leads to a problem in decoding the macroblock. The second error macroblock is due to the error information carried by the reference macroblock of the reference frame during the decoding process, which leads to a problem in decoding the corresponding macroblock of the current frame. The embodiment of the present disclosure conducts statistical analysis on the error macroblocks generated in the second case and evaluates the video bitstream.
[0032] Figure 3 This is a schematic diagram of macroblock decoding errors in a video bitstream. Figure 3 As shown, the arrow direction indicates the decoding reference direction of each frame image of the video code stream, and the dotted box shows the error macroblock information in the macroblock decoding process, where the B frame image is the current frame, and the previous P frame image is the reference frame. Two error macroblocks appear in the B frame image decoding, and one of the error macroblocks is caused by the previous reference frame carrying error information. This error macroblock is the error macroblock that needs to be counted in the embodiment of the present disclosure. The other error macroblock is caused by the error in its own decoding information, which is not within the scope of consideration of the embodiment of the present disclosure.
[0033] It should be noted that, during the macroblock decoding process, detecting erroneous macroblocks can be implemented using existing solutions, which will not be described in detail here.
[0034] In the embodiment of the present disclosure, according to the position of the error macroblock in the frame image, it can be divided into a central error macroblock and an edge error macroblock. The central error macroblock refers to an error macroblock located at the center of the frame image, that is, an error macroblock not adjacent to the edge of the frame image, while the edge error macroblock refers to an error macroblock adjacent to the edge of the frame image. For example, Figure 2 The two error macroblocks in the current frame image shown are both edge error macroblocks.
[0035] Step S12, determining the number of central error macroblocks of the frame image.
[0036] In multimedia playback, edge errors in frame images have little impact on image display and can be displayed and played, but errors in the center have a greater impact on image display. Therefore, in the embodiment of the present disclosure, after completing macroblock decoding of the current frame image to obtain each macroblock of the current frame image, the number of central error macroblocks of the current frame image is counted and used as the main basis for evaluating the quality of the frame image.
[0037] Step S13, evaluating the quality of the frame image at least according to the number of central erroneous macroblocks and the total number of macroblocks in the frame image.
[0038] For each frame of image, the quality of the frame of image is evaluated at least according to the number of central error macroblocks of the frame of image and the total number of macroblocks of the frame of image, thereby evaluating the quality of the entire video code stream.
[0039] The video bitstream quality assessment method provided by the embodiment of the present disclosure includes: for each frame image in the video bitstream, performing macroblock decoding on the frame image to obtain multiple macroblocks; in the macroblock decoding process, for the error macroblock generated due to the error of macroblock decoding information, determining the type of the error macroblock; determining the number of central error macroblocks of the frame image, and assessing the quality of the frame image at least based on the number of central error macroblocks and the total number of macroblocks of the frame image; by assessing the quality of the video bitstream at the macroblock level, the embodiment of the present disclosure can reduce the unit of quality control from the current coding slice to the macroblock level, so as to facilitate more precise control of the decoding process and improve the decoding and display effects; and based on the central error macroblock located at the center of the frame image, the frame image quality can be quickly and effectively assessed.
[0040] In some embodiments, Figure 4 As shown, after evaluating the quality of the frame image at least according to the number of central error macroblocks and the total number of macroblocks of the frame image (i.e., step S13), the video code stream quality evaluation method may further include the following steps:
[0041] Step S14: When the frame image quality is unqualified, repair the frame image.
[0042] Repair the frame images with unqualified quality. Specifically, the principle of motion tracking can be used to locate the area affected by the bit error, and the macroblock data in the area can be repaired accordingly to prevent the bit error from spreading further. The video code stream composed of the repaired frame images can be sent to the display end for display, improving the image display effect.
[0043] By evaluating the quality of the video bitstream at the macroblock level and repairing the frame images with unqualified quality, it is possible to control the bitstream error rate and video output quality at a lower scale, perform more precise control over the decoding process, and improve decoding and display effects.
[0044] In some embodiments, the evaluating the quality of the frame image at least based on the number of central erroneous macroblocks and the total number of macroblocks of the frame image (i.e., step S13) includes the following steps: calculating a first error rate based on the number of central erroneous macroblocks and the total number of macroblocks of the frame image, and evaluating the quality of the frame image based on the first error rate and a preset first threshold.
[0045] The first error rate is the error rate of the central error macroblock, which can be obtained by calculating the ratio of the number C of the central error macroblock of the frame image to the total number M of macroblocks of the frame image. The first error rate is compared with a preset first threshold. If the first error rate is less than the first threshold, it is determined that the quality of the frame image is qualified; if the first error rate is greater than or equal to the first threshold, it is determined that the quality of the frame image is unqualified.
[0046] In order to more accurately evaluate the quality of the video bitstream, in some embodiments, after determining the type of the error macroblock (i.e., step S11) and before evaluating the quality of the frame image (i.e., step S13) at least based on the number of central error macroblocks and the total number of macroblocks of the frame image, the video bitstream quality evaluation method may further include the following steps: determining the number of edge error macroblocks of the frame image. That is, after completing the macroblock decoding of the current frame image to obtain each macroblock of the current frame image, not only the number of central error macroblocks of the current frame image but also the number of edge error macroblocks of the current frame image are counted.
[0047] Accordingly, the step of evaluating the quality of the frame image at least according to the number of central error macroblocks and the total number of macroblocks of the frame image (i.e., step S13) includes the following steps: evaluating the quality of the frame image according to the number of central error macroblocks of the frame image, the number of edge error macroblocks of the frame image, and the total number of macroblocks. That is, for each frame image, the quality of the frame image is evaluated according to the number of central error macroblocks of the frame image, the number of edge error macroblocks of the frame image, and the total number of macroblocks of the frame image, so that the quality control of the video bitstream is more stringent.
[0048] The quality of the frame image is evaluated based on the number of central error macroblocks, the number of edge error macroblocks and the total number of macroblocks. The evaluation methods are as follows:
[0049] Method 1: Evaluate by combining the number of central error macroblocks with the number of edge error macroblocks
[0050] In method one, a first error rate is calculated based on the number of central error macroblocks and the total number of macroblocks, and a second error rate is calculated based on the number of edge error macroblocks and the total number of macroblocks. The first error rate is the error rate of central error macroblocks, which can be obtained by calculating the ratio of the number C of central error macroblocks of the frame image to the total number M of macroblocks of the frame image. The second error rate is the error rate of edge error macroblocks, which can be obtained by calculating the ratio of the number E of edge error macroblocks of the frame image to the total number M of macroblocks of the frame image. The quality of the frame image is evaluated based on the first error rate, the second error rate, and the preset first and second thresholds. If the first error rate is less than the first threshold and the second error rate is less than the second threshold, the frame image quality is determined to be qualified; if the first error rate is greater than or equal to the first threshold, or the second error rate is greater than or equal to the second threshold, the frame image quality is determined to be unqualified.
[0051] Method 2: Evaluate by combining the number of central error macroblocks with the total number of error macroblocks
[0052] In the second method, the first error rate is calculated according to the number of central error macroblocks and the total number of macroblocks, and the third error rate is calculated according to the number of central error macroblocks, the number of edge error macroblocks and the total number of macroblocks. The first error rate is the error rate of the central error macroblock, which can be obtained by calculating the ratio of the number C of central error macroblocks of the frame image to the total number M of macroblocks of the frame image. The third error rate is the error rate of all types of error macroblocks, which can be obtained by calculating the ratio of the sum of the number C of central error macroblocks and the number E of edge error macroblocks of the frame image (C+E) to the total number M of macroblocks of the frame image. The quality of the frame image is evaluated according to the first error rate, the third error rate, the preset first threshold and the preset third threshold. Among them, if the first error rate is less than the first threshold and the third error rate is less than the third threshold, it is determined that the quality of the frame image is qualified; if the first error rate is greater than or equal to the first threshold, or the third error rate is greater than or equal to the third threshold, it is determined that the quality of the frame image is unqualified.
[0053] Method 3: Evaluate the number of edge error macroblocks combined with the total number of error macroblocks
[0054] In the third method, the second error rate is calculated according to the number of edge error macroblocks and the total number of macroblocks, and the third error rate is calculated according to the number of center error macroblocks, the number of edge error macroblocks and the total number of macroblocks. The second error rate is the error rate of edge error macroblocks, which can be obtained by calculating the ratio of the number of edge error macroblocks E of the frame image to the total number of macroblocks M of the frame image. The third error rate is the error rate of all types of error macroblocks, which can be obtained by calculating the ratio of the sum of the number of center error macroblocks C and the number of edge error macroblocks E of the frame image to the total number of macroblocks M of the frame image. The quality of the frame image is evaluated according to the second error rate, the third error rate and the preset second threshold and third threshold. Among them, if the second error rate is less than the second threshold and the third error rate is less than the third threshold, it is determined that the quality of the frame image is qualified; if the second error rate is greater than or equal to the second threshold, or the third error rate is greater than or equal to the third threshold, it is determined that the quality of the frame image is unqualified.
[0055] Method 4: Evaluate by combining the number of central error macroblocks, the number of edge error macroblocks, and the total number of error macroblocks
[0056] In the fourth method, the first error rate is calculated according to the number of central error macroblocks and the total number of macroblocks, and the second error rate is calculated according to the number of edge error macroblocks and the total number of macroblocks; and the third error rate is calculated according to the number of central error macroblocks, the number of edge error macroblocks and the total number of macroblocks. The first error rate is the error rate of central error macroblocks, which can be obtained by calculating the ratio of the number C of central error macroblocks of the frame image to the total number M of macroblocks of the frame image. The second error rate is the error rate of edge error macroblocks, which can be obtained by calculating the ratio of the number E of edge error macroblocks of the frame image to the total number M of macroblocks of the frame image. The third error rate is the error rate of all types of error macroblocks, which can be obtained by calculating the ratio of the sum (C+E) of the number C of central error macroblocks and the number E of edge error macroblocks of the frame image to the total number M of macroblocks of the frame image. The quality of the frame image is evaluated according to the first error rate, the second error rate, the third error rate and the preset first threshold, the second threshold and the third threshold. Among them, if the first error rate is less than the first threshold and the second error rate is less than the second threshold and the third error rate is less than the third threshold, then the frame image quality is determined to be qualified; if the first error rate is greater than or equal to the first threshold, or the second error rate is greater than or equal to the second threshold, or the third error rate is greater than or equal to the third threshold, then the frame image quality is determined to be unqualified.
[0057] It should be noted that the smaller the first error rate, the second error rate and the third error rate, the better the frame image quality and the greater the transmittability of the video code stream. The first threshold < the third threshold < the second threshold, for example, the first threshold may be 6%-8%, the second threshold may be 10%, and the third threshold may be 30%.
[0058] In some embodiments, the video bitstream quality assessment method further includes the following steps: during the macroblock decoding process, recording the position of each macroblock.
[0059] The step of determining the type of the erroneous macroblock (ie, step S11) includes the following steps: determining the type of the erroneous macroblock according to the resolution of the frame image, the position of the erroneous macroblock and a preset macroblock resolution size.
[0060] In some embodiments, the resolution of the frame image is q*p, and the resolution size of each macroblock is m*n, where m and n are known quantities and can be given by the block mode of the macroblock in the configuration file or header file. In the embodiment of the present disclosure, the position of each macroblock is represented by the pixel coordinates of the lower left corner of the macroblock, that is, the position of each macroblock is (X i , Y i ), where i is the macroblock identifier, X i is the coordinate of the first direction in the frame image, Y i is the coordinate of the second direction of the frame image, and the first direction is perpendicular to the second direction.
[0061] Accordingly, the method of determining the type of the erroneous macroblock according to the resolution of the frame image, the position of the erroneous macroblock and the preset macroblock resolution size includes: i ≠0 and X i ≠q / m and Y i ≠0 and Y i ≠p / n, the error macroblock is determined to be the central error macroblock; i =0 or X i =q / m, and Y i =0 or Y i =p / n, the error macroblock is determined to be an edge error macroblock.
[0062] To clearly illustrate the solution of the embodiment of the present disclosure, the following Figure 5 , the video bitstream quality assessment process is described in detail. Figure 5 As shown, the video code stream quality assessment process is as follows:
[0063] The video code stream file with a size of 5M, a video frame rate of 30fps, and a YUV format is transmitted to the video codec system. The video codec in the video codec system decodes the frame images in the video code stream file frame by frame. The resolution of the current frame image is q*p. For this frame image, slice segmentation and macroblock decoding are performed based on the video compression standard. If there is no error in the decoding of the current macroblock, continue to decode the next macroblock information of the frame image. The position of each macroblock is recorded during the macroblock decoding process for subsequent judgment of whether the error macroblock is an edge error macroblock or a center error macroblock. The position of the first decoded macroblock is (X0, Y0), and the subsequent macroblocks record the position coordinate changes in turn. If the current macroblock decoding error is caused by an error in the macroblock decoding information, the type of the error macroblock is determined by judging the position of the error macroblock. If X i ≠0 and X i ≠q / m and Y i ≠0 and Y i ≠p / n, it is the central error macroblock; if X i =0 or X i =q / m, and Y i =0 or Y i =p / n, then it is an edge error macroblock. Once an error macroblock is generated, no matter what type of error macroblock it is, its macroblock position must be recorded for subsequent repair, and the number of error macroblocks of the corresponding type (C or E) must be updated. After completing the macroblock decoding of the current frame image and obtaining all the macroblocks of the frame image, the number C of the central error macroblocks and the number E of the edge error macroblocks of the frame image are counted, and combined with the total number M of macroblocks of the frame image, one or more of the first error rate, the second error rate and the third error rate are calculated, and the quality of the frame image is evaluated based on the calculated error rate and the preset video output quality index (i.e., the preset threshold). The frame image with unqualified quality needs to be further repaired, and a repaired video code stream is generated based on each repaired frame image, and the repaired video code stream is sent for display to realize video code stream quality control. In this way, under the premise of knowing the relevant parameters of the input video code stream file, the macroblock decoding and error marking of the code stream sequence are performed, so that the macroblock error rate of the frame image in the code stream can be calculated and the output quality of the video code stream can be controlled.
[0064] The disclosed embodiment inputs the video code stream sequence file into the video codec for decoding. When an error occurs in the macroblock decoding of each frame image, the center error macroblock or edge error macroblock errors in the current frame are counted respectively, and the macroblock error rate of the frame image is calculated based on the number of center error macroblocks, the number of edge error macroblocks and the total number of macroblocks in the current frame image. The quality of the frame image is evaluated by comparing the macroblock error rate with the display end image quality evaluation index (i.e., the preset threshold) to determine the displayability of the current frame image. The disclosed embodiment uses macroblocks as the basic error detection unit to locate the error position, and can accurately control the error code stream.
[0065] The video code stream quality assessment method is applicable to all video codec systems without limiting the video codec standard framework and the internal authority operation of the integrated system.
[0066] The disclosed embodiments locate video bitstream errors at the macroblock level and detect bitstream information at the macroblock level, so that the bitstream error rate and video output quality can be controlled at a lower scale, the decoding process can be controlled more finely and better display effects can be achieved; bitstream errors are detected and error rate calculations are performed at the macroblock level. Compared with slice-level error location, the error information search range can be narrowed from the current coding slice to a certain macroblock, thereby improving decoding and display quality; the macroblock error rate of the frame image is recorded and calculated, and the center error macroblock and the edge error macroblock are marked respectively, so that the bitstream errors are controlled to achieve optimization of the display end.
[0067] The embodiments of the present disclosure can be applied to various electronic terminal devices, such as mobile phone products, car cockpits, IPTV (interactive network television), etc., and can run in a pure software manner on processors such as CPU (Central Processing Unit), GPU (Graphics Processing Unit), DSP (Digital Signal Processing), VPU (Video Process Unit), etc. to improve video display effects.
[0068] The present disclosure also provides a video code stream quality assessment device, such as Figure 6 As shown, the video code stream quality assessment device includes: a decoding module 101, a processing module 102 and an assessment module 103. The decoding module 101 is used to, for each frame image in the video code stream, perform macroblock decoding on the frame image to obtain multiple macroblocks; during the macroblock decoding process, for the error macroblock generated due to the error of the macroblock decoding information, determine the type of the error macroblock, and the type of the error macroblock at least includes the central error macroblock.
[0069] The processing module 102 is used to determine the number of central erroneous macroblocks of the frame image.
[0070] The evaluation module 103 is used to evaluate the quality of the frame image at least according to the number of central error macroblocks and the total number of macroblocks in the frame image.
[0071] The embodiments of the present disclosure also provide a computer device, which includes: one or more processors and a storage device; wherein one or more programs are stored on the storage device, and when the one or more programs are executed by the one or more processors, the one or more processors implement the video bitstream quality assessment method provided in the aforementioned embodiments.
[0072] The embodiments of the present disclosure further provide a computer-readable medium on which a computer program is stored, wherein when the computer program is executed, the video bitstream quality assessment method provided in the aforementioned embodiments is implemented.
[0073] It will be appreciated by those skilled in the art that all or some of the steps in the method disclosed above, the functional modules / units in the device may be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some physical components or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those of ordinary skill in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0074] Example embodiments have been disclosed herein, and although specific terms are employed, they are used and should be interpreted only in a general illustrative sense and not for limiting purposes. In some instances, it will be apparent to those skilled in the art that, unless otherwise expressly stated, features, characteristics, and / or elements described in conjunction with a particular embodiment may be used alone or in combination with features, characteristics, and / or elements described in conjunction with other embodiments. Therefore, it will be understood by those skilled in the art that various changes in form and detail may be made without departing from the scope of the invention as set forth in the appended claims.
Claims
1. A video stream quality assessment method, characterized in that: include: For each frame image in the video code stream, macroblock decoding is performed on the frame image to obtain multiple macroblocks; In the macroblock decoding process, for an erroneous macroblock generated due to an error in macroblock decoding information, determining a type of the erroneous macroblock, wherein the type of the erroneous macroblock at least includes a central erroneous macroblock; Determine the number of central erroneous macroblocks of the frame image; The quality of the frame image is evaluated based on at least the number of central error macroblocks and the total number of macroblocks in the frame image.
2. The method according to claim 1, characterized in that After evaluating the quality of the frame image based at least on the number of central error macroblocks and the total number of macroblocks of the frame image, the method further includes: When the quality of the frame image is unqualified, the frame image is repaired.
3. The method according to claim 1, characterized in that The step of evaluating the quality of the frame image at least according to the number of central error macroblocks and the total number of macroblocks of the frame image comprises: Calculating a first error rate according to the number of central error macroblocks and the total number of macroblocks of the frame image; The quality of the frame image is evaluated according to the first error rate and a preset first threshold.
4. The method according to claim 1, characterized in that The type of the error macroblock further comprises an edge error macroblock. After determining the type of the error macroblock and before evaluating the quality of the frame image at least based on the number of central error macroblocks and the total number of macroblocks of the frame image, the method further comprises: Determine the number of edge error macroblocks of the frame image; The step of evaluating the quality of the frame image at least according to the number of central error macroblocks and the total number of macroblocks of the frame image comprises: The quality of the frame image is evaluated according to the number of central error macroblocks of the frame image, the number of edge error macroblocks of the frame image and the total number of macroblocks.
5. The method according to claim 4, characterized in that The step of evaluating the quality of the frame image according to the number of central error macroblocks of the frame image, the number of edge error macroblocks of the frame image, and the total number of macroblocks includes: Calculating a first error rate according to the number of the central error macroblocks and the total number of the macroblocks, and calculating a second error rate according to the number of the edge error macroblocks and the total number of the macroblocks; The quality of the frame image is evaluated according to the first error rate, the second error rate, and a preset first threshold and a second threshold; wherein, when the first error rate is less than the first threshold and the second error rate is less than the second threshold, it is determined that the frame image quality is qualified; or, Calculating a first error rate according to the number of the central error macroblocks and the total number of macroblocks, and calculating a third error rate according to the number of the central error macroblocks, the number of the edge error macroblocks and the total number of macroblocks; The quality of the frame image is evaluated according to the first error rate, the third error rate, a preset first threshold and a preset third threshold; wherein, when the first error rate is less than the first threshold and the third error rate is less than the third threshold, it is determined that the frame image quality is qualified; or, Calculating a second error rate according to the number of edge error macroblocks and the total number of macroblocks, and calculating a third error rate according to the number of center error macroblocks, the number of edge error macroblocks and the total number of macroblocks; The quality of the frame image is evaluated according to the second error rate, the third error rate, and the preset second threshold and third threshold; wherein, when the second error rate is less than the second threshold and the third error rate is less than the third threshold, it is determined that the frame image quality is qualified; or, Calculating a first error rate according to the number of central error macroblocks and the total number of macroblocks, and calculating a second error rate according to the number of edge error macroblocks and the total number of macroblocks; and calculating a third error rate according to the number of central error macroblocks, the number of edge error macroblocks and the total number of macroblocks; The quality of the frame image is evaluated based on the first error rate, the second error rate, the third error rate and the preset first threshold, second threshold and third threshold; wherein, when the first error rate is less than the first threshold, the second error rate is less than the second threshold and the third error rate is less than the third threshold, the frame image quality is determined to be qualified.
6. The method according to claim 1, characterized in that The method further comprises: during the macroblock decoding process, recording the position of each macroblock; The determining the type of the erroneous macroblock includes: determining the type of the erroneous macroblock according to the resolution of the frame image, the position of the erroneous macroblock and a preset macroblock resolution size.
7. The method according to claim 6, characterized in that The resolution size of each macroblock is m*n, and the position of each macroblock is (X i , Y i ), i is a macroblock identifier; the resolution of the frame image is q*p; The determining the type of the erroneous macroblock according to the resolution of the frame image, the position of the erroneous macroblock and a preset macroblock resolution size includes: In X i ≠0 and X i ≠q / m and Y i ≠0 and Y i ≠p / n, determining the erroneous macroblock as a central erroneous macroblock; In X i =0 or X i =q / m, and Y i =0 or Y i =p / n, it is determined that the error macroblock is an edge error macroblock.
8. A video code stream quality assessment device, characterized in that: include: A decoding module, a processing module and an evaluation module, wherein the decoding module is used to perform macroblock decoding on each frame image in the video code stream to obtain multiple macroblocks; In the macroblock decoding process, for an erroneous macroblock generated due to an error in macroblock decoding information, determining a type of the erroneous macroblock, wherein the type of the erroneous macroblock at least includes a central erroneous macroblock; The processing module is used to determine the number of central error macroblocks of the frame image; The evaluation module is used to evaluate the quality of the frame image at least according to the number of central error macroblocks and the total number of macroblocks in the frame image.
9. A computer device, wherein: include: one or more processors; a storage device having one or more programs stored thereon; When the one or more programs are executed by the one or more processors, the one or more processors implement the video code stream quality assessment method according to any one of claims 1 to 7.
10. A computer readable medium having a computer program stored thereon, wherein: When the program is executed, the video bitstream quality assessment method according to any one of claims 1 to 7 is implemented.