WO2011015096A1 - Method and device for analyzing code streams - Google Patents

Method and device for analyzing code streams Download PDF

Info

Publication number
WO2011015096A1
WO2011015096A1 PCT/CN2010/074593 CN2010074593W WO2011015096A1 WO 2011015096 A1 WO2011015096 A1 WO 2011015096A1 CN 2010074593 W CN2010074593 W CN 2010074593W WO 2011015096 A1 WO2011015096 A1 WO 2011015096A1
Authority
WO
WIPO (PCT)
Prior art keywords
code stream
decoder
data
interface unit
user
Prior art date
Application number
PCT/CN2010/074593
Other languages
French (fr)
Chinese (zh)
Inventor
赵新中
陈家大
马明刚
万宜
陈展
梁炜新
张俊
何东岭
谢宜昊
Original Assignee
炬力集成电路设计有限公司
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 炬力集成电路设计有限公司 filed Critical 炬力集成电路设计有限公司
Publication of WO2011015096A1 publication Critical patent/WO2011015096A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/157Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/162User input
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/44Decoders specially adapted therefor, e.g. video decoders which are asymmetric with respect to the encoder

Definitions

  • the present invention relates to the field of audio and video codec technology, and in particular, to a method and apparatus for code stream analysis. Background of the invention
  • an object of the present invention is to provide a code stream analysis method and apparatus for analyzing a multimedia code stream conforming to various commonly used coding standards.
  • a code stream analyzing apparatus includes:
  • Decoder library consisting of more than one decoder and a unified interface unit, each solution
  • the code device is configured to decode an encoded format code stream, and extract data in the code stream
  • the unified interface unit includes at least an identification interface unit and a parameter set information interface unit, and the identification interface unit is configured to use attribute information according to the code stream. Identifying the format of the code stream
  • the parameter set information interface unit is configured to output the data extracted from the code stream;
  • a component module configured to invoke a unified interface unit of the decoder library according to an operation instruction from the user interface module, select a corresponding decoder by the identification interface unit of the unified interface unit to decode, and receive the decoder to pass
  • the data output by the parameter set information interface unit of the unified interface unit outputs the data to the user interface module
  • a user interface module configured to provide a human-machine interaction interface visible to the user, receive an operation indication from the user, output the operation indication to the component module, and display data from the component module on the human-computer interaction interface.
  • the component module further includes: an analyzing unit, configured to analyze data from the decoder library, and output the analysis result to the user interface module.
  • the component module may further include: a statistical unit, configured to perform related statistical calculation on the data from the decoder library according to a predefined or user-defined formula, and output the calculation result to the user interface module.
  • a statistical unit configured to perform related statistical calculation on the data from the decoder library according to a predefined or user-defined formula, and output the calculation result to the user interface module.
  • the unified interface unit further includes:
  • a main information interface unit configured to acquire a primary node in the code stream and an upper node of the primary node, and list syntax hierarchy information of the code stream;
  • the primary node is a pre-designated nth node in the code stream syntax level, n Natural number;
  • the primary node decoding interface unit is configured to decode the currently selected primary node and the lower node of the primary node.
  • the code stream is a video code stream
  • the main node is a grammatical structure node corresponding to the frame.
  • the component module further includes: an editing module, configured to modify, according to a user instruction, header information in data from the decoder library;
  • the unified interface unit further includes: a save file interface unit, configured to save the modified code stream according to the modification implemented by the editing module.
  • the unified interface unit further includes: a decoder decoder interface unit for releasing software and hardware resources used by the decoder.
  • the unified interface unit further includes: a decoder information interface unit, configured to provide related information in a decoder decoding process.
  • the user interface module further includes:
  • the code stream hierarchy represents an interface, and the tree structure represents the syntax structure of the code stream; and/or the data list interface, the semantics of each parameter of the code stream is given by a table; and/or the decoding result represents an interface, and the decoding result is displayed by the image. .
  • the step of displaying the data extracted from the code stream on the human-computer interaction interface visible to the user includes:
  • the data is analyzed, and the analysis result is displayed on the human-computer interaction interface.
  • the step of displaying the data extracted from the code stream on the human-computer interaction interface visible to the user includes:
  • the data is subjected to relevant statistical calculation, and the calculation result is displayed on the human-computer interaction interface.
  • the step of decoding the code stream with the selected decoder and extracting data in the code stream includes:
  • the primary node is a pre-designated nth node in the code stream syntax hierarchy, and n is a natural number.
  • the listing of the syntax hierarchy information of the code stream further includes:
  • the primary node selected by the user is used as the current primary node, and the lower node of the current primary node is decoded.
  • the method further includes:
  • the header information in the data is modified, and the modified code stream is saved.
  • a plurality of decoders are arranged in the code stream analyzing device, and various decoders are operated by using a unified platform, and the corresponding decoder is automatically recognized for decoding by the input code stream, thereby implementing various supports.
  • the invention adopts the on-demand decoding method, can accurately respond to the analysis requirements of the user, and greatly improves the operating efficiency of the tool; the solution of the invention can perform information statistics on the basis of analyzing the code stream data. , code stream editing and other operations, more enriched the function of code stream analysis.
  • FIG. 1 is a structural block diagram of a code stream analysis apparatus according to an embodiment of the present invention.
  • FIG. 2 is a schematic diagram showing a main interface displayed by the user interface module 103 of the code stream analyzing device shown in FIG. 1;
  • Figure 3 is a schematic diagram showing the syntax hierarchy of the mpeg4 format code stream
  • FIG. 4 is a flowchart of operation of a code stream analyzing apparatus according to an embodiment of the present invention.
  • FIG. 5 is a flowchart of code stream analysis according to an embodiment of the present invention. Mode for carrying out the invention
  • the code stream analyzing apparatus mainly includes a decoder library 101, a component module 102, and a user interface module 103.
  • the decoder library 101 includes more than one decoder, each decoder corresponding to a code stream of one format for decoding the code stream of the format and extracting data in the code stream.
  • the data includes multimedia decoded data extracted from the code stream packet payload, and related information extracted from the code stream header.
  • the code stream format may include, but is not limited to, H.264, mpegl, mpeg2, mpeg4, mp3, mp4, wmv, and the like.
  • Each of the decoders provides a unified interface unit; the interface unit includes at least an identification interface unit and a parameter set information interface unit, and the identification interface unit is configured to identify a format of the code stream according to the attribute information of the code stream; the parameter set information interface unit is used for external Output data extracted from the code stream.
  • the component module 102 is configured to call the identification interface unit of the decoder library 101 to select a corresponding decoder, and according to an operation instruction from the user interface module 103, call the interface unit corresponding to the decoder library 101, and receive data from the decoder library 101. The data is output to the user interface module 103.
  • the component module 102 can provide the following functional units for analyzing, counting, and editing operations: an analyzing unit, configured to analyze the decoded data, and display related parameter information of the decoded data, for example, displaying the size of the current frame image, and encoding compression efficiency.
  • an analyzing unit configured to analyze the decoded data
  • display related parameter information of the decoded data for example, displaying the size of the current frame image, and encoding compression efficiency.
  • a statistical unit configured to perform related statistical calculation according to the decoded data and/or the header information according to a predefined or user-defined formula, and display the calculation result in the code stream result representation interface or the data list interface, for example, the specificity in the statistical code stream
  • Frame types include I type, P type, and B type.
  • Editing unit used to modify the header information, such as changing the timestamp of the current frame (time_stamp).
  • the user interface module 103 is configured to provide a human-machine interaction interface visible to the user, and the code stream data is Visually showing, receiving an operation indication from a user, outputting the operation indication to the component module 102; and displaying data from the component module 102 on the human-computer interaction interface.
  • the main interface displayed by the user interface module 103 can be divided into three parts, namely, a code stream layer structure structure interface 201, a data list interface 202, and a decoding result display interface 203, as shown in FIG.
  • the code stream hierarchy representation interface 201 represents the syntax structure of the code stream to be analyzed in a tree structure.
  • the data list interface 202 provides the semantics of each parameter of the code stream in a table, and the decoding result indicates that the interface 203 displays the decoding with an image. result.
  • Multimedia coded data has the characteristics of high compression rate, and decoding is a process that is quite computationally consuming.
  • the following uses the common mpeg4 format as an example to illustrate the structural characteristics of the multimedia stream.
  • Figure 3 graphically shows the syntax hierarchy of the mpeg4 format stream according to the mpeg4 video stream standard - ISO/IEC 14496-2.
  • mpeg4 ASP Bitstream represents a code stream conforming to the mpeg4 ASP profile
  • VOSi represents the i-th visual object sequence (Visual Object Sequence) of this code stream
  • VOi represents the i-th visual object in VOSi
  • VOSi represents the i-th visual object layer in VOi
  • VOPi represents the i-th visual object plane in VOLi
  • MBi represents the i-th macroblock in VOPi ( Macro Block )
  • SB1 to SB6 represent six sub-blocks in the MBi (Sub-Block).
  • the multimedia data has a code stream syntax hierarchy similar to that of Figure 3, which is dictated by various compression standards.
  • the method adopted in the prior art generally only analyzes a part of content in the code stream, for example, the analysis content is limited to the file header and the data packet header; or, only the bit rate information of the code stream is analyzed. This way the data obtained from the code stream has great limitations.
  • the solution of the invention can analyze all the information in the code stream, but adopts an on-demand analysis method for saving computing resources.
  • the present invention refers to each unit on each type of multimedia data syntax structure as a "node” or "grammar node.”
  • the code stream includes nodes of multiple levels, and one of the nodes is defined as a "main node” or a "main node.” For example, in a video stream, the node corresponding to the frame is called a "trunk node". Or "primary node", in Figure 3, the node corresponding to the frame is a VOP.
  • the decoder library contains more than one decoder, which decodes the code stream as required by the component module.
  • the decoder library of the embodiment of the present invention includes an H.264 decoder, an mp3 decoder, an mpegl/2 decoder, and a jpeg decoder.
  • Each decoder library is designed with multiple interface units. For each decoder, it should have the following interface unit:
  • Each code stream belongs to a class of coding standards, so each code stream has a unique start code to identify which coding format it belongs to.
  • the start code is the attribute information described above.
  • the hexadecimal number ⁇ is the starting code of the Visual Object Sequence, which identifies the beginning of a VOS for the mpeg4 stream.
  • the decoder will judge whether the decoder supports decoding of the current code stream according to the encoding format supported by itself.
  • the main information interface unit obtains the main node in the code stream and the upper node of the main node, and lists the syntax hierarchy information of the code stream.
  • Main node decoding interface unit Decode the currently selected main node. If there is a stream syntax level below the node, decode the nodes of these levels, such as the main node - there are two layers of Macro Block and Sub-Block under the frame. node.
  • Each node has its own different parameter set information, audio data as well as audio pulse data information, video and image data information. This interface of the decoder will provide this information.
  • Decoder information interface unit Used to provide related information in the decoding process of the decoder, so as to implement functions such as error control and decoding state control. For example, the decoder can output an error status value when an error occurs; when the decoding takes a long time, the decoding progress can be provided through this interface.
  • Turn off the decoder interface unit When replacing the decoder or turning off the analysis tool, release the software and hardware resources used by the decoder.
  • the present invention designs the operation flow of the code stream analyzing device in an on-demand manner, as shown in FIG. 4, and includes the following steps:
  • Step 401 Open phase: selecting, according to attribute information of the input code stream, a decoder matching the attribute information from more than one decoder; decoding the code stream by using the selected decoder, and extracting the code The data in the stream.
  • Step 402 Analysis phase: displaying the data extracted from the code stream on a human-computer interaction interface visible to the user.
  • Step 403 Close phase: Close the stream file, close the decoder, and release the resources occupied by the program. If the user edits the stream, the modified content is saved.
  • Step 501 Select a decoder that matches the attribute information according to the attribute information of the input code stream.
  • each decoder includes an identification sub-module for determining whether the attribute information of the input code stream matches the decoder.
  • the component module selects the decoder that can support this code stream by calling the identification submodule of each decoder. After finding a decoder capable of supporting the current code stream, the component module will call the decoder to analyze the code stream, and subsequent decoding actions are performed by the decoder; if none of the decoders can support the current code stream, then Indicates that the code stream is not supported, and the corresponding prompt information is displayed through the user interface module.
  • Step 502 Acquire main stream information by the decoder supporting the current code stream.
  • the main information of the code stream can be defined by each decoder separately, and can be generally defined as: related information of the primary node and the upper node of the primary node.
  • related information of the primary node and the upper node of the primary node For example, for a video stream, the main information of the stream is defined at the level of the frame and the frame, in particular, mpeg4 ASP Bitstream
  • the main information of the code stream is defined in four layers of VOP, VOL, VO, and VOS. This definition determines the decoding complexity when the code stream is first turned on, and is therefore one of the factors that affect the efficiency of the tool.
  • Step 503 Determine the current node according to the user's selection, determine whether the current node is the primary node according to the predefined primary node, and if yes, execute step 504; otherwise, go to step 505.
  • the specific implementation manner is as follows: The user clicks on the code stream hierarchy to represent a certain node displayed in the interface, and the user interface module sends the information of the user clicking the node to the component module, and after receiving the information of the user interface module, the component module will use The node clicked as the current node, and the decoder supporting the current code stream is called to determine whether the current node is the main node defined by the decoder, and the decoder returns the judgment result to the component module.
  • Step 504 The component module invokes the decoder to obtain the child node information under the current primary node. This embodiment is shown in Figure 3. The primary node will contain two layers of child nodes.
  • Step 505 The component module calls the decoder to decode the current code stream, and obtains the header information of the syntax node and the decoded data.
  • Each syntax node of the code stream has corresponding header information.
  • the VOL node of the mpeg4 ASP Bitstream will have a frame type (picture_type), a timestamp (time_stamp), a width (width), a height (height), and the like. Department information.
  • the decoded data such as the audio code stream, is decoded by pulse code modulation waveform data, and the video code stream is decoded by image data of a certain chromaticity space.
  • Step 506 Perform analysis, statistics, and/or editing operations on the header information and data.
  • the header information and the decoded data are acquired, the header information is displayed in the form of a character string on the data list interface, and the decoded data is displayed in the form of a waveform or an image on the code stream result presentation interface.
  • Step 507 When the user performs the editing operation of the code stream and then requests to save the copy of the modified code stream file, the modified code stream file is saved. This step is only performed when the user performs a stream editing operation, which is an optional step.
  • Step 508 The user continues to click on the code stream syntax node for analysis, and the process will be transferred. Go to step 503, if the user does not click on other code stream syntax nodes, step 509 is performed. Step 509: After the user opts out, the component module will release the decoder resource, close the decoder, release the runtime resources, and exit the program.
  • the code stream analysis method and apparatus proposed by the present invention can analyze a plurality of audio files, video files, and image data.
  • the code stream information is visually displayed to the user.
  • the sample rate, rate, and other parameters of the file can be analyzed to analyze the value of each sample point.
  • the encoder, frame type, and macroblock type can be read. With equal parameters, you can observe the image of each frame, the motion vector of each macroblock, the macroblock chrominance space data, and so on.
  • the architecture of the code stream analyzing device includes a user operating window, a component and a decoder library, which solves the problems of multiple decoders and multiple data types running and sharing on the same platform.
  • the solution to this problem can improve the compatibility and functionality of the stream analysis device.
  • the “on-demand decoding” approach to process design accurately responds to the user's analytical needs and greatly improves operational efficiency.
  • the invention designs seven interfaces for the decoder, and unifies the decoders of different code stream formats, and provides the functions of code stream analysis, information statistics and code stream editing.
  • the code stream analysis scheme according to the present invention supports analysis of code stream data, information statistics, and code stream editing, and is characterized by rich functions, good compatibility, and easy expansion.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

