CN112422950A - Method and system for testing video encoder - Google Patents

Method and system for testing video encoder Download PDF

Info

Publication number
CN112422950A
CN112422950A CN201910780839.4A CN201910780839A CN112422950A CN 112422950 A CN112422950 A CN 112422950A CN 201910780839 A CN201910780839 A CN 201910780839A CN 112422950 A CN112422950 A CN 112422950A
Authority
CN
China
Prior art keywords
log file
encoding
video encoder
description information
decoding
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.)
Granted
Application number
CN201910780839.4A
Other languages
Chinese (zh)
Other versions
CN112422950B (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.)
Shanghai Bilibili Technology Co Ltd
Original Assignee
Shanghai Bilibili 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 Shanghai Bilibili Technology Co Ltd filed Critical Shanghai Bilibili Technology Co Ltd
Priority to CN201910780839.4A priority Critical patent/CN112422950B/en
Publication of CN112422950A publication Critical patent/CN112422950A/en
Application granted granted Critical
Publication of CN112422950B publication Critical patent/CN112422950B/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

Landscapes

  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • General Health & Medical Sciences (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The embodiment of the application provides a test method of a video encoder, which comprises the following steps: inputting original video into the video encoder; outputting, by the video encoder, a code stream and a first encoding log file corresponding to an entropy encoding layer; inputting the code stream into a video decoder; outputting, by the video decoder, decoded video and a first decoding log file corresponding to an entropy decoding layer; verifying the correctness of the video encoder according to the first encoding log file and the first decoding log file. The embodiment of the application can effectively test the correctness of the video encoder.

Description

Method and system for testing video encoder
Technical Field
Embodiments of the present disclosure relate to the field of computer technologies, and in particular, to a method and a system for testing a video encoder, a computer device, and a computer-readable storage medium.
Background
With the application and development of video services in various fields, video encoding and decoding become one of the key technologies concerned and developed by all parties. Video encoding refers to a method of converting a file in a certain video format into a file in another video format by a specific compression technique. To continuously meet new demands, international standards organizations (standards organizations such as ITU-T, IEC) have jointly formulated a plurality of Video Coding protocols in recent years, for example, h.264/AVC (Advanced Video Coding), h.265/HEVC (High Efficiency Video Coding).
The codec of the video coding protocol can realize the coding and decoding operation of the video stream. The inventors have realized that whether the encoder is able to correctly apply the video coding protocol, i.e. whether it conforms to the video coding protocol, is the core of the encoder, which directly affects the video picture quality and may even result in that the video picture cannot be rendered. Therefore, it is necessary to test and verify whether the encoder can output a correct code stream in compliance with the video coding protocol.
Disclosure of Invention
An object of the embodiments of the present application is to provide a method, a system, a computer device and a computer-readable storage medium for testing a video encoder, which can be used to solve the technical problem of how to evaluate the correctness of the video encoder.
An aspect of an embodiment of the present application provides a method for testing a video encoder, the method including: inputting original video into the video encoder; outputting, by the video encoder, a code stream and a first encoding log file corresponding to an entropy encoding layer; inputting the code stream into a video decoder; outputting, by the video decoder, decoded video and a first decoding log file corresponding to an entropy decoding layer; and verifying the correctness of the video encoder according to the first encoding log file and the first decoding log file.
Optionally, verifying the correctness of the video encoder according to the first encoding log file and the first decoding log file includes: judging whether the description information in the first encoding log file is consistent with the description information in the first decoding log file; if the description information in the first encoding log file is inconsistent with the description information in the first decoding log file, judging that the video encoder cannot correctly encode; and if the description information in the first encoding log file is consistent with the description information in the first decoding log file, judging that the video encoder can correctly encode.
Optionally, verifying the correctness of the video encoder according to the first encoding log file and the first decoding log file includes: judging whether the description information in the first encoding log file is consistent with the description information in the first decoding log file; if the description information in the first encoding log file is inconsistent with the description information in the first decoding log file, judging that the video encoder cannot correctly encode; and if the description information in the first encoding log file is consistent with the description information in the first decoding log file: verifying the correctness of the video encoder according to the second encoding log file and the second decoding log file; the second encoding log file is a log file which is generated by the video encoder in the video encoding process and corresponds to an internal reconstruction layer, and the second decoding log file is a log file which is generated by the video decoder in the video decoding process and corresponds to the internal reconstruction layer.
Optionally, verifying the correctness of the video encoder according to the first encoding log file and the first decoding log file includes: judging whether the description information in the second encoding log file is consistent with the description information in the second decoding log file; if the description information in the second encoding log file is inconsistent with the description information in the second decoding log file, judging that the video encoder cannot correctly encode; and if the description information in the second encoding log file is consistent with the description information in the second decoding log file, judging that the video encoder can correctly encode.
Optionally, the second encoded log file includes a second luminance encoded log file and a second chrominance encoded log file, and the second decoded log file includes a second luminance decoded log file and a second chrominance decoded log file; judging whether the description information in the second encoding log file is consistent with the description information in the second decoding log file or not, including: judging whether the second brightness encoding log file is consistent with the second brightness decoding log file; and judging whether the second chrominance encoding log file is consistent with the second chrominance decoding log file.
Optionally, verifying the correctness of the video encoder according to the first encoding log file and the first decoding log file includes: judging whether the description information in the second encoding log file is consistent with the description information in the second decoding log file; if the description information in the second encoding log file is inconsistent with the description information in the second decoding log file, judging that the video encoder cannot correctly encode; and if the description information in the second encoding log file is consistent with the description information in the second decoding log file, verifying the correctness of the video encoder through a predictive encoding layer.
Optionally, verifying the correctness of the video encoder through the predictive coding layer includes: acquiring a third encoding log file of a prediction encoding layer in the video encoder; obtaining a fourth encoding log of a prediction encoding layer in a reference video encoder generated by a reference video encoder encoding the original video, wherein the video encoder and the reference video encoder have different operating environments; judging whether the description information in the third encoded log file is consistent with the description information in the fourth encoded log file; if the description information in the third encoding log file is inconsistent with the description information in the fourth encoding log file, judging that the video encoder cannot correctly encode; and if the description information in the third encoding log file is consistent with the description information in the fourth encoding log file, judging that the video encoder can correctly encode.
Optionally, the different operating environments include: different coding languages, different thread counts, different operating modes, and/or different operating systems.
Optionally, the third encoded log file includes a third luminance encoded log file and a third chrominance encoded log file, and the fourth encoded log file includes a fourth luminance encoded log file and a fourth chrominance encoded log file; judging whether the description information in the third encoded log file is consistent with the description information in the fourth encoded log file, including: judging whether the third brightness encoding log file and the fourth brightness encoding log file are consistent or not; and judging whether the third chroma encoding log file is consistent with the fourth chroma encoding log file.
Optionally, the video encoder is preconfigured with a pseudo-random number; wherein the pseudo-random number includes a quantization parameter, a sample adaptive compensation parameter, a motion vector prediction parameter, a depth decision parameter of a transform unit, a mode decision parameter of a prediction unit, a depth decision parameter of a coding unit, or a residual.
Optionally, the method further includes: controlling the video encoder to perform encoding operation on the original video according to a preset permutation and combination so as to verify the correctness of the video encoder under the preset permutation and combination; wherein the preset permutation and combination comprises preset parameters corresponding to the coding units, preset parameters corresponding to the transformation units and preset parameters corresponding to the resolution.
Optionally, the video coding protocol includes h.265.
Another aspect of an embodiment of the present application also provides a test system for a video encoder, the system including: a first input module for inputting an original video into the video encoder; a first output module, configured to output, via the video encoder, a code stream and a first encoded log file corresponding to an entropy encoding layer; the second input module is used for inputting the code stream into a video decoder; a second output module for outputting, by the video decoder, the decoded video and the first decoding log file corresponding to the entropy decoding layer; and the verification module is used for verifying the correctness of the video encoder according to the first encoding log file and the first decoding log file.
Yet another aspect of an embodiment of the present application provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the method for testing a video encoder as described in any one of the above when executing the computer program.
Yet another aspect of embodiments of the present application provides a computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, is configured to implement the steps of the method for testing a video encoder as set forth in any one of the above.
According to the test method, the test system, the test computer equipment and the test computer readable storage medium of the video encoder, the video description or explanation of the video encoder is determined to be consistent through the first coding log file of the entropy coding layer of the video encoder and the first decoding log file of the entropy decoding layer of the video decoder, if the video description or explanation of the video encoder and the video decoder is consistent, the code stream output by the video encoder is considered to be the correct code stream conforming to the video coding protocol, namely, the video encoder can encode the correct code stream conforming to the video coding protocol.
Drawings
Fig. 1 schematically shows a flow chart of a testing method of a video encoder according to a first embodiment of the present application;
fig. 2 schematically shows another flow chart of a method of testing a video encoder according to a second embodiment of the present application;
fig. 3 schematically shows another flow chart of a method of testing a video encoder according to a second embodiment of the present application;
fig. 4 schematically shows a flow chart of a method of testing a video encoder according to a second embodiment of the present application;
fig. 5 schematically shows a flow chart of a method of testing a video encoder according to a third embodiment of the present application;
FIG. 6 schematically shows a sub-flowchart of step S516;
fig. 7 schematically shows a block diagram of a test system of a video encoder according to a fourth embodiment of the present application; and
fig. 8 schematically shows a hardware architecture diagram of a computer device suitable for implementing the test method of the video encoder according to the fifth embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application more clearly understood, the present application is further described in detail below with reference to the accompanying drawings and the embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
It should be noted that the description relating to "first", "second", etc. in the present invention is for descriptive purposes only and is not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In addition, technical solutions between various embodiments may be combined with each other, but must be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope of the present invention.
Before the video encoder is put into use, the encoding performance and correctness of the video encoder need to be tested, so that codes and the like can be modified or debugged according to test results. The correctness is classified into one of a plurality of aspects: the video encoder can encode a correct code stream conforming to a video encoding protocol, that is, the code stream encoded by the video encoder can be successfully decoded, and the second is: the video encoder may optionally output a reconstructed video that needs to be identical to the reconstructed video decoded and reconstructed by the video decoder.
Example one
Fig. 1 schematically shows a flow chart of a testing method of a video encoder according to a first embodiment of the present application. It is to be understood that the flow charts in the embodiments of the present method are not intended to limit the order in which the steps are performed. The following description is made by taking a computer device as an execution subject.
As shown in fig. 1, the method for testing a video encoder may include steps S100 to S108, wherein:
step S100, inputting an original video into the video encoder.
The Video Coding protocol corresponding to the Video encoder can be various standards such as H.261, H.262(MPEG-2 or ISO/IEC 13818-2), H.263 and H.264(MPEG-4AVC or ISO/IEC 14496-10), H.265/HEVC (High Efficiency Video Coding) and the like.
And step S102, outputting the code stream and a first coding log file corresponding to the entropy coding layer through the video coder.
And the code stream is obtained by a video encoder according to the original video. And the first coding log file of the entropy coding layer comprises the description information of the video coder on the code stream based on a video coding protocol.
For a hierarchical locking codec error problem, a plurality of levels of encoding log files may be set, for example, a first encoding log file corresponding to an entropy encoding layer. The first encoded log file is a log file generated in an entropy encoding process.
And the entropy coding layer (cabac level) is used for coding the coding control data, the quantized transformation coefficient, the intra-frame prediction data, the motion data and the filter control data into binary systems for storage and transmission. The output data of the entropy coding layer is the code stream after the original video is compressed. Among them, in HEVC, context based Adaptive binary arithmetic Coding (CABAC) is generally performed as an entropy Coding operation.
The embodiment preferentially checks the coding problem from the entropy coding layer, overcomes the current checking mode from the top (from the prediction module), and saves the test resources.
And step S104, inputting the code stream into a video decoder.
It is easy to understand that the video encoder conforming to the standard syntax element is designed, so that the video decoder can correctly decode the video content according to the syntax element, otherwise, the video decoder cannot correctly decode the video content, and the defects of unavailable presentation or picture color blocks and the like occur.
Step S106, outputting, by the video decoder, the decoded video and a first decoding log file corresponding to the entropy decoding layer.
And the decoded video is obtained by a video decoder performing decoding operation according to the code stream. And the entropy decoding layer is reciprocal to the entropy coding layer and is used for decoding the binary code stream output by the entropy coding layer. And the first decoding log file comprises the description information of the video decoder on the code stream based on a video coding protocol. The first decoding log file is a log file generated in an entropy decoding process.
Step S108, according to the first encoding log file and the first decoding log file, verifying the correctness of the video encoder.
It may be compared whether at least part of the content in said first encoding log file and at least part of the content in said first decoding log file are identical or corresponding, and if so, it may be stated that the description/interpretation of the corresponding original video in the encoding process and the decoding process are identical, and thus it may be inferred that the video encoder conforms to the video encoding protocol.
In an exemplary embodiment, as shown in fig. 2, the step S108 includes steps S200 to S204: step S200, determining whether the description information in the first encoded log file is consistent with the description information in the first decoded log file. If not, go to step S202; otherwise, the process proceeds to step S204. Step S202, judging that the video encoder can not correctly encode. Step S204, judging that the video encoder can correctly encode.
In an exemplary embodiment:
the video encoder is preconfigured with pseudo-random numbers, i.e. pseudo-random numbers are used internally in the video encoder to change the video encoding parameters.
The pseudo random number may be a random Quantization Parameter (QP), a random Sample Adaptive Offset (SAO), a random motion vector prediction (motion estimation) parameter, a random Transform Unit (TU) depth decision parameter, a random Prediction Unit (PU) mode decision parameter, a random Coding Unit (CU) depth decision parameter, a residual (residual), and the like.
The random test for verifying the correctness is performed through the pseudo-random number, so that the log information (such as the information in the first encoding log file) generated by the test can be reproduced.
By performing random test on the pseudo-random numbers, whether codes (C or assembly) of TU, CU and PU are correct can be verified; moreover, whether a thread synchronization mechanism is correct under multiple threads can be verified, and the principle is as follows: if the thread synchronization mechanism is incorrect under multiple threads, random motion vector prediction parameters can cause coding and decoding errors, and intra prediction (intra prediction), motion compensation (motion composition) and color block removal (deblocking) can also cause problems.
In an exemplary embodiment, as shown in fig. 3, the method for testing a video encoder may further include the step S100': and controlling the video encoder to perform encoding operation on the original video according to a preset permutation and combination so as to verify the correctness of the video encoder under the preset permutation and combination.
Wherein the preset permutation and combination comprises preset parameters of a Coding Unit (CU), preset parameters of a Transform Unit (TU) and preset parameters of resolution.
For example, a plurality of permutation combinations may be configured according to different CU parameters, different TU parameters, and different resolution parameters. And verifying the correctness of the combination settings of the video encoder on different resolutions, CUs and TUs by using the log files generated in the encoding process and the log files generated in the decoding process, namely whether the video encoder can encode the code stream conforming to the video encoding protocol under the combinations.
The preset permutation combination is as shown in table 1 and table 2:
Figure BDA0002176526780000101
TABLE 1
Width of Height
8 8
16 16
16 24
24 16
24 32
32 24
32 32
352 8
8 352
TABLE 2
Where table 1 shows several exemplary CU and TU parameter combinations and table 2 shows several resolution parameters.
The parameters (MaxCUSize, MaxPartitionDepth, MinCUSize, TULog2MaxSize, TUMaxSize, TULog2MinSize, TUMinSize, tumaxdepth, and tumaxdepth intra) in table 1 are all configuration parameters describing a CU or TU, and specifically refer to the HEVC software reference manual.
Example two
Fig. 4 schematically shows a flow chart of a testing method of a video encoder according to the second embodiment of the present application. The method for testing the video encoder can comprise a step S400 to a step S410, wherein:
step S400, an original video is input into the video encoder.
The video encoder configures a plurality of levels of encoded log files, such as a first encoded log file corresponding to an entropy-encoded layer and a second encoded log file corresponding to a reconstructed layer. The coding error position can be effectively positioned through different coding log files, so that the coding problem can be quickly searched.
Step S402, outputting the code stream and a first coding log file corresponding to the entropy coding layer and a second coding log file corresponding to the reconstruction layer through the video coder.
The second encoding log file is description information of a result of inverse quantization and inverse transformation performed on the code stream after entropy decoding in an encoding process of the video encoder. The second encoded log file is a log file generated during image reconstruction.
And a reconstruction layer (reconstruction level) used for image reconstruction operation.
And step S404, inputting the code stream into a video decoder.
Step S406, outputting, by the video decoder, the decoded video and a first decoded log file corresponding to the entropy-decoded layer and a second decoded log file corresponding to the reconstructed layer.
The second decoding log file is description information of the video decoder on the decoding video based on a video coding protocol. The second decoding log file is a log file generated in an image reconstruction process.
Step S408 is performed to determine whether the description information in the first encoded log file and the description information in the first decoded log file are consistent. If not, go to step S410; otherwise, the process proceeds to step S412.
Step S410, determining that the video encoder cannot correctly encode.
That is, the code corresponding to the entropy coding layer in the video encoder is in error.
Step S412, verifying the correctness of the video encoder according to the second encoding log file and the second decoding log file.
The second encoding log file is a log file generated by the video encoder in the process of encoding the original video and corresponding to an internal reconstruction layer of the video encoder.
The second decoding log file is a log file which is generated by the video decoder in the process of decoding the code stream and corresponds to an internal reconstruction layer of the video decoder.
In the exemplary embodiment, the step S412 includes steps S412A-S412C: step S412A, it is determined whether the description information in the second encoded log file and the description information in the second decoded log file are consistent. If not, the process proceeds to step S412B, otherwise, the process proceeds to step S412C. Step S412B, determining that the video encoder cannot correctly encode. Step S412C, determining that the video encoder can correctly encode.
In an exemplary embodiment, if the video coding protocol is the HEVC protocol, luminance information and chrominance information are recorded separately for the convenience of finding the problem, considering the relationship of TU partitioning of luminance and chrominance in the HEVC protocol. For example, a second encoded log file, optionally including a second luma encoded log file and a second chroma encoded log file. The second luminance-encoded log file is used to record luminance-related log information generated at the reconstruction layer. The second chroma-encoded log file is used to record chroma-related log information generated at the reconstruction layer. Correspondingly, the second decoding log file optionally comprises a second luma decoding log file and a second chroma decoding log file.
Therefore, in step S412, it may be compared whether at least part of the content in the second luma coding log file and at least part of the content in the second luma decoding log file are the same or corresponding, and whether at least part of the content in the second chroma coding log file and at least part of the content in the second chroma decoding log file are the same or corresponding, and if both are the same or corresponding, it is determined that the description/interpretation of the corresponding original video in the encoding process and the decoding process are consistent, and therefore, it may be inferred that the video encoder conforms to the video encoding protocol. In an exemplary embodiment, not shown, the step S412C may include the following steps: judging whether the second brightness encoding log file is consistent with the second brightness decoding log file; and judging whether the second chrominance encoding log file is consistent with the second chrominance decoding log file.
EXAMPLE III
Fig. 5 schematically shows a flow chart of a testing method of a video encoder according to a third embodiment of the present application. The method for testing the video encoder may include steps S500 to S516, wherein:
step S500, inputting an original video into the video encoder.
The video encoder configures encoding log files of a plurality of levels, such as a first encoding log file corresponding to an entropy encoding layer, a second encoding log file corresponding to a reconstruction layer, and a third encoding log file corresponding to a predictive encoding layer. The coding error position can be effectively positioned through different coding log files, so that the coding problem can be quickly searched.
The prediction coding layer is used for executing the following operations: prediction (Prediction), transformation (operations such as Transform Cosine Transform or Transform Sin Transform), and Quantization (Quantization).
Step S502, outputting a code stream and a first coding log file corresponding to an entropy coding layer and a second coding log file corresponding to a reconstruction layer through the video coder.
Step S504, the code stream is input into a video decoder.
Step S506, outputting, by the video decoder, the decoded video and a first decoded log file corresponding to the entropy-decoded layer and a second decoded log file corresponding to the reconstructed layer.
Step S508, determining whether the description information in the first encoded log file and the description information in the first decoded log file are consistent. If not, go to step S510; otherwise, the process proceeds to step S512.
Step S510, determining that the video encoder cannot correctly encode.
That is, the code corresponding to the entropy coding layer in the video encoder is in error.
Step S512, determining whether the description information in the second encoded log file is consistent with the description information in the second decoded log file. If not, go to step S514; otherwise, the process proceeds to step S516.
The second encoding log file is a log file generated by the video encoder in the process of encoding the original video and corresponding to an internal reconstruction layer of the video encoder.
The second decoding log file is a log file which is generated by the video decoder in the process of decoding the code stream and corresponds to an internal reconstruction layer of the video decoder.
Step S514, determining that the video encoder cannot correctly encode.
That is, the corresponding code of the reconstruction layer in the video encoder is in error.
In step S516, the correctness of the video encoder is verified through the predictive coding layer.
Whether codes corresponding to the predictive coding layers of the video encoder are in accordance with the video coding protocol or not is tested through the output consistency of the predictive coding layers.
In an exemplary embodiment, as shown in fig. 6, the step S516 may include steps S600 to S608, wherein:
step S600, acquiring a third encoding log file of a prediction encoding layer in the video encoder;
step S602, obtaining a fourth encoding log of a prediction encoding layer in a reference video encoder generated when a reference video encoder encodes the original video, wherein the video encoder and the reference video encoder have different operating environments.
The different operating environments include: different coding languages, different thread counts, different modes of operation, different operating systems or different hardware environments, etc.
For example, the programming code of the video encoder is C language, and the programming language of the reference video encoder is ASM assembly language; the video encoder is in a development (Debug) mode, the reference video encoder is in a Release (Release) mode; the video encoder runs in an x86 environment, and the reference video encoder runs in a Linux environment; the video encoder is in a single-threaded mode and the reference video encoder is in a multi-threaded mode. Of course, the original video may be encoded by the video encoder at different times, different third and fourth encoding log files corresponding to the prediction encoding layer are generated, and the correctness of the video encoder is evaluated by comparing whether the third and fourth encoding log files are consistent.
Step S604, determining whether the description information in the third encoded log file is consistent with the description information in the fourth encoded log file. If not, go to step S606; otherwise, the process proceeds to step S608.
In an exemplary embodiment, the third encoded log file, optionally, includes a third luma encoded log file and a third chroma encoded log file. The third luminance encoding log file is used to record prediction information on luminance generated at a prediction encoding layer of the video encoder. The third chroma encoding log file is used to record chroma-related prediction information generated at a predictive encoding layer of the video encoder. Correspondingly, the fourth encoded log file optionally includes a fourth luminance encoded log file and a fourth chrominance encoded log file. The fourth luminance encoding log file is used to record prediction information regarding luminance generated at a prediction encoding layer of the reference video encoder. The fourth chroma encoding log file is used to record chroma-related prediction information generated at a predictive encoding layer of the reference video encoder.
Therefore, in step S604, it may be compared whether at least part of the content in the third luma encoded log file and at least part of the content in the fourth luma encoded log file are the same or corresponding, and whether at least part of the content in the third chroma encoded log file and at least part of the content in the third chroma encoded log file are the same or corresponding, and if both are the same or corresponding, the description/interpretation of the original video at the predictive coding layer in the encoding process and the decoding process is consistent, and thus, it may be inferred that the video encoder conforms to the video encoding protocol. In an exemplary embodiment, the step S604 may include the steps of: judging whether the third brightness encoding log file and the fourth brightness encoding log file are consistent or not; and judging whether the third chroma encoding log file is consistent with the fourth chroma encoding log file.
Step S606, determining that the video encoder cannot correctly encode.
That is, the code corresponding to the prediction coding layer in the video encoder is in error.
Step S608, determining that the video encoder can correctly encode.
Example four
Fig. 7 is a block diagram of a test system of a video encoder according to a fourth embodiment of the present application, which may be partitioned into one or more program modules, stored in a storage medium and executed by one or more processors to implement the embodiments of the present application. The program modules referred to in the embodiments of the present application refer to a series of computer program instruction segments capable of performing specific functions, and the following description will specifically describe the functions of each program module in the embodiments.
As shown in fig. 7, the test system 700 of the video encoder may include the following components:
a first input module 702 for inputting original video into the video encoder;
a first output module 704, configured to output, through the video encoder, a code stream and a first encoding log file corresponding to an entropy encoding layer;
a second input module 706, configured to input the code stream into a video decoder;
a second output module 708 for outputting, by the video decoder, the decoded video and the first decoded log file corresponding to the entropy decoded layer; and
a verification module 710, configured to verify correctness of the video encoder according to the first encoding log file and the first decoding log file.
In an exemplary embodiment, the verification module 710 is further configured to: judging whether the description information in the first encoding log file is consistent with the description information in the first decoding log file; if the description information in the first encoding log file is inconsistent with the description information in the first decoding log file, judging that the video encoder cannot correctly encode; and if the description information in the first encoding log file is consistent with the description information in the first decoding log file, judging that the video encoder can correctly encode.
In an exemplary embodiment, the verification module 710 is further configured to: judging whether the description information in the first encoding log file is consistent with the description information in the first decoding log file; if the description information in the first encoding log file is inconsistent with the description information in the first decoding log file, judging that the video encoder cannot correctly encode; and if the description information in the first encoding log file is consistent with the description information in the first decoding log file: verifying the correctness of the video encoder according to the second encoding log file and the second decoding log file; the second encoding log file is a log file which is generated by the video encoder in the video encoding process and corresponds to an internal reconstruction layer, and the second decoding log file is a log file which is generated by the video decoder in the video decoding process and corresponds to the internal reconstruction layer.
In an exemplary embodiment, the verification module 710 is further configured to: judging whether the description information in the second encoding log file is consistent with the description information in the second decoding log file; if the description information in the second encoding log file is inconsistent with the description information in the second decoding log file, judging that the video encoder cannot correctly encode; and if the description information in the second encoding log file is consistent with the description information in the second decoding log file, judging that the video encoder can correctly encode.
In an exemplary embodiment, the second encoded log file includes a second luma encoded log file and a second chroma encoded log file, and the second decoded log file includes a second luma decoded log file and a second chroma decoded log file; a verification module 710 further configured to: judging whether the second brightness encoding log file is consistent with the second brightness decoding log file; and judging whether the second chrominance encoding log file is consistent with the second chrominance decoding log file.
In an exemplary embodiment, the verification module 710 is further configured to: judging whether the description information in the second encoding log file is consistent with the description information in the second decoding log file; if the description information in the second encoding log file is inconsistent with the description information in the second decoding log file, judging that the video encoder cannot correctly encode; and if the description information in the second encoding log file is consistent with the description information in the second decoding log file, verifying the correctness of the video encoder through a predictive encoding layer.
In an exemplary embodiment, the verification module 710 is further configured to: acquiring a third encoding log file of a prediction encoding layer in the video encoder; obtaining a fourth encoding log of a prediction encoding layer in a reference video encoder generated by a reference video encoder encoding the original video, wherein the video encoder and the reference video encoder have different operating environments; judging whether the description information in the third encoded log file is consistent with the description information in the fourth encoded log file; if the description information in the third encoding log file is inconsistent with the description information in the fourth encoding log file, judging that the video encoder cannot correctly encode; and if the description information in the third encoding log file is consistent with the description information in the fourth encoding log file, judging that the video encoder can correctly encode.
In an exemplary embodiment, the different operating environments include: different coding languages, different thread counts, different operating modes, and/or different operating systems.
In an exemplary embodiment, the third encoded log file comprises a third luma encoded log file and a third chroma encoded log file, and the fourth encoded log file comprises a fourth luma encoded log file and a fourth chroma encoded log file; a verification module 710 further configured to: judging whether the third brightness encoding log file and the fourth brightness encoding log file are consistent or not; and judging whether the third chroma encoding log file is consistent with the fourth chroma encoding log file.
In an exemplary embodiment, the video encoder is preconfigured with pseudo-random numbers; wherein the pseudo-random number includes a quantization parameter, a sample adaptive compensation parameter, a motion vector prediction parameter, a depth decision parameter of a transform unit, a mode decision parameter of a prediction unit, or a depth decision parameter of a coding unit.
In an exemplary embodiment, the verification module 710 is further configured to further include: controlling the video encoder to perform encoding operation on the original video according to a preset permutation and combination so as to verify the correctness of the video encoder under the preset permutation and combination; wherein the preset permutation and combination comprises preset parameters corresponding to the coding units, preset parameters corresponding to the transformation units and preset parameters corresponding to the resolution.
In an exemplary embodiment, the video encoding protocol includes h.265.
EXAMPLE five
Fig. 8 schematically shows a hardware architecture diagram of a computer device suitable for implementing the test method of the video encoder according to the fifth embodiment of the present application. In this embodiment, the computer device 800 is a device capable of automatically performing numerical calculation and/or information processing in accordance with a command set or stored in advance. For example, the server may be a smart phone, a tablet computer, a notebook computer, a desktop computer, a monitoring device, a video conference system, a rack server, a blade server, a tower server, or a rack server (including an independent server or a server cluster composed of a plurality of servers), and the like. As shown in fig. 5, computer device 800 includes at least, but is not limited to: the memory 810, the processor 820, and the network interface 830 may be communicatively coupled to each other by a system bus. Wherein:
the memory 810 includes at least one type of computer-readable storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the storage 810 may be an internal storage module of the computer device 800, such as a hard disk or a memory of the computer device 800. In other embodiments, the memory 810 may also be an external storage device of the computer device 800, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), or the like, provided on the computer device 800. Of course, memory 810 may also include both internal and external memory modules of computer device 800. In this embodiment, the memory 810 is generally used for storing a program code of a test method of a video encoder, and various types of application software, such as an operating system installed in the computer apparatus 800. In addition, the memory 810 may also be used to temporarily store various types of data that have been output or are to be output.
Processor 820 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 820 generally serves to control overall operation of the computer device 800, such as performing control and processing related to data interaction or communication with the computer device 800. In this embodiment, the processor 820 is used to execute program codes stored in the memory 810 or process data.
The network interface 830 may include a wireless network interface or a wired network interface, and the network interface 830 is typically used to establish communication links between the computer device 800 and other computer devices. For example, the network interface 830 is used to connect the computer apparatus 800 with an external terminal through a network, establish a data transmission channel and a communication connection between the computer apparatus 800 and the external terminal, and the like. The network may be a wireless or wired network such as an Intranet (Intranet), the Internet (Internet), a Global System of Mobile communication (GSM), Wideband Code Division Multiple Access (WCDMA), a 4G network, a 5G network, Bluetooth (Bluetooth), or Wi-Fi.
It is noted that FIG. 8 only shows a computer device having components 810 and 830, but it is understood that not all of the shown components are required and that more or fewer components may be implemented instead.
In this embodiment, the method for testing the video encoder stored in the memory 810 can be further divided into one or more program modules and executed by one or more processors (in this embodiment, the processor 820) to implement the present invention.
EXAMPLE six
The present embodiment also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the method of testing a video encoder in an embodiment.
In this embodiment, the computer-readable storage medium includes a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. In some embodiments, the computer readable storage medium may be an internal storage unit of the computer device, such as a hard disk or a memory of the computer device. In other embodiments, the computer readable storage medium may be an external storage device of the computer device, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like provided on the computer device. Of course, the computer-readable storage medium may also include both internal and external storage devices of the computer device. In this embodiment, the computer-readable storage medium is generally used for storing an operating system and various types of application software installed in a computer device, such as program codes of a test method of a video encoder in the embodiment. Further, the computer-readable storage medium may also be used to temporarily store various types of data that have been output or are to be output.
It will be apparent to those skilled in the art that the modules or steps of the embodiments of the invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, embodiments of the invention are not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (15)

