Search

CN-121996544-A - Signal source equipment test signal generation method and related equipment

CN121996544ACN 121996544 ACN121996544 ACN 121996544ACN-121996544-A

Abstract

The invention discloses a signal source equipment test signal generation method and related equipment, and relates to the technical field of test signal generation, wherein the method comprises the steps of obtaining test requirement information comprising a test signal identifier and output resolution of signal source equipment; the method comprises the steps of determining a corresponding XML file according to a test signal identifier, obtaining graphic elements and parameters defined by each shape section in the XML file, converting the parameters of each graphic element into absolute pixel parameters according to output resolution of signal source equipment, drawing the corresponding graphic elements on canvas respectively based on each converted absolute pixel parameter, converting the canvas drawn with all the graphic elements into target image data according to output bit depth defined in the XML file, and generating a test signal based on the target image data. The invention forms a unified and flexible test signal generation mechanism, ensures that software is easy to maintain, and simultaneously efficiently solves the problems of signal file redundancy and complex management.

Inventors

  • Shan Linwei
  • MAO KE
  • LI SIYUAN
  • WANG LIFANG

Assignees

  • 北京数字电视国家工程实验室有限公司

Dates

Publication Date
20260508
Application Date
20251229

Claims (10)

  1. 1. A signal source device test signal generation method, comprising: Acquiring test requirement information comprising a test signal identifier and the output resolution of signal source equipment; Determining a corresponding XML file according to the test signal identifier, wherein at least one graphic element for forming the test signal and parameters of each graphic element are defined in the XML file; obtaining graphic elements and parameters defined by each shape segment in the XML file; Converting parameters of each graphic element into absolute pixel parameters according to the output resolution of the signal source equipment; Drawing corresponding graphic elements on the canvas based on each converted absolute pixel parameter respectively; Converting canvas drawn with all graphic elements into target image data according to the defined output bit depth in the XML file; based on the target image data, a test signal is generated.
  2. 2. The method for generating a signal source device test signal according to claim 1, further comprising performing transparency mixed calculation on pixel values of the overlapping area according to transparency parameters of a currently drawn graphic element if the drawn graphic element overlaps with an existing graphic element on the canvas when the graphic element is drawn on the canvas.
  3. 3. A method of generating a signal source device test signal according to claim 1 or 2, wherein the parameters of the graphic element comprise relative parameters representing the position and/or size of the graphic element, the relative parameters being proportional values expressed in fractional form with respect to the image width or image height to which the output resolution of the signal source device corresponds.
  4. 4. A method of generating a signal source device test signal according to claim 1 or 2, wherein the graphic elements defined in the XML file include at least one of rectangles, circles, windows, color bars, gray scales, single pixel signals, checkerboards, and external pictures.
  5. 5. The system is characterized by comprising a test requirement information acquisition module, a file determination module, a graphic element and parameter acquisition module, a first conversion module, a drawing module, a second conversion module and a test signal generation module; The test requirement information acquisition module is used for acquiring test requirement information comprising a test signal identifier and the output resolution of the signal source equipment; The file determining module is used for determining a corresponding XML file according to the test signal identification, wherein at least one graphic element for forming a test signal and parameters of each graphic element are defined in the XML file; the graphic element and parameter acquisition module is used for acquiring graphic elements and parameters defined by each shape section in the XML file; the first conversion module is used for converting the parameter of each graphic element into an absolute pixel parameter according to the output resolution of the signal source equipment; The drawing module is used for drawing corresponding graphic elements on the canvas based on each converted absolute pixel parameter respectively; The second conversion module is used for converting canvas drawn with all graphic elements into target image data according to the output bit depth defined in the XML file; The test signal generation module is used for generating a test signal based on target image data.
  6. 6. The system of claim 5, wherein the drawing module is further configured to, when drawing the graphic element on the canvas, if the drawn graphic element overlaps with an existing graphic element on the canvas, perform transparency blending calculation on pixel values of the overlapping area according to transparency parameters of the graphic element currently drawn.
  7. 7. A signal source device test signal generating system according to claim 5 or 6, wherein the parameters of the graphic element comprise relative parameters representing the position and/or size of the graphic element, the relative parameters being proportional values expressed in fractional form with respect to the image width or image height corresponding to the output resolution of the signal source device.
  8. 8. A source device test signal generating system according to claim 5 or 6, wherein the graphic elements defined in the XML file include at least one of rectangles, circles, windows, color bars, gray scales, single pixel signals, checkerboards, and external pictures.
  9. 9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing a signal source device test signal generation method according to any one of claims 1 to 4 when the computer program is executed by the processor.
  10. 10. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a computer program which, when executed by a processor, implements a signal source device test signal generating method according to any of claims 1 to 4.

