KR102058333B1 - Method and apparatus for parsing bitstream, generic parsing apparatus - Google Patents

Method and apparatus for parsing bitstream, generic parsing apparatus Download PDF

Info

Publication number
KR102058333B1
KR102058333B1 KR1020130023738A KR20130023738A KR102058333B1 KR 102058333 B1 KR102058333 B1 KR 102058333B1 KR 1020130023738 A KR1020130023738 A KR 1020130023738A KR 20130023738 A KR20130023738 A KR 20130023738A KR 102058333 B1 KR102058333 B1 KR 102058333B1
Authority
KR
South Korea
Prior art keywords
bitstream
information
parser
parsing
function
Prior art date
Application number
KR1020130023738A
Other languages
Korean (ko)
Other versions
KR20130121010A (en
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 한국전자통신연구원
Priority to US13/871,902 priority Critical patent/US20130287121A1/en
Publication of KR20130121010A publication Critical patent/KR20130121010A/en
Application granted granted Critical
Publication of KR102058333B1 publication Critical patent/KR102058333B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)
  • Devices For Executing Special Programs (AREA)

Abstract

런타임 동안에 파서를 재구성하여 비트스트림을 파싱할 수 있는 비트스트림 파싱 방법 및 장치가 개시된다. 비트스트림 파싱 방법은 파서의 재구성을 위한 비트스트림 구문 정보를 판독하는 단계; 상기 비트스트림 구문 정보가 유효한지 여부를 판단하는 단계; 상기 비트스트림 구문 정보가 유효한 경우, 상기 비트스트림 구문 정보에 기초하여 미리 정의된 파서를 재구성하는 단계; 및 상기 재구성한 파서를 이용하여 입력된 비트스트림을 파싱하는 단계를 포함할 수 있다.A bitstream parsing method and apparatus are disclosed that can parse a bitstream by reconfiguring the parser during runtime. The bitstream parsing method includes reading bitstream syntax information for reconstruction of a parser; Determining whether the bitstream syntax information is valid; Reconfiguring a predefined parser based on the bitstream syntax information when the bitstream syntax information is valid; And parsing the input bitstream using the reconstructed parser.

Description

비트스트림 파싱 방법 및 장치, 범용 파싱 장치{METHOD AND APPARATUS FOR PARSING BITSTREAM, GENERIC PARSING APPARATUS}Bitstream parsing method and apparatus, general purpose parsing device TECHNICAL FIELD OF APPARATUS FOR PARSING

아래의 설명은 재구성 가능한 코덱의 프레임워크에 관한 것으로, 입력된 비트스트림을 파싱하는 비트스트림 파싱 방법 및 비트스트림 파싱 장치에 관한 것이다.The following description relates to a framework of a reconfigurable codec and relates to a bitstream parsing method and a bitstream parsing apparatus for parsing an input bitstream.

일반적으로 동영상은 부호화기(encoder, 인코더)에 의해 비트스트림(Bit-stream) 형태로 변환된다. 이때, 비트스트림은 부호화기의 제약 조건을 만족하는 부호화 유형에 따라 저장된다.In general, a video is converted into a bitstream form by an encoder. In this case, the bitstream is stored according to an encoding type satisfying the constraint of the encoder.

MPEG은 비트스트림의 제약 조건으로서 구문(syntax) 및 의미(semantics, 이하 '시맨틱스')를 요구한다. 구문은 데이터의 구조나 형식 및 길이를 나타내며, 데이터가 어떤 순서로 표현되는지를 나타낸다. 즉, 구문은 부호화(encoding) 및 복호화(decoding) 작업을 수행하기 위한 문법을 나타낸 것으로, 비트스트림에 포함된 각 요소들(elements)의 순서와 각 요소의 길이, 데이터 형식 등을 정의한다. 시맨틱스는 데이터를 구성하는 각 비트가 의미하는 뜻을 나타낸다.MPEG requires syntax and semantics ('semantics') as constraints of the bitstream. The syntax describes the structure, format, and length of the data, and in what order the data is represented. That is, the syntax indicates a grammar for performing encoding and decoding operations, and defines the order of each element included in the bitstream, the length of each element, and the data format. Semantics indicate what each bit of data means.

현재 MPEG에서 표준화되고 있는 재구성 가능한 코덱의 프레임워크는 RVC-BSDL(Reconfigurable Video Coding - Bitstream Syntax Description, ISO/IEC 23001-4 에 정의)을 통해 비트스트림의 구문 구조를 설명하는 BSD(Bitstream Syntax Description)를 생성한다. 파서를 생성하는 방법과 관련하여 RVC-BSDL 및 Flaver는 소스 코드의 생성에 중점을 두고 있다.The framework of the reconfigurable codec currently standardized in MPEG is Bitstream Syntax Description (BSD), which describes the syntax structure of the bitstream through RVC-BSDL (Reconfigurable Video Coding-Bitstream Syntax Description, defined in ISO / IEC 23001-4). Create Regarding how to generate parsers, RVC-BSDL and Flaver focus on generating source code.

종래의 신택스 파서(syntax parser)는 빌트인(built-in) 방식으로 설계되어, 파서의 구현이 설계 시점에 종료되었다. 그리고, MPEG에서 표준화 되고 있는 재구성 가능한 멀티미디어 코딩(Reconfigurable Multimedia Coding, RMC)에는 파서를 동적으로 생성할 수 있는 방법이 존재하지 않는다. 비트스트림의 효율적인 파싱을 위해 런타임(runtime)시에 파서를 동적으로 생성할 수 있는 파서 서술 언어 및 동적으로 파서를 생성할 수 있는 방법이 요구된다.The conventional syntax parser is designed in a built-in manner, so the implementation of the parser is terminated at design time. In the reconfigurable multimedia coding (RMC) standardized in MPEG, there is no method for dynamically generating a parser. For efficient parsing of bitstreams, a parser description language capable of dynamically generating a parser at runtime and a method capable of dynamically generating a parser are required.

일실시예에 따른 비트스트림 파싱 방법은, 파서의 재구성을 위한 비트스트림 구문 정보를 판독하는 단계; 상기 비트스트림 구문 정보가 유효한지 여부를 판단하는 단계; 상기 비트스트림 구문 정보가 유효한 경우, 상기 비트스트림 구문 정보에 기초하여 미리 정의된 파서를 재구성하는 단계; 및 상기 재구성한 파서를 이용하여 입력된 비트스트림을 파싱하는 단계를 포함할 수 있다.A bitstream parsing method according to an embodiment includes: reading bitstream syntax information for reconstruction of a parser; Determining whether the bitstream syntax information is valid; Reconfiguring a predefined parser based on the bitstream syntax information when the bitstream syntax information is valid; And parsing the input bitstream using the reconstructed parser.

일실시예에 따른 비트스트림 파싱 방법에서, 상기 재구성하는 단계는 상기 인터페이스 정보에 기초하여 상기 미리 정의된 파서의 입력 포트 및 출력 포트를 구성하는 단계; 상기 플러그인 함수 정보에 기초하여 외부 함수의 실행을 위한 대기 상태를 설정하는 단계; 및 상기 미리 정의된 파서를 제어하기 위해 상기 제어 정보를 로드하는 단계를 포함할 수 있다.In the bitstream parsing method according to an embodiment, the reconfiguring may include configuring an input port and an output port of the predefined parser based on the interface information; Setting a wait state for execution of an external function based on the plug-in function information; And loading the control information to control the predefined parser.

일실시예에 따른 비트스트림 파싱 방법에서, 상기 판단하는 단계는 상기 비트스트림 구문 정보에 문법적인 오류가 존재하는지 여부를 판단하는 단계; 및 상기 비트스트림 구문 정보에 인터페이스 및 외부 함수의 실행과 관련된 기능적인 오류가 존재하는지 여부를 판단하는 단계를 포함할 수 있다.In the bitstream parsing method according to an embodiment, the determining may include determining whether a grammatical error exists in the bitstream syntax information; And determining whether there is a functional error related to the execution of an interface and an external function in the bitstream syntax information.

일실시예에 따른 비트스트림 파싱 장치는, 파서의 재구성을 위한 비트스트림 구문 정보를 판독하는 판독부; 상기 비트스트림 구문 정보가 유효한지 여부를 판단하는 유효성 판단부; 상기 비트스트림 구문 정보가 유효한 경우, 상기 비트스트림 구문 정보에 기초하여 미리 정의된 파서를 재구성하는 파서 재구성부; 및 상기 재구성된 파서를 이용하여 입력된 비트스트림을 파싱하는 비트스트림 파싱부를 포함할 수 있다.In one embodiment, a bitstream parsing apparatus includes a readout unit configured to read bitstream syntax information for reconstruction of a parser; A validity determination unit determining whether the bitstream syntax information is valid; A parser reconstructing unit configured to reconstruct a predefined parser based on the bitstream syntax information when the bitstream syntax information is valid; And a bitstream parser configured to parse the input bitstream using the reconstructed parser.

일실시예에 따른 범용 파싱 장치는, 파서의 재구성을 위한 비트스트림 구문 정보를 분석하여 상기 비트스트림 구문 정보를 제어 정보, 플러그인 함수 정보 및 인터페이스 정보로 분류하는 비트스트림 구문 정보 분석부; 상기 제어 정보에 나타난 제어 흐름에 기초하여 입력된 비트스트림의 파싱 과정을 수행하는 제어부; 및 상기 인터페이스 정보에 기초하여 입력 포트 및 출력 포트를 구성하는 인터페이스부를 포함할 수 있다.In one embodiment, a general parsing apparatus includes: a bitstream syntax information analyzer configured to analyze bitstream syntax information for reconstruction of a parser and classify the bitstream syntax information into control information, plug-in function information, and interface information; A controller for parsing the input bitstream based on the control flow indicated in the control information; And an interface unit configuring an input port and an output port based on the interface information.

일실시예에 따른 범용 파싱 장치는, 상기 플러그인 함수 정보에 기초하여 특정 기능을 수행하는 외부 함수를 호출하는 외부 함수 호출부를 더 포함할 수 있다.The general purpose parsing apparatus according to an embodiment may further include an external function caller that calls an external function that performs a specific function based on the plug-in function information.

도 1은 일실시예에 따른 비트스트림 디코딩 시스템의 전체적인 동작을 설명하기 위한 도면이다.
도 2는 일실시예에 따른 비트스트림 파싱 장치의 세부 구성을 도시한 도면이다.
도 3은 일실시예에 따른 범용 파싱 장치의 세부 구성을 도시한 도면이다.
도 4는 일실시예에 따른 범용 파싱 장치의 동작을 설명하기 위한 도면이다.
도 5는 일실시예에 따른 XML 스크립트 기반 파서 서술 언어의 XML 언어 구조를 도시하는 도면이다.
도 6은 일실시예에 따른 비트스트림 파싱 방법의 동작을 도시한 흐름도이다.
도 7은 일실시예에 따른 비트스트림 구문 정보의 유효성 여부를 판단하는 세부 동작을 도시한 흐름도이다.
도 8은 일실시예에 따른 파서를 재구성하는 세부 동작을 도시한 흐름도이다.
도 9는 일실시예에 따른 재구성된 파서의 실행 절차를 도시한 흐름도이다.
1 is a diagram illustrating an overall operation of a bitstream decoding system according to an embodiment.
2 is a diagram illustrating a detailed configuration of a bitstream parsing apparatus according to an embodiment.
3 is a diagram illustrating a detailed configuration of a general-purpose parsing apparatus according to an exemplary embodiment.
4 is a diagram for describing an operation of a general-purpose parsing apparatus, according to an exemplary embodiment.
5 is a diagram illustrating an XML language structure of an XML script based parser description language according to an embodiment.
6 is a flowchart illustrating an operation of a bitstream parsing method, according to an exemplary embodiment.
7 is a flowchart illustrating a detailed operation of determining whether bitstream syntax information is valid according to an embodiment.
8 is a flowchart illustrating a detailed operation of reconfiguring a parser, according to an exemplary embodiment.
9 is a flowchart illustrating a procedure of executing a reconfigured parser, according to an exemplary embodiment.

