WO2018218950A1 - Entropy decoding method, device and storage medium - Google Patents

Entropy decoding method, device and storage medium Download PDF

Info

Publication number
WO2018218950A1
WO2018218950A1 PCT/CN2017/119256 CN2017119256W WO2018218950A1 WO 2018218950 A1 WO2018218950 A1 WO 2018218950A1 CN 2017119256 W CN2017119256 W CN 2017119256W WO 2018218950 A1 WO2018218950 A1 WO 2018218950A1
Authority
WO
WIPO (PCT)
Prior art keywords
binary
context model
symbol
arithmetic decoding
binary arithmetic
Prior art date
Application number
PCT/CN2017/119256
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 WO2018218950A1 publication Critical patent/WO2018218950A1/en

Links

Images

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/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/13Adaptive entropy coding, e.g. adaptive variable length coding [AVLC] or context adaptive binary arithmetic coding [CABAC]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/90Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using coding techniques not provided for in groups H04N19/10-H04N19/85, e.g. fractals
    • H04N19/91Entropy coding, e.g. variable length coding [VLC] or arithmetic coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/24Systems for the transmission of television signals using pulse code modulation

Definitions

  • the present invention relates to the field of video compression and codec, and in particular, to an entropy decoding method, apparatus, and storage medium.
  • High efficiency video coding is a new generation video coding standard released by JCT-VC in 2013.
  • Context-based Adaptive Binary Arithmetic Coding is an entropy coding method of the H.265/HEVC standard, which includes three basic steps: binarization, context model selection, and binary arithmetic coding.
  • the entropy decoding process requires binary arithmetic decoding to perform the update operation of the relevant model, and then the next arithmetic decoding.
  • the above two steps have sequential and data dependencies, and it is difficult to increase the throughput rate in parallel, which becomes a decoder performance bottleneck.
  • an HEVC decoder can be implemented by using an ASIC.
  • the existing entropy decoding technology can perform a binary symbol algorithm decoding and a context model update in one clock cycle by using a combination logic circuit.
  • the bit stream rate is high, if it is required to complete recovery of multiple binary symbols in one clock cycle, it is necessary to serially complete the arithmetic decoding of the binary symbol BIN0 in one clock cycle, the context model update, and the arithmetic of the binary symbol BIN1.
  • Decoding, context model updates can cause serious timing violations.
  • embodiments of the present invention are expected to provide an entropy decoding method, apparatus, and storage medium, which can improve decoding throughput.
  • An embodiment of the present invention provides an entropy decoding method, including:
  • Binary arithmetic decoding of binary symbols for predetermined syntax elements, while performing binary arithmetic decoding, predicting a context model corresponding to the next decoded syntax element and binary symbol when the binary symbols are 0 and 1, respectively;
  • the corresponding context model is selected from the predicted results based on the values of the binary symbols obtained by binary arithmetic decoding.
  • the predetermined syntax element may include one or more of the following:
  • Residual coding syntax elements Residual coding syntax elements, motion vector difference syntax elements.
  • the binary arithmetic decoding of the binary symbols may include:
  • the current binary symbol is equal to the LPS; if the difference between the current interval R and the offset value Offset is greater than the interval size of the LPS, Then the current binary symbol is equal to the maximum probability symbol MPS.
  • the first binary arithmetic decoding unit and the second binary arithmetic decoding unit may be used for binary arithmetic decoding, respectively, and the first context model selection unit may be adopted respectively.
  • the second context model selecting unit when the predicted binary symbols are 0 and 1, respectively, the next decoded syntax element and the context model corresponding to the binary symbol.
  • the selecting the corresponding context model from the predicted result according to the value of the binary symbol obtained by the binary arithmetic decoding may include:
  • the next decoded syntax element and the context model corresponding to the binary symbol are respectively used as input signals of the selector; the numerical value of the binary symbol obtained according to binary arithmetic decoding is used as the The control signal of the selector; the output signal of the selector is the selected context model.
  • An embodiment of the present invention further provides an entropy decoding apparatus, including:
  • a parsing module configured to perform binary arithmetic decoding on the binary symbol; for a predetermined syntax element, while performing binary arithmetic decoding, predicting that the binary symbol is 0 and 1, respectively, the next decoded syntax element and the binary symbol corresponding to Context model
  • a selection module configured to select a corresponding context model from the predicted results according to the value of the binary symbol obtained by binary arithmetic decoding.
  • the predetermined syntax element may include one or more of the following:
  • Residual coding syntax elements Residual coding syntax elements, motion vector difference syntax elements.
  • the binary arithmetic decoding of the binary symbols may include:
  • the current binary symbol is equal to the LPS; if the difference between the current interval R and the offset value Offset is greater than the interval size of the LPS, the current binary symbol is equal to the maximum probability symbol MPS .
  • the parsing module may include:
  • a first binary arithmetic decoding unit a first context model selecting unit, a second binary arithmetic decoding unit, and a second context model selecting unit
  • the first binary arithmetic decoding unit and the second binary arithmetic decoding unit may be respectively used for binary arithmetic decoding of two binary symbols parsed in one clock cycle;
  • the first context model selection unit and the second context model selection unit may be respectively used for two binary symbols parsed in one clock cycle, and when the prediction is 0 and 1, respectively, the next decoded syntax element and the binary symbol correspond to Context model.
  • the selecting module may include:
  • the input signal of the first selector may be a context model corresponding to the next decoded syntax element and the binary symbol when the binary symbols predicted by the first context model selection unit are 0 and 1, respectively;
  • the control signal may be The value of the binary symbol obtained by the first binary arithmetic decoding unit;
  • the output signal may be the selected first context model, and input to the second binary arithmetic decoding unit;
  • the input signal of the second selector may be a context model corresponding to the next decoded syntax element and the binary symbol when the binary symbols predicted by the second context model selection unit are 0 and 1, respectively;
  • the control signal may be The value of the binary symbol obtained by the second binary arithmetic decoding unit;
  • the output signal may be the selected second context model.
  • An embodiment of the present invention further provides an entropy decoding apparatus, including: a processor and a memory;
  • the memory is configured to save a program for performing entropy decoding
  • the processor is configured to execute the program for performing entropy decoding, and implement the following operations:
  • Binary arithmetic decoding of binary symbols for predetermined syntax elements, while performing binary arithmetic decoding, predicting a context model corresponding to the next decoded syntax element and binary symbol when the binary symbols are 0 and 1, respectively;
  • the corresponding context model is selected from the predicted results based on the values of the binary symbols obtained by binary arithmetic decoding.
  • the predetermined syntax element may include one or more of the following:
  • Residual coding syntax elements Residual coding syntax elements, motion vector difference syntax elements.
  • the binary arithmetic decoding of the binary symbols may include:
  • the current binary symbol is equal to the LPS; if the difference between the current interval R and the offset value Offset is greater than the interval size of the LPS, the current binary symbol is equal to the maximum Probability symbol MPS.
  • the embodiment of the present application can reduce the timing path of the circuit, and can greatly improve the throughput rate of the HEVC standard entropy decoding circuit.
  • FIG. 1 is a schematic flowchart of an entropy decoding method according to an embodiment of the present invention
  • FIG. 2 is a schematic flowchart of CABAC decoding according to an embodiment of the present invention.
  • FIG. 3 is a schematic diagram of the operation of a binary arithmetic decoding unit according to an embodiment of the present invention.
  • FIG. 4 is a schematic diagram of calculating a binary symbol using an offset value and a minimum probability symbol according to an embodiment of the present invention
  • FIG. 5 is a schematic diagram of an entropy decoding apparatus according to an embodiment of the present invention.
  • An embodiment of the present invention provides an entropy decoding method, as shown in FIG. 1 , and relates to S110 to S120, and then separately describes:
  • S110 Perform binary arithmetic decoding on the binary symbol; for the predetermined syntax element, while performing binary arithmetic decoding, predict the context model corresponding to the next decoded syntax element and the binary symbol when the binary symbols are 0 and 1, respectively.
  • the prediction at the same time of decoding means that the prediction and the decoding are performed synchronously, which is a parallel process; and the process of decoding and predicting a binary symbol can be started, but not limited to, at the same time.
  • the predicted result includes a prediction result of a branch in which the binary symbol is 0, and a prediction result of a branch in which the binary symbol is 1.
  • the corresponding prediction result can be directly selected according to the value. .
  • the predetermined syntax element may include, but is not limited to, one or more of the following:
  • Residual coding syntax elements Residual coding syntax elements, motion vector difference syntax elements.
  • the binary arithmetic decoding of the binary symbols may include:
  • the current binary symbol is equal to the LPS; if the difference between the current interval R and the offset value Offset is greater than the interval size of the LPS, the current binary symbol is equal to the MPS.
  • binary arithmetic decoding may be performed by using the first binary arithmetic decoding unit and the second binary arithmetic decoding unit, respectively, and the first context model may be adopted respectively.
  • the selection unit and the second context model selection unit when the predicted binary symbols are 0 and 1, respectively, the next decoded syntax element and the context model corresponding to the binary symbol.
  • the selecting the corresponding context model from the predicted results according to the binary symbol obtained by the binary arithmetic decoding may include:
  • the next decoded syntax element and the context model corresponding to the binary symbol are respectively used as input signals of the selector; the numerical value of the binary symbol obtained according to binary arithmetic decoding is used as the The control signal of the selector; the output signal of the selector is the selected context model.
  • CABAC decoding will be described as an example.
  • This example applies two-part syntax elements in the H.265/HEVC standard, namely: residual coding syntax elements and motion vector difference syntax elements.
  • the context model is determined in advance by means of prediction; in the binary arithmetic decoding process
  • the two binary symbols are recovered in one clock cycle, and the timing path of the circuit is shortened, thereby improving the HEC decoder CABAC throughput. rate.
  • the entropy decoding function in the HEVC standard can be implemented in a manner that software and hardware cooperate.
  • the software completes the resolution of the video layer parameter set (VPS, Video Parameter Set), sequence parameter set (SPS, Sequence Paramater Set), and image parameter set (PPS, Picture Paramater Set).
  • the hardware circuit completes the parsing of the slice header and the following syntax elements.
  • the entropy decoding hardware may include a state machine control unit, two sets of binary arithmetic decoding units, and two sets of context model selection units.
  • Step 201 Read the bit stream, parse the VPS, SPS, and PPS parameter sets, and perform hardware configuration.
  • the software completes the analysis of the VPS, SPS, and PPS parameter sets, configures the hardware through the Advanced Peripheral Bus (APB), and writes the decoding parameters to the hardware registers.
  • API Advanced Peripheral Bus
  • Step 202 Perform binary arithmetic decoder initialization, and initialize the context probability model.
  • the current interval (currange) is set to decimal 510;
  • each probability model is initialized as described in the HEVC standard, including:
  • Step 203 Transfer the entropy decoding process of the corresponding syntax element, and select a probability model.
  • the state machine control unit selects the probability model according to the HEVC syntax element, transfers to the entropy decoding process of the corresponding syntax element, and selects the probability model. For example, when parsing a CTU, the first syntax element to be decoded is sample adaptive offset.
  • branch prediction is performed on two parts of the residual and motion vector difference, and the throughput is improved; that is, for the residual coefficient syntax element and the motion vector difference syntax element,
  • the operations of steps 204 to 207 are employed.
  • a binary symbol is parsed in one clock cycle.
  • Step 204 Parse the first binary symbol BIN0, and start the context model selection unit CM1 to perform branch prediction.
  • the startup binary arithmetic decoding unit BAD1 parses the first binary symbol BIN0.
  • the startup context model selection unit CM1 predicts the context model corresponding to the next decoded syntax element and binary symbol when BIN0 is 0 and 1, respectively.
  • the method of comparing the offset value with the interval size of the minimum probability symbol (LPS) is adopted. If the new interval obtained after the interval is less than 256, the renormalization process is required.
  • the binary arithmetic decoding unit is shown in FIG.
  • the context model CM_0 of the first binary symbol BIN0 to be decoded is selected at the clock period clk0. If the decoding mode of BIN0 is conventional decoding, BAD1 is started to parse BIN0 in the next clock cycle clk1.
  • R is the size of the current interval.
  • the size of the subinterval corresponding to the LPS ie, the interval size of the LPS (ie, the interval size of the LPS) R Lps is obtained by looking up the table:
  • is the probability state index
  • different ⁇ values correspond to different LPS probabilities
  • R Mps R-R Lps ;
  • the decision is made using the difference between the current interval R and the offset value Offset. If the difference R-Offset is less than or equal to R Lps , the current binary symbol Bin is equal to LPS; if the difference R-Offset is greater than R Lps , the current binary symbol Bin is equal to MPS.
  • Offset is updated to: R Lps - (R-Offset).
  • the context model is then updated based on the current Bin value.
  • Step 205 The value of the parsed BIN0 selects a corresponding context model.
  • the value of BIN0 parsed according to the binary arithmetic decoding unit BAD1 is 0 or 1, and the corresponding context model CM_1 is selected from the prediction results of CM1.
  • the value of BIN0 can be used as the control signal of the first selector.
  • Step 206 Parse the next binary symbol BIN1, and start the context model selection unit CM2 to perform branch prediction.
  • the binary arithmetic decoding unit BAD2 is started to parse the next binary symbol BIN1.
  • the syntax elements are stored in a double rate synchronous dynamic random access memory (DDR) through an Advanced EXtensible Interface (AXI) bus.
  • DDR double rate synchronous dynamic random access memory
  • AXI Advanced EXtensible Interface
  • the value of BIN1 parsed according to BAD2 is 0 or 1, and the corresponding context model CM_2 is selected from the results of CM2.
  • Step 207 The next clock cycle, the operations of steps 204 to 206 are repeated until the residual or motion vector difference syntax element entropy decoding is completed.
  • H.265/HEVC syntax elements There are many H.265/HEVC syntax elements. If branch prediction is performed for all syntax elements, the complexity of the entropy decoding part will be greatly increased. For the case where the residual and motion vectors in the bit stream are relatively large, in this example, only the residual coding syntax element and the motion vector difference syntax element are predicted, which not only improves the throughput of CABAC, but also reduces the hardware design. Difficulty. This is one of the improvement points of this application. For other syntax elements, it can be restored in the traditional way.
  • the parsing of two binary symbols BIN0 and BIN1 is completed in one clock cycle.
  • the usual step is to update the context model after BAD1 and BAD2 decoding, which can cause serious timing violations when implemented using combinatorial logic.
  • the branch prediction method is adopted, and when the BAD1 is started to parse the BIN0, the first context model selection unit CM1 is started to predict the context model corresponding to the next decoded syntax element and the binary symbol when the BIN0 is 0 and 1, respectively.
  • the same operation is performed for BAD2 and CM2.
  • the context model selection unit that performs branch prediction performs the determination of the context model in advance, which is one of the improvement points of the present application.
  • the present application does not adopt a method in which the offset value is compared with the maximum probability symbol (MPS) in the HEVC standard, but a method in which the offset value is compared with the interval size of the minimum probability symbol (LPS).
  • MPS maximum probability symbol
  • LPS interval size of the minimum probability symbol
  • An embodiment of the present invention further provides an entropy decoding device, as shown in FIG. 5, including:
  • the parsing module 21 is configured to perform binary arithmetic decoding on the binary symbols; for the predetermined syntax element, when the binary arithmetic decoding is performed, when the binary symbols are predicted to be 0 and 1, respectively, the next decoded syntax element and the binary symbol correspond to Context model
  • the selecting module 22 is configured to select a corresponding context model from the predicted results according to the value of the binary symbol obtained by binary arithmetic decoding.
  • the predetermined syntax element may include one or more of the following:
  • Residual coding syntax elements Residual coding syntax elements, motion vector difference syntax elements.
  • the binary arithmetic decoding of the binary symbols may include:
  • the current binary symbol is equal to the LPS; if the difference between the current interval R and the offset value Offset is greater than the interval size of the LPS, the current binary symbol is equal to the maximum Probability symbol MPS.
  • the parsing module may include:
  • a first binary arithmetic decoding unit a first context model selecting unit, a second binary arithmetic decoding unit, and a second context model selecting unit
  • the first binary arithmetic decoding unit and the second binary arithmetic decoding unit are respectively configured to perform binary arithmetic decoding on two binary symbols parsed in one clock cycle;
  • the first context model selection unit and the second context model selection unit are respectively configured to use two binary symbols parsed in one clock cycle, and when the prediction is 0 and 1, respectively, the next decoded syntax element and the binary symbol correspond to Context model.
  • the selecting module may include:
  • the input signal of the first selector is a context model corresponding to a next decoded syntax element and a binary symbol when the binary symbols predicted by the first context model selection unit are 0 and 1, respectively;
  • the control signal is the a binary arithmetic decoding unit obtains a value of a binary symbol;
  • the output signal is a selected first context model, and is input to the second binary arithmetic decoding unit;
  • the input signal of the second selector is a context model corresponding to the next decoded syntax element and the binary symbol when the binary symbols predicted by the second context model selection unit are 0 and 1, respectively;
  • the control signal is the The value of the binary symbol obtained by the binary arithmetic decoding unit;
  • the output signal is the selected second context model.
  • An embodiment of the present invention further provides an entropy decoding apparatus, including: a processor and a memory;
  • the memory is configured to save a program for performing entropy decoding
  • the processor is configured to execute the program for performing entropy decoding, and implement the following operations:
  • Binary arithmetic decoding of binary symbols for predetermined syntax elements, while performing binary arithmetic decoding, predicting a context model corresponding to the next decoded syntax element and binary symbol when the binary symbols are 0 and 1, respectively;
  • the corresponding context model is selected from the predicted results based on the values of the binary symbols obtained by binary arithmetic decoding.
  • the predetermined syntax element may include one or more of the following:
  • Residual coding syntax elements Residual coding syntax elements, motion vector difference syntax elements.
  • the binary arithmetic decoding of the binary symbols may include:
  • the current binary symbol is equal to the LPS; if the difference between the current interval R and the offset value Offset is greater than the interval size of the LPS, the current binary symbol is equal to the maximum Probability symbol MPS.
  • embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention can take the form of a hardware embodiment, a software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) including computer usable program code.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
  • binary arithmetic decoding is performed on binary symbols; for predetermined syntax elements, when binary arithmetic decoding is performed, when the binary symbols are predicted to be 0 and 1, respectively, the next decoded syntax element and the binary symbol correspond to a context model; selecting a corresponding context model from the predicted results based on the values of the binary symbols obtained by binary arithmetic decoding.
  • the timing path of the circuit can be reduced, and the throughput of the HEVC standard entropy decoding circuit can be greatly improved.