1. A method of testing a video encoder, the method comprising:
inputting original video into the video encoder;
outputting, by the video encoder, a code stream and a first encoding log file corresponding to an entropy encoding layer;
inputting the code stream into a video decoder;
outputting, by the video decoder, decoded video and a first decoding log file corresponding to an entropy decoding layer; and
verifying the correctness of the video encoder according to the first encoding log file and the first decoding log file.
2. The method of testing of claim 1, wherein verifying the correctness of the video encoder based on the first encoding log file and the first decoding log file comprises:
judging whether the description information in the first encoding log file is consistent with the description information in the first decoding log file;
if the description information in the first encoding log file is inconsistent with the description information in the first decoding log file, judging that the video encoder cannot correctly encode; and
and if the description information in the first encoding log file is consistent with the description information in the first decoding log file, judging that the video encoder can correctly encode.
3. The method of testing of claim 1, wherein verifying the correctness of the video encoder based on the first encoding log file and the first decoding log file comprises:
judging whether the description information in the first encoding log file is consistent with the description information in the first decoding log file;
if the description information in the first encoding log file is inconsistent with the description information in the first decoding log file, judging that the video encoder cannot correctly encode; and
if the description information in the first encoded log file is consistent with the description information in the first decoded log file:
verifying the correctness of the video encoder according to the second encoding log file and the second decoding log file;
the second encoding log file is a log file which is generated by the video encoder in the video encoding process and corresponds to an internal reconstruction layer, and the second decoding log file is a log file which is generated by the video decoder in the video decoding process and corresponds to the internal reconstruction layer.
4. The method of claim 3, wherein verifying the correctness of the video encoder based on the first encoding log file and the first decoding log file comprises:
judging whether the description information in the second encoding log file is consistent with the description information in the second decoding log file;
if the description information in the second encoding log file is inconsistent with the description information in the second decoding log file, judging that the video encoder cannot correctly encode; and
and if the description information in the second encoding log file is consistent with the description information in the second decoding log file, judging that the video encoder can correctly encode.
5. The test method of claim 4, wherein the second encoded log file comprises a second luma encoded log file and a second chroma encoded log file, and wherein the second decoded log file comprises a second luma decoded log file and a second chroma decoded log file; judging whether the description information in the second encoding log file is consistent with the description information in the second decoding log file or not, including:
judging whether the second brightness encoding log file is consistent with the second brightness decoding log file;
and judging whether the second chrominance encoding log file is consistent with the second chrominance decoding log file.
6. The method of testing of claim 4, wherein verifying the correctness of the video encoder based on the first encoding log file and the first decoding log file comprises:
judging whether the description information in the second encoding log file is consistent with the description information in the second decoding log file;
if the description information in the second encoding log file is inconsistent with the description information in the second decoding log file, judging that the video encoder cannot correctly encode; and
and if the description information in the second encoding log file is consistent with the description information in the second decoding log file, verifying the correctness of the video encoder through a predictive encoding layer.
7. The testing method of claim 6, wherein verifying the correctness of the video encoder by a predictive coding layer comprises:
acquiring a third encoding log file of a prediction encoding layer in the video encoder;
obtaining a fourth encoding log of a prediction encoding layer in a reference video encoder generated by a reference video encoder encoding the original video, wherein the video encoder and the reference video encoder have different operating environments;
judging whether the description information in the third encoded log file is consistent with the description information in the fourth encoded log file;
if the description information in the third encoding log file is inconsistent with the description information in the fourth encoding log file, judging that the video encoder cannot correctly encode; and
and if the description information in the third encoding log file is consistent with the description information in the fourth encoding log file, judging that the video encoder can encode correctly.
8. The testing method of claim 7, wherein the different operating environments comprise: different coding languages, different thread counts, different operating modes, and/or different operating systems.
9. The test method of claim 7, wherein the third encoded log file comprises a third luma encoded log file and a third chroma encoded log file, and the fourth encoded log file comprises a fourth luma encoded log file and a fourth chroma encoded log file; judging whether the description information in the third encoded log file is consistent with the description information in the fourth encoded log file, including:
judging whether the third brightness encoding log file and the fourth brightness encoding log file are consistent or not;
and judging whether the third chroma encoding log file is consistent with the fourth chroma encoding log file.
10. The method according to any one of claims 1 to 9, wherein the video encoder is preconfigured with a pseudo-random number;
wherein the pseudo-random number includes a quantization parameter, a sample adaptive compensation parameter, a motion vector prediction parameter, a depth decision parameter of a transform unit, a mode decision parameter of a prediction unit, a depth decision parameter of a coding unit, or a residual.
11. The test method according to any one of claims 1 to 9, further comprising:
controlling the video encoder to perform encoding operation on the original video according to a preset permutation and combination so as to verify the correctness of the video encoder under the preset permutation and combination;
wherein the preset permutation and combination comprises preset parameters corresponding to the coding units, preset parameters corresponding to the transformation units and preset parameters corresponding to the resolution.
12. The method of any one of claims 1 to 9, wherein the video coding protocol comprises h.265.
13. A test system for a video encoder, the system comprising:
a first input module for inputting an original video into the video encoder;
a first output module, configured to output, via the video encoder, a code stream and a first encoded log file corresponding to an entropy encoding layer;
the second input module is used for inputting the code stream into a video decoder;
a second output module for outputting, by the video decoder, the decoded video and the first decoding log file corresponding to the entropy decoding layer; and
and the verification module is used for verifying the correctness of the video encoder according to the first encoding log file and the first decoding log file.
14. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor, when executing the computer program, is adapted to carry out the steps of the method of testing a video encoder according to any of claims 1 to 12.
15. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, is adapted to carry out the steps of the method for testing a video encoder according to any one of claims 1 to 12.
CN201910780839.4A 2019-08-22 2019-08-22 Method and system for testing video encoder Active CN112422950B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910780839.4A CN112422950B (en) 2019-08-22 2019-08-22 Method and system for testing video encoder

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910780839.4A CN112422950B (en) 2019-08-22 2019-08-22 Method and system for testing video encoder