이하, 실시예들을 첨부된 도면을 참조하여 상세하게 설명한다. 아래의 특정한 구조적 내지 기능적 설명들은 단지 발명의 실시예들을 설명하기 위한 목적으로 예시된 것으로, 발명의 범위가 본문에 설명된 실시예들에 한정되는 것으로 해석되어서는 안된다. 일실시예에 따른 비트스트림 파싱 방법은 비트스트림 파싱 장치에 의해 수행될 수 있으며, 각 도면에 제시된 동일한 참조부호는 동일한 부재를 나타낸다.Hereinafter, exemplary embodiments will be described in detail with reference to the accompanying drawings. The specific structural to functional descriptions below are illustrated for the purpose of describing embodiments of the invention only, and the scope of the invention should not be construed as limited to the embodiments set forth herein. The bitstream parsing method according to an embodiment may be performed by a bitstream parsing apparatus, and the same reference numerals shown in each drawing represent the same members.

도 1은 일실시예에 따른 비트스트림 디코딩 시스템의 전체적인 동작을 설명하기 위한 도면이다.1 is a diagram illustrating an overall operation of a bitstream decoding system according to an embodiment.

도 1을 참조하면, 비트스트림 디코딩 시스템의 동작은 설계(design) 구간(170)과 런타임(runtime) 구간(180)으로 나누어 설명될 수 있다.Referring to FIG. 1, the operation of the bitstream decoding system may be described by dividing into a design section 170 and a runtime section 180.

설계 구간(170)에서, 범용 파싱 장치(120) 및 비트스트림의 디코딩을 위한 다른 장치들(160)이 미리 정의될 수 있다. 예를 들어, 범용 파싱 장치(120)는 재구성 가능하거나 또는 동작 방식을 설정할 수 있는 비트스트림 파서(bitstream parser)일 수 있고, 도구 라이브러리(tool library)로부터 미리 정의될 수 있다.In the design section 170, the general purpose parsing device 120 and other devices 160 for decoding the bitstream may be predefined. For example, the general purpose parsing device 120 may be a bitstream parser that may be reconfigurable or set in an operation manner, and may be predefined from a tool library.

런타임 구간(180)에서, 비트스트림 파싱 장치(110)는 파서의 재구성을 위한 비트스트림 구문 정보(130)에 기초하여 범용 파싱 장치(120)를 재구성할 수 있다. 예를 들어, 비트스트림 구문 정보(130)는 확장 가능 마크업 언어(Extensible Mark-up Language, XML) 스크립트(script) 기반의 언어로 작성될 수 있다. 이에 대한 자세한 내용은 도 5에서 후술한다.In the runtime section 180, the bitstream parsing apparatus 110 may reconfigure the general purpose parsing apparatus 120 based on the bitstream syntax information 130 for reconfiguring the parser. For example, the bitstream syntax information 130 may be written in an extensible mark-up language (XML) script-based language. Details thereof will be described later with reference to FIG. 5.

비트스트림 파싱 장치(110)는 비트스트림 구문 정보(130)를 제어 정보, 플러그인(plugin) 함수 정보 및 인터페이스 정보로 분류할 수 있다. 비트스트림 파싱 장치(110)는 인터페이스 정보에 기초하여 범용 파싱 장치(120)의 입력 포트 및 출력 포트를 설정할 수 있고, 플러그인 함수 정보를 이용하여 특정 기능의 실행을 위한 외부 함수를 로드(load)할 수 있다. 그리고, 비트스트림 파싱 장치(110)는 제어 정보에 포함된 제어 흐름에 기초하여 유한 상태 기계(Finite State Machine, FSM) 구조체를 컴파일(compile)하고, 실행 가능한 형태로 번역할 수 있다. 비트스트림 파싱 장치(110)는 제어 흐름에 기초하여 비트스트림을 파싱(parsing)할 수 있다. 비트스트림 파싱 장치(110)는 재사용 가능한 코덱의 프레임워크에서 비트스트림 파서를 동적으로 구성함으로써, 비트스트림을 효율적으로 파싱할 수 있다.The bitstream parsing apparatus 110 may classify the bitstream syntax information 130 into control information, plug-in function information, and interface information. The bitstream parsing apparatus 110 may set an input port and an output port of the general purpose parsing apparatus 120 based on the interface information, and load an external function for executing a specific function using the plug-in function information. Can be. The bitstream parsing apparatus 110 may compile and translate the finite state machine (FSM) structure into an executable form based on the control flow included in the control information. The bitstream parsing apparatus 110 may parse the bitstream based on the control flow. The bitstream parsing apparatus 110 may parse the bitstream efficiently by dynamically configuring the bitstream parser in the framework of the reusable codec.

디코더 설정(155) 단계 이후에, 재구성된 범용 파싱 장치(120) 및 다른 장치들(160)에 기초하여 디코더가 생성(140)될 수 있다. 디코더는 인코딩된 비트스트림을 입력으로 하여, 디코딩된 영상을 출력할 수 있다.After the decoder setting 155 step, a decoder may be generated 140 based on the reconstructed general purpose parsing device 120 and other devices 160. The decoder may output the decoded image by using the encoded bitstream as an input.

도 2는 일실시예에 따른 비트스트림 파싱 장치의 세부 구성을 도시한 도면이다.2 is a diagram illustrating a detailed configuration of a bitstream parsing apparatus according to an embodiment.

도 2를 참조하면, 비트스트림 파싱 장치(210)는 판독부(220), 유효성 판단부(230), 파서 재구성부(240) 및 비트스트림 파싱부(250)를 포함할 수 있다.Referring to FIG. 2, the bitstream parsing apparatus 210 may include a reader 220, a validity determiner 230, a parser reconstructor 240, and a bitstream parser 250.

판독부(220)는 파서의 재구성을 위한 비트스트림 구문 정보를 판독할 수 있다. 비트스트림 구문 정보는 제어 정보, 플러그인 함수 정보 및 인터페이스 정보를 포함할 수 있다.The reader 220 may read bitstream syntax information for reconstruction of the parser. The bitstream syntax information may include control information, plug-in function information, and interface information.

제어 정보는 입력된 비트스트림을 파싱하는 파서의 제어 흐름과 관련된 정보를 포함할 수 있다. 제어 정보는 입력된 비트스트림으로부터 정보를 추출하는 방법을 나타내는 파싱 스테이트, 외부 함수를 불러올 때 이용하는 외부 함수 호출 스테이트, 유한 상태 기계(FSM)를 불러올 때 이용하는 FSM 호출 스테이트, 및 조건에 따라 다른 스테이트로 점프를 하기 위한 분기 스테이트 중 적어도 하나를 정의할 수 있다.The control information may include information related to the control flow of the parser parsing the input bitstream. The control information is parsed into a parsing state indicating how to extract information from the input bitstream, an external function call state used to invoke an external function, an FSM call state used to invoke a finite state machine (FSM), and other states depending on the condition. At least one of the branch states for jumping may be defined.

플러그인 함수 정보는 외부의 특정 기능을 수행하기 위한 외부 함수 정보를 포함할 수 있다. 플러그인 함수 정보는 코덱과 관련된 파라미터 정보를 포함할 수 있고, 외부 함수는 코덱에 의존적인 값에 의해 파라미터화될 수 있다.The plug-in function information may include external function information for performing an external specific function. The plug-in function information may include parameter information related to the codec, and the external function may be parameterized by a codec-dependent value.

인터페이스 정보는 파서의 입력 포트 및 출력 포트에 관한 정의를 포함할 수 있다. 비트스트림은 입력 포트를 통해 입력될 수 있고, 출력 포트를 통해 의미적으로 디코딩된 결과물이 출력될 수 있다. 예를 들어, 출력된 결과물은 RMC(Reconfigurable Multimedia Coding)의 토큰(token)으로 이용될 수 있다. 인터페이스 정보는 파서와 관련된 모든 입력 포트 및 출력 포트의 리스트를 포함할 수 있다.The interface information may include definitions for the input port and output port of the parser. The bitstream may be input through an input port, and a semantically decoded result may be output through an output port. For example, the output result may be used as a token of Reconfigurable Multimedia Coding (RMC). The interface information may include a list of all input and output ports associated with the parser.

유효성 판단부(230)는 기대되지 않은 오류를 방지하기 위해 비트스트림 구문 정보의 유효성(validation)을 판단할 수 있다. 유효성 판단부(230)는 비트스트림 구문 정보가 유효한지 여부를 판단하여 미리 정의된 파서의 재구성 여부를 결정할 수 있다.The validity determiner 230 may determine validity of bitstream syntax information in order to prevent an unexpected error. The validity determiner 230 may determine whether the bitstream syntax information is valid and determine whether to reconfigure the predefined parser.

구체적으로, 유효성 판단부(230)는 비트스트림 구문 정보에 문법적인 오류 및 기능적인 오류가 존재하는지 여부를 판단할 수 있다.In detail, the validity determiner 230 may determine whether a grammatical error and a functional error exist in the bitstream syntax information.

유효성 판단부(230)는 비트스트림 구문 정보가 XML에 기반하여 작성된 경우, XML 스키마(schema)를 이용한 XML 검증 도구들을 이용하여 비트스트림 구문 정보의 문법적인 오류를 체크할 수 있다. 또한, 유효성 판단부(230)는 XML 문법뿐만 아니라 파서 구성에 관한 서술(description) 문법을 체크할 수도 있다.When the bitstream syntax information is written based on XML, the validity determiner 230 may check a grammatical error of the bitstream syntax information by using XML verification tools using an XML schema. In addition, the validity determination unit 230 may check not only the XML grammar but also a description grammar regarding the parser configuration.

유효성 판단부(230)는 비트스트림 구문 정보에 문법적인 오류가 존재하지 않는 경우, 기능적인 오류가 존재하는지 여부를 추가적으로 판단할 수 있다. 유효성 판단부(230)는 기능적인 오류를 체크하여 비트스트림의 파싱 동작들이 제대로 수행될 수 있는지 여부를 판단할 수 있다.The validity determiner 230 may additionally determine whether there is a functional error when there is no grammatical error in the bitstream syntax information. The validity determination unit 230 may check a functional error to determine whether parsing operations of the bitstream can be performed properly.

유효성 판단부(230)는 비트스트림 구문 정보에 포함된 인터페이스 정보에 기초하여 파서 인터페이스의 기능적 검증을 수행할 수 있다. 예를 들어, 유효성 판단부(230)는 파서 인터페이스 선언과 현재 연결된 실제 입력 포트 및 출력 포트들을 비교함으로써, 인터페이스의 기능적 검증을 수행할 수 있다.The validity determiner 230 may perform functional verification of the parser interface based on the interface information included in the bitstream syntax information. For example, the validity determiner 230 may perform functional verification of the interface by comparing the parser interface declaration with the actual input and output ports currently connected.

또한, 유효성 판단부(230)는 비트스트림 구문 정보에 포함된 플러그인 함수 정보에 기초하여 외부 함수에 대한 기능적 검증을 수행할 수 있다. 유효성 판단부(230)는 외부 함수 리스트를 현재 파서와 연결된 플러그인 함수들과 비교함으로써, 플러그인 함수의 기능적 검증을 수행할 수 있다.In addition, the validity determination unit 230 may perform a functional verification of the external function based on the plug-in function information included in the bitstream syntax information. The validity determiner 230 may perform functional verification of the plug-in function by comparing an external function list with plug-in functions connected to the current parser.