Abstract

The present invention provides an entropy decoding method and device, and a storage medium. The entropy decoding method comprises: performing binary arithmetic decoding of a binary symbol; for a predetermined syntactic element, predicting, when performing the binary arithmetic decoding, a syntactic element of the next decoding and a context model corresponding to the binary symbol when the binary symbol is 0 or 1; and according to the numerical value of the binary symbol obtained by performing the binary arithmetic decoding, selecting a corresponding context model from the predicted results. The present application can improve decoding throughput.

Description

熵解码方法、装置及存储介质Entropy decoding method, device and storage medium
相关申请的交叉引用Cross-reference to related applications
本申请基于申请号为201710390040.5、申请日为2017年05月27日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。The present application is based on a Chinese patent application filed on Jan. 27, 2017, the entire disclosure of which is hereby incorporated by reference.
技术领域Technical field
本发明涉及视频压缩与编解码领域,尤其涉及一种熵解码方法、装置及存储介质。The present invention relates to the field of video compression and codec, and in particular, to an entropy decoding method, apparatus, and storage medium.
背景技术Background technique
随着高清、超高清视频应用的发展,视频压缩技术面临了越来越大的挑战。高效视频编码(HEVC,High efficiency video coding)是JCT-VC在2013年发布的新一代视频编码标准。基于上下文的自适应二进制算术编码(CABAC,Context-based Adaptive Binary Arithmetic Coding)是H.265/HEVC标准的熵编码方法,包括3个基本步骤:二值化,上下文模型选择,二进制算术编码。With the development of high-definition and ultra-high-definition video applications, video compression technology is facing more and more challenges. High efficiency video coding (HEVC) is a new generation video coding standard released by JCT-VC in 2013. Context-based Adaptive Binary Arithmetic Coding (CABAC) is an entropy coding method of the H.265/HEVC standard, which includes three basic steps: binarization, context model selection, and binary arithmetic coding.
在HEVC解码器端,熵解码过程需要在二进制算术解码后,才能进行相关模型的更新操作,然后再进行下一次算术解码。上述两个步骤具有顺序性和数据依赖性,很难采用并行的方式提高吞吐率,成为解码器性能瓶颈。On the HEVC decoder side, the entropy decoding process requires binary arithmetic decoding to perform the update operation of the relevant model, and then the next arithmetic decoding. The above two steps have sequential and data dependencies, and it is difficult to increase the throughput rate in parallel, which becomes a decoder performance bottleneck.
目前,可以使用专用集成电路实现HEVC解码器,现有熵解码技术采用组合逻辑电路在一个时钟周期内可以完成一个二进制符号的算法解码,上下文模型的更新。当比特流码率较高时,如果要求在一个时钟周期内完成多个二进制符号的恢复,则需要在一个时钟周期内串行完成二进制符号 BIN0的算术解码,上下文模型更新,二进制符号BIN1的算术解码,上下文模型更新,会造成严重的时序违例。At present, an HEVC decoder can be implemented by using an ASIC. The existing entropy decoding technology can perform a binary symbol algorithm decoding and a context model update in one clock cycle by using a combination logic circuit. When the bit stream rate is high, if it is required to complete recovery of multiple binary symbols in one clock cycle, it is necessary to serially complete the arithmetic decoding of the binary symbol BIN0 in one clock cycle, the context model update, and the arithmetic of the binary symbol BIN1. Decoding, context model updates, can cause serious timing violations.
由此可见,现有技术由于数据的依赖性,串行实现二进制算术解码和上下文模型更新,两级组合电路的时序违例很大,无法在一个时钟周期内恢复两个二进制符号,无法实现高吞吐率的CABAC解码。It can be seen that the prior art realizes binary arithmetic decoding and context model update in serial due to data dependency. The timing violation of the two-stage combined circuit is very large, and it is impossible to recover two binary symbols in one clock cycle, and high throughput cannot be realized. Rate of CABAC decoding.
发明内容Summary of the invention
有鉴于此,本发明实施例期望提供一种熵解码方法、装置及存储介质,可以提高解码吞吐率。In view of this, embodiments of the present invention are expected to provide an entropy decoding method, apparatus, and storage medium, which can improve decoding throughput.
本申请实施例提供如下技术方案。The embodiments of the present application provide the following technical solutions.
本发明实施例提供了一种熵解码方法,包括:An embodiment of the present invention provides an entropy decoding method, including:
对二进制符号进行二进制算术解码;对于预定的语法元素,在进行二进制算术解码的同时,预测所述二进制符号分别为0和1时,下一个解码的语法元素及二进制符号对应的上下文模型;Binary arithmetic decoding of binary symbols; for predetermined syntax elements, while performing binary arithmetic decoding, predicting a context model corresponding to the next decoded syntax element and binary symbol when the binary symbols are 0 and 1, respectively;
根据二进制算术解码得到的所述二进制符号的数值,从所预测的结果中选择相应的上下文模型。The corresponding context model is selected from the predicted results based on the values of the binary symbols obtained by binary arithmetic decoding.
上述方案中,所述预定的语法元素可以包括以下一项或多项:In the above solution, the predetermined syntax element may include one or more of the following:
残差编码语法元素、运动矢量差值语法元素。Residual coding syntax elements, motion vector difference syntax elements.
上述方案中,所述对二进制符号进行二进制算术解码可以包括:In the above solution, the binary arithmetic decoding of the binary symbols may include:
如果当前区间与偏移值的差小于或等于最小概率符号(LPS,Low Probality Symbol)的区间大小,则当前二进制符号等于LPS;如果当前区间R与偏移值Offset的差大于LPS的区间大小,则当前二进制符号等于最大概率符号MPS。If the difference between the current interval and the offset value is less than or equal to the interval size of the minimum probity symbol (LPS), the current binary symbol is equal to the LPS; if the difference between the current interval R and the offset value Offset is greater than the interval size of the LPS, Then the current binary symbol is equal to the maximum probability symbol MPS.
上述方案中,对一个时钟周期内解析的两个二进制符号,可以分别采用第一二进制算术解码单元和第二二进制算术解码单元进行二进制算术解码,可以分别采用第一上下文模型选择单元和第二上下文模型选择单元, 预测二进制符号分别为0和1时,下一个解码的语法元素及二进制符号对应的上下文模型。In the above solution, for the two binary symbols parsed in one clock cycle, the first binary arithmetic decoding unit and the second binary arithmetic decoding unit may be used for binary arithmetic decoding, respectively, and the first context model selection unit may be adopted respectively. And the second context model selecting unit, when the predicted binary symbols are 0 and 1, respectively, the next decoded syntax element and the context model corresponding to the binary symbol.
上述方案中,所述根据二进制算术解码得到的所述二进制符号的数值,从预测得到的结果中选择相应的上下文模型可以包括:In the above solution, the selecting the corresponding context model from the predicted result according to the value of the binary symbol obtained by the binary arithmetic decoding may include:
将预测所述二进制符号分别为0和1时,下一个解码的语法元素及二进制符号对应的上下文模型分别作为选择器的输入信号;将根据二进制算术解码得到的所述二进制符号的数值作为所述选择器的控制信号;所述选择器的输出信号为所选择的上下文模型。When the binary symbols are predicted to be 0 and 1, respectively, the next decoded syntax element and the context model corresponding to the binary symbol are respectively used as input signals of the selector; the numerical value of the binary symbol obtained according to binary arithmetic decoding is used as the The control signal of the selector; the output signal of the selector is the selected context model.
本发明实施例还提供了一种熵解码装置,包括:An embodiment of the present invention further provides an entropy decoding apparatus, including:
解析模块,配置为对二进制符号进行二进制算术解码;对于预定的语法元素,在进行二进制算术解码的同时,预测所述二进制符号分别为0和1时,下一个解码的语法元素及二进制符号对应的上下文模型;a parsing module configured to perform binary arithmetic decoding on the binary symbol; for a predetermined syntax element, while performing binary arithmetic decoding, predicting that the binary symbol is 0 and 1, respectively, the next decoded syntax element and the binary symbol corresponding to Context model
选择模块,配置为根据二进制算术解码得到的所述二进制符号的数值,从所预测的结果中选择相应的上下文模型。And a selection module configured to select a corresponding context model from the predicted results according to the value of the binary symbol obtained by binary arithmetic decoding.
上述方案中,所述预定的语法元素可以包括以下一项或多项:In the above solution, the predetermined syntax element may include one or more of the following:
残差编码语法元素、运动矢量差值语法元素。Residual coding syntax elements, motion vector difference syntax elements.
上述方案中,所述对二进制符号进行二进制算术解码可以包括:In the above solution, the binary arithmetic decoding of the binary symbols may include:
如果当前区间与偏移值的差小于或等于LPS的区间大小,则当前二进制符号等于LPS;如果当前区间R与偏移值Offset的差大于LPS的区间大小,则当前二进制符号等于最大概率符号MPS。If the difference between the current interval and the offset value is less than or equal to the interval size of the LPS, the current binary symbol is equal to the LPS; if the difference between the current interval R and the offset value Offset is greater than the interval size of the LPS, the current binary symbol is equal to the maximum probability symbol MPS .
上述方案中,所述解析模块可以包括:In the above solution, the parsing module may include:
第一二进制算术解码单元、第一上下文模型选择单元、第二二进制算术解码单元、第二上下文模型选择单元;a first binary arithmetic decoding unit, a first context model selecting unit, a second binary arithmetic decoding unit, and a second context model selecting unit;
所述第一二进制算术解码单元和第二二进制算术解码单元,可以分别用于对一个时钟周期内解析的两个二进制符号进行二进制算术解码;The first binary arithmetic decoding unit and the second binary arithmetic decoding unit may be respectively used for binary arithmetic decoding of two binary symbols parsed in one clock cycle;
所述第一上下文模型选择单元和第二上下文模型选择单元,可以分别用于对一个时钟周期内解析的两个二进制符号,预测分别为0和1时,下一个解码的语法元素及二进制符号对应的上下文模型。The first context model selection unit and the second context model selection unit may be respectively used for two binary symbols parsed in one clock cycle, and when the prediction is 0 and 1, respectively, the next decoded syntax element and the binary symbol correspond to Context model.
上述方案中,所述选择模块可以包括:In the above solution, the selecting module may include:
第一选择器、第二选择器;a first selector, a second selector;
所述第一选择器的输入信号可以为所述第一上下文模型选择单元所预测的二进制符号分别为0和1时,下一个解码的语法元素及二进制符号对应的上下文模型;控制信号可以为所述第一二进制算术解码单元得到的二进制符号的数值;输出信号可以为所选择的第一上下文模型,输入给所述第二二进制算术解码单元;The input signal of the first selector may be a context model corresponding to the next decoded syntax element and the binary symbol when the binary symbols predicted by the first context model selection unit are 0 and 1, respectively; the control signal may be The value of the binary symbol obtained by the first binary arithmetic decoding unit; the output signal may be the selected first context model, and input to the second binary arithmetic decoding unit;
所述第二选择器的输入信号可以为所述第二上下文模型选择单元所预测的二进制符号分别为0和1时,下一个解码的语法元素及二进制符号对应的上下文模型;控制信号可以为所述第二二进制算术解码单元得到的二进制符号的数值;输出信号可以为所选择的第二上下文模型。The input signal of the second selector may be a context model corresponding to the next decoded syntax element and the binary symbol when the binary symbols predicted by the second context model selection unit are 0 and 1, respectively; the control signal may be The value of the binary symbol obtained by the second binary arithmetic decoding unit; the output signal may be the selected second context model.
本发明实施例还提供了一种熵解码装置,包括:处理器和存储器;An embodiment of the present invention further provides an entropy decoding apparatus, including: a processor and a memory;
所述存储器,配置为保存进行熵解码的程序;The memory is configured to save a program for performing entropy decoding;
所述处理器,配置为执行所述进行熵解码的程序,实现以下操作:The processor is configured to execute the program for performing entropy decoding, and implement the following operations:
对二进制符号进行二进制算术解码;对于预定的语法元素,在进行二进制算术解码的同时,预测所述二进制符号分别为0和1时,下一个解码的语法元素及二进制符号对应的上下文模型;Binary arithmetic decoding of binary symbols; for predetermined syntax elements, while performing binary arithmetic decoding, predicting a context model corresponding to the next decoded syntax element and binary symbol when the binary symbols are 0 and 1, respectively;
根据二进制算术解码得到的所述二进制符号的数值,从所预测的结果中选择相应的上下文模型。The corresponding context model is selected from the predicted results based on the values of the binary symbols obtained by binary arithmetic decoding.
上述方案中,所述预定的语法元素可以包括以下一项或多项:In the above solution, the predetermined syntax element may include one or more of the following:
残差编码语法元素、运动矢量差值语法元素。Residual coding syntax elements, motion vector difference syntax elements.
上述方案中,所述对二进制符号进行二进制算术解码可以包括:In the above solution, the binary arithmetic decoding of the binary symbols may include:
如果当前区间与偏移值的差小于或等于最小概率符号LPS的区间大小,则当前二进制符号等于LPS;如果当前区间R与偏移值Offset的差大于LPS的区间大小,则当前二进制符号等于最大概率符号MPS。If the difference between the current interval and the offset value is less than or equal to the interval size of the minimum probability symbol LPS, the current binary symbol is equal to the LPS; if the difference between the current interval R and the offset value Offset is greater than the interval size of the LPS, the current binary symbol is equal to the maximum Probability symbol MPS.
本申请实施例可以减小电路的时序路径,能够大幅提升HEVC标准熵解码电路的吞吐率。The embodiment of the present application can reduce the timing path of the circuit, and can greatly improve the throughput rate of the HEVC standard entropy decoding circuit.
本申请的其它特征和优点将在随后的说明书中阐述,并且,部分地从说明书中变得显而易见,或者通过实施本申请而了解。本申请的目的和其他优点可通过在说明书、权利要求书以及附图中所特别指出的结构来实现和获得。Other features and advantages of the present application will be set forth in the description which follows. The objectives and other advantages of the present invention can be realized and obtained by the structure of the invention.
附图说明DRAWINGS
附图用来提供对本申请技术方案的进一步理解,并且构成说明书的一部分,与本申请的实施例一起用于解释本申请的技术方案,并不构成对本申请技术方案的限制。The drawings are used to provide a further understanding of the technical solutions of the present application, and constitute a part of the specification, which is used together with the embodiments of the present application to explain the technical solutions of the present application, and does not constitute a limitation of the technical solutions of the present application.
图1是本发明实施例提供的熵解码方法的流程示意图;1 is a schematic flowchart of an entropy decoding method according to an embodiment of the present invention;
图2是本发明实施例提供的CABAC解码的流程示意图;2 is a schematic flowchart of CABAC decoding according to an embodiment of the present invention;
图3是本发明实施例提供的二进制算术解码单元工作示意图;3 is a schematic diagram of the operation of a binary arithmetic decoding unit according to an embodiment of the present invention;
图4是本发明实施例提供的使用偏移值与最小概率符号比较计算二进制符号的示意图;4 is a schematic diagram of calculating a binary symbol using an offset value and a minimum probability symbol according to an embodiment of the present invention;
图5是本发明实施例提供的熵解码装置的示意图。FIG. 5 is a schematic diagram of an entropy decoding apparatus according to an embodiment of the present invention.
具体实施方式detailed description
为使本申请的目的、技术方案和优点更加清楚明白,下文中将结合附图对本申请的实施例进行详细说明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互任意组合。In order to make the objects, technical solutions and advantages of the present application more clear, the embodiments of the present application will be described in detail below with reference to the accompanying drawings. It should be noted that, in the case of no conflict, the features in the embodiments and the embodiments in the present application may be arbitrarily combined with each other.
在附图的流程图示出的步骤可以在诸如一组计算机可执行指令的计算 机系统中执行。并且,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。The steps illustrated in the flowchart of the figures may be executed in a computer system such as a set of computer executable instructions. Also, although logical sequences are shown in the flowcharts, in some cases the steps shown or described may be performed in a different order than the ones described herein.
本发明实施例提供一种熵解码方法,如图1所示,涉及S110~S120,接下来分别进行说明:An embodiment of the present invention provides an entropy decoding method, as shown in FIG. 1 , and relates to S110 to S120, and then separately describes:
S110、对二进制符号进行二进制算术解码;对于预定的语法元素,在进行二进制算术解码的同时,预测所述二进制符号分别为0和1时,下一个解码的语法元素及二进制符号对应的上下文模型。S110: Perform binary arithmetic decoding on the binary symbol; for the predetermined syntax element, while performing binary arithmetic decoding, predict the context model corresponding to the next decoded syntax element and the binary symbol when the binary symbols are 0 and 1, respectively.
S120、根据二进制算术解码得到的所述二进制符号的数值,从所预测的结果中选择相应的上下文模型。S120. Select a corresponding context model from the predicted results according to the value of the binary symbol obtained by binary arithmetic decoding.
本实施例中,可以实现在一个时钟周期内解析两个二进制符号,缩短电路的时序路径,提高HEVC解码器CABAC吞吐率。In this embodiment, it is possible to parse two binary symbols in one clock cycle, shorten the timing path of the circuit, and improve the CABAC throughput rate of the HEVC decoder.
本实施例中,在解码的同时预测,是指预测和解码是同步进行的,是并行的过程;可以但不限于同一时刻启动对一个二进制符号的解码和预测过程。In this embodiment, the prediction at the same time of decoding means that the prediction and the decoding are performed synchronously, which is a parallel process; and the process of decoding and predicting a binary symbol can be started, but not limited to, at the same time.
本实施例中,所预测的结果包含二进制符号为0这个分支的预测结果,和二进制符号为1这个分支的预测结果;当解码得到二进制符号的数值后,就可以根据数值直接选择相应的预测结果。In this embodiment, the predicted result includes a prediction result of a branch in which the binary symbol is 0, and a prediction result of a branch in which the binary symbol is 1. When the value of the binary symbol is decoded, the corresponding prediction result can be directly selected according to the value. .
在一实施例中,所述预定的语法元素可以但不限于包括以下一项或多项:In an embodiment, the predetermined syntax element may include, but is not limited to, one or more of the following:
残差编码语法元素、运动矢量差值语法元素。Residual coding syntax elements, motion vector difference syntax elements.
在一实施例中,所述对二进制符号进行二进制算术解码可以包括:In an embodiment, the binary arithmetic decoding of the binary symbols may include:
如果当前区间R与偏移值Offset的差小于或等于LPS的区间大小,则当前二进制符号等于LPS;如果当前区间R与偏移值Offset的差大于LPS的区间大小,则当前二进制符号等于MPS。If the difference between the current interval R and the offset value Offset is less than or equal to the interval size of the LPS, the current binary symbol is equal to the LPS; if the difference between the current interval R and the offset value Offset is greater than the interval size of the LPS, the current binary symbol is equal to the MPS.
在一实施例中,对一个时钟周期内解析的两个二进制符号,可以分别 采用第一二进制算术解码单元和第二二进制算术解码单元进行二进制算术解码,可以分别采用第一上下文模型选择单元和第二上下文模型选择单元,预测二进制符号分别为0和1时,下一个解码的语法元素及二进制符号对应的上下文模型。In an embodiment, for two binary symbols parsed in one clock cycle, binary arithmetic decoding may be performed by using the first binary arithmetic decoding unit and the second binary arithmetic decoding unit, respectively, and the first context model may be adopted respectively. The selection unit and the second context model selection unit, when the predicted binary symbols are 0 and 1, respectively, the next decoded syntax element and the context model corresponding to the binary symbol.
在一实施例中,所述根据二进制算术解码得到的所述二进制符号的数值,从预测得到的结果中选择相应的上下文模型可以包括:In an embodiment, the selecting the corresponding context model from the predicted results according to the binary symbol obtained by the binary arithmetic decoding may include:
将预测所述二进制符号分别为0和1时,下一个解码的语法元素及二进制符号对应的上下文模型分别作为选择器的输入信号;将根据二进制算术解码得到的所述二进制符号的数值作为所述选择器的控制信号;所述选择器的输出信号为所选择的上下文模型。When the binary symbols are predicted to be 0 and 1, respectively, the next decoded syntax element and the context model corresponding to the binary symbol are respectively used as input signals of the selector; the numerical value of the binary symbol obtained according to binary arithmetic decoding is used as the The control signal of the selector; the output signal of the selector is the selected context model.
接下来以CABAC解码为例进行说明。Next, CABAC decoding will be described as an example.
本例子对H.265/HEVC标准中两部分语法元素,即:残差编码语法元素和运动矢量差值语法元素,在常规解码流程中,采用预测的方式提前确定上下文模型;在二进制算术解码过程中,采用偏移值与最小概率符号(Least Probable Symbol,LPS)的区间大小比较的方式,实现在一个时钟周期内恢复两个二进制符号,缩短了电路的时序路径,从而提高HEVC解码器CABAC吞吐率。This example applies two-part syntax elements in the H.265/HEVC standard, namely: residual coding syntax elements and motion vector difference syntax elements. In the conventional decoding process, the context model is determined in advance by means of prediction; in the binary arithmetic decoding process In the method of comparing the offset value with the interval size of the Least Probable Symbol (LPS), the two binary symbols are recovered in one clock cycle, and the timing path of the circuit is shortened, thereby improving the HEC decoder CABAC throughput. rate.
在实际实施时可以采用软件与硬件协同的方式完成HEVC标准中的熵解码功能。软件完成视频层参数集(VPS,Video Parameter Set),序列参数集(SPS,Sequence Paramater Set),图像参数集(PPS,Picture Paramater Set)参数集的解析。硬件电路完成条带头(slice header)及以下语法元素的解析。熵解码硬件可以包含状态机控制单元,两套二进制算术解码单元,两套上下文模型选择单元。In actual implementation, the entropy decoding function in the HEVC standard can be implemented in a manner that software and hardware cooperate. The software completes the resolution of the video layer parameter set (VPS, Video Parameter Set), sequence parameter set (SPS, Sequence Paramater Set), and image parameter set (PPS, Picture Paramater Set). The hardware circuit completes the parsing of the slice header and the following syntax elements. The entropy decoding hardware may include a state machine control unit, two sets of binary arithmetic decoding units, and two sets of context model selection units.
本例子按照如下步骤工作,如图2所示,包括如下步骤201~207:This example works as follows, as shown in FIG. 2, including the following steps 201-207:
步骤201、读入比特流,解析VPS,SPS,PPS参数集,并进行硬件配 置。Step 201: Read the bit stream, parse the VPS, SPS, and PPS parameter sets, and perform hardware configuration.
在实际实施时,软件完成VPS,SPS,PPS参数集的解析,通过高级外围总线(APB,Advanced Peripheral Bus)配置硬件,将解码参数写入硬件寄存器。In actual implementation, the software completes the analysis of the VPS, SPS, and PPS parameter sets, configures the hardware through the Advanced Peripheral Bus (APB), and writes the decoding parameters to the hardware registers.
步骤202、进行二进制算术解码器初始化,上下文概率模型初始化。Step 202: Perform binary arithmetic decoder initialization, and initialize the context probability model.
在解析一个新的条带(Slice),新的tile(格)或新的一行编码树单元(CTU,coding tree unit)时,按照HEVC标准所述,进行二进制算术解码器初始化,上下文概率模型初始化。When parsing a new slice, a new tile or a new coding tree unit (CTU), binary arithmetic decoder initialization, context probability model initialization is performed as described in the HEVC standard. .
对于二进制算术解码器,按照如下初始化:For binary arithmetic decoders, initialize as follows:
(1)当前区间(currange)设置为十进制510;(1) The current interval (currange) is set to decimal 510;
(2)读取码流起始9比特作为当前区间偏移值(Offset)。(2) The read stream starts with 9 bits as the current interval offset value (Offset).
对于概率模型,按照HEVC标准中描述,初始化各概率模型,包括:For the probability model, each probability model is initialized as described in the HEVC standard, including:
pStateIdx和valMps。pStateIdx and valMps.
步骤203、转入对应语法元素的熵解码流程,选择概率模型。Step 203: Transfer the entropy decoding process of the corresponding syntax element, and select a probability model.
状态机控制单元根据HEVC语法元素选择概率模型,转入对应语法元素的熵解码流程,选择概率模型。例如在解析CTU时,首先解码的语法元素为样本点自适应补偿(sample adaptive offset)。The state machine control unit selects the probability model according to the HEVC syntax element, transfers to the entropy decoding process of the corresponding syntax element, and selects the probability model. For example, when parsing a CTU, the first syntax element to be decoded is sample adaptive offset.
在本例子中,选择对残差(residual)和运动矢量差值(motion vector difference)两部分语法元素进行分支预测,提高吞吐率;即:对于残差系数语法元素和运动矢量差值语法元素,采用步骤204到207的操作。对于其他语法元素,则在一个时钟周期解析一个二进制符号。In this example, branch prediction is performed on two parts of the residual and motion vector difference, and the throughput is improved; that is, for the residual coefficient syntax element and the motion vector difference syntax element, The operations of steps 204 to 207 are employed. For other syntax elements, a binary symbol is parsed in one clock cycle.
步骤204、解析第一个二进制符号BIN0,启动上下文模型选择单元CM1进行分支预测。Step 204: Parse the first binary symbol BIN0, and start the context model selection unit CM1 to perform branch prediction.
启动二进制算术解码单元BAD1解析第一个二进制符号BIN0。在启动BAD1的同时,启动上下文模型选择单元CM1预测BIN0分别为0和1时, 下一个解码的语法元素及二进制符号对应的上下文模型。在二进制算术解码过程中,采用了偏移值与最小概率符号(LPS)的区间大小比较的方式。经过区间划分后得到的新区间如果小于256,就需要进行重归一化过程。The startup binary arithmetic decoding unit BAD1 parses the first binary symbol BIN0. At the same time as starting BAD1, the startup context model selection unit CM1 predicts the context model corresponding to the next decoded syntax element and binary symbol when BIN0 is 0 and 1, respectively. In the binary arithmetic decoding process, the method of comparing the offset value with the interval size of the minimum probability symbol (LPS) is adopted. If the new interval obtained after the interval is less than 256, the renormalization process is required.
在实际应用中,当进入到残差语法元素时(进入到运动矢量语法元素时的情况可以类推,这里不再赘述),二进制算术解码单元如图3所示。在时钟周期clk0选择残差系数第一个需解码的二进制符号BIN0的上下文模型CM_0。如果BIN0的解码方式为常规解码,则在下一个时钟周期clk1,启动BAD1解析BIN0。在解析BIN0时,启动CM1预测BIN0分别为0和1时,下一个解码的语法元素及二进制符号对应的上下文模型,分别记为CM_1_if=0和CM_1_if=1。In practical applications, when entering the residual syntax element (the case when entering the motion vector syntax element can be analogized, and will not be described here), the binary arithmetic decoding unit is shown in FIG. The context model CM_0 of the first binary symbol BIN0 to be decoded is selected at the clock period clk0. If the decoding mode of BIN0 is conventional decoding, BAD1 is started to parse BIN0 in the next clock cycle clk1. When BIN0 is parsed, when the CM1 prediction BIN0 is 0 and 1, respectively, the context model corresponding to the next decoded syntax element and binary symbol is denoted as CM_1_if=0 and CM_1_if=1, respectively.
在BAD1解析过程中,如图4所示,采用了偏移值与LPS的区间大小比较的方式。首先计算区间(range)的索引值ρ:In the BAD1 parsing process, as shown in FIG. 4, the manner in which the offset value is compared with the interval size of the LPS is adopted. First calculate the index value of the range (ρ):
ρ=(R>>6)&3;ρ=(R>>6)&3;
其中,R为当前区间的大小。Where R is the size of the current interval.
通过查表得到LPS对应的子区间的大小(即LPS的区间大小)R Lps: The size of the subinterval corresponding to the LPS (ie, the interval size of the LPS) R Lps is obtained by looking up the table:
R Lps=rangeTablps[σ][ρ] R Lps =rangeTablps[σ][ρ]
其中,σ为概率状态索引,不同的σ值对应不同的LPS的概率,以及不同的概率状态转化结果:当前待编解码的二进制符号为MPS,则概率状态将转化为transIdxMps[σ],如果当前待编解码的二进制符号为LPS,则概率状态将转化为transIdxLps[σ];比如σ=0时,LPS的概率为0.5,transIdxLps[σ]为0,transIdxMps[σ]为1。Where σ is the probability state index, different σ values correspond to different LPS probabilities, and different probability state conversion results: if the current binary symbol to be coded is MPS, the probability state will be converted to transIdxMps[σ], if current If the binary symbol to be coded is LPS, the probability state will be converted to transIdxLps[σ]; for example, when σ=0, the probability of LPS is 0.5, transIdxLps[σ] is 0, and transIdxMps[σ] is 1.
获取当前最大概率符号(MPS,Most Probable Symbol)的子区间的大小R MpsGet the size of the subinterval of the current maximum probability symbol (MPS, Most Probable Symbol) R Mps :
R Mps=R-R LpsR Mps =R-R Lps ;
使用当前区间R与偏移值Offset的差进行判决。如果差值R-Offset小于或等于R Lps,则当前二进制符号Bin等于LPS;如果差值R-Offset大 于R Lps,则当前二进制符号Bin等于MPS。 The decision is made using the difference between the current interval R and the offset value Offset. If the difference R-Offset is less than or equal to R Lps , the current binary symbol Bin is equal to LPS; if the difference R-Offset is greater than R Lps , the current binary symbol Bin is equal to MPS.
如果当前二进制符号Bin等于MPS,则MPS的编码区间R Mps作为下一个二进制符号的编码区间R(即:R=R Mps),区间下限L不变;σ=transIdxMps[σ]。 If the current binary symbol Bin is equal to MPS, the encoding interval R Mps of the MPS is taken as the encoding interval R of the next binary symbol (ie: R=R Mps ), the lower limit L of the interval is unchanged; σ=transIdxMps[σ].
如果当前二进制符号Bin等于LPS,则LPS的区间R Lps作为下一个二进制符号的编码区间R(即:R=R Lps),区间下限要增加R Mps的长度。Offset更新为:R Lps-(R-Offset)。 If the current binary symbol Bin is equal to LPS, the interval R Lps of the LPS is taken as the encoding interval R of the next binary symbol (ie: R = R Lps ), and the lower limit of the interval is increased by the length of R Mps . Offset is updated to: R Lps - (R-Offset).
判断σ是否等于0;如果σ=0即LPS的概率和MPS的概率相同,而由于目前再次出现LPS,因此MPS和LPS需要互换,即MPS=1-MPS;然后σ=transIdxLps[σ]。σ不等于0则直接σ=transIdxLps[σ]。It is judged whether σ is equal to 0; if σ=0, that is, the probability of LPS is the same as the probability of MPS, and since LPS is present again, MPS and LPS need to be interchanged, that is, MPS=1-MPS; then σ=transIdxLps[σ]. If σ is not equal to 0, then σ=transIdxLps[σ].
随后根据当前Bin值更新上下文模型。The context model is then updated based on the current Bin value.
经过区间划分后得到的新区间如果小于256,就需要进行重归一化过程。If the new interval obtained after the interval is less than 256, the renormalization process is required.
步骤205、解析的BIN0的数值选择相应的上下文模型。Step 205: The value of the parsed BIN0 selects a corresponding context model.
根据二进制算术解码单元BAD1解析的BIN0的数值为0或1,从CM1的预测结果中选择相应的上下文模型CM_1。The value of BIN0 parsed according to the binary arithmetic decoding unit BAD1 is 0 or 1, and the corresponding context model CM_1 is selected from the prediction results of CM1.
如图3所示,可以将BIN0的数值作为第一选择器的控制信号,第一选择器的两路输入分别是CM_1_if=0和CM_1_if=1,输出连接BAD2的输入端;如果BIN0的数值为0,则选择CM_1_if=0作为CM_1输出;如果BIN0的数值为1,则选择CM_1_if=1作为CM_1输出。As shown in Figure 3, the value of BIN0 can be used as the control signal of the first selector. The two inputs of the first selector are CM_1_if=0 and CM_1_if=1, respectively, and the output is connected to the input of BAD2; if the value of BIN0 is 0, select CM_1_if=0 as the CM_1 output; if the value of BIN0 is 1, select CM_1_if=1 as the CM_1 output.
步骤206、解析下一个二进制符号BIN1,启动上下文模型选择单元CM2进行分支预测。Step 206: Parse the next binary symbol BIN1, and start the context model selection unit CM2 to perform branch prediction.
启动二进制算术解码单元BAD2解析下一个二进制符号BIN1。在启动BAD2时,也启动上下文模型选择单元CM2预测BIN1分别为0和1时,下一个解码的语法元素及二进制符号对应的上下文模型,分别记为 CM_2_if=0和CM_2_if=1。经过区间划分后得到的新区间如果小于256,就需要进行重归一化过程。The binary arithmetic decoding unit BAD2 is started to parse the next binary symbol BIN1. When the BAD2 is started, the context model selection unit CM2 is also started to predict that the BIN1 is 0 and 1, respectively, and the context model corresponding to the next decoded syntax element and the binary symbol is denoted as CM_2_if=0 and CM_2_if=1, respectively. If the new interval obtained after the interval is less than 256, the renormalization process is required.
对BIN0和BIN1进行反二值化,得到对应语法元素的数值。语法元素数量很大,需要较大的存储空间。在本例子中,将语法元素通过高级可扩展接口(AXI,Advanced eXtensible Interface)总线存储到双倍速率同步动态随机存储器(DDR,Dual Data Rate)中。Reverse binarization of BIN0 and BIN1 to obtain the value of the corresponding syntax element. The number of syntax elements is large and requires a large amount of storage space. In this example, the syntax elements are stored in a double rate synchronous dynamic random access memory (DDR) through an Advanced EXtensible Interface (AXI) bus.
根据BAD2解析的BIN1的数值为0或1,从CM2的结果中选择相应的上下文模型CM_2。如图3所示,可以将BIN1的数值作为第二选择器的控制信号,第二选择器的两路输入分别是CM_2_if=0和CM_2_if=1,输出的是所选择的上下文模型;如果BIN1的数值为0,则选择CM_2_if=0作为CM_2;如果BIN1的数值为1,则选择CM_2_if=1作为CM_2。The value of BIN1 parsed according to BAD2 is 0 or 1, and the corresponding context model CM_2 is selected from the results of CM2. As shown in FIG. 3, the value of BIN1 can be used as the control signal of the second selector, and the two inputs of the second selector are CM_2_if=0 and CM_2_if=1, respectively, and the selected context model is output; if BIN1 When the value is 0, CM_2_if=0 is selected as CM_2; if the value of BIN1 is 1, CM_2_if=1 is selected as CM_2.
步骤207、下一个时钟周期,重复步骤204至206的操作,直到残差或运动矢量差值语法元素熵解码完成。Step 207: The next clock cycle, the operations of steps 204 to 206 are repeated until the residual or motion vector difference syntax element entropy decoding is completed.
H.265/HEVC语法元素很多,如果对所有语法元素均做分支预测,熵解码部分的复杂度会大大增加。针对比特流中残差和运动矢量占比较大的情况,本例子中只对残差编码语法元素和运动矢量差值语法元素进行预测,既提高了CABAC的吞吐率,又减小了硬件设计的难度。这是本申请的改进点之一。对于其它语法元素,可以按传统方案恢复。There are many H.265/HEVC syntax elements. If branch prediction is performed for all syntax elements, the complexity of the entropy decoding part will be greatly increased. For the case where the residual and motion vectors in the bit stream are relatively large, in this example, only the residual coding syntax element and the motion vector difference syntax element are predicted, which not only improves the throughput of CABAC, but also reduces the hardware design. Difficulty. This is one of the improvement points of this application. For other syntax elements, it can be restored in the traditional way.
在一个时钟周期完成两个二进制符号BIN0和BIN1的解析。通常步骤是在BAD1和BAD2解码后更新上下文模型,使用组合逻辑电路实现时,会引起严重的时序违例。本申请采用分支预测方式,在启动BAD1解析BIN0的同时,启动第一上下文模型选择单元CM1预测BIN0分别为0和1时,下一个解码的语法元素及二进制符号对应的上下文模型。对于BAD2、CM2也进行同样的操作。如图3所示,本申请中在二进制算术解码单元解析二进制符号的同时,采用进行分支预测的上下文模型选择单元预先进行上下 文模型的确定,这是本申请的改进点之一。The parsing of two binary symbols BIN0 and BIN1 is completed in one clock cycle. The usual step is to update the context model after BAD1 and BAD2 decoding, which can cause serious timing violations when implemented using combinatorial logic. In the present application, the branch prediction method is adopted, and when the BAD1 is started to parse the BIN0, the first context model selection unit CM1 is started to predict the context model corresponding to the next decoded syntax element and the binary symbol when the BIN0 is 0 and 1, respectively. The same operation is performed for BAD2 and CM2. As shown in Fig. 3, in the present application, while the binary arithmetic decoding unit parses the binary symbol, the context model selection unit that performs branch prediction performs the determination of the context model in advance, which is one of the improvement points of the present application.
在进行二进制算术解码时,本申请没有采用HEVC标准中偏移值与最大概率符号(MPS)比较的方法,而是采用偏移值与最小概率符号(LPS)的区间大小比较的方法。减小了硬件电路的时序路径,使一个时钟周期内完成两个二进制符号的解析能够实现。如图4所示。When performing binary arithmetic decoding, the present application does not adopt a method in which the offset value is compared with the maximum probability symbol (MPS) in the HEVC standard, but a method in which the offset value is compared with the interval size of the minimum probability symbol (LPS). The timing path of the hardware circuit is reduced, so that the resolution of two binary symbols can be realized in one clock cycle. As shown in Figure 4.
本发明实施例还提供了一种熵解码装置,如图5所示,包括:An embodiment of the present invention further provides an entropy decoding device, as shown in FIG. 5, including:
解析模块21,配置为对二进制符号进行二进制算术解码;对于预定的语法元素,在进行二进制算术解码的同时,预测所述二进制符号分别为0和1时,下一个解码的语法元素及二进制符号对应的上下文模型;The parsing module 21 is configured to perform binary arithmetic decoding on the binary symbols; for the predetermined syntax element, when the binary arithmetic decoding is performed, when the binary symbols are predicted to be 0 and 1, respectively, the next decoded syntax element and the binary symbol correspond to Context model
选择模块22,配置为根据二进制算术解码得到的所述二进制符号的数值,从所预测的结果中选择相应的上下文模型。The selecting module 22 is configured to select a corresponding context model from the predicted results according to the value of the binary symbol obtained by binary arithmetic decoding.
在一实施例中,所述预定的语法元素可以包括以下一项或多项:In an embodiment, the predetermined syntax element may include one or more of the following:
残差编码语法元素、运动矢量差值语法元素。Residual coding syntax elements, motion vector difference syntax elements.
在一实施例中,所述对二进制符号进行二进制算术解码可以包括:In an embodiment, the binary arithmetic decoding of the binary symbols may include:
如果当前区间与偏移值的差小于或等于最小概率符号LPS的区间大小,则当前二进制符号等于LPS;如果当前区间R与偏移值Offset的差大于LPS的区间大小,则当前二进制符号等于最大概率符号MPS。If the difference between the current interval and the offset value is less than or equal to the interval size of the minimum probability symbol LPS, the current binary symbol is equal to the LPS; if the difference between the current interval R and the offset value Offset is greater than the interval size of the LPS, the current binary symbol is equal to the maximum Probability symbol MPS.
在一实施例中,所述解析模块可以包括:In an embodiment, the parsing module may include:
第一二进制算术解码单元、第一上下文模型选择单元、第二二进制算术解码单元、第二上下文模型选择单元;a first binary arithmetic decoding unit, a first context model selecting unit, a second binary arithmetic decoding unit, and a second context model selecting unit;
所述第一二进制算术解码单元和第二二进制算术解码单元,分别用于对一个时钟周期内解析的两个二进制符号进行二进制算术解码;The first binary arithmetic decoding unit and the second binary arithmetic decoding unit are respectively configured to perform binary arithmetic decoding on two binary symbols parsed in one clock cycle;
所述第一上下文模型选择单元和第二上下文模型选择单元,分别用于对一个时钟周期内解析的两个二进制符号,预测分别为0和1时,下一个解码的语法元素及二进制符号对应的上下文模型。The first context model selection unit and the second context model selection unit are respectively configured to use two binary symbols parsed in one clock cycle, and when the prediction is 0 and 1, respectively, the next decoded syntax element and the binary symbol correspond to Context model.
在一实施例中,所述选择模块可以包括:In an embodiment, the selecting module may include:
第一选择器、第二选择器;a first selector, a second selector;
所述第一选择器的输入信号为所述第一上下文模型选择单元所预测的二进制符号分别为0和1时,下一个解码的语法元素及二进制符号对应的上下文模型;控制信号为所述第一二进制算术解码单元得到的二进制符号的数值;输出信号为所选择的第一上下文模型,输入给所述第二二进制算术解码单元;The input signal of the first selector is a context model corresponding to a next decoded syntax element and a binary symbol when the binary symbols predicted by the first context model selection unit are 0 and 1, respectively; the control signal is the a binary arithmetic decoding unit obtains a value of a binary symbol; the output signal is a selected first context model, and is input to the second binary arithmetic decoding unit;
所述第二选择器的输入信号为所述第二上下文模型选择单元所预测的二进制符号分别为0和1时,下一个解码的语法元素及二进制符号对应的上下文模型;控制信号为所述第二二进制算术解码单元得到的二进制符号的数值;输出信号为所选择的第二上下文模型。The input signal of the second selector is a context model corresponding to the next decoded syntax element and the binary symbol when the binary symbols predicted by the second context model selection unit are 0 and 1, respectively; the control signal is the The value of the binary symbol obtained by the binary arithmetic decoding unit; the output signal is the selected second context model.
本发明实施例还提供了一种熵解码装置,包括:处理器和存储器;An embodiment of the present invention further provides an entropy decoding apparatus, including: a processor and a memory;
所述存储器,配置为保存进行熵解码的程序;The memory is configured to save a program for performing entropy decoding;
所述处理器,配置为执行所述进行熵解码的程序,实现以下操作:The processor is configured to execute the program for performing entropy decoding, and implement the following operations:
对二进制符号进行二进制算术解码;对于预定的语法元素,在进行二进制算术解码的同时,预测所述二进制符号分别为0和1时,下一个解码的语法元素及二进制符号对应的上下文模型;Binary arithmetic decoding of binary symbols; for predetermined syntax elements, while performing binary arithmetic decoding, predicting a context model corresponding to the next decoded syntax element and binary symbol when the binary symbols are 0 and 1, respectively;
根据二进制算术解码得到的所述二进制符号的数值,从所预测的结果中选择相应的上下文模型。The corresponding context model is selected from the predicted results based on the values of the binary symbols obtained by binary arithmetic decoding.
在一实施例中,所述预定的语法元素可以包括以下一项或多项:In an embodiment, the predetermined syntax element may include one or more of the following:
残差编码语法元素、运动矢量差值语法元素。Residual coding syntax elements, motion vector difference syntax elements.
在一实施例中,所述对二进制符号进行二进制算术解码可以包括:In an embodiment, the binary arithmetic decoding of the binary symbols may include:
如果当前区间与偏移值的差小于或等于最小概率符号LPS的区间大小,则当前二进制符号等于LPS;如果当前区间R与偏移值Offset的差大于LPS的区间大小,则当前二进制符号等于最大概率符号MPS。If the difference between the current interval and the offset value is less than or equal to the interval size of the minimum probability symbol LPS, the current binary symbol is equal to the LPS; if the difference between the current interval R and the offset value Offset is greater than the interval size of the LPS, the current binary symbol is equal to the maximum Probability symbol MPS.
需要说明的是,以上涉及熵解码装置的描述,与上述方法描述是类似的,同方法的有益效果描述,不做赘述。对于本发明所述熵解码装置实施例中未披露的技术细节,请参照本发明方法实施例的描述。It should be noted that the above description of the entropy decoding device is similar to the above description of the method, and the beneficial effects of the same method are described without further description. For technical details not disclosed in the embodiment of the entropy decoding device of the present invention, please refer to the description of the method embodiment of the present invention.
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用硬件实施例、软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器和光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will appreciate that embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention can take the form of a hardware embodiment, a software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) including computer usable program code.
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (system), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or FIG. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to produce a machine for the execution of instructions for execution by a processor of a computer or other programmable data processing device. Means for implementing the functions specified in one or more of the flow or in a block or blocks of the flow chart.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。The computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device. The apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device. The instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
以上所述,仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围。The above is only the preferred embodiment of the present invention and is not intended to limit the scope of the present invention.
工业实用性Industrial applicability
本发明实施例中对二进制符号进行二进制算术解码;对于预定的语法元素,在进行二进制算术解码的同时,预测所述二进制符号分别为0和1时,下一个解码的语法元素及二进制符号对应的上下文模型;根据二进制算术解码得到的所述二进制符号的数值,从所预测的结果中选择相应的上下文模型。如此,可以减小电路的时序路径,能够大幅提升HEVC标准熵解码电路的吞吐率。In the embodiment of the present invention, binary arithmetic decoding is performed on binary symbols; for predetermined syntax elements, when binary arithmetic decoding is performed, when the binary symbols are predicted to be 0 and 1, respectively, the next decoded syntax element and the binary symbol correspond to a context model; selecting a corresponding context model from the predicted results based on the values of the binary symbols obtained by binary arithmetic decoding. In this way, the timing path of the circuit can be reduced, and the throughput of the HEVC standard entropy decoding circuit can be greatly improved.

