Transform coefficient entropy coding in video coding systems
Patent Information
- Application Number
- CN202580022743.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-01-26
- Filing Date
- 2025-01-24
- Publication Date
- 2026-10-27
Smart Images

Figure CN122996655A_ABST
Abstract
Description
[0001] Cross-references
[0002] This disclosure is part of a non-provisional application that claims priority to U.S. Provisional Patent Application No. 63 / 625,320, filed January 26, 2024, the entire contents of which are incorporated herein by reference. Technical Field
[0003] This disclosure generally relates to video encoding and decoding. Specifically, this disclosure relates to methods for entropy encoding and decoding of transform coefficients. Background Technology
[0004] Unless otherwise stated herein, the methods described in this section are not prior art to the following claims, and are not acknowledged as prior art by virtue of their inclusion in this section.
[0005] High-Efficiency Video Coding (HEVC) is an international video coding standard developed by the Joint Collaborative Team on Video Coding (JCT-VC). HEVC is based on a hybrid block-based motion-compensated discrete cosine transform (DCT) coding architecture. The basic unit used for compression is called a coding unit (CU), which is a 2N×2N pixel block. Each CU can be recursively divided into four smaller CUs until a predefined minimum size is reached. Each CU contains one or more prediction units (PUs).
[0006] Versatile Video Coding (VVC) is the latest international video coding standard developed by the Joint Video Experts Team (JVET) of ITU-T SG16 WP3 and ISO / IEC JTC1 / SC29 / WG11. The input video signal is predicted from a reconstructed signal, which originates from the encoded / decoded image region. The prediction residual signal is processed through block transform. The transform coefficients, along with other auxiliary information, are quantized and entropy-encoded in the bitstream. The reconstructed signal consists of the predicted signal and the reconstructed residual signal generated from the dequantized transform coefficients after inverse transform. The reconstructed signal is further processed by loop filtering to remove coding / decoding artifacts. The decoded image is stored in a frame buffer and used to predict subsequent images in the input video signal.
[0007] In VVC, the sequence parameter set (SPS) and picture parameter set (PPS) contain high-level syntax elements applicable to the entire encoded video sequence and picture, respectively. The picture header (PH) and slice header (SH) contain high-level syntax elements applicable to the current encoded picture and the current encoded slice, respectively.
[0008] In VVC, the encoded image is divided into non-overlapping block regions represented by relevant coding tree units (CTUs). Leaf nodes of the coding tree correspond to coding units (CUs). The encoded image can be represented by multiple slices, each containing an integer number of CTUs. The CTUs within a slice are processed in raster scan order. Double-prediction (B) slices can be decoded using either intra-frame prediction or inter-frame prediction; inter-frame prediction uses at most two motion vectors (MVs) and a reference index to predict the sample value for each block. Predictive (P) slices are decoded using either intra-frame prediction or inter-frame prediction; inter-frame prediction uses at most one motion vector and a reference index to predict the sample value for each block. Intra-frame (I) slices are decoded only using intra-frame prediction.
[0009] The Code Unit (CTU) can be divided into one or more non-overlapping Codec Units (CUs) using a quadtree (QT) or nested multi-type-tree (MTT) structure to accommodate different local motion and texture characteristics. CUs can be further subdivided into smaller CUs using one of five segmentation types: quadtree segmentation, vertical binary tree segmentation, horizontal binary tree segmentation, vertical center-side ternary tree segmentation, and horizontal center-side ternary tree segmentation.
[0010] Each CU contains one or more prediction units (PUs). The prediction unit, along with the associated CU syntax, serves as the basic unit of signaling predictor information. The specified prediction process is used to predict the values of associated pixel samples within the PU. Each CU may contain one or more transform units (TUs) to represent prediction residual blocks. A transform unit (TU) consists of a transform block (TB) for one luma sample and two corresponding chroma sample transform blocks, each TB corresponding to a residual sample block from one color component. Integer transforms are applied to the transform blocks. The level values of the quantization coefficients, along with other auxiliary information, are entropy-encoded in the bitstream. Coding tree blocks (CTBs), coding blocks (CBs), prediction blocks (PBs), and transform blocks (TBs) are used to specify two-dimensional sample arrays of a single color component associated with the CTU, CU, PU, and TU, respectively. Therefore, a CTU contains one luma CTB, two chroma CTBs, and associated syntax elements. CUs, PUs, and TUs have similar relationships.
[0011] For each inter-frame predicted CU, motion parameters, consisting of motion vectors, reference image indices, reference image list usage indices, and other additional information, are used to generate inter-frame predicted samples. Motion parameters can be signaled explicitly or implicitly. When a CU is encoded in skip mode, the CU is associated with a PU and has no significant residual coefficients, no encoded motion vector increments, or reference image indices. Merging mode specifies that the motion parameters of the current CU are obtained from neighboring CUs, including spatial and temporal candidates, as well as additional scheduling introduced in VVC. Merging mode can be applied to any inter-frame predicted CU. An alternative to merging mode is explicit transmission of motion parameters, where the motion vectors for each CU, the corresponding reference image indices for each reference image list, the reference image list usage flags, and other necessary information are explicitly signaled. Summary of the Invention
[0012] The following abstract is for illustrative purposes only and is not intended to be limiting in any way. That is, the abstract aims to introduce the concepts, key points, benefits, and advantages of the novel and non-obvious techniques described herein. Some implementations will be further elaborated in the detailed description below, but not all implementations. Therefore, the following abstract is not intended to identify the essential features of the claimed subject matter, nor is it intended to determine the scope of the claimed subject matter.
[0013] Certain embodiments of this disclosure provide a transform coefficient entropy encoding / decoding method based on transform coefficient position selection of a subset of context variables. A video codec receives data for encoding or decoding pixel blocks, which are used as the current block to be encoded or decoded into the current image. The video codec can encode the received data of the transform block of the current block into transform coefficients generated by the transform operation. The video codec performs entropy encoding or entropy decoding on the transform coefficients of the transform block according to a diagonal scan order with context modeling. The video codec selects context variables for this context modeling such that for each currently encoded transform coefficient, a set of context variables is selected based on the position of the transform coefficient in the diagonal scan order. The video codec can reconstruct the current block based on the entropy-decoded transform coefficients generated by the inverse transform operation, or transmit the entropy-encoded transform coefficients as a bitstream.
[0014] This context modeling can be used to specify the syntax element for the absolute value of the transform coefficient, or to specify the syntax element for the sign of the transform coefficient.
[0015] In some embodiments, the set of context variables is selected based on comparing the position of the transform coefficient in the diagonal scan order with one or more thresholds. In some embodiments, the selection of the set of context variables is dynamically determined based on the transform type of the current block. For example, when the transform coefficients of the transform block are generated by an inseparable transform operation, the set of context variables is selected based on the position of the transform coefficient in the (one-dimensional) diagonal scan order; when the transform coefficients of the transform block are generated by a separable transform operation, the set of context variables is selected based on the (two-dimensional) Cartesian coordinates of the transform coefficient in the transform block.
[0016] In some embodiments, one or more syntax elements are signaled in one or more high-level syntax sets (e.g., sequence parameter set, image parameter set, image header, title sequence, etc.) to specify a selection method for the set of context variables for a particular syntax element of the transform coefficient. Attached Figure Description
[0017] The accompanying drawings are included in this disclosure to provide a further understanding of the disclosure and are incorporated into and constitute a part of this disclosure. The drawings illustrate embodiments of the disclosure and, together with the description, serve to explain the principles of the disclosure. It will be understood that the drawings are not necessarily drawn to scale, as some components may be shown out of proportion to actual dimensions in order to clearly illustrate the concepts of the disclosure.
[0018] Figure 1 This demonstrates the diagonal scanning sequence of a 4x4 block in the forward scanning direction.
[0019] Figure 2 This shows the positions of the neighboring coefficients used for entropy encoding and decoding of the current transform coefficient level.
[0020] Figure 3 This shows the positions of the previous codec coefficients used for entropy encoding and decoding of the current transform coefficient level of the inseparable transform block.
[0021] Figure 4 The indexes of the transform coefficients used for entropy encoding and decoding of 8x8 blocks under diagonal scan order are shown.
[0022] Figure 5 An example video encoder implementing entropy coding with context modeling is shown.
[0023] Figure 6 This demonstrates the part of the video encoder that selects a subset of context variables based on the position of transform coefficients.
[0024] Figure 7 This concept demonstrates the process of selecting a subset of context variables based on the position of transform coefficients and encoding pixel blocks using entropy coding.
[0025] Figure 8 An example video decoder is shown that implements entropy decoding with context modeling.
[0026] Figure 9 This demonstrates the part of the video decoder that selects a subset of context variables based on the position of the transform coefficients.
[0027] Figure 10 This concept demonstrates the process of selecting a subset of context variables based on the position of the transform coefficients and decoding pixel blocks using entropy coding.
[0028] Figure 11 This invention provides a conceptual illustration of an electronic system that implements certain embodiments of the present disclosure. Detailed Implementation
[0029] In the following detailed description, numerous specific details are illustrated by way of example to provide a comprehensive understanding of the related techniques. Any variations, derivatives, and / or extensions based on the techniques described herein are within the scope of this disclosure. In some cases, to avoid unnecessarily obscuring certain aspects of the techniques disclosed, well-known methods, processes, components, and / or circuits involved in one or more example embodiments may be described at a relatively high level without going into detail.
[0030] I. Contextual Modeling of Transform Coefficients
[0031] In VVC, in addition to the Discrete Cosine Transform (DCT-II), the Multiple Transform Selection (MTS) scheme derives four two-dimensional separable transforms from DCT8 and DST7 for the primary transform of the residual block. The primary transform type selected by the current codec unit (CU) is indicated by the syntax element `mts_idx`. After the residual block is transformed by DCT2 in the intra-CU, it can be further transformed by the low-frequency non-separable transform (LFNST), and the selected LFNST type is indicated by the syntax element `lfnst_idx`. The residual block can be quantized and encoded / decoded without a transform process, indicated by the syntax flag `transform_skip_flag` being set to 1.
[0032] In VVC, the coded block flag (CBF) indicates whether a transform block contains non-zero transform coefficients. When the CBF equals 0, the relevant transform block is not further encoded or decoded, and all coefficients in the current transform block are inferred as 0. Otherwise, the relevant transform block contains at least one non-zero transform coefficient. Non-zero transform blocks are further divided into non-overlapping sub-blocks. The syntax element `sb_coded_flag` can be used to indicate whether the current sub-block contains any non-zero coefficients. When `sb_coded_flag` equals 0, the relevant transform sub-block is not further encoded or decoded, and all coefficients in the current transform sub-block are inferred as 0. Otherwise, the relevant transform block contains at least one non-zero transform coefficient.
[0033] The sub-blocks within the transform block are encoded and decoded in a diagonal scan order with a reverse scan direction. The transform coefficients within each sub-block are encoded and decoded in a diagonal scan order with a reverse scan direction. Figure 1 This demonstrates the diagonal scan order of a 4x4 block in the forward scan direction. The position of the last significant coefficient within the transform block in the scan order is signaled by entropy encoding and decoding the Cartesian coordinates (LastSignificantCoeffX, LastSignificantCoeffY) of the last significant coefficient, where LastSignificantCoeffX and LastSignificantCoeffY indicate the column and row positions of the last significant coefficient within the transform block, respectively. The values of LastSignificantCoeffX and LastSignificantCoeffY are entropy encoded and decoded using separate sets of syntax elements.
[0034] Transform coefficients in a transform block can be dependently scalar quantized using two quantization modules with different dead-time sizes. The choice between the two quantization modules is determined by a state machine with four states. The state of the current transform coefficient is determined by the state of the previous transform coefficient in the scan order and the parity of its absolute level value. The values of the transform coefficient levels in the relevant sub-blocks are entropy-encoded through multiple sub-block encoding / decoding passes. In each encoding / decoding pass, a single transform coefficient is accessed once in the reverse scan direction, following a diagonal scan order. In 1 st The sub-block encoding / decoding process uses the signaling syntax elements `sig_coeff_flag`, `abs_level_gt1_flag`, `par_level_flag`, and `abs_level_gt3_flag`. The elements `abs_level_gt1_flag` and `abs_level_gt3_flag` indicate whether the absolute value of the current coefficient level is greater than 1 and greater than 3, respectively. The syntax element `par_level_flag` indicates the parity bit of the absolute value of the current level. (The last sentence appears to be incomplete and possibly refers to a different function or process.) st The absolute values of the transform coefficient levels in the partial reconstruction after encoding and decoding are given by the following formula: AbsLevelPass1 = sig_coeff_flag + par_level_flag + abs_level_gt1_flag + 2 abs_level_gt3_flag In subsequent sub-block encoding / decoding passes, the signaling syntax elements `abs_remainder` and `coeff_sign_flag` are used to indicate the remaining coefficient level values and signs, respectively. The absolute value of the complete reconstruction of the transform coefficient level is given by the following formula: AbsLevel = AbsLevelPass1 + 2 abs_remainder The transformation coefficient level is given by the following formula: TransCoeffLevel = (2) AbsLevel - ( QState > 1 ? 1 : 0 ) ) (1 - 2) coeff_sign_flag), QState indicates the transformation state of the current transform coefficients in relation to quantization.
[0035] To achieve high compression efficiency, a context-based adaptive binary arithmetic coding (CABAC) mode, also known as the regular mode, is employed to entropy encode and decode the values of syntax elements. Since the arithmetic codec in the CABAC engine can only encode and decode binary symbol values, CABAC operations first need to convert the values of syntax elements into binary strings; this process is commonly referred to as binarization. Each bit position (called a bin) is categorized under a specific probability model for encoding and decoding. The state of each probability model is represented by a context variable. During encoding and decoding, the probability model is progressively built based on the already encoded and decoded symbols in different contexts. The selection of the modeling context used to encode and decode the next binary symbol can be determined by the already encoded and decoded information. Symbols can also be encoded and decoded without a context modeling phase, assuming a predetermined probability distribution; this is commonly referred to as a bypass mode, to improve bitstream parsing throughput.
[0036] A. Context modeling based on diagonal distance
[0037] In some implementations, context modeling for entropy encoding and decoding of the absolute value of the current transform coefficient level relies on the sum of the partial reconstructed absolute values of the five encoded spatial neighborhood transform coefficient levels after the first sub-block encoding and decoding pass, indicated by the variable locSumAbsPass1. Figure 2 This demonstrates the neighboring coefficient positions used for entropy encoding and decoding of the current transform coefficient level. Five neighboring coefficients are used to determine the context modeling for entropy encoding and decoding of the current transform coefficient 210 of the current block 200.
[0038] Context modeling also relies on the Cartesian coordinates of the current transform coefficient level within the current transform block, indicated by (xC, yC). The selection of context variables for the current coefficient level used in entropy encoding and decoding is determined by the diagonal distance 'd' between the current transform coefficient position and the origin of the current block, indicated by the variable d = xC + yC. The diagonal distance 'd' is used to select a subset of context variables in the context model.
[0039] When using the syntax element sig_coeff_flag for entropy encoding and decoding the current transform coefficient level, the indices for selecting the subset of context variables are as follows: For the luminance component ctxInc = 12 Max( 0, QState - 1 ) + Min( ( locSumAbsPass1 + 1 ) >>1, 3 ) + ( d < 2 ? 8 : ( d < 5 ? 4 : 0 ) ) For chromaticity components ctxInc = 8 Max( 0, QState - 1 ) + Min( ( locSumAbsPass1 + 1 ) >>1, 3 ) + ( d < 2 ? 4 : 0 ) The index ctxInc selects a subset of context variables with four context variables, and the subset selected for the current transformation level is determined by d.
[0040] For entropy encoding and decoding of the syntax element abs_level_gtx at the current transform coefficient level, the indices of the selected subset of context variables are as follows: For the luminance component ctxIdxSig = 1 + Min( locSumAbsPass1 – locNumSig, 4 ) + ( d == 0 ? 15: ( d < 3 ? 10 : ( d < 10 ? 5 : 0 ) ) ) (The variable locNumSig represents the total number of significant coefficients among the five spatial proximity transform coefficients.) For the chromaticity component, ctxIdxSig = 1 + Min( locSumAbsPass1 – locNumSig, 4 ) + ( d == 0 ? 5 :0) ctxIdxGtx = 0 is reserved for the last significance coefficient. The diagonal distance “d” is used to determine the index ctxIdxSig, which selects a subset of context variables with 5 context variables.
[0041] In some embodiments, a separate subset or set of context variables is assigned to the entropy encoding / decoding syntax information of an LFNST or NSPT transform block. When the current block undergoes an LFNST or NSPT type transform, the variable locSumAbsPass1 is obtained by reconstructing the sum of the absolute values of the first pass (Pass1) portions of the five encoded / decoded previous transform coefficient levels, rather than... Figure 2 The sum of the five encoded / decoded spatial proximity transform coefficient levels shown.
[0042] Figure 3This diagram shows the position of the previous encoded coefficient used for entropy encoding / decoding of the current transform coefficient level in an LFNST or NSPT block. The diagram shows the current transform coefficient 310 in the current block 300. The shaded blocks represent the five previous encoded / decoded transform coefficient levels used for entropy encoding / decoding of the current transform coefficient 310.
[0043] In normal mode, a maximum of eight syntax flags can be encoded and decoded: sig_coeff_flag, gt1_flag, gt2_flag, gt3_flag, ..., gt7_flag. Parity flags are encoded and decoded in bypass mode. The context modeling scheme for encoding and decoding transform coefficient entropy based on a specific quantization transition state is given by the following equation: Contextual modeling for sig_coeff_flag: ctxIdxSig = Min ((locSumAbsPass1 + 1) >> 1, 5)) + (d < 2 ? 6 : 0) +(Luma ? (d < 5 ? 6 : 0) : 0), Luma indicates whether the current block belongs to the luma component. The diagonal distance "d" is used to determine the index ctxIdxSig, which selects a subset of context variables with 6 context variables.
[0044] Context modeling for the abs_level_gtX flag: ctxIdxGtx = Min( locSumAbsPass1 – locNumSig, 6 ) + (d == 0 ? (Luma ?21 : 7) : Luma ? d < 3 ? 14 : (d < 10 ? 7 : 0) : 0). The diagonal distance “d” is used to determine the index ctxIdxGtx, which selects a subset of context variables with 7 context variables.
[0045] B. Context modeling based on scanned indexes
[0046] In some embodiments, the video codec can determine the subset of context variables selected for entropy encoding / decoding of a specific syntax element at a certain transform coefficient level in the current block by using the scan index n of the current coefficient in the current block, wherein the scan index follows a diagonal scan order used to encode or decode all transform coefficients in the current block, and scan index 0 corresponds to the origin of the current block. Figure 4 The indexes of the transform coefficients are shown for the diagonal scan order of 8x8 block entropy encoding and decoding.
[0047] The subset of context variables selected for entropy encoding / decoding of a specific syntax element can be determined by comparing the scan index n (rather than the diagonal distance d) of the current coefficient with a set of thresholds. For example, a video codec can encode or decode the syntax element sig_coeff_flag at the current transform coefficient level, and the index of the selected context variables for the luma component is given by the following formula: ctxIdxSig = 12 Max( 0, QState – 1 ) + Min( ( locSumAbsPass1 + 1 )>> 1, 3 ) + ( n < T n0 ? 8 : ( n < T n1 ? 4 : 0 ) ), Where T n0 and T n1 The specified decision threshold is used. The calculated index ctxIdxSig selects a subset of context variables containing four context variables. In some embodiments, the video codec can entropy-encode or decode syntax elements (e.g., sig_coeff_flag, abs_level_gtX) at the current transform coefficient level for a given dependent quantization transition state, and the index of the selected context variable is given by the following formula: Contextual modeling for sig_coeff_flag: ctxIdxSig = Min ((locSumAbsPass1 + 1) >> 1, 5)) + (n <T n0 ? 6 : 0) +(Luma ? (n <T n1 ? 6 : 0) : 0), Context modeling for the abs_level_gtX flag: ctxIdGtx = Min( locSumAbsPass1 – locNumSig, 6 ) + (n == 0 ? (Luma ?21 : 7) : Luma ? n <T n2 ? 14 : (n <T n3 ? 7 : 0) : 0), Where T n0 and T n1 To determine the specified decision threshold for the subset of context variables selected for sig_coeff_flag, T n2 and T n3Specify the decision threshold used to determine the subset of context variables selected for abs_level_gtX.
[0048] In some embodiments, the video codec can adaptively determine the selected subset of context variables for entropy encoding of a specific syntax element at the current coefficient level of signaling. For example, the video codec can determine whether to perform entropy encoding of a specific syntax element at the current transform coefficient level using the scan index "n" or diagonal distance "d" of the current transform coefficients by considering the context information used for entropy encoding of the current coefficient level. In some embodiments, when the current block is transformed by a non-separable transform (such as LFNST or NSPT), the video codec can determine the subset of context variables for entropy encoding of the current coefficient level based on the scan index n of the current transform coefficients in the current block. In some embodiments, when the current block is transformed by a separable block transform (such as DCT2), the video codec can determine the subset of context variables for entropy encoding of the current coefficient level based on the diagonal distance d of the current transform coefficients.
[0049] In some embodiments, the video codec can encode or decode the syntax elements sig_coeff_flag and abs_level_gtX at the transform coefficient level in the current transform block using the index of the selected context variable in a certain dependent quantization transformation state, as follows: When the transformation type of the current block is LFNST or NSPT, ctxIdxSig = Min ((locSumAbsPass1 + 1) >> 1, 3)) + (n <T n0 ? 4 : 0) +(Luma ? (n <T n1 ? 4 : 0) : 0), ctxIdGtx = Min( locSumAbsPass1 – locNumSig, 4 ) + (n == 0 ? (Luma ?15 : 5) : Luma ? n <T n2 ? 10 : (n <T n3 ? 5 : 0) : 0), otherwise, ctxIdxSig = Min ((locSumAbsPass1 + 1) >> 1, 3)) + (d < 2 ? 4 : 0) +(Luma ? (d < 5 ? 4 : 0) : 0), ctxIdxGtx = Min( locSumAbsPass1 – locNumSig, 4 ) + (d == 0 ? (Luma ?15 : 5) : Luma ? d < 3 ? 10 : (d < 10 ? 5 : 0) : 0).
[0050] Here, Luma represents the luminance component. In some embodiments, the video codec can encode or decode the syntax elements sig_coeff_flag and abs_level_gtX using a subset of context variables selected for a certain dependent quantization transition state, for the transform coefficient level in the current transform block, as follows: When the transform type of the current block is non-separated transform (LFNST) or non-separated principal transform (NSPT), ctxIdxSig = Min ((locSumAbsPass1 + 1) >> 1, 5)) + (n <T n0 ? 6 : 0) +(Luma ? (n <T n1 ? 6 : 0) : 0), ctxIdGtx = Min( locSumAbsPass1 – locNumSig, 6 ) + (n == 0 ? (Luma ?21 : 7) : Luma ? n <T n2 ? 14 : (n <T n3 ? 7 : 0) : 0), otherwise, ctxIdxSig = Min ((locSumAbsPass1 + 1) >> 1, 5)) + (d < 2 ? 6 : 0) +(Luma ? (d < 5 ? 6 : 0) : 0), ctxIdxGtx = Min( locSumAbsPass1 – locNumSig, 6 ) + (d == 0 ? (Luma ?21 : 7) : Luma ? d < 3 ? 14 : (d < 10 ? 7 : 0) : 0).
[0051] In some embodiments, the video codec may signal one or more syntax elements to instruct the derivation method for a subset of context variables used by the entropy codec for a specific syntax element at the signaling coefficient level. For example, the video codec may signal one or more syntax elements to specify the method for deriving a selected subset of context variables for a specific syntax element within one or more high-level syntax sets, such as the Sequence Parameter Set (SPS), Picture Parameter Set (PPS), Picture Header (PH), and Slice Header (SH). In some embodiments, the video codec may signal one or more syntax elements in the current block to specify the selection method for deriving the selected subset of context variables for a specific syntax element.
[0052] In some embodiments, the video codec may also signal one or more syntax elements to explicitly specify a set of decision thresholds for determining a selected subset of context for a particular syntax element of the transform coefficient level entropy codec, for example: {T n0, T n1} Used for sig_coeff_flag, {T n2, T n3 `}` is used for `abs_level_gtX`. For example, a video codec can signal one or more syntax elements to specify a set of decision thresholds for determining a selected subset of context variables for a particular syntax element within one or more high-level syntax sets, such as Sequence Parameter Set (SPS), Picture Parameter Set (PPS), Picture Header (PH), and Title Sequence (SH)). In some embodiments, the video codec can signal one or more syntax elements in the current block to specify a set of thresholds for determining a selected subset of context variables for a particular syntax element.
[0053] The video codec can also signal one or more syntax elements in one or more high-level syntax sets to indicate whether any of the proposed methods are enabled or disabled in the current video data unit, wherein the high-level syntax sets may include sequence parameter sets (SPS), picture parameter sets (PPS), picture headers (PH), title sequences (SH), or combinations thereof.
[0054] Any of the methods proposed above can be implemented in a codec and / or decoder. For example, any of the proposed methods can be implemented in the entropy encoding / decoding module of the codec and / or the entropy encoding / decoding module of the decoder. Alternatively, any of the proposed methods can be implemented as circuitry integrated into the entropy encoding / decoding module of the codec and / or the entropy encoding / decoding module of the decoder. The proposed aspects, methods, and related embodiments can be implemented individually or in combination in image and video codec systems.
[0055] II. Example Video Encoder
[0056] Figure 5 An example video encoder 500 implementing entropy coding with context modeling is shown. As shown, the video encoder 500 receives an input video signal from a video source 505 and encodes and decodes the signal into a bitstream 595. The video encoder 500 has multiple components or modules for encoding and decoding the signal from the video source 505, including at least some components selected from a transform module 510, a quantization module 511, an inverse quantization module 514, an inverse transform module 515, an intra-frame image estimation module 524, an intra-frame prediction module 525, a motion compensation module 530, a motion estimation module 535, a loop filter 545, a reconstructed image buffer 550, a motion vector buffer 565, a motion vector prediction module 575, and an entropy encoder 590. The motion compensation module 530 and the motion estimation module 535 belong to the inter-frame prediction module 540. The intra-frame prediction module 525 and the intra-frame image estimation module 524 belong to the current image prediction module 520, which uses the reconstructed samples of the current image as reference samples for predicting the current block.
[0057] In some embodiments, modules 510-590 are software instruction modules executed by one or more processing units (e.g., processors) of a computing device or electronic device. In some embodiments, modules 510-590 are hardware circuit modules implemented by one or more integrated circuits (ICs) of an electronic device. Although modules 510-590 are illustrated as independent modules, some modules may be combined into a single module.
[0058] Video source 505 provides an uncompressed raw video signal, presenting pixel data for each video frame. Subtractor 508 calculates the difference between the raw video pixel data of video source 505 and the predicted pixel data 513 output by motion compensation module 530 or intra-frame prediction module 525, as the prediction residual 509. Transform module 510 converts this difference (or residual pixel data or residual signal 508) into transform coefficients (e.g., by performing a Discrete Cosine Transform (DCT)). Quantization module 511 quantizes the transform coefficients into quantized data (or quantization coefficients) 512, and entropy encoder 590 encodes and decodes them into a bitstream 595.
[0059] The inverse quantization module 514 dequantizes the quantized data (or quantization coefficients) 512 to obtain transform coefficients 518. The inverse transform module 515 performs an inverse transform on the transform coefficients 518 to generate a reconstruction residual 519. The reconstruction residual 519 is added to the predicted pixel data 513 to generate reconstructed pixel data 517. In some embodiments, the reconstructed pixel data 517 is temporarily stored in a line buffer 527 (or an intra-frame prediction buffer) for intra-frame image prediction and spatial motion vector (MV) prediction. The reconstructed pixels are filtered by a loop filter 545 and stored in a reconstructed image buffer 550. In some embodiments, the reconstructed image buffer 550 is external memory to the video encoder 500. In some embodiments, the reconstructed image buffer 550 is internal memory to the video encoder 500.
[0060] Intra-frame image estimation module 524 performs intra-frame prediction based on reconstructed pixel data 517 to generate intra-frame prediction data. The intra-frame prediction data is provided to entropy encoder 590 for encoding and decoding into bitstream 595. The intra-frame prediction data is also used by intra-frame prediction module 525 to generate predicted pixel data 513.
[0061] The motion estimation module 535 performs inter-frame prediction of reference pixel data from previously decoded frames stored in the reconstructed image buffer 550 by generating motion vectors (MVs). These motion vectors are then provided to the motion compensation module 530 to generate predicted pixel data.
[0062] Instead of encoding and decoding the complete actual motion vectors into the bitstream, the video encoder 500 uses motion vector prediction to generate predicted motion vectors and encodes and decodes the difference between the motion vectors used for motion compensation and the predicted motion vectors into residual motion data, which is then stored in the bitstream 595.
[0063] The motion vector prediction module 575 generates a predicted motion vector based on the reference motion vector generated for encoding and decoding the previous video frame, i.e., the motion-compensated motion vector used to perform motion compensation. The motion vector prediction module 575 retrieves the reference motion vector of the previous video frame from the motion vector buffer 565. The video encoder 500 stores the motion vector generated for the current video frame in the motion vector buffer 565 as the reference motion vector for generating the predicted motion vector.
[0064] The motion vector prediction module 575 generates predicted motion vectors using reference motion vectors. The predicted motion vectors can be calculated through spatial motion vector prediction or temporal motion vector prediction. The difference (residual motion data) between the predicted motion vectors and the motion-compensated motion vectors (MC MV) of the current frame is encoded and decoded into bitstream 595 by the entropy encoder 590.
[0065] The entropy encoder 590 encodes and decodes various parameters and data into a bitstream 595 using entropy encoding and decoding techniques such as context-adaptive binary arithmetic coding (CABAC) or Huffman coding and decoding. The entropy encoder 590 encodes and decodes various header elements, flags, quantization transform coefficients 512, and residual motion data as syntax elements into the bitstream 595. The bitstream 595 is then stored in a storage device or transmitted to the decoder via a communication medium such as a network.
[0066] Loop filter 545 performs filtering or smoothing operations on the reconstructed pixel data 517 to reduce encoding / decoding artifacts, particularly at pixel block boundaries. In some embodiments, the filtering or smoothing operations performed by loop filter 545 include deblocking filter (DBF), sample adaptive offset (SAO), and / or adaptive loop filter (ALF). In some embodiments, luma mapping chroma scaling (LMCS) is performed before loop filtering.
[0067] Figure 6 This diagram illustrates the portion of the video encoder 500 that implements context variable subset selection based on transform coefficient positions. Specifically, the diagram shows the components of the entropy encoder 590 when performing entropy encoding / decoding on the transform block of the current block. As shown, the entropy encoder 590 includes a syntax element selection module 610, a context selection module 620, a context model storage 630, a binarization module 640, a bypass encoding / decoding engine 645, a bit sub-encoding engine 650, and a context model update module 660.
[0068] Syntax element selection module 610 selects data from various sources of video encoder 500 to be encoded and decoded into bitstream 595 as syntax elements, including quantization coefficients 512 from quantization module 511 and transform module 510 and transform type 614 of the current transform block. Syntax element selection module 610 can provide transform type 614 and position 616 of the current transform coefficient to context selection module 620. The position of the current transform coefficient can be represented as an index in the one-dimensional scan order of the transform block, or a two-dimensional Cartesian coordinate in the transform block.
[0069] The data selected as a syntax element is passed to the binarization module 640, which converts the selected data into bits (bins) of the syntax element in normal mode. The bit encoding engine 650 then performs binary arithmetic encoding / decoding, converting the binary data into binary arithmetic codes to be included in the bitstream 595. The binary arithmetic encoding / decoding operation relies on context modeling, which provides a context model with specific probabilities based on the type of the syntax element being encoded / decoded. Syntax elements in bypass mode are sent to the bypass encoding / decoding engine 645 and directly entropy-encoded into the bitstream 595 without context modeling.
[0070] Different context models for different types of syntax elements are stored in context model storage 630. Context model update module 660 updates the probabilities of each context model based on the bit values processed by bit sub-encoding engine 650. The context model (or context variable 632) used by bit sub-encoding engine 650 is retrieved from context model storage 630 based on context index 625 provided by context selection module 620.
[0071] When performing entropy encoding and decoding on the transform coefficients, the context selection module 620 can use the transform type 614 and the current transform coefficient position 616 to determine the context index 625, so as to select a set of context variables 632 (or a context model) from the context model storage 630. For example, when the transform type 614 indicates the use of a non-separate transform (such as NSPT or LFNST), the current transform coefficient position 616 serves as an index in the one-dimensional scan order of the transform block, used to select a subset of context variables from the context model storage 630. Conversely, when the transform type 614 indicates a separable transform (such as DCT), the current transform coefficient position 616 serves as a two-dimensional Cartesian coordinate index in the transform block, used to select a subset of context variables from the context model storage 630.
[0072] Figure 7 A conceptual illustration of flow 700 for entropy encoding and decoding pixel blocks by selecting a subset of context variables based on the position of transform coefficients is presented. In some embodiments, one or more processing units (such as processors) of a computing device implementing encoder 500 execute flow 700 by executing instructions stored in a computer-readable medium. In some embodiments, an electronic device implementing encoder 500 executes flow 700.
[0073] In step 710, the encoder receives data to be encoded into the bitstream as the current pixel block of the current video image. The current block includes a transform block.
[0074] In step 720, the encoder encodes and decodes the received transform block data into transform coefficients generated by the transform operation. The transform operation is performed according to the transform type of the current block.
[0075] The encoder performs entropy encoding / decoding on the transform coefficients of the transform block (at block 730) according to the scan order with context modeling for transmission. This context modeling can be used for syntax elements that specify the absolute value of the transform coefficients (e.g., abs_level_gtX) or syntax elements that specify the sign of the transform coefficients (e.g., sig_coeff_flag).
[0076] For each transform coefficient currently being encoded / decoded, the encoder selects a set of context variables (at block 740) to model the context based on the transform coefficient's position in the scan order. In some implementations, this set of context variables is selected based on comparing the transform coefficient's position in the diagonal scan order with two or more thresholds (e.g., T). n0 T n1 T n2 T n3 (etc.). In some implementations, if the block is divided into two regions, only one threshold is used. This is typically applicable when entropy encoding / decoding chroma blocks is performed.
[0077] In some implementations, the selection of this set of context variables is dynamically determined based on the transform type of the current block. For example, when the transform coefficients of the transform block are generated by a non-separable transform operation (e.g., a non-separable transform (LFNST) or a non-separable master transform (NSPT)), the set of context variables is selected based on the position of the transform coefficient in the (one-dimensional) diagonal scan order; while when the transform coefficients of the transform block are generated by a separable transform operation (e.g., a discrete cosine transform (DCT)), the set of context variables is selected based on the (two-dimensional) Cartesian coordinates of the transform coefficient in the transform block.
[0078] In some implementations, one or more syntax elements are signaled in one or more high-level syntax sets (e.g., sequence parameter set, image parameter set, image header, title sequence, etc.) to specify the selection method for the set of context variables for a particular syntax element of the transform coefficient.
[0079] III. Example Video Decoder
[0080] In some implementations, the encoder may signal (or generate) one or more syntax elements in the bitstream, so that the decoder can parse the one or more syntax elements from the bitstream.
[0081] Figure 8An example video decoder 800 implementing entropy decoding with context modeling is provided. As shown, the video decoder 800 is an image decoding or video decoding circuit that receives a bitstream 895 and decodes the contents of the bitstream into video frame pixel data for display. The video decoder 800 has several components or modules for decoding the bitstream 895, including a subset of components selected from an inverse quantization module 814, an inverse transform module 815, an intra-frame prediction module 825, a motion compensation module 830, a loop filter 845, a decoded image buffer 850, an MV buffer 865, an MV prediction module 875, and a parser 890. The motion compensation module 830 is part of the inter-frame prediction module 840. The intra-frame prediction module 825 is part of the current image prediction module 820, which uses current image reconstruction samples as reference samples for predicting the current block.
[0082] In some embodiments, modules 814-890 are software instruction modules executed by one or more processing units (e.g., processors) of a computing device. In some embodiments, modules 814-890 are hardware circuit modules implemented by one or more integrated circuits (ICs) of an electronic device. Although modules 814-890 are illustrated as independent modules, some modules may be combined into a single module.
[0083] Parser 890 (or entropy decoder) receives bitstream 895 and performs initial parsing according to the syntax defined by the video codec or image codec standard. The parsed syntax elements include various header elements, flags, and quantization data (or quantization coefficients) 812. Parser 890 then parses the various syntax elements using entropy coding techniques such as context-adaptive binary arithmetic coding (CABAC) or Huffman coding.
[0084] The inverse quantization module 814 dequantizes the quantized data (or quantization coefficients) 812 to obtain transform coefficients. The inverse transform module 815 performs an inverse transform on the transform coefficients 818 to generate a reconstructed residual signal 819. The reconstructed residual signal 819 is added to the predicted pixel data 813 generated by the intra-frame prediction module 825 or the motion compensation module 830 to generate decoded pixel data 817. The decoded pixel data is filtered by the loop filter 845 and then stored in the decoded image buffer 850. In some embodiments, the decoded image buffer 850 is an external memory of the video decoder 800. In some embodiments, the decoded image buffer 850 is an internal memory of the video decoder 800.
[0085] Intra-prediction module 825 receives intra-prediction data from bitstream 895 and generates predicted pixel data 813 from decoded pixel data 817 stored in decoded image buffer 850 accordingly. In some embodiments, decoded pixel data 817 is also stored in line buffer 827 (or intra-prediction buffer) for intra-image prediction and spatial MV prediction.
[0086] In some embodiments, the contents of the decoded image buffer 850 are used for display. The display device 805 can directly retrieve the contents of the decoded image buffer 850 for display, or retrieve the contents of the decoded image buffer into a display buffer. In some embodiments, the display device receives pixel values from the decoded image buffer 850 via pixel transfer.
[0087] The motion compensation module 830 generates predicted pixel data 813 from the decoded pixel data 817 stored in the decoded image buffer 850 based on the motion compensation MV (MC MV). These motion compensation MVs are decoded by adding the residual motion data received from the bitstream 895 to the predicted MV received from the MV prediction module 875.
[0088] The MV prediction module 875 generates a predicted MV based on a reference MV generated for decoding the previous video frame (e.g., a motion-compensated MV used to perform motion compensation). The MV prediction module 875 retrieves the reference MV of the previous video frame from the MV buffer 865. The video decoder 800 stores the motion-compensated MV generated for decoding the current video frame in the MV buffer 865 as a reference MV for generating the predicted MV.
[0089] Loop filter 845 filters or smooths the decoded pixel data 817 to reduce encoding / decoding artifacts, especially at pixel block boundaries. In some embodiments, the filtering or smoothing operations performed by loop filter 845 include deblocking filter (DBF), sample adaptive offset (SAO), and / or adaptive loop filter (ALF). In some embodiments, luma mapping chroma scaling (LMCS) is performed before the loop filter.
[0090] Figure 9 This example illustrates a portion of a video decoder 800 that selects a subset of context variables based on the position of transform coefficients. Specifically, the figure illustrates components of an entropy decoder 890 when performing entropy decoding on the transform block of the current block.
[0091] As shown in the figure, the entropy decoder 890 includes a syntax element distribution module 910, a context selection module 920, a context model storage module 930, a debinarization module 940, a bypass decoding engine 945, a bit sub-decoding engine 950, and a context model update module 960.
[0092] The bit-sub decoding engine 950 receives bits from the bitstream 895 in normal mode and performs binary arithmetic coding (BAC) to convert the received bits into binary symbols. The BAC operation relies on context modeling, which provides a context model with specific probabilities based on the type of the encoded / decoded syntax element. The context model (or context variable 932) used by the bit-sub decoding engine 950 is retrieved from the context model memory 930 based on the context index 925 provided by the context selection module 920.
[0093] Bits received from bitstream 895 in bypass mode are sent to bypass codec engine 645, directly entropy-decoded and used as syntax elements, without the need for context modeling.
[0094] Different context models for different types of syntax elements are stored in the context model memory 930. The context model update module 960 updates the probabilities of each context model based on the binary symbol values processed by the bit-sub decoding engine 950. The debinarization module 940 converts the binary symbols into syntax elements. The decoded syntax elements are then distributed by the syntax element distribution module 910 to their respective destinations in the video decoder 800. As shown, decoded syntax elements such as quantization coefficients 812 and transform types 914 are distributed to the dequantization module 811 and the inverse transform module 810 of the current transform block.
[0095] When performing entropy decoding on the transform coefficients, the context selection module 920 can use the transform type 614 and the current transform coefficient position 916 to determine the context index 925 in order to select a set of context variables 932 (or a context model) from the context model memory 930. For example, when the transform type 914 indicates the use of a non-separable transform (such as NSPT or LFNST), the current transform coefficient position 916 serves as an index in the one-dimensional scan order of the transform block to select a subset of context variables from the context model memory 930. Conversely, when the transform type 914 indicates the use of a separable transform (such as DCT), the current transform coefficient position 916 serves as an index in the two-dimensional Cartesian coordinates of the transform block to select a subset of context variables from the context model memory 930.
[0096] Figure 10A conceptual illustration of a process 1000 for decoding pixel blocks using entropy coding by selecting a subset of context variables based on the position of transform coefficients. In some embodiments, one or more processing units (such as processors) of a computing device implementing the decoder 800 execute process 1000 by executing instructions stored in a computer-readable medium. In some embodiments, an electronic device implementing the decoder 800 executes process 1000.
[0097] In step 1010, the decoder receives the data to be decoded as the current pixel block of the current image, which includes a transform block for which transform coefficients are generated according to the transform type.
[0098] In step 1020, the decoder decodes the received data entropy into the transform coefficients of the transform block according to the scan order with context modeling. This context modeling can be used to specify syntax elements for the absolute values of the transform coefficients (such as abs_level_gtX) or syntax elements for specifying the signs of the transform coefficients (such as sig_coeff_flag).
[0099] In step 1030, for each transform coefficient currently decoded, the decoder selects a set of context variables for context modeling based on the position of that transform coefficient in the scan order. In some embodiments, this set of context variables is selected based on comparing the position of the transform coefficient in the diagonal scan order with two or more thresholds (such as T). n0 T n1 T n2 T n3 (etc.). In some embodiments, if the block is divided into two regions, only one threshold is used. This is generally applicable to cases where entropy encoding and decoding of chroma blocks are performed.
[0100] In some embodiments, the selection of this set of context variables is dynamically determined based on the transform type of the current block. For example, when the transform coefficients of the transform block are generated by an indivisible transform operation (such as LFNST or NSPT), the set of context variables is selected based on the position of the transform coefficients in the (one-dimensional) diagonal scan sequence; while when the transform coefficients of the transform block are generated by an indivisible transform operation (such as DCT), the set of context variables is selected based on the (two-dimensional) Cartesian coordinates of the transform coefficients in the transform block.
[0101] In some embodiments, one or more syntax elements are signaled in one or more high-level syntax sets (such as sequence parameter sets, image parameter sets, image headers, title sequences, etc.) to specify a selection method for the set of context variables for a particular syntax element of the transform coefficients.
[0102] In step 1040, the decoder reconstructs the current block based on the entropy decoding transform coefficients generated by the inverse transform operation. The inverse transform operation is performed according to the transform type of the current block. The decoder can then display the reconstructed current block as part of the reconstructed current image.
[0103] IV. Example Electronic System
[0104] Many of the features and applications described above are implemented as software processes, which are specified as a set of instructions recorded on a computer-readable storage medium (also known as a computer-readable medium). When these instructions are executed by one or more computing or processing units (such as one or more processors, processor cores, or other processing units), the processing unit performs the operations indicated in the instructions. Examples of computer-readable media include, but are not limited to, CD-ROMs, flash drives, random access memory (RAM) chips, hard disks, erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), etc. Computer-readable media do not include carrier waves and electronic signals transmitted via wireless or wired connections.
[0105] In this specification, the term "software" includes firmware residing in read-only memory or application programs stored in magnetic storage, which can be read into memory and processed by a processor. Furthermore, in some embodiments, multiple software inventions may be implemented as sub-parts of a larger program while still remaining distinct software inventions. In some embodiments, multiple software inventions may also be implemented as independent programs. Finally, any combination of independent programs that collectively implement the software inventions described herein falls within the scope of this disclosure. In some embodiments, when a software program is installed and runs on one or more electronic systems, one or more specific machine implementations are defined that execute and perform the operations of the software program.
[0106] Figure 11 An electronic system 1100 implemented according to certain embodiments of the present disclosure is conceptually illustrated. The electronic system 1100 may be a computer (such as a desktop computer, personal computer, tablet computer, etc.), a telephone, a personal digital assistant (PDA), or any other type of electronic device. Such electronic systems include various types of computer-readable media and their interfaces. The electronic system 1100 includes a bus 1105, a processing unit 1110, a graphics-processing unit (GPU) 1115, system memory 1120, a network 1125, a read-only memory 1130, a permanent storage device 1135, an input device 1140, and an output device 1145.
[0107] Bus 1105 represents all system, peripheral, and chipset buses that communicate with the numerous internal devices of electronic system 1100. For example, bus 1105 communicates with processing unit 1110, graphics processing unit (GPU) 1115, read-only memory (ROM) 1130, system memory 1120, and permanent storage device 1135.
[0108] Processing unit 1110 retrieves instructions from these different memory units for execution and retrieves data for processing, thereby executing the processes of this disclosure. The processing unit may be a single-processor or a multi-core processor in different embodiments. Some instructions are passed to and executed by GPU 1115. GPU 1115 is capable of offloading various computing or supplemental image processing provided by processing unit 1110.
[0109] Read-only memory (ROM) 1130 stores static data and instructions used by processing unit 1110 and other modules of the electronic system. Permanent storage device 1135 is a read-write storage device. This device is a non-volatile storage unit that can store instructions and data even when the electronic system 1100 is powered off. Some embodiments of this disclosure use mass storage devices (such as disks or optical discs and their corresponding disk drives) as permanent storage device 1135.
[0110] Other embodiments use removable storage devices (such as floppy disks, flash memory devices, etc., and their corresponding disk drives) as permanent storage devices. Similar to permanent storage device 1135, system memory 1120 is also a read-write storage device. However, unlike storage device 1135, system memory 1120 is a volatile read-write memory, such as random access memory. System memory 1120 stores some instructions and data used by the processor during runtime. In some embodiments, processes conforming to this disclosure are stored in system memory 1120, permanent storage device 1135, and / or read-only memory 1130. For example, various storage units include instructions for processing multimedia segments, conforming to some embodiments. Processing unit 1110 retrieves instructions from these different storage units for execution and retrieves data for processing, thereby executing the processes of some embodiments.
[0111] Bus 1105 also connects input device 1140 and output device 1145. Input device 1140 enables a user to pass information to the electronic system and select commands. Input device 1140 includes an alphanumeric keypad and pointing device (also known as a "cursor control device"), a camera (such as a webcam), a microphone, or similar devices for receiving voice commands. Output device 1145 displays images generated by the electronic system or otherwise outputs data. Output device 1145 includes printers and display devices such as cathode ray tube (CRT) or liquid crystal display (LCD), as well as speakers or similar audio output devices. Some embodiments include devices such as touchscreens that function as both input and output devices.
[0112] Finally, as Figure 11 As shown, bus 1105 also connects electronic system 1100 to network 1125 via a network adapter (not shown). In this way, the computer can become part of a computer network (such as a local area network (LAN), wide area network (WAN), or intranet, or a network of networks, such as the Internet). Any or all components of electronic system 1100 can be used in conjunction with this disclosure.
[0113] Some embodiments include electronic components, such as microprocessors, storage, and memory, that store computer program instructions in a machine-readable or computer-readable medium (also referred to as a computer-readable storage medium, machine-readable medium, or machine-readable storage medium). Some examples of such computer-readable media include random access memory (RAM), read-only memory (ROM), read-only optical disc (CD-ROM), recordable optical disc (CD-R), rewritable optical disc (CD-RW), read-only digital versatile optical discs (such as DVD-ROM, dual-layer DVD-ROM), various recordable / rewritable DVDs (such as DVD-RAM, DVD-RW, DVD+RW, etc.), flash memory (such as SD cards, mini-SD cards, micro-SD cards, etc.), magnetic and / or solid-state drives, read-only and recordable Blu-ray discs, ultra-high-density optical discs, any other optical or magnetic media, and floppy disks. The computer-readable medium may store a computer program executable by at least one processing unit and contain a set of instructions for performing various operations. Examples of computer programs or computer code include machine code (such as code generated by a compiler) and files containing high-level code that are executed by a computer, electronic component, or microprocessor via an interpreter.
[0114] While the foregoing discussion primarily concerns microprocessors or multi-core processors that execute software, many of the aforementioned features and applications are implemented by one or more integrated circuits, such as application-specific integrated circuits (ASICs) or field-programmable gate arrays (FPGAs). In some embodiments, such integrated circuits execute instructions stored on the circuit itself. Furthermore, some embodiments execute software stored in programmable logic devices (PLDs), ROM, or RAM devices.
[0115] In this specification and any claim of this application, the terms "computer," "server," "processor," and "memory" refer to electronic or other technical devices. These terms do not include individuals or groups. For the purposes of this specification, the term "displayed" or "shown" means displayed on an electronic device. In this specification and any claim of this application, the terms "computer-readable medium," "computer-readable media," and "machine-readable medium" are fully defined as tangible, physical objects that store information and exist in a computer-readable form. These terms do not include any wireless signals, wired download signals, or any other transient signals.
[0116] Although this disclosure has been described in conjunction with numerous specific details, those skilled in the art will recognize that this disclosure may be adopted in other specific forms without departing from its spirit. Furthermore, many figures (including...) Figure 7 and Figure 10 This provides a conceptual description of the process. The specific operations of these processes may not be performed in the order shown and described. Specific operations may not be performed in a continuous sequence of operations; different specific operations may be performed in different embodiments. Furthermore, the process may be implemented through multiple sub-processes or as part of a larger macro-process. Therefore, those skilled in the art will understand that this disclosure should not be limited to the foregoing illustrative details but should be defined by the appended claims.
[0117] Additional notes
[0118] The topics described herein sometimes demonstrate different components contained within or connected to other different components. It should be understood that these architectures are merely examples, and many other architectures can actually be implemented to achieve the same functionality. Conceptually, any arrangement of components to achieve the same function is effectively “associated” to achieve the desired functionality. Therefore, any two combinations of components in this document to achieve a particular function can be considered “associated” to achieve the desired functionality, regardless of the architecture or intermediate components. Similarly, any two components so associated can also be considered “operationally connected” or “operationally coupled” to achieve the desired functionality, and any two components that can be so associated can also be considered “operationally coupled” to achieve the desired functionality. Specific examples of operational coupling include, but are not limited to, physically matable and / or physically interactive components and / or wirelessly interactive and / or logically interactive components.
[0119] Furthermore, regarding the use of almost all plural and / or singular terms in this document, those skilled in the art can appropriately convert plural to singular and / or singular to plural depending on the context and / or application. For clarity, various singular / plural permutations may be explicitly listed herein.
[0120] Furthermore, those skilled in the art will understand that, generally, the terms used herein, especially in appended claims, such as the body portion of appended claims, are generally intended as “open” terms. For example, the word “comprising” should be interpreted as “including but not limited to,” the word “having” should be interpreted as “having at least,” and the word “including” should be interpreted as “including but not limited to,” etc. Those skilled in the art will also further understand that if a claim expressly intends to introduce a particular quantity, that intention will be expressly stated in the claim; if no such statement is made, then such an intention does not exist. For example, to aid understanding, the following appended claims may contain the introductory phrases “at least one” and “one or more” to introduce the claim statement. However, the use of such phrases should not be interpreted as introducing the claim statement with the indefinite article “a” or “an” to limit any particular claim containing that statement to containing only one such statement, even if the same claim contains the introductory phrases “one or more” or “at least one” and indefinite articles such as “a” or “an,” for example, “a” and / or “an” should be interpreted as “at least one” or “one or more”; the same applies to definite articles used to introduce the claim statement. Furthermore, even when a specific number is explicitly stated in the introductory claims, those skilled in the art will recognize that such a statement should be interpreted as at least the number stated. For example, the phrase "two statements" alone, without any other modifiers, means at least two statements, or two or more statements. Additionally, when using conventions such as "at least one A, B, and C, etc.", such structures are generally intended for those skilled in the art to understand the meaning of the convention. For example, "a system having at least one A, B, and C" includes, but is not limited to, systems with only A, only B, only C, A and B, A and C, B and C, and systems with A, B, and C, etc. Similarly, when using conventions such as "at least one A, B, or C, etc.", such structures are generally intended for those skilled in the art to understand the meaning of the convention. For example, "a system having at least one A, B, or C" includes, but is not limited to, systems with only A, only B, only C, A and B, A and C, B and C, and systems with A, B, and C, etc. Those skilled in the art will further understand that almost all extractives and / or phrases presenting two or more alternative terms in the specification, claims, or drawings should be understood to include the possibility of containing only one term, any one term, or both terms simultaneously. For example, the phrase “A or B” should be understood as including the possibility of “A” or “B” or “A and B”.
[0121] As can be seen from the foregoing, various embodiments of this disclosure have been described herein for illustrative purposes, and various modifications can be made without departing from the scope and spirit of this disclosure. Therefore, the various embodiments disclosed herein are not intended to be limiting, and the true scope and spirit are indicated by the following claims.
Claims
1. A video encoding and decoding method, characterized in that, include: Receive data for encoding or decoding a pixel block, the pixel block being the current block of the current image to be encoded or decoded into video, the current block including a transform block; Based on the diagonal scan order with context modeling, the transform coefficients of the transform block are entropy encoded or entropy decoded. as well as For each transform coefficient in the transform block, a set of context variables is selected for context modeling based on the position of the transform coefficient in the diagonal scan sequence.
2. The video encoding and decoding method as described in claim 1, characterized in that, The transform coefficients of this transform block are generated by an inseparable transform operation.
3. The video encoding and decoding method as described in claim 2, characterized in that, This non-separable transformation operation is either a non-separable transformation or a non-separable principal transformation.
4. The video encoding and decoding method as described in claim 1, characterized in that, When the transform coefficients of the transform block are generated by a separable transform operation, the set of context variables is selected based on the Cartesian coordinates of the transform coefficients in the transform block.
5. The video encoding and decoding method as described in claim 4, characterized in that, This separable transformation operation is the discrete cosine transform.
6. The video encoding and decoding method as described in claim 1, characterized in that, The selection of this set of context variables is dynamically determined based on the transformation type of the current block.
7. The video encoding and decoding method as described in claim 1, characterized in that, This context modeling is used to specify the syntax elements for the absolute value of the transformation coefficients.
8. The video encoding and decoding method as described in claim 1, characterized in that, This context modeling is used to specify the syntax elements for the transformation coefficient symbols.
9. The video encoding and decoding method as described in claim 1, characterized in that, This set of context variables is selected based on comparing the position of the transform coefficient in the diagonal scan sequence with one or more thresholds.
10. The video encoding and decoding method as described in claim 1, characterized in that, Signal one or more syntax elements in one or more high-level syntax sets to specify the selection method for the set of context variables for a particular syntax element of the transform coefficient.
11. An electronic device, characterized in that, include: The video codec circuit is configured to perform the following operations: Receive data for encoding or decoding a pixel block, the pixel block being the current block of the current image to be encoded or decoded into video, the current block including a transform block; Based on the diagonal scan order with context modeling, the transform coefficients of the transform block are entropy encoded or entropy decoded. as well as For each transform coefficient in the transform block, a set of context variables is selected for context modeling based on the position of the transform coefficient in the diagonal scan sequence.
12. A video decoding method, characterized in that, include: Receive data from the bitstream for decoding pixel blocks, which are current blocks of the current image to be decoded into video, the current blocks including transform blocks; Based on the scan order with context modeling, the received data is entropy decoded into the transform coefficients of the transform block, wherein for each currently decoded transform coefficient, a set of context variables is selected according to the position of the transform coefficient in the scan order; as well as The current block is reconstructed based on the entropy decoding transform coefficients generated through the inverse transform operation.
13. A video encoding method, characterized in that, include: The bitstream of the current image of the video, which includes transform blocks; The received data of the transform block is encoded into transform coefficients generated by the transform operation; as well as The transform coefficients of the transform block are entropy encoded for transmission according to the scan order with context modeling, wherein for each transform coefficient currently encoded, a set of context variables is selected based on the position of the transform coefficient in the scan order.