파서 재구성부(240)는 비트스트림 구문 정보가 유효한 경우, 비트스트림 구문 정보에 기초하여 미리 정의된 파서를 재구성할 수 있다. 미리 정의된 파서는 입력 포트 및 출력 포트 중 적어도 하나가 비트스트림 구문 정보에 기초하여 가변적으로 결정될 수 있다. 파서는 설계 시점에서 미리 정의될 수 있으며, 파서 재구성부(240)는 설계 시점에서 정의된 파서를 재구성하여 비트스트림 파싱에 가장 적합한 파서를 런타임 구간에서 새로이 생성할 수 있다.The parser reconstructor 240 may reconstruct a predefined parser based on the bitstream syntax information when the bitstream syntax information is valid. At least one of an input port and an output port may be variably determined based on bitstream syntax information. The parser may be predefined at the design time, and the parser reconstructor 240 may reconfigure the parser defined at the design time to generate a new parser most suitable for bitstream parsing at runtime.

파서 재구성부(240)는 비트스트림 구문 정보로부터 추출한 제어 정보, 플러그인 함수 정보 및 인터페이스 정보에 기초하여 미리 정의된 파서를 재구성할 수 있다. 구체적으로, 파서 재구성부(240)는 인터페이스 정보에 기초하여 미리 정의된 파서의 입력 포트 및 출력 포트를 구성할 수 있다. 예를 들어, 파서 재구성부(240)는 인터페이스 정보에 따라 미리 정의된 파서의 입력 포트 및 출력 포트를 RMC 프레임워크의 모듈 네트워크에 연결할 수 있다.The parser reconstructor 240 may reconstruct a predefined parser based on control information, plug-in function information, and interface information extracted from bitstream syntax information. In detail, the parser reconfigurer 240 may configure an input port and an output port of a predefined parser based on the interface information. For example, the parser reconfigurer 240 may connect the input port and the output port of the predefined parser to the module network of the RMC framework according to the interface information.

파서 재구성부(240)는 플러그인 함수 정보에 기초하여 외부 함수의 실행을 위한 대기 상태를 설정할 수 있다. 예를 들어, 파서 재구성부(240)는 엔트로피 디코딩(entropy decoding) 등과 같은 복잡한 작업을 미리 정의된 외부 함수를 이용하여 수행하도록 미리 정의된 파서를 구성할 수 있다. 파서 재구성부(240)는 플러그인 함수 인스턴스들(instances)을 미리 정의된 파서 내에 준비시키고, 제어부에 의해 호출될 수 있는 상태로 준비시킬 수 있다. 파서 재구성부(240)는 플러그인 함수 인스턴스에 비트스트림 구문 정보에 나타난 파라미터들을 적용하여 플러그인 함수 인스턴스를 초기화시킬 수 있다.The parser reconstructor 240 may set a wait state for the execution of an external function based on the plug-in function information. For example, the parser reconstructor 240 may configure a predefined parser to perform a complicated task such as entropy decoding using a predefined external function. The parser reconfigurer 240 may prepare plug-in function instances in a predefined parser and prepare them to be called by the controller. The parser reconstructor 240 may initialize the plug-in function instance by applying parameters shown in the bitstream syntax information to the plug-in function instance.

파서 재구성부(240)는 플러그인 함수 정보에 기초하여 외부 함수의 실행을 위한 대기 상태가 설정되면, 미리 정의된 파서를 제어하기 위해 제어 정보를 로드할 수 있다. 파서 재구성부(240)는 제어 정보에 포함된 제어 흐름을 판독하고, FSM 구조체의 컴파일을 유도할 수 있다. FSM 구조체는 런타임시에 컴파일될 수 있고, 즉시 실행 가능한 형태로 번역될 수 있다.The parser reconstructor 240 may load control information to control a predefined parser when a waiting state for execution of an external function is set based on the plug-in function information. The parser reconstructor 240 may read the control flow included in the control information and induce the compilation of the FSM structure. FSM structures can be compiled at runtime and translated into an immediate executable form.

비트스트림 파싱부(250)는 재구성된 파서를 이용하여 입력된 비트스트림을 파싱할 수 있다. 파서 재구성부(240)가 판독부(220) 및 유효성 판단부(230)를 거친 비트스트림 구문 정보에 기초하여 미리 정의된 파서를 재구성하면, 비트스트림 파싱부(250)는 재구성된 파서가 입력된 비트스트림을 파싱하도록 재구성된 파서를 제어할 수 있다.The bitstream parser 250 may parse the input bitstream using the reconstructed parser. When the parser reconstructor 240 reconstructs a predefined parser based on the bitstream syntax information passed through the reader 220 and the validity determiner 230, the bitstream parser 250 inputs the reconstructed parser. It is possible to control the reconfigured parser to parse the bitstream.

비트스트림 파싱부(250)는 제어 흐름 안의 각 스테이트의 종류에 기초하여 재구성된 파서의 동작을 제어할 수 있다. 비트스트림 파싱부(250)는 제어 흐름이 종료되거나 또는 입력된 비트스트림이 종료될 때까지 비트스트림의 파싱 과정이 계속적으로 수행되도록 재구성된 파서를 제어할 수 있다. 또한, 비트스트림 파싱부(250)는 파싱 과정에서 비트스트림의 파싱에 필요한 외부 함수를 이용하기 위해 플러그인 함수를 호출하도록 재구성된 파서를 제어할 수 있다.The bitstream parser 250 may control the operation of the reconfigured parser based on the type of each state in the control flow. The bitstream parser 250 may control the reconfigured parser to continuously perform the parsing process of the bitstream until the control flow ends or the input bitstream ends. In addition, the bitstream parser 250 may control a parser reconfigured to call a plug-in function in order to use an external function required for parsing the bitstream in the parsing process.

도 3은 일실시예에 따른 범용 파싱 장치의 세부 구성을 도시한 도면이다.3 is a diagram illustrating a detailed configuration of a general-purpose parsing apparatus according to an exemplary embodiment.

도 3을 참조하면, 범용 파싱 장치(310)는 비트스트림 구문 정보 분석부(320), 제어부(330) 및 인터페이스부(340)를 포함할 수 있다. 또한, 범용 파싱 장치(310)는 외부 함수 호출부(350)를 추가적으로 포함할 수도 있다.Referring to FIG. 3, the general parsing apparatus 310 may include a bitstream syntax information analyzing unit 320, a controller 330, and an interface unit 340. In addition, the general purpose parsing apparatus 310 may further include an external function caller 350.

비트스트림 구문 정보 분석부(320)는 파서의 재구성을 위한 비트스트림 구문 정보를 분석할 수 있다. 비트스트림 구문 정보는 파서의 제어 흐름과 관련된 제어 정보, 파서의 외부에서 특정 기능을 수행하기 위한 외부 함수 정보와 관련된 플러그인 함수 정보 및 파서의 입력/출력 포트와 관련된 인터페이스 정보를 포함할 수 있다. 비트스트림 구문 정보 분석부(320)는 비트스트림 구문 정보를 제어 정보, 플러그인 함수 정보 및 인터페이스 정보로 분류할 수 있다.The bitstream syntax information analyzer 320 may analyze bitstream syntax information for reconstruction of the parser. The bitstream syntax information may include control information related to the control flow of the parser, plug-in function information related to external function information for performing a specific function outside the parser, and interface information related to the input / output port of the parser. The bitstream syntax information analyzer 320 may classify the bitstream syntax information into control information, plug-in function information, and interface information.

제어부(330)는 비트스트림 구문 정보에 기초하여 범용 파싱 장치(310)를 재구성하고, 제어 정보에 따라 인터페이스 및 외부 함수의 호출을 제어할 수 있다. 또한, 제어부(330)는 범용 파싱 장치(310)의 재구성이 완료되는 경우, 제어 정보에 나타난 제어 흐름에 기초하여 입력된 비트스트림의 파싱 과정을 수행할 수 있다.The controller 330 may reconfigure the general purpose parsing apparatus 310 based on the bitstream syntax information, and control the call of the interface and the external function according to the control information. In addition, when the reconstruction of the general purpose parsing apparatus 310 is completed, the controller 330 may perform a parsing process of the input bitstream based on the control flow indicated in the control information.

인터페이스부(340)는 인터페이스 정보에 기초하여 입력 포트 및 출력 포트를 구성하고 다른 네트워크에 연결할 수 있다. 예를 들어, 인터페이스부(340)는 입력 포트 및 출력 포트를 RMC 프레임워크의 모듈 네트워크에 연결할 수 있다.The interface unit 340 may configure an input port and an output port based on the interface information, and may connect to another network. For example, the interface unit 340 may connect the input port and the output port to the module network of the RMC framework.

외부 함수 호출부(350)는 플러그인 함수 정보에 기초하여 특정 기능을 수행하는 외부 함수를 호출할 수 있다. 외부 함수는 제어 정보에 나타난 제어 흐름에 의해 특정 파라미터 세트와 함께 로드되는 프로토타입(prototype)의 함수일 수 있다. 외부 함수 호출부(350)는 플러그인 함수 인스턴스들을 제어부(330)에 의해 호출될 수 있는 상태로 준비시킬 수 있다.The external function caller 350 may call an external function that performs a specific function based on the plug-in function information. The external function may be a function of a prototype loaded with a specific parameter set by the control flow indicated in the control information. The external function caller 350 may prepare the plug-in function instances to be called by the controller 330.

도 4는 일실시예에 따른 범용 파싱 장치의 동작을 설명하기 위한 도면이다.4 is a diagram for describing an operation of a general-purpose parsing apparatus, according to an exemplary embodiment.

도 4에서는, 런타임시에 재구성될 수 있는 범용 파싱 장치(410)가 도시되어 있다.In FIG. 4, a general purpose parsing device 410 is shown that can be reconfigured at runtime.

비트스트림 구문 정보 분석부(420)는 비트스트림 구문 정보(480)를 수신하여 비트스트림 구문 정보(480)를 제어 정보, 외부 함수 정보, 인터페이스 정보로 분류할 수 있다. 비트스트림 구문 정보 분석부(420)는 분류된 제어 정보, 외부 함수 정보 및 인터페이스 정보를 각각 제어부(430), 외부 함수 호출부(460) 및 인터페이스부(미도시)에 제공할 수 있다.The bitstream syntax information analyzer 420 receives the bitstream syntax information 480 and classifies the bitstream syntax information 480 into control information, external function information, and interface information. The bitstream syntax information analyzer 420 may provide the classified control information, external function information, and interface information to the controller 430, the external function caller 460, and an interface unit (not shown), respectively.

비트스트림 구문 정보 분석부(420)는 비트스트림 구문 정보(480)를 분류하면서, 범용 파싱 장치(410)의 재구성 과정의 수행을 유도할 수 있다. 비트스트림 구문 정보 분석부(420)는 비트스트림 구문 정보(480)를 분류하기 위해 MS-XML, Xerces, TinyXML 등과 같은 XML 파서 라이브러리들을 이용할 수 있다.The bitstream syntax information analyzer 420 classifies the bitstream syntax information 480 and may induce a reconstruction process of the general purpose parsing apparatus 410. The bitstream syntax information analyzer 420 may use XML parser libraries such as MS-XML, Xerces, TinyXML, and the like to classify the bitstream syntax information 480.