Publications (2)

Publication Number Publication Date
CN112422950A true CN112422950A (en) 2021-02-26
CN112422950B CN112422950B (en) 2022-04-15

Family

ID=74780182

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910780839.4A Active CN112422950B (en) 2019-08-22 2019-08-22 Method and system for testing video encoder

Country Status (1)

Country Link
CN (1) CN112422950B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6364420A (en) * 1986-09-05 1988-03-22 Nippon Telegr & Teleph Corp <Ntt> Testing method for encoding and decoding device
JPS63209358A (en) * 1987-02-26 1988-08-30 Fujitsu Ltd Method for testing coder and decoder
DE69202494D1 (en) * 1991-03-01 1995-06-22 Tektronix Inc Testing of video coders / decoders with a three-dimensional test signal.
US5731839A (en) * 1996-02-06 1998-03-24 David Sarnoff Research Center, Inc. Bitstream for evaluating predictive video decoders and a method of generating same
US20060126725A1 (en) * 2004-12-10 2006-06-15 Weimin Zeng Automated test vector generation for complicated video system verification
US20070168591A1 (en) * 2005-12-08 2007-07-19 Inter-Tel, Inc. System and method for validating codec software
KR20080049376A (en) * 2006-11-30 2008-06-04 삼성전자주식회사 System for automatically verifying codec and method thereof
US20140003488A1 (en) * 2012-06-30 2014-01-02 Research In Motion Limited Position-based context selection for greater-than-one flag decoding and encoding

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6364420A (en) * 1986-09-05 1988-03-22 Nippon Telegr & Teleph Corp <Ntt> Testing method for encoding and decoding device
JPS63209358A (en) * 1987-02-26 1988-08-30 Fujitsu Ltd Method for testing coder and decoder
DE69202494D1 (en) * 1991-03-01 1995-06-22 Tektronix Inc Testing of video coders / decoders with a three-dimensional test signal.
US5731839A (en) * 1996-02-06 1998-03-24 David Sarnoff Research Center, Inc. Bitstream for evaluating predictive video decoders and a method of generating same
US20060126725A1 (en) * 2004-12-10 2006-06-15 Weimin Zeng Automated test vector generation for complicated video system verification
US20070168591A1 (en) * 2005-12-08 2007-07-19 Inter-Tel, Inc. System and method for validating codec software
KR20080049376A (en) * 2006-11-30 2008-06-04 삼성전자주식회사 System for automatically verifying codec and method thereof
US20140003488A1 (en) * 2012-06-30 2014-01-02 Research In Motion Limited Position-based context selection for greater-than-one flag decoding and encoding

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
占海燕: ""视频编解码器的测试技术研究"", 《中国优秀硕士论文信息科技辑》 *
潘其涛,方向忠,余松煜: ""HDTV编码器测试系统的设计与硬件实现"", 《计算机工程》 *

