Method and apparatus for video encoding and decoding
By employing processing circuits in video encoding and decoding to decode the current transform coefficients of the transform block, and utilizing the symbol map of the one-dimensional transform skip mode for entropy encoding and decoding, the intra prediction direction coding efficiency that is unlikely in the prior art is solved It reduces the problem and improves the efficiency and compression rate of video encoding.
Patent Information
- Application Number
- CN202180006620.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2021-06-04
- Filing Date
- 2021-08-05
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2041-08-05
AI Technical Summary
Existing video coding techniques have limitations in reducing redundancy and improving compression rates, especially when dealing with unlikely intra prediction directions, resulting in reduced coding efficiency.
During the video encoding and decoding process, the processing circuit is used to decode the current transform coefficient in the transform block based on the decoded symbol value of the previous transform coefficient, and the symbol map of the one-dimensional transform skip mode is used for entropy encoding and decoding, combined with the context design to Improve coding efficiency.
Improves the efficiency of video encoding and decoding, especially when dealing with unlikely prediction directions, reducing the number of bits and improving compression rate and encoding quality.
Smart Images

Figure CN114930852B_ABST
Abstract
Description
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims the benefit of priority to U.S. patent application No. 17 / 339,516, filed on June 4, 2021, entitled “METHOD AND APPARATUS FOR VIDEOCODING,” which claims the benefit of priority to U.S. Provisional Application No. 63 / 086,280, filed on October 1, 2020, entitled “CONTEXT DESIGN FOR ENTROPY CODING SIGN MAP FOR ONE-DIMENSIONAL TRANSFORM SKIP,” the entire contents of which are incorporated herein by reference. Technical Field
[0003] This application describes embodiments generally related to video encoding and decoding. Background Art
[0004] The background description provided herein is intended to generally introduce the background of the present disclosure. Within the scope of the background description, the works of the currently named inventors and the aspects of the description that may not belong to the prior art at the time of filing are neither explicitly nor implicitly admitted as prior art to the present disclosure.
[0005] Video encoding and decoding can be performed using inter-picture prediction with motion compensation. Uncompressed digital video can include a series of pictures, each picture having a spatial dimension of, for example, 1920x1080 luma samples and associated chroma samples. The series of pictures can have a fixed or variable picture rate (also informally referred to as a frame rate) of, for example, 60 pictures per second or 60Hz. Uncompressed video has specific bit rate requirements. For example, 1080p604:2:0 video with 8 bits per sample (a luma sample resolution of 1920x1080 at a 60Hz frame rate) requires a bandwidth of nearly 1.5Gbit / s. One hour of such video requires more than 600GB of storage space.
[0006] One purpose of video encoding and decoding can be to reduce redundancy in the input video signal through compression. Compression can help reduce the above-mentioned bandwidth and / or storage space requirements, in some cases by two orders of magnitude or more. Lossless compression and lossy compression, as well as combinations thereof, can be used. Lossless compression refers to a technique that can reconstruct an exact copy of the original signal from the compressed original signal. When lossy compression is used, the reconstructed signal may be different from the original signal, but the distortion between the original signal and the reconstructed signal is small enough to make the reconstructed signal usable for the intended application. In the case of video, lossy compression is widely used. The amount of tolerable distortion depends on the application, for example, users of certain consumer streaming applications can tolerate higher distortion than users of television distribution applications. The achievable compression rate can reflect that higher tolerable / acceptable distortion can produce higher compression rates.
[0007] Video encoders and decoders may utilize a variety of broad categories of techniques including, for example: motion compensation, transforms, quantization, and entropy coding.
[0008] Video codec techniques may include a technique known as intra-coding. In intra-coding, sample values are represented without reference to samples or other data from previously reconstructed reference pictures. In some video codecs, pictures are spatially subdivided into blocks of samples. When all blocks of samples are encoded in intra-mode, the picture may be an intra-picture. Intra-pictures and their derivatives (such as independent decoder refresh pictures) can be used to reset the decoder state, and can therefore be used as the first picture in a coded video bitstream and video session, or as a still image. The samples of the intra-block can be transformed, and the transform coefficients can be quantized before entropy coding. Intra-prediction can be a technique for minimizing sample values in the pre-transform domain. In some cases, the smaller the DC value after the transform and the smaller the AC coefficient, the fewer bits are needed to represent the entropy-coded block at a given quantization step size.
[0009] Conventional intra-frame coding, such as is known from, for example, MPEG-2 generation coding techniques, does not use intra-frame prediction. However, some newer video compression techniques include techniques that attempt to extract information from, for example, surrounding sample data and / or metadata that is obtained during encoding and / or decoding of spatially adjacent and preceding data blocks in decoding order. Such techniques are hereinafter referred to as "intra-frame prediction" techniques. Note that, at least in some cases, intra-frame prediction uses only reference data from the current picture being reconstructed, and not reference data from reference pictures.
[0010] Intra-frame prediction can take many different forms. When more than one such technique can be used in a given video coding technique, the technique in use can be encoded in an intra-frame prediction mode. In some cases, a mode can have sub-modes and / or parameters, and these sub-modes and / or parameters can be encoded separately or included in a mode codeword. Which codeword is used for a given mode, sub-mode and / or parameter combination may have an impact on the coding efficiency gain through intra-frame prediction, and therefore, the entropy coding technique used to convert the codeword into a bitstream can also have an impact on it.
[0011] H.264 introduced some kind of intra prediction mode, which was improved in H.265 and further improved in new coding techniques such as Joint Exploration Model (JEM), Versatile Video Coding (VVC), Benchmark Set (BMS). The predictor block can be formed using neighboring sample values belonging to already available samples. The sample values of neighboring samples are copied to the predictor block according to the direction. The reference to the used direction can be encoded in the bitstream, or it can be predicted itself.
[0012] Referring to FIG. 1A , depicted at the bottom right is a subset of 9 predictor directions known from the 33 possible predictor directions of H.265 (corresponding to the 33 angular modes in the 35 intra modes). The point (101) where the arrows converge represents the sample being predicted. The arrows represent the direction of the sample being predicted. For example, arrow (102) indicates that sample (101) is predicted from one or more samples in the upper right direction at a 45 degree angle to the horizontal. Similarly, arrow (103) indicates that sample (101) is predicted from one or more samples in the lower left direction of sample (101) at a 22.5 degree angle to the horizontal.
[0013] Still referring to FIG. 1A , a square block (104) of 4x4 samples is depicted in the upper left corner (indicated by the bold dashed line). The square block (104) contains 16 samples, each of which is labeled with an "S" and its position in the Y dimension (e.g., row index) and its position in the X dimension (e.g., column index). For example, sample S21 is the second sample in the Y dimension (from the top) and the first sample in the X dimension (from the left). Similarly, sample S44 is the fourth sample in the block (104) in both the Y and X dimensions. Since the size of the block is 4x4 samples, S44 is in the lower right corner. Reference samples are also shown in FIG. 1A , which follow a similar numbering scheme. The reference samples are labeled with R and their Y position (e.g., row index) and X position (column index) relative to the block (104). In both H.264 and H.265, the prediction samples are adjacent to the block being reconstructed, so there is no need to use negative values.
[0014] Intra picture prediction can work by copying reference sample values from neighboring samples occupied by a signaled prediction direction. For example, assume that the encoded video bitstream includes signaling that indicates a prediction direction consistent with arrow (102) for the block, that is, the sample is predicted from one or more prediction samples in the upper right corner at an angle of 45 degrees to the horizontal. In this case, samples S41, S32, S23, and S14 are predicted from the same reference sample R05. Sample S44 is then predicted based on reference sample R08.
[0015] In some cases, the values of multiple reference samples may be combined, such as by interpolation, in order to calculate the reference sample, especially when the direction is not divisible by 45 degrees.
[0016] As video coding techniques have evolved, the number of possible directions has increased. In H.264 (2003), nine different directions could be represented. This number increased to 33 in H.265 (2013), and at the time of this disclosure, up to 65 directions are supported in JEM / VVC / BMS. Experiments have been conducted to identify the most likely directions, and certain techniques in entropy coding are used to represent those possible directions with a small number of bits, accepting a certain cost for less likely directions. In addition, the direction itself can sometimes be predicted based on neighboring directions used in neighboring blocks that have already been decoded.
[0017] FIG. 1B is a diagram ( 180 ) illustrating 65 intra prediction directions according to JEM, thereby showing the number of prediction directions increasing over time.
[0018] The mapping of the intra prediction direction bits representing the direction in the coded video bitstream can vary from one video coding technique to another, and can range, for example, from a simple direct mapping of prediction direction to intra prediction mode to codeword to complex adaptive schemes involving most likely modes and similar techniques. However, in all cases, there may be some directions that are statistically less likely to occur in the video content than some other directions. Since the goal of video compression is to reduce redundancy, in a well-functioning video coding technique, those less likely directions will be represented by a larger number of bits than the more likely directions.
[0019] Motion compensation may be a lossy compression technique and may involve a technique where a block of sample data from a previously reconstructed picture or portion thereof (reference picture) is used to predict a newly reconstructed picture or portion thereof after being spatially offset in a direction indicated by a motion vector (hereinafter MV). In some cases, the reference picture may be the same as the picture currently being reconstructed. The MV may have two dimensions, X and Y, or three dimensions, with the third dimension indicating the reference picture being used (the latter may indirectly be a temporal dimension).
[0020] In some video compression techniques, an MV applicable to a region of sample data can be predicted based on other MVs, for example, based on an MV of another region of sample data that is spatially adjacent to the region being reconstructed and that precedes the MV in decoding order. Doing so can greatly reduce the amount of data required to encode the MV, thereby eliminating redundancy and increasing compression. MV prediction can work effectively, for example, because when encoding an input video signal obtained from a camera (called natural video), there is a statistical probability that a larger region than the region applicable to a single MV moves in a similar direction, so in some cases, similar motion vectors derived from MVs of adjacent regions can be used to predict the larger region. This makes the MV found for a given region similar or identical to the MV predicted from the surrounding MVs, and then after entropy coding, the MV found for the given region can be represented with fewer bits than the number of bits used when directly encoding the MV. In some cases, MV prediction can be an example of lossless compression of a signal (i.e., MV) derived from the original signal (i.e., sample stream). In other cases, MV prediction itself can be lossy, for example due to rounding errors when calculating the predictor based on multiple surrounding MVs.
[0021] Various MV prediction mechanisms are described in H.265 / HEVC (ITU-T H.265 Recommendation, "High Efficiency Video Coding", December 2016). Among the various MV prediction mechanisms provided by H.265, this application describes a technique referred to below as "spatial merging".
[0022] Referring to Figure 2, the current block (201) includes samples that have been discovered by the encoder during the motion search process, and the samples can be predicted based on the previous block of the same size that has generated a spatial offset. In addition, the MV can be derived from metadata associated with one or more reference pictures instead of encoding the MV directly. For example, the MV associated with any of the five surrounding samples labeled A0, A1 and B0, B1, B2 (corresponding to 202 to 206, respectively) is used to derive the MV from the metadata of the nearest reference picture (in decoding order). In H.265, MV prediction can use the predictor of the same reference picture that the neighboring blocks are also using. Summary of the invention
[0023] Aspects of the present invention provide methods and apparatus for video encoding and / or decoding. In some examples, the apparatus for video decoding includes a processing circuit. The processing circuit is capable of decoding encoding information of a transform block (TB) from an encoded video bitstream, the encoding information indicating a transform skip mode of the TB in one direction. The processing circuit is capable of decoding a symbol value of a current transform coefficient in the TB based on a previously decoded symbol value of a previous transform coefficient; the current transform coefficient and the previous transform coefficient are in the same row or column in the TB, and the same row or the same column is along the one direction of the transform skip mode. The processing circuit is capable of determining the current transform coefficient in the TB based on the decoded symbol value of the current transform coefficient.
[0024] In one embodiment, the one direction is a horizontal direction. The same row or the same column is the same row along the one direction of the transform skip pattern. Processing circuitry is capable of decoding the symbol value of the current transform coefficient in the TB based on the previously decoded symbol value of the previous transform coefficient in the same row along the one direction of the transform skip pattern. In an example, the same row is restricted to one of a subset of rows in the TB.
[0025] In one embodiment, the one direction is a vertical direction. The same row or the same column is the same column along the one direction of the transform skip pattern. Processing circuitry is capable of decoding the symbol value of the current transform coefficient in the TB based on the previously decoded symbol value of the previous transform coefficient in the same column along the one direction of the transform skip pattern. In an example, the same column is restricted to one of a subset of columns in the TB.
[0026] In one embodiment, the processing circuit is capable of decoding a flag. The flag indicates whether the sign values of the transform coefficients in the same row are the same. The transform coefficients in the same row include the current transform coefficient and the previous transform coefficient.
[0027] The processing circuit is capable of decoding a flag. The flag indicates whether the sign values of the transform coefficients in the same column are the same. The transform coefficients in the same column include the current transform coefficient and the previous transform coefficient.
[0028] Processing circuitry is capable of decoding the symbol value of the current transform coefficient in the TB based on the previously decoded symbol value of the previous transform coefficient, the previously decoded symbol value of the DC transform coefficient in an upper neighboring block of the TB, and the previously decoded symbol value of the DC transform coefficient in a left neighboring block of the TB. The DC transform coefficient in the upper neighboring block of the TB and the DC transform coefficient in the left neighboring block of the TB have a DC spatial frequency.
[0029] In one example, processing circuitry decodes the symbol value of the current transform coefficient in the TB based on a weighted average of (i) the previously decoded symbol value of the DC transform coefficient in the upper neighboring block of the TB and (ii) the previously decoded symbol value of the DC transform coefficient in the left neighboring block of the TB, and the previously decoded symbol value of the previous transform coefficient. The weights are based on the number of transform coefficients in the upper neighboring block that are adjacent to the transform coefficient in the TB and the number of transform coefficients in the left neighboring block that are adjacent to the transform coefficient in the TB, respectively. The position of the previous transform coefficient in the TB is adjacent to the position of the current transform coefficient in the TB.
[0030] In one example, the position of the previous transform coefficient in the TB is adjacent to the position of the current transform coefficient in the TB along a scan direction. The scan direction is based on a scan order used to encode symbol values of transform coefficients in the TB.
[0031] In one embodiment, the processing circuit is capable of decoding the symbol value of the current transform coefficient in the TB based on the previously decoded symbol value of the previous transform coefficient and one or more previously decoded symbol values of the corresponding one or more transform coefficients in the same row or the same column.
[0032] Aspects of the present invention further provide a non-transitory computer-readable medium storing instructions, which, when executed by a computer for video encoding and / or decoding, enable the computer to perform a method for video encoding and / or decoding. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Further features, nature and various advantages of the disclosed subject matter will become more apparent from the following detailed description and the accompanying drawings, in which:
[0034] FIG. 1A is a diagram illustrating an exemplary subset of intra prediction modes.
[0035] FIG. 1B is a diagram of exemplary intra prediction directions.
[0036] FIG. 2 is a schematic diagram of a current block and its surrounding spatial merging candidates in one example.
[0037] Figure 3 is a schematic diagram of a simplified block diagram of a communication system according to one embodiment.
[0038] Figure 4 is a schematic diagram of a simplified block diagram of a communication system according to one embodiment.
[0039] Figure 5 is a schematic diagram of a simplified block diagram of a decoder according to one embodiment.
[0040] Figure 6 is a schematic diagram of a simplified block diagram of an encoder according to one embodiment.
[0041] Figure 7 A block diagram of an encoder according to another embodiment is shown.
[0042] Figure 8 A block diagram of a decoder according to another embodiment is shown.
[0043] Fig. 9 An example of a primary transform basis function according to an embodiment of the present disclosure is shown.
[0044] Fig. 10A An exemplary correlation of the availability of various transform kernels based on transform block size and prediction mode according to an embodiment of the present disclosure is shown.
[0045] Fig. 10BAn exemplary transform type selection for an intra prediction mode based on a chroma component according to an embodiment of the present disclosure is shown.
[0046] Fig.11 An example of a generalized line graph transform (LGT) featuring self-loop weights and edge weights according to an embodiment of the present disclosure is shown.
[0047] Fig.12 An exemplary generalized graph Laplacian (GGL) matrix according to an embodiment of the present disclosure is shown.
[0048] Fig.13A An example of a transform block (TB) and neighboring blocks according to an embodiment of the present disclosure is shown.
[0049] Fig. 13B An example of a TB according to an embodiment of the present disclosure is shown.
[0050] Fig.14 A flow chart of an overview process according to an embodiment of the present disclosure is shown.
[0051] Fig.15 A schematic diagram of a computer system according to one embodiment is shown. DETAILED DESCRIPTION
[0052] Figure 3 A simplified block diagram of a communication system (300) according to an embodiment of the present disclosure is shown. The communication system (300) includes a plurality of terminal devices that can communicate with each other via, for example, a network (350). For example, the communication system (300) includes a first pair of terminal devices (310) and (320) interconnected via the network (350). Figure 3 In an embodiment, the first terminal device performs unidirectional data transmission between (310) and (320). For example, the terminal device (310) can encode video data (e.g., a video picture stream collected by the terminal device (310)) for transmission to another terminal device (320) via the network (350). The encoded video data is transmitted in the form of one or more encoded video code streams. The terminal device (320) can receive the encoded video data from the network (350), decode the encoded video data to restore the video data, and display the video picture based on the restored video data. Unidirectional data transmission is more common in applications such as media services.
[0053] In another example, a communication system (300) includes a pair of terminal devices (330) and (340) that perform bidirectional transmission of encoded video data, which bidirectional transmission may occur, for example, during a video conference. For bidirectional data transmission, in one example, each of the terminal devices (330) and (340) may encode video data (e.g., a video picture stream collected by the terminal device) for transmission to the other of the terminal devices (330) and (340) via a network (350). Each of the terminal devices (330) and (340) may also receive the encoded video data transmitted by the other of the terminal devices (330) and (340), and may decode the encoded video data to restore the video picture, and may display the video picture on an accessible display device based on the restored video data.
[0054] exist Figure 3 In the example of, terminal device (310), terminal device (320), terminal device (330) and terminal device (340) may be shown as a server, a personal computer and a smart phone, but the principles disclosed in the present application may not be limited thereto. The embodiments disclosed in the present application are applicable to laptop computers, tablet computers, media players and / or dedicated video conferencing devices. Network (350) represents any number of networks that transmit encoded video data between terminal devices (310), terminal devices (320), terminal devices (330) and terminal devices (340), including, for example, wired (wired) and / or wireless communication networks. Communication network (350) can exchange data in circuit switching and / or packet switching channels. Representative networks may include telecommunication networks, local area networks, wide area networks and / or the Internet. For the purposes of the present application, unless explained below, the architecture and topology of network (350) may be irrelevant to the operations disclosed in the present application.
[0055] As an example of application of the disclosed subject matter, Figure 4 The placement of the video encoder and video decoder in a streaming environment is shown. The disclosed subject matter is equally applicable to other video-enabled applications including, for example, video conferencing, digital TV, storing compressed video on digital media including CDs, DVDs, memory sticks, etc., and the like.
[0056] The streaming system may include an acquisition subsystem (413), which may include a video source (401), such as a digital camera, that creates an uncompressed video picture stream (402). In an example, the video picture stream (402) includes samples captured by a digital camera. The video picture stream (402), depicted as thick lines to emphasize the high amount of data compared to the encoded video data (404) (or the encoded video bitstream), may be processed by an electronic device (420), which includes a video encoder (403) coupled to the video source (401). The video encoder (403) may include hardware, software, or a combination of hardware and software to implement or implement various aspects of the disclosed subject matter as described in more detail below. The encoded video data (404) (or the encoded video bitstream (404)), depicted as thin lines to emphasize the lower amount of data compared to the video picture stream (402), may be stored on a streaming server (405) for future use. One or more streaming client subsystems, such as Figure 4 A client subsystem (406) and a client subsystem (408) in a streaming server (405) may access a streaming server (405) to retrieve a copy (407) and a copy (409) of the encoded video data (404). The client subsystem (406) may include, for example, a video decoder (410) in an electronic device (430). The video decoder (410) decodes the incoming copy (407) of the encoded video data and generates an output video picture stream (411) that can be presented on a display (412) (e.g., a display screen) or another presentation device (not depicted). In some streaming systems, the encoded video data (404), the video data (407), and the video data (409) (e.g., a video bitstream) may be encoded according to certain video encoding / compression standards. Examples of such standards include ITU-T H.265. In the example, the video coding standard under development is informally referred to as Versatile Video Coding (VVC), and the disclosed subject matter may be used in the context of VVC.
[0057] It should be noted that the electronic device (420) and the electronic device (430) may include other components (not shown). For example, the electronic device (420) may include a video decoder (not shown), and the electronic device (430) may also include a video encoder (not shown).
[0058] Figure 5 A block diagram of a video decoder (510) according to an embodiment of the present disclosure is shown. The video decoder (510) may be included in an electronic device (530). The electronic device (530) may include a receiver (531) (e.g., a receiving circuit). The video decoder (510) may be used to replace Figure 4A video decoder (410) in an example of FIG.
[0059] The receiver (531) may receive one or more encoded video sequences to be decoded by the video decoder (510); in the same or another embodiment, one encoded video sequence is received at a time, wherein the decoding of each encoded video sequence is independent of the other encoded video sequences. The encoded video sequence may be received from a channel (501), which may be a hardware / software link to a storage device storing the encoded video data. The receiver (531) may receive the encoded video data and other data, such as encoded audio data and / or auxiliary data streams, which may be forwarded to their respective consuming entities (not shown). The receiver (531) may separate the encoded video sequence from the other data. To prevent network jitter, a buffer memory (515) may be coupled between the receiver (531) and the entropy decoder / parser (520) (hereinafter referred to as "parser (520)"). In some applications, the buffer memory (515) is part of the video decoder (510). In other cases, the buffer memory (515) may be provided external to the video decoder (510) (not shown). In other cases, a buffer memory (not shown) is provided outside the video decoder (510) to prevent network jitter, for example, and another buffer memory (515) may be configured inside the video decoder (510) to handle broadcast timing, for example. When the receiver (531) receives data from a storage / forward device with sufficient bandwidth and controllability or from an isochronous network, it may not be necessary to configure the buffer memory (515), or the buffer memory may be made smaller. For use on a service packet network such as the Internet, a buffer memory (515) may also be required, which may be relatively large and may advantageously have an adaptive size, and may be at least partially implemented in an operating system or a similar element (not shown) outside the video decoder (510).
[0060] The video decoder (510) may include a parser (520) to reconstruct symbols (521) from the encoded video sequence. The types of symbols include information used to manage the operation of the video decoder (510) and potential information used to control a display device such as a display device (512) (e.g., a display screen) that is not an integral part of the electronic device (530) but can be coupled to the electronic device (530), such as Figure 5As shown. The control information for the display device may be a parameter set fragment (not indicated) of Supplemental Enhancement Information (SEI message) or Video Usability Information (VUI). The parser (520) may parse / entropy decode the received coded video sequence. The encoding of the coded video sequence may be performed according to a video coding technique or standard, and may follow various principles, including variable length coding, Huffman coding, arithmetic coding with or without context sensitivity, and the like. The parser (520) may extract a subgroup parameter set of at least one subgroup of the subgroups of pixels in the video decoder from the coded video sequence based on at least one parameter corresponding to the group. The subgroup may include a Group of Pictures (GOP), a picture, a tile, a slice, a macroblock, a Coding Unit (CU), a block, a Transform Unit (TU), a Prediction Unit (PU), and the like. The parser (520) may also extract information from the encoded video sequence, such as transform coefficients, quantizer parameter values, motion vectors, and so on.
[0061] The parser (520) may perform entropy decoding / parsing operations on the video sequence received from the buffer memory (515), thereby creating symbols (521).
[0062] Depending on the type of coded video picture or portion of coded video picture (e.g., inter- and intra-pictures, inter- and intra-blocks) and other factors, the reconstruction of the symbol (521) may involve multiple different units. Which units are involved and how they are involved may be controlled by subgroup control information parsed by the parser (520) from the coded video sequence. For the sake of brevity, such subgroup control information flow between the parser (520) and the multiple units below is not described.
[0063] In addition to the functional blocks already mentioned, the video decoder (510) can be conceptually subdivided into several functional units as described below. In a practical embodiment operating under commercial constraints, many of these units interact closely with each other and can be at least partially integrated with each other. However, for the purpose of describing the disclosed subject matter, the conceptual subdivision into the following functional units is appropriate.
[0064] The first unit is a sealer / inverse transform unit (551). The sealer / inverse transform unit (551) receives quantized transform coefficients as symbols (521) from the parser (520) and control information, including which transform method to use, block size, quantization factor, quantization scaling matrix, etc. The sealer / inverse transform unit (551) can output a block including sample values, which can be input into the aggregator (555).
[0065] In some cases, the output samples of the scaler / inverse transform unit (551) may belong to an intra-coded block; that is, a block that does not use predictive information from a previously reconstructed picture, but may use predictive information from a previously reconstructed portion of the current picture. Such predictive information may be provided by an intra-prediction unit (552). In some cases, the intra-prediction unit (552) generates a block of the same size and shape as the block being reconstructed using surrounding reconstructed information extracted from a current picture buffer (558). For example, the current picture buffer (558) buffers a partially reconstructed current picture and / or a fully reconstructed current picture. In some cases, the aggregator (555) adds the prediction information generated by the intra-prediction unit (552) to the output sample information provided by the scaler / inverse transform unit (551) on a per-sample basis.
[0066] In other cases, the output samples of the scaler / inverse transform unit (551) may belong to an inter-frame coded and potentially motion compensated block. In this case, the motion compensated prediction unit (553) may access the reference picture memory (557) to extract samples for prediction. After the extracted samples are motion compensated according to the symbols (521) belonging to the block, these samples may be added to the output of the scaler / inverse transform unit (551) (in this case referred to as residual samples or residual signals) by the aggregator (555) to generate output sample information. The acquisition of the predicted samples by the motion compensated prediction unit (553) from the address in the reference picture memory (557) may be controlled by a motion vector, and the motion vector is provided to the motion compensated prediction unit (553) in the form of a symbol (521), which may have, for example, X, Y and reference picture components. Motion compensation may also include interpolation of sample values extracted from the reference picture memory (557) when using sub-sample accurate motion vectors, motion vector prediction mechanisms, and the like.
[0067] The output samples of the aggregator (555) may be subjected to various loop filtering techniques in a loop filter unit (556). The video compression techniques may include in-loop filter techniques controlled by parameters included in the coded video sequence (also referred to as the coded video bitstream) and available to the loop filter unit (556) as symbols (521) from the parser (520), however, the video compression techniques may also be responsive to meta-information obtained during decoding of a coded picture or a previous (in decoding order) portion of the coded video sequence, as well as to previously reconstructed and loop filtered sample values.
[0068] The output of the loop filter unit (556) may be a sample stream that may be output to a display device (512) and stored in a reference picture memory (557) for subsequent inter-picture prediction.
[0069] Once fully reconstructed, certain coded pictures may be used as reference pictures for future prediction. For example, once the coded picture corresponding to the current picture is fully reconstructed, and the coded picture is identified as a reference picture (e.g., by the parser (520)), the current picture buffer (558) may become part of the reference picture memory (557), and a new current picture buffer may be reallocated before starting to reconstruct a subsequent coded picture.
[0070] The video decoder (510) may perform decoding operations according to a predetermined video compression technique, such as in the ITU-T H.265 standard. The encoded video sequence may conform to the syntax specified by the video compression technique or standard used, in the sense that the encoded video sequence follows the syntax of the video compression technique or standard and the profile recorded in the video compression technique or standard. Specifically, the profile may select certain tools from all the tools available in the video compression technique or standard as the only tools available for use under the profile. For compliance, the complexity of the encoded video sequence is also required to be within the range defined by the hierarchy of the video compression technique or standard. In some cases, the hierarchy limits the maximum picture size, the maximum frame rate, the maximum reconstruction sampling rate (measured in, for example, mega samples per second), the maximum reference picture size, etc. In some cases, the limits set by the hierarchy may be further limited by the Hypothetical Reference Decoder (HRD) specification and metadata of the HRD buffer management signaled in the encoded video sequence.
[0071] In an embodiment, the receiver (531) may receive additional (redundant) data along with the encoded video. The additional data may be included as part of the encoded video sequence. The additional data may be used by the video decoder (510) to properly decode the data and / or more accurately reconstruct the original video data. The additional data may be in the form of, for example, temporal, spatial or signal-to-noise ratio (SNR) enhancement layers, redundant slices, redundant pictures, forward error correction codes, etc.
[0072] Figure 6 A block diagram of a video encoder (603) according to an embodiment of the present disclosure is shown. The video encoder (603) is included in an electronic device (620). The electronic device (620) includes a transmitter (640) (e.g., a transmission circuit). The video encoder (603) can be used to replace Figure 4 A video encoder (403) in an example.
[0073] The video encoder (603) can be used to obtain the video source (601) (not Figure 6 In another embodiment, the video source (601) is a part of the electronic device (620) in the example, and receives the video samples. The video source can collect video images to be encoded by the video encoder (603). In another embodiment, the video source (601) is a part of the electronic device (620).
[0074] The video source (601) may provide a source video sequence in the form of a digital video sample stream to be encoded by the video encoder (603), the digital video sample stream may have any suitable bit depth (e.g., 8-bit, 10-bit, 12-bit, ...), any color space (e.g., BT.601 Y CrCB, RGB, ...), and any suitable sampling structure (e.g., Y CrCb 4:2:0, Y CrCb 4:4:4). In a media service system, the video source (601) may be a storage device storing previously prepared videos. In a video conferencing system, the video source (601) may be a camera that captures local image information as a video sequence. The video data may be provided as a plurality of separate pictures that are given motion when viewed sequentially. The pictures themselves may be constructed as a spatial pixel array, where each pixel may include one or more samples depending on the sampling structure, color space, etc. used. The relationship between pixels and samples may be easily understood by those skilled in the art. The following description focuses on samples.
[0075] According to an embodiment, the video encoder (603) may encode and compress pictures of a source video sequence into an encoded video sequence (643) in real time or under any other time constraints required by the application. Implementing an appropriate encoding speed is a function of the controller (650). In some embodiments, the controller (650) controls other functional units as described below and is functionally coupled to the other functional units. For the sake of brevity, coupling is not indicated in the figure. The parameters set by the controller (650) may include rate control related parameters (picture skipping, quantizer, lambda value of rate distortion optimization technology, etc.), picture size, group of pictures (GOP) layout, maximum motion vector search range, etc. The controller (650) may be configured to have other suitable functions that are related to the video encoder (603) optimized for a certain system design.
[0076] In some embodiments, the video encoder (603) is configured to operate in an encoding loop. As a simple description, in an example, the encoding loop may include a source encoder (630) (e.g., responsible for creating symbols, such as a symbol stream, based on an input picture to be encoded and a reference picture) and a (local) decoder (633) embedded in the video encoder (603). The decoder (633) reconstructs the symbols to create sample data in a manner similar to that of the (remote) decoder (because in the video compression technology considered by the disclosed subject matter, any compression between the symbols and the encoded video code stream is lossless). The reconstructed sample stream (sample data) is input to a reference picture memory (634). Since the decoding of the symbol stream produces bit-accurate results that are independent of the decoder location (local or remote), the contents of the reference picture memory (634) are also bit-accurately corresponding between the local encoder and the remote encoder. In other words, the reference picture samples "seen" by the prediction part of the encoder are exactly the same as the sample values that the decoder will "see" when using the prediction during decoding. This basic principle of reference picture synchronization (and the drift that occurs when synchronization cannot be maintained, eg due to channel errors) is also used in some related techniques.
[0077] The operation of the "local" decoder (633) can be combined with the above Figure 5 The "remote" decoder described in detail for the video decoder (510) is identical. However, additional brief reference is made to Figure 5 , when symbols are available and the entropy encoder (645) and parser (520) are capable of losslessly encoding / decoding the symbols into an encoded video sequence, the entropy decoding portion of the video decoder (510), including the buffer memory (515) and the parser (520), may not be fully implemented in the local decoder (633).
[0078] At this point, it can be observed that any decoder technology other than the parsing / entropy decoding present in the decoder must also be present in the corresponding encoder in substantially the same functional form. For this reason, the disclosed subject matter focuses on the decoder operation. The description of encoder technology can be simplified because encoder technology is mutually inverse to the decoder technology described comprehensively. A more detailed description is only needed in certain areas and is provided below.
[0079] During operation, in some examples, the source encoder (630) may perform motion compensated predictive coding. The motion compensated predictive coding predictively encodes an input picture with reference to one or more previously encoded pictures from a video sequence designated as "reference pictures." In this way, the encoding engine (632) encodes the difference between a pixel block of the input picture and a pixel block of a reference picture that may be selected as a prediction reference for the input picture.
[0080] The local video decoder (633) may decode the encoded video data of the picture that may be designated as the reference picture based on the symbol created by the source encoder (630). The operation of the encoding engine (632) may advantageously be a lossy process. When the encoded video data is available at the video decoder ( Figure 6 When the video sequence is decoded at a remote location (not shown), the reconstructed video sequence may typically be a copy of the source video sequence with some errors. The local video decoder (633) replicates the decoding process that may be performed by the video decoder on the reference picture and may cause the reconstructed reference picture to be stored in the reference picture memory (634). In this way, the video encoder (603) may locally store a copy of the reconstructed reference picture that has common content (absent transmission errors) with the reconstructed reference picture that will be obtained by the remote video decoder.
[0081] The predictor (635) may perform a prediction search for the encoding engine (632). That is, for a new picture to be encoded, the predictor (635) may search the reference picture memory (634) for sample data (as candidate reference pixel blocks) or certain metadata, such as reference picture motion vectors, block shapes, etc., that may serve as appropriate prediction references for the new picture. The predictor (635) may operate on a pixel block by pixel block basis to find a suitable prediction reference. In some cases, as determined by the search results obtained by the predictor (635), the input picture may have prediction references taken from multiple reference pictures stored in the reference picture memory (634).
[0082] The controller (650) may manage encoding operations of the source encoder (630), including, for example, setting parameters and subgroup parameters for encoding video data.
[0083] The outputs of all the above functional units may be entropy encoded in an entropy encoder (645). The entropy encoder (645) performs lossless compression on the symbols generated by the various functional units according to techniques such as Huffman coding, variable length coding, arithmetic coding, etc., thereby converting the symbols into a coded video sequence.
[0084] The transmitter (640) may buffer the encoded video sequence created by the entropy encoder (645) in preparation for transmission over a communication channel (660), which may be a hardware / software link to a storage device where the encoded video data will be stored. The transmitter (640) may combine the encoded video data from the video encoder (603) with other data to be transmitted, such as encoded audio data and / or ancillary data streams (source not shown).
[0085] The controller (650) may manage the operation of the video encoder (603). During encoding, the controller (650) may assign a certain coded picture type to each coded picture, but this may affect the coding techniques that can be applied to the corresponding picture. For example, a picture may generally be assigned to any of the following picture types:
[0086] An intra picture (I picture) may be a picture that can be encoded and decoded without using any other picture in the sequence as a prediction source. Some video codecs allow different types of intra pictures, including, for example, Independent Decoder Refresh ("IDR") pictures. Those skilled in the art are aware of the variations of I pictures and their corresponding applications and features.
[0087] A predictive picture (P picture) may be a picture that can be encoded and decoded using intra prediction or inter prediction, which uses at most one motion vector and a reference index to predict sample values for each block.
[0088] Bidirectional predictive pictures (B pictures), which can be pictures that can be encoded and decoded using intra prediction or inter prediction, which uses up to two motion vectors and reference indices to predict the sample values of each block. Similarly, multiple predictive pictures can use more than two reference pictures and associated metadata for reconstructing a single block.
[0089] The source picture may typically be spatially subdivided into blocks of samples (e.g., blocks of 4×4, 8×8, 4×8, or 16×16 samples), and coded block by block. These blocks may be predictively coded with reference to other (already coded) blocks, which are determined by the coding allocation applied to the block's corresponding picture. For example, a block of an I picture may be non-predictively coded, or the block may be predictively coded (spatial prediction or intra prediction) with reference to already coded blocks of the same picture. A block of a P picture may be predictively coded by spatial prediction with reference to one previously coded reference picture or by temporal prediction. A block of a B picture may be predictively coded by spatial prediction with reference to one or two previously coded reference pictures or by temporal prediction.
[0090] The video encoder (603) may perform encoding operations according to a predetermined video encoding technique or standard, such as ITU-T H.265 Recommendation. In operation, the video encoder (603) may perform various compression operations, including predictive encoding operations that exploit temporal and spatial redundancy in an input video sequence. Thus, the encoded video data may conform to the syntax specified by the video encoding technique or standard used.
[0091] In an embodiment, the transmitter (640) may transmit additional data when transmitting the encoded video. The source encoder (630) may include such data as part of the encoded video sequence. The additional data may include other forms of redundant data such as temporal / spatial / SNR enhancement layers, redundant pictures and slices, SEI messages, VUI parameter set fragments, etc.
[0092] The captured video may be taken as a plurality of source pictures (video pictures) in a temporal sequence. Intra-picture prediction (often simplified to intra-prediction) exploits spatial correlations in a given picture, while inter-picture prediction exploits (temporal or other) correlations between pictures. In an example, a particular picture being encoded / decoded is divided into blocks, and the particular picture being encoded / decoded is referred to as the current picture. When a block in the current picture is similar to a reference block in a reference picture that was previously encoded in the video and is still buffered, the block in the current picture may be encoded by a vector called a motion vector. The motion vector points to a reference block in a reference picture, and in the case where multiple reference pictures are used, the motion vector may have a third dimension that identifies the reference picture.
[0093] In some embodiments, bidirectional prediction techniques may be used in inter-picture prediction. According to the bidirectional prediction technique, two reference pictures are used, for example, a first reference picture and a second reference picture that are both before the current picture in the video in decoding order (but may be in the past and future in display order, respectively). A block in the current picture may be encoded by a first motion vector pointing to a first reference block in the first reference picture and a second motion vector pointing to a second reference block in the second reference picture. Specifically, the block may be predicted by a combination of the first reference block and the second reference block.
[0094] In addition, merge mode technology can be used in inter-picture prediction to improve coding efficiency.
[0095] According to some embodiments disclosed in the present application, predictions such as inter-picture prediction and intra-picture prediction are performed in units of blocks. For example, according to the HEVC standard, pictures in a video picture sequence are divided into coding tree units (CTUs) for compression, and the CTUs in the pictures have the same size, such as 64×64 pixels, 32×32 pixels, or 16×16 pixels. In general, a CTU includes three coding tree blocks (CTBs), which are a luminance CTB and two chrominance CTBs. Each CTU can also be recursively split into one or more coding units (CUs) using a quadtree. For example, a 64×64 pixel CTU can be split into a 64×64 pixel CU, or 4 32×32 pixel CUs, or 16 16×16 pixel CUs. In the example, each CU is analyzed to determine a prediction type for the CU, such as an inter-prediction type or an intra-prediction type. Depending on temporal and / or spatial predictability, the CU is split into one or more prediction units (PUs). Typically, each PU includes a luma prediction block (PB) and two chroma PBs. In an embodiment, the prediction operation in encoding (encoding / decoding) is performed in units of prediction blocks. Taking the luma prediction block as an example of a prediction block, the prediction block includes a matrix of values (e.g., luma values) for pixels, such as 8×8 pixels, 16×16 pixels, 8×16 pixels, 16×8 pixels, and the like.
[0096] Figure 7 A diagram of a video encoder (703) according to another embodiment of the present disclosure is shown. The video encoder (703) is configured to receive a processed block (e.g., a prediction block) of sample values within a current video picture in a video picture sequence and encode the processed block into an encoded picture that is part of an encoded video sequence. In one example, the video encoder (703) is used to replace Figure 4The video encoder (403) in the example.
[0097] In an HEVC embodiment, a video encoder (703) receives a matrix of sample values for a processing block, such as a prediction block of 8×8 samples. The video encoder (703) uses, for example, rate-distortion (RD) optimization to determine whether to use intra mode, inter mode, or bidirectional prediction mode to best encode the processing block. When encoding the processing block in intra mode, the video encoder (703) may use intra prediction techniques to encode the processing block into an encoded picture; and when encoding the processing block in inter mode or bidirectional prediction mode, the video encoder (703) may use inter prediction or bidirectional prediction techniques to encode the processing block into an encoded picture, respectively. In some video encoding techniques, the merge mode may be an inter-picture prediction submode, in which motion vectors are derived from one or more motion vector predictors without the aid of encoded motion vector components external to the predictor. In some other video encoding techniques, there may be motion vector components applicable to the subject block. In an embodiment, the video encoder (703) includes other components, such as a mode decision module (not shown) for determining the processing block mode.
[0098] exist Figure 7 In the example of FIG. 7 , the video encoder ( 703 ) includes Figure 7 Shown are an inter-frame encoder (730), an intra-frame encoder (722), a residual calculator (723), a switch (726), a residual encoder (724), a common controller (721), and an entropy encoder (725) coupled together.
[0099] The inter-frame encoder (730) is configured to receive samples of a current block (e.g., a processing block), compare the block with one or more reference blocks in a reference picture (e.g., blocks in a previous picture and a subsequent picture), generate inter-frame prediction information (e.g., redundant information description according to an inter-frame coding technique, motion vectors, merge mode information), and calculate an inter-frame prediction result (e.g., a predicted block) based on the inter-frame prediction information using any suitable technique. In some examples, the reference picture is a decoded reference picture decoded based on the encoded video information.
[0100] The intra encoder (722) is configured to receive samples of a current block (e.g., a processing block), compare the block with an encoded block in the same picture in some cases, generate quantization coefficients after transformation, and in some cases also generate intra prediction information (e.g., intra prediction direction information according to one or more intra coding techniques). In an example, the intra encoder (722) also calculates an intra prediction result (e.g., a predicted block) based on the intra prediction information and a reference block in the same picture.
[0101] The general controller (721) is configured to determine general control data and control other components of the video encoder (703) based on the general control data. In an example, the general controller (721) determines the mode of the block and provides a control signal to the switch (726) based on the mode. For example, when the mode is intra mode, the general controller (721) controls the switch (726) to select the intra mode result for use by the residual calculator (723), and controls the entropy encoder (725) to select intra prediction information and add the intra prediction information to the bitstream; and when the mode is inter mode, the general controller (721) controls the switch (726) to select the inter prediction result for use by the residual calculator (723), and controls the entropy encoder (725) to select the inter prediction information and add the inter prediction information to the bitstream.
[0102] The residual calculator (723) is configured to calculate the difference (residual data) between the received block and the prediction result selected from the intra-frame encoder (722) or the inter-frame encoder (730). The residual encoder (724) is configured to operate based on the residual data to encode the residual data to generate transform coefficients. In an example, the residual encoder (724) is configured to convert the residual data from the spatial domain to the frequency domain and generate transform coefficients. The transform coefficients are then subjected to quantization to obtain quantized transform coefficients. In various embodiments, the video encoder (703) also includes a residual decoder (728). The residual decoder (728) is configured to perform an inverse transform and generate decoded residual data. The decoded residual data can be used appropriately by the intra-frame encoder (722) and the inter-frame encoder (730). For example, the inter encoder (730) can generate a decoded block based on the decoded residual data and the inter prediction information, and the intra encoder (722) can generate a decoded block based on the decoded residual data and the intra prediction information. The decoded blocks are appropriately processed to generate a decoded picture, and in some examples, the decoded picture can be buffered in a memory circuit (not shown) and used as a reference picture.
[0103] The entropy encoder (725) is configured to format the codestream to produce an encoded block. The entropy encoder (725) includes various information according to a suitable standard, such as the HEVC standard. In an example, the entropy encoder (725) is configured to include general control data, selected prediction information (such as intra-frame prediction information or inter-frame prediction information), residual information, and other suitable information in the codestream. It should be noted that according to the disclosed subject matter, when the block is encoded in the inter-frame mode or the merge sub-mode of the bidirectional prediction mode, there is no residual information.
[0104] Figure 8A diagram of a video decoder (810) according to another embodiment of the present disclosure is shown. The video decoder (810) is configured to receive an encoded image as part of an encoded video sequence and decode the encoded image to generate a reconstructed picture. In an example, the video decoder (810) is used to replace Figure 4 A video decoder (410) is shown in an example.
[0105] exist Figure 8 In the example of FIG. 8 , the video decoder ( 810 ) includes Figure 8 The entropy decoder (871), inter-frame decoder (880), residual decoder (873), reconstruction module (874) and intra-frame decoder (872) coupled together are shown in FIG.
[0106] The entropy decoder (871) may be configured to reconstruct certain symbols from the encoded picture, which represent syntax elements constituting the encoded picture. Such symbols may include, for example, a mode for encoding the block (e.g., intra mode, inter mode, bidirectional prediction mode, a merged submode of the latter two, or another submode), prediction information (e.g., intra prediction information or inter prediction information) that can identify certain samples or metadata for prediction by the intra decoder (872) or the inter decoder (880), respectively, residual information in the form of, for example, quantized transform coefficients, and the like. In an example, when the prediction mode is inter or bidirectional prediction mode, the inter prediction information is provided to the inter decoder (880); and when the prediction type is an intra prediction type, the intra prediction information is provided to the intra decoder (872). The residual information may be subjected to inverse quantization and provided to the residual decoder (873).
[0107] The inter-frame decoder (880) is configured to receive inter-frame prediction information and generate an inter-frame prediction result based on the inter-frame prediction information.
[0108] The intra decoder (872) is configured to receive intra prediction information and generate a prediction result based on the intra prediction information.
[0109] The residual decoder (873) is configured to perform inverse quantization to extract dequantized transform coefficients, and process the dequantized transform coefficients to convert the residual from the frequency domain to the spatial domain. The residual decoder (873) may also require certain control information (to include quantizer parameters (QP)), and this information may be provided by the entropy decoder (871) (the data path is not indicated because this is only low-volume control information).
[0110] The reconstruction module (874) is configured to combine the residual output by the residual decoder (873) with the prediction result (which may be output by the inter-frame prediction module or the intra-frame prediction module) in the spatial domain to form a reconstructed block, which may be part of a reconstructed picture, which in turn may be part of a reconstructed video. It should be noted that other suitable operations such as deblocking operations may be performed to improve visual quality.
[0111] It should be noted that the video encoder (403), video encoder (603) and video encoder (703) and video decoder (410), video decoder (510) and video decoder (810) may be implemented using any suitable technology. In an embodiment, the video encoder (403), video encoder (603) and video encoder (703) and video decoder (410), video decoder (510) and video decoder (810) may be implemented using one or more integrated circuits. In another embodiment, the video encoder (403), video encoder (603) and video encoder (703) and video decoder (410), video decoder (510) and video decoder (810) may be implemented using one or more processors that execute software instructions.
[0112] Aspects of the present disclosure include context design for entropy coding and decoding of a sign map of a one-dimensional (1D) transform skip mode. A set of video coding techniques designed for efficient compression of video data can be provided, including context design for entropy coding and decoding of sign values of 1D transform skip coefficients.
[0113] Embodiments of primary transforms are described below, for example, as used in AOMedia Video1 (AV1). To support extended coding block partitioning, for example, in AV1, multiple transform sizes (e.g., ranging from 4 to 64 points in each dimension) and transform shapes (e.g., square, rectangular shapes with a width to height ratio of 2:1, 1:2, 4:1, or 1:4) may be used.
[0114] Two-dimensional (2D) transform processing can use a hybrid transform kernel that can include a different 1D transform for each dimension of the encoded residual block. The primary 1D transform can include: (a) 4-point, 8-point, 16-point, 32-point, 64-point DCT-2; (b) 4-point, 8-point, 16-point asymmetric DST (ADST) (e.g., DST-4, DST-7) and corresponding flipped versions (e.g., a flipped version of ADST (Asymmetric Discrete Sine Transform) or FlipADST can apply ADST in the opposite order); and / or (c) 4-point, 8-point, 16-point, 32-point identity transform (IDTX). Fig. 9 An example of a primary transform basis function according to an embodiment of the present disclosure is shown. Fig. 9 The primary transform basis functions in the example include basis functions for DCT-2 with N-point input and basis functions for asymmetric DST (DST-4 and DST-7) with N-point input. Fig. 9 The primary transform basis functions are shown.
[0115] The availability of hybrid transform kernels may depend on the transform block size and the prediction mode. Fig. 10A An exemplary correlation of the availability of various transform kernels (e.g., the transform types shown in the first column and described in the second column) based on transform block size (e.g., the size shown in the third column) and prediction mode (e.g., intra prediction and inter prediction shown in the third column). An exemplary hybrid transform kernel and availability based on prediction mode and transform block size can be used in AV1. Reference Fig. 10A , the symbols “→” and “↓” represent the horizontal dimension (also referred to as the horizontal direction) and the vertical dimension (also referred to as the vertical direction), respectively. The symbols “√” and “x” represent the availability of the transform kernel for the corresponding block size and prediction mode. For example, the symbol “√” indicates that the transform kernel is available, and the symbol “x” indicates that the transform kernel is not available.
[0116] In one example, if Fig. 10A As shown in the first column of , the transform type (1010) is represented by ADST_DCT. Fig. 10A As shown in the second column of , the transform type (1010) includes ADST in the vertical direction and DCT (Discrete Cosine Transform) in the horizontal direction. Fig. 10A In the third column, when the block size is less than or equal to 16x16 (e.g., 16x16 samples, 16x16 luma samples), the transform type (1010) can be used for intra prediction and inter prediction.
[0117] In one example, if Fig. 10A As shown in the first column of , the transform type (1020) is represented by V_ADST. Fig. 10A As shown in the second column of , the transform type (1020) includes ADST in the vertical direction and IDTX (i.e., identity matrix) in the horizontal direction. Therefore, the transform type (1020) (e.g., V_ADST) is performed in the vertical direction but not in the horizontal direction. Fig. 10A In the third column, regardless of the block size, transform type (1020) is not available for intra prediction. When the block size is less than 16x16 (e.g., 16x16 samples, 16x16 luma samples), transform type (1020) is available for inter prediction.
[0118] In one example, Fig. 10A Applicable to luma components. For chroma components, the transform type (or transform kernel) selection can be performed implicitly. In one example, Fig. 10B As shown, for intra prediction residuals, the transform type can be selected according to the intra prediction mode. For inter prediction residuals, the transform type can be selected according to the transform type selection of the co-located luminance block. Therefore, in one example, the transform type for the chrominance component is not signaled in the bitstream.
[0119] For example, in AOMediaVideo2 (AV2), Line Graph Transform (LGT) can be used in transforms such as primary transforms. 8-bit / 10-bit transform kernels can be used in AV2. In one example, LGT includes various DCTs, Discrete Sine Transforms (DSTs) as described below. LGTs can include 32-point and 64-point one-dimensional (1D) DSTs.
[0120] A graph is a general mathematical structure comprising a set of vertices and a set of edges that can be used to model associations between objects of interest. A weighted graph in which a set of weights is assigned to edges and optionally to vertices can provide a sparse representation for robust modeling of signals / data. LGT can improve encoding and decoding efficiency by providing better adaptation for different block statistics. A separable LGT can be designed and optimized by learning line graphs from data to model the row and column-wise statistics of the basis of the residual signal of the block, and the associated generalized graph Laplacian (GGL) matrix can be used to derive the LGT.
[0121] Fig.11 The embodiment of the present disclosure shows a self-loop weight (eg, v c1 , v c2 ) and edge weight w c An example of a general LGT with features. Given a weighted graph G(W, V), the GGL matrix can be defined as follows.
[0122] L c =D-W+V (Equation 1)
[0123] where W can be a non-negative edge weight w c The adjacency matrix of , D can be an angle matrix, V can be a self-loop weight v c1 and v c2 The diagonal matrix of . Fig.12 The matrix L is shown c .
[0124] As shown below, the GGL matrix L c The LGT is derived by the eigendecomposition of .
[0125] L c =UΦU T (Equation 2)
[0126] Among them, the columns of the orthogonal matrix U can be the basis vectors of LGT, and Φ can be the diagonal eigenvalue matrix.
[0127] In various examples, certain DCTs and DSTs (e.g., DCT-2, DCT-8, and DST-7) are subsets of the set of LGTs derived from certain forms of GGL. c1 Set to 0 (for example, v c1 =0) to derive DCT-2. c1 Set to w c (For example, v c1 =w c ) to derive DST-7. c2 Set to w c (For example, v c2 =w c ) to derive DCT-8. c1 Set to 2w c (For example, v c1 =2w c ) to derive DST-4. c2 Set to 2w c (For example, v c2 =2w c ) to derive DCT-4.
[0128] In some examples, such as AV2, LGT can be implemented as a matrix multiplication. c Lieutenant General c1 Set to 2w c The four-point (4p) LGT kernel is derived from , so the 4p LGT kernel is DST-4. c Lieutenant General c1 Set to 1.5w c To derive the 8-point (8p) LGT kernel. In one example, v c1 Set to w c And v c2 Set to 0 to derive an LGT kernel (e.g., a 16-point (16p) LGT kernel, a 32-point (32p) LGT kernel, or a 64-point (64p) LGT kernel), and the LGT kernel can become DST-7.
[0129] According to various aspects of the present disclosure, a block may refer to a transform block (TB). In one example, a block or TB includes transform coefficients. A row in a block may refer to a row of transform coefficients in the block (e.g., TB). A column in a block may refer to a column of transform coefficients in the block (e.g., TB).
[0130] The letters "H" or "V" when added to a transform type may indicate that the transform type is applied only in the horizontal direction or the vertical direction, respectively. For example, V_DCT may refer to a 1D transform scheme that applies DCT only in the vertical direction, H_DCT may refer to a 1D transform scheme that applies DCT only in the horizontal direction, V_ADST may refer to a 1D transform scheme that applies ADST or any suitable non-DCT transform only in the vertical direction, and H_ADST may refer to a 1D transform scheme that applies ADST or any suitable non-DCT transform only in the horizontal direction. V_FLIPADST may refer to a 1D transform scheme that applies FLIPADST only in the vertical direction, and H_FLIPADST may refer to a 1D transform scheme that applies FLIPADST only in the horizontal direction. V_LGT may refer to a 1D transform scheme that applies LGT only in the vertical direction, and H_LGT may refer to a 1D transform scheme that applies LGT only in the horizontal direction. V_FLIPLGT may refer to a 1D transform scheme that applies FLIPLGT only in the vertical direction, and H_FLIPLGT may refer to a 1D transform scheme that applies FLIPLGT only in the horizontal direction, where FLIPLGT is a flipped version of LGT. In addition, V_KLT may refer to a 1D transform scheme that applies Karhunen-Loeve Transform (KLT) only in the vertical direction, and H_KLT may refer to a 1D transform scheme that applies KLT only in the horizontal direction.
[0131] A set of transform types with a transform skip mode in the horizontal direction may be referred to as a transform set A. The transform set A may include a transform in the vertical direction. The transforms in the transform set A may include a single or appropriate combination of predetermined transforms, such as V_DCT, V_ADST, V_FLIPADST, V_LGT, V_FLIPLGT, V_KLT, etc. In one example, the transforms in the transform set A include a primary transform in the vertical direction. In one example, the transforms in the transform set A include a primary transform in the vertical direction and a secondary transform in the vertical direction. In one example, the transform type set A exhaustively includes any or all combinations of predetermined transforms, such as DCT, ADST, FLIPADST, LGT, FLIPLGT and KLT in the vertical direction and a transform skip mode in the horizontal direction.
[0132] A set of transform types with a transform skip mode in the vertical direction may be referred to as a transform set B. The transform set B may include transforms in the horizontal direction. The transforms in the transform set B may include a single or appropriate combination of predetermined transforms, such as H_DCT, H_ADST, H_FLIPADST, H_LGT, H_FLIPLGT, H_KLT, etc. In one example, the transforms in the transform set B include a primary transform in the horizontal direction. In one example, the transforms in the transform set B include a primary transform in the horizontal direction and a secondary transform in the horizontal direction. In one example, the transform type set B exhaustively includes any or all combinations of predetermined transforms, such as DCT, ADST, FLIPADST, LGT, FLIPLGT and KLT in the horizontal direction and a transform skip mode in the vertical direction.
[0133] In one embodiment, a level-map coefficient coding scheme may be used, for example, in AV1. The level-map coefficient coding scheme is different from the related coding scheme that processes each 2D transform coefficient sequentially. An example of the level-map coefficient coding scheme is described below. For each transform unit (e.g., Fig.13A In the TB (1301) in the level map coefficient coding, the skip symbol may be encoded first, followed by a signal indicating the primary transform kernel type and the end-of-block (EOB) position if transform coding is not skipped. Subsequently, the coefficient values (i.e., the values of the transform coefficients in the transform unit) may be encoded in a multi-level map manner in conjunction with the coded symbol values.
[0134] In one example, a multi-level map includes three level maps encoded as three level planes, such as a low-level plane, a mid-level plane, and a high-level plane, and symbol values are encoded as separate planes. The low-level plane, the mid-level plane, and the high-level plane may correspond to different coefficient amplitude ranges. In one example, the low-level plane corresponds to a range of 0 to 2, the mid-level plane corresponds to a range of 3 to 14, and the high-level plane corresponds to a range of 15 and above. The three level planes may be encoded as follows: (a) the EOB position is encoded; (b) the low-level plane and the mid-level plane are encoded together in a reverse / backward scanning order, and the scanning order may refer to a zig-zag scan applied on the basis of the entire transform unit; (c) the symbol plane and the high-level plane are encoded together in a forward / forward scanning order; and (d) the remaining part (coefficient level minus 14) is entropy encoded using Exp-Golomb coding. The context model applied to the low-level plane can depend on the primary transform direction (e.g., bidirectional, horizontal and vertical) and the transform size, and can use up to five neighboring coefficients in the frequency domain to derive the context. The mid-level plane can use a similar context model. In one example, the number of context neighboring coefficients is reduced from 5 to 2. The high-level plane can be encoded using exponential Golomb coding without using a context model.
[0135] Fig.13A An example of a TB (1301) and neighboring blocks (e.g., TB (1302) and (1303)) according to an embodiment of the present disclosure is shown. TB (1301) may include transform coefficients (e.g., t11-t14, t21-t24, t31-t34, and t41-t44). In some examples, the transform coefficient t11 is a DC transform coefficient having a DC (direct current) spatial frequency, and the remaining transform coefficients in TB (1301) are AC transform coefficients having an AC (alternating current) spatial frequency.
[0136] A DC symbol (or DC symbol value) may be encoded and decoded using a context modeling method. For example, a symbol value of a DC coefficient in a transform unit (e.g., a DC transform coefficient t11 in TB (1301)) may be encoded and decoded using a context modeling method. In one example, when the DC coefficient is negative, the DC symbol value is "1", and when the DC coefficient is positive, the DC symbol value is "0". Context information may be derived using a weighted average of DC signal values of adjacent blocks of the transform unit. In one example, as described in the following equation 3, context information is derived using a DC symbol value (e.g., dc_sign(i), where i is 1) of an upper adjacent block (e.g., TB (1302)) and a DC symbol value (e.g., dc_sign(i), where i is 2) of a left adjacent block (e.g., TB (1303)). The weight may depend on the length of the intersection (or intersection length) of an adjacent transform block with a transform unit (e.g., a current TB) (e.g., overlap(i, curr_block), where i is 1 or 2). The intersection length between the first block and the second block may refer to the number of transform coefficients in the first block that are adjacent to the transform coefficients in the second block. For example, since the four transform coefficients (t11-t14) in TB(1301) are adjacent to the four transform coefficients (a41-a44) in TB(1302), the intersection length (e.g., overlap(1, curr_block)) between TB(1301) and TB(1302) is 4. Since the two transform coefficients (t11 and t21) in TB(1301) are adjacent to the two transform coefficients (l12 and l22) in TB(1303), the intersection length (e.g., overlap(2, curr_block)) between TB(1301) and TB(1303) is 2.
[0137] As shown in Equation 4, the derived context information can be used as an index (e.g., dc_ctx) to access three different contexts for encoding and decoding the DC symbol. For example, if the weighted average is 0, the context corresponding to index 0 is used; if the weighted average is less than 0, the context corresponding to index 1 is used; if the weighted average is greater than 0, the context corresponding to index 2 is used. The symbol values of other coefficients in the transform unit can be directly encoded and decoded without using the context model.
[0138] dc_sum=∑ i∈neighbors dc_sign(i)*overlap(i,curr_block) (Equation 3)
[0139] dc_ctx=0 if dc_sum=0,
[0140] =1 if dc_sum<0,
[0141] =2 if dc_sum>0, (Equation 4)
[0142] The symbol values of other transform coefficients (eg, AC transform coefficients) in the TB (1301) may be directly encoded and decoded without using a context model.
[0143] As mentioned above Fig.13A As described, in some examples, the DC symbol encoding and decoding utilizes only the DC symbols of the upper neighboring blocks and the left neighboring blocks to derive the context for encoding and decoding the DC symbol of the DC transform coefficient in the current transform block. In one example, the DC symbol encoding and decoding utilizes only the DC symbols of the upper neighboring blocks and the left neighboring blocks to derive context information, and the context information can be used to derive the context for encoding and decoding the DC symbol of the DC transform coefficient in the current transform block. For a TB using a transform type that includes a transform skip mode in one direction, the transform coefficients in the top row (if the horizontal transform skip mode is used) or the coefficients in the left column (if the vertical transform skip mode is used) are DC coefficients. Therefore, in some examples, applying context modeling to entropy encode and decode only the sign of the first transform coefficient can be suboptimal because the symbol values show strong row-by-row correlation (for the horizontal transform skip mode) or column-by-column correlation (for the vertical transform skip mode).
[0144] A 1D transform skip mode may refer to a transform skip mode on one dimension (e.g., a horizontal dimension or a vertical dimension), and thus, a transform (e.g., a primary transform, a combination of a primary transform and a secondary transform) with a 1D transform skip mode is performed on one dimension of a block. A 1D transform may refer to a transform applied to only one dimension of a block, wherein the transform includes a 1D transform skip mode. A 1D transform may refer to a 1D horizontal transform or a 1D vertical transform. A 1D horizontal transform may refer to a transform applied to only the horizontal dimension of a block, wherein the transform includes a 1D transform skip mode on the vertical dimension. A 1D vertical transform may refer to a transform applied to only the vertical dimension of a block, wherein the transform includes a 1D transform skip mode on the horizontal dimension.
[0145] 2D transform skip mode may refer to a transform skip mode on two dimensions (e.g., horizontal dimension and vertical dimension), so there is no transform on the block and the transform matrix is an identity matrix. When there is no transform skip mode, the transform may be performed on both dimensions on the block.
[0146] According to aspects of the present disclosure, context may be used to entropy encode and decode one or more symbol values of one or more transform coefficients in a block (e.g., TB, CB, PB, luma block, chroma block, luma TB, chroma TB, etc.) using a 1D transform. The block may be any suitable block, such as a luma block, a chroma block, etc. The context used may be any suitable context, such as symbol information (e.g., one or more symbol values) of one or more other transform coefficients in the block. In one example, context may be used to entropy encode and decode one or more symbol values of one or more transform coefficients in a block using a transform type in transform set A. In one example, context may be used to entropy encode and decode one or more symbol values of one or more transform coefficients in a block using a transform type in transform set B.
[0147] According to various aspects of the present disclosure, encoding information of a block (e.g., a TB) may be decoded from an encoded video bitstream. The encoding information may indicate a transform skip mode for the block in one direction. The symbol value of a current transform coefficient in the TB may be encoded (e.g., encoded or decoded) based on a previously encoded (e.g., encoded or decoded) symbol value of a previous transform coefficient. The current transform coefficient and the previous transform coefficient may be in the same row or column in the TB. The same row or the same column may be along one direction of the transform skip mode. In addition, the current transform coefficient in the TB may be determined based on the encoded (e.g., encoded or decoded) symbol value of the previous transform coefficient. In one example, the symbol value of the current transform coefficient in the TB is decoded based on the previously decoded symbol value of the previous transform coefficient and one or more previously decoded symbol values of the corresponding one or more transform coefficients in the same row or column.
[0148] In one example, the one direction is a horizontal direction. The same row or the same column is the same row along the one direction of the transform skip mode. Therefore, the transform is a 1D vertical transform, such as a transform type in transform set A. The symbol value of the current transform coefficient in the TB can be encoded (e.g., encoded or decoded) based on the previously encoded (e.g., encoded or decoded) symbol value of the previous transform coefficient in the same row along the one direction of the transform skip mode. In one example, the same row is restricted to one of a subset of rows in the TB.
[0149] In one embodiment, a context derivation process for entropy encoding and decoding a symbol value of a current transform coefficient in a block using a transform type in transform set A is based on at least one previously encoded symbol value of at least one previous transform coefficient in the same row. Typically, the context used may include symbol information (e.g., at least one previously encoded symbol value) of one or more other transform coefficients (e.g., at least one previous transform coefficient) in the same row.
[0150] Fig. 13B A TB (1301) is shown transformed using a 1D transform skip mode in a vertical dimension or a horizontal dimension. Therefore, except for the first transform coefficient (eg, t11), the remaining transform coefficients in the first column (1321) or the first row (1311) may be DC transform coefficients.
[0151] refer to Fig. 13B , TB (1301) is transformed using a transform type in transform set A (e.g., a 1D vertical transform with a 1D transform skip mode in the horizontal dimension). The first row (1311) includes DC transform coefficients t11-t14. In one example, a symbol value of one transform coefficient (e.g., t13) of the first row (1311) is entropy encoded and decoded using a context derivation process based on one or more previously encoded and decoded transform coefficients (e.g., t11 and / or t12) in the first row (1311). The above description can be appropriately applied to encoding and decoding other transform coefficients in row 1311.
[0152] Rows (1312)-rows (1314) include AC transform coefficients having AC spatial frequencies. The above description may be appropriately applied to one or more of rows (1312)-rows (1314). In one example, a symbol value of a transform coefficient (e.g., t24) of the second row (1312) is entropy encoded and decoded using a context derivation process based on one or more previously encoded and decoded transform coefficients (e.g., t21, t22, and / or t23) in the second row (1312). In one example, a default context is used to encode and decode the first transform coefficient (e.g., t21) in the row (e.g., row (1312)). Optionally, use of context for entropy encoding and decoding of symbol values is enabled only for a subset of rows in a block using a transform type in transform set A (e.g., row (1311), or rows (1311)-(1312), etc.). In one example, the use of context for entropy encoding and decoding of symbol values is enabled only for rows (1311)-row (1312), and the symbol values of rows (1313)-row (1314) can be directly encoded and decoded without using a context model.
[0153] In one example, the one direction is a vertical direction. The same row or the same column is the same column along the one direction of the transform skip mode. Therefore, the transform is a 1D horizontal transform, such as a transform type in transform set B. The symbol value of the current transform coefficient in the TB can be encoded (e.g., encoded or decoded) based on the previously encoded (e.g., encoded or decoded) symbol value of the previous transform coefficient in the same column along the one direction of the transform skip mode. In one example, the same column is restricted to one of a subset of columns in the TB.
[0154] In one embodiment, a context derivation process for entropy encoding and decoding a symbol value of a current transform coefficient in a block using a transform type in transform set B is based on at least one previously encoded symbol value of at least one previous transform coefficient in the same column. In general, the context used may include symbol information (e.g., at least one previously encoded symbol value) of one or more other transform coefficients (e.g., at least one previous transform coefficient) in the same column.
[0155] Return to reference Fig. 13B , TB (1301) is transformed using a transform type in transform set B (e.g., a 1D horizontal transform with a 1D vertical skip). The first column (1321) includes DC transform coefficients t11, t21, t31, and t41. In one example, a symbol value of a transform coefficient (e.g., t31) in the first column (1321) is entropy encoded and decoded using a context derivation process based on one or more previously encoded and decoded transform coefficients (e.g., t11 and / or t21) in the first column (1321). The above description can be appropriately applied to encoding and decoding other transform coefficients in column 1321.
[0156] Columns (1322)-column (1324) include AC transform coefficients having AC spatial frequencies. The above description may be appropriately applied to one or more of columns (1322)-column (1324). In one example, a symbol value of a transform coefficient (e.g., t42) in the second column (1322) is entropy encoded and decoded using a context derivation process based on one or more previously encoded and decoded transform coefficients (e.g., t12, t22, and / or t32) in the second column (1322). In one example, a default context is used to encode and decode the first transform coefficient (e.g., t12) in the column (e.g., column (1322)). Optionally, use of context for entropy encoding and decoding of symbol values is enabled only for a subset of columns in a block using a transform type in transform set B (e.g., column (1321), or columns (1321)-column (1322), etc.). In one example, the use of context for entropy encoding and decoding symbol values is enabled only for columns (1321)-column (1322), and the symbol values of columns (1323)-column (1324) can be directly encoded and decoded without using a context model.
[0157] In one embodiment, a TB (e.g., t12) may be decoded based on previously decoded symbol values of previous transform coefficients (e.g., t12), previously decoded symbol values of DC transform coefficients in the upper neighboring block of the TB, and previously decoded symbol values of DC transform coefficients in the left neighboring block of the TB. Fig. 13B The DC transform coefficient in the upper neighboring block of the TB and the DC transform coefficient in the left neighboring block of the TB have a DC spatial frequency.
[0158] In one example, for example, the symbol value of the current transform coefficient in the TB may be decoded based on previously decoded symbol values of previous transform coefficients and based on a weighted average of previously decoded symbol values of DC transform coefficients in an upper neighboring block of the TB and previously decoded symbol values of DC transform coefficients in a left neighboring block of the TB (e.g., as shown in Equation 3). The weights may be based on the number of transform coefficients in the upper neighboring block adjacent to the transform coefficient in the TB and the number of transform coefficients in the left neighboring block adjacent to the transform coefficient in the TB, respectively. The position of the previous transform coefficient in the TB may be adjacent to the position of the current transform coefficient in the TB. The position of the previous transform coefficient in the TB may be adjacent to the position of the current transform coefficient in the TB along a scan direction. The scan direction may be based on a scan order for encoding the symbol values of the transform coefficients in the TB.
[0159] A context derivation process (e.g., the context derivation process described by equations (3)-(4)) can be improved for entropy encoding and decoding one or more symbol values of one or more transform coefficients in a block using a transform type from one of set A and set B. In one embodiment, the context derivation process for entropy encoding and decoding one or more symbol values of one or more transform coefficients in a block is based not only on one or more neighboring blocks (e.g., a weighted average of DCI symbol values of an upper neighboring block and a DC symbol value of a left neighboring block), but also on at least one previously encoded and decoded symbol value of at least one neighboring coefficient in the block (if available). In general, the context for entropy encoding and decoding the symbol value of the transform coefficient in the block may include symbol information of one or more other blocks (e.g., an upper neighboring block, and / or a left neighboring block, etc.), and / or symbol information of one or more other transform coefficients in the block, etc. In one example, at least one neighboring coefficient depends on a scanning order for encoding the symbol value of the block. The at least one neighboring coefficient may be a transform coefficient in the block that is encoded and decoded before the one or more transform coefficients according to the scanning order.
[0160] refer to Fig. 13B , TB (1301) is transformed using a 1D transform skip mode in a vertical dimension or a horizontal dimension. Therefore, except for the first transform coefficient t11, the remaining transform coefficients in the first column (1321) or the first row (1311) can be DC transform coefficients. The context derivation process for entropy encoding and decoding the symbol value of one of the DC transform coefficients in TB (1301) can be based on other TBs (e.g., TB (1302)-TB (1303)) and at least one previously decoded symbol value of at least one adjacent coefficient in TB (1301). In one example, the at least one adjacent coefficient is in the same row or column as one of the DC transform coefficients. In one example, one of the at least one adjacent coefficient is in a different row and a different column than one of the DC transform coefficients.
[0161] In one example, TB (1301) uses a transform type in transform set A, and row (1311) includes DC transform coefficients t11-t14. The symbol value of one (e.g., t13) of the DC transform coefficients t11-t14 can be based on the DC symbol value of TBs (1302)-(1303), respectively, and on the previously decoded symbol value of the adjacent coefficient t12 in TB (1301).
[0162] The symbol value of one of the AC transform coefficients in TB(1301) (e.g., t23) can be based on the DC symbol values of TB(1302)-TB(1303), respectively, and on the previously decoded symbol values of adjacent coefficients in TB(1301) (e.g., t13, or t22, etc.).
[0163] When one or more of the neighboring blocks use a 1D transform skip mode, the above description may be appropriately adjusted. In one embodiment, one of the neighboring blocks (e.g., TB (1303)) uses a 1D horizontal skip mode, so the first row includes DC transform coefficients l11-l12. The context derivation process for entropy encoding and decoding the symbol values of the transform coefficients in the block may be based on one or more DC symbol values of l11-l12, the DC symbol value of TB (1302), and at least one previously encoded symbol value of at least one neighboring coefficient in TB (1301) (if available).
[0164] In one example, the TB uses a 1D transform skip mode in the horizontal direction, and a flag indicating whether the symbol values of the transform coefficients in the same row are the same may be decoded. In one example, the transform coefficients in the same row include a current transform coefficient and a previous transform coefficient, wherein, as described above, the symbol value of the current transform coefficient in the TB may be encoded (e.g., encoded or decoded) based on a previously encoded (e.g., encoded or decoded) symbol value of the previous transform coefficient.
[0165] In one embodiment, the sign control information (eg, a flag) is used to indicate that when the transform type for a block is one of the transform set A, at the block (eg, Fig. 13B 1301)) (e.g., Fig. 13B In one example, the sign control information is used only when the number of non-zero transform coefficients in the row (1311) is greater than a threshold. In one example, the sign control information is used only when the block dimension (e.g., width) of the block is equal to or greater than a threshold. In one example, each row in the block uses separate sign control information. For example, a separate flag is used to indicate whether the signs (e.g., all signs) of the transform coefficients in the corresponding rows of the block are the same.
[0166] In one example, symbol control information is used (eg, signaled) only for a subset of rows in a block, wherein each of the symbol control information is used to indicate whether signs (eg, all signs) of transform coefficients in a corresponding row of the block are the same.
[0167] In one example, the sign control information is used (e.g., signaled) for every N consecutive transform coefficients in a row. In another example, the sign control information is used (e.g., signaled) for every N consecutive non-zero transform coefficients in a row. Exemplary values of N may include, but are not limited to, 4, 8, 16.
[0168] In one example, if the symbol control information indicates that all symbols in a row are the same (eg, a flag is true), then no additional symbol information is encoded for that row.
[0169] In one example, if the symbol control information indicates that all symbols in a row are the same (eg, a flag is true), additional symbol control information (eg, another flag) is signaled to indicate the symbol values for the row.
[0170] In one example, if the sign control information indicates that not all symbols in a row are the same (eg, the flag is false), sign information (eg, corresponding symbol values) is encoded for each transform coefficient in the row.
[0171] In one example, if the sign control information indicates that not all signs in a row are the same (e.g., the flag is false), and the sign information of all non-zero transform coefficients in the row except the last non-zero transform coefficient (in scanning order) is the same and is signaled, then the sign information of the last non-zero transform coefficient is not signaled, and the sign information of the last non-zero transform coefficient is derived as the inverse value of the sign value of the preceding non-zero transform coefficient in the row. Fig. 13B , in one example, t21-t24 in row (1312) are +4, +1, 0, and -2. The sign values of all non-zero transform coefficients in row (1312) except the last non-zero transform coefficient (t24) are the same (positive) and are signaled. This flag is false, indicating that not all sign values of the non-zero transform coefficients in the row (1312) are the same. Therefore, it can be deduced that the sign information of the last non-zero transform coefficient (t24) is negative (e.g., the opposite value of the sign values of the previous non-zero transform coefficients (t21 and t22) in the row).
[0172] In one embodiment, the sign control information (eg, a flag) is used to indicate that when the transform type for a block is one of the transform sets B, in the block (eg, Fig. 13B TB(1301)) in the column (for example, Fig. 13BIn one example, the symbol control information is used only when the number of non-zero transform coefficients in the column is greater than a threshold. In one example, the symbol control information is used only when the block dimension (e.g., height) of the block is equal to or greater than the threshold. In one example, each column in the block uses separate symbol control information. For example, a separate flag is used to indicate whether the signs (e.g., all the signs) of the transform coefficients in the corresponding columns of the block are the same.
[0173] In one example, symbol control information is used (eg, signaled) only for a subset of columns in a block, wherein each of the symbol control information is used to indicate whether signs (eg, all signs) of transform coefficients in a corresponding column of the block are the same.
[0174] In one example, the sign control information is used (e.g., signaled) for every M consecutive transform coefficients in a column. In another example, the sign control information is used (e.g., signaled) for every M consecutive non-zero transform coefficients in a column. Exemplary values of M may include, but are not limited to, 4, 8, 16.
[0175] In one example, if the symbol control information indicates that all symbols in a column are the same (eg, a flag is true), then no additional symbol information is encoded for that column.
[0176] In one example, if the symbol control information indicates that all symbols in a column are the same (eg, a flag is true), additional symbol control information (eg, another flag) is signaled to indicate the symbol values for the column.
[0177] In one example, if the symbol control information indicates that not all symbols in a column are the same (eg, the flag is false), then the symbol information (eg, the corresponding symbol value) is encoded for each transform coefficient in the column.
[0178] In one example, if the sign control information indicates that not all signs in a column are the same (e.g., the flag is false), and the sign information of all non-zero transform coefficients in the column except for the last non-zero transform coefficient (in scanning order) is the same and is signaled, then the sign information of the last non-zero transform coefficient is not signaled and the sign information of the last non-zero transform coefficient is derived as the inverse of the sign value of the previous non-zero transform coefficient in the column. Fig. 13B, in one example, t12, t22, t32, and t42 in column (1322) are +4, +1, 0, and -2. The sign values of all non-zero transform coefficients in column (1322) except the last non-zero transform coefficient (t42) are the same (positive) and are signaled. This flag is false, indicating that not all sign values of the non-zero transform coefficients in column (1322) are the same. Therefore, it can be deduced that the sign information of the last non-zero transform coefficient (t42) is negative (e.g., the opposite value of the sign values of the previous non-zero transform coefficients (t12 and t22) in the column).
[0179] According to various aspects of the present disclosure, the context for entropy coding and decoding one or more symbol values of one or more transform coefficients may depend on the primary transform type and / or the secondary transform kernel (or type). In one example, the context for entropy coding and decoding one or more symbol values of the current block (e.g., TB) depends on whether 1D IDTX or 2D IDTX is used. For example, if 1D IDTX is used, the transform of the current block is a 1D transform, and as described above, the context or context modeling may be used to entropy code and decode one or more symbol values of multiple transform coefficients in the current block. For example, if 2D IDTX is used, the current block is not transformed. In some examples, the context may be used to entropy code and decode one or more symbol values of multiple transform coefficients in the current block.
[0180] In one example, the context for entropy encoding and decoding the symbol values of the current block depends on whether a secondary transform is applied to the current block.
[0181] Fig.14 A flow chart of an overview process (1400) according to an embodiment of the present disclosure is shown. The process (1400) may be used in the reconstruction of a block (e.g., a TB). In various embodiments, the process (1400) is performed by a processing circuit. The processing circuit may be, for example, a processing circuit in a terminal device (310), a terminal device (320), a terminal device (330), and a terminal device (340), a processing circuit that performs the functions of a video encoder (403), a processing circuit that performs the functions of a video decoder (410), a processing circuit that performs the functions of a video decoder (510), a processing circuit that performs the functions of a video encoder (603), and the like. In some embodiments, the process (1400) is implemented in software instructions, so that when the processing circuit executes the software instructions, the processing circuit performs the process (1400). The process starts at (S1401) and proceeds to (S1410).
[0182] At (S1410), encoding information of a block may be decoded from an encoded video bitstream. The encoding information may indicate a transform skip mode of the block in one direction (eg, horizontal direction or vertical direction).
[0183] At (S1420), a symbol value of a current transform coefficient in a block may be decoded based on a previously decoded symbol value of a previous transform coefficient. The current transform coefficient and the previous transform coefficient may be in the same row or column in the block. The same row or column may be along one direction of the transform skip mode.
[0184] In one example, when the one direction is a horizontal direction, the same row or the same column is the same row along one direction of the transform skip pattern. The symbol value of the current transform coefficient in the block may be decoded based on a previously decoded symbol value of a previous transform coefficient in the same row along one direction of the transform skip pattern. In one example, the same row is restricted to one of a subset of rows in the block.
[0185] In one example, when the one direction is a vertical direction, the same row or the same column is the same column along one direction of the transform skip pattern. The symbol value of the current transform coefficient in the block may be decoded based on a previously decoded symbol value of a previous transform coefficient in the same column along one direction of the transform skip pattern. In one example, the same column is restricted to one of a subset of columns in the block.
[0186] At (S1430), the current transform coefficient in the block may be determined based on the decoded symbol value of the current transform coefficient. The process (1400) proceeds to (S1499) and ends.
[0187] The process (1400) may be adjusted appropriately. One or more steps in the process (1400) may be modified and / or omitted. One or more additional steps may be added. Any suitable order of implementation may be used.
[0188] In one example, a flag or other symbol control information is decoded, the flag or other symbol control information being used to indicate whether the symbol values of transform coefficients in the same row are the same. In one example, the transform coefficients in the same row include a current transform coefficient and a previous transform coefficient.
[0189] In one example, a flag or other symbol control information is decoded, the flag or other symbol control information being used to indicate whether the symbol values of transform coefficients in the same column are the same. In one example, the transform coefficients in the same column include a current transform coefficient and a previous transform coefficient.
[0190] In one example, a symbol value of a current transform coefficient in a TB is decoded based on a previously decoded symbol value of a previous transform coefficient and at least one previously decoded symbol value of a DC transform coefficient in another block (e.g., a neighboring block). For example, a symbol value of a current transform coefficient in a TB is decoded based on a previously decoded symbol value of a previous transform coefficient, a previously decoded symbol value of a DC transform coefficient in an upper neighboring block of the TB, and a previously decoded symbol value of a DC transform coefficient in a left neighboring block of the TB. The DC transform coefficient in the upper neighboring block of the TB and the DC transform coefficient in the left neighboring block of the TB may have a DC spatial frequency.
[0191] In one example, a symbol value of a current transform coefficient in a TB is decoded based on the previously decoded symbol value of the previous transform coefficient and based on a weighted average of (i) previously decoded symbol values of DC transform coefficients in an upper neighboring block of the TB and (ii) previously decoded symbol values of DC transform coefficients in a left neighboring block of the TB. The weight of the previously decoded symbol value of the DC transform coefficient in the upper neighboring block of the TB depends on the number of transform coefficients in the upper neighboring block that are adjacent to the transform coefficient in the TB, and the weight of the previously decoded symbol value of the DC transform coefficient in the left neighboring block of the TB depends on the number of transform coefficients in the left neighboring block that are adjacent to the transform coefficient in the TB. The position of the previous transform coefficient in the TB is adjacent to the position of the current transform coefficient in the TB.
[0192] In one example, the location of the previous transform coefficient in the TB is adjacent to the location of the current transform coefficient in the TB along the scan direction.The scan direction is based on a scan order used to encode the symbol values of the transform coefficients in the TB.
[0193] In one example, the symbol value of the current transform coefficient in the TB is decoded based on the previously decoded symbol value of the previous transform coefficient and one or more previously decoded symbol values of the corresponding one or more transform coefficients in the same row or column.
[0194] The embodiments of the present disclosure may be applied to any suitable block, such as a luminance block and / or a chrominance block. The embodiments of the present disclosure may be used alone or in combination in any order. In addition, each of the method (or embodiment), encoder, and decoder may be implemented by a processing circuit (e.g., one or more processors or one or more integrated circuits). In one example, one or more processors execute a program stored in a non-transitory computer-readable medium.
[0195] The above techniques may be implemented as computer software using computer-readable instructions and physically stored in one or more computer-readable media. Fig.15 A computer system (1500) suitable for implementing certain embodiments of the disclosed subject matter is shown.
[0196] Computer software may be encoded using any suitable machine code or computer language that may be subjected to assembly, compilation, linking or similar mechanisms to create code comprising instructions that may be executed directly by one or more computer central processing units (CPUs), graphics processing units (GPUs), etc., or through decoding, microcode, etc.
[0197] The instructions may be executed on various types of computers or components thereof, including, for example, personal computers, tablet computers, servers, smart phones, gaming devices, IoT devices, etc.
[0198] Fig.15 The components of the computer system (1500) shown are exemplary in nature and are not intended to impose any limitation on the scope of use or functionality of computer software implementing embodiments of the present application. The configuration of components should not be interpreted as having any dependency or requirement related to any one or combination of components shown in the exemplary embodiment of the computer system (1500).
[0199] The computer system (1500) may include certain human-machine interface input devices. Such human-machine interface input devices may respond to input from one or more human users through, for example, tactile input (e.g., keystrokes, swipes, data glove movements), audio input (e.g., voice, clapping), visual input (e.g., gestures), olfactory input (not depicted). The human-machine interface device may also be used to capture certain media that are not necessarily directly related to human conscious input, such as audio (e.g., voice, music, ambient sound), images (e.g., scanned images, photographic images obtained from a still image camera), video (e.g., two-dimensional video, three-dimensional video including stereoscopic video), etc.
[0200] The input human-machine interface device may include one or more of the following (only one of each is shown): keyboard (1501), mouse (1502), touch pad (1503), touch screen (1510), data gloves (not shown), joystick (1505), microphone (1506), scanner (1507), camera (1508).
[0201] The computer system (1500) may also include certain human-machine interface output devices. Such human-machine interface output devices may stimulate one or more human user senses, for example, through tactile output, sound, light, and smell / taste. Such human-machine interface output devices may include tactile output devices (e.g., tactile feedback of a touch screen (1510), a data glove (not shown), or a joystick (1505), but may also be a tactile feedback device that is not an input device), audio output devices (e.g., speakers (1509), headphones (not shown)), visual output devices (e.g., screens (1510) including CRT screens, LCD screens, plasma screens, OLED screens, each with or without touch screen input capabilities, each with or without tactile feedback capabilities, some of which are capable of outputting two-dimensional visual outputs or outputs in more than three dimensions through devices such as stereoscopic image output, virtual reality glasses (not depicted), holographic displays and smoke boxes (not depicted), and printers (not depicted).
[0202] The computer system (1500) may also include human-accessible storage devices and their associated media: for example, optical media including CD / DVD ROM / RW (1520) with CD / DVD etc. media (1521), thumb drives (1522), removable hard drives or solid-state drives (1523), traditional magnetic media such as tapes and floppy disks (not shown), dedicated ROM / ASIC / PLD based devices such as security dongles (not shown), etc.
[0203] Those skilled in the art should also understand that the term "computer-readable media" used in connection with the presently disclosed subject matter does not encompass transmission media, carrier waves, or other transitory signals.
[0204] The computer system (1500) may also include an interface (1554) to one or more communication networks (1555). The network may be, for example, a wireless network, a wired network, an optical network. The network may further be a local network, a wide area network, a metropolitan area network, a vehicle and industrial network, a real-time network, a delay-tolerant network, etc. Examples of networks include local area networks such as Ethernet, wireless LANs, cellular networks including GSM, 3G, 4G, 5G, LTE, etc., television wired or wireless wide area digital networks including cable television, satellite television, and terrestrial broadcast television, vehicle and industrial television including CANBus, etc. Some networks typically require an external network interface adapter connected to some common data port or peripheral bus (1549) (e.g., a USB port of the computer system (1500)); as described below, other network interfaces are typically integrated into the kernel of the computer system (1500) by connecting to the system bus (e.g., connecting to an Ethernet interface in a PC computer system or connecting to a cellular network interface in a smartphone computer system). The computer system (1500) can use any of these networks to communicate with other entities. Such communications may be one-way receive only (e.g., broadcast television), one-way send only (e.g., a CANbus connected to certain CANbus devices), or bidirectional, for example, using a LAN or WAN digital network to connect to other computer systems. As described above, certain protocols and protocol stacks may be used on each of those networks and network interfaces.
[0205] The above-mentioned human-machine interface device, human-machine accessible storage device, and network interface may be attached to the kernel ( 1540 ) of the computer system ( 1500 ).
[0206] The kernel (1540) may include one or more central processing units (CPUs) (1541), graphics processing units (GPUs) (1542), dedicated programmable processing units in the form of field programmable gate arrays (FPGAs) (1543), hardware accelerators (1544) for certain tasks, graphics adapters (1550), etc. These devices, as well as read-only memory (ROM) (1545), random access memory (1546), internal mass storage (1547) such as internal non-user accessible hard drives, SSDs, etc., may be connected via a system bus (1548). In some computer systems, the system bus (1548) may be accessed in the form of one or more physical plugs to enable expansion by additional CPUs, GPUs, etc. Peripheral devices may be connected directly to the kernel's system bus (1548) or to the kernel's system bus (1548) via a peripheral bus (1549). For example, a screen (1510) may be connected to a graphics adapter (1550). The architecture of the peripheral bus includes PCI, USB, etc.
[0207] The CPU (1541), GPU (1542), FPGA (1543) and accelerator (1544) can execute certain instructions, which can be combined to constitute the above-mentioned computer code. The computer code can be stored in ROM (1545) or RAM (1546). Transition data can also be stored in RAM (1546), while permanent data can be stored, for example, in internal mass storage (1547). Fast storage and retrieval to any storage device can be performed by using a cache, which can be closely associated with the following: one or more CPUs (1541), GPUs (1542), mass storage (1547), ROM (1545), RAM (1546), etc.
[0208] The computer readable medium may have thereon computer codes for performing various computer-implemented operations. The medium and computer codes may be those specially designed and constructed for the purposes of the present disclosure, or the medium and computer codes may be of a type well known and available to those skilled in the art of computer software.
[0209] As a non-limiting example, a computer system having an architecture (1500), particularly a kernel (1540), can provide functionality due to one or more processors (including CPUs, GPUs, FPGAs, accelerators, etc.) executing software contained in one or more tangible computer-readable media. Such computer-readable media can be media associated with user-accessible mass storage as described above, as well as memory of certain non-temporary kernels (1540), such as kernel internal mass storage (1547) or ROM (1545). Software implementing various embodiments of the present application can be stored in such devices and executed by the kernel (1540). Depending on specific needs, the computer-readable medium may include one or more storage devices or chips. The software can cause the kernel (1540), particularly the processors therein (including CPUs, GPUs, FPGAs, etc.), to perform specific processes or specific parts of specific processes described herein, including defining data structures stored in RAM (1546) and modifying such data structures according to processes defined by the software. Additionally or alternatively, the computer system may provide functionality due to logic hardwired or otherwise embodied in circuitry (e.g., accelerator (1544)) that may replace software or operate in conjunction with software to perform specific processes or specific portions of specific processes described herein. Where appropriate, references to portions of software may include logic and vice versa. Where appropriate, references to portions of computer-readable media may include circuitry (e.g., integrated circuits (ICs)) storing software for execution, circuitry embodying logic for execution, or both. The present application includes any suitable combination of hardware and software.
[0210] Appendix A: Abbreviations
[0211] JEM: Joint Exploration Model
[0212] VVC: Next Generation Video Coding
[0213] BMS: Benchmark Set
[0214] MV: Motion Vector
[0215] HEVC: High Efficiency Video Coding
[0216] SEI: Supplemental Enhancement Information
[0217] VUI: Video Availability Information
[0218] GOP: Group of Pictures
[0219] TU: Transform Unit
[0220] PU: prediction unit
[0221] CTU: Coding Tree Unit
[0222] CTB: Coding Tree Block
[0223] PB: prediction block
[0224] HRD: Hypothetical Reference Decoder
[0225] SNR: Signal to Noise Ratio
[0226] CPU: Central Processing Unit
[0227] GPU: Graphics Processing Unit
[0228] CRT: cathode ray tube
[0229] LCD: Liquid Crystal Display
[0230] OLED: Organic Light Emitting Diode
[0231] CD: compact disc
[0232] DVD: Digital Video Disc
[0233] ROM: Read Only Memory
[0234] RAM: Random Access Memory
[0235] ASIC: Application-Specific Integrated Circuit
[0236] PLD: Programmable Logic Device
[0237] LAN: Local Area Network
[0238] GSM: Global System for Mobile Communications
[0239] LTE: Long Term Evolution
[0240] CANBus: Controller Area Network Bus
[0241] USB: Universal Serial Bus
[0242] PCI: Peripheral Component Interconnect
[0243] FPGA: Field Programmable Gate Array
[0244] SSD: Solid State Drive
[0245] IC: Integrated Circuit
[0246] CU: Coding Unit
[0247] Although the present application has described a number of exemplary embodiments, there are modifications, permutations, and various replacement equivalents that fall within the scope of the present application. Therefore, it should be understood that those skilled in the art will be able to design many systems and methods that, although not explicitly shown or described herein, embody the principles of the present application and therefore fall within the spirit and scope of the present application.
Claims
1. A method for video decoding, comprising: Decoding encoding information of a transform block TB from an encoded video bitstream, the encoding information indicating a transform skip mode of the TB in a first direction; decoding a symbol value of a current transform coefficient in the TB based on a previously decoded symbol value of a previous transform coefficient, wherein the current transform coefficient and the previous transform coefficient are in a same row or a same column in the TB, the same row or the same column being along the first direction of the transform skip mode, the symbol value of the current transform coefficient in the TB being decoded in the following manner: when the first direction is a horizontal direction, the same row or the same column is the same row along the first direction of the transform skip mode, and the symbol value of the current transform coefficient in the TB is decoded based on the previously decoded symbol value of the previous transform coefficient in the same row along the first direction of the transform skip mode; when the first direction is a vertical direction, the same row or the same column is the same column along the first direction of the transform skip mode, and the symbol value of the current transform coefficient in the TB is decoded based on the previously decoded symbol value of the previous transform coefficient in the same column along the first direction of the transform skip mode; and The current transform coefficient in the TB is determined based on the decoded symbol value of the current transform coefficient.
2. The method according to claim 1, characterized in that When the first direction is a horizontal direction, the same row is restricted to be one of a subset of rows in the TB.
3. The method according to claim 1, characterized in that When the first direction is a vertical direction, the same column is restricted to be one of a subset of columns in the TB.
4. The method according to claim 1 or 2, characterized in that: The step of decoding the coding information of the transform block TB from the coded video bit stream comprises: A flag is decoded, the flag indicating whether the sign values of the transform coefficients in the same row are the same, wherein the transform coefficients in the same row include the current transform coefficient and the previous transform coefficient.
5. The method according to claim 1 or 3, characterized in that: The step of decoding the coding information of the transform block TB from the coded video bit stream comprises: A flag is decoded, the flag indicating whether the sign values of the transform coefficients in the same column are the same, wherein the transform coefficients in the same column include the current transform coefficient and the previous transform coefficient.
6. The method according to any one of claims 1 to 3, characterized in that The decoding of the symbol value of the current transform coefficient in the TB comprises: The symbol value of the current transform coefficient in the TB is decoded based on the previously decoded symbol value of the previous transform coefficient, the previously decoded symbol value of the DC transform coefficient in the upper neighboring block of the TB, and the previously decoded symbol value of the DC transform coefficient in the left neighboring block of the TB, wherein the DC transform coefficient in the upper neighboring block of the TB and the DC transform coefficient in the left neighboring block of the TB have a DC spatial frequency.
7. The method according to claim 6, characterized in that The decoding the symbol value of the current transform coefficient in the TB comprises: decoding the symbol value of the current transform coefficient in the TB based on the previously decoded symbol value of the previous transform coefficient and based on a weighted average of (i) the previously decoded symbol value of the DC transform coefficient in the upper neighboring block of the TB and (ii) the previously decoded symbol value of the DC transform coefficient in the left neighboring block of the TB; wherein the weight of the previously decoded symbol value of the DC transform coefficient in the upper neighboring block of the TB depends on the number of transform coefficients in the upper neighboring block that are adjacent to the transform coefficient in the TB, and the weight of the previously decoded symbol value of the DC transform coefficient in the left neighboring block of the TB depends on the number of transform coefficients in the left neighboring block that are adjacent to the transform coefficient in the TB, The location of the previous transform coefficient in the TB is adjacent to the location of the current transform coefficient in the TB.
8. The method according to claim 7, characterized in that The position of the previous transform coefficient in the TB is adjacent to the position of the current transform coefficient in the TB along a scan direction, wherein the scan direction is based on a scan order for encoding symbol values of transform coefficients in the TB.
9. An apparatus for video decoding, comprising a processing circuit configured to: Decoding encoding information of a transform block TB from an encoded video bitstream, the encoding information indicating a transform skip mode of the TB in a first direction; decoding a symbol value of a current transform coefficient in the TB based on a previously decoded symbol value of a previous transform coefficient, wherein the current transform coefficient and the previous transform coefficient are in a same row or a same column in the TB, the same row or the same column being along the first direction of the transform skip mode, the symbol value of the current transform coefficient in the TB being decoded in the following manner: when the first direction is a horizontal direction, the same row or the same column is the same row along the first direction of the transform skip mode, and the symbol value of the current transform coefficient in the TB is decoded based on the previously decoded symbol value of the previous transform coefficient in the same row along the first direction of the transform skip mode; when the first direction is a vertical direction, the same row or the same column is the same column along the first direction of the transform skip mode, and the symbol value of the current transform coefficient in the TB is decoded based on the previously decoded symbol value of the previous transform coefficient in the same column along the first direction of the transform skip mode; and The current transform coefficient in the TB is determined based on the decoded symbol value of the current transform coefficient.
10. The device according to claim 9, characterized in that The same row is restricted to be one of a subset of rows in the TB.
11. The device according to claim 9, characterized in that The same column is restricted to be one of a subset of columns in the TB.
12. The device according to claim 9 or 10, characterized in that The processing circuit is configured as follows: A flag is decoded, the flag indicating whether the sign values of the transform coefficients in the same row are the same, wherein the transform coefficients in the same row include the current transform coefficient and the previous transform coefficient.
13. The device according to claim 9 or 11, characterized in that The processing circuit is configured as follows: A flag is decoded, the flag indicating whether the sign values of the transform coefficients in the same column are the same, wherein the transform coefficients in the same column include the current transform coefficient and the previous transform coefficient.
14. The device according to any one of claims 9 to 11, characterized in that The processing circuit is configured as follows: The symbol value of the current transform coefficient in the TB is decoded based on the previously decoded symbol value of the previous transform coefficient, the previously decoded symbol value of the DC transform coefficient in the upper neighboring block of the TB, and the previously decoded symbol value of the DC transform coefficient in the left neighboring block of the TB, wherein the DC transform coefficient in the upper neighboring block of the TB and the DC transform coefficient in the left neighboring block of the TB have a DC spatial frequency. 15 . A non-transitory computer-readable storage medium having a program stored thereon, wherein the program is executed by at least one processor to implement the method according to claim 1 .
16. A device for video decoding, comprising: A first decoding module, configured to decode coding information of a transform block TB from an encoded video bit stream, wherein the coding information indicates a transform skip mode of the TB in a first direction; A second decoding module is configured to decode the symbol value of the current transform coefficient in the TB based on the previously decoded symbol value of the previous transform coefficient, wherein: The current transform coefficient and the previous transform coefficient are in the same row or the same column in the TB, and the same row or the same column is along the first direction of the transform skip mode, and the symbol value of the current transform coefficient in the TB is decoded in the following manner: when the first direction is a horizontal direction, the same row or the same column is the same row along the first direction of the transform skip mode, and the symbol value of the current transform coefficient in the TB is decoded based on the previously decoded symbol value of the previous transform coefficient in the same row along the first direction of the transform skip mode; when the first direction is a vertical direction, the same row or the same column is the same column along the first direction of the transform skip mode, and the symbol value of the current transform coefficient in the TB is decoded based on the previously decoded symbol value of the previous transform coefficient in the same column along the first direction of the transform skip mode; as well as A determination module is used to determine the current transform coefficient in the TB based on the decoded symbol value of the current transform coefficient.