인터페이스부는 범용 파싱 장치(410)의 입력 포트(440) 및 출력 포트(450)를 구성 및 설정할 수 있다. 범용 파싱 장치(410)는 입력 포트(440) 및 출력 포트(450)를 통해 RMC 프레임워크와 같은 다른 네트워크와 통신할 수 있다. 입력 포트(440)를 통해 인코딩된 비트스트림(470)이 입력될 수 있고, 출력 포트(450)를 통해 파싱 또는 디코딩된 데이터를 출력될 수 있다. 범용 파싱 장치(410)의 입력 포트(440) 및 출력 포트(450)는 비트스트림 구문 정보(480)에 포함된 인터페이스 정보에 따라 가변적으로 결정될 수 있다. 따라서, 입력 포트(440) 및 출력 포트(450)는 런타임 시에 동적으로 제어될 수 있다.The interface unit may configure and set the input port 440 and the output port 450 of the general purpose parsing device 410. General purpose parsing device 410 may communicate with other networks, such as RMC framework, through input port 440 and output port 450. The encoded bitstream 470 may be input through the input port 440, and the parsed or decoded data may be output through the output port 450. The input port 440 and the output port 450 of the general purpose parsing device 410 may be variably determined according to the interface information included in the bitstream syntax information 480. Thus, input port 440 and output port 450 can be dynamically controlled at runtime.

제어부(430)는 비트스트림 구문 정보 분석부(420)로부터 수신한 제어 정보에 기초하여 범용 파싱 장치(410)를 재구성하고, 제어 정보에 따라 인터페이스 및 외부 함수의 호출을 제어할 수 있다. 또한, 제어부(430)는 범용 파싱 장치(410)의 재구성이 완료되는 경우, 제어 정보에 나타난 제어 흐름에 기초하여 인코딩된 비트스트림(470)의 파싱 과정을 수행할 수 있다.The controller 430 may reconfigure the general purpose parsing apparatus 410 based on the control information received from the bitstream syntax information analyzer 420, and control a call of an interface and an external function according to the control information. In addition, when the reconstruction of the general purpose parsing apparatus 410 is completed, the controller 430 may perform the parsing process of the encoded bitstream 470 based on the control flow indicated in the control information.

예를 들어, 제어부(430)는 비트스트림 구문 정보(480)에 포함된 제어 흐름 서술(control flow description)을 실행하는 스크립트 엔진일 수 있다. 스크립트 엔진은 run-time interpreter, Just-in-time (JIT) compiler, 버추어 머신 등의 스크립트 언어를 위한 런타임 컴파일 방법에 기반할 수 있다.For example, the controller 430 may be a script engine that executes a control flow description included in the bitstream syntax information 480. The script engine can be based on runtime compilation methods for scripting languages such as run-time interpreters, just-in-time (JIT) compilers, and virtual machines.

외부 함수 호출부(460)는 복잡한 파싱 기능의 수행을 위해 외부 함수들을 호출 하기 위한 플러그인 함수를 관리할 수 있다. 외부 함수 호출부(460)는 플러그인 함수 정보에 기초하여 특정 기능을 수행하는 외부 함수를 호출할 수 있다. 외부 함수 호출부(460)는 플러그인 함수 인스턴스들을 제어부(430)에 의해 호출될 수 있는 상태로 준비시킬 수 있다. 플러그인 함수는 플러그인 함수 선언에 의해 생성될 수 있으며, 그 후 제어 정보에 포함된 제어 흐름에 의해 특정한 파라미터 세트와 함께 로드될 수 있다.The external function caller 460 may manage a plug-in function for calling external functions to perform a complex parsing function. The external function caller 460 may call an external function that performs a specific function based on the plug-in function information. The external function caller 460 may prepare the plug-in function instances to be called by the controller 430. Plug-in functions can be generated by plug-in function declarations and then loaded with a specific set of parameters by the control flow contained in the control information.

도 5는 일실시예에 따른 XML 스크립트 기반 파서 서술 언어의 XML 언어 구조를 도시하는 도면이다.5 is a diagram illustrating an XML language structure of an XML script based parser description language according to an embodiment.

비트스트림 파싱 장치는 런타임시에 미리 정의된 파서를 재구성하기 위해 XML 스크립트 기반의 파서 서술 언어(XML Script-based Parser Description Language, XS-PDL)를 이용할 수 있다. 비트스트림 파싱 장치는 XS-PDL에 정의된 파서에 대한 서술에 기초하여 프레임워크에서 동적으로 파서를 생성할 수 있다.The bitstream parsing apparatus may use an XML Script-based Parser Description Language (XS-PDL) to reconstruct a predefined parser at runtime. The bitstream parsing apparatus may dynamically generate a parser in the framework based on the description of the parser defined in the XS-PDL.

XS-PDL은 유한 상태 기계(FSM)를 설명하는 모델일 수 있다. 비트스트림을 파싱하는 과정을 서술하기 위해, FSM은 XS-PDL을 통해 추상적이고, 최소한의 정보로 수행이 가능하도록 모델링될 수 있다. FSM을 최소한의 정보로 모델링하는 경우, FSM은 다른 다양한 플랫폼에서 쉽게 구현되고 재사용될 수 있다.The XS-PDL may be a model that describes a finite state machine (FSM). To describe the process of parsing the bitstream, the FSM can be modeled to be abstract and perform with minimal information through the XS-PDL. When modeling an FSM with minimal information, the FSM can be easily implemented and reused on a variety of other platforms.

MPEG RMC에서 XML은 디코더 서술문을(예를 들어, FNL: Functional Unit Network Language) 작성하는 언어로 이용될 수 있다. XS-PDL은 MPEG RMC 디코더 서술과의 호환성 확보를 위해 XML 기반으로 작성될 수 있다. 이를 통해, 비트스트림 파싱 장치는 문서의 유효성 검사를 기존의 XML 도구를 이용하여 수행할 수 있다. XS-PDL는 W3C XML의 문법을 따를 수 있으며, 도 5에 전체 구조가 도시되어 있다. XS-PDL를 통해 비트스트림 구문 정보를 구성하는 비트스트림 구문 서술(Bitstream Syntax Description, BSD)을 생성할 수 있다.In MPEG RMC, XML can be used as a language for writing decoder statements (eg, Functional Unit Network Language (FNL)). XS-PDL can be written based on XML to ensure compatibility with MPEG RMC decoder description. Through this, the bitstream parsing apparatus may perform document validation using an existing XML tool. XS-PDL may follow the syntax of W3C XML, and the overall structure is shown in FIG. Through the XS-PDL, a bitstream syntax description (BSD) that forms bitstream syntax information may be generated.

BSD는 제어 흐름 서술, 파서 인터페이스 선언 및 외부 함수 선언을 포함할 수 있다.BSD can include control flow descriptions, parser interface declarations, and external function declarations.

XS-PDL에서 이용되는 제어 흐름 서술의 엘리먼트들은 다음의 표 1과 같이 나타낼 수 있다.Elements of the control flow description used in the XS-PDL may be represented as shown in Table 1 below.

ElementElement AttributesAttributes /  Of ChildrenChildren /  Of NotesNotes << controlcontrol >> XS-PDL 제어흐름 서술의 최상위 태그Top Tag of XS-PDL Control Flow Description Children: <FSM>* Children: <FSM> * << FSMFSM >> FSM을 선언하는 태그Tag that declares an FSM name = "FSM _ name"name = " FSM _ name " The identifier of an FSM.The identifier of an FSM. Children: <states>Children: <states> << statesstates >> State를 선언하기 위한 묶음 태그Packed Tag to Declare State Children: ( <parsing> | <plugin> | <FSM_call> | <branch> )*Children: (<parsing> | <plugin> | <FSM_call> | <branch>) * << parsingparsing >> 파싱 스테이트 선언 태그Parsing State Declaration Tag name = "state _ name"name = " state _ name " 스테이트 이름 (변수명으로도 사용됨)State name (also used as variable name) bits = "expression"bits = " expression " 비트스트림에서 읽어들일 비트 길이The length of bits to read from the bitstream source = "input _ port _ name"source = " input _ port _ name " 사용할 입력 포트 이름Input port name to use bytealign = "(true | false)"bytealign = "(true | false)" 바이트 얼라인먼트 옵션Byte alignment options peek = "(true | false)"peek = "(true | false)" Look-ahead parsing 옵션Look-ahead parsing options expected = "expression"expected = " expression " 예상값. 읽은 값이 이와 일치하지 않으면 오류 발생.Expected value. If the value read does not match, an error occurs. value = "expression"value = " expression " 기본값.Default. final = "(true | false)"final = "(true | false)" FSM을 종료하는 최종 스테이트 여부Is the last state to exit FSM Children: { <process> , <output> }Children: {<process>, <output>} << pluginplugin >> 외부 함수 호출 스테이트 선언 태그External function call state declaration tag name = "state _ name"name = " state _ name " 파싱과 같음Same as parsing callee = "plugin _ instance _ name"callee = " plugin _ instance _ name " 호출될 외부 함수 이름Name of the external function to be called Children: ( <parameters> | <process> | <output> )
Note: <parameters>
Children: (<parameters> | <process> | <output>)
Note: <parameters>
<< FSMFSM __ callcall >> An FSM call state.An FSM call state. name = "state _ name"name = " state _ name " 파싱과 같음Same as parsing callee = "FSM _ name"callee = " FSM _ name " 호출될 FSM 이름FSM name to be invoked Children: { <process> , <output>* }Children: {<process>, <output> *} << branchbranch >> A branch state based on a conditional jump among states..A branch state based on a conditional jump among states .. name = "state _ name"name = " state _ name " 파싱과 같음Same as parsing condition = "expression"condition = " expression " 분기 조건. 평가된 값이 참인 경우 (0이 아닌 경우) 분기가 일어남Branch conditions. A branch occurs if the evaluated value is true (nonzero) next = "operation _ name"next = " operation _ name " 분기 발생시 다음 스테이트 이름Next state name when branch occurs Children: <process>Children: <process> << processprocess >> Description of an additional decoding operations.Description of an additional decoding operations. Children: ( <operation> | <if> )*Children: (<operation> | <if>) * << outputoutput >> Description of a port output of a parsed data.Description of a port output of a parsed data. dest = "output _ port _ name"dest = " output _ port _ name " 출력 포트 이름Output port name value = "expression"value = " expression " 출력될 값Value to be printed << operationoperation >> An operation for additional decoding process.An operation for additional decoding process. name = "operation _ name"name = " operation _ name " 연산 절차의 이름Name of the operation procedure target = "variable"target = " variable " 갱신될 변수Variable to be updated value = "expression"value = " expression " 갱신되는 값 (계산식)Value to be updated (calculation) << ifif >> A flow control statement within additional decoding process using a conditional jump among operations.A flow control statement within additional decoding process using a conditional jump among operations. name = "operation _ name"name = " operation _ name " <operation> 과 동일same as <operation> condition = "expression"condition = " expression " 분기 조건. 평가된 값이 참인 경우 (0이 아닌 경우) 분기가 일어남Branch conditions. A branch occurs if the evaluated value is true (nonzero) next = "operation _ name"next = " operation _ name " 분기 발생시 다음 연산절차 이름Name of next operation procedure when branch occurs

XS-PDL에서 비트스트림 파싱의 제어 흐름은 FSM으로 서술될 수 있다. 제어 흐름의 서술은 하나 이상의 FSM(sub-FSM 포함)으로 구성될 수 있다. 각각의 FSM(<FSM>)은 파싱 스테이트(Parsing State), 외부 함수 호출 스테이트, FSM 호출 스테이트 및 분기 스테이트 중 하나의 상태(또는, 스테이트)로 표시될 수 있다.The control flow of bitstream parsing in the XS-PDL may be described by the FSM. The description of the control flow may consist of one or more FSMs (including sub-FSMs). Each FSM (<FSM>) may be represented by a state (or state) of one of a parsing state, an external function call state, an FSM call state, and a branch state.