Claims (14)

  1. 一种熵解码方法,包括:An entropy decoding method, comprising:
    对二进制符号进行二进制算术解码;对于预定的语法元素,在进行二进制算术解码的同时,预测所述二进制符号分别为0和1时,下一个解码的语法元素及二进制符号对应的上下文模型;Binary arithmetic decoding of binary symbols; for predetermined syntax elements, while performing binary arithmetic decoding, predicting a context model corresponding to the next decoded syntax element and binary symbol when the binary symbols are 0 and 1, respectively;
    根据二进制算术解码得到的所述二进制符号的数值,从所预测的结果中选择相应的上下文模型。The corresponding context model is selected from the predicted results based on the values of the binary symbols obtained by binary arithmetic decoding.
  2. 如权利要求1所述的熵解码方法,其中,所述预定的语法元素包括以下一项或多项:The entropy decoding method of claim 1, wherein the predetermined syntax element comprises one or more of the following:
    残差编码语法元素、运动矢量差值语法元素。Residual coding syntax elements, motion vector difference syntax elements.
  3. 如权利要求1所述的熵解码方法,其中,所述对二进制符号进行二进制算术解码包括:The entropy decoding method according to claim 1, wherein said binary arithmetic decoding of the binary symbols comprises:
    如果当前区间与偏移值的差小于或等于最小概率符号LPS的区间大小,则当前二进制符号等于LPS;如果当前区间R与偏移值Offset的差大于LPS的区间大小,则当前二进制符号等于最大概率符号MPS。If the difference between the current interval and the offset value is less than or equal to the interval size of the minimum probability symbol LPS, the current binary symbol is equal to the LPS; if the difference between the current interval R and the offset value Offset is greater than the interval size of the LPS, the current binary symbol is equal to the maximum Probability symbol MPS.
  4. 如权利要求1所述的熵解码方法,其中:The entropy decoding method of claim 1 wherein:
    对一个时钟周期内解析的两个二进制符号,分别采用第一二进制算术解码单元和第二二进制算术解码单元进行二进制算术解码,分别采用第一上下文模型选择单元和第二上下文模型选择单元,预测二进制符号分别为0和1时,下一个解码的语法元素及二进制符号对应的上下文模型。For the two binary symbols parsed in one clock cycle, the first binary arithmetic decoding unit and the second binary arithmetic decoding unit are respectively used for binary arithmetic decoding, and the first context model selection unit and the second context model are respectively selected. The unit, when the predicted binary symbols are 0 and 1, respectively, the next decoded syntax element and the context model corresponding to the binary symbol.
  5. 如权利要求1所述的熵解码方法,其中,所述根据二进制算术解码得到的所述二进制符号的数值,从预测得到的结果中选择相应的上下文模型包括:The entropy decoding method according to claim 1, wherein the selecting the corresponding context model from the predicted results according to the value of the binary symbol obtained by the binary arithmetic decoding comprises:
    将预测所述二进制符号分别为0和1时,下一个解码的语法元素及二进制符号对应的上下文模型分别作为选择器的输入信号;将根据二进制算 术解码得到的所述二进制符号的数值作为所述选择器的控制信号;所述选择器的输出信号为所选择的上下文模型。When the binary symbols are predicted to be 0 and 1, respectively, the next decoded syntax element and the context model corresponding to the binary symbol are respectively used as input signals of the selector; the numerical value of the binary symbol obtained according to binary arithmetic decoding is used as the The control signal of the selector; the output signal of the selector is the selected context model.
  6. 一种熵解码装置,包括:An entropy decoding device includes:
    解析模块,配置为对二进制符号进行二进制算术解码;对于预定的语法元素,在进行二进制算术解码的同时,预测所述二进制符号分别为0和1时,下一个解码的语法元素及二进制符号对应的上下文模型;a parsing module configured to perform binary arithmetic decoding on the binary symbol; for a predetermined syntax element, while performing binary arithmetic decoding, predicting that the binary symbol is 0 and 1, respectively, the next decoded syntax element and the binary symbol corresponding to Context model
    选择模块,配置为根据二进制算术解码得到的所述二进制符号的数值,从所预测的结果中选择相应的上下文模型。And a selection module configured to select a corresponding context model from the predicted results according to the value of the binary symbol obtained by binary arithmetic decoding.
  7. 如权利要求6所述的熵解码装置,其中,所述预定的语法元素包括以下一项或多项:The entropy decoding apparatus according to claim 6, wherein said predetermined syntax element comprises one or more of the following:
    残差编码语法元素、运动矢量差值语法元素。Residual coding syntax elements, motion vector difference syntax elements.
  8. 如权利要求6所述的熵解码装置,其中,所述对二进制符号进行二进制算术解码包括:The entropy decoding apparatus according to claim 6, wherein said binary arithmetic decoding of the binary symbols comprises:
    如果当前区间与偏移值的差小于或等于最小概率符号LPS的区间大小,则当前二进制符号等于LPS;如果当前区间R与偏移值Offset的差大于LPS的区间大小,则当前二进制符号等于最大概率符号MPS。If the difference between the current interval and the offset value is less than or equal to the interval size of the minimum probability symbol LPS, the current binary symbol is equal to the LPS; if the difference between the current interval R and the offset value Offset is greater than the interval size of the LPS, the current binary symbol is equal to the maximum Probability symbol MPS.
  9. 如权利要求6所述的熵解码装置,其中,所述解析模块包括:The entropy decoding apparatus of claim 6, wherein the parsing module comprises:
    第一二进制算术解码单元、第一上下文模型选择单元、第二二进制算术解码单元、第二上下文模型选择单元;a first binary arithmetic decoding unit, a first context model selecting unit, a second binary arithmetic decoding unit, and a second context model selecting unit;
    所述第一二进制算术解码单元和第二二进制算术解码单元,分别配置为对一个时钟周期内解析的两个二进制符号进行二进制算术解码;The first binary arithmetic decoding unit and the second binary arithmetic decoding unit are respectively configured to perform binary arithmetic decoding on two binary symbols parsed in one clock cycle;
    所述第一上下文模型选择单元和第二上下文模型选择单元,分别配置为对一个时钟周期内解析的两个二进制符号,预测分别为0和1时,下一个解码的语法元素及二进制符号对应的上下文模型。The first context model selection unit and the second context model selection unit are respectively configured to respectively perform two binary symbols parsed in one clock cycle, and when the predictions are 0 and 1, respectively, the next decoded syntax element and the binary symbol correspond to Context model.
  10. 如权利要求9所述的熵解码装置,其中,所述选择模块包括:The entropy decoding apparatus according to claim 9, wherein said selection module comprises:
    第一选择器、第二选择器;a first selector, a second selector;
    所述第一选择器的输入信号为所述第一上下文模型选择单元所预测的二进制符号分别为0和1时,下一个解码的语法元素及二进制符号对应的上下文模型;控制信号为所述第一二进制算术解码单元得到的二进制符号的数值;输出信号为所选择的第一上下文模型,输入给所述第二二进制算术解码单元;The input signal of the first selector is a context model corresponding to a next decoded syntax element and a binary symbol when the binary symbols predicted by the first context model selection unit are 0 and 1, respectively; the control signal is the a binary arithmetic decoding unit obtains a value of a binary symbol; the output signal is a selected first context model, and is input to the second binary arithmetic decoding unit;
    所述第二选择器的输入信号为所述第二上下文模型选择单元所预测的二进制符号分别为0和1时,下一个解码的语法元素及二进制符号对应的上下文模型;控制信号为所述第二二进制算术解码单元得到的二进制符号的数值;输出信号为所选择的第二上下文模型。The input signal of the second selector is a context model corresponding to the next decoded syntax element and the binary symbol when the binary symbols predicted by the second context model selection unit are 0 and 1, respectively; the control signal is the The value of the binary symbol obtained by the binary arithmetic decoding unit; the output signal is the selected second context model.
  11. 一种熵解码装置,包括:处理器和存储器;其中:An entropy decoding apparatus includes: a processor and a memory; wherein:
    所述存储器,配置为保存进行熵解码的程序;The memory is configured to save a program for performing entropy decoding;
    所述处理器,配置为执行所述进行熵解码的程序,实现以下操作:The processor is configured to execute the program for performing entropy decoding, and implement the following operations:
    对二进制符号进行二进制算术解码;对于预定的语法元素,在进行二进制算术解码的同时,预测所述二进制符号分别为0和1时,下一个解码的语法元素及二进制符号对应的上下文模型;Binary arithmetic decoding of binary symbols; for predetermined syntax elements, while performing binary arithmetic decoding, predicting a context model corresponding to the next decoded syntax element and binary symbol when the binary symbols are 0 and 1, respectively;
    根据二进制算术解码得到的所述二进制符号的数值,从所预测的结果中选择相应的上下文模型。The corresponding context model is selected from the predicted results based on the values of the binary symbols obtained by binary arithmetic decoding.
  12. 如权利要求11所述的熵解码装置,其中,所述预定的语法元素包括以下一项或多项:The entropy decoding apparatus according to claim 11, wherein said predetermined syntax element comprises one or more of the following:
    残差编码语法元素、运动矢量差值语法元素。Residual coding syntax elements, motion vector difference syntax elements.
  13. 如权利要求11所述的熵解码装置,其中,所述对二进制符号进行二进制算术解码包括:The entropy decoding apparatus according to claim 11, wherein said binary arithmetic decoding of the binary symbols comprises:
    如果当前区间与偏移值的差小于或等于最小概率符号LPS的区间大小,则当前二进制符号等于LPS;如果当前区间R与偏移值Offset的差大 于LPS的区间大小,则当前二进制符号等于最大概率符号MPS。If the difference between the current interval and the offset value is less than or equal to the interval size of the minimum probability symbol LPS, the current binary symbol is equal to the LPS; if the difference between the current interval R and the offset value Offset is greater than the interval size of the LPS, the current binary symbol is equal to the maximum Probability symbol MPS.
  14. 一种计算机存储介质,所述计算机存储介质中存储有计算机可执行指令,该计算机可执行指令用于执行权利要求1至5任一项所述的熵解码方法。A computer storage medium having stored therein computer executable instructions for performing the entropy decoding method of any one of claims 1 to 5.