Also Published As

Publication number Publication date
CN112422950B (en) 2022-04-15

Similar Documents

Publication Publication Date Title
US10812806B2 (en) Method and apparatus of localized luma prediction mode inheritance for chroma prediction in video coding
AU2018291135B2 (en) Improved intra prediction in video coding
KR20200125740A (en) Method and apparatus for video coding
TWI827616B (en) Method, apparatus and system for encoding and decoding a transformed block of video samples
JP2019505143A (en) Merging filters for multiple classes of blocks for video coding
JP2017535175A (en) Intra-block copy prediction limits for parallel processing
CN110730351B (en) Method and device for decoding video and storage medium
US8873625B2 (en) Enhanced compression in representing non-frame-edge blocks of image frames
CN110944185A (en) Video decoding method and device, computer equipment and storage medium
CN110798683B (en) Data decoding method and device and data encoding method and device
EP3055999A1 (en) Layer switching in video coding
US10965938B2 (en) Method and apparatus for encoding a video
JP2023174795A (en) Improvement in boundary forced partition
CN110708558A (en) Method and apparatus for representing transform type
US20200053368A1 (en) Method and apparatus for encoding a video
KR20200121366A (en) Method and apparatus for video coding
CN110870312A (en) Method and apparatus for intra coding in video compression
CN115104308A (en) Video coding and decoding method and device
KR20180051567A (en) Methods and devices for encoding and decoding a picture sequence, and corresponding computer program products and computer readable media
KR20220032623A (en) Joint transform coding of multiple color components
CN112422950B (en) Method and system for testing video encoder
CN114827103B (en) Method, apparatus and computer readable medium for media encoding and decoding
CN113055671B (en) Image decoding method, decoder and computer storage medium
CN110868590B (en) Image dividing method and device
CN110557632B (en) Video decoding method, video decoder, and computer-readable 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