A device for analyzing code streams is disclosed by the present invention, comprising a decoder library consisting of more than one decoder, a component module, and a user interface module. The component module is used for selecting corresponding decoders according to inputted code streams, invoking an interface unit corresponding to the decoder library according to an operation instruction from the user interface module, receiving data from the decoder library, and outputting the data to the user interface module; the user interface module is used for providing a human-computer interaction interface which is visible for users, receiving operation instructions from the users, outputting the operation instructions to the component module, and displaying data from the component module on the human-computer interaction interface. A method for analyzing code streams is also disclosed by the present invention, which is implemented based on the device for analyzing code streams. The device for analyzing code streams provided by the present invention can support multimedia code streams with multiple types of coding standards.

Description

一种码流分析方法和装置  Code stream analysis method and device
技术领域 Technical field
本发明涉及音视频编解码技术领域, 特别涉及一种码流分析的方法 和装置。 发明背景  The present invention relates to the field of audio and video codec technology, and in particular, to a method and apparatus for code stream analysis. Background of the invention
近年来, 随着集成电路技术的不断革新和发展, 消费电子产业得到 了长足的发展。 消费电子产品所具有的一大功能是对多媒体内容的兼 容, 因此各大消费电子产品厂商十分重视多媒体解码器和编码器的研 发。 在相关研发过程中, 获取并分析多媒体码流中的编码信息都是十分 重要的环节, 该环节被称为码流分析。  In recent years, with the continuous innovation and development of integrated circuit technology, the consumer electronics industry has made considerable progress. One of the major functions of consumer electronics is the compatibility of multimedia content. Therefore, major consumer electronics manufacturers attach great importance to the development of multimedia decoders and encoders. In the relevant research and development process, it is very important to acquire and analyze the coded information in the multimedia code stream. This link is called code stream analysis.
涉及多媒体编解码器的公司都发布了用于进行码流分析的工具, 但 这些公司发布的码流分析工具的适用范围一般仅限于本公司的编码标 准, 只能支持一种或^艮少的几种编码格式码流。 而目前流行的编码标准 分属好几个公司, 没有哪一种码流分析工具可以支持全部常用的编码标 准。 目前进行码流分析时,使用码流分析工具 Α对符合 A公司编码标准 的多媒体码流进行分析; 当需要对符合 B公司编码标准的多媒体码流进 行分析时, 只能换用另一个码流分析工具, 使用起来很不方便。 发明内容  Companies involved in multimedia codecs have released tools for code stream analysis, but the code stream analysis tools released by these companies are generally limited to the company's coding standards, and can only support one type or less. Several encoding format streams. The current popular coding standards belong to several companies, and no single stream analysis tool can support all common coding standards. At present, when performing code stream analysis, the code stream analysis tool is used to analyze the multimedia code stream conforming to the company A coding standard; when the multimedia code stream conforming to the company B coding standard needs to be analyzed, only another code stream can be exchanged. Analysis tools are very inconvenient to use. Summary of the invention
有鉴于此, 本发明的目的在于, 提出一种码流分析方法和装置, 可 以对符合各种常用编码标准的多媒体码流进行分析。 本发明实施例提出的一种码流分析装置包括:  In view of the above, an object of the present invention is to provide a code stream analysis method and apparatus for analyzing a multimedia code stream conforming to various commonly used coding standards. A code stream analyzing apparatus according to an embodiment of the present invention includes:
解码器库, 由多于一个的解码器和统一的接口单元所组成, 每个解 码器用于对一种编码格式码流进行解码, 提取出码流中的数据; 所述统 一的接口单元至少包括识别接口单元以及参数集信息接口单元, 识别接 口单元用于根据码流的属性信息识别码流的格式; 参数集信息接口单元 用于输出从码流中提取的数据; Decoder library, consisting of more than one decoder and a unified interface unit, each solution The code device is configured to decode an encoded format code stream, and extract data in the code stream; the unified interface unit includes at least an identification interface unit and a parameter set information interface unit, and the identification interface unit is configured to use attribute information according to the code stream. Identifying the format of the code stream; the parameter set information interface unit is configured to output the data extracted from the code stream;
组件模块, 用于根据来自用户界面模块的操作指示, 调用解码器库 的统一的接口单元, 由所述统一的接口单元的识别接口单元选择相应的 解码器进行解码, 并接收所述解码器通过所述统一的接口单元的参数集 信息接口单元输出的数据, 将所述数据输出至用户界面模块;  a component module, configured to invoke a unified interface unit of the decoder library according to an operation instruction from the user interface module, select a corresponding decoder by the identification interface unit of the unified interface unit to decode, and receive the decoder to pass The data output by the parameter set information interface unit of the unified interface unit outputs the data to the user interface module;
用户界面模块, 用于提供用户可见的人机交互界面, 接收来自用户 的操作指示, 将所述操作指示输出至组件模块; 以及在所述人机交互界 面上显示来自组件模块的数据。  a user interface module, configured to provide a human-machine interaction interface visible to the user, receive an operation indication from the user, output the operation indication to the component module, and display data from the component module on the human-computer interaction interface.
所述组件模块进一步包括: 分析单元, 用于对来自解码器库的数据 进行分析, 将分析结果输出至用户界面模块。  The component module further includes: an analyzing unit, configured to analyze data from the decoder library, and output the analysis result to the user interface module.
所述组件模块还可以进一步包括: 统计单元, 用于根据预先定义或 者用户自定义的公式, 对来自解码器库的数据进行相关统计计算, 并将 计算结果输出至用户界面模块。  The component module may further include: a statistical unit, configured to perform related statistical calculation on the data from the decoder library according to a predefined or user-defined formula, and output the calculation result to the user interface module.
所述统一的接口单元还包括:  The unified interface unit further includes:
主要信息接口单元, 用于获取码流中的主要节点以及主要节点的上 层节点, 列出码流的语法层次结构信息; 所述主要节点为码流语法层次 中预先指定的第 n层节点, n为自然数;  a main information interface unit, configured to acquire a primary node in the code stream and an upper node of the primary node, and list syntax hierarchy information of the code stream; the primary node is a pre-designated nth node in the code stream syntax level, n Natural number;
主要节点解码接口单元, 用于对当前选中的主要节点以及所述主要 节点的下层节点进行解码。  The primary node decoding interface unit is configured to decode the currently selected primary node and the lower node of the primary node.
所述码流为视频码流, 所述主要节点为帧对应的语法结构节点。 所述组件模块进一步包括: 编辑模块, 用于根据用户指令, 对来自 解码器库的数据中的头部信息进行修改; 所述统一的接口单元进一步包括: 保存文件接口单元, 用于按照所 述编辑模块实施的修改, 对修改后的码流进行保存。 The code stream is a video code stream, and the main node is a grammatical structure node corresponding to the frame. The component module further includes: an editing module, configured to modify, according to a user instruction, header information in data from the decoder library; The unified interface unit further includes: a save file interface unit, configured to save the modified code stream according to the modification implemented by the editing module.
所述统一的接口单元还包括: 关闭解码器接口单元, 用于释放解码 器使用的软硬件资源。  The unified interface unit further includes: a decoder decoder interface unit for releasing software and hardware resources used by the decoder.
所述统一的接口单元还包括: 解码器信息接口单元, 用于提供解码 器解码过程中的相关信息。  The unified interface unit further includes: a decoder information interface unit, configured to provide related information in a decoder decoding process.
所述用户界面模块进一步包括:  The user interface module further includes:
码流层次结构表示界面, 用树状结构表示码流的语法结构; 和 /或 数据列表界面, 用表格给出了码流各个参数的语义; 和 /或 解码结果表示界面, 用图像展示解码结果。  The code stream hierarchy represents an interface, and the tree structure represents the syntax structure of the code stream; and/or the data list interface, the semantics of each parameter of the code stream is given by a table; and/or the decoding result represents an interface, and the decoding result is displayed by the image. .
本发明实施例提出的一种码流分析方法包括如下步骤:  A code stream analysis method proposed by the embodiment of the present invention includes the following steps:
根据输入的码流的属性信息, 从多于一个的解码器中选择与该属性 信息匹配的解码器;  Determining a decoder matching the attribute information from more than one decoder according to attribute information of the input code stream;
用所选择的解码器对所述码流进行解码, 提取出码流中的数据; 在用户可见的人机交互界面上显示所述提取自码流中的数据。 所述在用户可见的人机交互界面上显示所述提取自码流中的数据 的步骤包括:  Decoding the code stream with the selected decoder to extract data in the code stream; and displaying the data extracted from the code stream on a human-computer interaction interface visible to the user. The step of displaying the data extracted from the code stream on the human-computer interaction interface visible to the user includes:
对所述数据进行分析, 在人机交互界面上显示分析结果。  The data is analyzed, and the analysis result is displayed on the human-computer interaction interface.
所述在用户可见的人机交互界面上显示所述提取自码流中的数据 的步骤包括:  The step of displaying the data extracted from the code stream on the human-computer interaction interface visible to the user includes:
根据预先定义或者用户自定义的公式, 对所述数据进行相关统计计 算, 在人机交互界面上显示计算结果。  According to a predefined or user-defined formula, the data is subjected to relevant statistical calculation, and the calculation result is displayed on the human-computer interaction interface.
所述用所选择的解码器对所述码流进行解码, 提取出码流中的数据 的步骤包括:  The step of decoding the code stream with the selected decoder and extracting data in the code stream includes:
获取码流中的主要节点以及主要节点的上层节点, 列出码流的语法 层次结构信息; 所述主要节点为码流语法层次中预先指定的第 n层节点, n为自然数。 Get the primary node in the code stream and the upper node of the primary node, and list the syntax of the code stream Hierarchical structure information; the primary node is a pre-designated nth node in the code stream syntax hierarchy, and n is a natural number.
所述列出码流的语法层次结构信息之后进一步包括:  The listing of the syntax hierarchy information of the code stream further includes:
将用户选择的主要节点作为当前主要节点, 对当前主要节点的下层 节点进行解码。  The primary node selected by the user is used as the current primary node, and the lower node of the current primary node is decoded.
所述在用户可见的人机交互界面上显示所述提取自码流中的数据 之后, 进一步包括:  After the displaying the data extracted from the code stream on the human-machine interaction interface visible to the user, the method further includes:
对所述数据中的头部信息进行修改, 并保存修改后的码流。  The header information in the data is modified, and the modified code stream is saved.
从以上技术方案可以看出, 在码流分析装置中设置多种解码器, 采 用统一的平台运行各种解码器, 对于输入的码流自动识别出对应的解码 器进行解码, 从而实现支持多种编码标准的多媒体码流。 更进一步地, 本发明采用按需解码的方式, 可以精确地响应使用者的分析需求, 并极 大地提升了工具的运行效率; 本发明方案可以在对码流数据分析的基础 上, 进行信息统计、 码流编辑等操作, 更加丰富了码流分析的功能。 附图简要说明  It can be seen from the above technical solution that a plurality of decoders are arranged in the code stream analyzing device, and various decoders are operated by using a unified platform, and the corresponding decoder is automatically recognized for decoding by the input code stream, thereby implementing various supports. Encoding a standard multimedia stream. Furthermore, the invention adopts the on-demand decoding method, can accurately respond to the analysis requirements of the user, and greatly improves the operating efficiency of the tool; the solution of the invention can perform information statistics on the basis of analyzing the code stream data. , code stream editing and other operations, more enriched the function of code stream analysis. BRIEF DESCRIPTION OF THE DRAWINGS
图 1为本发明实施例提出的码流分析装置的结构框图;  1 is a structural block diagram of a code stream analysis apparatus according to an embodiment of the present invention;
图 2为图 1所示码流分析装置的用户界面模块 103所显示的主界面 的示意图;  2 is a schematic diagram showing a main interface displayed by the user interface module 103 of the code stream analyzing device shown in FIG. 1;
图 3为 mpeg4格式码流的语法层次结构示意图;  Figure 3 is a schematic diagram showing the syntax hierarchy of the mpeg4 format code stream;
图 4为本发明实施例的码流分析装置的运行流程图;  4 is a flowchart of operation of a code stream analyzing apparatus according to an embodiment of the present invention;
图 5为本发明实施例的码流分析流程图。 实施本发明的方式  FIG. 5 is a flowchart of code stream analysis according to an embodiment of the present invention. Mode for carrying out the invention
为使本发明的目的、 技术方案和优点更加清楚, 下面结合附图对本 发明作进一步的详细阐述。 In order to make the objects, technical solutions and advantages of the present invention more clear, the following The invention is further elaborated.
本发明实施例提出的码流分析装置的结构框图如图 1所示, 该码流 分析装置主要包括解码器库 101、 组件模块 102和用户界面模块 103。  A block diagram of a code stream analyzing apparatus according to an embodiment of the present invention is shown in FIG. 1. The code stream analyzing apparatus mainly includes a decoder library 101, a component module 102, and a user interface module 103.
解码器库 101包括多于一个的解码器, 每个解码器对应一种格式的 码流, 用于对该格式的码流进行解码, 提取码流中的数据。 所述数据包 括从码流数据包净荷中提取的多媒体解码数据, 以及从码流数据包头中 提取的相关信息。 所述码流格式可以包括但不限于 H.264、 mpegl、 mpeg2、 mpeg4、 mp3、 mp4、 wmv等。 各个解码器提供统一的接口单元; 所述接口单元至少包括识别接口单元以及参数集信息接口单元, 识别接 口单元用于根据码流的属性信息识别码流的格式; 参数集信息接口单元 用于对外输出从码流中提取的数据。  The decoder library 101 includes more than one decoder, each decoder corresponding to a code stream of one format for decoding the code stream of the format and extracting data in the code stream. The data includes multimedia decoded data extracted from the code stream packet payload, and related information extracted from the code stream header. The code stream format may include, but is not limited to, H.264, mpegl, mpeg2, mpeg4, mp3, mp4, wmv, and the like. Each of the decoders provides a unified interface unit; the interface unit includes at least an identification interface unit and a parameter set information interface unit, and the identification interface unit is configured to identify a format of the code stream according to the attribute information of the code stream; the parameter set information interface unit is used for external Output data extracted from the code stream.
组件模块 102用于调用解码器库 101的识别接口单元选择相应的解 码器, 并根据来自用户界面模块 103的操作指示, 调用解码器库 101对 应的接口单元, 以及接收来自解码器库 101的数据, 将所述数据输出至 用户界面模块 103。  The component module 102 is configured to call the identification interface unit of the decoder library 101 to select a corresponding decoder, and according to an operation instruction from the user interface module 103, call the interface unit corresponding to the decoder library 101, and receive data from the decoder library 101. The data is output to the user interface module 103.
组件模块 102可提供如下功能单元实现分析、 统计、 编辑操作: 分析单元, 用于对解码数据进行分析, 显示解码数据的相关参数信 息, 例如, 显示当前帧图像的大小, 编码压缩效率。  The component module 102 can provide the following functional units for analyzing, counting, and editing operations: an analyzing unit, configured to analyze the decoded data, and display related parameter information of the decoded data, for example, displaying the size of the current frame image, and encoding compression efficiency.
统计单元, 用于根据预先定义或者用户自定义的公式, 根据解码数 据和 /或头部信息进行相关统计计算,并在码流结果表示界面或数据列表 界面显示计算结果, 比如统计码流中特定类型的帧占全部帧的比例。 帧 类型包括 I类型、 P类型以及 B类型。  a statistical unit, configured to perform related statistical calculation according to the decoded data and/or the header information according to a predefined or user-defined formula, and display the calculation result in the code stream result representation interface or the data list interface, for example, the specificity in the statistical code stream The ratio of the type of frame to the total frame. Frame types include I type, P type, and B type.
编辑单元, 用于对头部信息进行修改, 比如更改当前帧的时间戳 ( time—stamp )。  Editing unit, used to modify the header information, such as changing the timestamp of the current frame (time_stamp).
用户界面模块 103用于提供用户可见的人机交互界面, 将码流数据 形象地展示, 接收来自用户的操作指示, 将所述操作指示输出至组件模 块 102; 以及在所述人机交互界面上显示来自组件模块 102的数据。 The user interface module 103 is configured to provide a human-machine interaction interface visible to the user, and the code stream data is Visually showing, receiving an operation indication from a user, outputting the operation indication to the component module 102; and displaying data from the component module 102 on the human-computer interaction interface.
用户界面模块 103所显示的主界面可分为三个部分, 分别是码流层 次结构表示界面 201、 数据列表界面 202 以及解码结果表示界面 203, 如图 2所示。 其中, 码流层次结构表示界面 201用树状结构表示了欲分 析的码流的语法结构, 数据列表界面 202用表格给出了码流各个参数的 语义, 解码结果表示界面 203用图像展示了解码结果。  The main interface displayed by the user interface module 103 can be divided into three parts, namely, a code stream layer structure structure interface 201, a data list interface 202, and a decoding result display interface 203, as shown in FIG. The code stream hierarchy representation interface 201 represents the syntax structure of the code stream to be analyzed in a tree structure. The data list interface 202 provides the semantics of each parameter of the code stream in a table, and the decoding result indicates that the interface 203 displays the decoding with an image. result.
多媒体编码数据具有压缩率高的特点, 解码是一个相当耗费计算资 源的过程。 以下以常见的 mpeg4格式为例说明多媒体码流的结构特点。 图 3根据 mpeg4视频码流标准 -ISO/IEC 14496-2形象地给出了 mpeg4格 式码流的语法层次结构。 图中, mpeg4 ASP Bitstream表示了一个符合 mpeg4 ASP profile的码流, VOSi代表了此码流的第 i个视觉对象序列 ( Visual Object Sequence ), VOi代表了 VOSi中的第 i个视觉对象( Visual Object ), VOLi代表了 VOi中的第 i个视觉对象层( Video Object Layer ), VOPi代表了 VOLi中的第 i个视觉对象平面( Video Object Plane ), MBi 代表了 VOPi中的第 i个宏块(Macro Block ), SB1到 SB6代表了 MBi 中的六个子块( Sub-Block )。 多媒体数据都具有与图 3类似的码流语法 层次结构, 这是由各种压缩标准所规定的。  Multimedia coded data has the characteristics of high compression rate, and decoding is a process that is quite computationally consuming. The following uses the common mpeg4 format as an example to illustrate the structural characteristics of the multimedia stream. Figure 3 graphically shows the syntax hierarchy of the mpeg4 format stream according to the mpeg4 video stream standard - ISO/IEC 14496-2. In the figure, mpeg4 ASP Bitstream represents a code stream conforming to the mpeg4 ASP profile, VOSi represents the i-th visual object sequence (Visual Object Sequence) of this code stream, and VOi represents the i-th visual object in VOSi (Visual Object VOLi represents the i-th visual object layer in VOi, VOPi represents the i-th visual object plane in VOLi, and MBi represents the i-th macroblock in VOPi ( Macro Block ), SB1 to SB6 represent six sub-blocks in the MBi (Sub-Block). The multimedia data has a code stream syntax hierarchy similar to that of Figure 3, which is dictated by various compression standards.
现有技术中采用的方式通常是只对码流中的一部分内容进行分析, 例如分析内容限于文件头和数据包头;或者,只分析码流的比特率信息。 这样从码流中得到的数据具有很大的局限。 本发明方案可以对码流中的 全部信息进行分析, 但为了节约计算资源采用按需分析的方式。 本发明 将各类型多媒体数据语法结构上的每个单元称为 "节点 "或"语法节点"。 码流中包括多个层次的节点, 并将其中某一层节点定义为 "主干节点"或 者"主要节点"。 例如在视频码流中, 将帧所对应的节点称为"主干节点" 或者"主要节点", 在图 3中, 帧所对应的节点是 VOP。 The method adopted in the prior art generally only analyzes a part of content in the code stream, for example, the analysis content is limited to the file header and the data packet header; or, only the bit rate information of the code stream is analyzed. This way the data obtained from the code stream has great limitations. The solution of the invention can analyze all the information in the code stream, but adopts an on-demand analysis method for saving computing resources. The present invention refers to each unit on each type of multimedia data syntax structure as a "node" or "grammar node." The code stream includes nodes of multiple levels, and one of the nodes is defined as a "main node" or a "main node." For example, in a video stream, the node corresponding to the frame is called a "trunk node". Or "primary node", in Figure 3, the node corresponding to the frame is a VOP.
解码器库包含了多于一个的解码器, 按组件模块的调用需求, 这些 解码器将对码流进行解码。本发明实施例的解码器库包含了 H.264解码 器, mp3解码器, mpegl/2解码器, jpeg解码器。 每个解码器库设计了多 个接口单元。 对于每一个解码器来说, 都应该具有如下接口单元:  The decoder library contains more than one decoder, which decodes the code stream as required by the component module. The decoder library of the embodiment of the present invention includes an H.264 decoder, an mp3 decoder, an mpegl/2 decoder, and a jpeg decoder. Each decoder library is designed with multiple interface units. For each decoder, it should have the following interface unit:
识别接口单元: 每一种码流归属于一类编码标准, 因此每种码流都 有独特的起始码来标识自己属于何种编码格式, 该起始码即为前文所述 的属性信息。 例如, 十六进制数 ΟχΟΟΟΟΟΙΒΟ为 Visual Object Sequence 的起始码, 标识了 mpeg4码流一个 VOS的开始。 解码器将根据自身支 持的编码格式判断本解码器是否支持当前码流的解码。  Identification interface unit: Each code stream belongs to a class of coding standards, so each code stream has a unique start code to identify which coding format it belongs to. The start code is the attribute information described above. For example, the hexadecimal number 起始 is the starting code of the Visual Object Sequence, which identifies the beginning of a VOS for the mpeg4 stream. The decoder will judge whether the decoder supports decoding of the current code stream according to the encoding format supported by itself.
主要信息接口单元: 获取码流中的主要节点以及主要节点的上层节 点, 列出码流的语法层次结构信息。  The main information interface unit: obtains the main node in the code stream and the upper node of the main node, and lists the syntax hierarchy information of the code stream.
主要节点解码接口单元: 解码当前选中的主要节点, 如果该节点之 下还有码流语法层次的话, 解码这些层次的节点, 比如主要节点——帧 之下还有 Macro Block和 Sub-Block两层节点。  Main node decoding interface unit: Decode the currently selected main node. If there is a stream syntax level below the node, decode the nodes of these levels, such as the main node - there are two layers of Macro Block and Sub-Block under the frame. node.
参数集信息接口单元: 每一个节点都有其不同的参数集信息, 音频 数据还有音频脉沖数据信息, 视频还有图像数据信息, 解码器的此接口 将提供这些信息。  Parameter Set Information Interface Unit: Each node has its own different parameter set information, audio data as well as audio pulse data information, video and image data information. This interface of the decoder will provide this information.
保存文件接口单元: 解码器按照用户操作保存被修改后的码流。 解码器信息接口单元: 用于提供解码器解码过程中的相关信息, 以 便实现错误控制, 解码状态控制等功能。 例如, 在出错时解码器可以输 出出错状态值; 在解码耗时较长时, 可以通过这一接口提供解码进度。  Save file interface unit: The decoder saves the modified code stream according to user operations. Decoder information interface unit: Used to provide related information in the decoding process of the decoder, so as to implement functions such as error control and decoding state control. For example, the decoder can output an error status value when an error occurs; when the decoding takes a long time, the decoding progress can be provided through this interface.
关闭解码器接口单元: 在替换解码器或关闭分析工具时, 释放解码 器使用的软硬件资源。  Turn off the decoder interface unit: When replacing the decoder or turning off the analysis tool, release the software and hardware resources used by the decoder.
由以上描述可知, 多媒体数据分层结构复杂, 解码过程耗费资源。 有鉴于此, 本发明将码流分析装置的运行流程设计成按需进行的方式, 如图 4所示, 包括如下步骤: As can be seen from the above description, the hierarchical structure of multimedia data is complicated, and the decoding process consumes resources. In view of this, the present invention designs the operation flow of the code stream analyzing device in an on-demand manner, as shown in FIG. 4, and includes the following steps:
步骤 401 : 打开阶段: 根据输入的码流的属性信息, 从多于一个的 解码器中选择与该属性信息匹配的解码器; 用所选择的解码器对所述码 流进行解码, 提取出码流中的数据。  Step 401: Open phase: selecting, according to attribute information of the input code stream, a decoder matching the attribute information from more than one decoder; decoding the code stream by using the selected decoder, and extracting the code The data in the stream.
步骤 402: 分析阶段: 在用户可见的人机交互界面上显示所述提取 自码流中的数据。  Step 402: Analysis phase: displaying the data extracted from the code stream on a human-computer interaction interface visible to the user.
步骤 403: 关闭阶段: 关闭码流文件, 关闭解码器, 释放程序运行 时占用的资源。 如果使用者对码流进行了编辑, 则将修改的内容进行保 存。  Step 403: Close phase: Close the stream file, close the decoder, and release the resources occupied by the program. If the user edits the stream, the modified content is saved.
以下通过一具体实施例对按需解码过程的过程进行具体说明。 本发 明实施例的具体流程如图 5所示, 包括如下步骤:  The process of the on-demand decoding process will be specifically described below through a specific embodiment. The specific process of the embodiment of the present invention is as shown in FIG. 5, and includes the following steps:
步骤 501 : 根据输入的码流的属性信息, 选择与该属性信息匹配的 解码器。  Step 501: Select a decoder that matches the attribute information according to the attribute information of the input code stream.
本发明实施例在实现各个解码器时, 每个解码器都包括一个识别子 模块, 用于判断输入的码流的属性信息是否与本解码器匹配。 组件模块 通过调用各个解码器的识别子模块, 来选择可以支持这一码流的解码 器。 当找到能支持当前码流的解码器后, 组件模块将会调用该解码器对 码流进行分析, 后续的解码动作都由该解码器完成; 如果没有一个解码 器能支持当前的码流, 则表示不支持这一码流, 通过用户界面模块显示 相应的提示信息。  In the embodiment of the present invention, each decoder includes an identification sub-module for determining whether the attribute information of the input code stream matches the decoder. The component module selects the decoder that can support this code stream by calling the identification submodule of each decoder. After finding a decoder capable of supporting the current code stream, the component module will call the decoder to analyze the code stream, and subsequent decoding actions are performed by the decoder; if none of the decoders can support the current code stream, then Indicates that the code stream is not supported, and the corresponding prompt information is displayed through the user interface module.
步骤 502: 由所述支持当前码流的解码器获取码流主要信息。  Step 502: Acquire main stream information by the decoder supporting the current code stream.
码流主要信息可以由各个解码器单独来定义, 一般可以定义为: 主 要节点以及主要节点的上层节点的相关信息。 比如对于视频码流来说, 码流主要信息定义在帧以及帧以上的层次,特别地, mpeg4 ASP Bitstream 将码流主要信息定义在 VOP、 VOL, VO、 VOS四层。 这一定义决定了 首次打开码流时的解码复杂度, 因此是影响工具效率的因素之一。 The main information of the code stream can be defined by each decoder separately, and can be generally defined as: related information of the primary node and the upper node of the primary node. For example, for a video stream, the main information of the stream is defined at the level of the frame and the frame, in particular, mpeg4 ASP Bitstream The main information of the code stream is defined in four layers of VOP, VOL, VO, and VOS. This definition determines the decoding complexity when the code stream is first turned on, and is therefore one of the factors that affect the efficiency of the tool.
步骤 503: 根据使用者的选择确定当前节点, 根据预先定义的主要 节点判断当前节点是否为主要节点, 若是则执行步骤 504, 否则转至步 骤 505。  Step 503: Determine the current node according to the user's selection, determine whether the current node is the primary node according to the predefined primary node, and if yes, execute step 504; otherwise, go to step 505.
具体实施方式如下: 使用者用鼠标点击码流层次结构表示界面中显 示的某一个节点, 用户界面模块将用户点击节点的信息发送到组件模 块, 组件模块收到用户界面模块的信息后, 将使用者点击的节点作为当 前节点, 调用支持当前码流的解码器判断当前节点是否为其所定义的主 要节点, 解码器将判断结果返回组件模块。  The specific implementation manner is as follows: The user clicks on the code stream hierarchy to represent a certain node displayed in the interface, and the user interface module sends the information of the user clicking the node to the component module, and after receiving the information of the user interface module, the component module will use The node clicked as the current node, and the decoder supporting the current code stream is called to determine whether the current node is the main node defined by the decoder, and the decoder returns the judgment result to the component module.
步骤 504: 组件模块调用解码器获取当前主要节点下的子节点信息。 本实施例如图 3所示, 主要节点会包含两层子节点。  Step 504: The component module invokes the decoder to obtain the child node information under the current primary node. This embodiment is shown in Figure 3. The primary node will contain two layers of child nodes.
步骤 505: 组件模块调用解码器对当前码流进行解码, 获取语法节 点的头部信息和解码得到的数据。 码流的每一个语法节点都有对应的头 部信息, 如 mpeg4 ASP Bitstream 的 VOL 节点就会有帧类型 ( picture—type )、 时间戳( time_stamp )、 宽度( width )、 高度 ( height ) 等头部信息。 解码得到的数据, 比如音频码流解码出来的是脉沖编码调 制波形数据, 视频码流解码出来的是某一色度空间的图像数据。  Step 505: The component module calls the decoder to decode the current code stream, and obtains the header information of the syntax node and the decoded data. Each syntax node of the code stream has corresponding header information. For example, the VOL node of the mpeg4 ASP Bitstream will have a frame type (picture_type), a timestamp (time_stamp), a width (width), a height (height), and the like. Department information. The decoded data, such as the audio code stream, is decoded by pulse code modulation waveform data, and the video code stream is decoded by image data of a certain chromaticity space.
步骤 506: 对头部信息和数据进行分析、 统计和 /或编辑操作。 当头 部信息和解码数据被获取后, 头部信息会以字符串的形式展示在数据列 表界面, 解码数据以波形或图像的形式展示在码流结果表示界面。  Step 506: Perform analysis, statistics, and/or editing operations on the header information and data. When the header information and the decoded data are acquired, the header information is displayed in the form of a character string on the data list interface, and the decoded data is displayed in the form of a waveform or an image on the code stream result presentation interface.
步骤 507: 当使用者进行了码流的编辑操作, 然后请求保存修改后 码流文件的副本时, 保存修改后的码流文件。 该步骤仅当使用者进行了 码流编辑操作时执行, 为可选步骤。  Step 507: When the user performs the editing operation of the code stream and then requests to save the copy of the modified code stream file, the modified code stream file is saved. This step is only performed when the user performs a stream editing operation, which is an optional step.
步骤 508: 使用者继续点击码流语法节点进行分析, 此时流程将转 到步骤 503 , 若使用者未点击其他码流语法节点, 则执行步骤 509。 步骤 509: 使用者选择退出后, 组件模块将释放解码器资源, 关闭 解码器, 释放运行时资源, 并退出程序。 Step 508: The user continues to click on the code stream syntax node for analysis, and the process will be transferred. Go to step 503, if the user does not click on other code stream syntax nodes, step 509 is performed. Step 509: After the user opts out, the component module will release the decoder resource, close the decoder, release the runtime resources, and exit the program.
本发明提出的码流分析方法和装置可以对多种音频文件、 视频文件 以及图像数据进行分析。码流信息被直观地展示给用户,对于音频文件, 可以分析文件的采样率、 码率等参数, 分析每一个采样点的值; 对于视 频文件, 可以读取编码器、 帧类型、 宏块类型等参数, 可以观察每帧的 图像、 每个宏块的运动向量、 宏块色度空间数据等等信息。  The code stream analysis method and apparatus proposed by the present invention can analyze a plurality of audio files, video files, and image data. The code stream information is visually displayed to the user. For audio files, the sample rate, rate, and other parameters of the file can be analyzed to analyze the value of each sample point. For the video file, the encoder, frame type, and macroblock type can be read. With equal parameters, you can observe the image of each frame, the motion vector of each macroblock, the macroblock chrominance space data, and so on.
本发明方案中, 码流分析装置的架构包括用户操作窗口、 组件和解 码器库, ί艮好地解决了多种解码器、 多种数据类型在同一平台运行和共 享的问题。 这一问题的解决能提升码流分析装置的兼容性和功能。 在流 程设计上采用 "按需解码"的方式, 可以精确地响应使用者的分析需求, 并且极大地提升了运行效率。 本发明对于解码器设计了 7个接口, 统一 了不同码流格式的解码器, 提供了码流分析、 信息统计、 码流编辑的功 能。 按照本发明的码流分析方案支持码流数据的分析、 信息统计和码流 编辑, 有功能丰富、 兼容性好和易于扩展的特点。  In the solution of the present invention, the architecture of the code stream analyzing device includes a user operating window, a component and a decoder library, which solves the problems of multiple decoders and multiple data types running and sharing on the same platform. The solution to this problem can improve the compatibility and functionality of the stream analysis device. The “on-demand decoding” approach to process design accurately responds to the user's analytical needs and greatly improves operational efficiency. The invention designs seven interfaces for the decoder, and unifies the decoders of different code stream formats, and provides the functions of code stream analysis, information statistics and code stream editing. The code stream analysis scheme according to the present invention supports analysis of code stream data, information statistics, and code stream editing, and is characterized by rich functions, good compatibility, and easy expansion.
通过以上的实施方式的描述, 本领域的技术人员可以清楚地了解到 本发明可借助软件加必需的硬件平台的方式来实现, 当然也可以全部通 过硬件来实施,但很多情况下前者是更佳的实施方式。基于这样的理解, 本发明的技术方案对背景技术做出贡献的全部或者部分可以以软件产 品的形式体现出来, 该计算机软件产品可以存储在存储介质中, 如 ROM/RAM,磁碟、光盘等, 包括若干指令用以使得一台计算机设备(可 以是个人计算机, 服务器, 或者网络设备等)执行本发明各个实施例或 者实施例的某些部分所述的方法。  Through the description of the above embodiments, those skilled in the art can clearly understand that the present invention can be implemented by means of software plus a necessary hardware platform, and of course, all can be implemented by hardware, but in many cases, the former is better. Implementation. Based on such understanding, all or part of the technical solution of the present invention contributing to the background art may be embodied in the form of a software product, which may be stored in a storage medium such as a ROM/RAM, a magnetic disk, an optical disk, or the like. A number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform the methods described in various embodiments of the present invention or portions of the embodiments.
以上所述仅为本发明的较佳实施例而已, 并不用以限制本发明, 凡 在本发明的精神和原则之内所作的任何修改、 等同替换和改进等, 均应 包含在本发明的保护范围之内。 The above is only the preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and scope of the invention are intended to be included within the scope of the invention.

Claims

权利要求书 Claim
1、 一种码流分析装置, 其特征在于, 包括: A code stream analyzing device, comprising:
解码器库, 由多于一个的解码器和统一的接口单元所组成, 每个解 码器用于对一种编码格式码流进行解码, 提取出码流中的数据; 所述统 一的接口单元至少包括识别接口单元以及参数集信息接口单元, 识别接 口单元用于根据码流的属性信息识别码流的格式; 参数集信息接口单元 用于输出从码流中提取的数据;  The decoder library is composed of more than one decoder and a unified interface unit, each decoder is configured to decode an encoded format code stream and extract data in the code stream; the unified interface unit includes at least Identifying an interface unit and a parameter set information interface unit, the identification interface unit is configured to identify a format of the code stream according to the attribute information of the code stream; and the parameter set information interface unit is configured to output the data extracted from the code stream;
组件模块, 用于根据来自用户界面模块的操作指示, 调用解码器库 的统一的接口单元, 由所述统一的接口单元的识别接口单元选择相应的 解码器进行解码, 并接收所述解码器通过所述统一的接口单元的参数集 信息接口单元输出的数据, 将所述数据输出至用户界面模块;  a component module, configured to invoke a unified interface unit of the decoder library according to an operation instruction from the user interface module, select a corresponding decoder by the identification interface unit of the unified interface unit to decode, and receive the decoder to pass The data output by the parameter set information interface unit of the unified interface unit outputs the data to the user interface module;
用户界面模块, 用于提供用户可见的人机交互界面, 接收来自用户 的操作指示, 将所述操作指示输出至组件模块; 以及在所述人机交互界 面上显示来自组件模块的数据。  a user interface module, configured to provide a human-machine interaction interface visible to the user, receive an operation indication from the user, output the operation indication to the component module, and display data from the component module on the human-computer interaction interface.
2、根据权利要求 1所述的码流分析装置, 其特征在于, 所述组件模 块进一步包括: 分析单元, 用于对来自解码器库的数据进行分析, 将分 析结果输出至用户界面模块。  The code stream analyzing apparatus according to claim 1, wherein the component module further comprises: an analyzing unit configured to analyze data from the decoder library and output the analysis result to the user interface module.
3、根据权利要求 1所述的码流分析装置, 其特征在于, 所述组件模 块进一步包括: 统计单元, 用于根据预先定义或者用户自定义的公式, 对来自解码器库的数据进行相关统计计算, 并将计算结果输出至用户界 面模块。  The code stream analyzing apparatus according to claim 1, wherein the component module further comprises: a statistical unit, configured to perform correlation statistics on data from the decoder library according to a predefined or user-defined formula. Calculate and output the calculation results to the user interface module.
4、根据权利要求 1所述的码流分析装置, 其特征在于, 所述统一的 接口单元还包括:  The code stream analyzing device according to claim 1, wherein the unified interface unit further comprises:
主要信息接口单元, 用于获取码流中的主要节点以及主要节点的上 层节点, 列出码流的语法层次结构信息; 所述主要节点为码流语法层次 中预先指定的第 n层节点, n为自然数; The main information interface unit is configured to acquire the main node in the code stream and the main node a layer node, which lists syntax hierarchy information of the code stream; the primary node is a pre-designated nth node in the code stream syntax level, where n is a natural number;
主要节点解码接口单元, 用于对当前选中的主要节点以及所述主要 节点的下层节点进行解码。  The primary node decoding interface unit is configured to decode the currently selected primary node and the lower node of the primary node.
5、根据权利要求 4所述的码流分析装置, 其特征在于, 所述码流为 视频码流, 所述主要节点为帧对应的语法结构节点。  The code stream analyzing apparatus according to claim 4, wherein the code stream is a video code stream, and the main node is a syntax structure node corresponding to a frame.
6、根据权利要求 1所述的码流分析装置, 其特征在于, 所述组件模 块进一步包括: 编辑模块, 用于根据用户指令, 对来自解码器库的数据 中的头部信息进行修改;  The code stream analyzing apparatus according to claim 1, wherein the component module further comprises: an editing module, configured to modify header information in the data from the decoder library according to a user instruction;
所述统一的接口单元进一步包括: 保存文件接口单元, 用于按照所 述编辑模块实施的修改, 对修改后的码流进行保存。  The unified interface unit further includes: a save file interface unit, configured to save the modified code stream according to the modification implemented by the editing module.
7、根据权利要求 1所述的码流分析装置, 其特征在于, 所述统一的 接口单元还包括: 关闭解码器接口单元, 用于释放解码器使用的软硬件 资源。  The code stream analyzing apparatus according to claim 1, wherein the unified interface unit further comprises: a decoder decoder interface unit for releasing software and hardware resources used by the decoder.
8、根据权利要求 1所述的码流分析装置, 其特征在于, 所述统一的 接口单元还包括: 解码器信息接口单元, 用于提供解码器解码过程中的 相关信息。  The code stream analyzing apparatus according to claim 1, wherein the unified interface unit further comprises: a decoder information interface unit, configured to provide related information in a decoder decoding process.
9、 根据权利要求 1至 8任一项所述的码流分析装置, 其特征在于, 所述用户界面模块进一步包括:  The code stream analyzing device according to any one of claims 1 to 8, wherein the user interface module further comprises:
码流层次结构表示界面, 用树状结构表示码流的语法结构; 和 /或 数据列表界面, 用表格给出了码流各个参数的语义; 和 /或  The code stream hierarchy represents an interface, and the tree structure is used to represent the syntax structure of the code stream; and/or the data list interface, the semantics of each parameter of the code stream is given by a table; and/or
解码结果表示界面, 用图像展示解码结果。  The decoding result represents an interface, and the decoded result is displayed by an image.
10、 一种码流分析方法, 其特征在于, 包括如下步骤:  10. A code stream analysis method, comprising the steps of:
根据输入的码流的属性信息, 从多于一个的解码器中选择与该属性 信息匹配的解码器; 用所选择的解码器对所述码流进行解码, 提取出码流中的数据; 在用户可见的人机交互界面上显示所述提取自码流中的数据。 Determining a decoder matching the attribute information from more than one decoder according to attribute information of the input code stream; Decoding the code stream with the selected decoder to extract data in the code stream; and displaying the data extracted from the code stream on a human-computer interaction interface visible to the user.
11、根据权利要求 10所述的方法, 其特征在于, 所述在用户可见的 人机交互界面上显示所述提取自码流中的数据的步骤包括:  The method according to claim 10, wherein the step of displaying the data extracted from the code stream on the human-computer interaction interface visible to the user comprises:
对所述数据进行分析, 在人机交互界面上显示分析结果。  The data is analyzed, and the analysis result is displayed on the human-computer interaction interface.
12、根据权利要求 10所述的方法, 其特征在于, 所述在用户可见的 人机交互界面上显示所述提取自码流中的数据的步骤包括:  The method according to claim 10, wherein the displaying the data extracted from the code stream on the human-computer interaction interface visible to the user comprises:
根据预先定义或者用户自定义的公式, 对所述数据进行相关统计计 算, 在人机交互界面上显示计算结果。  According to a predefined or user-defined formula, the data is subjected to relevant statistical calculation, and the calculation result is displayed on the human-computer interaction interface.
13、根据权利要求 10所述的方法, 其特征在于, 所述用所选择的解 码器对所述码流进行解码, 提取出码流中的数据的步骤包括:  The method according to claim 10, wherein the step of decoding the code stream by using the selected decoder to extract data in the code stream comprises:
获取码流中的主要节点以及主要节点的上层节点, 列出码流的语法 层次结构信息;所述主要节点为码流语法层次中预先指定的第 n层节点, n为自然数。  Obtaining the primary node in the code stream and the upper node of the primary node, and listing the syntax hierarchy information of the code stream; the primary node is a pre-designated nth node in the code stream syntax hierarchy, where n is a natural number.
14、根据权利要求 13所述的方法, 其特征在于, 所述列出码流的语 法层次结构信息之后进一步包括:  The method according to claim 13, wherein the listing of the syntax hierarchy information of the code stream further comprises:
将用户选择的主要节点作为当前主要节点, 对当前主要节点的下层 节点进行解码。  The primary node selected by the user is used as the current primary node, and the lower node of the current primary node is decoded.
15、根据权利要求 10所述的方法, 其特征在于, 所述在用户可见的 人机交互界面上显示所述提取自码流中的数据之后, 进一步包括:  The method according to claim 10, wherein after the displaying the data in the code stream is displayed on the human-machine interaction interface visible to the user, the method further includes:
对所述数据中的头部信息进行修改, 并保存修改后的码流。  The header information in the data is modified, and the modified code stream is saved.
PCT/CN2010/074593 2009-08-05 2010-06-28 Method and device for analyzing code streams WO2011015096A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN200910161863.6 2009-08-05
CN 200910161863 CN101990094B (en) 2009-08-05 2009-08-05 Code stream analysis method and device

Publications (1)

Publication Number Publication Date
WO2011015096A1 true WO2011015096A1 (en) 2011-02-10

Family

ID=43543915

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2010/074593 WO2011015096A1 (en) 2009-08-05 2010-06-28 Method and device for analyzing code streams

Country Status (2)

Country Link
CN (1) CN101990094B (en)
WO (1) WO2011015096A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014165044A1 (en) 2013-03-13 2014-10-09 Abbvie Inc. Processes for the preparation of an apoptosis-inducing agent

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102665081B (en) * 2012-05-14 2014-12-03 青岛海信信芯科技有限公司 Resolving method for multi-format code stream, resolving device for multi-format code stream and display device
CN110536096A (en) * 2018-05-25 2019-12-03 视联动力信息技术股份有限公司 A kind of decoded method and apparatus of data
CN112738528A (en) * 2021-01-13 2021-04-30 武汉鹏源云信信息科技有限责任公司 Audio and video coding and decoding transmission system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1234941A (en) * 1997-07-18 1999-11-10 索尼公司 Method and syst for multiplexing image signal, method and system for demultiplexing image signal, and transmission medium
CN1749953A (en) * 2005-06-30 2006-03-22 无敌科技(西安)有限公司 Multimedia playing system with unlimit extension type format support capability
CN101198051A (en) * 2006-12-07 2008-06-11 深圳艾科创新微电子有限公司 Method and device for implementing entropy decoder based on H.264
CN101272493A (en) * 2007-03-19 2008-09-24 株式会社东芝 Multi-decoder and method

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100372282C (en) * 2004-06-17 2008-02-27 腾讯科技(深圳)有限公司 Information interaction system and method
CN101339789B (en) * 2008-08-13 2010-08-18 中兴通讯股份有限公司 Implementing method of multimedia engine

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1234941A (en) * 1997-07-18 1999-11-10 索尼公司 Method and syst for multiplexing image signal, method and system for demultiplexing image signal, and transmission medium
CN1749953A (en) * 2005-06-30 2006-03-22 无敌科技(西安)有限公司 Multimedia playing system with unlimit extension type format support capability
CN101198051A (en) * 2006-12-07 2008-06-11 深圳艾科创新微电子有限公司 Method and device for implementing entropy decoder based on H.264
CN101272493A (en) * 2007-03-19 2008-09-24 株式会社东芝 Multi-decoder and method

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014165044A1 (en) 2013-03-13 2014-10-09 Abbvie Inc. Processes for the preparation of an apoptosis-inducing agent
EP3293185A1 (en) 2013-03-13 2018-03-14 AbbVie Inc. Processes for the preparation of an apoptosis-inducing agent
EP3569588A1 (en) 2013-03-13 2019-11-20 AbbVie Inc. Process for preparing a synthetic intermediate useful in the preparation of an apoptosis-inducing agent
EP3954687A1 (en) 2013-03-13 2022-02-16 AbbVie Ireland Unlimited Company Processes and intermediates useful in the preparation of an apoptosis-inducing agent
EP4019491A1 (en) 2013-03-13 2022-06-29 AbbVie Ireland Unlimited Company Process for preparing a synthetic intermediate useful in the preparation of an apoptosis-inducing agent

Also Published As

Publication number Publication date
CN101990094A (en) 2011-03-23
CN101990094B (en) 2012-11-21

Similar Documents

Publication Publication Date Title
CN109088887A (en) A kind of decoded method and device of Streaming Media
CN104333808A (en) General player applied to Android and Linux smart televisiosn
CN101536101A (en) Encoding method and apparatus and decoding method and apparatus
WO2011015096A1 (en) Method and device for analyzing code streams
CA2600491A1 (en) Media timeline processing infrastructure
CN101389020A (en) Method for extending decoding capability of stream media playing device
JP2004535034A5 (en)
WO2017050116A1 (en) Gpu-based complete hardware transcoding method and system
WO2021031590A1 (en) Audio and video pushing method, mobile terminal and display terminal
CN101442627A (en) Control method for peer-to-peer calculation set-top box player
CN112188211A (en) Transcoding implementation method and device
US7934159B1 (en) Media timeline
CN113923525A (en) Interactive video editor based on non-linear editing mode and track implementation method
CN101968739A (en) Method for implementing set top box architecture based on flash technology
Black et al. A compendium of robust data structures
CN201733369U (en) Next generation broadcast network terminal access device control system
CN101188664A (en) STB with voice prompt
CN103581681B (en) A kind of video decoder and coding/decoding method
WO2010133024A1 (en) Method for optimizing development of interactive channel of digital tv in a digital family
CN112822532B (en) Editing and generating method of broadcast protocol code stream file and display device
CN202111812U (en) Software and hardware combined decoding universal multimedia player
Villegas et al. MTRANS: A multi-channel, multi-tier speech annotation tool
Li et al. Research on the optimization of Video processing and authorization protection
CN109495793B (en) Bullet screen writing method, device, equipment and medium
Kanniappan et al. An Interleaving Approach to Control Mobile Device and Elements via Screen Buffer and Audio Streaming

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 10806000

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 10806000

Country of ref document: EP

Kind code of ref document: A1