Description

Signal source equipment test signal generation method and related equipment Technical Field The present invention relates to the field of test signal generation technologies, and in particular, to a method for generating a test signal for a signal source device and a related device. Background The signal source device needs to generate various test signals and send the test signals to the tested device for performance verification. The test signals are various and cover different geometric figures, color patterns and dynamic sequences so as to meet various test scenes. How to efficiently and flexibly define, manage and generate these test signals in a signal source device, while ensuring that software is easy to maintain and resource overhead is controllable, is a ubiquitous technical challenge. Currently, common implementations fall into two main categories. One type of approach is to write all the specific parameters and generation logic of the test signal directly in the software source code of the signal source device. After the software is compiled, the signal information is solidified inside the program. Another type of approach is to pre-calculate and generate each test signal as a complete, separate file (e.g., an image file or binary data file) containing the final pixel data. When the software runs, the corresponding signal files are loaded according to the requirements and directly output. However, the above-described existing approaches have significant limitations. For the way in which signal information is written to the code, any addition, deletion or parameter modification of the test signal must be done to modify the source code and recompile the entire software. This results in frequent software version iterations, and version history is enriched with a large number of signal configuration updates independent of core functions, severely interfering with version management and maintenance of the software itself. For the mode of using independent signal files, although separation of signals and software is realized, in order to adapt to different output resolutions, refresh rates or color formats, test signals with the same logic meaning need to be prefabricated into a plurality of file copies with different specifications. This not only causes a multiple increase in the number of signal files, complicating file storage and management, but also greatly increases the workload of signal library creation and post-maintenance. Therefore, a new test signal generating method is urgently needed, which can decouple the definition of the test signal from the software implementation to avoid recompilation of the software due to signal change, and meanwhile, the method can support flexible adaptation of the signal definition to avoid generating and storing a large number of redundant signal files for different output specifications, thereby obviously reducing the complexity of manufacturing and maintaining the test signal on the premise of ensuring the stability of the software. Disclosure of Invention The invention aims to solve the technical problems of the prior art, and particularly provides a signal source equipment test signal generation method and related equipment, wherein the method comprises the following steps of: 1) In a first aspect, the present invention provides a method for generating a test signal of a signal source device, which specifically includes the following technical scheme: The method comprises the steps of obtaining test requirement information comprising test signal identification and output resolution of signal source equipment, determining a corresponding XML file according to the test signal identification, defining at least one graphic element and parameters of each graphic element for forming a test signal in the XML file, obtaining the graphic element and the parameters defined by each shape section in the XML file, converting the parameters of each graphic element into absolute pixel parameters according to the output resolution of the signal source equipment, drawing the corresponding graphic element on a canvas respectively based on each converted absolute pixel parameter, converting the canvas drawn with all the graphic elements into target image data according to the output bit depth defined in the XML file, and generating the test signal based on the target image data. The signal source equipment test signal generation method provided by the invention has the beneficial effects that: The corresponding XML file is determined according to the test signal identification, the specific composition of the test signal is defined as graphic elements and parameters and stored in the independent XML file, so that the complete decoupling of the test signal information and the signal source equipment software code is realized. When the test signal is required to be added, modified or deleted, only the corresponding XML file is required to be edited or replaced, and the softw