각 스테이트는 식별자(identifier)로 사용되는 name 속성을 가지며, 각 코덱 타입에 따라 수행되는 비트스트림의 파싱 방법이 정의될 수 있다. 각 FSM이 수행되는 순서는 제어 흐름 서술부에 기술된 순서에 따르며, 각 FSM의 초기 상태는 FSM에 나타나는 첫 번째 스테이트일 수 있다.Each state has a name attribute used as an identifier, and a method of parsing a bitstream performed according to each codec type may be defined. The order in which each FSM is performed is in the order described in the control flow description, and the initial state of each FSM may be the first state that appears in the FSM.

파싱 스테이트(<parsing>)는 입력된 비트스트림의 특정 길이의 정보를 어떻게 파싱하는지와 관련된 정보를 제공할 수 있다. 제공될 정보는 표 1에서와 같이 파싱 스테이트를 선언함으로써 서술될 수 있다. 비트스트림으로부터 정보를 어떻게 추출하는지와 관련된 방법은 bits, bytealign, peek 속성으로 정의될 수 있다. 입력 비트로부터 파싱되어야 하는 비트 길이의 정보는 unsigned integer 형태의 bits 속성에 정의될 수 있다. 바이트 정렬(Byte alignment) 정보는 bytealign 속성에 의해 정의될 수 있다. 파싱 스테이트 선언은 peek 속성을 이용한 look-ahead 파싱 프로세스를 정의할 수 있다. 입력된 비트스트림은 source 속성값에 의해 정의될 수 있다. source 속성값은 옵션으로, 비트스트림의 파싱 과정 중에 두 개 이상의 멀티 비트스트림을 처리해야 하는 경우에 이용될 수 있다. 어떤 비트스트림의 구문 엘리먼트는 특별한 값으로 설정되어야 하는데, expected 속성에 정의된 값을 이용하여 유효성 여부를 확인할 수 있다.The parsing state <parsing> may provide information related to how to parse information of a specific length of the input bitstream. The information to be provided can be described by declaring a parsing state as shown in Table 1. The method of extracting information from the bitstream can be defined by the bits, bytealign, and peek attributes. Bit length information to be parsed from the input bits can be defined in the bits attribute of type unsigned integer. Byte alignment information may be defined by the bytealign attribute. Parsing state declarations can define a look-ahead parsing process using the peek attribute. The input bitstream may be defined by a source attribute value. The source attribute value is optional and may be used when two or more multi-bitstreams need to be processed during the parsing process of the bitstream. The syntax element of a bitstream must be set to a special value. The validity can be checked using the value defined in the expected attribute.

파싱 스테이트는 비트스트림에서 파싱되지 않는 데이터를 정의하는데 사용될 수 있는데, 이는 value 속성으로 정의할 수 있다. 또한, 파싱 스테이트는 현재 FSM의 최종 스테이트를 정의하는데 사용될 수 있다. 예를 들어, final 속성값이 'true' 이면 현재의 스테이트 종료 후 FSM이 멈출 수 있다.The parsing state can be used to define data that is not parsed in the bitstream, which can be defined by the value attribute. In addition, the parsing state can be used to define the final state of the current FSM. For example, if the final attribute value is 'true', FSM may stop after the current state ends.

파싱된 값은 나머지 파싱 프로세스에서 일반 변수처럼 저장되고 처리될 수 있다. 각 파싱 스테이트 또는 외부 함수 호출 스테이트는 이름이 같은 변수를 자동적으로 생성할 수 있다. 따라서, 변수의 선언 없이 어떤 비트를 비트스트림으로부터 읽는 것이 가능하다. 두 개의 스테이트가 같은 이름을 가지는 경우에는 하나의 변수가 사용되어야 한다.The parsed values can be stored and processed like regular variables in the rest of the parsing process. Each parsing state or external function call state can automatically create a variable with the same name. Thus, it is possible to read any bit from the bitstream without declaring a variable. If two states have the same name, one variable must be used.

파싱 스테이트의 부가적인 디코딩 과정은 <process> 엘리먼트를 통해 추가될 수 있다. 부가적인 디코딩 과정은 수학적 계산, 로직계산, 이진 변수 계산 등을 포함할 수 있다. <process> 엘리먼트는 복수 개의 <operation> 엘리먼트와 <if> 엘리먼트를 포함할 수 있다. <operation> 엘리먼트와 <if> 엘리먼트는 name 속성에 의해 레이블링(labeling)될 수 있다. <operation> 엘리먼트는 값을 할당하는 기능을 수행하며, target 속성은 값이 할당(업데이트)되는 것을 나타내며, value 속성은 업데이트 할 값을 나타낼 수 있다. value 속성에는 간단한 C언어 형태의 수학적 표현이 사용될 수 있다. <if> 속성은 조건에 따른 분기문을 서술하는데 이용될 수 있다. condition 속성에 있는 값은 <operation> 에 정의된 value 속성과 같은 방법으로 서술될 수 있다. condition 속성에 있는 값이 'true' 라면 다음에 수행 되어야 하는 행위는 next 속성에 의해 레이블링된 것이 수행될 수 있다. 그렇지 않은 경우에는, 순차적인 순서를 따라 다음에 수행 되어야 하는 행위가 수행될 수 있다.An additional decoding process of the parsing state can be added via the <process> element. Additional decoding processes may include mathematical calculations, logic calculations, binary variable calculations, and the like. The <process> element may include a plurality of <operation> elements and <if> elements. <operation> and <if> elements may be labeled by the name attribute. The <operation> element performs the function of assigning a value. The target attribute indicates that a value is assigned (updated), and the value attribute can indicate a value to update. The value attribute can be a simple C-language mathematical expression. The <if> attribute can be used to describe a conditional branch statement. The value in the condition attribute can be described in the same way as the value attribute defined in <operation>. If the value in the condition attribute is 'true', the next action to be performed may be the one labeled by the next attribute. Otherwise, the next action to be performed may be performed in a sequential order.

비트스트림 파싱 장치는 재구성 가능한 코덱 네트워크에 디코딩된 값을 제공할 수 있다. 각 파싱 스테이트에서 포트의 출력은 <output> 엘리먼트에 의해 서술될 수 있고, 출력 포트는 dest 속성에 의해 지정될 수 있다. 지정된 출력 포트는 파서 인터페이스 선언(<interface>)에서 정의될 수 있다. 파서 인터페이스 선언(<interface>)의 값은 value 속성에 의해 서술되어야 하며 고정된 값이나 변수가 될 수 있다.The bitstream parsing apparatus may provide a decoded value to the reconfigurable codec network. In each parsing state, the output of the port can be described by the <output> element, and the output port can be specified by the dest attribute. The specified output port can be defined in the parser interface declaration (<interface>). The value of the parser interface declaration (<interface>) must be described by the value attribute and can be a fixed value or a variable.

외부 함수 호출 스테이트(<plugin>)는 외부 함수를 호출할 때 이용될 수 있다. 호출되는 함수는 callee 속성에 의해 서술될 수 있고, 외부 함수를 정의한 리스트(<plugin_list>)에 포함된 값 중 하나의 값이 지정될 수 있다. 외부 함수 호출에 대한 파라미터는 <parameters> 엘리먼트에 의해 서술될 수 있다. <parameters>는 또 다른 여러 개의 <parameters> 엘리먼트를 자녀로 가질 수 있다. 각 <parameters> 엘리먼트는 식별자로 name 속성을 가지며, 또한 파라미터의 실제 값을 서술하는 value 속성을 가질 수 있다. 외부 함수 호출 스테이트는 추가적인 디코딩 동작을 지정할 수 있다.The external function call state (<plugin>) can be used to call external functions. The called function can be described by the callee attribute, and one of the values included in the list (<plugin_list>) defining the external function can be specified. Parameters for external function calls can be described by the <parameters> element. <parameters> can have several other <parameters> elements as children. Each <parameters> element has a name attribute as an identifier and may also have a value attribute that describes the actual value of the parameter. The external function call state can specify additional decoding behavior.

제어 흐름 서술에서 한 개 이상의 FSM이 나타날 수 있으며, 개별 FSM은 FSM 호출 스테이트(<FSM_call>)에 의해 호출될 수 있다. 호출된 FSM은 callee 속성에 의해 지정될 수 있으며, callee의 값은 현재 제어 흐름 서술에서 정의된 FSM일 수 있다. FSM 호출 스테이트는 추가적인 디코딩 동작에 관한 서술을 가질 수 있다.More than one FSM may appear in the control flow description, and individual FSMs may be called by the FSM call state (<FSM_call>). The invoked FSM can be specified by the callee attribute, and the value of callee can be the FSM defined in the current control flow description. The FSM call state may have a description of additional decoding operations.

분기 스테이트(<branch>)는 조건에 따라 다른 스테이트로 이동하는데 이용될 수 있다. 분기 스테이트는 분기(branch)의 조건을 나타내는 condition 속성과 어디로 이동할지를 지정하는 next 속성을 포함할 수 있다. 분기의 조건은 추가 디코딩 서술부의 value 속성과 동일한 구문으로 서술될 수 있다. 분기 스테이트는 <process> 속성에 서술된 추가적인 디코딩 동작을 수행할 수 있으며, 수행 결과가 분기의 조건으로 이용될 수 있다.Branch state (<branch>) can be used to move to another state depending on the condition. The branch state can include a condition attribute indicating the condition of the branch and a next attribute specifying where to go. The condition of the branch may be described with the same syntax as the value attribute of the additional decoding descriptor. The branch state can perform the additional decoding operation described in the <process> attribute, and the result can be used as the condition of the branch.

각 스테이트별로 정의된 비트스트림의 파싱은 다음의 표 2에 정의한 우선 순위를 따를 수 있다. 표 2는 각 태그별 처리 우선 순위를 나타낸다.The parsing of bitstreams defined for each state may follow the priority defined in Table 2 below. Table 2 shows the processing priority for each tag.

(1) (One) ParsingParsing StateState (2) (2) ExternalExternal FunctionFunction CallCall StateState PrecedencePrecedence
LevelLevel
ElementElement AttributeAttribute PrecedencePrecedence
LevelLevel
ElementElement AttributeAttribute
1One <parsing><parsing> sourcesource 1One <parameter><parameter> namename 22 <parsing><parsing> peekpeek 22 <parameter><parameter> valuevalue 33 <parsing><parsing> bytealignbytealign 33 <plugin><plugin> calleecallee 44 <parsing><parsing> bitsbits 44 <plugin><plugin> namename 55 <parsing><parsing> valuevalue 55 <operation><operation> valuevalue 66 <parsing><parsing> expectedexpected 66 <operation><operation> targettarget 77 <parsing><parsing> namename 77 <if><if> conditioncondition 88 <operation><operation> valuevalue 88 <if><if> nextnext 99 <operation><operation> targettarget 99 <output><output> valuevalue 1010 <if><if> conditioncondition 1010 <output><output> destdest 1111 <if><if> nextnext 1212 <output><output> valuevalue 1313 <output><output> destdest 1414 <parsing><parsing> finalfinal (3) (3) FSMFSM CallCall StateState (4) (4) BranchBranch StateState 1One <FSM_call><FSM_call> <callee><callee> 1One <operation><operation> valuevalue 22 <operation><operation> valuevalue 22 <operation><operation> targettarget 33 <operation><operation> targettarget 33 <if><if> conditioncondition 44 <if><if> conditioncondition 44 <if><if> nextnext 55 <if><if> nextnext 55 <branch><branch> conditioncondition 66 <output><output> valuevalue 66 <branch><branch> nextnext 77 <output><output> destdest