PCT/CN2017/119256 2017-05-27 2017-12-28 Entropy decoding method, device and storage medium WO2018218950A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710390040.5 2017-05-27
CN201710390040.5A CN108965878B (en) 2017-05-27 2017-05-27 A kind of entropy decoding method and device

Publications (1)

Publication Number Publication Date
WO2018218950A1 true WO2018218950A1 (en) 2018-12-06

Family

ID=64455171

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/119256 WO2018218950A1 (en) 2017-05-27 2017-12-28 Entropy decoding method, device and storage medium

Country Status (2)

Country Link
CN (1) CN108965878B (en)
WO (1) WO2018218950A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112449189B (en) * 2019-08-27 2022-02-11 腾讯科技(深圳)有限公司 Video data processing method and device, video encoder and storage medium
CN113038140A (en) * 2019-12-24 2021-06-25 扬智电子科技(中国)有限公司 Video decoding method and video decoding device
CN111818335B (en) * 2020-07-03 2022-04-26 Tcl华星光电技术有限公司 Entropy coding method and device and electronic equipment
CN114531595B (en) * 2022-04-24 2022-08-09 浙江芯昇电子技术有限公司 coding method and device for campa binarization and context model generation

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1610265A (en) * 2003-10-22 2005-04-27 松下电器产业株式会社 Arithmetic decoding/encoding device, portable terminal, moving image photographic and recording / reproducing apparatus
US20070103347A1 (en) * 2005-11-08 2007-05-10 Samsung Electronics Co., Ltd. Method and device for decoding syntax element in CABAC decoder
CN101001373A (en) * 2006-01-12 2007-07-18 Lsi罗吉克公司 Context adaptive binary arithmetic decoding for high definition video

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100466739C (en) * 2005-10-12 2009-03-04 华为技术有限公司 CABAC decoding system and method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1610265A (en) * 2003-10-22 2005-04-27 松下电器产业株式会社 Arithmetic decoding/encoding device, portable terminal, moving image photographic and recording / reproducing apparatus
US20070103347A1 (en) * 2005-11-08 2007-05-10 Samsung Electronics Co., Ltd. Method and device for decoding syntax element in CABAC decoder
CN101001373A (en) * 2006-01-12 2007-07-18 Lsi罗吉克公司 Context adaptive binary arithmetic decoding for high definition video

