Image encoding / decoding method and recording medium for storing bit stream
By using the update probability information of candidate blocks to encode/decode the syntax of the current block, the problem of excessive bitstream capacity in high-resolution image compression is solved, achieving more efficient image data transmission and storage.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-11
- Publication Date
- 2026-04-07
AI Technical Summary
With the increasing demand for high-resolution and high-quality images, existing image compression technologies face the problem of increased data volume during transmission and storage, especially in video compression of stereoscopic image content, where existing technologies struggle to effectively reduce bitstream capacity.
The syntax of the current block is encoded/decoded by using the updated probability information of candidate blocks, instead of using the probability information from previous blocks in traditional methods. The probability information is then updated to reduce the bitstream capacity.
This effectively reduces the bitstream capacity and improves the efficiency of image data transmission and storage.
Smart Images

Figure CN121816751A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to methods and apparatus for processing video signals. Background Technology
[0002] Recently, there has been an increasing demand for high-resolution and high-quality images, such as HD (High Definition) and UHD (Ultra High Definition) images, across various application areas. As image data becomes higher resolution and higher quality, the data volume increases relative to existing image data, leading to increased transmission and storage costs when transmitting or storing image data using existing wired and wireless broadband circuits or storage media. These problems arising from the increasing resolution and quality of image data can be addressed using efficient image compression techniques.
[0003] There are various techniques, such as inter-frame prediction techniques that use image compression technology to predict the pixel values included in the current image based on previous or subsequent images of the current image, intra-frame prediction techniques that use pixel information in the current image to predict the pixel values included in the current image, and entropy coding techniques that assign short symbols to values with high occurrence frequency and long symbols to values with low occurrence frequency. Image data can be effectively compressed, transmitted, or stored by using these image compression techniques.
[0004] On the other hand, with the increasing demand for high-resolution images, the demand for stereoscopic image content as a new image service is also increasing. Video compression techniques for effectively providing high-resolution and ultra-high-resolution stereoscopic image content have been discussed. Summary of the Invention
[0005] Technical issues
[0006] This disclosure provides a method for determining probabilistic information used for syntax encoding / decoding.
[0007] Specifically, this disclosure provides a method for encoding / decoding the syntax of a current block by using the probability information of updates to candidate blocks instead of the probability information of updates to blocks encoded / decoded before the current block.
[0008] Specifically, this disclosure provides a method for encoding / decoding the syntax of the current block by re-updating the probability information of updates to blocks encoded / decoded prior to the current block.
[0009] The technical problems addressed in this disclosure are not limited to those mentioned above, and those skilled in the art to which this disclosure pertains can clearly understand other unmentioned technical problems based on the following description.
[0010] Technical solution
[0011] The image decoding method according to this disclosure may include: determining current probability information; decoding the target syntax of the current block based on the probability information; and updating the current probability information. In this case, the method for determining the current probability information may vary depending on the position of the current block.
[0012] The image encoding method according to this disclosure may include: determining current probability information; encoding the target syntax of the current block based on the probability information; and updating the current probability information. In this case, the method for determining the current probability information may vary depending on the position of the current block.
[0013] In the image decoding / encoding method according to this disclosure, when the current block is not the first block within the coding tree unit, the current probability information can be the updated probability information of the previous block that was last decoded / encoded.
[0014] In the image decoding / encoding method according to this disclosure, when the current block is the first block within the coding tree unit, the current probability information can be determined by referring to candidate blocks.
[0015] In the image decoding / encoding method according to this disclosure, the updated probability information of the candidate block can be determined as the current probability information.
[0016] In the image decoding / encoding method according to this disclosure, the current probability information can be obtained by updating the probability information of the previous block based on the value of the target syntax of the candidate block.
[0017] In the image decoding / encoding method according to this disclosure, the candidate block can be the top neighbor block or the left neighbor block adjacent to the current block.
[0018] In the image decoding / encoding method according to this disclosure, the candidate block can be a neighboring block referenced to derive prediction information for the current block.
[0019] In the image decoding / encoding method according to this disclosure, a candidate block is one of a plurality of candidate blocks, and a candidate block can be selected from the plurality of candidate blocks based on an index decoded from the bitstream.
[0020] The features briefly summarized above regarding this disclosure are merely exemplary aspects of the detailed description of this disclosure described below, and do not limit the scope of this disclosure.
[0021] Technical effect
[0022] According to this disclosure, the following effect exists: the bitstream capacity is reduced by effectively determining the probabilistic information used for syntax encoding / decoding.
[0023] Specifically, according to this disclosure, the bitstream capacity can be reduced by using the probability information of updated candidate blocks instead of the probability information of updated blocks encoded / decoded before the current block to encode / decode the syntax of the current block.
[0024] Specifically, according to this disclosure, the syntax of the current block can be encoded / decoded by re-updating the probability information of the blocks encoded / decoded before the current block, thereby reducing the bitstream capacity.
[0025] The effects that can be obtained from this disclosure are not limited to those mentioned above, and other unmentioned effects can be clearly understood by those skilled in the art to which this disclosure pertains based on the following description. Attached Figure Description
[0026] Figure 1 This is a block diagram illustrating an image encoding apparatus according to an embodiment of the present disclosure.
[0027] Figure 2 This is a block diagram illustrating an image decoding apparatus according to an embodiment of the present disclosure.
[0028] Figure 3 An example of decoding being performed on a warehouse-by-warehouse basis is shown.
[0029] Figure 4 This indicates a decoding method based on a conventional encoding engine.
[0030] Figure 5 The probability of MPS occurrence and the probability of LPS occurrence are shown.
[0031] Figure 6 An example is shown in which the variable ivlCurrRange is updated in the same way as the variable ivlMpsRange.
[0032] Figure 7 This illustrates the probability of MPS and LPS occurring within a predetermined range.
[0033] Figure 8 This represents the update aspect of the variable ivlCurrRange.
[0034] Figure 9 The encoding / decoding order between blocks is shown.
[0035] Figure 10 This is an example used to describe multiple situations.
[0036] Figure 11 A method for encoding / decoding a target grammar according to an embodiment of the present disclosure is shown. Detailed Implementation
[0037] Because this disclosure can be modified and has several embodiments, specific embodiments will be illustrated and described in detail in the accompanying drawings. However, this is not intended to limit this disclosure to the specific embodiments, and it should be understood that this disclosure includes all modifications, equivalents, or substitutions included within the concept and scope of this disclosure. In describing each drawing, similar reference numerals are used for similar parts.
[0038] Various components may be described using terms such as first, second, etc., but these components should not be limited by the terms. Terms are used only to distinguish one component from others. For example, without departing from the scope of the rights of this disclosure, a first component may be referred to as a second component, and similarly, a second component may be referred to as a first component. The term "and / or" includes a combination of multiple related inputs or any single item of multiple related inputs.
[0039] When a component is referred to as "linked" or "connected" to other components, it should be understood that the component may be directly linked or connected to the other component, but there may also be other components in between. On the other hand, when a component is referred to as "directly linked" or "directly connected" to other components, it should be understood that there are no other components in between.
[0040] The terminology used in this application is for the purpose of describing specific embodiments only and is not intended to limit the scope of this disclosure. Singular expressions include plural expressions unless the singular expression clearly has a different meaning in the context. In this application, it should be understood that terms such as "comprising" or "having" refer to the presence of a characteristic, number, step, movement, component, part, or combination thereof as entered in the specification, but do not preclude the possibility of adding or having one or more other characteristics, numbers, steps, movements, components, parts, or combinations thereof.
[0041] In the following, the desired embodiments of the present disclosure will be described in more detail with reference to the accompanying drawings. In the following drawings, the same reference numerals are used for the same parts, and repeated descriptions of the same parts are omitted.
[0042] Figure 1 This is a block diagram illustrating an image encoding apparatus according to an embodiment of the present disclosure.
[0043] Reference Figure 1 The image encoding device 100 may include an image segmentation unit 110, prediction units 120 and 125, a transformation unit 130, a quantization unit 135, a rearrangement unit 160, an entropy encoding unit 165, a dequantization unit 140, an inverse transformation unit 145, a filter unit 150, and a memory 155.
[0044] Although Figure 1 Each building block shown is illustrated independently to represent a different feature function in an image encoding device, but this does not mean that each building block consists of a single hardware or software unit. That is, since each building block is included by listing each building block for ease of description, at least two building blocks of each building block can be combined to form a building block, or a building block can be divided into multiple building blocks to perform functions, and even integrated and individual implementations of the building blocks are included within the scope of the claims of this disclosure, unless they depart from the nature of this disclosure.
[0045] Furthermore, some components may be optional components used only to improve performance, rather than essential components for performing the basic functions of this disclosure. This disclosure can be implemented by including only the building blocks necessary to achieve the essence of this disclosure and excluding components used only to improve performance, and structures that include only essential components and exclude optional components used only to improve performance are also included within the scope of the claims of this disclosure.
[0046] Image segmentation unit 110 can segment an input image into at least one processing unit. In this case, the processing unit can be a prediction unit (PU), a transform unit (TU), or a coding unit (CU). In image segmentation unit 110, an image can be segmented into a combination of multiple coding units, prediction units, and transform units, and the image can be encoded by selecting a combination of coding units, prediction units, and transform units according to a predetermined criterion (e.g., a cost function).
[0047] For example, an image can be segmented into multiple coding units. To segment coding units in an image, a recursive tree structure such as a quadtree, ternary tree, or binary tree can be used, and a coding unit that is segmented into other coding units by using an image or the largest coding unit as the root can have as many child nodes as the number of coding units it was segmented into. Coding units that are no longer segmented according to specific constraints are called leaf nodes. As an example, assuming quadtree segmentation is applied to a coding unit, a coding unit can be segmented into at most four other coding units.
[0048] In the following embodiments of this disclosure, the encoding unit may be used as a unit for encoding or as a unit for decoding.
[0049] A prediction unit may be segmented in a coding unit into at least one square or rectangular shape of the same size, or may be segmented such that any prediction unit segmented in a coding unit may have a shape and / or size different from the other prediction units.
[0050] In intra-frame prediction, the transform unit can be set to be the same as the prediction unit. In this case, after the coding unit is segmented into multiple transform units, intra-frame prediction can be performed for each transform unit. The coding unit can be segmented in the horizontal or vertical direction. Depending on the size of the coding unit, the number of transform units generated by segmenting the coding unit can be 2 or 4. Alternatively, if the size of the transform unit is small, multiple transform units can be set as a single prediction unit.
[0051] Prediction units 120 and 125 may include an inter-frame prediction unit 120 performing inter-frame prediction and an intra-frame prediction unit 125 performing intra-frame prediction. It can be determined whether inter-frame or intra-frame prediction is performed for the coding unit, and detailed information based on each prediction method (e.g., reference sample line, intra-frame prediction mode, motion vector, reference image, etc.) can be determined. In this case, the processing unit performing the prediction may be different from the processing unit that determines the prediction method and specific content. For example, the prediction method, prediction mode, etc., can be determined in the coding unit, and the prediction can be performed in the prediction unit or the transform unit. The residual value (residual block) between the generated prediction block and the original block can be input to the transform unit 130. Furthermore, prediction mode information, motion vector information, etc., used for prediction can be encoded together with the residual value in the entropy coding unit 165 and can be transmitted to the decoding device. When using a specific coding mode, the original block can be encoded as is and transmitted to the decoding unit without generating a prediction block through prediction units 120 or 125.
[0052] The inter-frame prediction unit 120 may predict prediction units based on information about at least one of the previous or subsequent images of the current image, or in some cases, based on information about some coded regions in the current image. The inter-frame prediction unit 120 may include a reference image interpolation unit, a motion prediction unit, and a motion compensation unit.
[0053] The reference image interpolation unit can receive reference image information from memory 155 and generate pixel information equal to or less than integer pixels in the reference image. For luminance pixels, an 8-tap DCT-based interpolation filter with different filter coefficients can be used to generate pixel information equal to or less than integer pixels in 1 / 4 pixel units. For chrominance signals, a 4-tap DCT-based interpolation filter with different filter coefficients can be used to generate pixel information equal to or less than integer pixels in 1 / 8 pixel units.
[0054] The motion prediction unit can perform motion prediction based on a reference image interpolated by the reference image interpolation unit. Various methods can be used to calculate motion vectors, such as FBMA (Bulk Matching Algorithm Based on Full Search), TSS (Three-Step Search), and NTS (New Three-Step Search). Based on the interpolated pixels, the motion vector can have motion vector values in units of 1 / 2 or 1 / 4 pixels. The motion prediction unit can predict the current prediction unit by changing the motion prediction method. Various methods can be used as motion prediction methods, such as skipping methods, merging methods, Advanced Motion Vector Prediction (AMVP) methods, and intra-block copying methods.
[0055] Intra-frame prediction unit 125 can generate prediction units based on reference pixel information, which serves as pixel information in the current image. Reference pixel information can be derived from one of a plurality of reference pixel lines. The Nth reference pixel line among the plurality of reference pixel lines may include a left pixel whose x-axis difference from the top-left pixel in the current block is N, and a top pixel whose y-axis difference from the top-left pixel is N. The number of reference pixel lines that can be selected from the current block can be 1, 2, 3, or 4.
[0056] When a neighboring block in the current prediction unit is a block performing inter-frame prediction and a corresponding reference pixel is a pixel performing inter-frame prediction, the reference pixel included in the block performing inter-frame prediction can be used by replacing it with the reference pixel information of the neighboring block performing intra-frame prediction. In other words, when a reference pixel is unavailable, the unavailable reference pixel information can be used by replacing it with at least one piece of information from the available reference pixels.
[0057] Intra-frame prediction can have a directional prediction mode that uses reference pixel information based on the prediction direction when performing prediction, and a non-directional mode that does not use directional information. The mode used to predict luminance information can be different from the mode used to predict chrominance information, and chrominance information can be predicted using intra-frame prediction mode information used to predict luminance information or predicted luminance signal information.
[0058] When performing intra-frame prediction, if the size of the prediction unit is the same as the size of the transform unit, the intra-frame prediction of the prediction unit can be performed based on the pixels at the left, top left, and top positions of the prediction unit.
[0059] Intra-frame prediction methods generate prediction blocks after applying a smoothing filter to a reference pixel based on the prediction mode. Whether to apply the smoothing filter depends on the selected reference pixel line.
[0060] To perform intra-prediction, the intra-prediction mode of the current prediction unit can be predicted based on the intra-prediction modes of the surrounding prediction units. When predicting the prediction mode of the current prediction unit using mode information predicted by the surrounding prediction units, if the intra-prediction mode of the current prediction unit is the same as that of the surrounding prediction units, predetermined flag information can be used to transmit the information that the prediction mode of the current prediction unit is the same as that of the surrounding prediction units. If the prediction mode of the current prediction unit is different from that of the surrounding prediction units, entropy coding can be performed to encode the prediction mode information of the current block.
[0061] Furthermore, residual blocks can be generated that include information about residual values, which are the differences between the original blocks in the prediction units that perform predictions based on the prediction units generated in prediction units 120 and 125. The generated residual blocks can be input to the transformation unit 130.
[0062] Transform unit 130 can transform the original block and the residual block, including residual value information from the prediction units generated by prediction units 120 and 125, using transformation methods such as DCT (Discrete Cosine Transform), DST (Discrete Sine Transform), or KLT. The choice between applying DCT, DST, or KLT to transform the residual block can be determined based on at least one of the size of the transform unit, the shape of the transform unit, the prediction mode in the prediction unit, or the intra-frame prediction mode information in the prediction unit. Furthermore, the transformation can be performed by separating the horizontal and vertical directions.
[0063] After performing transformations in the horizontal and vertical directions, a secondary transformation can be performed. The secondary transformation may not separate the horizontal and vertical directions. A secondary transformation can be performed on the transformation coefficients obtained through the primary transformation to generate the final transformation coefficients. Furthermore, the number of final transformation coefficients output by the secondary transformation can be less than the number of transformation coefficients input to the secondary transformation. Specifically, a simplified transformation matrix with a different number of rows and columns can be used to perform the secondary transformation.
[0064] The quantization unit 135 can quantize the values transformed to the frequency domain in the transform unit 130. The quantization coefficients can be changed according to the importance or blocks of the image. The values calculated in the quantization unit 135 can be provided to the dequantization unit 140 and the rearrangement unit 160.
[0065] The rearrangement unit 160 can rearrange the coefficient values of the quantized residual values.
[0066] The rearrangement unit 160 can transform coefficients in the shape of two-dimensional blocks into the shape of one-dimensional vectors using a coefficient scanning method. For example, the rearrangement unit 160 can scan DC coefficients into coefficients in the high-frequency domain using a zigzag scanning method and transform them into the shape of one-dimensional vectors. Depending on the size of the transform unit and the intra-frame prediction mode, instead of zigzag scanning, a vertical scan of coefficients in the shape of two-dimensional blocks along the column direction, a horizontal scan of coefficients in the shape of two-dimensional blocks along the row direction, or a diagonal scan of coefficients in the shape of two-dimensional blocks along the diagonal direction can be used. In other words, the choice of which scanning method—zigzag scanning, vertical scanning, horizontal scanning, or diagonal scanning—to use can be determined based on the size of the transform unit and the intra-frame prediction mode.
[0067] Entropy coding unit 165 can perform entropy coding based on the value calculated by rearrangement unit 160. For example, entropy coding can use various coding methods such as Exponential Golomb, CAVLC (Context Adaptive Variable Length Coding), and CABAC (Context Adaptive Binary Arithmetic Coding).
[0068] Entropy coding unit 165 can encode various information from rearrangement unit 160 and prediction units 120 and 125, such as residual coefficient information and block type information in coding unit, prediction mode information, segmentation unit information, prediction unit information and transmission unit information, motion vector information, reference frame information, block interpolation information, filtering information, etc.
[0069] Entropy coding unit 165 can perform entropy coding on the coefficient values in the coding unit input from rearrangement unit 160.
[0070] Dequantization unit 140 and inverse transform unit 145 dequantize the values quantized in quantization unit 135 and perform inverse transform on the values transformed in transform unit 130. The residual values generated by dequantization unit 140 and inverse transform unit 145 can be combined with prediction units predicted by motion prediction units, motion compensation units, and intra-frame prediction units included in prediction units 120 and 125 to generate reconstructed blocks.
[0071] The filter unit 150 may include at least one of a deblocking filter, an offset correction unit, and an adaptive loop filter (ALF).
[0072] Deblocking filters remove block distortion caused by boundaries between blocks in a reconstructed image. To determine whether to perform deblocking, the number of pixels included in a block's rows or columns can be used to decide whether to apply a deblocking filter to the current block. When applying a deblocking filter to a block, a strong or weak filter can be applied depending on the desired deblocking intensity. Furthermore, when applying a deblocking filter, horizontal and vertical filtering can be configured to be processed in parallel.
[0073] The offset correction unit can correct the offset from the original image on a pixel-by-pixel basis for the image undergoing deblocking. To perform offset correction on a specific image, the region to be offset can be determined after dividing the pixels in the image into a certain number of regions, and the offset can be applied to the corresponding region or by considering the edge information of each pixel.
[0074] Adaptive Loop Filtering (ALF) can be performed based on values obtained by comparing the filtered reconstructed image with the original image. After dividing the pixels in the image into predetermined groups, filtering can be performed group-by-group by determining a filter to be applied to the corresponding group. Information regarding whether to apply ALF can be transmitted per coding unit (CU) for the luminance signal, and the shape and filter coefficients of the ALF filter to be applied can vary for each block. Furthermore, ALF filters of the same shape (fixed shape) can be applied regardless of the characteristics of the block to which the filter is applied.
[0075] The memory 155 can store the reconstructed blocks or images calculated by the filter unit 150, and the stored reconstructed blocks or images can be provided to the prediction units 120 and 125 when performing inter-frame prediction.
[0076] Figure 2 This is a block diagram illustrating an image decoding apparatus according to an embodiment of the present disclosure.
[0077] Reference Figure 2 The image decoding device 200 may include an entropy decoding unit 210, a rearrangement unit 215, a dequantization unit 220, an inverse transform unit 225, prediction units 230 and 235, a filter unit 240, and a memory 245.
[0078] When an image bitstream is input from an image encoding device, the input bitstream can be decoded according to the reverse process of the image encoding device.
[0079] The entropy decoding unit 210 can perform entropy decoding according to a process that is the reverse of the entropy encoding process performed in the entropy encoding unit of the image encoding device. For example, in response to the method performed in the image encoding device, various methods such as Exponential Columbus, CAVLC (Context Adaptive Variable Length Coding), and CABAC (Context Adaptive Binary Arithmetic Coding) can be applied.
[0080] The entropy decoding unit 210 can decode information related to intra-frame prediction and inter-frame prediction performed in the encoding device.
[0081] The rearrangement unit 215 can perform rearrangement based on the method of rearranging the entropy-decoded bitstream in the entropy decoding unit 210 in the encoding unit. Coefficients expressed in one-dimensional vector form can be rearranged by reconstructing them into two-dimensional blocks. The rearrangement unit 215 can receive information related to the coefficient scan performed in the encoding unit and perform rearrangement by performing the scan in reverse order based on the scan order performed in the corresponding encoding unit.
[0082] The dequantization unit 220 can perform dequantization based on the quantization parameters provided from the encoding device and the coefficient values of the rearranged block.
[0083] The inverse transform unit 225 can perform an inverse transform of the transform performed by the transform unit 130 for the result of quantization performed in the image coding device. That is, it can perform at least one of the inverse transforms of a second-order transform or inverse transforms of DCT, DST, and KLT. The inverse transform can be performed based on the transmission unit determined in the image coding device. In the inverse transform unit 225 of the image decoding device, a transform matrix for the second-order inverse transform or a transform technique (e.g., DCT, DST, KLT) for the first-order inverse transform can be determined based on multiple pieces of information such as the prediction method, the size or shape of the current block, the prediction mode, and the intra-frame prediction direction. Alternatively, the information used to determine the transform matrix or transform technique can be explicitly encoded and communicated via a signal.
[0084] Prediction units 230 and 235 can generate prediction blocks based on information related to the generation of prediction blocks provided by entropy decoding unit 210 and pre-decoded block or image information provided by memory 245.
[0085] As described above, when intra-prediction is performed in the same manner as in an image coding device, and the size of the prediction unit is the same as the size of the transform unit, intra-prediction of the prediction unit can be performed based on the pixels at the left, top-left, and top positions of the prediction unit. However, when the size of the prediction unit differs from the size of the transform unit during intra-prediction, intra-prediction can be performed using reference pixels based on the transform unit. Furthermore, N can be used only for the smallest coding unit. Intra-frame prediction with N-segmentation.
[0086] Prediction units 230 and 235 may include a prediction unit determination unit, an inter-frame prediction unit, and an intra-frame prediction unit. The prediction unit determination unit may receive various information input from the entropy decoding unit 210 (such as prediction unit information, prediction mode information of the intra-frame prediction method, motion prediction related information of the inter-frame prediction method, etc.), divide the prediction units in the current coding unit, and determine whether the prediction unit performs inter-frame prediction or intra-frame prediction. The inter-frame prediction unit 230 may perform inter-frame prediction for the current prediction unit by using information provided from the image coding device necessary for inter-frame prediction in the current prediction unit, based on information included in at least one of the previous or subsequent images of the current image including the current prediction unit. Alternatively, inter-frame prediction may be performed based on information about some pre-reconstructed regions in the current image including the current prediction unit.
[0087] To perform inter-frame prediction, the motion prediction method in the prediction units included in the corresponding coding unit can be determined based on the coding unit: skip mode, merge mode, AMVP mode, or intra-block copy mode.
[0088] Intra-prediction unit 235 can generate prediction blocks based on pixel information in the current image. When the prediction unit is a prediction unit that performs intra-prediction, intra-prediction can be performed based on intra-prediction mode information from the prediction unit provided by the image coding device. Intra-prediction unit 235 may include an adaptive intra-smoothing (AIS) filter, a reference pixel interpolation unit, and a DC filter. As part of filtering the reference pixels of the current block, the AIS filter can be applied by determining whether to apply a filter based on the prediction mode in the current prediction unit. By using the prediction mode and AIS filter information from the prediction unit provided by the image coding device, AIS filtering can be performed on the reference pixels of the current block. When the prediction mode of the current block is a mode in which AIS filtering is not performed, the AIS filter may not be applied.
[0089] In the case where the prediction mode in the prediction unit is to perform intra-frame prediction based on pixel values interpolated from reference pixels, the reference pixel interpolation unit can interpolate the reference pixels to generate reference pixels in units equal to or less than integer values. In the case where the prediction mode in the current prediction unit is to generate prediction blocks without interpolating reference pixels, interpolation of reference pixels is not required. When the prediction mode of the current block is DC mode, the DC filter can generate prediction blocks through filtering.
[0090] The reconstructed block or image can be provided to filter unit 240. Filter unit 240 may include a deblocking filter, an offset correction unit, and an ALF.
[0091] Information about whether to apply a deblocking filter to a corresponding block or image can be provided from the image encoding device, as well as information about whether a strong or weak filter is applied when applying the deblocking filter. The deblocking filter information provided by the image encoding device can be used in the image decoding device's deblocking filter, and deblocking filtering for the corresponding block can be performed in the image decoding device.
[0092] The offset correction unit can perform offset correction on the reconstructed image based on the type of offset correction applied to the image during encoding, offset value information, etc.
[0093] The ALF can be applied to the coding unit based on information provided by the coding device, such as whether the ALF is applied and ALF coefficient information. Such ALF information can be provided by including it in a specific parameter set.
[0094] The memory 245 can store reconstructed images or blocks for use as reference images or reference blocks, and provide the reconstructed images to the output unit.
[0095] As described above, in the following embodiments of this disclosure, for ease of description, the term "encoding unit" is used, but it can be a unit that performs both decoding and encoding.
[0096] Furthermore, since the current block represents the block to be encoded / decoded, it can represent a coding tree block (or coding tree unit), a coding block (or coding unit), a transform block (or transform unit), a prediction block (or prediction unit), a block to which a loop filter is applied, etc., depending on the encoding / decoding steps. In this specification, "unit" can refer to a basic unit used to perform a specific encoding / decoding process, and "block" can refer to a pixel array of a predetermined size. Unless otherwise categorized, "block" and "unit" are used interchangeably. For example, in the embodiments described later, it will be understood that coding block and coding unit are used interchangeably.
[0097] Furthermore, the image that includes the current block is called the current image.
[0098] When generating a bitstream, the encoder can perform binary encoding based on context-based arithmetic binary coding (CABAC). In this case, the encoding / decoding of the bitstream can be performed on a unit basis. Specifically, the encoder performs encoding on a unit basis to output bits, and the decoder receives the bits to output units via CABAC.
[0099] Furthermore, a set of repositories can be named a repository string. For example, when the value of the syntax `merge_idx` is 4, the value of `merge_idx` can be binary-coded as 1110. In this case, each of the 1s and 0s represents a repository, and 1110 represents a repository string. In other words, a syntax `merge_idx` with a value of 4 can be represented as a repository string containing 4 repositories.
[0100] Each warehouse that makes up a warehouse string can be identified by a warehouse index. Specifically, the indices can be assigned sequentially from left to right in the warehouse string. As an example, when the warehouse string is 1110, the warehouse assigned index 0 can have a value of 1, the warehouse assigned index 1 can have a value of 1, the warehouse assigned index 2 can have a value of 1, and the warehouse assigned index 3 can have a value of 0.
[0101] At the same time, encoding / decoding of binaries can be performed based on a regular encoding engine or through a bypass encoding engine.
[0102] Figure 3 An example of decoding being performed on a warehouse-by-warehouse basis is shown.
[0103] As shown in the example, the value of the variable `bypassFlag` determines whether the decoding of the repository is performed using a regular encoding engine or a bypass encoding engine. Here, a regular encoding engine can represent an encoding method that uses context information, while a bypass encoding engine can represent an encoding method that does not use context information.
[0104] The variable bypassFlag is an internal variable defined in the encoder and decoder, which indicates whether the module to be encoded / decoded is encoded through the bypass encoding engine.
[0105] Simultaneously, it can be determined whether to use a bypass coding engine for each syntax element or each bin of a syntax element. As an example, when encoding / decoding residual coefficients, the value of the variable `bypassFlag` can be determined based on whether the number of bins encoded via probabilistic coding reaches a threshold (e.g., context coding bins (CCB)). Alternatively, the value of the variable `bypassFlag` can be determined based on the type of syntax element.
[0106] Based on the variable bypassFlag, modules can be encoded / decoded using either a regular encoding engine or a bypass encoding engine. The methods for encoding / decoding modules will be described in detail below.
[0107] In order to encode / decode binaries using CABAC, the probability and encoding engine initialization can be performed.
[0108] The initial probability can be determined based on the slice type and / or bin index. Therefore, the initial probability value (initValue) can be different for each bin index. The initial probability value can be represented as 6 bits.
[0109] When the initial probability value (initValue) is determined, two probability state indices can be derived using the initial probability value. Equations 1 to 7 represent the process of deriving the first probability state index pStateIdx0 and the second probability state index pStateIdx1 using the initial probability value initValue.
[0110] [Equation 1]
[0111]
[0112] [Equation 2]
[0113]
[0114] [Equation 3]
[0115]
[0116] [Equation 4]
[0117]
[0118] [Equation 5]
[0119]
[0120] [Equation 6]
[0121]
[0122] [Equation 7]
[0123]
[0124] The two probability state indices represent the probability that the value of the warehouse is 1 (i.e., the probability of 1 occurring). In other words, the larger the value of the probability state index, the higher the probability that the value of the warehouse is 1.
[0125] The first and second probability state indices differ in the rate at which they update probabilities. For example, when a bin has consecutive input values of 1, the first probability state indices pStateIdx0 are updated to increase rapidly compared to the second probability state indices pStateIdx1. In other words, the second probability state indices pStateIdx1 are updated to increase relatively slowly compared to the first probability state indices pStateIdx0.
[0126] Finally, the probability of 1 is determined by averaging the first probability state index pStateIdx0 and the second probability state index pStateIdx1. Meanwhile, referring to equations 6 and 7, there is a 4-bit difference between the first probability state index pStateIdx0 and the second probability state index pStateIdx1. Therefore, when calculating the average between the first probability state index pStateIdx0 and the second probability state index pStateIdx1, the precision of the two variables can be adjusted equally. As an example, after performing a left shift operation of the first probability state index pStateIdx0 by 4 bits, the average between the shifted first probability state index and the second probability state index pStateIdx1 can be obtained.
[0127] The encoding engine can operate based on the variables ivlCurrRange and ivlOffset. In this case, ivlCurrRange can be initialized to a predefined value (e.g., 510). On the other hand, ivlOffset can be initialized based on information parsed from the bitstream (e.g., 9 bits of information).
[0128] Figure 4 This indicates a decoding method based on a conventional encoding engine.
[0129] To decode a binary data structure, probabilities can be set. This results in a variable `pState` representing the probability state. `pState` can be obtained by averaging the first probability state exponent `pStateIdx0` and the second probability state exponent `pStateIdx1`. Furthermore, to adjust the precision of the two probability state exponents equally, the first probability state exponent `pStateIdx0` can be shifted left by 4 bits to obtain the variable `pState`. The variable `pState` can be represented as a 15-bit positive integer.
[0130] Values with higher probabilities of occurrence, such as 0 and 1, can be designated as the maximum probability sign (MPS), while values with lower probabilities of occurrence can be designated as the minimum probability sign (LPS). Since the value of 0 is either 0 or 1, the sum of the probabilities of occurrence of 0 and 1 can be 1.0.
[0131] The value of MPS can be determined from the variable pState, whether it is 0 or 1. The variable valMps, which indicates whether MPS is 0 or 1, can be derived from Equation 8 below.
[0132] [Equation 8]
[0133]
[0134] The variable pState is represented as a 15-bit positive integer. Therefore, when the value of the variable pState is greater than 16383, valMps can be set to 1. This means that the probability of 1 occurring is higher than the probability of 0 occurring.
[0135] On the other hand, when the value of the variable pState is equal to or less than 16383, the variable valMps can be set to 0. This means that the probability of 0 occurring is higher than the probability of 1 occurring.
[0136] The variable ivlLpsRange represents the range of LPS. The variable ivlLpsRange can be derived from equations 9 and 10 below.
[0137] [Equation 9]
[0138]
[0139] [Equation 10]
[0140]
[0141] The range of MPS ivlMpsRange can be obtained by subtracting the variable ivlLpsRange from the variable ivlCurrRange.
[0142] Therefore, the probability P of MPS occurring is... MPS The probability P of LPS LPS The range ivlCurrRange can be defined as shown in Figure 13.
[0143] In the example shown in Figure 13, the probability of occurrence of MPS and the probability of occurrence of LPS can be defined as in Equation 11.
[0144] [Equation 11]
[0145]
[0146]
[0147] In this case, the sum of the probability of MPS and the probability of LPS can be 1 (i.e., 100%). As an example, assume MPS is 1 (i.e., valMPS is 1) and ivlCurrRange is 200. When P... MPS and P LPS When the values are 140 and 60 respectively, the probability of 1 (i.e., MPS) can be 70%, while the probability of 0 (i.e., LPS) can be 30%.
[0148] Then, the variable ivlOffset is derived from the bitstream, and the variable ivlCurrRange is updated. The variable ivlCurrRange can be updated to the value obtained by subtracting ivlLpsRange from the variable ivlCurrRange, which is the same value as ivlMpsRange.
[0149] Figure 6 An example is shown in which the variable ivlCurrRange is updated to be the same as the variable ivlMpsRange.
[0150] Then, the size of the variable ivlOffset is compared with the size of the variable ivlCurrRange.
[0151] If the variable ivlOffset is greater than or equal to the variable ivlCurrRange, then ivlOffset belongs to the range of LPS (i.e., ivlLpsRange). Otherwise, ivlOffset belongs to the range of MPS (i.e., ivlMpsRange).
[0152] Based on the results, when it is determined that the variable ivlOffset belongs to the LPS segment, setting it to the value of LPS can output the value of bin (i.e., variable binVal). On the other hand, when ivlOffset belongs to the MPS segment, setting it to the value of MPS can output the value of bin (i.e., variable binVal).
[0153] When the variable ivlOffset belongs to the MPS segment, the value of the variable ivlCurrRange remains unchanged. On the other hand, when the variable ivlOffset belongs to the LPS segment, the variable ivlCurrRange can be updated to the variable ivlLpsRange.
[0154] Similarly, the value of the variable ivlOffset can be updated when the variable ivlOffset belongs to the LPS segment.
[0155] After determining the bin value, a probability update is performed. Specifically, the first probability state index pStateIdx0 and the second probability state index pStateIdx1, representing the probability of 1 occurring, can be updated at different rates depending on the value of the decoded bin (i.e., binVal) and a variable adjustment update rate.
[0156] Specifically, the first probability state index pStateIdx0 and the second probability state index pStateIdx1 can be updated at different rates by controlling the first shift variable shift0 and the second shift variable shift1.
[0157] Meanwhile, the first shift index shift0 and the second shift variable shift1 can be derived from equations 12 and 13 below.
[0158] [Equation 12]
[0159]
[0160] [Equation 13]
[0161]
[0162] Additionally, a variable shiftIdx (i.e., a fixed value) can be predefined in the encoder and decoder for each syntax element to be encoded / decoded.
[0163] The first probability state index pStateIdx0 and the second probability state index pStateIdx1 can be updated as shown in Equations 14 and 15 below.
[0164] [Equation 14]
[0165]
[0166] [Equation 15]
[0167]
[0168] After performing the probability update, a renormalization process can be performed.
[0169] Figure 7 This is a flowchart illustrating the renormalization process.
[0170] like Figure 7 The example shown compares the variable ivlCurrRange to a predefined constant 256. When the variable ivlCurrRange is greater than or equal to 256, renormalization is not performed.
[0171] Otherwise, you can update the variables ivlCurrRange and ivlOffset. Figure 7 In this context, read_bits(1) means reading 1 bit from the bit stream and outputting it.
[0172] Figure 8 This indicates the decoding process based on a bypass coding engine.
[0173] like Figure 8 In the example shown, the value of the bin (i.e., binVal) can be determined by setting the values of the variables ivlOffset and ivlCurrRange. When the bin value is 1, the variable ivlCurrRange can be updated to the value obtained by subtracting the variable ivlOffset. On the other hand, when the bin value is 0, the variable ivlCurrRange may not be updated.
[0174] In a bypass coding engine, probability information is not used. In other words, when applying a bypass coding engine, the probability of 0 or 1 occurring is not defined, and the value of the bin can be encoded / decoded. In other words, when using a bypass coding engine, the probability of 0 and the probability of 1 occurring can be set to the same value.
[0175] When using a bypass coding engine, the number of bins is the same as the number of bits.
[0176] Based on its characteristics, the bypass coding engine is used to probabilistically set meaningless information. Furthermore, the bypass coding engine is not primarily designed to improve encoding / decoding efficiency due to entropy coding, but rather primarily designed to improve throughput, i.e., processing speed.
[0177] For each syntax element using a regular encoding engine, the values of the probability state exponent (i.e., pStateIdx0 and pStateIdx1) and the shift exponent (i.e., shiftIdx) can be derived. In other words, for each syntax element to be encoded / decoded, the values of the probability state exponent and the shift exponent can be derived.
[0178] Simultaneously, whenever a repository constituting a syntactic element is encoded / decoded, the probability state index can be updated and stored. In other words, whenever a repository is encoded / decoded, the first probability state index pStateIdx0 and the second probability state index pStateIdx1 can be updated, and the variable pState can also be updated through the updated first probability state index pStateIdx0 and the updated second probability state index pStateIdx1. As the variable pState is updated, the value of the variable valMps can also be updated (see Equation 8), and the variable ivlLpsRange can also be updated through the updated variable valMps (see Equation 10).
[0179] At the same time, the variable ivlCurrRange can be shared across all syntax elements. In other words, a single variable ivlCurrRange can be used regardless of the number of syntax elements being encoded / decoded.
[0180] When following the above method, variables can be updated according to the encoding / decoding order of the blocks.
[0181] Figure 9 The encoding / decoding order between blocks is shown.
[0182] exist Figure 9 The example shown illustrates that an image comprises four CTUs (i.e., CTU0 to CTU3), and each CTU is divided into multiple blocks (i.e., multiple CUs). When raster scanning is applied, the encoding / decoding order of each block can be written in... Figure 9 The numbers on each CU are sorted in ascending order.
[0183] In the following implementation, the syntax to be encoded / decoded will be referred to as the target syntax. Furthermore, it is assumed that the target syntax is encoded / decoded using a conventional encoding engine, and that the target syntax is a flag indicating the on / off state of a specific technology. However, syntax elements encoded / decoded using a conventional encoding engine, as well as flags, can be set as the target syntax.
[0184] Furthermore, it is assumed that the probability and encoding engine are initialized when the image is initially encoded / decoded.
[0185] In other words, the following implementation may involve encoding / decoding the target syntax for each block.
[0186] As an example, the target syntax can be at least one of the following: information for determining the prediction mode at the block level encoding / decoding, information for determining prediction information, information about the residual signal, or information about the loop filter.
[0187] As an example, the implementation methods proposed in this disclosure can be applied to at least one of the following syntactic elements.
[0188] pred_mode_flag: Indicates whether intra-frame prediction mode or inter-frame prediction mode is applied.
[0189] pred_mode_ibc_flag: Information indicating whether intra-block copy mode is applied.
[0190] pred_mode_plt_flag: Information indicating whether palette mode is applied.
[0191] intra_bdpcm_flag: Indicates whether BDPCM is applied.
[0192] intra_mip_flag: Indicates whether MIP is applied.
[0193] intra_ref_idx: Indicates information about the reference sample line.
[0194] MPM_flag: Indicates whether the intra-prediction mode of the current block is derived from the MPM list.
[0195] MPM_idx: Indicates information about one of the multiple MPMs included in the MPM list.
[0196] MPM_remainder: Information indicating the intra prediction mode of the current block in all intra prediction modes other than MPM.
[0197] merge_flag: Indicates whether to apply motion information merging mode information.
[0198] merge_idx: Indicates information about one of the motion information merging candidates.
[0199] mvp_flag: Information about one of the motion vector prediction candidates.
[0200] regular_merge_flag: Indicates whether to apply the regular motion information merging mode.
[0201] mmvd_merge_flag: Information indicating whether MMVD (Merge Mode with MVD) is applied.
[0202] ciip_flag: Indicates whether CIIP (Combined Intra-Inter-Prediction) information is applied.
[0203] merge_sublock_flag: Information indicating whether the subblock cell merge mode is applied.
[0204] inter_affine_flag: Indicates whether affine model information is applied.
[0205] affine_type_flag: Information indicating the number of affine parameters.
[0206] ref_idx: Information indicating the index of the reference image.
[0207] amvr_flag: Indicates whether AMVR (Adaptive Motion Vector Resolution) is applied.
[0208] amvr_precision_idx: Information indicating one of the motion vector resolution candidates.
[0209] bcw_idx: Indicates information about one of the candidates for bidirectional prediction weights.
[0210] coded_block_flag: Information indicating whether the residual coefficients exist.
[0211] cu_sbt_flag: Information indicating whether SBT (subblock transform) is applied.
[0212] lfnst_idx: Indicates whether LFNST (Low-Frequency Inseparable Transform) is applied and provides information about the transform matrix.
[0213] mts_idx: Information indicating the transformation type
[0214] mvd_greaterN_flag: Information indicating whether the absolute value of the motion vector difference is greater than N (N is a natural number, such as 1 or 2).
[0215] mvd_sign_flag: Information indicating the sign of the motion vector difference.
[0216] transform_skip_flag: Indicates whether to skip information about the transform / inverse transform.
[0217] Even for syntax elements not listed above, when encoding / decoding them using a conventional encoding engine, it is believed that the encoding / decoding method according to the following implementation can be applied.
[0218] In order to encode / decode the target syntax of the first block, the initial values of the first probability state index pStateIdx0 and the second probability state index pStateIdx1 used for encoding / decoding the target syntax can be set.
[0219] Then, when the target grammar of the first block is encoded / decoded, the variable pState used to encode / decode the target grammar can be derived using the first probability state index pStateIdx0 and the second probability state index pStateIdx1.
[0220] The variable pState can be used to derive the variables valMps and ivlLpsRange, and the variable ivlCurrRange can be used to derive the variable binVal. The derived variable binVal can then be used to encode / decode the target syntax.
[0221] After encoding / decoding the target syntax of the first block, the first probability state index pStateIdx0 and the second probability state index pStateIdx1 can be updated. As an example, according to the examples in Equations 14 and 15, the first probability state index pStateIdx0 and the second probability state index pStateIdx1 can be updated.
[0222] The target grammar of the second block, encoded / decoded after the first block, can be encoded / decoded. Simultaneously, after encoding / decoding the target grammar of the first block, the updated first probability state index pStateIdx0 and the updated second probability state index pStateIdx1 can be used to encode / decode the target grammar of the second block.
[0223] After encoding / decoding the target grammar of the second block, the first probability state index pStateIdx0 and the second probability state index pStateIdx1 can be updated. The updated first probability state index pStateIdx0 and the updated second probability state index pStateIdx1 can then be used to encode / decode the target grammar of the third block that follows the second block.
[0224] In other words, the target syntax of the Nth block can be encoded / decoded based on the first probability state index pStateIdx0 and the second probability state index pStateIdx1, which are updated after the target syntax of the previous block has been encoded / decoded. Here, the previous block can refer to the (N-1)th block or the block in which the target syntax was last encoded / decoded before the current block.
[0225] As described above, the probabilistic information used for encoding / decoding the target grammar can be updated sequentially according to the decoding order of the blocks. Here, the probabilistic information may include at least one of a first probability state index and a second probability state index.
[0226] Furthermore, after predefining multiple cases, probability information can be managed or stored separately for each case. Then, in the case corresponding to the current block, the target syntax of the current block can be encoded / decoded based on the probability information. Moreover, after encoding / decoding the target syntax, the probability information can be updated only for the case corresponding to the current block.
[0227] Here, multiple cases can be defined by considering at least one neighboring block adjacent to the current block.
[0228] Figure 10 This is an example used to describe multiple situations.
[0229] Multiple cases can be categorized by considering whether the target syntax values of each neighboring block adjacent to the current block (i.e., the top reference block and the left reference block) are the same.
[0230] As an example, the first case represents the case where the target syntax value of each of the top reference block and the left reference block is true (i.e., 1).
[0231] As an example, the second case represents the case where the target syntax of either the top reference block or the left reference block is true, while the target syntax of the other is false (i.e., 0).
[0232] As an example, the third case represents the case where the target syntax value of each of the top reference block and the left reference block is false.
[0233] Probability information can be managed separately for each situation.
[0234] When encoding / decoding the target syntax of the current block, probability information corresponding to the current block can be used.
[0235] As an example, when the target syntax of the top neighboring block of the current block is true, and the target syntax of the left neighboring block of the current block is false, the probability information in the second case can be used to encode / decode the target syntax of the current block.
[0236] Furthermore, after encoding / decoding the target syntax of the current block, the probability information can be updated only for the case corresponding to the current block.
[0237] As an example, when the current block belongs to the second case, the probability information can be updated only for the second case, and the probability information can be left unupdated for the first and third cases.
[0238] Additionally, the variable shiftIdx can be set differently for each situation.
[0239] Depending on the type of the syntax element to be encoded / decoded or the position of the bin within the syntax element, it can be determined whether to use probability information for the corresponding case in multiple cases, or whether to use a single probability information that is not based on case classification.
[0240] At the same time, syntax elements can be encoded / decoded by referencing the updated probability information at a predefined position that was encoded / decoded before the current block, instead of using probability information updated according to the decoding order of the blocks.
[0241] As an example, when encoding / decoding the target syntax of the first block (i.e., the current block) within a coding tree unit, the target syntax of the current block can be encoded / decoded by referencing the updated probability information of the block at a predefined position, rather than referencing the updated probability information of the last block within the previous coding tree unit (i.e., the previous block in the decoding order).
[0242] Here, the block at the predefined location can be a neighboring block adjacent to the current block.
[0243] As an example, in Figure 9 In the example shown, when encoding / decoding the target index of block 27, the updated probability information of block 13, which is adjacent to the top of block 27, or block 21, which is adjacent to the left of block 27, can be referenced.
[0244] Alternatively, one can select one of a number of candidate blocks corresponding to a number of predefined locations, and can reference the updated probability information of the selected candidate block.
[0245] As an example, the probability information of the target grammar for each of the multiple candidate blocks can be inserted as a probability information candidate into the probability information candidate list. Furthermore, a probability information candidate for encoding / decoding the target grammar of the current block can be selected from the multiple probability information candidates included in the probability information candidate list. Based on the selected probability information candidate, the target grammar of the current block can be encoded / decoded.
[0246] Simultaneously, information indicating one of multiple candidate blocks or multiple probability information candidates can be encoded and signaled. This information can be an index indicating one of multiple candidate blocks or an index indicating one of multiple probability information candidates.
[0247] The number of probability information candidates that can be included in the probability information candidate list can be 1, 2, 3, or 4. Furthermore, a candidate block can include at least one of the top neighbor block, the left neighbor block, or the top-left neighbor block. Also, when the number of candidate blocks (or probability information candidates) is 1, the encoding / decoding of information indicating one of the multiple candidate blocks (i.e., the index) can be omitted.
[0248] As an example, when the number of probability information candidates is 2, the probability information candidate list of block 27 may include the updated probability information of block 13, which is adjacent to the top of block 27, and the updated probability information of block 21, which is adjacent to the left of block 27.
[0249] Blocks that are not adjacent to the current block can also be set as candidate blocks.
[0250] At the same time, when updating probability information according to the decoding order, it is sufficient to store only the probability information of the last encoded / decoded block.
[0251] As an example, when encoding / decoding the target grammar of block 27 by referencing the probability information of the block encoded / decoded before block 27 (i.e., block 26), the target grammar of block 27 is encoded / decoded by referencing the updated probability information of block 26. After encoding / decoding the target grammar of block 27, the probability information can be updated, and the updated probability information can be used to encode / decode the target grammar of the next block (i.e., block 28). In other words, the probability information of block 26 is only used to encode / decode the target grammar of block 27, and not to encode / decode the target grammar of blocks after block 27.
[0252] Therefore, the probability information for each block update can be stored using buffers pStateIdx0[idx] and pStateIdx1[idx]. Here, idx represents the block index. Figure 9 In this context, when it is assumed that the number written in each block is the block index, idx can have a value between 1 and 37.
[0253] As an example, pStateIdx0
[26] and pStateIdx1
[26] represent the updated first probability state index and the updated second probability state index of block 26, respectively.
[0254] In other words, the probability information of the last encoded / decoded block can be stored in the buffers pStateIdx0[idx] and pStateIdx1[idx].
[0255] On the other hand, when referencing the probability information of candidate blocks at predefined locations, the probability information of candidate blocks at predefined locations must be stored.
[0256] As an example, when encoding / decoding the target flag of block 27, if one of the top neighbor block (i.e., block 13) and the left neighbor block (i.e., block 21) is selected, the probability information of the top neighbor block (i.e., pStateIdx1
[13] and pStateIdx1
[13] ) and the probability information of the left neighbor block (i.e., pStateIdx1
[21] and pStateIdx1
[21] ) must be stored.
[0257] Therefore, the updated probability information can be configured to be stored for each block.
[0258] In other words, buffers pStateIdx0[idx] and pStateIdx1[idx] can be set for each block, and the probability information of block updates can be stored in the buffer corresponding to the block.
[0259] Furthermore, when updating the probability information of the current block, the probability information of the candidate blocks referenced by the current block can be used. As an example, when encoding / decoding the target syntax of block 27, if the probability information of the top neighboring block (i.e., block 13) is referenced, the probability information can be updated by using the probability information of block 13 after encoding / decoding the target syntax of block 27.
[0260] In other words, equations 14 and 15 can be transformed into equations 16 and 17 as shown below.
[0261] [Equation 16]
[0262]
[0263] [Equation 17]
[0264]
[0265] In equations 16 and 17 above, N represents the index of the current block, and M represents the index of the candidate block referenced by the current block.
[0266] At the same time, when the updated probability information is set to be stored for each block, the buffer size increases.
[0267] To address this issue, the probability information of updating blocks encoded / decoded before the current block can be updated based on candidate blocks, and the target syntax of the current block can be encoded / decoded based on the updated probability information.
[0268] As an example, when encoding / decoding the target syntax for block 27, the updated probability information of block 26, which was encoded / decoded before block 27, can be set as the initial probability information. Then, the initial probability information can be updated by referencing the value of the target syntax for the candidate block.
[0269] As an example, when block 27 is set as a reference to block 13, the initial probability information can be updated based on the value of the target syntax of block 13.
[0270] Then, the target syntax of block 27 can be encoded / decoded using the re-updated probability information. Simultaneously, a re-update can be performed using equations 14 and 15 or equations 16 and 17.
[0271] Alternatively, whenever encoding / decoding of a coding tree unit begins, the probability information for updating the last encoded / decoded block can be updated by using neighboring blocks adjacent to the top boundary of the coding tree unit.
[0272] As an example, when block 27 (the first block within the coding tree unit) is encoded / decoded, the probability information for updating block 26 can be updated again by using the neighboring blocks adjacent to the top boundary of the coding tree unit to which block 27 belongs, namely blocks 16, 15, 14, and 13.
[0273] In this case, the probability information for updating block 26 can be sequentially updated by referring to neighboring blocks adjacent to the top boundary of the coding tree unit in either a left-to-right order (i.e., blocks 13, 14, 15, and 16) or a right-to-left order (i.e., blocks 16, 15, 14, and 13).
[0274] As an example, the probability information for updating block 26 can be updated based on the value of the target syntax in block 16, and the update result can be re-updated based on the value of the target syntax in block 15. Furthermore, the result updated via block 15 can be re-updated based on the value of the target syntax in block 14, and the result updated via block 14 can be re-updated based on the value of the target syntax in block 13.
[0275] The target syntax of block 27 can be encoded / decoded based on probabilistic information obtained through repeated update processes.
[0276] Simultaneously, the initial probability information can be updated by selecting one of several candidate blocks. Alternatively, the initial probability information can be updated by using a block at a predefined location.
[0277] Alternatively, the initial probability information can be updated by sequentially referencing multiple candidate blocks.
[0278] As an example, the updated probability information of block 26 can be set as the initial probability information, and the initial probability information can be updated by referring to the target grammar of the first candidate block. The updated initial probability information is called intermediate probability information. Then, the intermediate probability information can be updated by referring to the target grammar of the second candidate block. Then, the target grammar of block 27 can be encoded / decoded using the final probability information (i.e., the updated intermediate probability information).
[0279] As an example, either the first candidate block or the second candidate block can be the top neighbor block of block 27 (i.e., block 13), and the other can be the left neighbor block of block 27 (i.e., block 21).
[0280] At the same time, prediction information for the current block can be obtained by referring to neighboring blocks adjacent to the current block.
[0281] As an example, when intra-prediction is applied to the current block, it can be determined whether the intra-prediction mode of the current block is encoded / decoded based on the intra-prediction modes of neighboring blocks. When the intra-prediction mode of the current block is the same as the intra-prediction mode of one of a plurality of neighboring blocks, information indicating one of the neighboring blocks can be encoded and signaled. As an example, the index (e.g., MPM_idx) indicating one of the neighboring blocks can be encoded and signaled.
[0282] Simultaneously, when encoding / decoding the target syntax of the current block, updated probability information of neighboring blocks with the same intra-prediction mode as the current block can be referenced. In other words, the target syntax of the current block can be encoded / decoded by referencing updated probability information of neighboring blocks indicated by the index.
[0283] Furthermore, the target syntax can be encoded / decoded later than the syntax for intra-frame predictive coding / decoding or the syntax indicating one of a plurality of neighboring blocks. For example, the target syntax could be information about the residual signal or information about the loop filter.
[0284] Conversely, when there are no neighboring blocks with the same intra-prediction mode as the current block, or when the intra-prediction mode of the current block is encoded / decoded without referencing neighboring blocks, probability information can be used according to a predefined method. Here, the predefined method can refer to one of the following methods described above: a method for using updated probability information of the last encoded / decoded block in the encoding / decoding order, a method for using updated probability information of a block at a predefined position, a method for using updated probability information of one of a plurality of candidate blocks, or a method for re-updating the updated probability information of the last encoded / decoded block.
[0285] Alternatively, when performing inter-frame prediction on the current block, it can be determined whether the motion information of the current block is encoded / decoded based on neighboring blocks. When encoding / decoding the motion information of the current block based on the motion information of one of a plurality of neighboring blocks, information indicating one of the neighboring blocks can be encoded and signaled. As an example, the index indicating one of the neighboring blocks can be encoded and signaled.
[0286] As an example, when applying a motion information merging mode, a merge index (e.g., merge_idx) indicating one of multiple motion information merging candidates can be encoded and signaled. Alternatively, when applying a motion vector prediction mode, an index (e.g., mvp_flag) indicating one of multiple motion vector prediction candidates can be encoded and signaled.
[0287] Simultaneously, when encoding / decoding the target syntax of the current block, the updated probability information of neighboring blocks referenced in deriving the motion information of the current block can be used. In other words, the target syntax of the current block can be encoded / decoded by referencing the updated probability information of neighboring blocks indicated by the index.
[0288] Simultaneously, the target syntax can be encoded / decoded later than the syntax for inter-frame predictive coding / decoding or the syntax indicating one of a plurality of neighboring blocks. As an example, the target syntax could be information about motion vector differences, information about residual signals, or information about loop filters.
[0289] Unlike the above, when encoding / decoding the motion information of the current block without referencing neighboring blocks, probability information can be used according to a predefined method. Here, the predefined method can refer to one of the following methods described above: a method for using updated probability information of the last encoded / decoded block in the encoding / decoding order, a method for using updated probability information of a block at a predefined position, a method for using updated probability information of one of a plurality of candidate blocks, or a method for re-updating the updated probability information of the last encoded / decoded block.
[0290] Meanwhile, among the above-mentioned methods for determining probability information, when the updated probability information of blocks encoded / decoded before the current block is used to encode / decode the target syntax of the current block in encoding / decoding order, it is called the conventional method, and other methods for determining probability information are called improved methods.
[0291] In this scenario, based on the position of the current block, a method for adaptively determining the probabilistic information used to encode / decode the target syntax of the current block can be established. Here, the position of the current block can refer to its location within the current image, slice, tile, or coding tree unit.
[0292] As an example, when the current block is the first block within a coding tree unit, when the current block is adjacent to the top boundary of the coding tree unit, or when the current block is adjacent to the left boundary of the coding tree unit, the target syntax of the current block can be encoded / decoded using probability information determined based on the improved method.
[0293] On the other hand, when the conditions are not met, the target syntax of the current block can be encoded / decoded using probability information determined by conventional methods.
[0294] Meanwhile, in the above implementation, the first probability state index pStateIdx0 and the second probability state index pStateIdx1 can be updated again.
[0295] Alternatively, a re-update can be performed only on one of the first probability state index pStateIdx0 and the second probability state index pStateIdx1. In other words, the first probability state index pStateIdx0 (or the second probability state index pStateIdx1) of blocks encoded / decoded before the current block may not be re-updated, but the updated second probability state index pStateIdx1 (or the first probability state index pStateIdx0) of blocks encoded / decoded before the current block may be re-updated.
[0296] Figure 11 A method for encoding / decoding a target grammar according to an embodiment of the present disclosure is shown.
[0297] In order to encode / decode the target syntax of the current block, probability information S1110 can be determined. The probability information can be determined based on conventional or improved methods.
[0298] When the probability information is determined, the target syntax of the current block can be encoded / decoded based on the probability information S1120.
[0299] After encoding / decoding the target syntax of the current block, the probability information S1130 can be updated again based on the bin value (binVal) of the target syntax.
[0300] Implementations described focusing on the decoding or encoding process, when applied to the encoding or decoding process, are included within the scope of this disclosure. Implementations described in a different order than those described, but in a predetermined order, are also included within the scope of this disclosure.
[0301] The above disclosure has been described based on a series of steps or flowcharts; however, this does not limit the temporal order of the invention, and these steps or flowcharts may be performed simultaneously or in different orders if necessary. Furthermore, each component (e.g., unit, module, etc.) configuring the block diagrams in the above disclosure can be implemented as a hardware device or software, or multiple components can be combined and implemented as a single hardware device or software. As an example, the hardware device may include at least one of a processor for performing operations, a memory for storing data, a transmitter for transmitting data, and a receiver for receiving data.
[0302] The aforementioned disclosure can be implemented in the form of program instructions, which can be executed by various computer components and recorded on a computer-readable storage medium. The computer-readable storage medium can include program instructions, data files, and data structures, either individually or in combination.
[0303] Furthermore, according to this disclosure, a computer-readable recording medium can be provided for storing a bitstream generated by the above-described encoding method. The bitstream can be transmitted by an encoding device, and a decoding device can receive the bitstream to decode an image.
[0304] Examples of computer-readable storage media include all types of hardware devices specifically configured to record and execute program instructions, such as magnetic media like hard disks, floppy disks, and magnetic tapes; optical media like optical disc (CD)-ROMs and digital multifunction discs (DVDs); and magneto-optical media like optical floppy disks, ROMs, RAMs, and flash memory. Hardware devices can be configured to operate as at least one software module to perform processing according to this disclosure, and vice versa.
[0305] Industrial applicability
[0306] This disclosure can be applied to computing or electronic devices that can encode / decode video signals.
Claims
1. A method for decoding an image, comprising: Determine the current probability information; The target syntax of the current block is decoded based on the probability information; as well as Update the current probability information. The method for determining the current probability information varies depending on the position of the current block.
2. The method according to claim 1, wherein, When the current block is not the first block within the coding tree unit, the current probability information is the updated probability information of the last decoded previous block.
3. The method according to claim 2, wherein, When the current block is the first block within the coding tree unit, the current probability information is determined by referring to candidate blocks.
4. The method according to claim 3, wherein, The probability information for updating the candidate block is determined as the current probability information.
5. The method according to claim 3, wherein, The current probability information is derived by updating the probability information of the previous block based on the value of the target syntax of the candidate block.
6. The method according to claim 3, wherein, The candidate block is the top neighbor block or the left neighbor block adjacent to the current block.
7. The method according to claim 3, wherein, The candidate block is a neighboring block referenced in deriving the prediction information of the current block.
8. The method according to claim 3, wherein, The candidate block is one of a plurality of candidate blocks, wherein the candidate block is selected from the plurality of candidate blocks based on an index decoded from the bitstream.
9. A method for encoding an image, comprising: Determine the current probability information; The target syntax of the current block is encoded based on the probability information; as well as Update the current probability information. The method for determining the current probability information varies depending on the position of the current block.
10. The method according to claim 9, wherein, When the current block is not the first block within the coding tree unit, the current probability information is the probability information of the last encoded previous block.
11. The method according to claim 10, wherein, When the current block is the first block within the coding tree unit, the current probability information is determined by referring to candidate blocks.
12. The method according to claim 11, wherein, The probability information for updating the candidate block is determined as the current probability information.
13. The method according to claim 11, wherein, The current probability information is derived by updating the probability information of the previous block based on the value of the target syntax of the candidate block.
14. The method according to claim 11, wherein, The candidate block is the top neighbor block or the left neighbor block adjacent to the current block.
15. A computer-readable recording medium for recording a bitstream generated by an image encoding method, the encoding method comprising: Determine the current probability information; The target syntax of the current block is encoded based on the probability information; as well as Update the current probability information. The method for determining the current probability information varies depending on the position of the current block.