일반적으로, 비트스트림의 읽기, 외부 함수의 호출, FSM의 호출이 추가적인 디코딩 동작 및 출력 포트에 결과를 전송하는 것에 우선할 수 있다. 분기 스테이트에 사용되는 조건의 경우 조건문의 값을 업데이트하기 위해 추가적인 디코딩 동작을 수행한 후에 실행될 수 있다. 현재 수행중인 FSM을 종료하는 final 속성은 추가적인 디코딩 동작과 출력 포트에 모든 결과를 전송한 후에 동작할 수 있다.In general, reading a bitstream, calling an external function, or calling a FSM may take precedence over additional decoding operations and sending results to the output port. The condition used for the branch state may be executed after performing an additional decoding operation to update the value of the conditional statement. The final attribute, which terminates the currently running FSM, can be triggered after additional decoding operations and all results are sent to the output port.

제어 흐름 서술에 이용되는 외부 함수는 외부 호출 함수 선언부(<plugin_list>)에 정의될 수 있다. 다음의 표 3은 외부 함수 선언 구문의 엘리먼트들을 나타낸다.The external function used for the control flow description may be defined in the external call function declaration unit (<plugin_list>). Table 3 below shows the elements of the external function declaration syntax.

ElementElement AttributesAttributes /  Of ChildrenChildren /  Of NotesNotes << pluginplugin __ listlist >> XS-PDL 외부 함수 선언의 최상위 태그Top-level tag in XS-PDL external function declaration Children: <instance>*Children: <instance> * << instanceinstance >> 외부 함수 인스턴스 선언 태그External function instance declaration tag name = "plugin _ instance _ name"name = " plugin _ instance _ name " 인스턴스 이름Instance name prototype = "plugin _ prototype _ name"prototype = " plugin _ prototype _ name " 사용될 외부 함수 프로토타입 이름External function prototype name to be used Children: <parameters>Children: <parameters> << parametersparameters >> 파라미터 선언 묶음 태그Parameter declaration bundle tag Children: <parameter>*Children: <parameter> * << parameterparameter >> 개별 파라미터 선언 태그Individual Parameter Declaration Tag name = "plugin _ parameter _ name"name = " plugin _ parameter _ name " 파라미터 이름Parameter name value = "(value | array _ value)"value = "( value | array _ value )" 파라미터 값 (고정값 또는 배열형)Parameter value (fixed value or array type)

먼저 비트스트림 파싱 장치에서 사용 가능한 identifier 문자열을 가지는 외부 함수에 대한 프로토타입(prototype)이 유효하여야 한다. 프로토타입 함수는 <instance> 엘리먼트에 의해 인스턴스(instance)화 될 수 있다. 하나의 프로토타입이 다른 파라미터에 의해 복수 개로 인스턴스화될 수 있다. 각각의 외부 호출 함수는 <parameters> 엘리먼트에 의해 파라미터를 가지고 인스턴스로 생성될 수 있다. First, the prototype for an external function that has an identifier string that can be used by the bitstream parser must be valid. Prototype functions can be instantiated by <instance> elements. One prototype can be instantiated in plural by different parameters. Each external call function can be instantiated with parameters by the <parameters> element.

입력 포트 및 출력 포트 인터페이스는 BSD에 선언될 수 있다. 다음의 표 4는 인터페이스 선언 구문의 엘리먼트들을 나타낸다.Input port and output port interfaces can be declared in BSD. Table 4 below shows the elements of the interface declaration syntax.

ElementElement AttributesAttributes /  Of ChildrenChildren /  Of NotesNotes << interfaceinterface >> XS-PDL 내 파서 인터페이스 선언의 최상위 태그Top-level tag of parser interface declaration in XS-PDL Children: ( <input> | <output> )*Children: (<input> | <output>) * << inputinput >> 입력 포트 선언 태그Input port declaration tag name = "input _ port _ name"name = " input _ port _ name " 포트 이름Port name token_type = "token _ type"token_type = " token _ type " 토큰 종류Token type << outputoutput >> 출력 포트 선언 태그Output port declaration tag name = "output _ port _ name"name = " output _ port _ name " 포트 이름Port name token_type = "token _ type"token_type = " token _ type " 토큰 종류Token type

입력 포트와 출력 포트는 각각 <input>, <output> 엘리먼트로 정의될 수 있다. 이 두 엘리먼트는 같은 속성 구조를 가질 수 있다. 각각의 포트 이름은 name 속성에 의해 정의되며, 각 포트의 데이터 타입은 token_type 속성에 의해 정의될 수 있다. token_type 속성은 옵션이며, 기존의 MPEG RMC 표준에 정의된 형태를 따를 수 있다.Input ports and output ports can be defined as <input> and <output> elements, respectively. These two elements can have the same attribute structure. Each port name is defined by the name attribute, and the data type of each port can be defined by the token_type attribute. The token_type attribute is optional and can follow the format defined in the existing MPEG RMC standard.

도 6은 일실시예에 따른 비트스트림 파싱 방법의 동작을 도시한 흐름도이다.6 is a flowchart illustrating an operation of a bitstream parsing method, according to an exemplary embodiment.

단계(610)에서, 비트스트림 파싱 장치는 파서의 재구성을 위한 비트스트림 구문 정보를 판독할 수 있다. 비트스트림 구문 정보는 파서의 제어 흐름과 관련된 제어 정보, 파서의 외부에서 특정 기능을 수행하기 위한 외부 함수 정보와 관련된 플러그인 함수 정보 및 파서의 입력/출력 포트와 관련된 인터페이스 정보를 포함할 수 있다.In step 610, the bitstream parsing apparatus may read bitstream syntax information for reconstruction of the parser. The bitstream syntax information may include control information related to the control flow of the parser, plug-in function information related to external function information for performing a specific function outside the parser, and interface information related to the input / output port of the parser.

단계(620)에서, 비트스트림 파싱 장치는 기대되지 않은 오류를 방지하기 위해 비트스트림 구문 정보의 유효성 여부를 판단할 수 있다. 예를 들어, 비트스트림 파싱 장치는 비트스트림 구문 정보에 문법적인 오류 및 기능적인 오류가 존재하는지 여부를 판단할 수 있다. 비트스트림 파싱 장치는 비트스트림 구문 정보가 유효한지 여부를 판단하여, 미리 정의된 파서의 재구성 여부를 결정할 수 있다. 비트스트림 파싱 장치는 비트스트림 구문 정보에 오류가 존재(640)하는 경우에는, 파서를 재구성하지 않고, 진행을 종료할 수 있다.In operation 620, the bitstream parsing apparatus may determine whether the bitstream syntax information is valid in order to prevent an unexpected error. For example, the bitstream parsing apparatus may determine whether there are grammatical errors and functional errors in the bitstream syntax information. The bitstream parsing apparatus may determine whether the bitstream syntax information is valid and determine whether to reconfigure the predefined parser. When an error 640 exists in the bitstream syntax information, the bitstream parsing apparatus may terminate the process without reconfiguring the parser.

단계(630)에서, 비트스트림 파싱 장치는 비트스트림 구문 정보가 유효한 경우, 비트스트림 구문 정보에 기초하여 미리 정의된 파서를 재구성할 수 있다. 비트스트림 파싱 장치는 비트스트림 구문 정보로부터 추출한 제어 정보, 플러그인 함수 정보 및 인터페이스 정보에 기초하여 미리 정의된 파서를 재구성할 수 있다. 파서는 설계 시점에서 미리 정의될 수 있으며, 비트스트림 파싱 장치는 설계 시점에서 정의된 파서를 재구성하여 비트스트림 파싱에 가장 적합한 파서를 런타임 구간에서 새로이 생성할 수 있다.In operation 630, when the bitstream syntax information is valid, the bitstream parsing apparatus may reconfigure the predefined parser based on the bitstream syntax information. The bitstream parsing apparatus may reconfigure a predefined parser based on control information, plug-in function information, and interface information extracted from the bitstream syntax information. The parser may be predefined at the design time, and the bitstream parsing apparatus may reconfigure the parser defined at the design time to generate a new parser most suitable for the bitstream parsing at runtime.

단계(650)에서, 비트스트림 파싱 장치는 재구성된 파서를 이용하여 입력된 비트스트림을 파싱할 수 있다. 구체적으로, 비트스트림 파싱 장치는 재구성된 파서가 입력된 비트스트림을 파싱하도록 재구성된 파서를 제어할 수 있다. 비트스트림 파싱 장치는 비트스트림 구문 정보로부터 추출한 제어 정보, 플러그인 함수 정보 및 인터페이스 정보에 기초하여 재구성된 파서의 동작을 제어할 수 있다. 비트스트림 파싱 장치는 제어 정보에 포함된 제어 흐름에 따라 비트스트림이 파싱되고, 제어 흐름이 종료되거나 또는 입력된 비트스트림이 종료되어 파싱이 완료될 때까지 비트스트림의 파싱 과정이 계속적으로 수행되도록 재구성된 파서를 제어할 수 있다. 또한, 비트스트림 파싱 장치는 파싱 과정에서 비트스트림의 파싱에 필요한 외부 함수를 이용하기 위해 플러그인 함수를 호출하도록 재구성된 파서를 제어할 수 있다.In operation 650, the bitstream parsing apparatus may parse the input bitstream using the reconstructed parser. In detail, the bitstream parsing apparatus may control the reconfigured parser so that the reconstructed parser parses the input bitstream. The bitstream parsing apparatus may control the operation of the reconfigured parser based on control information, plug-in function information, and interface information extracted from the bitstream syntax information. The bitstream parsing apparatus reconfigures the bitstream to be continuously performed until the bitstream is parsed according to the control flow included in the control information and the parsing process is completed until the control flow ends or the input bitstream ends and parsing is completed. The old parser. In addition, the bitstream parsing apparatus may control a parser reconfigured to call a plug-in function in order to use an external function required for parsing the bitstream during parsing.

도 7은 일실시예에 따른 비트스트림 구문 정보의 유효성 여부를 판단하는 세부 동작을 도시한 흐름도이다.7 is a flowchart illustrating a detailed operation of determining whether bitstream syntax information is valid according to an embodiment.

단계(710)에서, 비트스트림 파싱 장치는 비트스트림 구문 정보에 문법적인 오류가 존재하는지 여부를 판단할 수 있다. 비트스트림 파싱 장치는 비트스트림 구문 정보가 XML에 기반하여 작성된 경우, XML 스키마를 이용한 XML 검증 도구들을 이용하여 비트스트림 구문 정보의 문법적인 오류를 체크할 수 있다. 또한, 비트스트림 파싱 장치는 XML 문법뿐만 아니라 파서 구성에 관한 서술 문법을 체크할 수 있다. 비트스트림 파싱 장치는 비트스트림 구문 정보에 문법적인 오류가 존재하여 유효성 오류(740)로 판정되는 경우에는, 다음 단계를 진행하지 않고 종료할 수 있다.In operation 710, the bitstream parsing apparatus may determine whether a grammatical error exists in the bitstream syntax information. When the bitstream syntax information is written based on XML, the bitstream parsing apparatus may check a grammatical error of the bitstream syntax information using XML verification tools using an XML schema. In addition, the bitstream parsing apparatus may check not only the XML grammar but also the descriptive grammar regarding the parser configuration. When the bitstream parsing apparatus determines that the validity error 740 exists due to a grammatical error in the bitstream syntax information, the bitstream parsing apparatus may terminate without proceeding to the next step.