Also Published As

Publication number Publication date
CN108965878B (en) 2019-11-15
CN108965878A (en) 2018-12-07

Similar Documents

Publication Publication Date Title
WO2018218950A1 (en) Entropy decoding method, device and storage medium
US7710296B2 (en) N-bin arithmetic coding for context adaptive binary arithmetic coding
US8604951B2 (en) System and method for optimizing context-adaptive binary arithmetic coding
US10499086B2 (en) Video data encoding and decoding methods and apparatuses
US8018996B2 (en) Arithmetic decoding apparatus and method
US7245242B2 (en) Decoding systems and methods
US7443318B2 (en) High speed context memory implementation for H.264
US7365660B2 (en) Method and device for decoding syntax element in CABAC decoder
US7982641B1 (en) Context-based adaptive binary arithmetic coding engine
US8761240B2 (en) Methods and devices for data compression using context-based coding order
TWI487295B (en) Method for high throughput parallel avc/h.264 context-based adaptive binary arithmetic decoder
JP2006054865A (en) Binary arithmetic decoding apparatus and methods using pipelined structure
EP2754293A1 (en) Context-adaptive coding video data
EP1958450A2 (en) Decoding data
KR102123620B1 (en) Method and apparatus for entropy encoding or entropy decoding of video signals for large-scale parallel processing
JP7162532B2 (en) Method and Apparatus for Context-Adaptive Binary Arithmetic Encoding of a Sequence of Binary Symbols Representing Syntax Elements Related to Video Data
JP4865662B2 (en) Entropy encoding apparatus, entropy encoding method, and computer program
US11431978B2 (en) Video decoding method and video decoding device for improving decoding efficiency
CN111818335B (en) Entropy coding method and device and electronic equipment
Ramesh Kumar et al. Two-symbol FPGA architecture for fast arithmetic encoding in JPEG 2000
JP2013009167A (en) Entropy encoding apparatus, entropy decoding apparatus, entropy encoding method and entropy decoding method
Wahl et al. Memory-efficient parallelization of JPEG-LS with relaxed context update
Liang et al. A high throughput parallel AVC/H. 264 context-based adaptive binary arithmetic decoder
CN117939148A (en) Dynamic queuing of entropy encoded data for transmission in a bitstream
Damak et al. HLS based design of a mixed architecture for H. 264/AVC CAVLD

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: 17911985

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: 17911985

Country of ref document: EP

Kind code of ref document: A1