Video decoding method and apparatus
The video decoding method adaptively predicts the number of sines for current blocks and performs sine prediction to enhance coding efficiency and reduce complexity, effectively addressing the challenges of high-resolution video compression.
Patent Information
- Application Number
- JP2024556133
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2022-04-08
- Filing Date
- 2023-01-19
- Publication Date
- 2025-04-11
AI Technical Summary
Current video coding techniques face challenges in efficiently compressing and transmitting high-quality video data, particularly for high-resolution UHD videos and immersive media, due to increased bitrates and computational complexity.
A video decoding method and apparatus that adaptively derive the predicted number of sines for current blocks, perform sine prediction to derive signatures, and generate restored pictures based on residual dual samples, thereby improving coding efficiency and reducing complexity.
The proposed method enhances video coding efficiency by accurately predicting sine values based on block characteristics, reducing computational complexity, and improving the accuracy of sine prediction, leading to better compression performance.
Smart Images

Figure 2025509961000001_ABST
Abstract
Description
[Technical field]
[0001] This document relates to video coding technology, and more particularly to a video decoding method and apparatus for coding video information by predicting the sign of a transform coefficient in a video coding system. [Background technology]
[0002] Recently, the demand for high-resolution, high-quality video / images such as 4K or 8K or higher UHD (Ultra High Definition) video / images is increasing in various fields. As the video / image data has higher resolution and quality, the amount of information or bits transmitted relatively increases compared to existing video / image data, so that when video / image data is transmitted using existing media such as wired or wireless broadband lines or when video / image data is stored using existing storage media, the transmission and storage costs increase.
[0003] In addition, interest and demand for immersive media such as virtual reality (VR), artificial reality (AR) content and holograms has been increasing recently, and the broadcast of videos / images with different image characteristics from real images, such as game images, is increasing.
[0004] Therefore, there is a demand for a highly efficient image compression technology in order to effectively compress and transmit, store, and play back high-resolution, high-quality video / image information having the above-mentioned various characteristics. Summary of the Invention [Problem to be solved by the invention]
[0005] The technical problem of this document is to provide a method and apparatus for improving video / image coding efficiency.
[0006] Another technical problem of this document is to provide a method and apparatus for performing sign prediction for a current block.
[0007] Another technical problem of this document is to provide a method and apparatus for adaptively deriving the number of signatures for signature prediction. [Means for solving the problem]
[0008] According to an embodiment of the present document, a video decoding method is provided, which is performed by a decoding device, comprising the steps of: deriving a predicted sign number of a current block; performing a sign prediction on the current block to derive a sign of a residual coefficient of the predicted sign number; deriving a residual sample of the current block based on the sign; and generating a reconstructed picture based on the residual sample.
[0009] According to another embodiment of the present document, there is provided a decoding device for performing video decoding, the decoding device including a memory and at least one processor coupled to the memory, the at least one processor configured to derive a predicted sign number of a current block, perform a sign prediction on the current block to derive a sign of a residual coefficient of the predicted sign number, derive a residual sample of the current block based on the sign, and generate a reconstructed picture based on the residual sample.
[0010] According to another embodiment of the present document, there is provided a video encoding method performed by an encoding apparatus, the method including the steps of deriving a predicted sign number of a current block, performing sign prediction on the current block to derive a sign of a residual coefficient of the predicted sign number, deriving a residual sample of the current block based on the sign, and encoding video information including residual information of the current block and information on the predicted sign number.
[0011] According to another embodiment of the present document, there is provided a video encoding apparatus, the encoding apparatus including a memory and at least one processor coupled to the memory, the at least one processor configured to derive a predicted sign number of a current block, perform sign prediction on the current block to derive a sign of a residual coefficient of the predicted sign number, derive a residual sample of the current block based on the sign, and encode video information including residual information of the current block and information on the predicted sign number.
[0012] According to another embodiment of the present document, there is provided a digital storage medium, which stores a bitstream including the residual information and information regarding the predicted signature number, encoded by the video encoding method according to the present document.
[0013] According to another embodiment of the present document, there is provided a data transmission method for an image, comprising the steps of: obtaining a bitstream of image information including information on a predicted signature number and residual information of a current block; and transmitting the data including the bitstream of the image information including the information on the predicted signature number and the residual information.
[0014] According to another embodiment of the present document, there is provided an apparatus for transmitting data for an image, the apparatus comprising: at least one processor for obtaining a bitstream of image information including information on a predicted signature number and residual information of a current block; and a transmitter for transmitting the data including the bitstream of the image information including the information on the predicted signature number and the residual information.
[0015] According to this document, the number of predicted signs can be adaptively derived based on the last significant coefficient of the current block, thereby reflecting the characteristics of each block in the image to improve sign prediction accuracy and reduce the complexity for sign prediction to improve coding efficiency.
[0016] According to this document, syntax elements for the number of predicted signs can be signaled separately for intra slices and inter slices, thereby reflecting the characteristics of the image to improve the accuracy of sign prediction and reducing the complexity for sign prediction to improve coding efficiency.
[0017] According to this document, syntax elements for the predicted sign number can be signaled separately for luma blocks and chroma blocks, thereby reflecting the characteristics of the image to improve the accuracy of sign prediction and reducing the complexity for sign prediction to improve coding efficiency.
[0018] According to this document, a syntax element for the number of predicted signs can be signaled in a slice header or picture header, thereby reflecting the characteristics of each slice or picture in the video to improve sign prediction accuracy and reduce the complexity for sign prediction to improve coding efficiency. [Brief description of the drawings]
[0019] [Figure 1]1 illustrates generally an example of a video / image coding system in which embodiments of the present document may be applied; [Diagram 2] FIG. 1 is a diagram illustrating the configuration of a video / image encoding device to which the embodiments of this document can be applied. [Diagram 3] FIG. 1 is a diagram illustrating the configuration of a video / image decoding device to which an embodiment of the present document can be applied. [Figure 4] The quantization is shown in Quantizer for Video / Image Coding Standards. [Diagram 5] 13 shows an exemplary adjacent sample for deriving the cost of a signature combination hypothesis. [Figure 6] An embodiment will be described in which a predicted sign number is derived based on a sign prediction region of an N×N transform block. [Figure 7] 13 exemplarily shows the actual sign prediction area of a 16×4 transform block when the sign prediction area is derived to 8×8. [Figure 8] Illustrated as an example is an 8×8 transform block to which a diagonal scan order is applied. [Figure 9] An embodiment will be described in which, when a specific threshold is 16, a predicted sign number is derived based on a position index of the last significant coefficient in an 8×8 transform block. [Figure 10] An embodiment will be described in which a predicted sign number is derived based on the position index of the last significant coefficient in a 16×4 transform block. [Figure 11] An embodiment will be described in which, when a specific threshold is 64, a predicted sign number is derived based on the position index of the last significant coefficient in an 8×16 transform block. [Figure 12] 1 illustrates a schematic diagram of a video encoding method using an encoding device according to the present document. [Figure 13] 1 illustrates a schematic diagram of an encoding device for performing a video encoding method according to the present document; [Figure 14] 1 illustrates an outline of a video decoding method using a decoding device according to the present document. [Figure 15]1 illustrates a schematic diagram of a decoding device for performing a video decoding method according to the present document. [Figure 16] 1 illustrates an exemplary structural diagram of a content streaming system to which the embodiments of this document are applied. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0020] This document may be modified in various ways and may have various embodiments, and a specific embodiment will be illustrated in the drawings and described in detail. However, this is not intended to limit the embodiments of this document to the specific embodiment. The terms used in this document are merely used to describe a specific embodiment, and are not intended to limit the technical ideas of this document. A singular expression includes a plural expression unless the context clearly indicates otherwise. In this document, the terms "include" or "have" specify the presence of a feature, number, step, operation, component, part, or combination thereof described in the document, and should be understood not to preclude the presence or addition of one or more other features, numbers, steps, operations, components, parts, or combinations thereof.
[0021] Meanwhile, each configuration in the drawings described in this document is illustrated independently for the convenience of explaining the different characteristic functions, and does not mean that each configuration is realized by separate hardware or software. For example, two or more of each configuration may be combined to form one configuration, and one configuration may be divided into multiple configurations. An embodiment in which each configuration is integrated and / or separated is also included in the scope of this document as long as it does not deviate from the essence of this document.
[0022] Hereinafter, preferred embodiments of the present invention will be described in more detail with reference to the accompanying drawings. Hereinafter, the same reference numerals will be used for the same components in the drawings, and duplicated descriptions of the same components may be omitted.
[0023] FIG. 1 illustrates a schematic diagram of an example of a video / image coding system in which embodiments of the present document may be applied.
[0024] As shown in Figure 1, the video / image coding system may include a first device (source device) and a second device (receiving device). The source device may transmit encoded video / image information or data to the receiving device in a file or streaming form via a digital recording medium or a network.
[0025] The source device may comprise a video source, an encoding device, and a sending unit. The receiving device may comprise a receiving unit, a decoding device, and a renderer. The encoding device may be referred to as a video / image encoding device, and the decoding device may be referred to as a video / image decoding device. The transmitter may be included in the encoding device. The receiver may be included in the decoding device. The renderer may comprise a display unit, which may be a separate device or an external component.
[0026] A video source may acquire video / images through a video / image capture, synthesis, or generation process, etc. A video source may include a video / image capture device and / or a video / image generation device. A video / image capture device may include, for example, one or more cameras, a video / image archive containing previously captured video / images, etc. A video / image generation device may include, for example, a computer, a tablet, a smartphone, etc., and may (electronically) generate video / images. For example, a virtual video / image may be generated through a computer, etc., in which case the video / image capture process may be replaced by a process in which the associated data is generated.
[0027] An encoding device can encode an input video / image. The encoding device can perform a series of steps such as prediction, transformation, quantization, etc. for compression and coding efficiency. The encoded data (encoded video / image information) can be output in the form of a bitstream.
[0028] The transmitting unit may transmit the encoded video / image information or data output in the form of a bitstream to a receiving unit of a receiving device via a digital recording medium or a network in the form of a file or streaming. The digital recording medium may include various recording media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. The transmitting unit may include an element for generating a media file through a predetermined file format and may include an element for transmission via a broadcasting / communication network. The receiving unit may receive / extract the bitstream and transmit it to a decoding device.
[0029] The decoding device can decode the video / image by performing a series of steps such as inverse quantization, inverse transformation, prediction, etc., which correspond to the operations of the encoding device.
[0030] The renderer can render the decoded video / images, and the rendered video / images can be displayed via a display unit.
[0031] This document relates to video / image coding. For example, the methods / embodiments disclosed in this document can be applied to methods disclosed in the versatile video coding (VVC) standard, the essential video coding (EVC) standard, the AOMedia Video 1 (AV1) standard, the 2nd generation of audio video coding standard (AVS2), or the next generation video / image coding standard (e.g., H.267 or H.268, etc.).
[0032] In this document, various embodiments relating to video / image coding are presented, which, unless otherwise stated, may also be implemented in combination with each other.
[0033] In this document, a video may refer to a collection of a series of images over time. A picture generally refers to a unit showing one image at a specific time, and a subpicture / slice / tile is a unit that constitutes a part of a picture in coding. A subpicture / slice / tile may include one or more coding tree units (CTUs). A picture may be composed of one or more subpictures / slices / tiles. A picture may be composed of one or more tile groups. A tile group may include one or more tiles. A brick may refer to a rectangular area of a row of CTUs in a tile in a picture. A tile may be partitioned into multiple bricks, and each brick may be composed of one or more rows of CTUs in the tile. A tile that is not partitioned into multiple bricks may also be called a brick. A brick scan may indicate a particular sequential ordering of CTUs partitioning a picture, where the CTUs may be aligned in a brick-CTU raster scan, the bricks in a tile may be aligned contiguously in a raster scan of the bricks of the tile, and the tiles in a picture may be aligned contiguously in a raster scan of the tiles of the picture. A sub-picture may also indicate a rectangular region of one or more slices in a picture. That is, a sub-picture may include one or more slices that collectively cover a rectangular region of a picture. A tile is a particular tile column and a rectangular region of a CTU within the particular tile column. The tile column is a rectangular region of a CTU, where the rectangular region has a height equal to the height of the picture, and a width may be specified by a syntax element in a picture parameter set. The tile row is a rectangular region of a CTU, where the rectangular region has a width equal to the height of the picture, and a height is equal to the height of the picture.A tile scan may indicate a particular sequential ordering of CTUs that partition a picture, and the CTUs may be consecutively aligned in a raster scan of CTUs within a tile, and tiles within a picture may be consecutively aligned in a raster scan of the tiles of the picture. A slice may contain an integer number of bricks of a picture, and the integer number of bricks may be contained in one NAL unit. A slice may consist of a number of complete tiles or may be a continuous sequence of complete bricks of one tile. In this document, tile group and slice may be used interchangeably. For example, in this document, tile group / tile group header may be referred to as slice / slice header.
[0034] A pixel or a pel may refer to the smallest unit that constitutes one picture (or image). A term corresponding to a pixel may be "sample." A sample may generally indicate a pixel or a pixel value, may indicate only a pixel / pixel value of a luma component, or may indicate only a pixel / pixel value of a chroma component.
[0035] A unit may indicate a basic unit of image processing. A unit may include at least one of a specific region of a picture and information related to the region. A unit may include one luma block and two chroma (e.g., cb, cr) blocks. A unit may be used in combination with terms such as block or area, depending on the case. In a general case, an M×N block may include a sample (or sample array) consisting of M columns and N rows, or a set (or array) of transform coefficients.
[0036] In this document, "A or B" can mean "A only," "B only," or "both A and B." In other words, in this document, "A or B" can be interpreted as "A and / or B." For example, in this document, "A, B or C" can mean "A only," "B only," "C only," or "any combination of A, B and C."
[0037] The slash ( / ) and comma used in this document can mean "and / or." For example, "A / B" can mean "A and / or B." This allows "A / B" to mean "A only," "B only," or "both A and B." For example, "A, B, C" can mean "A, B, or C."
[0038] In this document, "at least one of A and B" can mean "A only," "B only," or "both A and B." Also, in this document, the expressions "at least one of A or B" and "at least one of A and / or B" can be interpreted as "at least one of A and B."
[0039] In this document, "at least one of A, B and C" can mean "A only," "B only," "C only," or "any combination of A, B and C." Additionally, "at least one of A, B or C" and "at least one of A, B and / or C" can mean "at least one of A, B and C."
[0040] Furthermore, parentheses used in this document may mean "for example." Specifically, when "prediction (intra prediction)" is displayed, "intra prediction" is proposed as an example of "prediction." In other words, "prediction" in this document is not limited to "intra prediction," and "intra prediction" is proposed as an example of "prediction." Furthermore, when "prediction (i.e., intra prediction)" is displayed, "intra prediction" is proposed as an example of "prediction."
[0041] In this document, technical features described individually in one drawing may be embodied individually or simultaneously.
[0042] The following drawings are created to explain a specific example of the present document. The names of specific devices and names of specific signals / messages / fields described in the drawings are presented for illustrative purposes only, and the technical features of the present document are not limited to the specific names used in the following drawings.
[0043] 2 is a diagram for explaining the configuration of a video / image encoding device to which the embodiments of this document can be applied. Hereinafter, the video encoding device may include an image encoding device.
[0044] As shown in FIG. 2, the encoding device 200 may be configured to include an image partitioner 210, a predictor 220, a residual processor 230, an entropy encoder 240, an adder 250, a filter 260, and a memory 270. The predictor 220 may include an inter predictor 221 and an intra predictor 222. The residual processor 230 may include a transformer 232, a quantizer 233, a dequantizer 234, and an inverse transformer 235. The residual processor 230 may further include a subtractor 231. The adder 250 may be referred to as a reconstructor or a reconstructed block generator. The image division unit 210, the prediction unit 220, the residual processing unit 230, the entropy encoding unit 240, the addition unit 250, and the filtering unit 260 may be configured by one or more hardware components (e.g., an encoder chip set or a processor) according to an embodiment. In addition, the memory 270 may include a decoded picture buffer (DPB) and may be configured by a digital recording medium. The hardware components may further include the memory 270 as an internal / external component.
[0045] The image division unit 210 may divide an input image (or picture, frame) input to the encoding device 200 into one or more processing units. As an example, the processing units may be called coding units (CUs). In this case, the coding units may be recursively divided from a coding tree unit (CTU) or a largest coding unit (LCU) according to a quad-tree binary-tree ternary-tree (QTBTTT) structure. For example, one coding unit may be divided into a plurality of coding units of a deeper depth based on a quad-tree structure, a binary tree structure, and / or a ternary structure. In this case, for example, a quad-tree structure may be applied first, and a binary tree structure and / or a ternary structure may be applied later. Alternatively, a binary tree structure may be applied first. The coding procedure according to this document may be performed based on a final coding unit that is not further divided. In this case, the largest coding unit may be used as the final coding unit immediately based on coding efficiency according to image characteristics, or the coding unit may be recursively divided into coding units of lower depths as necessary, and a coding unit of an optimal size may be used as the final coding unit. Here, the coding procedure may include procedures such as prediction, transformation, and restoration, which will be described later. As another example, the processing unit may further include a prediction unit (PU) or a transform unit (TU). In this case, the prediction unit and the transform unit may each be divided or partitioned from the final coding unit described above.The prediction unit is a unit of sample prediction, and the transform unit is a unit for deriving transform coefficients and / or a unit for deriving a residual signal from the transform coefficients.
[0046] The unit may be used interchangeably with terms such as block or area. In the general case, an M×N block may refer to a set of samples or transform coefficients consisting of M columns and N rows. A sample may generally refer to a pixel or pixel value, may refer to only a pixel / pixel value of a luma component, or may refer to only a pixel / pixel value of a chroma component. A sample may be used as a term corresponding to a pixel or pel of one picture (or image).
[0047] The encoding device 200 may generate a residual signal (residual block, residual sample array) by subtracting a prediction signal (predicted block, prediction sample array) output from the inter prediction unit 221 or the intra prediction unit 222 from an input image signal (original block, original sample array), and the generated residual signal is transmitted to the conversion unit 232. In this case, as illustrated, a unit that subtracts a prediction signal (prediction block, prediction sample array) from an input image signal (original block, original sample array) in the encoder 200 may be called a subtraction unit 231. The prediction unit may perform prediction on a block to be processed (hereinafter, referred to as a current block) and generate a predicted block including a prediction sample for the current block. The prediction unit may determine whether intra prediction or inter prediction is applied in units of the current block or CU. The prediction unit may generate various information related to prediction, such as prediction mode information, and transmit the information to the entropy encoding unit 240, as will be described later in the description of each prediction mode. The prediction information can be encoded by the entropy encoding unit 240 and output in the form of a bitstream.
[0048] The intra prediction unit 222 may predict the current block by referring to samples in the current picture. The referenced samples may be located in the neighborhood of the current block or may be located away from the current block depending on the prediction mode. In the intra prediction, the prediction mode may include a plurality of non-directional modes and a plurality of directional modes. The non-directional mode may include, for example, a DC mode and a planar mode. The directional mode may include, for example, 33 directional prediction modes or 65 directional prediction modes depending on the fineness of the prediction direction. However, this is merely an example, and more or less directional prediction modes may be used depending on the setting. The intra prediction unit 222 may also determine the prediction mode to be applied to the current block using the prediction mode applied to the neighboring block.
[0049] The inter prediction unit 221 may derive a predicted block for a current block based on a reference block (reference sample array) identified by a motion vector on a reference picture. In this case, in order to reduce the amount of motion information transmitted in the inter prediction mode, the motion information may be predicted in units of blocks, sub-blocks, or samples based on the correlation of motion information between a neighboring block and the current block. The motion information may include a motion vector and a reference picture index. The motion information may further include inter prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter prediction, the neighboring block may include a spatial neighboring block present in the current picture and a temporal neighboring block present in the reference picture. The reference picture including the reference block and the reference picture including the temporal neighboring block may be the same or different. The temporal neighboring block may be called a collocated reference block, a collocated CU (colCU), etc., and the reference picture including the temporal neighboring block may be called a collocated picture (colPic). For example, the inter prediction unit 221 may generate information indicating which candidate is used to derive a motion vector and / or a reference picture index of the current block by forming a motion information candidate list based on neighboring blocks. Inter prediction may be performed based on various prediction modes, and for example, in the case of a skip mode and a merge mode, the inter prediction unit 221 may use motion information of a neighboring block as motion information of the current block. In the case of the skip mode, unlike the merge mode, a residual signal may not be transmitted.In the case of a motion vector prediction (MVP) mode, the motion vector of a neighboring block can be used as a motion vector predictor, and the motion vector of the current block can be indicated by signaling the motion vector difference.
[0050] The prediction unit 220 may generate a prediction signal based on various prediction methods described later. For example, the prediction unit may apply intra prediction or inter prediction for prediction of one block, or may simultaneously apply intra prediction and inter prediction. This may be called combined inter and intra prediction (CIIP). The prediction unit may also be based on an intra block copy (IBC) prediction mode or a palette mode for prediction of a block. The IBC prediction mode or palette mode may be used for content image / video coding such as games, for example, screen content coding (SCC). IBC basically performs prediction within a current picture, but may be performed similarly to inter prediction in deriving a reference block within the current picture. That is, IBC may utilize at least one of the inter prediction techniques described in this document. The palette mode may be seen as an example of intra coding or intra prediction. When the palette mode is applied, a sample value within a picture may be signaled based on information regarding a palette table and a palette index.
[0051] The prediction signal generated through the prediction unit (including the inter prediction unit 221 and / or the intra prediction unit 222) may be used to generate a restored signal or may be used to generate a residual signal. The transform unit 232 may generate transform coefficients by applying a transform technique to the residual signal. For example, the transform technique may include at least one of a discrete cosine transform (DCT), a discrete sine transform (DST), a Karhunen-Loeve transform (KLT), a graph-based transform (GBT), or a conditionally non-linear transform (CNT). Here, the GBT refers to a transform obtained from a graph when the relationship information between pixels is expressed as a graph. The CNT refers to a transform obtained based on a prediction signal generated using all previously reconstructed pixels. In addition, the transform process may be applied to pixel blocks having the same square size, or may be applied to non-square, variable-sized blocks.
[0052] The quantizer 233 quantizes the transform coefficients and transmits the quantized transform coefficients to the entropy encoder 240, which may encode the quantized signal (information on the quantized transform coefficients) and output the quantized signal as a bitstream. The information on the quantized transform coefficients may be referred to as residual information. The quantizer 233 may rearrange the quantized transform coefficients in a block form into a one-dimensional vector form based on a coefficient scan order, and may generate information on the quantized transform coefficients based on the quantized transform coefficients in the one-dimensional vector form. The entropy encoder 240 may perform various encoding methods, such as exponential Golomb, context-adaptive variable length coding (CAVLC), and context-adaptive binary arithmetic coding (CABAC). The entropy encoder 240 may encode information required for video / image restoration (e.g., values of syntax elements, etc.) together with or separately from the quantized transform coefficients. The encoded information (e.g., encoded video / image information) may be transmitted or stored in the form of a bitstream in units of network abstraction layer (NAL) units. The video / image information may further include information on various parameter sets, such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). The video / image information may further include general constraint information. Information and / or syntax elements transmitted / signaled from an encoding device to a decoding device in this document may be included in the video / image information. The video / image information may be encoded through the above-mentioned encoding procedure and included in the bitstream.The bitstream may be transmitted via a network or may be stored in a digital recording medium. Here, the network may include a broadcasting network and / or a communication network, and the digital recording medium may include various recording media such as a USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc. A transmitting unit (not shown) for transmitting the signal output from the entropy encoding unit 240 and / or a storing unit (not shown) for storing the signal may be configured as an internal / external element of the encoding device 200, or the transmitting unit may be included in the entropy encoding unit 240.
[0053] The quantized transform coefficients output from the quantizer 233 may be used to generate a prediction signal. For example, a residual signal (residual block or residual sample) may be restored by applying inverse quantization and inverse transform to the quantized transform coefficients via the inverse quantizer 234 and the inverse transformer 235. The adder 250 may generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the reconstructed residual signal to the prediction signal output from the inter prediction unit 221 or the intra prediction unit 222. When there is no residual for the current block, such as when a skip mode is applied, a predicted block may be used as a reconstructed block. The adder 250 may be referred to as a reconstruction unit or a reconstructed block generator. The generated reconstructed signal may be used for intra prediction of the next current block in the current picture, and may also be used for inter prediction of the next picture after filtering, as described below.
[0054] Meanwhile, luma mapping with chroma scaling (LMCS) may be applied during picture encoding and / or reconstruction.
[0055] The filtering unit 260 may apply filtering to the reconstructed signal to improve subjective / objective image quality. For example, the filtering unit 260 may apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture, and may store the modified reconstructed picture in the memory 270, specifically, in the DPB of the memory 270. The various filtering methods may include, for example, deblocking filtering, sample adaptive offset, an adaptive loop filter, a bilateral filter, etc. The filtering unit 260 may generate various information related to filtering and transmit it to the entropy encoding unit 240, as will be described later in relation to each filtering method. The information related to filtering may be encoded by the entropy encoding unit 240 and output in the form of a bitstream.
[0056] The modified reconstructed picture transmitted to the memory 270 may be used as a reference picture in the inter prediction unit 221. When inter prediction is applied through this, the encoding apparatus may avoid prediction mismatch between the encoding apparatus 200 and the decoding apparatus 300, and may also improve encoding efficiency.
[0057] The memory 270DPB may store the modified reconstructed picture to be used as a reference picture in the inter prediction unit 221. The memory 270 may store motion information of a block from which motion information in the current picture is derived (or encoded) and / or motion information of a block in an already reconstructed picture. The stored motion information may be transmitted to the inter prediction unit 221 to be used as motion information of a spatial neighboring block or motion information of a temporal neighboring block. The memory 270 may store reconstructed samples of reconstructed blocks in the current picture and transmit them to the intra prediction unit 222.
[0058] FIG. 3 is a diagram illustrating a schematic configuration of a video / image decoding device to which the embodiments of this document can be applied.
[0059] Referring to FIG. 3, the decoding device 300 may include an entropy decoder 310, a residual processor 320, a predictor 330, an adder 340, a filter 350, and a memory 360. The predictor 330 may include an intra predictor 331 and an inter predictor 332. The residual processor 320 may include a dequantizer 321 and an inverse transformer 321. The entropy decoding unit 310, the residual processor 320, the predictor 330, the adder 340, and the filter 350 may be configured as one hardware component (e.g., a decoder chipset or processor) according to an embodiment. Also, the memory 360 may include a decoded picture buffer (DPB) and may be configured as a digital storage medium. The hardware components may further include a memory 360 as an internal / external component.
[0060] When a bitstream including video / image information is input, the decoding apparatus 300 can restore an image corresponding to a process in which the video / image information is processed by the encoding apparatus of FIG. 2. For example, the decoding apparatus 300 can derive a unit / block based on block division related information obtained from the bitstream. The decoding apparatus 300 can perform decoding using a processing unit applied in the encoding apparatus. Thus, the processing unit of the decoding is, for example, a coding unit, and the coding unit can be divided from a coding tree unit or a maximum coding unit according to a quad tree structure, a binary tree structure, and / or a ternary tree structure. One or more transform units can be derived from the coding unit. Then, the restored image signal decoded and output by the decoding apparatus 300 can be reproduced by a reproduction device.
[0061] The decoding device 300 may receive a signal output from the encoding device of FIG. 2 in the form of a bitstream, and the received signal may be decoded via the entropy decoding unit 310. For example, the entropy decoding unit 310 may derive information (e.g., video / image information) required for image restoration (or picture restoration) by parsing the bitstream. The video / image information may further include information on various parameter sets, such as an adaptation parameter set (APS), a picture parameter set (PPS), a sequence parameter set (SPS), or a video parameter set (VPS). In addition, the video / image information may further include general constraint information. The decoding device may further decode pictures based on information on the parameter set and / or the general constraint information. Signaling / received information and / or syntax elements described later in this document may be decoded via the decoding procedure and obtained from the bitstream. For example, the entropy decoding unit 310 may decode information in a bitstream based on a coding method such as exponential Golomb coding, CAVLC, or CABAC, and output values of syntax elements required for image restoration, quantized values of transform coefficients related to residuals, etc. More specifically, the CABAC entropy decoding method may receive bins corresponding to each syntax element in the bitstream, determine a context model using information on the syntax element to be decoded and decode information on the neighboring and blocks to be decoded, or information on symbols / bins decoded in a previous step, predict the occurrence probability of bins according to the determined context model, and perform arithmetic decoding of the bins to generate symbols corresponding to the values of each syntax element. In this case, the CABAC entropy decoding method may update the context model using information on the decoded symbols / bins for the context model of the next symbol / bin after determining the context model.Among the information decoded by the entropy decoding unit 310, information related to prediction is provided to a prediction unit (inter prediction unit 332 and intra prediction unit 331), and residual values entropy decoded by the entropy decoding unit 310, i.e., quantized transform coefficients and related parameter information, may be input to the residual processing unit 320. The residual processing unit 320 may derive a residual signal (residual block, residual sample, residual sample array). Also, among the information decoded by the entropy decoding unit 310, information related to filtering may be provided to the filtering unit 350. Meanwhile, a receiving unit (not shown) for receiving a signal output from the encoding device may be further configured as an internal / external element of the decoding device 300, or the receiving unit may be a component of the entropy decoding unit 310. Meanwhile, the decoding device according to this document may be called a video / image / picture decoding device, and the decoding device may be divided into an information decoder (video / image / picture information decoder) and a sample decoder (video / image / picture sample decoder). The information decoder may include the entropy decoding unit 310, and the sample decoder may include at least one of the inverse quantization unit 321, the inverse transform unit 322, the addition unit 340, the filtering unit 350, the memory 360, the inter prediction unit 332, and the intra prediction unit 331.
[0062] The inverse quantization unit 321 may inverse quantize the quantized transform coefficients to output transform coefficients. The inverse quantization unit 321 may rearrange the quantized transform coefficients in a two-dimensional block form. In this case, the rearrangement may be performed based on a coefficient scan order performed in the encoding device. The inverse quantization unit 321 may perform inverse quantization on the quantized transform coefficients using a quantization parameter (e.g., quantization step size information) to obtain transform coefficients.
[0063] The inverse transform unit 322 inversely transforms the transform coefficients to obtain a residual signal (residual block, residual sample array).
[0064] The prediction unit may perform prediction on a current block and generate a predicted block including prediction samples for the current block. The prediction unit may determine whether intra prediction or inter prediction is applied to the current block based on information on the prediction output from the entropy decoding unit 310, and may determine a specific intra / inter prediction mode.
[0065] The prediction unit 320 may generate a prediction signal based on various prediction methods described later. For example, the prediction unit may apply intra prediction or inter prediction for prediction of one block, and may simultaneously apply intra prediction and inter prediction. This may be called combined inter and intra prediction (CIIP). In addition, the prediction unit may be based on an intra block copy (IBC) prediction mode or a palette mode for prediction of a block. The IBC prediction mode or palette mode may be used for content image / video coding such as games, for example, screen content coding (SCC). IBC basically performs prediction within a current picture, but may be performed similarly to inter prediction in deriving a reference block within the current picture. That is, IBC may use at least one of the inter prediction techniques described in this document. The palette mode may be seen as an example of intra coding or intra prediction. When the palette mode is applied, information regarding a palette table and a palette index may be included in the video / image information and signaled.
[0066] The intra prediction unit 331 may predict a current block by referring to samples in a current picture. The referenced samples may be located in the neighborhood of the current block or may be located away from the current block depending on a prediction mode. In intra prediction, prediction modes may include a plurality of non-directional modes and a plurality of directional modes. The intra prediction unit 331 may also determine a prediction mode to be applied to the current block using a prediction mode applied to a neighboring block.
[0067] The inter prediction unit 332 may derive a predicted block for the current block based on a reference block (reference sample array) identified by a motion vector on a reference picture. In this case, in order to reduce the amount of motion information transmitted from an inter prediction mode, the motion information may be predicted in units of blocks, sub-blocks, or samples based on correlation of motion information between neighboring blocks and the current block. The motion information may include a motion vector and a reference picture index. The motion information may further include inter prediction direction (L0 prediction, L1 prediction, Bi prediction, etc.) information. In the case of inter prediction, the neighboring blocks may include spatial neighboring blocks present in the current picture and temporal neighboring blocks present in the reference picture. For example, the inter prediction unit 332 may configure a motion information candidate list based on the neighboring blocks and derive a motion vector and / or a reference picture index for the current block based on the received candidate selection information. Inter prediction may be performed based on various prediction modes, and the information regarding the prediction may include information indicating a mode of inter prediction for the current block.
[0068] The adder 340 may generate a reconstructed signal (reconstructed picture, reconstructed block, reconstructed sample array) by adding the acquired residual signal to a prediction signal (predicted block, predicted sample array) output from a prediction unit (including the inter prediction unit 332 and / or the intra prediction unit 331). When there is no residual for a current block, such as when a skip mode is applied, the predicted block may be used as a reconstructed block.
[0069] The adder 340 may be referred to as a reconstruction unit or a reconstruction block generator. The generated reconstruction signal may be used for intra prediction of a next block to be processed in a current picture, and may be output after filtering as described below, or may be used for inter prediction of a next picture.
[0070] Meanwhile, LMCS (luma mapping with chroma scaling) can be applied during the picture decoding process.
[0071] The filtering unit 350 may apply filtering to the reconstructed signal to improve subjective / objective image quality. For example, the filtering unit 350 may apply various filtering methods to the reconstructed picture to generate a modified reconstructed picture, and may transmit the modified reconstructed picture to the memory 360, specifically, to the DPB of the memory 360. The various filtering methods may include, for example, deblocking filtering, sample adaptive offset, an adaptive loop filter, a bilateral filter, etc.
[0072] The (modified) reconstructed picture stored in the DPB of the memory 360 may be used as a reference picture in the inter prediction unit 332. The memory 360 may store motion information of a block from which motion information in the current picture is derived (or decoded) and / or motion information of a block in an already reconstructed picture. The stored motion information may be transmitted to the inter prediction unit 260 to be used as motion information of a spatial neighboring block or motion information of a temporal neighboring block. The memory 360 may store reconstructed samples of reconstructed blocks in the current picture and transmit them to the intra prediction unit 331.
[0073] In this document, the embodiments described for the filtering unit 260, the inter prediction unit 221, and the intra prediction unit 222 of the encoding device 200 can also be applied identically or correspondingly to the filtering unit 350, the inter prediction unit 332, and the intra prediction unit 331 of the decoding device 300, respectively.
[0074] The encoding device and the decoding device may also perform sign prediction for the residual coefficients. For example, the encoding device and the decoding device may predict signs for a limited number of residual coefficients per block, where the block is a CU or TU, and the residual coefficients may also be called transform coefficients.
[0075] For example, if n signatures are predicted for the current block, the encoding device and the decoding device n A cost for each of the n sign combination hypotheses can be calculated, and the sign combination hypothesis with the smallest cost among the sign combination hypotheses can be predicted with the n signatures.
[0076] Meanwhile, for example, the encoding apparatus may determine a predicted sign among the signs of residual coefficients in the current block and predict the determined sign. The encoding apparatus may determine a predicted sign among the signs of residual coefficients in the current block according to RDO decision making.
[0077] Generally, the sign of a transform coefficient having a large value is relatively easy to predict because the sign error of the transform coefficient having a large value has a relatively high influence on a reconstructed block. When determining the predicted sign based on the above-mentioned logic, a sorting based approach can be applied. For example, one method of sorting transform coefficients of a transform block is based on the absolute value of the transform coefficient level. However, in video / image coding standards such as the VVC standard and ECM-2.0, two quantizers are used, so the transform coefficient level does not accurately reflect the quantization. Therefore, sorting on the transform coefficient level cannot obtain optimal performance.
[0078] FIG. 4 shows quantization by a quantizer of a video / image coding standard. The horizontal axis of FIG. 4 represents dequantized coefficients, and the vertical axis represents the level of the dequantized coefficients. Referring to FIG. 4, for the same level value, the dequantized coefficients are different according to two quantizers (Q0 and Q1 in FIG. 7) as follows:
[0079] Case 1: Level = 2, quantizer Q0. Dequantized transform coefficients = 4△ k
[0080] Case 2: Level=2, quantizer Q1. Dequantized transform coefficients=3△ k
[0081] The two cases mentioned above are all level 2, but the dequantized transform coefficients in case 1 (4△ k ) is the dequantized transform coefficient (3△ k ) is larger than the qIdx value (dequantized transform coefficient = qIdx × △ k ) transform coefficient alignment can be performed based on
[0082] The qIdx of the transform coefficient level depends on the DQ state and can be calculated as follows:
[0083]
number
[0084] After the absolute values of the transform coefficient levels of the current block are decoded, the current block may be sorted based on the qIdx value. For example, the transform coefficient with the highest qIdx value may be located at the beginning of the sorted current block. The sign of the first maxNumPredSigns signs in the sorted current block may be predicted, and the remaining signs may be EP coded. That is, the transform coefficients of the current block may be sorted based on the qIdx value, and the n transform coefficients with the largest qIdx value may be determined as transform coefficients to be sign predicted. Here, the current block is a transform block (TB).
[0085] Then, for example, if n (n<=maxNumPredSigns) signatures are predicted for the current block, the encoding device and the decoding device n Using the border-cost measure for each of the sign combination hypotheses, n 2 corresponding to the sign combination hypothesis nIt is possible to perform border reconstructions twice. For example, if n (n<=maxNumPredSigns) signatures are predicted for the current block, then 2 n Simplified border reconstructions can be performed as described below. One reconstruction can be performed for each particular combination of signs for the n residual coefficients. For example, for a particular reconstruction, only the leftmost and topmost pixels of the block can be regenerated by an inverse transform with the addition of a block prediction. The first inverse transform (vertical inverse transform) is completed, but the second inverse transform (horizontal inverse transform) is faster since it only needs to generate the leftmost and topmost pixel output. Also, for example, the number of inverse transform operations performed can be reduced using a "template" system. A template can be defined for an inverse transformed block when the inverse transform is performed assuming the coefficients to be 1 at the coordinates of the coefficients whose signs are predicted. The template-based operation can be performed as follows:
[0086] 1. The inverse transform can be performed by setting one of the coefficients whose sign is predicted to 1 and the remaining coefficients to 0. That is, for the signs of n predicted coefficients, the kth predicted coefficient (k is from 0 to n-1) can be set to 1 and the remaining coefficients can be set to 0 as the template. The block obtained by adding up all n templates can be defined as the first sign combination hypothesis.
[0087] 2. A sign combination hypothesis in which only one sign indicates a negative number can be constructed using the first sign combination hypothesis and each template. In addition, other sign combination hypotheses can be constructed using the already constructed sign combination hypotheses and templates.
[0088] For example, when three signatures are predicted, the storage / restore and template application are as shown in the following table: That is, when three signatures are predicted, the templates and signature combination hypotheses are as shown in the following table:
[0089] [Table 1]
[0090] [Table 2]
[0091] Alternatively, the sign combination hypothesis can be constructed using a Gray code method. That is, the k-th sign combination hypothesis can be constructed from the k-1-th sign combination hypothesis and one of n templates (where k is 1 to n-1). The first sign combination hypothesis (when all signs are positive) can be constructed from the sum of all templates as described above. For example, the storage / restore and template application when four signs are predicted are as shown in the following table. That is, the templates and sign combination hypotheses when four signs are predicted are as shown in the following table.
[0092] [Table 3]
[0093] Referring to Table 3, the boundary reconstruction for the next sign combination hypothesis can start by taking a previous hypothesis that requires only a single predicted sign to be changed to form a desired current hypothesis. This change in sign can then be approximated by doubling and adding / subtracting at the sign combination hypothesis boundary of the template that corresponds to the predicted sign. The approximations disclosed in the above table can only be used for a sign prediction process that is not a final reconstruction process. That is, the approximations are reconstruction values generated for a sign prediction process that is not a reconstruction sample generation process for the current block.
[0094] The cost of the signature combination hypothesis can be calculated as follows:
[0095] There may be a cost associated with each sign combination hypothesis that corresponds to a concept of image continuity at block boundaries, i.e., the cost of a sign combination hypothesis may correspond to a concept of image continuity at block boundaries for that sign combination hypothesis, and a sign prediction may be derived by minimizing the cost.
[0096] FIG. 5 exemplarily illustrates adjacent samples for deriving the cost of a signature combination hypothesis.
[0097] 5 discloses previously restored neighboring pixels, the leftmost pixel and the topmost pixel of the current block for cost calculation. The neighboring pixels may include left neighboring pixels p-2,y and p-1,y and top neighboring pixels px,-2 and px,-1. Here, if the width and height of the current block are W,H, then y is 0 to H-1 and x is 0 to W-1. For example, the cost may be derived as follows:
[0098]
number
[0099] The cost function for deriving the cost can be defined as the sum of absolute second derivatives of the residual domain for the upper row and left column of the current block as shown in the above formula, where R is the reconstructed neighboring pixel, P is the predicted pixel of the current block, and r is the residual hypothesis. Specifically, w is the width of the current block, h is the height of the current block, and R is the residual hypothesis. x、-2 is the upper adjacent pixel at (x, -2), R x、-1 is the upper adjacent pixel at (x, -1), P x、0 is the predicted pixel at (x, 0), r x、0 is the hypothetical residual pixel at (x, 0), R -2、y is the left adjacent pixel at (-2, y), R -1、y is the left adjacent pixel at (-1, y), P 0、y is the predicted pixel at (0, y), r 0、y can represent a hypothetical residual pixel at the (0, y) position. On the other hand, (-R -2 +2R -1 -P0) term can be calculated only once per block, and thereafter, the cost calculation of the sign combination hypothesis can be calculated by subtracting only the residual hypothesis.
[0100] Meanwhile, the sign prediction of the residual coefficients may be applied only partially in the region of the TU. The sign prediction area of the transform block may be performed up to a maximum of 32×32 blocks. For example, the sign of the upper left M×N block of the transform block may be predicted. The values of M and N may be calculated as follows:
[0101]
number
[0102] Here, width may indicate the width of the transform block, and height may indicate the height of the transform block. Also, sign prediction may be applied not only to coefficients after the first transform (e.g., MTS, DCT2, etc.) but also to coefficients after the LFNST mode. Also, to achieve a better gain / complexity trade-off, for example, the signs of up to four (i.e., n=4) transform coefficients may be predicted for one LFNST transform block.
[0103] For each signature to be predicted, the encoding apparatus may search for a signature combination hypothesis with the lowest cost that matches the true values of the signatures already transmitted. Alternatively, for example, initially, no signature residual may be transmitted and a signature combination hypothesis with the lowest cost may simply be searched for. A predicted value of the current signature may be fetched from the searched signature combination hypothesis. That is, for example, the values of the n signatures may be predicted from the signature combination hypothesis with the lowest cost among the signature combination hypotheses.
[0104] If the prediction corresponds to the true value of the code, the sign residual may be transmitted as '0', otherwise it may be transmitted as '1'. That is, if the value of the predicted sign is correct, a syntax element for the sign with a value of 0 may be transmitted, and if the value of the predicted sign is not correct, a syntax element for the sign with a value of 1 may be transmitted. The syntax element may also be referred to as the sign residual.
[0105] The decoding device can parse the coefficients, signs, and sign residuals as part of the parsing process. The sign residuals can be parsed at the end of the TU, at which point the decoding device may know the absolute values of all the coefficients. Thus, the decoding device can determine what signs are predicted, and can determine the context model to use when parsing the sign prediction residual based on the dequantized coefficient values for each predicted sign.
[0106] Also, knowledge of whether the prediction was "correct" or "incorrect" can simply be stored as part of the CU data for the block being parsed - the actual signs of the residual coefficients are not known at this point.
[0107] In the reconstruction process, the decoding apparatus may perform operations similar to those of the encoding apparatus, that is, the decoding apparatus may perform the sign combination hypothesis generation and cost calculation operations for the sign prediction described above.
[0108] For example, for n signatures predicted by the TU, the decoder needs to n A boundary recovery can be performed to determine the cost of the sign combination hypothesis. Then, the actual sign to apply to the residual coefficients with the predicted sign can be determined by an exclusive-or operation of the following values:
[0109] 1.The predicted value of the sign.
[0110] 2. The "correct" or "incorrect" data stored in the CU upon bitstream parsing.
[0111] On the other hand, in each TU in which the sign of a coefficient is “hidden” using an existing sign data hiding mechanism, sign prediction can be performed using only other coefficients by treating the corresponding coefficient (i.e., the coefficient whose sign is hidden) as “not available” in the sign prediction process.
[0112] Meanwhile, the sign prediction may be performed on n transform coefficients as described above. As described above, in the sign prediction, residual coefficients in a transform block are sorted from large to small based on a quantization index (qIdx) value, and signs of n residual coefficients may be predicted from the largest residual coefficient. The n may be determined based on a maxNumPredSigns value signaled at an SPS level. maxNumPredSigns may mean the maximum number of predicted signs that can be predicted in the sign prediction technique. The number of actually predicted signs n may be determined according to the following formula, taking into account the number of non-zero coefficients in a sign prediction area.
[0113]
number
[0114] Here, n represents the number of coefficients to be sign-predicted, numNzCoeffSPArea represents the number of non-zero coefficients in the sign prediction area, and maxNumPredSigns represents the maximum number of predicted signs that can be sign-predicted.
[0115] For n coefficients, each coefficient can be negative or positive. n We can have a sign combination hypothesis of two signs, nThe cost of the sign combination hypotheses may be calculated by performing the above-described simplified boundary restoration on each sign combination hypothesis, and the sign combination hypothesis having the smallest cost may be determined as the optimal sign prediction value.
[0116] Here, the sign prediction area may have a fixed value, or the width (SPAreaWidth) and height (SPAreaHeight) of the sign prediction area may be derived depending on the intraPeriod, QP, resolution, IBC mode, etc. In addition, even if the sign prediction area is derived, the actual sign prediction area may change according to the size of the current block, for example, as shown in the following formula.
[0117]
number
[0118] Here, EffectiveSPAreaWidth may represent the width of the actual sign prediction area of the transform block, TBWidth may represent the width of the transform block, SPAreaWidth may represent the width of the sign prediction area, EffectiveSPAreaHeight may represent the height of the actual sign prediction area of the transform block, TBHeight may represent the height of the transform block, and SPAreaHeight may represent the height of the sign prediction area.
[0119] For example, referring to Equation 5, even if the sign prediction area is determined to be 8×8, the actual sign prediction area of a transform block of 16×4 size can be derived to be 8×4, i.e., EffectiveSPAreaWidth is 8 and EffectiveSPAreaHeight is 4, according to Equation 5.
[0120] However, if sign prediction is performed on the same number of blocks without considering the characteristics of the blocks, computational complexity may increase and coding efficiency may decrease.
[0121] Therefore, this document proposes an embodiment for improving the sign prediction. For example, this document proposes an embodiment for adaptively adjusting a predicted sign number to which sign prediction of residual coding is applied based on the position of the last significant coefficient in the current transform block. For example, as an embodiment, a method is proposed in which different predicted sign numbers are used based on whether the position of the last significant coefficient in the current transform block is within a certain region. Here, for example, the certain region as a criterion for making the predicted sign numbers different can be a size of a certain width and a certain height (ThWidth, ThHeight). That is, a certain critical size can be used as a criterion for making the predicted sign numbers different. Or, for example, the actual sign prediction region (EffectiveSPAreaWidth and EffectiveSPAreaHeight) can be used as a region as a criterion for making the predicted sign numbers different. This document does not limit the method for determining the certain region.
[0122] Figure 6 shows an embodiment of deriving predicted sign numbers based on the sign prediction region of an NxN transform block. For example, as shown in (a) of Figure 6, when the last effective coefficient is located within the actual sign prediction region based on the (0,0) coordinate in the current transform block (i.e., when the x coordinate of the last effective coefficient is less than EffectiveSPAreaWidth and the y coordinate of the last effective coefficient is less than EffectiveSPAreaHeight), the predicted sign numbers of the current transform block can be derived to n1, and as shown in (b) of Figure 6, when the last effective coefficient is located outside the actual sign prediction region, the predicted sign numbers of the current transform block can be derived to n2.
[0123] Specifically, for example, if the sign prediction region is derived to 8×8, the actual sign prediction region of a 16×4 transform block can be derived to 8×4.
[0124] Figure 7 exemplarily illustrates an actual sign prediction region of a 16x4 transform block when the sign prediction region is derived to 8x8. When the actual sign prediction region is derived as in Figure 7, if the last significant coefficient of the current transform block is present within the actual sign prediction region of 8x4, the number of predicted signs can be derived to n1, and if present in another region, the number of predicted signs can be derived to n2.
[0125] Thereafter, the actual predicted sign number can be derived by considering the number of non-zero coefficients in the actual sign prediction area of the current transform block. For example, if the predicted sign number of the current transform block is derived to be n1, it can be derived as follows:
[0126]
number
[0127] Here, n represents the number of actual predicted signs, and numNzCoeffSPArea represents the number of non-zero coefficients in the actual sign prediction area. Referring to Equation 6, when the number of predicted signs of the current transform block is derived to be n1, the smaller value of n1 and the number of non-zero coefficients in the actual sign prediction area can be derived as the number of actual predicted signs of the current transform block.
[0128] Also, for example, if the number of predicted signs of the current transform block is derived to be n2, it can be derived as in the following equation.
[0129]
number
[0130] Here, n represents the number of actual predicted signs, and numNzCoeffSPArea represents the number of non-zero coefficients in the actual sign prediction area. Referring to Equation 7, when the number of predicted signs of the current transform block is derived to be n2, the smaller value of n2 and the number of non-zero coefficients in the actual sign prediction area can be derived as the number of actual predicted signs of the current transform block.
[0131] In the proposed embodiment, different prediction sign numbers are used for transform blocks having different residual characteristics, thereby reducing the complexity of sign prediction while maintaining coding performance. On the other hand, for example, in the case of a block to which LFNST is applied, the proposed embodiment may not be used.
[0132] In addition, as another embodiment, this document proposes an embodiment in which a prediction sign number to which residual coding sign prediction is applied is adaptively adjusted based on a position index of the last significant coefficient in a current transform block. For example, as an embodiment, a method is proposed in which different prediction sign numbers are used based on whether a position index value of the last significant coefficient in a current transform block is within a predetermined threshold.
[0133] FIG. 8 exemplarily illustrates an 8×8 transform block to which a diagonal scan order is applied. For example, when a diagonal scan order is used, the transform block may be divided into coefficient groups (CGs) and scanned in order. For example, referring to FIG. 8, in the case of an 8×8 transform block, the position index of the last significant coefficient may be divided into 4×4 CGs and indexed in the order of the first CG, the second CG, the third CG, and the fourth CG of FIG. 16. That is, each pixel position of the first CG may have a position index of 0 to 15 in the diagonal order, each pixel position of the second CG may have a position index of 16 to 31 in the diagonal order, each pixel position of the third CG may have a position index of 32 to 47 in the diagonal order, and each pixel position of the fourth CG may have a position index of 48 to 63 in the diagonal order.
[0134] For example, based on the (0,0) coordinate in the current transform block, if the position index of the last significant coefficient is less than a specific threshold, the number of predicted signs of the current transform block can be derived to n1, and if the position index of the last significant coefficient is greater than or equal to a specific threshold, the number of predicted signs of the current transform block can be derived to n2.
[0135] FIG. 9 illustrates an embodiment in which a predicted sign number is derived based on a position index of the last significant coefficient in an 8×8 transform block when a specific threshold is 16.
[0136] For example, as shown in (a) of Figure 9, when the position index of the last significant coefficient of the current block is less than 16, i.e., the position index of the last significant coefficient has a value of 0 to 15, the number of prediction signs of the current block can be derived to be n1. As shown in (b) of Figure 9, when the position index of the last significant coefficient of the current block is 16 or more, i.e., the position index of the last significant coefficient has a value of 16 to 63, the number of prediction signs of the current block can be derived to be n2.
[0137] FIG. 10 illustrates an embodiment of deriving the number of predicted signs based on the position index of the last significant coefficient in a 16×4 transform block. FIG. 10 (a) may show a 16×4 transform block with a specific threshold of 16, and FIG. 10 (b) may show a 16×4 transform block with a specific threshold of 64. When the specific threshold is 16 as shown in FIG. 10 (a), if the position index of the last significant coefficient of the current block is less than 16, i.e., the last significant coefficient is located in the first CG having a position index value of 0 to 15, the number of predicted signs of the current block may be derived to n1, and otherwise the number of predicted signs of the current block may be derived to n2. Also, when the specific threshold is 64 as shown in FIG. 10 (b), the number of predicted signs of the current block may be derived to n1 regardless of where the last significant coefficient of the current block is located in the current block.
[0138] FIG. 11 illustrates an embodiment in which a predicted sign number is derived based on a position index of the last significant coefficient in an 8×16 transform block when a specific threshold value is 64.
[0139] 11(a) may show an 8×16 transform block to which a diagonal scan order is applied. For example, when a diagonal scan order is used as shown in FIG 11(a), the 8×16 transform block may be divided into 4×4 coefficient groups (CGs) and indexed in order from the first CG to the eighth CG. That is, each pixel position of the first CG may have a position index from 0 to 15 in diagonal order, each pixel position of the second CG may have a position index from 16 to 31 in diagonal order, each pixel position of the third CG may have a position index from 32 to 47 in diagonal order, each pixel position of the fourth CG may have a position index from 48 to 63 in diagonal order, each pixel position of the fifth CG may have a position index from 64 to 79 in diagonal order, each pixel position of the sixth CG may have a position index from 80 to 95 in diagonal order, each pixel position of the seventh CG may have a position index from 96 to 111 in diagonal order, and each pixel position of the eighth CG may have a position index from 112 to 127 in diagonal order.
[0140] Figure 11(b) may show an 8x16 transform block with a specific threshold value of 64. When the specific threshold value is 64 as shown in Figure 11(b), if the position index of the last significant coefficient of the current block is less than 64, i.e., if the last significant coefficient is located in the CG shown in Figure 11(b) with a position index value of 0 to 63, the number of predicted signs of the current block may be derived to be n1, and otherwise the number of predicted signs of the current block may be derived to be n2.
[0141] Thereafter, the actual predicted sign number may be derived in consideration of the number of non-zero coefficients in the actual sign prediction area of the current transformed block. For example, when the predicted sign number of the current transformed block is derived to be n1, it may be derived as shown in Equation 6. Referring to Equation 6, when the predicted sign number of the current transformed block is derived to be n1, the smaller value of n1 and the number of non-zero coefficients in the actual sign prediction area may be derived as the actual predicted sign number of the current transformed block.
[0142] Also, for example, when the number of predicted signs of the current transform block is derived to n2, it can be derived as shown in Equation 7. Referring to Equation 7, when the number of predicted signs of the current transform block is derived to n2, the smaller value of n2 and the number of non-zero coefficients in the actual sign prediction area can be derived as the actual predicted sign number of the current transform block.
[0143] In the proposed embodiment, different prediction sign numbers are used for transform blocks having different residual characteristics, thereby reducing the complexity of sign prediction while maintaining coding performance. On the other hand, for example, in the case of a block to which LFNST is applied, the proposed embodiment may not be used.
[0144] In addition, as another embodiment, this document proposes a method for signaling the number of signs to be sign predicted in a sign prediction technique of residual coding. Specifically, for example, an embodiment is proposed in which information indicating the number of signs to be sign predicted for intra slices and information indicating the number of signs to be sign predicted for inter slices are separately signaled. Information signaled in a sequence parameter set (SPS) according to this embodiment is as shown in the following table.
[0145] [Table 4]
[0146] Table 4 shows an example of signaling sps_num_pred_signs_intra and sps_num_pred_signs_inter in SPS. sps_num_pred_signs_intra is a syntax element indicating the maximum number of predicted signs that can be sign predicted within a determined sign prediction unit area (e.g., transform block or prediction area) of an intra slice when sign prediction is applied. That is, sps_num_pred_signs_intra may indicate the maximum number of predicted signs that can be sign predicted within a sign prediction unit area (e.g., transform block or prediction area) of an intra slice. Also, sps_num_pred_signs_inter is a syntax element indicating the maximum number of predicted signs that can be sign predicted within a determined sign prediction unit area (e.g., transform block or prediction area) of an inter slice when sign prediction is applied. That is, sps_num_pred_signs_inter may indicate the maximum number of predicted signs that can be sign predicted within an inter-slice sign prediction unit area (e.g., a transform block or a prediction area). For example, if there are non-zero residual coefficients equal to or greater than the maximum number of predicted signs within a unit area, sign prediction may be applied only to residual coefficients equal to or greater than the maximum number of predicted signs signaled in a predetermined order (e.g., a predetermined sort order or scan order).
[0147] Also, for example, a method may be proposed for signaling a syntax element indicating whether sign prediction is enabled in the SPS. The syntax element may be indicated as a sign prediction availability flag. For example, if a syntax element indicating whether sign prediction is enabled in the SPS exists, the proposed syntax elements (sps_num_pred_signs_intra, sps_num_pred_signs_inter) may be subordinate to the syntax element indicating whether sign prediction is enabled. For example, information signaled to the SPS (Sequence Parameter Set) according to this embodiment is as shown in the following table.
[0148] [Table 5]
[0149] Referring to Table 5, a syntax element sps_sign_prediction_enabled_flag indicating whether sign prediction is enabled in the SPS may be signaled. If the value of sps_sign_prediction_enabled_flag is 1, the sps_sign_prediction_enabled_flag may indicate that sign prediction is enabled, and if the value of sps_sign_prediction_enabled_flag is 0, the sps_sign_prediction_enabled_flag may indicate that sign prediction is not enabled. In addition, for example, information indicating the number of signs to be sign predicted for an intra slice (e.g., sps_num_pred_signs_intra) and information indicating the number of signs to be sign predicted for an inter slice (e.g., sps_num_pred_signs_inter) may be signaled only when sps_sign_prediction_enabled_flag is 1, i.e., when sign prediction is activated.
[0150] Meanwhile, for example, the proposed syntax element can be modified into the form of sps_num_pred_signs_intra_minusX and sps_num_pred_signs_inter_minusX. In this case, an encoding apparatus can signal a value obtained by subtracting X from the value of the maximum predicted sign number actually applied to the syntax element, and a decoding apparatus can use a value obtained by adding X to the value of the syntax element after parsing the syntax element as the actual maximum predicted sign number. For example, sps_num_pred_signs_intra_minusX may indicate a value obtained by subtracting X from the maximum predicted sign number capable of sign prediction within a sign prediction unit area (e.g., a transform block or a prediction area) of an intra slice, and sps_num_pred_signs_inter_minusX may indicate a value obtained by subtracting X from the maximum predicted sign number capable of sign prediction within a sign prediction unit area (e.g., a transform block or a prediction area) of an inter slice. The proposed syntax element indicating the predicted signature number can be coded in an n (eg, 4) bit binarization representation of an unsigned integer.
[0151] When the proposed embodiment is applied, instead of using a fixed number of prediction signs for all slices, different numbers of prediction signs can be used according to the characteristics of intra slices and inter slices, thereby improving the coding performance and / or reducing the complexity of the sign prediction technique. In general, since intra slices include a larger amount of residuals than inter slices, it is efficient to distinguish intra slices and inter slices and set different numbers of prediction signs.
[0152] In addition, as another embodiment, this document proposes an embodiment in which information indicating the number of signs predicted for luma blocks and information indicating the number of signs predicted for chroma blocks are signaled separately. Information signaled in the SPS (Sequence Parameter Set) according to this embodiment is as shown in the following table.
[0153] [Table 6]
[0154] Table 6 shows an example of signaling sps_num_pred_signs_luma and sps_num_pred_signs_chroma in SPS. sps_num_pred_signs_luma is a syntax element indicating the maximum predicted sign number that can be sign predicted within a determined sign prediction unit area (e.g., transform block or prediction area) of a luma block when sign prediction is applied. That is, sps_num_pred_signs_luma may indicate the maximum predicted sign number that can be sign predicted within a sign prediction unit area (e.g., transform block or prediction area) of a luma block. Also, sps_num_pred_signs_chroma is a syntax element indicating the maximum predicted sign number that can be sign predicted within a determined sign prediction unit area (e.g., transform block or prediction area) of a chroma block when sign prediction is applied. That is, sps_num_pred_signs_chroma may indicate the maximum predicted sign number that can be sign predicted within a sign prediction unit area (e.g., transform block or prediction area) of a chroma block. For example, if there are non-zero residual coefficients equal to or greater than the maximum predicted sign number in a unit region, sign prediction can be applied only to residual coefficients equal to or greater than the maximum predicted sign number signaled in a predetermined order (e.g., a predetermined sorting order or scanning order).
[0155] Also, for example, a method may be proposed for signaling a syntax element indicating whether sign prediction is enabled in the SPS. The syntax element may be indicated as a sign prediction availability flag. For example, if a syntax element indicating whether sign prediction is enabled in the SPS exists, the proposed syntax elements (sps_num_pred_signs_luma, sps_num_pred_signs_chroma) may be subordinate to the syntax element indicating whether sign prediction is enabled. For example, information signaled to the SPS (Sequence Parameter Set) according to this embodiment is as shown in the following table.
[0156] [Table 7]
[0157] Referring to Table 7, a syntax element sps_sign_prediction_enabled_flag indicating whether sign prediction is enabled in the SPS may be signaled. If the value of sps_sign_prediction_enabled_flag is 1, the sps_sign_prediction_enabled_flag may indicate that sign prediction is enabled, and if the value of sps_sign_prediction_enabled_flag is 0, the sps_sign_prediction_enabled_flag may indicate that sign prediction is not enabled. In addition, for example, information indicating the number of signs to be sign predicted for a luma block (e.g., sps_num_pred_signs_luma) and information indicating the number of signs to be sign predicted for a chroma block (e.g., sps_num_pred_signs_chroma) may be signaled only when sps_sign_prediction_enabled_flag is 1, i.e., when sign prediction is activated.
[0158] Meanwhile, for example, the proposed syntax element can be modified into the form of sps_num_pred_signs_luma_minusX, sps_num_pred_signs_chroma_minusX. In this case, an encoding apparatus can signal a value obtained by subtracting X from the value of the maximum predicted sign number actually applied to the syntax element, and a decoding apparatus can use a value obtained by adding X to the value of the syntax element after parsing the syntax element as the actual maximum predicted sign number. For example, sps_num_pred_signs_luma_minusX may indicate a value obtained by subtracting X from the maximum predicted sign number capable of sign prediction within a sign prediction unit area (e.g., a transform block or a prediction area) of a luma block, and sps_num_pred_signs_chroma_minusX may indicate a value obtained by subtracting X from the maximum predicted sign number capable of sign prediction within a sign prediction unit area (e.g., a transform block or a prediction area) of a chroma block. The proposed syntax element indicating the predicted signature number can be coded in an n (eg, 4) bit binarization representation of an unsigned integer.
[0159] When the proposed embodiment is applied, instead of using a fixed prediction sign number for all blocks, different prediction sign numbers can be used depending on the characteristics of the luma block and chroma block, thereby achieving the effect of improving the coding performance and / or reducing the complexity of the sign prediction technology.
[0160] In addition, as another embodiment, this document proposes a method of signaling the number of signs to be predicted in a sign prediction technique of residual coding in a slice header or a picture header.
[0161] For example, an example of signaling a syntax element indicating the predicted signature number in a slice header is shown in the table below.
[0162] [Table 8]
[0163] sh_num_pred_signs is a syntax element indicating the maximum number of predicted signs that can be predicted by sign prediction in a specified sign prediction unit area (e.g., a transform block or a prediction area) of each slice when sign prediction is applied. That is, sh_num_pred_signs may indicate the maximum number of predicted signs that can be predicted by sign prediction in a sign prediction unit area (e.g., a transform block or a prediction area) of a slice. For example, if there are non-zero residual coefficients equal to or greater than the maximum number of predicted signs in a unit area, sign prediction may be applied only to residual coefficients equal to or greater than the maximum number of predicted signs signaled in a specified order (e.g., a predetermined sorting order or a scan order).
[0164] Also, for example, a method of signaling a syntax element indicating whether sign prediction is enabled in the SPS may be proposed. For example, if a syntax element indicating whether sign prediction is enabled exists in the SPS, the proposed slice header level syntax element (sh_num_pred_signs) may be subordinate to the syntax element indicating whether sign prediction is enabled. For example, information signaled in the slice header (SH) according to this embodiment is as shown in the following table.
[0165] [Table 9]
[0166] For example, information indicating the maximum number of predicted signs capable of sign prediction within a determined sign prediction unit area (e.g., a transform block or a prediction area) of a slice (e.g., sh_num_pred_signs) can be signaled only when sps_sign_prediction_enabled_flag is 1, i.e., when sign prediction is activated.
[0167] In addition, as another embodiment, this document proposes an embodiment in which information indicating the number of signs predicted for luma blocks and information indicating the number of signs predicted for chroma blocks are separately signaled in the slice header. The information signaled in the slice header according to this embodiment is as shown in the following table.
[0168] [Table 10]
[0169] Table 10 shows an example of signaling sh_num_pred_signs_luma and sh_num_pred_signs_chroma in a slice header. sh_num_pred_signs_luma is a syntax element indicating the maximum number of predicted signs that can be sign predicted within a determined sign prediction unit area (e.g., transform block or prediction area) of a luma block of a corresponding slice when sign prediction is applied. That is, sh_num_pred_signs_luma may indicate the maximum number of predicted signs that can be sign predicted within a sign prediction unit area (e.g., transform block or prediction area) of a luma block of a corresponding slice. Also, sh_num_pred_signs_chroma is a syntax element indicating the maximum number of predicted signs that can be sign predicted within a determined sign prediction unit area (e.g., transform block or prediction area) of a chroma block of a corresponding slice when sign prediction is applied. That is, sh_num_pred_signs_chroma may indicate the maximum number of predicted signs that can be sign predicted within a sign prediction unit area (eg, a transform block or a prediction area) of a chroma block of a corresponding slice.
[0170] Also, for example, if there is a syntax element indicating whether sign prediction is enabled in SPS, the proposed slice header level syntax elements (sh_num_pred_signs_luma, sh_num_pred_signs_chroma) may be subordinate to the syntax element indicating whether sign prediction is enabled. For example, information signaled in a slice header (SH) according to this embodiment is as shown in the following table.
[0171] [Table 11]
[0172] For example, information indicating the maximum number of predicted signs that can be sign predicted within a determined sign prediction unit area (e.g., transform block or prediction area) of a luma block of the corresponding slice (e.g., sh_num_pred_signs_luma) and information indicating the maximum number of predicted signs that can be sign predicted within a determined sign prediction unit area (e.g., transform block or prediction area) of a chroma block of the corresponding slice (e.g., sh_num_pred_signs_chroma) can be signaled only when sps_sign_prediction_enabled_flag is 1, i.e., when sign prediction is activated.
[0173] Meanwhile, for example, the proposed syntax element can be modified into the form of sh_num_pred_signs_luma_minusX and sh_num_pred_signs_chroma_minusX. In this case, an encoding apparatus can signal a value obtained by subtracting X from the value of the maximum predicted sign number actually applied to the syntax element, and a decoding apparatus can use a value obtained by adding X to the value of the syntax element after parsing the syntax element as the actual maximum predicted sign number. For example, sh_num_pred_signs_luma_minusX may indicate a value obtained by subtracting X from the maximum predicted sign number capable of sign prediction within a sign prediction unit area (e.g., a transform block or a prediction area) of a luma block of a corresponding slice, and sh_num_pred_signs_chroma_minusX may indicate a value obtained by subtracting X from the maximum predicted sign number capable of sign prediction within a sign prediction unit area (e.g., a transform block or a prediction area) of a chroma block of a corresponding slice. The proposed syntax element indicating the predicted signature number can be coded in an n (eg, 4) bit binarization representation of an unsigned integer.
[0174] When the proposed embodiment is applied, instead of using a fixed number of prediction signs within the entire sequence, different prediction sign numbers can be used on a slice or picture basis, thereby achieving the effect of improving the coding performance and / or reducing the complexity of the sign prediction technology.
[0175] In addition, as another embodiment, this document proposes a method of signaling a sign prediction area in a slice header or a picture header when the number of signs to be predicted in a sign prediction technique of residual coding is signaled in the slice header or the picture header. For example, information indicating the sign prediction area signaled in the slice header (SH) according to this embodiment is as shown in the following table.
[0176] [Table 12]
[0177] For example, Table 12 may show a method of signaling information indicating a sign prediction area in a slice header unit when information indicating the maximum predicted sign number of sign prediction in a slice header unit proposed in this embodiment is signaled. sh_sign_pred_area is a syntax element indicating a unit area to which sign prediction is applied in a transform block. That is, sh_sign_pred_area may indicate a unit area to which sign prediction is applied in a transform block. For example, when the value of sh_sign_pred_area is 4, the sh_sign_pred_area may indicate that a top left 4x4 area in a transform block is a sign prediction area, and when the value of sh_sign_pred_area is 8, the sh_sign_pred_area may indicate that a top left 8x8 area in a transform block is a sign prediction area.
[0178] Also, for example, if there is a syntax element indicating whether sign prediction is enabled in the SPS, the syntax element (sh_sign_pred_area) indicating the proposed sign prediction area may be subordinate to the syntax element indicating whether sign prediction is enabled. For example, information signaled in a slice header (SH) according to this embodiment is as shown in the following table.
[0179] [Table 13]
[0180] For example, information indicating a sign prediction area (eg, sh_sign_pred_area) may be signaled only when sps_sign_prediction_enabled_flag is 1, i.e., when sign prediction is activated.
[0181] Also, for example, an embodiment may be proposed in which the information indicating the predicted sign number and the information indicating the sign prediction area are not separately signaled in the slice header. For example, the proposed syntax element (sh_sign_pred_area) indicating the sign prediction area may be subordinate to the syntax element indicating the predicted sign number. For example, information signaled in the slice header (SH) according to this embodiment is as shown in the following table.
[0182] [Table 14]
[0183] In addition, for example, when information indicating the number of predicted signs of a luma block and information indicating the number of predicted signs of a chroma block are signaled separately at the slice level as in the other embodiment described above, the syntax element indicating the proposed sign prediction area can be signaled dependent thereon.
[0184] Meanwhile, for example, the proposed syntax element can be modified into a form of sh_sign_pred_areaX. In this case, an encoding apparatus can signal a value obtained by subtracting X from an actually applied sign prediction area value to a syntax element, and a decoding apparatus can parse the syntax element and then use a value obtained by adding X to the value of the syntax element as an actual sign prediction area value. For example, sh_sign_pred_areaX can indicate a value obtained by subtracting X from a sign prediction area value in a sign prediction unit area (e.g., a transform block or a prediction area) of a corresponding slice. The proposed syntax element can be coded in an n (e.g., 4)-bit binarization representation of an unsigned integer.
[0185] When the proposed embodiment is applied, instead of using a fixed number of prediction signs within the entire sequence, different sign prediction regions can be used by utilizing the characteristics of the image on a slice or picture basis, thereby achieving the effect of improving the coding performance and / or reducing the complexity of the sign prediction technology.
[0186] FIG 12 is a schematic diagram showing a video encoding method by an encoding device according to the present document. The method disclosed in FIG 12 may be performed by the encoding device disclosed in FIG 2. Specifically, for example, S1200 to S1220 in FIG 12 may be performed by a residual processing unit of the encoding device, and S1230 may be performed by an entropy encoding unit of the encoding device. In addition, although not shown, the process of deriving a prediction sample for the current block may be performed by a prediction unit of the encoding device, and the process of generating a reconstructed sample and a reconstructed picture based on the prediction sample and the residual sample may be performed by an adder of the encoding device.
[0187] The encoding apparatus derives a predicted sign number of a current block (S1200). The encoding apparatus may derive a sign-predicted sign number of the current block. For example, the encoding apparatus may derive the predicted sign number of the current block based on information on the last significant coefficient and / or the predicted sign number of the current block.
[0188] For example, the predicted sign number may be derived based on whether the last significant coefficient of the current block is located in a specific region of the current block. For example, if the last significant coefficient of the current block is located in the specific region, the predicted sign number may be derived to a first value (n1), and if the last significant coefficient of the current block is not located in the specific region, the predicted sign number may be derived to a second value (n2). For example, the specific region is a specific region of a preset size. The preset size is a ThxTh size. Or, for example, the specific region is a valid sign prediction region. The valid sign prediction region may indicate the above-mentioned actual sign prediction region. The valid sign prediction region may be derived based on a sign prediction region and a size of the current block. For example, the sign prediction region is a region of a preset size. Or, for example, the sign prediction region is a region of a size derived based on intraPeriod, QP, resolution, and / or whether an IBC mode is applied to the current block. The width of the valid signature prediction region may be derived as a smaller value of the width of the signature prediction region and the width of the current block, and the height of the valid signature prediction region may be derived as a smaller value of the height of the signature prediction region and the height of the current block. The valid signature prediction region may be derived based on Equation 5 above.
[0189] Alternatively, for example, the predicted sign number may be derived based on whether the position index of the last significant coefficient of the current block is less than a specific threshold. For example, if the last significant coefficient of the current block is less than the specific threshold, the predicted sign number may be derived to a first value (n1), and if the last significant coefficient of the current block is equal to or greater than the specific threshold, the predicted sign number may be derived to a second value (n2). The specific threshold is a preset value. For example, the specific threshold is 16 or 64.
[0190] Alternatively, for example, the encoding apparatus may encode information on a signature prediction number, and the predicted signature number may be derived based on the information on the signature prediction number.
[0191] For example, the information on the sign prediction number may include information indicating a sign prediction number for a transform block of an intra slice and information indicating a sign prediction number for a transform block of an inter slice, and the information on the sign prediction number may be signaled in a sequence parameter set (SPS). The information indicating the sign prediction number for a transform block of an intra slice may indicate the above-mentioned sps_num_pred_signs_intra, and the information indicating the sign prediction number for a transform block of an inter slice may indicate the above-mentioned sps_num_pred_signs_inter. For example, if the current block is a transform block in an intra slice, the predicted sign number of the current block may be derived based on information indicating a sign prediction number for a transform block of an intra slice. Or, for example, if the current block is a transform block in an inter slice, the predicted sign number of the current block may be derived based on information indicating a sign prediction number for a transform block of an inter slice.
[0192] Meanwhile, for example, the information on the sign prediction number may be signaled dependently on a sign prediction available flag indicating whether the sign prediction is available. For example, an encoding apparatus may encode a sign prediction available flag indicating whether the sign prediction is available, and the information on the sign prediction number may be signaled based on the sign prediction available flag indicating that the sign prediction is available. The sign prediction available flag may be signaled in a Sequence Parameter Set (SPS). The sign prediction available flag may indicate the above-mentioned sps_sign_prediction_enabled_flag.
[0193] Alternatively, for example, the information on the sign prediction number may include information indicating a sign prediction number for a luma block and information indicating a sign prediction number for a chroma block, and the information on the sign prediction number may be signaled in a Sequence Parameter Set (SPS). The information indicating the sign prediction number for the luma block may indicate the above-mentioned sps_num_pred_signs_luma, and the information indicating the sign prediction number for the chroma block may indicate the above-mentioned sps_num_pred_signs_chroma. For example, if the current block is a luma block, the predicted sign number of the current block may be derived based on information indicating a sign prediction number for the luma block. Alternatively, for example, if the current block is a chroma block, the predicted sign number of the current block may be derived based on information indicating a sign prediction number for the chroma block.
[0194] Meanwhile, for example, the information on the sign prediction number may be signaled dependently on a sign prediction available flag indicating whether the sign prediction is available. For example, an encoding apparatus may encode a sign prediction available flag indicating whether the sign prediction is available, and the information on the sign prediction number may be signaled based on the sign prediction available flag indicating that the sign prediction is available. The sign prediction available flag may be signaled in a Sequence Parameter Set (SPS). The sign prediction available flag may indicate the above-mentioned sps_sign_prediction_enabled_flag.
[0195] Alternatively, for example, the information on the sign prediction number may be signaled in a slice header, and the information on the sign prediction number may indicate a sign prediction number for a transform block in a slice. The information on the sign prediction number may indicate the above-mentioned sh_num_pred_signs.
[0196] Meanwhile, for example, the information on the sign prediction number may be signaled dependently on a sign prediction available flag indicating whether the sign prediction is available. For example, an encoding apparatus may encode a sign prediction available flag indicating whether the sign prediction is available, and the information on the sign prediction number may be signaled based on the sign prediction available flag indicating that the sign prediction is available. The sign prediction available flag may be signaled in a Sequence Parameter Set (SPS). The sign prediction available flag may indicate the above-mentioned sps_sign_prediction_enabled_flag.
[0197] Alternatively, for example, the information on the sign prediction number may be signaled in a slice header, and the information on the sign prediction number may include information indicating a sign prediction number for a luma block in a slice and information indicating a sign prediction number for a chroma block in the slice. The information indicating the sign prediction number for the luma block may indicate the above-mentioned sh_num_pred_signs_luma, and the information indicating the sign prediction number for the chroma block may indicate the above-mentioned sh_num_pred_signs_chroma. For example, if the current block is a luma block in a current slice, the predicted sign number of the current block in the current slice may be derived based on information indicating the sign prediction number for the luma block. Alternatively, for example, if the current block is a chroma block in a current slice, the predicted sign number of the current block in the current slice may be derived based on information indicating the sign prediction number for the chroma block.
[0198] Meanwhile, for example, the information on the sign prediction number may be signaled dependently on a sign prediction available flag indicating whether the sign prediction is available. For example, an encoding apparatus may encode a sign prediction available flag indicating whether the sign prediction is available, and the information on the sign prediction number may be signaled based on the sign prediction available flag indicating that the sign prediction is available. The sign prediction available flag may be signaled in a Sequence Parameter Set (SPS). The sign prediction available flag may indicate the above-mentioned sps_sign_prediction_enabled_flag.
[0199] Alternatively, for example, the encoding apparatus may encode information on the sign prediction number and information on the sign prediction area, For example, the sign prediction number of the current block may be derived based on the information on the sign prediction number and the information on the sign prediction area.
[0200] For example, the encoding apparatus may encode information on a sign prediction region. The information on the sign prediction region and the information on the sign prediction number may be signaled in a slice header, the information on the sign prediction region may indicate a sign prediction region for a transform block in a slice, and the information on the sign prediction number may indicate a sign prediction number for the transform block.
[0201] Alternatively, for example, the encoding apparatus may encode information on a sign prediction region, and the information on the sign prediction number may be signaled based on a value of the information on the sign prediction region.
[0202] The encoding apparatus performs sign prediction on the current block to derive signs of residual coefficients of the predicted sign number (S1210). The encoding apparatus can predict signs of the residual coefficients of the predicted sign number.
[0203] For example, the encoding apparatus may predict the sign of the residual coefficient by performing the above-mentioned sign prediction process. For example, the encoding apparatus may calculate costs for sign combination hypotheses of the residual coefficient, and predict a sign combination hypothesis having the smallest cost among the sign combination hypotheses as the sign of the residual coefficient. For example, the encoding apparatus may derive a hypothetical reconstruction sample of the current block for the sign combination hypothesis by performing partial inverse transformation and border reconstruction on the sign combination hypothesis, and may calculate a cost for the sign combination hypothesis based on the left adjacent sample and the upper adjacent sample of the current block and the hypothetical reconstruction sample. The cost may be derived based on the above-mentioned Equation 1. Meanwhile, the sign combination hypothesis may also be called a sign combination candidate.
[0204] The encoding apparatus derives a residual sample of the current block based on the sign (S1220). The encoding apparatus may derive a residual sample of the current block based on the sign.
[0205] The encoding apparatus encodes image information including residual information of the current block and information on the predicted signature number (S1230). The encoding apparatus may encode residual information on the residual samples.
[0206] For example, the encoding apparatus may encode residual information of a current block including a syntax element for the predicted sign. For example, the syntax element for the predicted sign may indicate whether the predicted sign is accurate. That is, for example, a target syntax element among the syntax elements may indicate whether a predicted sign of a transform coefficient for the target syntax element is accurate. The syntax element for the predicted sign of a transform coefficient of the current block may indicate the above-mentioned sign residual. Image information may include the residual information.
[0207] Meanwhile, for example, the encoding apparatus may generate and encode prediction mode information for the current block. For example, the prediction mode information may indicate an intra prediction mode or an inter prediction mode applied to the current block. Also, the encoding apparatus may generate and encode prediction related information for motion information of the current block. The motion information may include a motion vector and a reference picture index.
[0208] Also, for example, the encoding apparatus may encode residual information for the residual samples, the residual information including syntax elements for predicted signs of transform coefficients of the current block.
[0209] Also, for example, the encoding apparatus may encode the signature prediction availability flag, information on the predicted signature number, and / or information on the signature prediction area.
[0210] The image information may include prediction mode information, prediction related information, a sign prediction availability flag, information on a predicted sign number, information on a sign prediction area, and / or residual information of the current block. For example, an encoding device may encode the image information and output it in the form of a bitstream.
[0211] Meanwhile, the bitstream including the video information can be transmitted to the decoding device via a network or a (digital) storage medium, where the network can include a broadcasting network and / or a communication network, and the digital storage medium can include various storage media such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, etc.
[0212] FIG 13 is a schematic diagram of an encoding device for performing a video encoding method according to the present document. The method disclosed in FIG 12 can be performed by the encoding device disclosed in FIG 13. Specifically, for example, a residual processing unit of the encoding device of FIG 13 can perform S1200 to S1220, and an entropy encoding unit of the encoding device can perform S1230. Although not shown, a process of generating reconstructed samples and reconstructed pictures based on the residual samples and predicted samples can be performed by an adder of the encoding device.
[0213] Figure 14 illustrates an image decoding method by a decoding device according to the present document. The method disclosed in Figure 14 may be performed by the decoding device disclosed in Figure 3. Specifically, for example, S1400 to S1430 in Figure 14 may be performed by a residual processing unit of the decoding device. Also, although not shown, a process of obtaining image information including prediction related information and residual information for the current block through a bitstream may be performed by an entropy decoding unit of the decoding device, and a process of deriving the prediction sample for the current block based on the prediction related information may be performed by a prediction unit of the decoding device.
[0214] A decoding apparatus derives a predicted sign number of a current block (S1400). The decoding apparatus may derive a sign-predicted sign number of the current block. For example, the decoding apparatus may derive the predicted sign number of the current block based on information on the last significant coefficient and / or the predicted sign number of the current block.
[0215] For example, the predicted sign number may be derived based on whether the last significant coefficient of the current block is located in a specific region of the current block. For example, if the last significant coefficient of the current block is located in the specific region, the predicted sign number may be derived to a first value (n1), and if the last significant coefficient of the current block is not located in the specific region, the predicted sign number may be derived to a second value (n2). For example, the specific region is a specific region of a preset size. The preset size is a ThxTh size. Or, for example, the specific region is a valid sign prediction region. The valid sign prediction region may indicate the above-mentioned actual sign prediction region. The valid sign prediction region may be derived based on a sign prediction region and a size of the current block. For example, the sign prediction region is a region of a preset size. Or, for example, the sign prediction region is a region of a size derived based on intraPeriod, QP, resolution, and / or whether an IBC mode is applied to the current block. The width of the valid signature prediction region may be derived as a smaller value of the width of the signature prediction region and the width of the current block, and the height of the valid signature prediction region may be derived as a smaller value of the height of the signature prediction region and the height of the current block. The valid signature prediction region may be derived based on Equation 5 above.
[0216] Alternatively, for example, the predicted sign number may be derived based on whether the position index of the last significant coefficient of the current block is less than a specific threshold. For example, if the last significant coefficient of the current block is less than the specific threshold, the predicted sign number may be derived to a first value (n1), and if the last significant coefficient of the current block is equal to or greater than the specific threshold, the predicted sign number may be derived to a second value (n2). The specific threshold is a preset value. For example, the specific threshold is 16 or 64.
[0217] Alternatively, for example, the decoding apparatus may obtain information on the sign prediction number via a bitstream, and the predicted sign number may be derived based on the information on the sign prediction number.
[0218] For example, the information on the sign prediction number may include information indicating a sign prediction number for a transform block of an intra slice and information indicating a sign prediction number for a transform block of an inter slice, and the information on the sign prediction number may be signaled in a sequence parameter set (SPS). The information indicating the sign prediction number for a transform block of an intra slice may indicate the above-mentioned sps_num_pred_signs_intra, and the information indicating the sign prediction number for a transform block of an inter slice may indicate the above-mentioned sps_num_pred_signs_inter. For example, if the current block is a transform block in an intra slice, the predicted sign number of the current block may be derived based on information indicating a sign prediction number for a transform block of an intra slice. Or, for example, if the current block is a transform block in an inter slice, the predicted sign number of the current block may be derived based on information indicating a sign prediction number for a transform block of an inter slice.
[0219] Meanwhile, for example, the information on the sign prediction number may be signaled dependently on a sign prediction available flag indicating whether the sign prediction is available. For example, a decoding apparatus may obtain a sign prediction available flag indicating whether the sign prediction is available through a bitstream, and the information on the sign prediction number may be signaled based on the sign prediction available flag indicating that the sign prediction is available. The sign prediction available flag may be signaled in a Sequence Parameter Set (SPS). The sign prediction available flag may indicate the above-mentioned sps_sign_prediction_enabled_flag.
[0220] Alternatively, for example, the information on the sign prediction number may include information indicating a sign prediction number for a luma block and information indicating a sign prediction number for a chroma block, and the information on the sign prediction number may be signaled in a Sequence Parameter Set (SPS). The information indicating the sign prediction number for the luma block may indicate the above-mentioned sps_num_pred_signs_luma, and the information indicating the sign prediction number for the chroma block may indicate the above-mentioned sps_num_pred_signs_chroma. For example, if the current block is a luma block, the predicted sign number of the current block may be derived based on information indicating a sign prediction number for the luma block. Alternatively, for example, if the current block is a chroma block, the predicted sign number of the current block may be derived based on information indicating a sign prediction number for the chroma block.
[0221] Meanwhile, for example, the information on the sign prediction number may be signaled dependently on a sign prediction available flag indicating whether the sign prediction is available. For example, a decoding apparatus may obtain a sign prediction available flag indicating whether the sign prediction is available through a bitstream, and the information on the sign prediction number may be signaled based on the sign prediction available flag indicating that the sign prediction is available. The sign prediction available flag may be signaled in a Sequence Parameter Set (SPS). The sign prediction available flag may indicate the above-mentioned sps_sign_prediction_enabled_flag.
[0222] Alternatively, for example, the information on the sign prediction number may be signaled in a slice header, and the information on the sign prediction number may indicate a sign prediction number for a transform block in a slice. The information on the sign prediction number may indicate the above-mentioned sh_num_pred_signs.
[0223] Meanwhile, for example, the information on the sign prediction number may be signaled dependently on a sign prediction available flag indicating whether the sign prediction is available. For example, a decoding apparatus may obtain a sign prediction available flag indicating whether the sign prediction is available through a bitstream, and the information on the sign prediction number may be signaled based on the sign prediction available flag indicating that the sign prediction is available. The sign prediction available flag may be signaled in a Sequence Parameter Set (SPS). The sign prediction available flag may indicate the above-mentioned sps_sign_prediction_enabled_flag.
[0224] Alternatively, for example, the information on the sign prediction number may be signaled in a slice header, and the information on the sign prediction number may include information indicating a sign prediction number for a luma block in a slice and information indicating a sign prediction number for a chroma block in the slice. The information indicating the sign prediction number for the luma block may indicate the above-mentioned sh_num_pred_signs_luma, and the information indicating the sign prediction number for the chroma block may indicate the above-mentioned sh_num_pred_signs_chroma. For example, if the current block is a luma block in a current slice, the predicted sign number of the current block in the current slice may be derived based on information indicating the sign prediction number for the luma block. Alternatively, for example, if the current block is a chroma block in a current slice, the predicted sign number of the current block in the current slice may be derived based on information indicating the sign prediction number for the chroma block.
[0225] Meanwhile, for example, the information on the sign prediction number may be signaled dependently on a sign prediction available flag indicating whether the sign prediction is available. For example, a decoding apparatus may obtain a sign prediction available flag indicating whether the sign prediction is available through a bitstream, and the information on the sign prediction number may be signaled based on the sign prediction available flag indicating that the sign prediction is available. The sign prediction available flag may be signaled in a Sequence Parameter Set (SPS). The sign prediction available flag may indicate the above-mentioned sps_sign_prediction_enabled_flag.
[0226] Alternatively, for example, the decoding apparatus may obtain information on the sign prediction number and information on the sign prediction area, For example, the sign prediction number of the current block may be derived based on the information on the sign prediction number and the information on the sign prediction area.
[0227] For example, the decoding apparatus may obtain information on a sign prediction region through a bitstream. The information on the sign prediction region and the information on the sign prediction number may be signaled in a slice header, the information on the sign prediction region may indicate a sign prediction region for a transform block in a slice, and the information on the sign prediction number may indicate a sign prediction number for the transform block.
[0228] Alternatively, for example, the decoding apparatus may obtain information on a sign prediction region via a bitstream, and the information on the sign prediction number may be signaled based on a value of the information on the sign prediction region.
[0229] The decoding apparatus performs sign prediction on the current block to derive signs of residual coefficients of the predicted sign number (S1410). The decoding apparatus can predict signs of the residual coefficients of the predicted sign number.
[0230] For example, the decoding apparatus may predict the sign of the residual coefficient by performing the above-mentioned sign prediction process. For example, the decoding apparatus may calculate costs for sign combination hypotheses of the residual coefficients, and predict a sign combination hypothesis having the smallest cost among the sign combination hypotheses as the sign of the residual coefficient. For example, the decoding apparatus may derive a hypothetical reconstruction sample of the current block for the sign combination hypothesis by performing partial inverse transformation and border reconstruction on the sign combination hypothesis, and may calculate a cost for the sign combination hypothesis based on the left adjacent sample and the upper adjacent sample of the current block and the hypothetical reconstruction sample. The cost may be derived according to Equation 1 above. Meanwhile, the sign combination hypothesis may also be called a sign combination candidate.
[0231] The decoding apparatus derives a residual sample of the current block based on the sign (S1420). The decoding apparatus can derive a residual sample of the current block based on the sign.
[0232] For example, the decoding apparatus may determine whether the predicted signature is correct based on a syntax element for the predicted signature, and may derive a signature of a residual coefficient based on a result of the determination. For example, the decoding apparatus may obtain residual information of the current block, and the residual information may include a syntax element for the predicted signature. For example, the syntax element for the predicted signature may indicate whether the predicted signature is correct. That is, for example, a target syntax element among the syntax elements may indicate whether a predicted signature for the target syntax element is correct. For example, if a target syntax element indicates that a predicted signature for the target syntax element is correct, the decoding apparatus may determine that the predicted signature is correct, and may derive the predicted signature as a signature of a specific residual coefficient for the predicted signature. Or, for example, if a target syntax element indicates that a predicted signature for the target syntax element is not accurate, the decoding apparatus may determine that the predicted signature is not accurate and derive a sign opposite to the predicted signature to the sign of a specific residual coefficient for the predicted signature. That is, for example, if a target syntax element indicates that a predicted signature for the target syntax element is not accurate, if the predicted signature is a positive number, the sign of a specific residual coefficient for the predicted signature may be derived to a negative number, and if the predicted signature is a negative number, the sign of a specific residual coefficient for the predicted signature may be derived to a positive number. The syntax element for the predicted signature of a specific residual coefficient of the current block may indicate the above-mentioned sign residual.
[0233] Thereafter, for example, the decoding device can derive an absolute value of the residual coefficient based on the residual information of the current block, and can derive a residual sample for the residual coefficient based on the derived sign for the residual coefficient and the absolute value.
[0234] The decoding apparatus generates a reconstructed picture based on the residual samples (S1430). For example, the decoding apparatus may generate a reconstructed picture based on the residual samples.
[0235] Meanwhile, for example, the decoding apparatus may derive a prediction sample by performing an inter prediction mode or an intra prediction mode for the current block based on prediction mode information acquired through a bitstream, and may generate the reconstructed picture by adding the prediction sample and the residual sample. For example, the decoding apparatus may derive an intra prediction mode for the current block based on prediction mode information, may derive a prediction sample of the current block based on the intra prediction mode, and may generate a reconstructed sample and a reconstructed picture by adding the prediction sample and the residual sample. Alternatively, for example, the decoding apparatus may determine that inter prediction is applied to the current block based on prediction mode information, may derive motion information of the current block based on prediction related information for the current block, may derive a reference block in a reference picture based on the motion information, may derive a prediction sample of the current block based on the reference block, and may generate a reconstructed sample and a reconstructed picture by adding the prediction sample and the residual sample. As mentioned above, thereafter, if necessary, in-loop filtering procedures such as deblocking filtering, SAO and / or ALF procedures may be applied to the reconstructed samples to improve the subjective / objective image quality.
[0236] Meanwhile, for example, a decoding device may obtain image information of the current block through a bitstream. The image information may include information on a prediction sign number, information on a sign prediction area, a sign prediction availability flag, prediction mode information of the current block, and / or residual information. The residual information may include syntax elements for predicted signs of transform coefficients of the current block.
[0237] Figure 15 is a schematic diagram of a decoding device for performing a video decoding method according to the present document. The method disclosed in Figure 14 can be performed by the decoding device disclosed in Figure 15. Specifically, for example, the residual processing unit of the decoding device of Figure 15 can perform S1400 to S1420 of Figure 14, and the adder of the decoding device of Figure 15 can perform S1430 of Figure 14.
[0238] According to the above-mentioned document, the number of predicted signs can be adaptively derived based on the last significant coefficient of the current block, thereby reflecting the characteristics of each block in the image to improve the accuracy of sign prediction, and the complexity for sign prediction can be reduced to improve coding efficiency.
[0239] In addition, according to this document, syntax elements for the number of predicted signs can be signaled separately for intra slices and inter slices, thereby reflecting the characteristics of the image to improve the accuracy of sign prediction and reducing the complexity for sign prediction to improve coding efficiency.
[0240] In addition, according to this document, syntax elements for predicted sign numbers can be signaled separately for luma blocks and chroma blocks, thereby reflecting image characteristics to improve sign prediction accuracy and reducing complexity for sign prediction to improve coding efficiency.
[0241] In addition, according to this document, a syntax element for the number of predicted signs can be signaled in a slice header or picture header, thereby reflecting the characteristics of each slice or picture in the image to improve sign prediction accuracy and reduce the complexity for sign prediction to improve coding efficiency.
[0242] In the above-described embodiments, the method is described with reference to a flow chart with a series of steps or blocks, but this document is not limited to the order of steps, and certain steps may occur in a different order or simultaneously with other steps than those described above. Also, those skilled in the art will understand that the steps shown in the flow chart are not exclusive, and other steps may be included, or one or more steps of the flow chart may be deleted without affecting the scope of this document.
[0243] The embodiments described in this document may be implemented and executed on a processor, a microprocessor, a controller, or a chip. For example, the functional units illustrated in the drawings may be implemented and executed on a computer, a processor, a microprocessor, a controller, or a chip. In this case, information (e.g., information on instructions) or algorithms for implementation may be stored in a digital recording medium.
[0244] In addition, the decoding device and encoding device to which the embodiment of this document is applied may be included in a multimedia broadcast transmitting / receiving device, a mobile communication terminal, a home cinema video device, a digital cinema video device, a surveillance camera, a video interactive device, a real-time communication device such as video communication, a mobile streaming device, a storage medium, a camcorder, a custom video (video on demand, VoD) service providing device, an OTT video (Over the top video) device, an Internet streaming service providing device, a three-dimensional (3D) video device, an image telephone video device, a vehicle terminal (e.g., a vehicle terminal, an airplane terminal, a ship terminal, etc.), and a medical video device, and may be used to process a video signal or a data signal. For example, the OTT video (Over the top video) device may include a game console, a Blu-ray player, an Internet-connected TV, a home theater system, a smartphone, a tablet PC, a DVR (Digital Video Recorder), etc.
[0245] In addition, the processing method to which the embodiments of this document are applied may be produced in the form of a program executed by a computer and may be stored in a computer-readable recording medium. Multimedia data having a data structure according to this document may also be stored in a computer-readable recording medium. The computer-readable recording medium includes all kinds of storage devices and distributed storage devices in which computer-readable data is stored. The computer-readable recording medium may include, for example, a Blu-ray Disc (BD), a Universal Serial Bus (USB), a ROM, a PROM, an EPROM, an EEPROM, a RAM, a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device. The computer-readable recording medium may also include a medium realized in the form of a carrier wave (e.g., transmission via the Internet). In addition, a bit stream generated by the encoding method may be stored in a computer-readable recording medium or transmitted via a wired or wireless communication network.
[0246] Furthermore, the embodiments of the present document may be embodied in a computer program product having program code, the program code being executable by a computer in accordance with the embodiments of the present document. The program code may be stored on a computer readable carrier.
[0247] FIG. 16 exemplarily illustrates a structural diagram of a content streaming system to which the embodiments of this document are applied.
[0248] A content streaming system to which the embodiments of this document are applied can broadly include an encoding server, a streaming server, a web server, a media repository, a user device, and a multimedia input device.
[0249] The encoding server compresses content input from a multimedia input device such as a smartphone, camera, camcorder, etc. into digital data to generate a bitstream and transmits the bitstream to the streaming server. As another example, if a multimedia input device such as a smartphone, camera, camcorder, etc. directly generates a bitstream, the encoding server may be omitted.
[0250] The bitstream may be generated by an encoding method or a bitstream generation method to which an embodiment of this document is applied, and the streaming server may temporarily store the bitstream in the process of transmitting or receiving the bitstream.
[0251] The streaming server transmits multimedia data to a user device based on a user request via a web server, and the web server acts as an intermediary to inform the user of available services. When a user requests a desired service from the web server, the web server transmits the request to the streaming server, and the streaming server transmits multimedia data to the user. In this case, the content streaming system may include a separate control server, and in this case, the control server controls commands / responses between devices in the content streaming system.
[0252] The streaming server may receive content from a media repository and / or an encoding server. For example, when the content is received from the encoding server, the content may be received in real time. In this case, the streaming server may store the bitstream for a certain period of time in order to provide a smooth streaming service.
[0253] Examples of the user devices include mobile phones, smartphones, laptop computers, digital broadcasting terminals, personal digital assistants (PDAs), portable multimedia players (PMPs), navigation systems, slate PCs, tablet PCs, ultrabooks, wearable devices (e.g., smartwatches, smart glass, head mounted displays (HMDs)), digital TVs, desktop computers, digital signage, etc. Each server in the content streaming system can be operated as a distributed server, and in this case, data received by each server can be processed in a distributed manner.
[0254] The claims described herein may be combined in various ways. For example, the technical features of the method claims herein may be combined and embodied in an apparatus, and the technical features of the apparatus claims herein may be combined and embodied in a method. Also, the technical features of the method claims herein and the technical features of the apparatus claims herein may be combined and embodied in an apparatus, and the technical features of the method claims herein and the technical features of the apparatus claims herein may be combined and embodied in a method.
Claims
1. 1. A video decoding method performed by a decoding device, comprising: deriving a predicted number of signatures for the current block; performing a sign prediction on the current block to derive signs of residual coefficients of the predicted sign number; deriving a residual sample of the current block based on the sign; generating a reconstructed picture based on the residual samples.
2. 2. The method of claim 1, wherein the number of predicted signs is derived based on whether a last significant coefficient of the current block is located in a particular area of the current block.
3. The image decoding method of claim 2, wherein the specific region is a valid signature prediction region of the current block.
4. The method of claim 1, wherein the predicted sign number is derived based on whether a position index of a last significant coefficient of the current block is less than a certain threshold.
5. The method further includes obtaining information about a sign prediction number via a bitstream; The method of claim 1, wherein the predicted signature number is derived based on information about the signature prediction number.
6. The information on the sign prediction number includes information indicating a sign prediction number for a transform block of an intra slice and information indicating a sign prediction number for a transform block of an inter slice, 6. The method of claim 5, wherein the information on the sign prediction factor is signaled in a sequence parameter set (SPS).
7. obtaining a sign prediction available flag indicating whether the sign prediction is available via a bitstream; 7. The method of claim 6, wherein the information on the number of sign predictions is signaled based on the sign prediction availability flag indicating that the sign prediction is available.
8. The information on the sign prediction number includes information indicating a sign prediction number for a luma block and information indicating a sign prediction number for a chroma block, 6. The method of claim 5, wherein the information on the sign prediction factor is signaled in a sequence parameter set (SPS).
9. The information on the sign prediction number is signaled in a slice header, 6. The method of claim 5, wherein the information on the sign prediction factor indicates a sign prediction factor for a transform block in a slice.
10. The information on the sign prediction number is signaled in a slice header, 6. The image decoding method of claim 5, wherein the information on the sign prediction number includes information indicating a sign prediction number for a luma block in a slice and information indicating a sign prediction number for a chroma block in the slice.
11. The method further includes obtaining information about a sign prediction region through a bitstream, The information on the sign prediction area and the information on the sign prediction number are signaled in a slice header; 6. The image decoding method of claim 5, wherein the information on the sign prediction area indicates a sign prediction area for a transform block in a slice, and the information on the sign prediction number indicates a sign prediction number for the transform block.
12. 10. The method of claim 9, wherein the information on the sign prediction number is signaled based on a value of information on the sign prediction area.
13. 1. A video encoding method performed by an encoding device, comprising: deriving a predicted number of signatures for the current block; performing sign prediction on the current block to derive signs of residual coefficients of the predicted sign number; deriving a residual sample of the current block based on the sign; encoding image information including residual information of the current block and information regarding the predicted signature number.
14. A digital storage medium, on which a bitstream including the residual information and information regarding the predicted signature number encoded by the video encoding method of claim 13 is stored.
15. In a method of transmitting data for video, obtaining a bitstream of video information including information on a predicted signature number and residual information of a current block; transmitting the data including the bitstream of the video information including information on the predicted signature number and the residual information.