단계(720)에서, 비트스트림 파싱 장치는 비트스트림 구문 정보에 문법적인 오류가 존재하지 않으면, 기능적인 오류가 존재하는지 여부를 판단할 수 있다. 먼저, 비트스트림 파싱 장치는 비트스트림 구문 정보에 포함된 인터페이스 정보에 기초하여 파서 인터페이스의 기능적 검증을 수행할 수 있다. 예를 들어, 비트스트림 파싱 장치는 파서 인터페이스 선언과 현재 연결된 실제 입력 포트 및 출력 포트들을 비교함으로써, 인터페이스의 기능적 검증을 수행할 수 있다. 비트스트림 파싱 장치는 모든 인터페이스에 대해 기능적인 오류가 존재하는지 여부를 판단하여, 비트스트림 구문 정보에 기능적인 오류가 존재하는 경우에는, 유효성 오류(740)로 판정하고 진행을 종료할 수 있다.In operation 720, if the grammatical error does not exist in the bitstream syntax information, the bitstream parsing apparatus may determine whether a functional error exists. First, the bitstream parsing apparatus may perform functional verification of a parser interface based on interface information included in bitstream syntax information. For example, the bitstream parsing apparatus may perform functional verification of the interface by comparing the parser interface declaration with the actual input and output ports currently connected. The bitstream parsing apparatus may determine whether there is a functional error for all interfaces, and in the case where there is a functional error in the bitstream syntax information, the bitstream parsing apparatus may determine a validity error 740 and terminate the process.

단계(730)에서, 비트스트림 파싱 장치는 비트스트림 구문 정보에 포함된 플러그인 함수 정보에 기초하여 외부 함수에 대한 기능적 검증을 수행할 수 있다. 비트스트림 파싱 장치는 외부 함수 리스트를 현재 파서와 연결된 플러그인 함수들과 비교함으로써, 플러그인 함수의 기능적 검증을 수행할 수 있다. 비트스트림 파싱 장치는 모든 외부 함수에 대해 기능적인 오류가 존재하는지 여부를 판단하여, 비트스트림 구문 정보에 기능적인 오류가 존재하는 경우에는, 유효성 오류(740)로 판정하고 진행을 종료할 수 있다.In operation 730, the bitstream parsing apparatus may perform functional verification of the external function based on the plug-in function information included in the bitstream syntax information. The bitstream parsing apparatus may perform functional verification of the plug-in function by comparing an external function list with plug-in functions connected to the current parser. The bitstream parsing apparatus may determine whether there is a functional error for all external functions, and if there is a functional error in the bitstream syntax information, determine that it is a valid error 740 and terminate the process.

도 8은 일실시예에 따른 파서를 재구성하는 세부 동작을 도시한 흐름도이다.8 is a flowchart illustrating a detailed operation of reconfiguring a parser, according to an exemplary embodiment.

단계(810)에서, 비트스트림 파싱 장치는 비트스트림 구문 정보에 기초하여 미리 정의된 파서의 입력 포트 및 출력 포트를 구성하고 연결할 수 있다. 예를 들어, 비트스트림 파싱 장치는 비트스트림 구문 정보에 포함된 파서 인터페이스 선언에 따라 미리 정의된 파서의 입력 포트 및 출력 포트를 설정할 수 있다. 비트스트림 파싱 장치는 입력 포트 및 출력 포트를 RMC 프레임워크의 모듈 네트워크에 연결할 수 있다.In operation 810, the bitstream parsing apparatus may configure and connect an input port and an output port of a predefined parser based on the bitstream syntax information. For example, the bitstream parsing apparatus may set an input port and an output port of a predefined parser according to a parser interface declaration included in the bitstream syntax information. The bitstream parsing device can connect the input port and the output port to the module network of the RMC framework.

단계(820)에서, 비트스트림 파싱 장치는 플러그인 함수 정보에 기초하여 외부 함수의 실행을 위한 대기 상태를 설정할 수 있다. 비트스트림 파싱 장치는 엔트로피 디코딩 등과 같은 복잡한 작업을 미리 정의된 외부 함수를 이용하여 수행하도록 미리 정의된 파서를 구성할 수 있다. 비트스트림 파싱 장치는 플러그인 함수 인스턴스들을 미리 정의된 파서 내에 준비시키고, 호출될 수 있는 상태로 준비시킬 수 있다.In operation 820, the bitstream parsing apparatus may set a wait state for execution of an external function based on the plug-in function information. The bitstream parsing apparatus may configure a predefined parser to perform a complicated task such as entropy decoding using a predefined external function. The bitstream parsing device may prepare plug-in function instances in a predefined parser and ready to be called.

단계(830)에서, 비트스트림 파싱 장치는 플러그인 함수 정보에 기초하여 외부 함수의 실행을 위한 대기 상태가 설정되면, 미리 정의된 파서를 제어하기 위해 제어 정보를 로드할 수 있다. 비트스트림 파싱 장치는 제어 정보에 포함된 제어 흐름을 판독하고, FSM 구조체의 컴파일을 유도할 수 있다. FSM 구조체는 런타임시에 컴파일될 수 있고, 즉시 실행 가능한 형태로 번역될 수 있다.In operation 830, the bitstream parsing apparatus may load control information to control a predefined parser when a waiting state for execution of an external function is set based on the plug-in function information. The bitstream parsing apparatus may read the control flow included in the control information and induce compilation of the FSM structure. FSM structures can be compiled at runtime and translated into an immediate executable form.

도 9는 일실시예에 따른 재구성된 파서의 실행 절차를 도시한 흐름도이다.9 is a flowchart illustrating a procedure of executing a reconfigured parser, according to an exemplary embodiment.

도 9는 미리 정의된 파서가 재구성된 이후에, 비트스트림 파싱 장치가 수행하는 동작을 세부적으로 도시하고 있다. 비트스트림 파싱 장치는 제어 흐름 내의 각 스테이트의 종류(State type)에 따라서 비트스트림을 파싱할 수 있다. 예를 들어, 비트스트림 파싱 장치는 스테이트의 종류가 파싱 스테이트(parsing state), 외부 함수 호출 스테이트(External function call state), FSM 호출(FSM call) 스테이트 및 분기(Branch) 스테이트인지를 판단하여, 각 스테이트에 따른 동작을 수행할 수 있다.9 illustrates in detail the operation performed by the bitstream parsing apparatus after the predefined parser is reconfigured. The bitstream parsing apparatus may parse the bitstream according to the state type of each state in the control flow. For example, the bitstream parsing apparatus determines whether the state is a parsing state, an external function call state, an FSM call state, and a branch state. Can perform the operation according to the state.

각 스테이트에 따른 동작은 파일 끝(End of File, EOF)을 나타내는 값이 나타날 때까지 계속하여 수행될 수 있다. 입력된 비트스트림의 파싱 과정은 제어 흐름이 종료되거나, 또는 입력된 비트스트림이 종료될 때까지 계속될 수 있다.The operation according to each state may be continuously performed until a value indicating the end of file (EOF) appears. The parsing process of the input bitstream may continue until the control flow ends or the input bitstream ends.

실시예에 따른 방법은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될 수 있다. 상기 컴퓨터 판독 가능 매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있다. 상기 매체에 기록되는 프로그램 명령은 실시예를 위하여 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 당업자에게 공지되어 사용 가능한 것일 수도 있다.The method according to the embodiment may be embodied in the form of program instructions that can be executed by various computer means and recorded in a computer readable medium. The computer readable medium may include program instructions, data files, data structures, etc. alone or in combination. The program instructions recorded on the media may be those specially designed and constructed for the purposes of the embodiments, or they may be of the kind well-known and available to those having skill in the computer software arts.

컴퓨터 판독 가능 기록 매체의 예에는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체(magnetic media), CD-ROM, DVD와 같은 광기록 매체(optical media), 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 롬(ROM), 램(RAM), 플래시 메모리 등과 같은 프로그램 명령을 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다. 프로그램 명령의 예에는 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드를 포함한다. 상기된 하드웨어 장치는 실시예의 동작을 수행하기 위해 하나 이상의 소프트웨어 모듈로서 작동하도록 구성될 수 있으며, 그 역도 마찬가지이다.Examples of computer readable recording media include magnetic media such as hard disks, floppy disks and magnetic tape, optical media such as CD-ROMs, DVDs, and magnetic disks such as floppy disks. Magneto-optical media, and hardware devices specifically configured to store and execute program instructions, such as ROM, RAM, flash memory, and the like. Examples of program instructions include machine code, such as produced by a compiler, as well as high-level language code that can be executed by a computer using an interpreter or the like. The hardware device described above may be configured to operate as one or more software modules to perform the operations of the embodiments, and vice versa.

이상과 같이 실시예들이 비록 한정된 실시예와 도면에 의해 설명되었으나, 해당 기술분야에서 통상의 지식을 가진 자라면 상기의 기재로부터 다양한 수정 및 변형이 가능하다. 예를 들어, 설명된 기술들이 설명된 방법과 다른 순서로 수행되거나, 및/또는 설명된 시스템, 구조, 장치, 회로 등의 구성요소들이 설명된 방법과 다른 형태로 결합 또는 조합되거나, 다른 구성요소 또는 균등물에 의하여 대치되거나 치환되더라도 적절한 결과가 달성될 수 있다.Although the embodiments have been described by the limited embodiments and the drawings as described above, various modifications and variations are possible to those skilled in the art from the above description. For example, the described techniques may be performed in a different order than the described method, and / or components of the described systems, structures, devices, circuits, etc. may be combined or combined in a different manner than the described method, or other components. Or even if replaced or substituted by equivalents, an appropriate result can be achieved.

그러므로, 다른 구현들, 다른 실시예들 및 특허청구범위와 균등한 것들도 후술하는 특허청구범위의 범위에 속한다.Therefore, other implementations, other embodiments, and equivalents to the claims are within the scope of the claims that follow.

Claims (20)

파서의 재구성을 위한 비트스트림 구문 정보를 판독하는 단계;
상기 비트스트림 구문 정보가 유효(validation)한지 여부를 판단하는 단계;
상기 비트스트림 구문 정보가 유효한 경우, 상기 비트스트림 구문 정보에 기초하여 미리 정의된 파서(parser)를 재구성하는 단계; 및
상기 재구성한 파서를 이용하여 입력된 비트스트림을 파싱(parsing)하는 단계
를 포함하고,
상기 재구성하는 단계는,
상기 비트스트림 구문 정보에서 제어 정보, 플러그인 함수 정보 및 인터페이스 정보를 추출하는 단계;
상기 파서의 외부에서 특정 기능을 수행하기 위한 외부 함수 정보를 포함하는 플러그인 함수 인스턴스들(instances)을 상기 미리 정의된 파서 내에 제어부에 의해 호출될 수 있는 상태로 준비시키고, 상기 플러그인 함수 인스턴스에 비트스트림 구문 정보에 나타난 파라미터들을 적용하여 상기 플러그인 함수 인스턴스를 초기화시킴으로써, 상기 플러그인 함수 정보에 기초하여 외부 함수의 실행을 위한 대기 상태를 설정하는 단계를 포함하는 비트스트림 파싱 방법.

Reading bitstream syntax information for reconstruction of the parser;
Determining whether the bitstream syntax information is valid;
Reconfiguring a predefined parser based on the bitstream syntax information when the bitstream syntax information is valid; And
Parsing the input bitstream using the reconstructed parser
Including,
The reconstructing step,
Extracting control information, plug-in function information, and interface information from the bitstream syntax information;
Prepares plug-in function instances containing external function information for performing a specific function outside of the parser in a state that can be called by a controller in the predefined parser, and bitstreams the plug-in function instance. And initializing the plug-in function instance by applying the parameters shown in the syntax information, thereby setting a wait state for execution of an external function based on the plug-in function information.

