WO2021036430A1 - Procédé de décodage, procédé de codage et appareil - Google Patents

Procédé de décodage, procédé de codage et appareil Download PDF

Info

Publication number
WO2021036430A1
WO2021036430A1 PCT/CN2020/096580 CN2020096580W WO2021036430A1 WO 2021036430 A1 WO2021036430 A1 WO 2021036430A1 CN 2020096580 W CN2020096580 W CN 2020096580W WO 2021036430 A1 WO2021036430 A1 WO 2021036430A1
Authority
WO
WIPO (PCT)
Prior art keywords
context model
coefficient
decoded
coordinate value
target
Prior art date
Application number
PCT/CN2020/096580
Other languages
English (en)
Chinese (zh)
Inventor
曹小强
Original Assignee
杭州海康威视数字技术股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 杭州海康威视数字技术股份有限公司 filed Critical 杭州海康威视数字技术股份有限公司
Publication of WO2021036430A1 publication Critical patent/WO2021036430A1/fr

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/85Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using pre-processing or post-processing specially adapted for video compression

Definitions

  • This application relates to the technical field of video coding and decoding, and in particular to a decoding method, coding method and device.
  • Video coding usually includes processes such as prediction, transformation, quantization, entropy coding, etc.
  • the quantized transform coefficients can be coded through entropy coding.
  • the encoding of transform coefficients can be realized by encoding syntax elements used to indicate transform coefficients. Some flag bits in the syntax elements can be encoded by context models, and the context models that can be selected for each flag bit usually include multiple types. In the implementation, how to determine the context model of each flag bit has become a hot research topic.
  • the embodiments of the present application provide a decoding method, encoding method, and device, which can be used to solve the problem of low encoding performance of related technologies.
  • the technical solution is as follows:
  • a decoding method includes:
  • the target position coordinate information is obtained from the code stream, and the target position coordinate information is composed of a first coordinate value and a second coordinate value.
  • the first coordinate value is the abscissa of the non-zero coefficient with the largest absolute value of the abscissa among the non-zero coefficients included in the transformation coefficient of the current block
  • the second coordinate value is the non-zero coefficient included in the transformation coefficient of the current block.
  • a context model of the to-be-decoded flag bit of the coefficient to be decoded is determined, the target scanning area is a scanning area determined based on the target position coordinate information, the The context model is determined at least according to the coordinate information of the target position;
  • the to-be-decoded flag bit is decoded.
  • a decoding method includes:
  • the target position coordinate information is obtained from the code stream.
  • the target position coordinate information consists of a first coordinate value and a second coordinate value, and the first coordinate value is the current
  • a context model of the to-be-decoded flag bit of the coefficient to be decoded is determined, the target scanning area is a scanning area determined based on the target position coordinate information, the The context model is determined from at least three types of context model sets at least according to the coordinate value of the position where the coefficient to be decoded is located;
  • the to-be-decoded flag bit is decoded.
  • a decoding method includes:
  • the target position coordinate information is obtained from the code stream.
  • the target position coordinate information consists of a first coordinate value and a second coordinate value, and the first coordinate value is the current
  • a context model of the to-be-decoded flag bit of the coefficient to be decoded is determined, the target scanning area is a scanning area determined based on the target position coordinate information, the The context model is determined at least according to the linear relationship satisfied by the coordinate value of the position where the coefficient to be decoded is located;
  • the to-be-decoded flag bit is decoded.
  • a decoding method includes:
  • the target position coordinate information is obtained from the code stream.
  • the target position coordinate information consists of a first coordinate value and a second coordinate value, and the first coordinate value is the current
  • a context model of the to-be-decoded flag bit of the coefficient to be decoded is determined, the target scanning area is a scanning area determined based on the target position coordinate information, the The context model is determined according to the determined selection method after the selection method is determined at least based on the preset conditions satisfied by the current block;
  • the to-be-decoded flag bit is decoded.
  • an encoding method includes:
  • the target position coordinate information is obtained.
  • the target position coordinate information is composed of a first coordinate value and a second coordinate value, and the first coordinate value is the transformation of the current block
  • the second coordinate value is the abscissa of the non-zero coefficient with the largest absolute value of the ordinate among the non-zero coefficients included in the transformation coefficient of the current block Y-axis;
  • a context model of the flag to be coded of the coefficient to be coded is determined, and the target scan area is a scan area determined based on the target position coordinate information, and The context model is determined at least according to the coordinate information of the target position;
  • the to-be-encoded flag bit is encoded.
  • an encoding method includes:
  • the target position coordinate information is obtained.
  • the target position coordinate information is composed of a first coordinate value and a second coordinate value, and the first coordinate value is the transformation of the current block
  • the second coordinate value is the abscissa of the non-zero coefficient with the largest absolute value of the ordinate among the non-zero coefficients included in the transformation coefficient of the current block Y-axis;
  • a context model of the flag to be coded of the coefficient to be coded is determined, and the target scan area is a scan area determined based on the target position coordinate information, and
  • the context model is determined from at least three types of context model sets at least according to the coordinate value of the position where the coefficient to be decoded is located;
  • the to-be-encoded flag bit is encoded.
  • an encoding method includes:
  • the target position coordinate information is obtained, the target position coordinate information is composed of a first coordinate value and a second coordinate value, and the first coordinate value is the transformation of the current block
  • the second coordinate value is the abscissa of the non-zero coefficient with the largest absolute value of the ordinate among the non-zero coefficients included in the transformation coefficient of the current block Y-axis;
  • a context model of the flag to be coded of the coefficient to be coded is determined, and the target scan area is a scan area determined based on the target position coordinate information, and The context model is determined at least according to the linear relationship satisfied by the coordinate value of the position where the coefficient to be decoded is located;
  • the to-be-encoded flag bit is encoded.
  • an encoding method includes:
  • the target position coordinate information is obtained.
  • the target position coordinate information is composed of a first coordinate value and a second coordinate value, and the first coordinate value is the transformation of the current block
  • the second coordinate value is the abscissa of the non-zero coefficient with the largest absolute value of the ordinate among the non-zero coefficients included in the transformation coefficient of the current block Y-axis;
  • a context model of the flag to be coded of the coefficient to be coded is determined, and the target scan area is a scan area determined based on the target position coordinate information, and The context model is determined according to the determined selection method after the selection method is determined at least based on the preset conditions satisfied by the current block;
  • the to-be-encoded flag bit is encoded.
  • a decoding device in a ninth aspect, includes:
  • the code stream acquisition module is used to obtain the code stream of the current block
  • the information acquisition module is configured to acquire target position coordinate information from the code stream when it is determined that the current block adopts the coefficient coding SRCC based on the scanning area.
  • the target position coordinate information consists of a first coordinate value and a second coordinate value.
  • the first coordinate value is the abscissa of the non-zero coefficient with the largest abscissa absolute value among the non-zero coefficients included in the transformation coefficient of the current block
  • the second coordinate value is the abscissa of the non-zero coefficient of the current block.
  • the ordinate of the non-zero coefficient with the largest absolute value of the ordinate is the abscissa of the non-zero coefficient of the current block.
  • the model determination module is used to determine the context model of the to-be-decoded flag of the to-be-decoded coefficient for the to-be-decoded coefficient in the target scan area of the current block, and the target scan area is determined based on the target position coordinate information
  • the scanning area of the target location, the context model is determined at least according to the coordinate information of the target position;
  • the decoding module is configured to decode the to-be-decoded flag bit according to the context model.
  • a decoding device in a tenth aspect, includes:
  • the code stream acquisition module is used to obtain the code stream of the current block
  • the information acquisition module is configured to acquire target position coordinate information from the code stream when it is determined that the current block adopts the coefficient coding SRCC based on the scanning area.
  • the target position coordinate information consists of a first coordinate value and a second coordinate value.
  • the first coordinate value is the abscissa of the non-zero coefficient with the largest abscissa absolute value among the non-zero coefficients included in the transformation coefficient of the current block
  • the second coordinate value is the abscissa of the non-zero coefficient of the current block.
  • the ordinate of the non-zero coefficient with the largest absolute value of the ordinate is the abscissa of the non-zero coefficient of the current block.
  • the model determination module is used to determine the context model of the to-be-decoded flag of the to-be-decoded coefficient for the to-be-decoded coefficient in the target scan area of the current block, and the target scan area is determined based on the target position coordinate information
  • the context model is determined from at least three types of context model sets according to at least the coordinate values of the positions where the coefficients to be decoded are located;
  • the decoding module is configured to decode the to-be-decoded flag bit according to the context model.
  • a decoding device in an eleventh aspect, includes:
  • the code stream acquisition module is used to obtain the code stream of the current block
  • the information acquisition module is configured to acquire target position coordinate information from the code stream when it is determined that the current block adopts the coefficient coding SRCC based on the scanning area.
  • the target position coordinate information consists of a first coordinate value and a second coordinate value.
  • the first coordinate value is the abscissa of the non-zero coefficient with the largest abscissa absolute value among the non-zero coefficients included in the transformation coefficient of the current block
  • the second coordinate value is the abscissa of the non-zero coefficient of the current block.
  • the ordinate of the non-zero coefficient with the largest absolute value of the ordinate is the abscissa of the non-zero coefficient of the current block.
  • the model determination module is used to determine the context model of the to-be-decoded flag of the to-be-decoded coefficient for the to-be-decoded coefficient in the target scan area of the current block, and the target scan area is determined based on the target position coordinate information
  • the scanning area of the, the context model is determined at least according to the linear relationship satisfied by the coordinate value of the position where the coefficient to be decoded is located;
  • the decoding module is configured to decode the to-be-decoded flag bit according to the context model.
  • a decoding device in a twelfth aspect, includes:
  • the code stream acquisition module is used to obtain the code stream of the current block
  • the information acquisition module is configured to acquire target position coordinate information from the code stream when it is determined that the current block adopts the coefficient coding SRCC based on the scanning area.
  • the target position coordinate information consists of a first coordinate value and a second coordinate value.
  • the first coordinate value is the abscissa of the non-zero coefficient with the largest abscissa absolute value among the non-zero coefficients included in the transformation coefficient of the current block
  • the second coordinate value is the abscissa of the non-zero coefficient of the current block.
  • the ordinate of the non-zero coefficient with the largest absolute value of the ordinate is the abscissa of the non-zero coefficient of the current block.
  • the model determination module is used to determine the context model of the to-be-decoded flag of the to-be-decoded coefficient for the to-be-decoded coefficient in the target scan area of the current block, and the target scan area is determined based on the target position coordinate information
  • the context model is determined according to the determined selection method after determining a selection method at least based on a preset condition satisfied by the current block;
  • the decoding module is configured to decode the to-be-decoded flag bit according to the context model.
  • an encoding device in a thirteenth aspect, includes:
  • the acquiring module is used to acquire target position coordinate information when the current block adopts the coefficient coding SRCC based on the scanning area.
  • the target position coordinate information is composed of a first coordinate value and a second coordinate value, and the first coordinate value is The abscissa of the non-zero coefficient with the largest absolute value of the abscissa among the non-zero coefficients included in the transformation coefficient of the current block, and the second coordinate value is the largest absolute value of the ordinate among the non-zero coefficients included in the transformation coefficient of the current block The ordinate of the non-zero coefficient of;
  • the determining module is configured to determine the context model of the to-be-coded flag bits of the to-be-coded coefficients for the to-be-coded coefficients in the target scan area of the current block, and the target scan area is determined based on the target position coordinate information Scanning area, the context model is determined according to at least the target position coordinate information;
  • the encoding module is used to encode the to-be-encoded flag bit according to the context model.
  • an encoding device in a fourteenth aspect, includes:
  • the acquiring module is used to acquire target position coordinate information when the current block adopts the coefficient coding SRCC based on the scanning area.
  • the target position coordinate information is composed of a first coordinate value and a second coordinate value, and the first coordinate value is The abscissa of the non-zero coefficient with the largest absolute value of the abscissa among the non-zero coefficients included in the transformation coefficient of the current block, and the second coordinate value is the largest absolute value of the ordinate among the non-zero coefficients included in the transformation coefficient of the current block The ordinate of the non-zero coefficient of;
  • the determining module is configured to determine the context model of the to-be-coded flag bits of the to-be-coded coefficients for the to-be-coded coefficients in the target scan area of the current block, and the target scan area is determined based on the target position coordinate information Scanning area, the context model is determined from at least three types of context model sets according to at least the coordinate value of the position where the coefficient to be decoded is located;
  • the encoding module is used to encode the to-be-encoded flag bit according to the context model.
  • an encoding device includes:
  • the acquiring module is used to acquire target position coordinate information when the current block adopts the coefficient coding SRCC based on the scanning area.
  • the target position coordinate information is composed of a first coordinate value and a second coordinate value, and the first coordinate value is The abscissa of the non-zero coefficient with the largest absolute value of the abscissa among the non-zero coefficients included in the transformation coefficient of the current block, and the second coordinate value is the largest absolute value of the ordinate among the non-zero coefficients included in the transformation coefficient of the current block The ordinate of the non-zero coefficient of;
  • the determining module is configured to determine the context model of the to-be-coded flag bits of the to-be-coded coefficients for the to-be-coded coefficients in the target scan area of the current block, and the target scan area is determined based on the target position coordinate information Scanning area, the context model is determined at least according to a linear relationship satisfied by the coordinate value of the position where the coefficient to be decoded is located;
  • the encoding module is used to encode the to-be-encoded flag bit according to the context model.
  • an encoding device includes:
  • the acquiring module is used to acquire target position coordinate information when the current block adopts the coefficient coding SRCC based on the scanning area.
  • the target position coordinate information is composed of a first coordinate value and a second coordinate value, and the first coordinate value is The abscissa of the non-zero coefficient with the largest absolute value of the abscissa among the non-zero coefficients included in the transformation coefficient of the current block, and the second coordinate value is the largest absolute value of the ordinate among the non-zero coefficients included in the transformation coefficient of the current block The ordinate of the non-zero coefficient of;
  • the determining module is configured to determine the context model of the to-be-coded flag bits of the to-be-coded coefficients for the to-be-coded coefficients in the target scan area of the current block, and the target scan area is determined based on the target position coordinate information Scanning area, the context model is determined according to the determined selection method after a selection method is determined at least based on a preset condition satisfied by the current block;
  • the encoding module is used to encode the to-be-encoded flag bit according to the context model.
  • a computer device in a seventeenth aspect, includes a processor, a communication interface, a memory, and a communication bus.
  • the processor, the communication interface, and the memory complete mutual communication through the communication bus.
  • the memory is used to store a computer program
  • the processor is used to execute the program stored in the memory to implement the steps of the method described in any one of the first aspect to the eighth aspect.
  • a computer-readable storage medium in which a computer program is stored, and the computer program, when executed by a processor, implements the steps of any one of the above-mentioned aspects from the first aspect to the eighth aspect .
  • a computer program product containing instructions which when run on a computer, causes the computer to execute the steps of any one of the methods described in the first aspect to the eighth aspect.
  • the code stream of the current block When it is determined that the current block adopts SRCC, obtain the target position coordinate information from the code stream, determine the target scanning area of the current block based on the target position coordinate information, and determine the coefficient to be decoded at least according to the target position coordinate information According to the context model of the flag to be decoded, the flag to be decoded is decoded. That is, the context model of the flag to be decoded is determined according to the target scanning area, so that this grouping method matches the scanning method of the SRCC technology, and the decoding performance is improved.
  • FIG. 1 is a schematic diagram of a coding and decoding method provided by an embodiment of the present application
  • FIG. 2 is a flowchart of a decoding method provided by an embodiment of the present application.
  • FIG. 3 is a schematic diagram of a scanning area provided by an embodiment of the present application.
  • FIG. 4 is a schematic diagram of another scanning area provided by an embodiment of the present application.
  • FIG. 5 is a flowchart of a decoding method provided by an embodiment of the present application.
  • FIG. 6 is a schematic diagram of a scanning area provided by an embodiment of the present application.
  • FIG. 7 is a schematic diagram of another scanning area provided by an embodiment of the present application.
  • FIG. 8 is a schematic diagram of another scanning area provided by an embodiment of the present application.
  • FIG. 9 is a schematic diagram of another scanning area provided by an embodiment of the present application.
  • FIG. 10 is a schematic diagram of another scanning area provided by an embodiment of the present application.
  • FIG. 11 is a schematic structural diagram of a decoding device provided by an embodiment of the present application.
  • Figure 12 is a schematic structural diagram of an encoding device provided by an embodiment of the present application.
  • FIG. 13 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • Residual error In the video encoding process, the spatial and temporal redundancy need to be removed through the prediction process.
  • the encoder obtains the predicted value after prediction, and the original pixel is subtracted from the predicted value to obtain the residual.
  • the residual block is transformed, quantized, and entropy coded Basic unit.
  • Transformation coefficient The function of transformation and quantization is to transform and quantize the residual data to remove the correlation in the frequency domain, and to perform lossy compression on the data.
  • Transform coding transforms an image from a time domain signal to a frequency domain signal, concentrating energy to the low frequency region. Since the image energy is mainly concentrated in the low-frequency region, zeroing the transform coefficients in the high-frequency region by quantization can reduce the dynamic range of image coding on the basis of the transform module. Remove the transform coefficients in the high-frequency region, reduce the overhead of the code rate, and will not cause great distortion. Among them, the coefficients of the residual block after being transformed and quantized are called transform coefficients.
  • Syntax element can be used to indicate a transform coefficient. Generally, a transform coefficient needs to be indicated by at least one syntax element.
  • Context Under normal circumstances, different grammatical elements are not completely independent, and the same grammatical element itself also has a certain degree of memorability. Therefore, according to the theory of conditional entropy, using other coded syntax elements for conditional coding can further improve coding performance compared to independent coding or memoryless coding.
  • the coded symbol information used as a condition is called context.
  • Context model In video coding and decoding, the process of updating symbol probability based on context is called context model, and according to specific application conditions, the same syntax element can use multiple context models to adaptively update the symbol probability under current conditions, thereby further Compression rate.
  • SRCC Scan Region-based Coefficient Coding, coefficient coding based on scanning area: Use (SRx, SRy) to determine the area of the transformation coefficient to be scanned in a transformation coefficient matrix, where SRx is the rightmost non-zero in the transformation coefficient matrix The abscissa of the coefficient, SRy is the ordinate of the lowest non-zero coefficient in the transformation coefficient matrix. Only the transform coefficients in the scan area determined by (SRx, SRy) need to be coded and decoded, while the transform coefficients outside the scan area are all 0, no coding and decoding are required. Using this technology can further reduce the bit rate overhead.
  • Video coding generally includes prediction, transformation, quantization, entropy coding and other processes. Further, the coding process can also be implemented in accordance with the framework of Figure 1 (b) .
  • Intra-frame prediction uses the surrounding coded blocks as a reference to predict the current uncoded block, effectively removing the redundancy in the spatial domain.
  • Inter-frame prediction uses adjacent coded images to predict the current image, effectively removing redundancy in the time domain.
  • Transformation refers to transforming an image from the spatial domain to the transform domain, and using transform coefficients to represent the image. Most images contain more flat areas and slowly changing areas. Appropriate transformation can transform the image from a scattered distribution in the spatial domain to a relatively concentrated distribution in the transform domain, removing the frequency domain correlation between signals, and matching The quantization process can effectively compress the code stream.
  • Entropy coding is a lossless coding method that can convert a series of element symbols into a binary code stream for transmission or storage.
  • the input symbols may include quantized transform coefficients, motion vector information, prediction mode information, transform and quantization related Grammar, etc. Entropy coding can effectively remove the redundancy of video element symbols.
  • video decoding usually includes entropy decoding, prediction, inverse quantization, inverse transformation, filtering, etc.
  • the implementation principle of each process is the same as or similar.
  • entropy coding can be realized by using SRCC technology.
  • SRCC technology can determine the abscissa SRx of the rightmost non-zero coefficient in the transformation coefficient matrix of the current block to be coded and the ordinate of the bottom non-zero coefficient in the transformation coefficient matrix.
  • SRy uses (SRx, SRy) to determine the scan area to be scanned in the variation coefficient matrix, and encodes the transformation coefficients in the scan area determined by (SRx, SRy).
  • the significant flagGT1flag and GT2flag context models can be determined according to the number of related flags of the partial transform coefficients that have been encoded or decoded in the scanning order, and according to the transform coefficients The relative position of the scanning area, the size of the current block, and the channels are grouped.
  • the significant flag, GT1flag, and GT2flag can all be divided into luminance channels and chrominance channels. For details, see Table 1 below.
  • the brightness channel of the significant flag can be divided into three types of context model sets according to the size of the current block. Each type of context model set includes 13 types of context models.
  • each type of context can be analyzed according to the relative position of the transformation coefficient in the scanning area.
  • the model set is further grouped, and then a context model can be determined according to the number of non-zero transform coefficients of the five transform coefficients that have been encoded or decoded in the scanning order, and used to encode or decode the significant flag luminance channel.
  • the context model set can be grouped according to the relative position of the transform coefficients in the scanning area, and then one can be determined according to the number of non-zero transform coefficients of the 5 transform coefficients that have been encoded or decoded in the scanning order
  • the context model is used to encode or decode the chrominance channel of the significant flag.
  • the transform coefficients can be grouped according to the relative position of the scan area, and then a context can be determined according to the number of non-zero transform coefficients of the 5 transform coefficients that have been encoded or decoded in the scan order Model, used to encode or decode the brightness channel of GT1flag or GT2flag.
  • a context model can be determined according to the number of non-zero transform coefficients of the 5 transform coefficients that have been encoded or decoded in the scan order, which is used to encode or decode the chroma channel of GT1flag or GT2flag .
  • the decoding method and encoding method provided in the embodiments of the present application may be executed by an electronic device, and the electronic device may have a function of compressing, encoding or decoding any image or video image.
  • the electronic device may be a notebook computer, a tablet computer, a desktop computer, a portable computer, etc., which is not limited in the embodiment of the present application.
  • the encoding process is introduced: the current block is predicted to obtain the predicted value, the original value of the current block is subtracted from the predicted value to obtain the residual of the current block, and the residual is transformed and quantized to obtain the transform coefficients. If the transform coefficients are all zero, the cbf flag position of the current block is zero, and there is no need to encode the transform coefficients of the current block. Otherwise, the cbf flag position of the current block is 1. If SRCC is enabled on the encoding end sequence header, the scan area of the current block is determined, and the coordinate values of SRx and SRy are encoded.
  • transform coefficients There are two transform coefficients, and the information required for each transform coefficient includes at least one of significant flag, GT1flag, GT2flag, remaining level, and sign.
  • Entropy encodes information such as the SRCC enable flag bit, the transform coefficient of the current block, and the cbf flag bit to obtain a binary code stream.
  • each transform coefficient is sequentially decoded, and the information to be decoded for each transform coefficient includes at least one of significant flag, GT1 flag, GT2 flag, remaining level, and sign.
  • Obtain the entropy-decoded transform coefficient of the current block obtain the residual of the current block through inverse quantization and inverse transformation, and add the predicted value to obtain the reconstruction value of the current block.
  • Figure 2 is a flowchart of a decoding method provided by an embodiment of the present application. The method can be executed by the above-mentioned electronic device. The method can include the following steps :
  • Step 201 Obtain the code stream of the current block.
  • the current block may be any image block in the image to be processed.
  • the image to be processed can be divided into different image blocks, and then each image block can be processed sequentially in a certain order.
  • the size and shape of each image block can be set according to a preset division rule.
  • the code stream is sent by the encoding end.
  • the code stream can be a binary code stream.
  • the code stream can carry some information that the decoding end needs to know for decoding.
  • the code stream can carry information for the encoding method adopted by the encoding end. , The size of the current block and other information.
  • Step 202 When it is determined that the current block adopts SRCC, the target position coordinate information is obtained from the code stream.
  • the target position coordinate information consists of a first coordinate value and a second coordinate value, and the first coordinate value is the current block's coordinate information.
  • the abscissa of the non-zero coefficient with the largest absolute value of the abscissa among the non-zero coefficients included in the transformation coefficient, and the second coordinate value is the ordinate of the non-zero coefficient with the largest absolute value of the ordinate among the non-zero coefficients included in the transformation coefficient of the current block. coordinate.
  • the encoding end may carry a flag bit in the code stream to indicate whether all transform coefficients of the current block are zero through the flag bit.
  • the flag bit can be a cbf flag bit.
  • the cbf flag bit carried by the bitstream is 0, it can indicate that all transform coefficients of the current block are zero. In this case, there is no need to decode the transform coefficients of the current block.
  • the cbf flag bit is 1, it indicates that there are non-zero transform coefficients in the current block. In this case, the transform coefficients of the current block need to be decoded.
  • the encoding method adopted by the encoding end can be determined before decoding.
  • the encoding end uses SRCC for entropy encoding, it can carry a flag bit for indicating the SRCC in the code stream. In this way, for the decoding end, it can be determined that the current block uses SRCC according to the flag bit in the code stream. .
  • the scan area corresponding to the transform coefficient can be determined.
  • the scan area is the abscissa SRx (first coordinate value) of the rightmost non-zero transform coefficient in the transform coefficients of the current block.
  • the ordinate SRy (second coordinate value) of the lowest non-zero transform coefficient among the transform coefficients.
  • the coordinate system can be established with a certain vertex of the current block as the origin. As shown in FIG. 3, in this embodiment, the coordinate system is established with the upper left vertex of the current block as the origin.
  • the decoder can determine the target scan area by obtaining the information of SRx and SRy in the code stream (the rectangular box in Figure 3, the target position coordinates composed of SRx and SRy can be obtained to determine the target scan area), such as As shown in Fig. 4, the coordinate values of the positions where all transform coefficients are located in the target scanning area are greater than zero.
  • the positions corresponding to the SRx and SRy are the target positions corresponding to the target scanning area.
  • the target scan area may be different according to the distribution of non-zero transform coefficients.
  • the target scan area may be a part of the current block or the entire area of the current block.
  • the transform coefficients in the current block except the target scanning area are all zero, and one or some transform coefficients in the target scanning area may be zero.
  • Step 203 For the coefficient to be decoded in the target scanning area of the current block, a context model of the to-be-decoded flag of the coefficient to be decoded is determined, the target scanning area is a scanning area determined based on the target position coordinate information, and the context model It is determined at least according to the coordinate information of the target location.
  • the coefficient to be decoded is the transform coefficient to be decoded obtained in the scanning order, that is, the target scanning area can be scanned in a certain order during the decoding process.
  • the scanning order can be from Reverse zigzag scan from lower right corner to upper left corner.
  • Each scanned transform coefficient is determined as the coefficient to be decoded, and then the to-be-decoded flag of the coefficient to be decoded can be decoded according to the method provided in the embodiment of the present application.
  • the to-be-decoded flag bit is at least one of the first flag bit, the second flag bit, and the third flag bit.
  • the first flag bit is used to indicate whether the transform coefficient is non-zero.
  • the second flag bit is used to indicate whether the absolute value of the transform coefficient is greater than one.
  • the third flag bit is used to indicate whether the absolute value of the transform coefficient is greater than 2.
  • the first flag bit is significant flag
  • the second flag bit is GT1 flag
  • the third flag bit is GT2 flag.
  • at least one flag bit is required to indicate the coefficient to be decoded, that is, the coefficient to be decoded can be indicated by one flag bit or multiple flag bits. For example, if the coefficient to be decoded is 1, a significant flag is required to indicate that the coefficient to be decoded is non-zero, and GT1flag is used to indicate that the amplitude of the coefficient to be decoded is less than or equal to 1. If the coefficient to be decoded is 0, then only a significant flag is needed to indicate that the coefficient to be decoded is zero.
  • At least the significant flag is required to indicate whether the coefficient to be decoded is zero.
  • the coefficient to be decoded is the last transform coefficient to be decoded in the current block, and the transform coefficients previously decoded in the scan order are all zero, since there are non-zero transform coefficients in the current block, it can be determined The coefficient to be decoded is non-zero, so the significant flag may not be decoded.
  • the syntax element used to indicate a transform coefficient may also include other flag bits and/or parameters.
  • it may also include a fourth flag bit and/or variable.
  • the fourth flag bit may be used to indicate The positive or negative of the non-zero transform coefficient.
  • This variable can be used to indicate the remaining part of the non-zero transform coefficient whose amplitude is greater than 2.
  • the fourth flag bit and the variable can be encoded and decoded in other ways. Therefore, this embodiment of the present application is Don't introduce too much.
  • the encoding and decoding of transform coefficients can be implemented by encoding and decoding the syntax element used to indicate the transform coefficient, wherein at least one flag bit in the syntax element can be encoded and decoded through the context model.
  • Each flag bit can support a variety of different context models for encoding and decoding. For example, the number of context models corresponding to the significant flag, GT1flag, and GT2flag is shown in Table 1 below.
  • the context model corresponding to each flag bit can be divided into the context model corresponding to the luminance component and the context model corresponding to the chrominance component.
  • the method of determining the context model corresponding to the luminance component and the chrominance component can be the same or different.
  • the method provided in the embodiment of the present application may be suitable for determining the context model corresponding to the luminance component, or may also be suitable for determining the context model corresponding to the chrominance component.
  • the context models corresponding to the flag bits can be divided into multiple types of context model sets according to certain rules. Taking the significant flag as an example, there are 39 context models corresponding to the brightness component, which can be divided into three types of context model sets, and each type of context model set includes 13 types of context models. As an example, for any type of context model set, it can be further divided into multiple context model subsets. For example, each type of context model set described above can be divided into two context model subsets, where each context model sub-set The set includes 6 context models. It should be noted that one transform coefficient in the lower right corner of the target scan area can use a separate context model.
  • the context model is determined at least according to the target position coordinate information, and its specific implementation manner may include one of the following possible implementation manners:
  • the context model of the to-be-decoded flag of the to-be-decoded coefficient is determined at least according to the area of the target scan area, and the area of the target scan area is determined according to the target position coordinate information.
  • the target position coordinate information includes a first coordinate value and a second coordinate value, and therefore, the area of the scanning area can be determined according to the first coordinate value and the second coordinate value.
  • the context model of the to-be-decoded flag of the coefficient to be decoded is determined according to at least the area of the target scan area.
  • the specific implementation may include: when the area of the target scan area is less than or equal to the first area threshold, the context The model is selected from the set of upper and lower models of the first type, and when the area of the scanning area is greater than the first area threshold, the context model is selected from the set of upper and lower models of the second type.
  • the first area threshold can be set according to actual conditions, for example, it can be set to any value between 1 and 1024, such as 2, 4, 8, 16, and so on.
  • the classification rules of the first type of context model and the second type of context model can be set according to actual conditions.
  • the flag to be decoded can be determined according to the relationship between the scan area area and the first area threshold. Whether the context model of the bit is selected from the first type of context model set or the second type of context model set.
  • the first area threshold is set to 4.
  • the context model for determining the flag to be decoded is selected from the first type of context model set.
  • ScanArea>4 the context model for determining the flag to be decoded is selected from the first type of context model set.
  • the context model for determining the flag to be decoded is selected from the second type of context model set.
  • the context model of the flag to be decoded can also be determined to be selected from the first type of context model set. For example, set the first area threshold to 4.
  • ScanArea ⁇ 4 determine the context model of the flag to be decoded from the first type of context model set.
  • ScanArea ⁇ 4 determine the context model of the flag to be decoded from the first type of context model set. Choose from a collection of two types of context models.
  • the context model when the area of the target scan area is less than or equal to the first area threshold, the context model is selected from the first type of context model set, and when the area of the target scan area is greater than the first area threshold and When it is less than or equal to the second area threshold, the context model is selected from the second type of context model set. When the area of the target scanning area is greater than the second area threshold, the context model is selected from the third type of context model set Selected.
  • the first area threshold and the second area threshold can be set according to actual conditions, for example, can be set to any value between 1 and 1024, such as 2, 4, 8, 16, and so on. It should be noted that the first area threshold should be smaller than the second area threshold.
  • the size relationship between the scan area area and the first area threshold can be used .
  • the size relationship between the scan area area and the second area threshold determines which type of context model set the context model of the flag bit to be decoded is selected from.
  • ScanArea ⁇ 4 it is determined that the context model of the flag to be decoded is selected from the first type of context model set.
  • ScanArea>4 and ScanArea
  • ScanArea>16 it is determined that the context model of the flag to be decoded is selected from the second type of context model set.
  • ScanArea>16 it is determined that the context model of the flag to be decoded is selected from the third type of context model set.
  • ScanArea ⁇ 4 it is determined that the context model of the flag to be decoded is selected from the first type of context model set
  • ScanArea ⁇ 16 it is determined that the context model of the flag to be decoded is selected from the second type of context model set.
  • ScanArea ⁇ 16 it is determined that the context model of the flag to be decoded is selected from the third type of context model set.
  • the context model of the flag to be decoded can also be divided into more than three types of context model sets, that is, the flag to be decoded can also correspond to four types of context model sets, five types of context model sets, and so on. At this time, more area thresholds can be set for grouping. The principle is similar to the above, and will not be described in detail here.
  • the context model is determined at least according to the size of the target scanning area, and the size of the target scanning area is determined according to the coordinate information of the target position.
  • the size of the target scanning area may be expressed by length and width, or the size of the target scanning area may also be expressed by length, or alternatively, the size of the target scanning area may also be expressed by width.
  • the size of the scan area may be determined by the first coordinate value SRx and the second coordinate value SRy. If the size of the target scan area is ScanSize, then according to the above, the ScanSize may be SRx*SRy, or, The ScanSize may also be SRx, or the ScanSize may also be SRy, or, the ScanSize may also be min(SRx, SRy).
  • the context model is selected from the first type of upper and lower model set, and when the size of the target scan area is greater than the first size threshold, the context model is selected from the second type of upper and lower model set.
  • the first size threshold can be set according to actual conditions, for example, it can be set to 2, 4, 8, and so on.
  • the context model of the flag to be decoded can be determined according to the relationship between the size of the scan area and the first size threshold Whether it is selected from the first type of context model set or the second type of context model set.
  • the first size threshold is 4, when ScanSize ⁇ 4, it is determined that the context model of the flag to be decoded is selected from the first type of context model set. When ScanSize>4, it is determined that the context model of the flag to be decoded is selected from the second type of context model set.
  • the flag to be decoded can also be determined
  • the bit context model is selected from the second type of context model set.
  • the first size threshold is 4, when ScanSize ⁇ 4, it is determined that the context model of the flag to be decoded is selected from the first type of context model set. When ScanSize ⁇ 4, the context model of the flag to be decoded is selected from the second type of context model set.
  • the context model when the size of the target scan area is less than or equal to the first size threshold, the context model is selected from the first type of context model set, and when the size of the target scan area is greater than the first size threshold and When the size is less than or equal to the second size threshold, the context model is selected from the second type of context model set. When the size of the target scan area is greater than the second size threshold, the context model is selected from the third type of context model set Selected.
  • the first size threshold and the second size threshold can be set according to actual conditions, for example, can be set to 2, 4, 8, etc., and the first size threshold should be smaller than the second size threshold.
  • the context model corresponding to the flag to be decoded is divided into the first type of context model set, the second type of context model set, and the third type of context model set according to the rules, it can be based on the size between the scan area and the first size threshold.
  • the relationship and the size relationship between the size of the scanning area and the second size threshold determine which type of context model set the context model of the flag bit to be decoded is selected.
  • the first size threshold is set to 2
  • the second size threshold is set to 8.
  • ScanSize ⁇ 2 the context model of the flag to be decoded is selected from the first type of context model set.
  • ScanSize>2 and ScanSize ⁇ 8 the context model of the flag to be decoded is selected in the second type of context model set.
  • ScanSize>8 the context model of the flag to be decoded is selected in the third type of context model set.
  • the context model of the flag to be decoded is selected in the first type of context model set.
  • the context model of the flag to be decoded is selected in the second type of context model set.
  • the context model of the flag to be decoded is selected in the third type of context model set.
  • the size of the target scan area can be represented by length and width
  • the length and width need to be compared with the first size threshold respectively. And compare the length and width with the second size threshold. For example, when the first size threshold is 2, it is necessary to compare whether the length of the target scan area is less than 2, and whether the width of the target scan area is less than 2, etc. Wait.
  • the context models of the flags to be decoded can also be divided into more than three types of context model sets, that is, the flags to be decoded can also correspond to four types of context model sets, five types of context model sets, and so on.
  • more size thresholds can be set for grouping, and the principle is similar to the above, and will not be described in detail here.
  • the context model is determined at least according to the short side of the target scanning area, and the short side of the target scanning area is determined according to the target position coordinate information.
  • the short side of the target scan area can be determined by the first coordinate value SRx and the second coordinate value SRy.
  • ScanM the short side of the target scan area
  • the length of the short side can be represented by coordinates
  • the context model is selected from the first type of upper and lower model set, and when the short side of the scan area is greater than the first short side When thresholding, the context model is selected from the second type of upper and lower model set.
  • the first short-side threshold can be set according to actual conditions, for example, it can be set to 2, 4, 8, and so on.
  • the flag to be decoded can be determined according to the size relationship between the short side of the target scan area and the first short side threshold Is the context model selected from the first type of context model set or the second type of context model set.
  • the first short-side threshold is set to 4, and when ScanM ⁇ 4, it is determined that the context model of the flag to be decoded is selected from the first type of context model set.
  • ScanM>4 the context model of the flag to be decoded is selected from the second type of context model set.
  • set the first short-side threshold to 4, and when ScanM ⁇ 4, it is determined that the context model of the flag to be decoded is selected from the first type of context model set.
  • the context model of the flag to be decoded is selected from the second type of context model set.
  • the context model is selected from the first type of context model set, and when the short side of the target scan area is greater than the first short side threshold, When the short side threshold is less than or equal to the second short side threshold, the context model is selected from the second type of context model set. When the short side of the target scan area is greater than the second short side threshold, the context model is selected from The third type is selected from the set of context models.
  • the first short-side threshold and the second short-side threshold can be set according to actual conditions, such as 2, 4, 8, etc., and the first short-side threshold should be smaller than the second short-side threshold.
  • the context model corresponding to the flag to be decoded is divided into the first type of context model set, the second type of context model set, and the third type of context model set according to the rules, it can be based on the difference between the short side of the target scan area and the first short side threshold.
  • the size relationship between the size relationship, the size relationship between the short side of the target scanning area and the second short side threshold determines which type of context model set the context model of the flag to be decoded is selected.
  • ScanM ⁇ 2 the context model of the flag to be decoded is selected from the first type of context model set.
  • ScanM>2 and ScanM ⁇ 8 the context model of the flag to be decoded is selected in the second type of context model set.
  • ScanM>8 the context model of the flag to be decoded is selected in the third type of context model set.
  • the context model of the flag to be decoded is selected in the first type of context model set.
  • the context model of the flag to be decoded is selected in the second type of context model set.
  • the context model of the flag to be decoded is selected in the third type of context model set.
  • the context models of the flags to be decoded can also be divided into more than three types of context model sets, that is, the flags to be decoded can also correspond to four types of context model sets, five types of context model sets, and so on.
  • more short-side thresholds can be set for grouping, and the principle is similar to the above, and will not be described in detail here.
  • the context model is determined at least according to the linear relationship that the coordinate value of the target position coordinate information satisfies.
  • the context model is selected from the first type of context model set, when the linear relationship that the coordinate value of the target position coordinate information satisfies is a*SRx+b*SRy+c>n1, the context model is selected from the second type of context model set, where a, b, and c are Constant, the SRx is the first coordinate value, and the SRy is the second coordinate value.
  • n1 can be 2, 4, 8, etc.
  • a can be 1
  • b can be 1
  • c can be 0 or 2.
  • n1 when n1 is 2, a is 1, b is 1, and c is 0, when SRx+SRy ⁇ 2, the context model of the flag to be decoded is selected in the first type of context model set.
  • SRx+ When SRy>2, the context model of the flag to be decoded is selected in the second type of context model set.
  • the context model for determining the flag to be decoded is selected from the first type of context model set as an example .
  • the context model of the flag to be decoded is from the second type of context Choose from the model collection.
  • the context model is selected from the first type of context model set, when the target position coordinate
  • the context model is selected from the second type of context model set, where a, b, and c are constants, and SRx is the first coordinate value, and SRy is the second coordinate value.
  • the sum and the second coordinate can be determined according to the linear combination of the first coordinate and the second coordinate of the target scan area.
  • the size relationship between n1 determines which type of context model set the context model of the flag to be decoded is selected from.
  • the context model is selected from the first type of context model set, when When the coordinate value of the target position coordinate information satisfies the linear relationship n1 ⁇ a*SRx+b*SRy+c ⁇ n2, the context model is selected from the second type of context model set, when the target position coordinate information When the linear relationship that satisfies the coordinate value of is a*SRx+b*SRy+c>n2, the context model is selected from the third type of context model set, where a, b, and c are constants, and the SRx Is the first coordinate value, and the SRy is the second coordinate value.
  • n1 and n2 can be set according to the actual situation, such as 2, 4, 8, etc. It should be noted that n1 should be less than n2. a can be 1, b can be 1, and c can be 0 or 2.
  • the context model corresponding to the flag to be decoded is divided into the first type of context model, the second type of context model and the third type of context model according to the rules, it can be determined according to the linear combination of the first coordinate and the second coordinate of the scanning area
  • n1 when n1 is 2, n2 is 4, a is 1, b is 1, and c is 0, when SRx+SRy ⁇ 2, the context model of the flag to be decoded is selected in the first type of context model set , When 2 ⁇ SRx+SRy ⁇ 4, the context model of the flag to be decoded is selected in the second type of context model set. When SRx+SRy>4, the context model of the flag to be decoded is selected in the third type of context model set.
  • the context model is selected from the first type of context model set.
  • it can also be determined that the context model is selected from the second type of context model set .
  • it can also be determined that the context model is selected from the third type of context model set.
  • the context model is selected from the first type of context model set, when the target position coordinate When the linear relationship that the coordinate value of the information satisfies is n1 ⁇ a*SRx+b*SRy+c ⁇ n2, the context model is selected from the second type of context model set, when the coordinate value of the target location coordinate information satisfies When the linear relationship is a*SRx+b*SRy+c ⁇ n2, the context model is selected from the third type of context model set, where a, b, and c are constants, and the SRx is the first The coordinate value, the SRy is the second coordinate value.
  • Step 204 According to the context model, decode the flag to be decoded.
  • the context model may be determined from the determined one type of context model set according to the number of non-zero coefficients in the five transform coefficients that have been decoded before the coefficients to be decoded after determining a type of context model set .
  • the to-be-decoded flag can be decoded according to the context model.
  • the significant flag corresponding to the transform coefficient of a certain special position in the target scanning area may be directly derived without decoding. For example, for the two points (SRx, 0) and (0, SRy), if the transform coefficients on the line segment between the two points (SRx, 0) and (SRx, SRy) are all zero, then for ( SRx, 0) The significant flag of the transform coefficient at this point may be directly derived without decoding. Similarly, if the transform coefficients on the line segment between the two points (0, SRy) and (SRx, SRy) are all zero, then the significant flag of the transform coefficient at the point (0, SRy) does not need to be decoded , Export directly.
  • the code stream of the current block is obtained.
  • the target position coordinate information is obtained from the code stream, and the target scanning area of the current block is determined based on the target position coordinate information, at least according to the target position
  • the coordinate information determines the context model of the to-be-decoded flag of the coefficient to be decoded, and decodes the to-be-decoded flag according to the context model. That is, the context model of the flag to be decoded is determined according to the target scanning area, so that this grouping method matches the scanning method of the SRCC technology, and the decoding performance is improved.
  • first type of context model set second type of context model set, and third type of context model set are only used to distinguish groups.
  • the first type of context model set, the second type of context model set and the third type of context model set The type context model set is different from the first type context model set, the second type context model set, and the third type context model set in other embodiments.
  • FIG. 5 is a flowchart of a decoding method according to another exemplary embodiment.
  • the method may be executed by the above-mentioned electronic device.
  • the method may include the following implementation steps:
  • Step 501 Obtain the code stream of the current block.
  • step 201 in the embodiment of FIG. 2 described above, which will not be repeated here.
  • Step 502 When it is determined that the current block adopts SRCC, obtain the target position coordinate information from the code stream.
  • the target position coordinate information consists of a first coordinate value and a second coordinate value, and the first coordinate value is the current block's coordinate information.
  • the abscissa of the non-zero coefficient with the largest absolute value of the abscissa among the non-zero coefficients included in the transformation coefficient, and the second coordinate value is the ordinate of the non-zero coefficient with the largest absolute value of the ordinate among the non-zero coefficients included in the transformation coefficient of the current block. coordinate.
  • step 202 in the embodiment of FIG. 2 described above, which will not be repeated here.
  • Step 503 For the coefficient to be decoded in the target scanning area of the current block, determine the context model of the to-be-decoded flag of the coefficient to be decoded.
  • the target scanning area is a scanning area determined based on the target position coordinate information, and the context model It is determined at least according to the coordinate information of the target location.
  • the context model is determined at least according to the target position coordinate information, and its specific implementation may be: the context model may also be determined at least according to the target position coordinate information and the coordinate value of the position where the coefficient to be decoded is located.
  • the context model may also be determined according to at least the target position coordinate information and the coordinate value of the position of the coefficient to be decoded.
  • the specific implementation may include: according to the target position coordinate information of the target scanning area, from multiple types of context One type of context model set is selected from the model set. Each type of context model set includes multiple context model subsets. According to the coordinate value of the position of the coefficient to be decoded, the selected one type of context model set includes multiple context model subsets. A subset of context models is selected, and the context model is determined from a selected subset of context models.
  • one type of context model set can be selected from multiple types of context model sets according to the target location coordinate information first, and its specific implementation manner may include any of the following (1)-(4) implementation manners:
  • the specific implementation of selecting one type of context model set from the multiple types of context model set according to the size can refer to the specific implementation in which the context model is determined at least according to the size of the target scanning area in the above-mentioned embodiment 2, which will not be repeated here.
  • the specific implementation of selecting one type of context model set from the multi-type context model set according to the short side can refer to the specific implementation in which the context model is determined at least according to the short side of the target scanning area in the above-mentioned embodiment 2, which will not be repeated here.
  • a type of context model set can be divided into multiple context model subsets according to certain rules, after selecting a type of context model set, you can use the coordinate value of the position of the coefficient to be decoded in the selected type of context model set Select a subset of the context model.
  • selecting a context model subset from a selected type of context model set according to the coordinate value of the position of the coefficient to be decoded may include the following possible implementation manners:
  • the coordinate value of the first target position is determined according to the target position coordinate information, and the coordinate value of the position where the coefficient to be decoded is located and the coordinate value of the first target position are selected from the selected context model set A subset of context models is selected, and the context model is determined from a selected subset of context models.
  • the first target position is located in the target scanning area and excludes the target position indicated by the target position coordinate information.
  • the first target position may be any position in the target scanning area except the position of the (SRx, SRy) point.
  • the first target position may also be based on the coordinate value of the target position (Ie, SRx, SRy) is determined.
  • the first target position may also be (SRx/2, SRy/2).
  • the abscissa value of the position where the coefficient to be decoded is less than or equal to the abscissa value of the first target position
  • the ordinate value of the position where the coefficient to be decoded is less than or equal to the ordinate value of the first target position
  • the abscissa value of the position of the coefficient to be decoded is greater than the abscissa value of the first target position, and the ordinate value of the position of the coefficient to be decoded is greater than the ordinate value of the first target position, select a type from The third context model subset is selected from the context model set; otherwise, the second context model subset is selected from the selected one type of context model set.
  • the rules for dividing a set of context models into a first context model subset, a second context model subset, and a third context model subset can be set according to actual conditions.
  • the selected context model set can be divided into the first context model subset, the second context model subset and the third context model subset according to the rules, it can be based on the abscissa value and the ordinate value of the position of the coefficient to be decoded.
  • the magnitude relationship between the abscissa value and the ordinate value of the first target position determines from which context model subset the context model of the flag to be decoded is selected.
  • the coefficient to be decoded is located in area 1
  • the context model for determining the flag to be decoded is selected from the first context model subset.
  • pos_x>4 and pos_y>8 the coefficient to be decoded is located in area 3 and it is determined that the context model of the flag to be decoded is selected from the third context model subset. Otherwise, the coefficient to be decoded is located in area 2, and it is determined that the context model of the flag to be decoded is selected from the second context model subset.
  • the coefficient to be decoded is located in area 1, and the context model for determining the flag to be decoded is selected from the first context model subset.
  • the coefficient to be decoded is located in area 1, and the context of the flag to be decoded is determined
  • the model is selected from the first context model subset as an example.
  • the coefficient to be decoded when pos_x ⁇ 4 and pos_y ⁇ 8, the coefficient to be decoded is located in area 1, and the context model for determining the flag to be decoded is selected from the first context model subset.
  • the coefficient to be decoded is located in area 3 and it is determined that the context model of the flag to be decoded is selected from the third context model subset. Otherwise, the coefficient to be decoded is located in area 2, and it is determined that the context model of the flag to be decoded is selected from the second context model subset.
  • the target scan area where the transform coefficients are located is divided into a low-frequency area and a non-low-frequency area according to the division method in Figure 6(a)
  • the non-low-frequency area includes the intermediate frequency area and the high-frequency area
  • the intermediate frequency area It often contains non-zero transform coefficients, and most of the transform coefficients in the high-frequency region are zero, which will result in poor context adaptation.
  • the target scan area where the transform coefficients are located can be divided into low-frequency, intermediate-frequency, and high-frequency areas more finely, thereby facilitating context adaptation and improving Understand code efficiency.
  • the coordinate values of the second target position and the third target position are determined according to the target position coordinate information, and the coordinate values of the position where the coefficient to be decoded is located, and the coordinates of the second target position and the third target position are determined.
  • the value selects a context model subset from the selected one type of context model set, and the context model is determined from the selected context model subset.
  • the abscissa value of the position where the coefficient to be decoded is less than or equal to the abscissa value of the second target position
  • the ordinate value of the position where the coefficient to be decoded is less than or equal to the ordinate value of the second target position
  • the abscissa value of the position of the coefficient to be decoded is greater than the abscissa value of the third target position, and the ordinate value of the position of the coefficient to be decoded is greater than the ordinate value of the third target position, select a type from the The third context model subset is selected from the context model set; otherwise, the second context model subset is selected from the selected one type of context model set.
  • the abscissa and ordinate of the second target position and the third target position can be set according to the actual situation, such as 4, 8, 16, etc. It should be noted that the abscissa value of the second target position should be less than The abscissa value of the third target position, and the ordinate value of the second target position should be smaller than the ordinate value of the third target position.
  • the selected context model set can be divided into the first context model subset, the second context model subset and the third context model subset according to the rules, it can be based on the abscissa of the position of the coefficient to be decoded and the second target position.
  • the relationship between the size of the abscissa, the size relationship between the ordinate of the position of the coefficient to be decoded and the ordinate of the second target position, the relationship between the abscissa of the position of the coefficient to be decoded and the abscissa of the third target position The size relationship and the size relationship between the ordinate of the position where the coefficient to be decoded is located and the ordinate of the third target position determine which context model subset the context model of the flag bit to be decoded is selected from.
  • pos_x be the abscissa of the position of the coefficient to be decoded
  • pos_y be the ordinate of the position of the coefficient to be decoded
  • the abscissa of the second target position is 4
  • the ordinate of the second target position is 8
  • the abscissa of the third target position is 16, and the ordinate of the third target position is 16.
  • the coefficient to be decoded is located in area 1, and the context model for determining the flag to be decoded is selected from the first context model subset.
  • the coefficient to be decoded is located in area 1, and the context of the flag to be decoded is determined
  • the model is selected from the first context model subset as an example.
  • the context model of the flag to be decoded can be determined from the first Take the three-context model subset selection as an example.
  • pos_x ⁇ 4 and pos_y ⁇ 8 when pos_x ⁇ 4 and pos_y ⁇ 8, and the coefficient to be decoded is located in area 1, it is determined that the context model of the flag to be decoded is selected from the first context model subset.
  • pos_x ⁇ 16 and pos_y ⁇ 16 when the coefficient to be decoded is located in area 3, it is determined that the context model of the flag to be decoded is selected from the third context model subset. Otherwise, when the coefficient to be decoded is located in area 2, it is determined that the context model of the flag to be decoded is selected from the second context model subset.
  • the selected type of context model set can also be divided into more than three context model subsets, that is, the selected type of context model set can also correspond to four context model subsets and five context models. Model subsets and so on.
  • the context model is determined at least according to the target position coordinate information.
  • the specific implementation may be: the context model may also be a linear relationship satisfied at least according to the target position coordinate information and the coordinate value of the position where the coefficient to be decoded is located. The formula is determined.
  • the selected one type of context model set includes One context model subset is selected from the multiple context model subsets as an example for description.
  • one type of context model set may be selected from the multiple types of context model sets according to the coordinate values of the positions of the coefficients to be decoded.
  • the context model may also be determined according to at least the target position coordinate information and the linear relationship that the coordinate value of the position where the coefficient to be decoded satisfies.
  • the specific realization may include: according to the target position coordinate information of the target scanning area , Select a type of context model set from a set of multiple types of context models, each type of context model set includes multiple context model subsets, according to the linear relationship satisfied by the coordinate value of the position of the coefficient to be decoded, from the selected type of context
  • a context model subset is selected from a plurality of context model subsets included in the model set, and the context model is determined from the selected context model subset.
  • the specific implementation manner of selecting a context model subset from the multiple context model subsets included in the selected one type of context model set may include but It is not limited to the following possible implementation methods:
  • the linear relationship that the coordinate value of the position of the coefficient to be decoded satisfies is a*pos_y+b*pos_x ⁇ c
  • select a subset of multiple context models included in the selected context model set The first subset of context models.
  • the second context model subset is selected from the multiple context model subsets included in the selected one type of context model set ,
  • a and b are constants
  • the pos_x is the abscissa value of the position of the coefficient to be decoded
  • the pos_y is the ordinate value of the position of the coefficient to be decoded.
  • a may be the first coordinate value
  • b may be the second coordinate value
  • the context of the flag to be decoded can be determined according to the linear relationship satisfied by the coordinate value of the position of the coefficient to be decoded Which context model subset the model is selected from.
  • the first context is selected from the multiple context model subsets included in the selected context model set Take the model subset as an example.
  • multiple context models may be included from the selected context model set. Select the second context model subset from the subset.
  • the first context model is selected from the multiple context model subsets included in the selected context model set Subset.
  • the second context model subset is selected from the multiple context model subsets included in the selected one type of context model set ,
  • a and b are constants
  • the pos_x is the abscissa value of the position of the coefficient to be decoded
  • the pos_y is the ordinate value of the position of the coefficient to be decoded.
  • the first context model subset is selected from the selected one type of context model set.
  • the coordinate value of the position of the coefficient to be decoded satisfies the linear relationship a1*pos_y+b1*pos_x>c1, and a2*pos_y+b2*pos_x ⁇ c2
  • Context model subset when the linear relationship that the coordinate value of the position of the coefficient to be decoded satisfies is a2*pos_y+b2*pos_x ⁇ c2
  • select the third context model subset from the selected one type of context model set where ,
  • the a1, b1, a2, b2, c1, and c2 are constants, the c1 is smaller than the c2, the pos_x is the abscissa value of the position of the coefficient to
  • both a1 and a2 may be the first coordinate value
  • both b1 and b2 may be the second coordinate value
  • the c1 may be half of the product of the first coordinate value and the second coordinate value
  • the linear relationship can be satisfied according to the coordinate value of the position of the coefficient to be decoded. Determine from which context model subset the context model of the flag to be decoded is selected.
  • the second context model can also be selected from the set of selected context models. set.
  • the second context model subset can also be selected from the selected one type of context model set.
  • the first context model subset is selected from the selected context model set.
  • the coordinate value of the position of the coefficient to be decoded satisfies the linear relationship a1*pos_y+b1*pos_x ⁇ c1, and a2*pos_y+b2*pos_x ⁇ c2
  • Context model subset when the linear relationship that the coordinate value of the position of the coefficient to be decoded satisfies is a2*pos_y+b2*pos_x>c2
  • select the third context model subset from the selected one type of context model set where ,
  • the a1, b1, a2, b2, c1, and c2 are constants, the c1 is smaller than the c2, the pos_x is the abscissa value of the position of the coefficient to be decoded,
  • the selected type of context model set can also be divided into more than three context model subsets, that is, the selected type of context model set can also correspond to four context model subsets and five context model subsets. and many more.
  • One context model subset is selected from the multiple context model subsets included in the class context model set as an example for description.
  • One type of context model set is selected from the context model set, and then a context model subset is selected from the multiple context model subsets included in the selected one type of context model set according to the target location coordinate information. The order is not limited.
  • the context model is determined based on at least the target position coordinate information.
  • the specific implementation may be: the context model is based on at least the target position coordinate information, the coordinate value of the position where the coefficient to be decoded is located, and the position where the coefficient to be decoded is located. The linear relationship that the coordinate value satisfies is determined.
  • the context model is determined according to at least the target position coordinate information, the coordinate value of the position of the coefficient to be decoded, and the linear relationship that the coordinate value of the position of the coefficient to be decoded satisfies.
  • the specific implementation may include: Target position coordinate information of the target scanning area, select one type of context model set from multiple types of context model sets, each type of context model set includes multiple context model subsets, according to the linear relationship satisfied by the coordinate value of the position of the coefficient to be decoded Formula, the coordinate value of the position of the coefficient to be decoded and the coordinate information of the target position, a context model subset is selected from a plurality of context model subsets included in the selected one type of context model set, and the context model is selected from a context model subset The model subset is determined.
  • multiple contexts included in the selected context model set may be: when the abscissa value of the position where the coefficient to be decoded is less than or equal to the first coordinate threshold, and the ordinate value of the position where the coefficient to be decoded is less than or equal to the second coordinate
  • the first context model subset is selected from the multiple context model subsets included in the selected one type of context model set.
  • the first coordinate threshold and the second coordinate threshold can be set according to actual conditions, such as 2, 4, 8 and so on.
  • a can be SRx
  • b can be SRy
  • c can be SRx*SRy.
  • the linear relationship can be satisfied according to the coordinate value of the position of the coefficient to be decoded.
  • the coordinate value of the position where the coefficient to be decoded is located and the target position coordinate information determine from which context model subset the context model of the flag bit to be decoded is selected.
  • first coordinate threshold For example, set the first coordinate threshold to 2 and the second coordinate threshold to 4.
  • pos_x ⁇ 2 and pos_y ⁇ 4 it indicates that the coordinates of the position of the coefficient to be decoded are located in area 1, and the decoding is determined
  • the context model of the flag bit is selected from the first context model subset.
  • SRx*pos_y+SRy*pos_x>SRx*SRy it means that the coordinates of the position where the coefficient to be decoded is located in area 3
  • the context model of the flag bit to be decoded is determined from The third context model subset is selected. Otherwise, it is explained that the coordinates of the position where the coefficient to be decoded is located in area 2, and the context model for determining the flag bit to be decoded is selected from the second context model subset.
  • the context model of the flag to be decoded is determined to be selected from the first context model subset, and when SRx*pos_y+SRy*pos_x ⁇ SRx*SRy, the flag to be decoded is determined
  • the context model of bits is selected from the third subset of context models. Otherwise, the context model for determining the flag to be decoded is selected from the second subset of context models.
  • One context model subset is selected from multiple context model subsets as an example for illustration.
  • the context model may be based on at least one of the linear relationship satisfied by the coordinate value of the position of the coefficient to be decoded, the coordinate value of the position of the coefficient to be decoded, and the coordinate information of the target position, from One context model subset is selected from a plurality of context model subsets included in the selected one type of context model set.
  • the above is to select a type of context model set from multiple types of context model sets according to the target position coordinate information of the target scan area, and then according to the target position coordinate information, the coordinate value of the position where the coefficient to be decoded is located, and The linear relationship that the coordinate value of the position of the coefficient to be decoded satisfies is described by selecting a context model subset from the selected one type of context model set as an example.
  • the target position coordinate information, the coordinate value of the position of the coefficient to be decoded, and the linear relationship that the coordinate value of the position of the coefficient to be decoded satisfies may be selected from a set of multiple types of context models.
  • the specific implementation of the context model being determined at least according to the target position coordinate information may be: the context model is determined at least according to the target position coordinate information and the preset condition satisfied by the current block.
  • the preset condition can be set according to actual needs.
  • the preset condition can include but is not limited to any of the following conditions:
  • the first coordinate value or the second coordinate value is zero. Or, the product of the first coordinate value and the second coordinate value is less than the first coordinate threshold. Or, the first coordinate value is greater than or equal to the second coordinate threshold and the second coordinate value is greater than or equal to the third coordinate threshold. Alternatively, the first coordinate value is less than or equal to the second coordinate threshold or the second coordinate value is less than the third coordinate threshold.
  • the first coordinate threshold, the second coordinate threshold, and the third coordinate threshold can be set according to actual conditions.
  • the context model is determined according to at least the target position coordinate information and the preset conditions satisfied by the current block.
  • the specific implementation may include: according to the target position coordinate information of the target scanning area, from a collection of multiple types of context models Select a type of context model set. Each type of context model set includes multiple context model subsets.
  • the selection method is determined according to the preset conditions that the current block meets. According to the determined selection method, the selected one type of context model set includes A context model subset is selected from a plurality of context model subsets, and the context model is determined from the selected context model subset.
  • the selection method is determined according to the preset conditions satisfied by the current block, and the specific implementation method of selecting a context model subset from the multiple context model subsets included in the selected one type of context model set according to the determined selection method It can be: when the current block satisfies a preset condition, according to the linear relationship satisfied by the coordinate value of the position of the coefficient to be decoded, a context model sub-set is selected from a plurality of context model subsets included in the selected context model set. set.
  • a context model sub-set is selected from a plurality of context model subsets included in the selected context model set. set.
  • the flag to be decoded determines the context model based on the linear combination of pos_x and pos_y.
  • the specific implementation can be See the above example. Otherwise, the to-be-decoded flag bit determines the context model based on the positions of pos_x and pos_y, and the specific implementation manner can refer to the foregoing embodiment.
  • one type of context model set is selected from the multi-type context model set according to the target position coordinate information of the target scanning area, and then the selection method is determined according to the preset conditions satisfied by the current block, and the selection method is selected according to the determined selection method.
  • the selection of a subset of context models from the selected one type of context model set is taken as an example for illustration.
  • the selection method may be determined first according to the preset conditions satisfied by the current block, a type of context model set is selected from the multi-type context model set according to the determined selection method, and then the target scanning area Select a context model subset from the selected one type of context model set.
  • the selection method may be selected based on the linear relationship satisfied by the coordinate value of the position of the coefficient to be decoded, or selected based on the coordinate value of the position of the coefficient to be decoded and the coordinate information of the target position.
  • Step 504 According to the context model, decode the flag to be decoded.
  • step 204 in the embodiment of FIG. 2 described above, which will not be repeated here.
  • the code stream of the current block is obtained.
  • the target position coordinate information is obtained from the code stream, and the target scanning area of the current block is determined based on the target position coordinate information, at least according to the target position
  • the coordinate information determines the context model of the to-be-decoded flag of the coefficient to be decoded, and decodes the to-be-decoded flag according to the context model. That is, the context model of the flag to be decoded is determined according to the target scanning area, so that this grouping method matches the scanning method of the SRCC technology, and the decoding performance is improved.
  • a type of context model set may be selected from a set of multiple types of context models according to the target scanning area to ensure that the grouping method matches the SRCC scanning method. Then, according to the position of the coefficient to be decoded in the target scanning area, a context model subset is selected from the selected context model set, and then the to-be-decoded flag of the coefficient to be decoded is determined from the selected context model subset.
  • the bit context model makes the region where the transform coefficients are located more finely divided into low-frequency, intermediate-frequency and high-frequency regions, which improves decoding efficiency.
  • first type of context model set second type of context model set, and third type of context model set are only used to distinguish groups.
  • the first type of context model set, the second type of context model set and the third type of context model set The type context model set is different from the first type context model set, the second type context model set, and the third type context model set in other embodiments.
  • an embodiment of the present application also provides a decoding method, which may be executed by the above electronic device, and the method may include the following steps.
  • Step A1 Obtain the code stream of the current block.
  • step 201 in the embodiment of FIG. 2, and details are not repeated here.
  • Step A2 When it is determined that the current block adopts SRCC, the target position coordinate information is obtained from the code stream.
  • the target position coordinate information is composed of a first coordinate value and a second coordinate value, and the first coordinate value is the current block's coordinate information.
  • the abscissa of the non-zero coefficient with the largest absolute value of the abscissa among the non-zero coefficients included in the transformation coefficient, and the second coordinate value is the ordinate of the non-zero coefficient with the largest absolute value of the ordinate among the non-zero coefficients included in the transformation coefficient of the current block. coordinate.
  • step 202 in the embodiment of FIG. 2, and details are not repeated here.
  • Step A3 For the coefficient to be decoded in the target scanning area of the current block, determine the context model of the to-be-decoded flag of the coefficient to be decoded.
  • the target scanning area is the scanning area determined based on the target position coordinate information.
  • the context model It is determined from at least three types of context model sets at least according to the coordinate value of the position of the coefficient to be decoded.
  • the context model is determined from at least three types of context model sets at least according to the coordinate value of the position of the coefficient to be decoded. There may be multiple specific implementations.
  • the context model is determined from at least three types of context model sets based on at least the coordinate value of the position where the coefficient to be decoded is located, including: determining the coordinate value of the first target position according to the target position coordinate information, and the context The model is determined at least according to the coordinate value of the position of the coefficient to be decoded and the coordinate value of the first target position, the first target position is located in the target scanning area and the target position indicated by the target position coordinate information is excluded.
  • the first target position can be any position in the target scanning area except the position where the (SRx, SRy) point is located.
  • the first target position can also be based on the target position, which is ( The position of the point (SRx, SRy) is determined.
  • the first target position may also be (SRx/2, SRy/2).
  • the context model is selected from the first type of context model set; when the abscissa value of the position where the coefficient to be decoded is greater than the abscissa value of the first target position, and the ordinate value of the position where the coefficient to be decoded is When the ordinate value is greater than the first target position, the context model is selected from the third type of context model set; otherwise, the context model is selected from the second type of context model set.
  • the context models corresponding to the to-be-decoded flag bits of the coefficients to be decoded can be divided into the first-type context model set, the second-type context model set, and the third-type context model set according to the rules, it can be based on the abscissa of the position of the coefficient to be decoded.
  • the magnitude relationship between the value and the abscissa value of the first target position, and the magnitude relationship between the ordinate value of the position where the coefficient to be decoded and the ordinate value of the first target position determine the context model of the flag to be decoded Choose from a collection of context models.
  • the context model is determined from at least three types of context model sets based on at least the coordinate value of the position where the coefficient to be decoded is located, including: determining the second target position and the third target position according to the target position coordinate information The coordinate value, the context model is determined at least according to the coordinate value of the position where the coefficient to be decoded is located, the coordinate value of the second target position and the third target position.
  • the context model is selected from the first type of context model set; when the abscissa value of the position where the coefficient to be decoded is greater than the abscissa value of the third target position, and the ordinate value of the position where the coefficient to be decoded is When the ordinate value is greater than the third target position, the context model is selected from the third type of context model set; otherwise, the context model is selected from the second type of context model set.
  • the abscissa and ordinate of the second target position and the third target position can be set according to the actual situation, such as 4, 8, 16, etc. It should be noted that the abscissa value of the second target position should be less than The abscissa value of the third target position, and the ordinate value of the second target position should be smaller than the ordinate value of the third target position.
  • the context models corresponding to the to-be-decoded flag bits of the coefficients to be decoded can be divided into the first-type context model set, the second-type context model set, and the third-type context model set according to the rules, it can be based on the abscissa of the position of the coefficient to be decoded.
  • the size relationship between the abscissa and the second target position, the size relationship between the ordinate of the position of the coefficient to be decoded and the ordinate of the second target position, the relationship between the abscissa of the position of the coefficient to be decoded and the third target position determines which type of context model set the context model of the flag to be decoded is selected from.
  • step 203 in the embodiment of FIG. 2, and details are not repeated here.
  • Step A4 According to the context model, decode the flag to be decoded.
  • step 204 in the embodiment in FIG. 2, and details are not repeated here.
  • the code stream of the current block is obtained.
  • the target position coordinate information is obtained from the code stream, and the target scanning area of the current block is determined based on the target position coordinate information, at least according to the target position
  • the coordinate information determines the context model of the to-be-decoded flag of the coefficient to be decoded, and decodes the to-be-decoded flag according to the context model. That is, the context model of the flag to be decoded is determined according to the target scanning area, so that this grouping method matches the scanning method of the SRCC technology, and the decoding performance is improved.
  • first type of context model set second type of context model set, and third type of context model set are only used to distinguish groups.
  • the first type of context model set, the second type of context model set and the third type of context model set The type context model set is different from the first type context model set, the second type context model set, and the third type context model set in other embodiments.
  • an embodiment of the present application also provides a decoding method, which may be executed by the above-mentioned electronic device, and the method may include the following steps.
  • Step B1 Obtain the code stream of the current block.
  • step 201 in the embodiment of FIG. 2, and details are not repeated here.
  • Step B2 When it is determined that the current block adopts the coefficient coding SRCC based on the scanning area, obtain the target position coordinate information from the code stream.
  • the target position coordinate information is composed of a first coordinate value and a second coordinate value.
  • the first coordinate The value is the abscissa of the non-zero coefficient with the largest absolute value of the abscissa among the non-zero coefficients included in the transformation coefficient of the current block
  • the second coordinate value is the abscissa of the non-zero coefficient with the largest absolute value of the ordinate among the non-zero coefficients included in the transformation coefficient of the current block The ordinate of the non-zero coefficient.
  • step 202 in the embodiment of FIG. 2, and details are not repeated here.
  • Step B3 For the coefficient to be decoded in the target scanning area of the current block, a context model of the to-be-decoded flag of the coefficient to be decoded is determined, the target scanning area is a scanning area determined based on the target position coordinate information, and the context model It is determined at least according to the linear relationship satisfied by the coordinate value of the position of the coefficient to be decoded.
  • the context model when the linear relationship that the coordinate value of the position of the coefficient to be decoded satisfies is a*pos_y+b*pos_x ⁇ c, the context model is selected from the first type of context model set; when the When the coordinate value of the position of the coefficient to be decoded satisfies the linear relationship a*pos_y+b*pos_x>c, the context model is selected from the second type of context model set; where a and b are constants, and pos_x is the abscissa value of the position of the coefficient to be decoded, and pos_y is the ordinate value of the position of the coefficient to be decoded.
  • the a is the first coordinate value
  • the b is the second coordinate value
  • the first value is the product of the first coordinate value and the second coordinate value.
  • the to-be-decoded coefficients can be determined according to the linear relationship satisfied by the coordinate values of the positions of the coefficients to be decoded.
  • the context model of the decoding flag is selected from the set of context models.
  • the context model is selected from the first type of context model set; when the When the coordinate value of the position of the coefficient to be decoded satisfies the linear relationship a1*pos_y+b1*pos_x>c1, and a2*pos_y+b2*pos_x ⁇ c2, the context model is selected from the second type of context model set ; When the linear relationship that the coordinate value of the position of the coefficient to be decoded satisfies is a2*pos_y+b2*pos_x>c2, the context model is selected from the third type of context model set; among them, the a1, b1, a2, b2, c1, and c2 are constants, the c1 is smaller than the c2, the pos_x is the abscissa value of the position of the coefficient to be decoded
  • the a1 and a2 are both the first coordinate value
  • the b1 and b2 are both the second coordinate value
  • the c1 is half of the product between the first coordinate value and the second coordinate value
  • the c2 is The product of the first coordinate value and the second coordinate value.
  • the context models corresponding to the to-be-decoded flag bits of the coefficients to be decoded can be divided into the first-type context model set, the second-type context model set, and the third-type context model set according to the rules, it can be based on the coordinate value of the position of the coefficient to be decoded.
  • the satisfied linear relationship determines which type of context model set the context model of the flag to be decoded is selected from.
  • the context model is at least determined according to the linear relational expression satisfied by the coordinate value of the position of the coefficient to be decoded, and the introduction is complete.
  • the above-mentioned context model is determined at least according to the linear relationship satisfied by the coordinate value of the position of the coefficient to be decoded, the coordinate value of the position of the coefficient to be decoded, and the coordinate information of the target position.
  • the specific implementation process includes: When the abscissa value of the position of the decoding coefficient is less than or equal to the first coordinate threshold, and the ordinate value of the position of the coefficient to be decoded is less than or equal to the second coordinate threshold, the context model is selected from the first type of context model set; otherwise , When the linear relationship that the coordinate value of the position of the coefficient to be decoded satisfies is a*pos_y+b*pos_x>c, the context model is selected from the third type of context model set; otherwise, the context model is from The second type of context model set is selected; wherein, the first coordinate threshold is smaller than the first coordinate value, and the second coordinate threshold is smaller than the second coordinate value.
  • the context models corresponding to the to-be-decoded flag bits of the coefficients to be decoded can be divided into the first-type context model set, the second-type context model set, and the third-type context model set according to the rules, it can be based on the coordinate value of the position of the coefficient to be decoded.
  • the satisfied linear relationship, the coordinate value of the position where the coefficient to be decoded is located, and the target position coordinate information determine which type of context model set the context model of the flag bit to be decoded is selected from.
  • step 203 in the embodiment of FIG. 2, and details are not repeated here.
  • the selected type of context model set may also be divided into more than three context model sets, that is, the selected type of context model set may also correspond to four context model sets, five context model sets, and so on.
  • Step B4 According to the context model, decode the flag to be decoded.
  • step 204 in the embodiment in FIG. 2, and details are not repeated here.
  • the code stream of the current block is obtained.
  • the target position coordinate information is obtained from the code stream, and the target scanning area of the current block is determined based on the target position coordinate information, at least according to the target position
  • the coordinate information determines the context model of the to-be-decoded flag of the coefficient to be decoded, and decodes the to-be-decoded flag according to the context model. That is, the context model of the flag to be decoded is determined according to the target scanning area, so that this grouping method matches the scanning method of the SRCC technology, and the decoding performance is improved.
  • first type of context model set second type of context model set, and third type of context model set are only used to distinguish groups.
  • the first type of context model set, the second type of context model set and the third type of context model set The type context model set is different from the first type context model set, the second type context model set, and the third type context model set in other embodiments.
  • an embodiment of the present application also provides a decoding method, which may be executed by the above-mentioned electronic device, and the method may include the following steps.
  • Step C1 Obtain the code stream of the current block.
  • step 201 in the embodiment of FIG. 2, and details are not repeated here.
  • Step C2 When it is determined that the current block adopts the coefficient coding SRCC based on the scanning area, the target position coordinate information is obtained from the code stream.
  • the target position coordinate information is composed of a first coordinate value and a second coordinate value.
  • the first coordinate The value is the abscissa of the non-zero coefficient with the largest absolute value of the abscissa among the non-zero coefficients included in the transformation coefficient of the current block
  • the second coordinate value is the abscissa of the non-zero coefficient with the largest absolute value of the ordinate among the non-zero coefficients included in the transformation coefficient of the current block The ordinate of the non-zero coefficient.
  • step 202 in the embodiment of FIG. 2, and details are not repeated here.
  • Step C3 For the coefficient to be decoded in the target scanning area of the current block, a context model of the to-be-decoded flag of the coefficient to be decoded is determined, the target scanning area is a scanning area determined based on the target position coordinate information, and the context model It is determined according to the determined selection method after the selection method is determined at least based on the preset condition met by the current block.
  • the selection method includes: selecting according to the linear relationship satisfied by the coordinate value of the position of the coefficient to be decoded, or selecting according to the coordinate value of the position of the coefficient to be decoded and the coordinate information of the target position.
  • the context model is determined based on at least the preset conditions met by the current block and the specific implementation manner determined according to the determined selection manner may be: when the current block meets the preset conditions, the context model is at least based on the pending conditions.
  • the linear relationship that the coordinate value of the position of the decoding coefficient satisfies is determined; when the current block does not meet the preset condition, the context model is determined at least according to the coordinate value of the position of the coefficient to be decoded and the target position coordinate information.
  • the preset condition includes one of the following conditions: the first coordinate value or the second coordinate value is zero; the product of the first coordinate value and the second coordinate value is less than the first coordinate threshold; The coordinate value is greater than or equal to the second coordinate threshold and the second coordinate value is greater than or equal to the third coordinate threshold; the first coordinate value is less than or equal to the second coordinate threshold or the second coordinate value is less than the third coordinate threshold.
  • the first coordinate threshold, the second coordinate threshold, and the third coordinate threshold can be set according to actual conditions.
  • step 203 in the embodiment of FIG. 2, and details are not repeated here.
  • Step C4 According to the context model, decode the flag to be decoded.
  • step 204 in the embodiment in FIG. 2, and details are not repeated here.
  • the code stream of the current block is obtained.
  • the target position coordinate information is obtained from the code stream, and the target scanning area of the current block is determined based on the target position coordinate information, at least according to the target position
  • the coordinate information determines the context model of the to-be-decoded flag of the coefficient to be decoded, and the to-be-decoded flag is decoded according to the context model. That is, the context model of the flag to be decoded is determined according to the target scanning area, so that this grouping method matches the scanning method of the SRCC technology, and the decoding performance is improved.
  • the embodiment of the present application also provides an encoding method, which may be executed by the above-mentioned electronic device, and the method may include the following steps.
  • Step D1 When the current block adopts the coefficient coding SRCC based on the scanning area, obtain the target position coordinate information, the target position coordinate information is composed of the first coordinate value and the second coordinate value, and the first coordinate value is the transformation of the current block The abscissa of the non-zero coefficient with the largest absolute value of the abscissa among the non-zero coefficients included in the coefficient, and the second coordinate value is the ordinate of the non-zero coefficient with the largest absolute value of the ordinate among the non-zero coefficients included in the transformation coefficient of the current block .
  • the scan area corresponding to the transform coefficient can be determined.
  • the scan area is the abscissa SRx (first coordinate value) of the rightmost non-zero transform coefficient in the transform coefficient of the current block and the transform coefficient.
  • the ordinate SRy (second coordinate value) of the bottom non-zero transformation coefficient is determined.
  • a coordinate system can be established with a certain vertex of the current block as the origin. Based on this, the encoder can determine the target scanning area through the information of SRx and SRy, and the position corresponding to the SRx and SRy is the target position corresponding to the target scanning area.
  • step 202 in the embodiment of FIG. 2, and details are not repeated here.
  • Step D2 For the coefficient to be coded in the target scanning area of the current block, a context model of the to-be-coded flag of the coefficient to be coded is determined, the target scanning area is a scanning area determined based on the target position coordinate information, and the context model It is determined at least according to the coordinate information of the target position.
  • the coefficient to be coded is the coefficient to be coded obtained in the scanning order, that is, the target scanning area can be scanned in a certain order during the coding process, as shown in Figure 3, the scanning order can be from the lower right corner Reverse zigzag scan to the upper left corner.
  • Each scan of a transform coefficient is determined as the coefficient to be coded, and then the flag bit to be coded of the coefficient to be coded can be determined according to the method provided in the embodiment of the present application.
  • the flag bit to be encoded is at least one of the first flag bit, the second flag bit, and the third flag bit.
  • the first flag bit is used to indicate whether the transform coefficient is non-zero.
  • the second flag bit is used to indicate whether the absolute value of the transform coefficient is greater than one.
  • the third flag bit is used to indicate whether the absolute value of the transform coefficient is greater than 2.
  • the first flag bit is significant flag
  • the second flag bit is GT1 flag
  • the third flag bit is GT2 flag.
  • at least one flag bit is required to indicate the coefficient to be coded, that is, the coefficient to be coded can be indicated by one flag bit or multiple flag bits. For example, if the coefficient to be coded is 1, a significant flag is required to indicate that the coefficient to be coded is non-zero, and GT1flag is used to indicate that the magnitude of the coefficient to be coded is less than or equal to 1. If the coefficient to be coded is 0, then only a significant flag is needed to indicate that the coefficient to be coded is zero.
  • the encoding of transform coefficients can be realized by encoding the syntax element used to indicate the transform coefficient, wherein at least one flag bit in the syntax element can be encoded by the context model.
  • each flag Bits can be coded through a variety of different context models. As shown in Table 1 in the embodiment of FIG. 2, it can be known that each flag bit corresponds to multiple context models. Therefore, it is necessary to determine which context model is used to encode the coefficients to be encoded during the encoding process.
  • the context model is determined at least according to the coordinate information of the target position.
  • the context model is determined at least according to the coordinate information of the target position.
  • Step D3 encoding the flag to be encoded according to the context model.
  • the context model may be determined in this type of context model set according to the number of non-zero coefficients in the five transformation coefficients that have been encoded before the coefficients to be encoded after a type of context model set is determined.
  • the to-be-coded flag can be coded according to the context model.
  • step 204 in the embodiment in FIG. 2, and details are not repeated here.
  • the target position coordinate information is acquired, the target scanning area of the current block is determined based on the target position coordinate information, and the to-be-encoded flag of the coefficient to be encoded is determined at least according to the target position coordinate information
  • the to-be-coded flag is coded. That is, the context model of the flag to be encoded is determined according to the target scanning area, so that this grouping method matches the scanning method of the SRCC technology, and the encoding performance is improved.
  • the embodiment of the present application also provides an encoding method, which may be executed by the above-mentioned electronic device, and the method may include the following steps.
  • Step E1 When the current block adopts the coefficient coding SRCC based on the scanning area, obtain the target position coordinate information, the target position coordinate information is composed of the first coordinate value and the second coordinate value, and the first coordinate value is the transformation of the current block The abscissa of the non-zero coefficient with the largest absolute value of the abscissa among the non-zero coefficients included in the coefficient, and the second coordinate value is the ordinate of the non-zero coefficient with the largest absolute value of the ordinate among the non-zero coefficients included in the transformation coefficient of the current block .
  • step 202 in the embodiment of FIG. 2, and details are not repeated here.
  • Step E2 For the coefficient to be coded in the target scan area of the current block, determine the context model of the flag to be coded of the coefficient to be coded, the target scan area is a scan area determined based on the target position coordinate information, and the context model It is determined from at least three types of context model sets at least according to the coordinate value of the position of the coefficient to be decoded.
  • step A3 For a specific implementation manner, refer to step A3 in the above-mentioned embodiment, which will not be repeated here.
  • Step E3 According to the context model, the flag bit to be encoded is encoded.
  • step 204 in the embodiment in FIG. 2, and details are not repeated here.
  • the target position coordinate information is acquired, the target scanning area of the current block is determined based on the target position coordinate information, and the to-be-coded flag of the coefficient to be encoded is determined at least according to the target position coordinate information
  • the to-be-coded flag is coded. That is, the context model of the flag to be encoded is determined according to the target scanning area, so that this grouping method matches the scanning method of the SRCC technology, and the encoding performance is improved.
  • the embodiment of the present application also provides an encoding method, which may be executed by the above-mentioned electronic device, and the method may include the following steps.
  • Step F1 When the current block adopts the coefficient coding SRCC based on the scanning area, obtain the target position coordinate information, the target position coordinate information is composed of the first coordinate value and the second coordinate value, and the first coordinate value is the transformation of the current block The abscissa of the non-zero coefficient with the largest absolute value of the abscissa among the non-zero coefficients included in the coefficient, and the second coordinate value is the ordinate of the non-zero coefficient with the largest absolute value of the ordinate among the non-zero coefficients included in the transformation coefficient of the current block .
  • step 202 in the embodiment of FIG. 2, and details are not repeated here.
  • Step F2 For the coefficient to be coded in the target scanning area of the current block, a context model of the to-be-coded flag of the coefficient to be coded is determined, the target scanning area is a scanning area determined based on the target position coordinate information, and the context model It is determined at least according to the linear relationship satisfied by the coordinate value of the position of the coefficient to be decoded.
  • step B3 For a specific implementation manner, refer to step B3 in the above-mentioned embodiment, which will not be repeated here.
  • Step F3 According to the context model, the flag bit to be encoded is encoded.
  • step 204 in the embodiment in FIG. 2, and details are not repeated here.
  • the target position coordinate information is acquired, the target scanning area of the current block is determined based on the target position coordinate information, and the to-be-encoded flag of the coefficient to be encoded is determined at least according to the target position coordinate information
  • the to-be-coded flag is coded. That is, the context model of the flag to be encoded is determined according to the target scanning area, so that this grouping method matches the scanning method of the SRCC technology, and the encoding performance is improved.
  • the embodiment of the present application also provides an encoding method, which may be executed by the above-mentioned electronic device, and the method may include the following steps.
  • Step G1 When the current block adopts the coefficient coding SRCC based on the scanning area, obtain the target position coordinate information, the target position coordinate information is composed of the first coordinate value and the second coordinate value, and the first coordinate value is the transformation of the current block The abscissa of the non-zero coefficient with the largest absolute value of the abscissa among the non-zero coefficients included in the coefficient, and the second coordinate value is the ordinate of the non-zero coefficient with the largest absolute value of the ordinate among the non-zero coefficients included in the transformation coefficient of the current block .
  • step 202 in the embodiment of FIG. 2, and details are not repeated here.
  • Step G2 For the coefficient to be coded in the target scan area of the current block, determine the context model of the flag to be coded of the coefficient to be coded.
  • the target scan area is a scan area determined based on the target position coordinate information, and the context model It is determined according to the determined selection method at least after the selection method is determined based on the preset condition met by the current block.
  • step C3 For a specific implementation manner, refer to step C3 in the foregoing embodiment, and details are not repeated here.
  • Step G3 According to the context model, encode the flag to be encoded.
  • step 204 in the embodiment in FIG. 2, and details are not repeated here.
  • the target position coordinate information is acquired, the target scanning area of the current block is determined based on the target position coordinate information, and the to-be-encoded flag of the coefficient to be encoded is determined at least according to the target position coordinate information
  • the to-be-coded flag is coded. That is, the context model of the flag to be encoded is determined according to the target scanning area, so that this grouping method matches the scanning method of the SRCC technology, and the encoding performance is improved.
  • FIG. 11 is a schematic structural diagram of a decoding device provided by an embodiment of the present application.
  • the device may include:
  • the code stream obtaining module 1110 is used to obtain the code stream of the current block
  • the information obtaining module 1120 is configured to obtain target position coordinate information from the code stream when it is determined that the current block adopts the coefficient coding SRCC based on the scanning area.
  • the target position coordinate information is composed of a first coordinate value and a second coordinate.
  • the first coordinate value is the abscissa of the non-zero coefficient with the largest absolute value of the abscissa among the non-zero coefficients included in the transformation coefficient of the current block
  • the second coordinate value is the transformation coefficient of the current block Among the included non-zero coefficients, the ordinate of the non-zero coefficient with the largest absolute value of the ordinate;
  • the model determination module 1130 is configured to determine the context model of the to-be-decoded flag of the to-be-decoded coefficient for the to-be-decoded coefficient in the target scan area of the current block, where the target scan area is based on the target position coordinate information For the determined scanning area, the context model is determined at least according to the coordinate information of the target position;
  • the decoding module 1140 is configured to decode the to-be-decoded flag bit according to the context model.
  • the context model is determined at least according to the area of the target scan area, and the area of the target scan area is determined according to the target position coordinate information.
  • the context model when the area of the target scan area is less than or equal to the first area threshold, the context model is selected from the first type of upper and lower model set; when the area of the scan area When it is greater than the first area threshold, the context model is selected from the second type of upper and lower model set.
  • the context model when the area of the target scan area is less than or equal to the first area threshold, the context model is selected from the first type of context model set; when the area of the target scan area is When the area is greater than the first area threshold and less than or equal to the second area threshold, the context model is selected from the second type of context model set; when the area of the target scan area is greater than the second area threshold, The context model is selected from the third type of context model set.
  • the context model is determined at least according to the size of the target scanning area, and the size of the target scanning area is determined according to the target position coordinate information.
  • the context model when the size of the target scan area is less than or equal to the first size threshold, the context model is selected from the first type of upper and lower model set; when the size of the scan area When it is greater than the first size threshold, the context model is selected from the second type of upper and lower model set.
  • the context model when the size of the target scan area is less than or equal to the first size threshold, the context model is selected from the first type of context model set; when the size of the target scan area is When the size is greater than the first size threshold and less than or equal to the second size threshold, the context model is selected from the second type of context model set; when the size of the target scanning area is greater than the second size threshold, The context model is selected from the third type of context model set.
  • the context model is determined at least according to the short side of the target scanning area, and the short side of the target scanning area is determined according to the target position coordinate information.
  • the context model when the short side of the target scan area is less than or equal to the first short side threshold, the context model is selected from the first type of upper and lower model set; when the scan area When the short side of is greater than the first short side threshold, the context model is selected from the set of upper and lower models of the second type.
  • the context model when the short side of the target scan area is less than or equal to the first short side threshold, the context model is selected from the first type of context model set; when the target scan When the short side of the region is greater than the first short side threshold and less than or equal to the second short side threshold, the context model is selected from the second type of context model set; when the short side of the target scanning area is greater than the When the second short-side threshold is used, the context model is selected from the third type of context model set.
  • the context model is determined at least according to the linear relationship that the coordinate value of the target position coordinate information satisfies.
  • the context model when the coordinate value of the target position coordinate information satisfies the linear relationship a*SRx+b*SRy+c ⁇ n1, the context model is from the first type of context Selected from the model set; when the coordinate value of the target position coordinate information satisfies the linear relationship a*SRx+b*SRy+c>n1, the context model is selected from the second type of context model set
  • the a, b, and c are constants
  • the SRx is the first coordinate value
  • the SRy is the second coordinate value.
  • the context model when the coordinate value of the target position coordinate information satisfies the linear relationship a*SRx+b*SRy+c ⁇ n1, the context model is from the first type of context Selected from the model set; when the coordinate value of the target position coordinate information satisfies the linear relationship n1 ⁇ a*SRx+b*SRy+c ⁇ n2, the context model is from the second type of context model set Selected; when the linear relational expression satisfied by the coordinate value of the target position coordinate information is a*SRx+b*SRy+c>n2, the context model is selected from the third type of context model set; wherein, The a, b, and c are constants, the SRx is the first coordinate value, and the SRy is the second coordinate value.
  • the flag to be decoded is at least one of a first flag, a second flag, and a third flag; the first flag is used to indicate whether the transform coefficient is non- Zero; the second flag bit is used to indicate whether the absolute value of the transform coefficient is greater than 1; the third flag bit is used to indicate whether the absolute value of the transform coefficient is greater than 2.
  • the context model is determined at least according to the coordinate information of the target location and the coordinate value of the location where the coefficient to be decoded is located.
  • one type of context model set is selected from multiple types of context model sets, and each type of context model set includes multiple context model subsets;
  • a context model subset is selected from a plurality of context model subsets included in the selected one type of context model set, and the context model is determined from the selected context model subset .
  • the context model is determined at least according to a linear relationship that is satisfied by the target position coordinate information and the coordinate value of the position where the coefficient to be decoded is located.
  • the model determination module 1130 is configured to: select a set of context models from a set of multiple types of context models according to the target position coordinate information of the target scan area, and each type of context model The set includes multiple context model subsets; according to the linear relationship satisfied by the coordinate value of the position of the coefficient to be decoded, a context model subset is selected from the multiple context model subsets included in the selected context model set, so The context model is determined from a selected subset of context models.
  • the context model when the linear relationship that the coordinate value of the position where the coefficient to be decoded satisfies is a*pos_y+b*pos_x ⁇ c, the context model is derived from the first context model Centrally selected; when the linear relationship that the coordinate value of the position of the coefficient to be decoded satisfies is a*pos_y+b*pos_x>c, the context model is selected from the second context model subset; where, The a and b are constants, the pos_x is the abscissa value of the position of the coefficient to be decoded, and the pos_y is the ordinate value of the position of the coefficient to be decoded.
  • said a is the first coordinate value
  • said b is the second coordinate value
  • the first value is the first coordinate value and the second coordinate value.
  • the context model when the linear relationship that the coordinate value of the position where the coefficient to be decoded satisfies is a1*pos_y+b1*pos_x ⁇ c1, the context model is derived from the first context model Centralized selection; when the linear relational expression satisfied by the coordinate value of the position of the coefficient to be decoded is a1*pos_y+b1*pos_x>c1, and a2*pos_y+b2*pos_x ⁇ c2, the context model is from The second context model is selected from the subset; when the coordinate value of the position where the coefficient to be decoded satisfies the linear relationship a2*pos_y+b2*pos_x ⁇ c2, the context model is selected from the third context model subset Wherein, the a1, b1, a2, b2, c1, and c2 are constants, the c1 is less than the c2, the pos_x is the abscissa value of the position of the coefficient to be decode
  • the a1 and a2 are both the first coordinate value
  • the b1 and b2 are both the second coordinate value
  • the c1 is the first coordinate value and Half of the product between the second coordinate values
  • the c2 is the product between the first coordinate value and the second coordinate value.
  • the context model is based on at least a linear relationship satisfied by the target position coordinate information, the coordinate value of the position where the coefficient to be decoded is located, and the coordinate value of the position where the coefficient to be decoded is located.
  • the formula is determined.
  • the model determination module 1130 is configured to: select a set of context models from a set of multiple types of context models according to the target position coordinate information of the target scan area, and each type of context model The set includes a plurality of context model subsets; according to the linear relationship satisfied by the coordinate value of the position of the coefficient to be decoded, the coordinate value of the position of the coefficient to be decoded, and the target position coordinate information, select a type of context A context model subset is selected from a plurality of context model subsets included in the model set, and the context model is determined from the selected context model subset.
  • the context model is determined at least according to the target position coordinate information and the preset condition satisfied by the current block.
  • the model determination module 1130 is further configured to: select a set of context models from a set of multiple types of context models according to the target position coordinate information of the target scan area, and each type of context
  • the model set includes multiple context model subsets; the selection method is determined according to the preset conditions satisfied by the current block, and a context is selected from the multiple context model subsets included in the selected context model set according to the determined selection method A subset of models, and the context model is determined from a selected subset of context models.
  • the model determination module 1130 is configured to determine the area of the target scanning area according to the target position coordinate information of the target scanning area, and according to the area, from multiple types of contexts Select a type of context model set from the model set; or, determine the size of the target scan area according to the target position coordinate information of the target scan area, and select a type of context model from a set of multiple types of context models according to the size Or, determine the short side of the target scan area according to the target position coordinate information of the target scan area, and select a type of context model set from a set of multiple types of context models according to the short side; or, according to all According to the target position coordinate information of the target scanning area, a linear relationship expression satisfied by the coordinate value of the target position coordinate information is determined, and a type of context model set is selected from a plurality of types of context model sets according to the linear relationship expression.
  • the code stream of the current block is obtained.
  • the target position coordinate information is obtained from the code stream, and the target scanning area of the current block is determined based on the target position coordinate information, at least according to the target position
  • the coordinate information determines the context model of the to-be-decoded flag of the coefficient to be decoded, and the to-be-decoded flag is decoded according to the context model. That is, the context model of the flag to be decoded is determined according to the target scanning area, so that this grouping method matches the scanning method of the SRCC technology, and the decoding performance is improved.
  • an embodiment of the present application further provides a decoding device, which may include:
  • the code stream acquisition module is used to obtain the code stream of the current block
  • the information acquisition module is configured to acquire target position coordinate information from the code stream when it is determined that the current block adopts the coefficient coding SRCC based on the scanning area.
  • the target position coordinate information consists of a first coordinate value and a second coordinate value.
  • the first coordinate value is the abscissa of the non-zero coefficient with the largest abscissa absolute value among the non-zero coefficients included in the transformation coefficient of the current block
  • the second coordinate value is the abscissa of the non-zero coefficient of the current block.
  • the ordinate of the non-zero coefficient with the largest absolute value of the ordinate is the abscissa of the non-zero coefficient of the current block.
  • the model determination module is used to determine the context model of the to-be-decoded flag of the to-be-decoded coefficient for the to-be-decoded coefficient in the target scan area of the current block, and the target scan area is determined based on the target position coordinate information
  • the context model is determined from at least three types of context model sets according to at least the coordinate values of the positions where the coefficients to be decoded are located;
  • the decoding module is configured to decode the to-be-decoded flag bit according to the context model.
  • the coordinate value of the first target position is determined according to the target position coordinate information, and the context model is based on at least the coordinate value of the position where the coefficient to be decoded is located and the first target The coordinate value of the position is determined, the first target position is located in the target scanning area and the target position indicated by the target position coordinate information is excluded.
  • the context model when the abscissa value of the position where the coefficient to be decoded is less than or equal to the abscissa value of the first target position, and the ordinate value of the position where the coefficient to be decoded is less than or equal to
  • the context model is selected from the first type of context model set; when the abscissa value of the position where the coefficient to be decoded is located is greater than the abscissa value of the first target position Value, and the ordinate value of the position where the coefficient to be decoded is located is greater than the ordinate value of the first target position, the context model is selected from the third type of context model set; otherwise, the context model is Selected from the second type of context model collection.
  • the coordinate values of the second target position and the third target position are determined according to the target position coordinate information, and the context model is at least based on the coordinate values of the positions where the coefficients to be decoded are located, The coordinate values of the second target position and the third target position are determined.
  • the context model when the abscissa value of the position where the coefficient to be decoded is less than or equal to the abscissa value of the second target position, and the ordinate value of the position where the coefficient to be decoded is less than or equal to
  • the context model is selected from the first type of context model set; when the abscissa value of the position where the coefficient to be decoded is located is greater than the abscissa value of the third target position Value, and the ordinate value of the position where the coefficient to be decoded is greater than the ordinate value of the third target position, the context model is selected from the third type of context model set; otherwise, the context model is Selected from the second type of context model collection.
  • the code stream of the current block is obtained.
  • the target position coordinate information is obtained from the code stream, and the target scanning area of the current block is determined based on the target position coordinate information, at least according to the target position
  • the coordinate information determines the context model of the to-be-decoded flag of the coefficient to be decoded, and the to-be-decoded flag is decoded according to the context model. That is, the context model of the flag to be decoded is determined according to the target scanning area, so that this grouping method matches the scanning method of the SRCC technology, and the decoding performance is improved.
  • an embodiment of the present application further provides a decoding device, which may include:
  • the code stream acquisition module is used to obtain the code stream of the current block
  • the information acquisition module is configured to acquire target position coordinate information from the code stream when it is determined that the current block adopts the coefficient coding SRCC based on the scanning area.
  • the target position coordinate information consists of a first coordinate value and a second coordinate value.
  • the first coordinate value is the abscissa of the non-zero coefficient with the largest abscissa absolute value among the non-zero coefficients included in the transformation coefficient of the current block
  • the second coordinate value is the abscissa of the non-zero coefficient of the current block.
  • the ordinate of the non-zero coefficient with the largest absolute value of the ordinate is the abscissa of the non-zero coefficient of the current block.
  • the model determination module is used to determine the context model of the to-be-decoded flag of the to-be-decoded coefficient for the to-be-decoded coefficient in the target scan area of the current block, and the target scan area is determined based on the target position coordinate information
  • the scanning area of the, the context model is determined at least according to the linear relationship satisfied by the coordinate value of the position where the coefficient to be decoded is located;
  • the decoding module is configured to decode the to-be-decoded flag bit according to the context model.
  • the context model when the linear relationship that the coordinate value of the position where the coefficient to be decoded satisfies is a*pos_y+b*pos_x ⁇ c, the context model is from the first type of context model Selected from the set; when the linear relational expression satisfied by the coordinate value of the position of the coefficient to be decoded is a*pos_y+b*pos_x>c, the context model is selected from the second type of context model set; wherein
  • the a and b are constants, the pos_x is the abscissa value of the position of the coefficient to be decoded, and the pos_y is the ordinate value of the position of the coefficient to be decoded.
  • said a is the first coordinate value
  • said b is the second coordinate value
  • the first value is the first coordinate value and the second coordinate value.
  • the context model when the linear relationship that the coordinate value of the position of the coefficient to be decoded satisfies is a1*pos_y+b1*pos_x ⁇ c1, the context model is from the first type of context model Selected from the set; when the linear relational expression satisfied by the coordinate value of the position of the coefficient to be decoded is a1*pos_y+b1*pos_x>c1, and a2*pos_y+b2*pos_x ⁇ c2, the context model is from Selected from the second type of context model set; when the coordinate value of the position where the coefficient to be decoded satisfies the linear relationship a2*pos_y+b2*pos_x ⁇ c2, the context model is from the third type of context model set Where the a1, b1, a2, b2, c1, and c2 are constants, the c1 is less than the c2, the pos_x is the abscissa value of the position of the coefficient to be decode
  • the a1 and a2 are both the first coordinate value
  • the b1 and b2 are both the second coordinate value
  • the c1 is the first coordinate value and Half of the product between the second coordinate values
  • the c2 is the product between the first coordinate value and the second coordinate value.
  • the context model is based on at least a linear relationship satisfied by the coordinate value of the position of the coefficient to be decoded, the coordinate value of the position of the coefficient to be decoded, and the coordinates of the target position.
  • the information is OK.
  • the The context model is selected from the first type of context model set; otherwise, when the coordinate value of the position where the coefficient to be decoded satisfies the linear relationship a*pos_y+b*pos_x>c, the context model is from The third type of context model set is selected; otherwise, the context model is selected from the second type of context model set; wherein, the first threshold is less than the first coordinate value, and the second threshold is less than the first Two coordinate values.
  • the code stream of the current block is obtained.
  • the target position coordinate information is obtained from the code stream, and the target scanning area of the current block is determined based on the target position coordinate information, at least according to the target position
  • the coordinate information determines the context model of the to-be-decoded flag of the coefficient to be decoded, and the to-be-decoded flag is decoded according to the context model. That is, the context model of the flag to be decoded is determined according to the target scanning area, so that this grouping method matches the scanning method of the SRCC technology, and the decoding performance is improved.
  • an embodiment of the present application further provides a decoding device, which may include:
  • the code stream acquisition module is used to obtain the code stream of the current block
  • the information acquisition module is configured to acquire target position coordinate information from the code stream when it is determined that the current block adopts the coefficient coding SRCC based on the scanning area.
  • the target position coordinate information consists of a first coordinate value and a second coordinate value.
  • the first coordinate value is the abscissa of the non-zero coefficient with the largest abscissa absolute value among the non-zero coefficients included in the transformation coefficient of the current block
  • the second coordinate value is the abscissa of the non-zero coefficient of the current block.
  • the ordinate of the non-zero coefficient with the largest absolute value of the ordinate is the abscissa of the non-zero coefficient of the current block.
  • the model determination module is used to determine the context model of the to-be-decoded flag of the to-be-decoded coefficient for the to-be-decoded coefficient in the target scan area of the current block, and the target scan area is determined based on the target position coordinate information
  • the context model is determined according to the determined selection method after determining a selection method at least based on a preset condition satisfied by the current block;
  • the decoding module is configured to decode the to-be-decoded flag bit according to the context model.
  • the selection is made according to the linear relationship satisfied by the coordinate value of the position where the coefficient to be decoded is located; or, according to the coordinate value of the position where the coefficient to be decoded is located and the target position coordinate information Make a selection.
  • the context model when the current block satisfies a preset condition, the context model is determined at least according to the linear relationship satisfied by the coordinate value of the position of the coefficient to be decoded; when the current block When the block does not satisfy the preset condition, the context model is determined at least according to the coordinate value of the position where the coefficient to be decoded is located and the target position coordinate information.
  • the preset condition includes one of the following conditions: the first coordinate value or the second coordinate value is zero; the first coordinate value and the first coordinate value The product of the two coordinate values is less than the first coordinate threshold; the first coordinate value is greater than or equal to the second coordinate threshold and the second coordinate value is greater than or equal to the third coordinate threshold; the first coordinate value is less than or equal to the second coordinate threshold or The second coordinate value is less than the third coordinate threshold.
  • the code stream of the current block is obtained.
  • the target position coordinate information is obtained from the code stream, and the target scanning area of the current block is determined based on the target position coordinate information, at least according to the target position
  • the coordinate information determines the context model of the to-be-decoded flag of the coefficient to be decoded, and the to-be-decoded flag is decoded according to the context model. That is, the context model of the flag to be decoded is determined according to the target scanning area, so that this grouping method matches the scanning method of the SRCC technology, and the decoding performance is improved.
  • the decoding device provided in the above embodiment implements the decoding method
  • only the division of the above functional modules is used as an example for illustration.
  • the above functions can be allocated by different functional modules according to needs, i.e.
  • the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
  • the decoding device provided in the foregoing embodiment and the decoding method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
  • FIG. 12 is a schematic structural diagram of an encoding device provided by an embodiment of the present application.
  • the device may include:
  • the obtaining module 1210 is configured to obtain target position coordinate information when the current block adopts the scanning area-based coefficient coding SRCC, the target position coordinate information is composed of a first coordinate value and a second coordinate value, and the first coordinate value is The abscissa of the non-zero coefficient with the largest abscissa absolute value among the non-zero coefficients included in the transformation coefficient of the current block, and the second coordinate value is the absolute value of the ordinate of the non-zero coefficient included in the transformation coefficient of the current block The ordinate of the largest non-zero coefficient;
  • the determining module 1220 is configured to determine the context model of the to-be-coded flag bits of the to-be-coded coefficients for the to-be-coded coefficients in the target scan area of the current block, and the target scan area is determined based on the target position coordinate information
  • the scanning area of the, the context model is determined according to at least the target position coordinate information
  • the encoding module 1230 is configured to encode the flag bit to be encoded according to the context model.
  • the target position coordinate information is acquired, the target scanning area of the current block is determined based on the target position coordinate information, and the to-be-encoded flag of the coefficient to be encoded is determined at least according to the target position coordinate information
  • the to-be-coded flag is coded. That is, the context model of the flag to be encoded is determined according to the target scanning area, so that this grouping method matches the scanning method of the SRCC technology, and the encoding performance is improved.
  • an embodiment of the present application further provides an encoding device, which may include:
  • the acquiring module is used to acquire target position coordinate information when the current block adopts the coefficient coding SRCC based on the scanning area.
  • the target position coordinate information is composed of a first coordinate value and a second coordinate value, and the first coordinate value is The abscissa of the non-zero coefficient with the largest absolute value of the abscissa among the non-zero coefficients included in the transformation coefficient of the current block, and the second coordinate value is the largest absolute value of the ordinate among the non-zero coefficients included in the transformation coefficient of the current block The ordinate of the non-zero coefficient of;
  • the determining module is configured to determine the context model of the to-be-coded flag bits of the to-be-coded coefficients for the to-be-coded coefficients in the target scan area of the current block, and the target scan area is determined based on the target position coordinate information Scanning area, the context model is determined from at least three types of context model sets according to at least the coordinate value of the position where the coefficient to be decoded is located;
  • the encoding module is used to encode the to-be-encoded flag bit according to the context model.
  • the target position coordinate information is acquired, the target scanning area of the current block is determined based on the target position coordinate information, and the to-be-encoded flag of the coefficient to be encoded is determined at least according to the target position coordinate information
  • the to-be-coded flag is coded. That is, the context model of the flag to be encoded is determined according to the target scanning area, so that this grouping method matches the scanning method of the SRCC technology, and the encoding performance is improved.
  • an embodiment of the present application further provides an encoding device, which may include:
  • the acquiring module is used to acquire target position coordinate information when the current block adopts the coefficient coding SRCC based on the scanning area.
  • the target position coordinate information is composed of a first coordinate value and a second coordinate value, and the first coordinate value is The abscissa of the non-zero coefficient with the largest absolute value of the abscissa among the non-zero coefficients included in the transformation coefficient of the current block, and the second coordinate value is the largest absolute value of the ordinate among the non-zero coefficients included in the transformation coefficient of the current block The ordinate of the non-zero coefficient of;
  • the determining module is configured to determine the context model of the to-be-coded flag bits of the to-be-coded coefficients for the to-be-coded coefficients in the target scan area of the current block, and the target scan area is determined based on the target position coordinate information Scanning area, the context model is determined at least according to a linear relationship satisfied by the coordinate value of the position where the coefficient to be decoded is located;
  • the encoding module is used to encode the to-be-encoded flag bit according to the context model.
  • the target position coordinate information is acquired, the target scanning area of the current block is determined based on the target position coordinate information, and the to-be-encoded flag of the coefficient to be encoded is determined at least according to the target position coordinate information
  • the to-be-coded flag is coded. That is, the context model of the flag to be encoded is determined according to the target scanning area, so that this grouping method matches the scanning method of the SRCC technology, and the encoding performance is improved.
  • an embodiment of the present application further provides an encoding device, which may include:
  • the acquiring module is used to acquire target position coordinate information when the current block adopts the coefficient coding SRCC based on the scanning area.
  • the target position coordinate information is composed of a first coordinate value and a second coordinate value, and the first coordinate value is The abscissa of the non-zero coefficient with the largest absolute value of the abscissa among the non-zero coefficients included in the transformation coefficient of the current block, and the second coordinate value is the largest absolute value of the ordinate among the non-zero coefficients included in the transformation coefficient of the current block The ordinate of the non-zero coefficient of;
  • the determining module is configured to determine the context model of the to-be-coded flag bits of the to-be-coded coefficients for the to-be-coded coefficients in the target scan area of the current block, and the target scan area is determined based on the target position coordinate information Scanning area, the context model is determined according to the determined selection method after a selection method is determined at least based on a preset condition satisfied by the current block;
  • the encoding module is used to encode the to-be-encoded flag bit according to the context model.
  • the target position coordinate information is acquired, the target scanning area of the current block is determined based on the target position coordinate information, and the to-be-encoded flag of the coefficient to be encoded is determined at least according to the target position coordinate information
  • the to-be-coded flag is coded. That is, the context model of the flag to be encoded is determined according to the target scanning area, so that this grouping method matches the scanning method of the SRCC technology, and the encoding performance is improved.
  • the encoding device provided in the above embodiment implements the encoding method
  • only the division of the above functional modules is used as an example for illustration.
  • the above functions can be allocated by different functional modules according to needs, i.e.
  • the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
  • the encoding device provided in the foregoing embodiment and the encoding method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
  • FIG. 13 is a structural block diagram of an electronic device 1300 provided by an embodiment of the present application.
  • the electronic device can be used for encoding and decoding.
  • the electronic device 1300 may be a portable mobile terminal, such as a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, dynamic image expert compression standard audio layer 3), MP4 (Moving Picture Experts Group Audio Layer IV, The dynamic image expert compresses the standard audio level 4) Player, laptop or desktop computer.
  • the electronic device 1300 may also be called user equipment, portable terminal, laptop terminal, desktop terminal and other names.
  • the electronic device 1300 includes a processor 1301 and a memory 1302.
  • the processor 1301 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so on.
  • the processor 1301 may adopt at least one hardware form among DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array, Programmable Logic Array). achieve.
  • the processor 1301 may also include a main processor and a coprocessor.
  • the main processor is a processor used to process data in the awake state, also called a CPU (Central Processing Unit, central processing unit); the coprocessor is A low-power processor used to process data in the standby state.
  • the processor 1301 may be integrated with a GPU (Graphics Processing Unit, image processor), and the GPU is used for rendering and drawing content that needs to be displayed on the display screen.
  • the processor 1301 may further include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
  • AI Artificial Intelligence
  • the memory 1302 may include one or more computer-readable storage media, which may be non-transitory.
  • the memory 1302 may also include high-speed random access memory and non-volatile memory, such as one or more magnetic disk storage devices and flash memory storage devices.
  • the non-transitory computer-readable storage medium in the memory 1302 is used to store at least one instruction, and the at least one instruction is used to be executed by the processor 1301 to implement the decoding method provided in the method embodiment of the present application , Coding method.
  • the electronic device 1300 may optionally further include: a peripheral device interface 1303 and at least one peripheral device.
  • the processor 1301, the memory 1302, and the peripheral device interface 1303 may be connected by a bus or a signal line.
  • Each peripheral device can be connected to the peripheral device interface 1303 through a bus, a signal line, or a circuit board.
  • the peripheral device includes: at least one of a radio frequency circuit 1304, a touch display screen 1305, a camera 1306, an audio circuit 1307, a positioning component 1308, and a power supply 1309.
  • the peripheral device interface 1303 can be used to connect at least one peripheral device related to I/O (Input/Output) to the processor 1301 and the memory 1302.
  • the processor 1301, the memory 1302, and the peripheral device interface 1303 are integrated on the same chip or circuit board; in some other embodiments, any one of the processor 1301, the memory 1302, and the peripheral device interface 1303 or The two can be implemented on a separate chip or circuit board, which is not limited in this embodiment.
  • the radio frequency circuit 1304 is used for receiving and transmitting RF (Radio Frequency, radio frequency) signals, also called electromagnetic signals.
  • the radio frequency circuit 1304 communicates with a communication network and other communication devices through electromagnetic signals.
  • the radio frequency circuit 1304 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals.
  • the radio frequency circuit 1304 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and so on.
  • the radio frequency circuit 1304 can communicate with other terminals through at least one wireless communication protocol.
  • the wireless communication protocol includes but is not limited to: World Wide Web, Metropolitan Area Network, Intranet, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area network and/or WiFi (Wireless Fidelity, wireless fidelity) network.
  • the radio frequency circuit 1304 may also include a circuit related to NFC (Near Field Communication), which is not limited in this application.
  • the display screen 1305 is used to display UI (User Interface).
  • the UI can include graphics, text, icons, videos, and any combination thereof.
  • the display screen 1305 also has the ability to collect touch signals on or above the surface of the display screen 1305.
  • the touch signal may be input to the processor 1301 as a control signal for processing.
  • the display screen 1305 may also be used to provide virtual buttons and/or virtual keyboards, also called soft buttons and/or soft keyboards.
  • the display screen 1305 may be a flexible display screen, which is arranged on the curved surface or the folding surface of the electronic device 1300. Even the display screen 1305 can also be set as a non-rectangular irregular pattern, that is, a special-shaped screen.
  • the display screen 1305 can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).
  • the camera assembly 1306 is used to capture images or videos.
  • the camera assembly 1306 includes a front camera and a rear camera.
  • the front camera is set on the front panel of the terminal, and the rear camera is set on the back of the terminal.
  • the camera assembly 1306 may also include a flashlight.
  • the flash can be a single-color flash or a dual-color flash. Dual color temperature flash refers to a combination of warm light flash and cold light flash, which can be used for light compensation under different color temperatures.
  • the audio circuit 1307 may include a microphone and a speaker.
  • the microphone is used to collect sound waves of the user and the environment, and convert the sound waves into electrical signals and input them to the processor 1301 for processing, or input to the radio frequency circuit 1304 to implement voice communication.
  • the microphone can also be an array microphone or an omnidirectional collection microphone.
  • the speaker is used to convert the electrical signal from the processor 1301 or the radio frequency circuit 1304 into sound waves.
  • the speaker can be a traditional thin-film speaker or a piezoelectric ceramic speaker.
  • the speaker When the speaker is a piezoelectric ceramic speaker, it can not only convert the electrical signal into human audible sound waves, but also convert the electrical signal into human inaudible sound waves for distance measurement and other purposes.
  • the audio circuit 1307 may also include a headphone jack.
  • the positioning component 1308 is used to locate the current geographic location of the electronic device 1300 to implement navigation or LBS (Location Based Service, location-based service).
  • the positioning component 1308 may be a positioning component based on the GPS (Global Positioning System, Global Positioning System) of the United States, the Beidou system of China, or the Galileo system of Russia.
  • the power supply 1309 is used to supply power to various components in the electronic device 1300.
  • the power supply 1309 may be alternating current, direct current, disposable batteries, or rechargeable batteries.
  • the rechargeable battery may be a wired rechargeable battery or a wireless rechargeable battery.
  • a wired rechargeable battery is a battery charged through a wired line
  • a wireless rechargeable battery is a battery charged through a wireless coil.
  • the rechargeable battery can also be used to support fast charging technology.
  • the electronic device 1300 further includes one or more sensors 1310.
  • the one or more sensors 1310 include, but are not limited to: an acceleration sensor 1311, a gyroscope sensor 1312, a pressure sensor 1313, a fingerprint sensor 1314, an optical sensor 1315, and a proximity sensor 1316.
  • the acceleration sensor 1311 can detect the magnitude of acceleration on the three coordinate axes of the coordinate system established by the electronic device 1300.
  • the acceleration sensor 1311 can be used to detect the components of gravitational acceleration on three coordinate axes.
  • the processor 1301 can control the touch screen 1305 to display the user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 1311.
  • the acceleration sensor 1311 may also be used for the collection of game or user motion data.
  • the gyroscope sensor 1312 can detect the body direction and rotation angle of the electronic device 1300, and the gyroscope sensor 1312 can cooperate with the acceleration sensor 1311 to collect the user's 3D actions on the electronic device 1300.
  • the processor 1301 can implement the following functions according to the data collected by the gyroscope sensor 1312: motion sensing (for example, changing the UI according to the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.
  • the pressure sensor 1313 may be disposed on the side frame of the electronic device 1300 and/or the lower layer of the touch display screen 1305.
  • the processor 1301 performs left and right hand recognition or quick operation according to the holding signal collected by the pressure sensor 1313.
  • the processor 1301 controls the operability controls on the UI interface according to the user's pressure operation on the touch display screen 1305.
  • the operability control includes at least one of a button control, a scroll bar control, an icon control, and a menu control.
  • the fingerprint sensor 1314 is used to collect the user's fingerprint.
  • the processor 1301 identifies the user's identity according to the fingerprint collected by the fingerprint sensor 1314, or the fingerprint sensor 1314 identifies the user's identity according to the collected fingerprint.
  • the processor 1301 authorizes the user to perform related sensitive operations, including unlocking the screen, viewing encrypted information, downloading software, paying, and changing settings.
  • the fingerprint sensor 1314 may be provided on the front, back or side of the electronic device 1300. When the electronic device 1300 is provided with a physical button or a manufacturer logo, the fingerprint sensor 1314 may be integrated with the physical button or the manufacturer logo.
  • the optical sensor 1315 is used to collect the ambient light intensity.
  • the processor 1301 may control the display brightness of the touch screen 1305 according to the intensity of the ambient light collected by the optical sensor 1315. Specifically, when the ambient light intensity is high, the display brightness of the touch display screen 1305 is increased; when the ambient light intensity is low, the display brightness of the touch display screen 1305 is decreased.
  • the processor 1301 may also dynamically adjust the shooting parameters of the camera assembly 1306 according to the ambient light intensity collected by the optical sensor 1315.
  • the proximity sensor 1316 also called a distance sensor, is usually arranged on the front panel of the electronic device 1300.
  • the proximity sensor 1316 is used to collect the distance between the user and the front of the electronic device 1300.
  • the processor 1301 controls the touch screen 1305 to switch from the on-screen state to the off-screen state; when the proximity sensor 1316 When it is detected that the distance between the user and the front of the electronic device 1300 is gradually increasing, the processor 1301 controls the touch display screen 1305 to switch from the on-screen state to the on-screen state.
  • FIG. 13 does not constitute a limitation on the electronic device 1300, and may include more or fewer components than shown, or combine certain components, or adopt different component arrangements.
  • a computer-readable storage medium stores a computer program, and the computer program implements the steps of the method in the above-mentioned embodiments when the computer program is executed by a processor.
  • the computer-readable storage medium may be ROM (Read Only Memory), RAM (Random Access Memory), CD-ROM (Compact Disk-ROM, optical disk read-only memory), magnetic tape , Floppy disks and optical data storage devices.
  • the computer-readable storage medium mentioned in this application may be a non-volatile storage medium, in other words, it may be a non-transitory storage medium.
  • a computer program product containing instructions is also provided, which when running on a computer, causes the computer to execute the steps of the decoding method and encoding method described above.

Abstract

La présente invention concerne un procédé de décodage, un procédé de codage et un appareil, se rapportant au domaine technique du codage-décodage vidéo. Le procédé consiste à : acquérir un flux de code d'un bloc courant ; lorsque le bloc courant est déterminé pour utiliser un codage de coefficient à base de région de balayage (SRCC), acquérir des informations de coordonnées de position cible à partir du flux de code, les informations de coordonnées de position cible consistant en une première valeur de coordonnées et une seconde valeur de coordonnées ; pour un coefficient qui doit être décodé dans une région de balayage cible du bloc courant, déterminer un modèle de contexte pour un bit indicateur à décoder du coefficient à décoder, la région de balayage cible étant une région de balayage déterminée sur la base des informations de coordonnées de position cible, et le modèle de contexte étant déterminé au moins sur la base des informations de coordonnées de position cible ; et sur la base du modèle de contexte, décoder le bit indicateur à décoder. Dans la présente invention, un modèle de contexte pour un bit indicateur à décoder est déterminé au moyen d'une région de balayage cible, amenant un tel mode de regroupement à être compatible avec un mode de balayage de technologie SRCC, ce qui permet d'améliorer les performances de décodage.
PCT/CN2020/096580 2019-08-27 2020-06-17 Procédé de décodage, procédé de codage et appareil WO2021036430A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910798693.6 2019-08-27
CN201910798693.6A CN112449192B (zh) 2019-08-27 2019-08-27 解码方法、编码方法及装置

Publications (1)

Publication Number Publication Date
WO2021036430A1 true WO2021036430A1 (fr) 2021-03-04

Family

ID=69229942

Family Applications (2)

Application Number Title Priority Date Filing Date
PCT/CN2020/096578 WO2021036429A1 (fr) 2019-08-27 2020-06-17 Procédé de décodage, procédé de codage, et appareil
PCT/CN2020/096580 WO2021036430A1 (fr) 2019-08-27 2020-06-17 Procédé de décodage, procédé de codage et appareil

Family Applications Before (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/096578 WO2021036429A1 (fr) 2019-08-27 2020-06-17 Procédé de décodage, procédé de codage, et appareil

Country Status (2)

Country Link
CN (3) CN110708552B (fr)
WO (2) WO2021036429A1 (fr)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110708552B (zh) * 2019-08-27 2021-12-31 杭州海康威视数字技术股份有限公司 解码方法、编码方法及装置
CN113453008B (zh) * 2020-03-26 2022-08-02 腾讯科技(深圳)有限公司 视频解码方法、视频编码方法、相关设备及介质
CN111787326B (zh) * 2020-07-31 2022-06-28 广州市百果园信息技术有限公司 一种熵编码及熵解码的方法和装置
CN114079772B (zh) * 2020-08-21 2023-04-07 腾讯科技(深圳)有限公司 视频解码方法、装置、计算机可读介质及电子设备
US11722678B2 (en) * 2020-08-25 2023-08-08 Tencent America LLC Method and apparatus for transform skip coefficients coding
CN112543337B (zh) * 2020-09-27 2023-05-02 腾讯科技(深圳)有限公司 视频解码方法、装置、计算机可读介质及电子设备
CN116095329A (zh) * 2021-02-21 2023-05-09 腾讯科技(深圳)有限公司 视频编解码方法、装置、计算机可读介质及电子设备
CN114979641A (zh) * 2021-02-21 2022-08-30 腾讯科技(深圳)有限公司 视频编解码方法、装置、计算机可读介质及电子设备
CN113068033B (zh) * 2021-03-11 2022-05-31 腾讯科技(深圳)有限公司 一种多媒体的反量化处理方法、装置、设备及存储介质
WO2022188186A1 (fr) * 2021-03-12 2022-09-15 Oppo广东移动通信有限公司 Procédé de codage de coefficient, procédé de décodage de coefficient, dispositif de codage, dispositif de décodage et support de stockage
CN115083046A (zh) * 2022-06-28 2022-09-20 维沃移动通信有限公司 解密方法、解密信息创建方法及解密装置

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080085058A1 (en) * 2006-10-05 2008-04-10 Microsoft Corporation Color image coding using inter-color correlation
CN103621086A (zh) * 2011-06-28 2014-03-05 高通股份有限公司 视频译码中的最后有效变换系数在扫描次序中的位置的导出
CN103636208A (zh) * 2011-07-01 2014-03-12 高通股份有限公司 在视频译码中用于非正方形块的上下文自适应熵译码
CN103929642A (zh) * 2014-04-24 2014-07-16 北京航空航天大学 一种hevc变换系数的熵编码上下文模型偏移值快速计算方法
CN104469378A (zh) * 2013-09-19 2015-03-25 黑莓有限公司 用于对系数组中的最后一个非零变换系数的位置数据进行编码
US9445132B2 (en) * 2013-09-09 2016-09-13 Qualcomm Incorporated Two level last significant coefficient (LSC) position coding
CN108293139A (zh) * 2015-09-08 2018-07-17 三星电子株式会社 用于熵编码和熵解码的设备和方法

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7379608B2 (en) * 2003-12-04 2008-05-27 Fraunhofer-Gesellschaft Zur Foerderung Der Angewandten Forschung, E.V. Arithmetic coding for transforming video and picture data units
CN100488254C (zh) * 2005-11-30 2009-05-13 联合信源数字音视频技术(北京)有限公司 一种基于上下文的熵编码方法及解码方法
PT2592832T (pt) * 2010-07-09 2016-09-20 Samsung Electronics Co Ltd Método e aparelho para codificar/descodificar por entropia um coeficiente de transformação
US9042440B2 (en) * 2010-12-03 2015-05-26 Qualcomm Incorporated Coding the position of a last significant coefficient within a video block based on a scanning order for the block in video coding
US10499059B2 (en) * 2011-03-08 2019-12-03 Velos Media, Llc Coding of transform coefficients for video coding
CN103548354A (zh) * 2011-10-05 2014-01-29 通用仪表公司 利用通过锯齿扫描的自适应上下文模型选择的代码化和解码
US10291912B2 (en) * 2013-01-16 2019-05-14 Blackberry Limited Context determination for entropy coding of run-length encoded transform coefficients
EP3490253A1 (fr) * 2017-11-23 2019-05-29 Thomson Licensing Procédé de codage et de décodage et dispositifs correspondants
CN116112669A (zh) * 2018-01-02 2023-05-12 三星电子株式会社 视频解码方法、视频编码方法及计算机可读记录介质
CN110708552B (zh) * 2019-08-27 2021-12-31 杭州海康威视数字技术股份有限公司 解码方法、编码方法及装置

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080085058A1 (en) * 2006-10-05 2008-04-10 Microsoft Corporation Color image coding using inter-color correlation
CN103621086A (zh) * 2011-06-28 2014-03-05 高通股份有限公司 视频译码中的最后有效变换系数在扫描次序中的位置的导出
CN103636208A (zh) * 2011-07-01 2014-03-12 高通股份有限公司 在视频译码中用于非正方形块的上下文自适应熵译码
US9445132B2 (en) * 2013-09-09 2016-09-13 Qualcomm Incorporated Two level last significant coefficient (LSC) position coding
CN104469378A (zh) * 2013-09-19 2015-03-25 黑莓有限公司 用于对系数组中的最后一个非零变换系数的位置数据进行编码
CN103929642A (zh) * 2014-04-24 2014-07-16 北京航空航天大学 一种hevc变换系数的熵编码上下文模型偏移值快速计算方法
CN108293139A (zh) * 2015-09-08 2018-07-17 三星电子株式会社 用于熵编码和熵解码的设备和方法

Also Published As

Publication number Publication date
CN112449192A (zh) 2021-03-05
CN112449192B (zh) 2022-09-16
WO2021036429A1 (fr) 2021-03-04
CN110708552A (zh) 2020-01-17
CN115842916A (zh) 2023-03-24
CN110708552B (zh) 2021-12-31

Similar Documents

Publication Publication Date Title
WO2021036430A1 (fr) Procédé de décodage, procédé de codage et appareil
CN110234008B (zh) 编码方法、解码方法及装置
CN113411592B (zh) 预测模式的解码、编码方法及装置
CN108391127B (zh) 视频编码方法、装置、存储介质及设备
TWI537880B (zh) 使用選擇性顏色轉換之顏色壓縮技術
CN112040337B (zh) 视频的水印添加和提取方法、装置、设备及存储介质
CN113099233A (zh) 视频编码方法、装置、视频编码设备及存储介质
WO2020083385A1 (fr) Procédé, dispositif et système de traitement d'image
CN111586413A (zh) 视频调整方法、装置、计算机设备及存储介质
CN109040753B (zh) 预测模式选择方法、装置及存储介质
CN110062226B (zh) 一种视频编码方法、视频解码方法、装置、系统及介质
CN114422782B (zh) 视频编码方法、装置、存储介质及电子设备
CN116980627A (zh) 用于解码的视频滤波方法、装置、电子设备及存储介质
CN115118979A (zh) 图像编码方法、图像解码方法、装置、设备及存储介质
CN116506616A (zh) 视频帧编码方法、装置、电子设备及存储介质
CN116546203A (zh) 视频帧处理方法、装置、电子设备及可读存储介质
CN116957933A (zh) 图像处理方法、装置和计算机可读存储介质
CN113658283A (zh) 图像处理方法、装置、电子设备及存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20857325

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20857325

Country of ref document: EP

Kind code of ref document: A1