삭제delete 제1항에 있어서,
상기 제어 정보는,
입력된 비트스트림으로부터 정보를 추출하는 방법을 나타내는 파싱 스테이트, 외부 함수를 불러올 때 이용하는 외부 함수 호출 스테이트, 유한 상태 기계(Finite State Machine, FSM)를 불러올 때 이용하는 FSM 호출 스테이트, 및 조건에 따라 다른 스테이트로 점프를 하기 위한 분기(branch) 스테이트 중 적어도 하나를 포함하는 비트스트림 파싱 방법.
The method of claim 1,
The control information,
A parsing state that indicates how to extract information from the input bitstream, an external function call state used to invoke an external function, an FSM call state used to invoke a finite state machine (FSM), and other states depending on the condition A bitstream parsing method comprising at least one of the branch states to jump to.
제1항에 있어서,
상기 플러그인 함수 정보는,
상기 파서의 외부에서 특정 기능을 수행하기 위한 외부 함수 정보를 포함하는 비트스트림 파싱 방법.
The method of claim 1,
The plug-in function information,
Bitstream parsing method comprising external function information for performing a specific function outside the parser.
제1항에 있어서,
상기 인터페이스 정보는,
입력 포트 및 출력 포트에 관한 정의를 포함하는 비트스트림 파싱 방법.
The method of claim 1,
The interface information,
A bitstream parsing method comprising definitions for input ports and output ports.
제1항에 있어서,
상기 재구성하는 단계는,
상기 인터페이스 정보에 기초하여 상기 미리 정의된 파서의 입력 포트 및 출력 포트를 구성하는 단계; 및
상기 미리 정의된 파서를 제어하기 위해 상기 제어 정보를 로드(load)하는 단계
를 포함하는 비트스트림 파싱 방법.
The method of claim 1,
The reconstructing step,
Configuring an input port and an output port of the predefined parser based on the interface information; And
Loading the control information to control the predefined parser
Bitstream parsing method comprising a.
제1항에 있어서,
상기 판단하는 단계는,
상기 비트스트림 구문 정보에 문법적인 오류가 존재하는지 여부를 판단하는 단계; 및
상기 비트스트림 구문 정보에 인터페이스 및 외부 함수와 관련된 기능적인 오류가 존재하는지 여부를 판단하는 단계
를 포함하는 비트스트림 파싱 방법.
The method of claim 1,
The determining step,
Determining whether there is a grammatical error in the bitstream syntax information; And
Determining whether there is a functional error related to an interface and an external function in the bitstream syntax information;
Bitstream parsing method comprising a.
제1항에 있어서,
상기 미리 정의된 파서는,
입력 포트 및 출력 포트 중 적어도 하나가 상기 비트스트림 구문 정보에 기초하여 가변적으로 결정되는 비트스트림 파싱 방법.
The method of claim 1,
The predefined parser,
And at least one of an input port and an output port is variably determined based on the bitstream syntax information.
제1항에 있어서,
상기 비트스트림 구문 정보는,
확장 가능 마크업 언어(Extensible Mark-up Language, XML) 스크립트(script) 기반의 언어로 작성된 비트스트림 파싱 방법.
The method of claim 1,
The bitstream syntax information is
Extensible Mark-up Language (XML) A bitstream parsing method written in a script-based language.
파서의 재구성을 위한 비트스트림 구문 정보를 판독하는 판독부;
상기 비트스트림 구문 정보가 유효한지 여부를 판단하는 유효성 판단부;
상기 비트스트림 구문 정보가 유효한 경우, 상기 비트스트림 구문 정보에 기초하여 미리 정의된 파서를 재구성하는 파서 재구성부; 및
상기 재구성된 파서를 이용하여 입력된 비트스트림을 파싱하는 비트스트림 파싱부
를 포함하고,
상기 파서 재구성부는,
상기 비트스트림 구문 정보에서 제어 정보, 플러그인 함수 정보 및 인터페이스 정보를 추출하고, 상기 파서의 외부에서 특정 기능을 수행하기 위한 외부 함수 정보를 포함하는 플러그인 함수 인스턴스들(instances)을 상기 미리 정의된 파서 내에 제어부에 의해 호출될 수 있는 상태로 준비시키고, 상기 플러그인 함수 인스턴스에 비트스트림 구문 정보에 나타난 파라미터들을 적용하여 상기 플러그인 함수 인스턴스를 초기화시킴으로써, 상기 플러그인 함수 정보에 기초하여 외부 함수의 실행을 위한 대기 상태를 설정하는 비트스트림 파싱 장치.
A reading unit that reads bitstream syntax information for reconstruction of the parser;
A validity determination unit determining whether the bitstream syntax information is valid;
A parser reconstructing unit configured to reconstruct a predefined parser based on the bitstream syntax information when the bitstream syntax information is valid; And
A bitstream parser configured to parse the input bitstream using the reconstructed parser
Including,
The parser reconstruction unit,
Extract control information, plug-in function information, and interface information from the bitstream syntax information, and include plug-in function instances in the predefined parser including external function information for performing a specific function outside of the parser. Preparing to be called by a controller, and initializing the plug-in function instance by applying parameters indicated in bitstream syntax information to the plug-in function instance, thereby waiting for execution of an external function based on the plug-in function information. Bitstream parsing device to set up.
제10항에 있어서,
상기 파서 재구성부는,
상기 비트스트림 구문 정보로부터 추출한 제어 정보, 상기 플러그인 함수 정보 및 인터페이스 정보에 기초하여 미리 정의된 파서를 재구성하는 비트스트림 파싱 장치.
The method of claim 10,
The parser reconstruction unit,
And reconfiguring a predefined parser based on the control information, the plug-in function information, and the interface information extracted from the bitstream syntax information.
제11항에 있어서,
상기 파서 재구성부는,
상기 인터페이스 정보에 기초하여 상기 미리 정의된 파서의 입력 포트 및 출력 포트를 구성하고, 상기 플러그인 함수 정보에 기초하여 외부 함수의 실행을 위한 대기 상태를 설정한 후에, 상기 미리 정의된 파서를 제어하기 위해 상기 제어 정보를 로드하는 비트스트림 파싱 장치.
The method of claim 11,
The parser reconstruction unit,
Configure an input port and an output port of the predefined parser based on the interface information, and after setting a standby state for execution of an external function based on the plug-in function information, to control the predefined parser. And a bitstream parsing device for loading the control information.
제11항에 있어서,
상기 제어 정보는,
입력된 비트스트림으로부터 정보를 추출하는 방법을 나타내는 파싱 스테이트, 외부 함수를 불러올 때 이용하는 외부 함수 호출 스테이트, 유한 상태 기계(FSM)를 불러올 때 이용하는 FSM 호출 스테이트, 및 조건에 따라 다른 스테이트로 점프를 하기 위한 분기 스테이트 중 적어도 하나를 포함하는 비트스트림 파싱 장치.
The method of claim 11,
The control information,
Parsing states that indicate how to extract information from the input bitstream, external function call states used to call external functions, FSM call states used to load finite state machines (FSMs), and jump to different states depending on conditions. And at least one of the branch states for the device.
삭제delete 제11항에 있어서,
상기 인터페이스 정보는,
입력 포트 및 출력 포트에 관한 정의를 포함하는 비트스트림 파싱 장치.
The method of claim 11,
The interface information,
Bitstream parsing device comprising definitions for input ports and output ports.
제10항에 있어서,
상기 유효성 판단부는,
상기 비트스트림 구문 정보에 문법적인 오류 및 기능적인 오류가 존재하는지 여부를 판단하는 비트스트림 파싱 장치.
The method of claim 10,
The validity determination unit,
And determining whether there is a grammatical error or a functional error in the bitstream syntax information.
제10항에 있어서,
상기 미리 정의된 파서는,
입력 포트 및 출력 포트 중 적어도 하나가 상기 비트스트림 구문 정보에 기초하여 가변적으로 결정되는 비트스트림 파싱 장치.
The method of claim 10,
The predefined parser,
And at least one of an input port and an output port is variably determined based on the bitstream syntax information.
삭제delete 삭제delete 삭제delete
KR1020130023738A 2012-04-26 2013-03-06 Method and apparatus for parsing bitstream, generic parsing apparatus KR102058333B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US13/871,902 US20130287121A1 (en) 2012-04-26 2013-04-26 Method and apparatus for parsing bitstream, and generic parsing apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR20120044089 2012-04-26
KR1020120044089 2012-04-26

Publications (2)

Publication Number Publication Date
KR20130121010A KR20130121010A (en) 2013-11-05
KR102058333B1 true KR102058333B1 (en) 2019-12-24

Family

ID=49851456

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020130023738A KR102058333B1 (en) 2012-04-26 2013-03-06 Method and apparatus for parsing bitstream, generic parsing apparatus

Country Status (1)

Country Link
KR (1) KR102058333B1 (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030196195A1 (en) * 2002-04-15 2003-10-16 International Business Machines Corporation Parsing technique to respect textual language syntax and dialects dynamically

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101477218B1 (en) * 2008-10-10 2015-01-02 한양대학교 산학협력단 Device and Method for encoding/decoding

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030196195A1 (en) * 2002-04-15 2003-10-16 International Business Machines Corporation Parsing technique to respect textual language syntax and dialects dynamically

Also Published As

Publication number Publication date
KR20130121010A (en) 2013-11-05

Similar Documents

Publication Publication Date Title
JP6524021B2 (en) Parsed header for compilation
CN110597501B (en) Natural language programming method and device based on strong static scripting language
US20020019973A1 (en) Compiler and method for compiling easily adaptable to processor specifications
CN110069259B (en) ID L file-based parsing method and device, electronic equipment and storage medium
CN108549535B (en) Efficient program analysis method and system based on file dependency relationship
CN115951890B (en) Method, system and device for transcoding between different front end frameworks
US20230367569A1 (en) Method of generating a representation of a program logic, decompilation apparatus, recompilation system and computer program products
JP6699200B2 (en) Grammar generation for simple data types
US20140189664A1 (en) METHOD FOR ENABLING COMPILATION OF A COBOL SOURCE PROGRAM UTILIZING A TWO-STAGE COMPILATION PROCESS, THE COBOL SOURCE PROGRAM INCLUDING A MIX OF COBOL, C++ or JAVA STATEMENTS, AND OPTIONAL OPENMP DIRECTIVES
US20050055682A1 (en) Authoring and using generic classes in JAVA language code
US20130287121A1 (en) Method and apparatus for parsing bitstream, and generic parsing apparatus
CN107092474A (en) Program developing method, ETL processing method and processing devices
Adams et al. Indentation-sensitive parsing for Parsec
KR102058333B1 (en) Method and apparatus for parsing bitstream, generic parsing apparatus
CN113254023A (en) Object reading method and device and electronic equipment
Palumbo et al. RVC: A multi-decoder CAL Composer tool
CN116841559A (en) Transcoding method, device, apparatus, medium and program product
CN112579065A (en) Method and system for generating cross-platform code for graphic configuration picture
CN111158665A (en) Code generation method and device, electronic equipment and storage medium
US7770147B1 (en) Automatic generators for verilog programming
JP6964390B2 (en) Glamor generation for extended data types
US8997035B2 (en) Extensible template-based code generator builder
US7243341B2 (en) Scripting language for processing typed structured data
Gorin et al. A portable video tool library for MPEG reconfigurable video coding using LLVM representation
US9946524B2 (en) Method of compiling a source code, storage medium, and apparatus

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant