WO2017137006A1 - Encoding and decoding method and device for data compression - Google Patents

Encoding and decoding method and device for data compression Download PDF

Info

Publication number
WO2017137006A1
WO2017137006A1 PCT/CN2017/073247 CN2017073247W WO2017137006A1 WO 2017137006 A1 WO2017137006 A1 WO 2017137006A1 CN 2017073247 W CN2017073247 W CN 2017073247W WO 2017137006 A1 WO2017137006 A1 WO 2017137006A1
Authority
WO
WIPO (PCT)
Prior art keywords
string
restricted
preset
basic constraint
block
Prior art date
Application number
PCT/CN2017/073247
Other languages
French (fr)
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
Priority claimed from CN201710069807.4A external-priority patent/CN107071450B/en
Application filed by 同济大学, 中兴通讯股份有限公司 filed Critical 同济大学
Priority to US16/090,101 priority Critical patent/US10820016B2/en
Priority to EP17749897.9A priority patent/EP3416389B1/en
Publication of WO2017137006A1 publication Critical patent/WO2017137006A1/en

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/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • 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/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
    • 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
    • H04N19/61Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding in combination with predictive coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards

Definitions

  • the present invention relates to the field of communications, and in particular to a method and apparatus for encoding and decoding data compression.
  • a data set is a collection of samples of data (eg, bytes, bits, pixels, pixel components).
  • data encoding and corresponding decoding
  • the data set is usually divided into subsets of blocks called code blocks.
  • the decoding angle is also the decoding block, collectively referred to as the codec block, and is coded or decoded in units of codec blocks.
  • the coded block being encoded is referred to as the current coded block.
  • the decoded block being decoded is referred to as the current decoded block.
  • the current coded block or the current decoded block is collectively referred to as the current codec block or simply as the current block.
  • the sample being encoded or decoded is called the current coded sample or the current decoded sample, which is simply referred to as the current sample.
  • a notable feature of many common data sets is that they have many matching (ie similar or even identical) styles. For example, there are often many matching pixel patterns in image and video sequences. Therefore, existing data compression techniques usually use matching (also called prediction or compensation), that is, using “predicted values” (also called “compensation values” or “reference samples”, such as “reference pixels”). Matching (also known as prediction, representation, representation, compensation, approximation, approximation, etc.) current encoding or decoding of sample values (referred to as "current samples”) to achieve lossless or lossy compression of the data. Simply put, the basic operation of the matching method is to copy the reference sample, that is, the position of the sample at the reference position to the current sample.
  • the matching mode or prediction mode is also called the copy mode.
  • Horse In the allocation mode the reconstructed (also called reconstructed or restored) samples that have undergone at least partial encoding operations and at least partial decoding operations constitute a primary reference set (also referred to as a primary reference space or a primary reference cache).
  • the reconstructed samples and their positions in the primary reference set are in one-to-one correspondence with the original samples and their locations in the original data set.
  • other reference sets may be constructed or generated, called a secondary reference set or a dependent reference set or a second reference set, a third reference set, and the like.
  • the block matching method is characterized in that the basic matching unit is a plurality of predetermined fixed-size blocks (sample blocks).
  • the basic matching parameters of block matching are displacement vectors (also known as motion vectors, positional offsets, offsets, relative positions, positions, relative addresses, addresses, relative coordinates, Coordinates, relative indexes, indexes, etc.).
  • the displacement vector indicates the position (often referred to as the reference position) of the reference sample block (referred to as the reference block) of the current sample block (referred to as the current block).
  • the string matching method is characterized in that the basic matching unit is a string (sample string) having a predetermined shape but a variable length.
  • the basic matching parameters of the string match (also called the matching relationship or the copy parameter or the copy relationship) are displacement vectors (also called motion vectors, position offsets, offsets, relative positions, positions, relative addresses, addresses, relative coordinates, Coordinates, relative indexes, indexes, etc.) and string lengths and unmatched samples.
  • the displacement vector indicates the reference position of the reference sample string (referred to as the reference string) of the current sample string (referred to as the current string), which is equivalent to the one-dimensional offset after the data samples are arranged into one-dimensional data.
  • the string length indicates the length of the current string, that is, the number of samples. Unmatched samples are also referred to as no reference samples, indicating that there are no current samples of the reference samples.
  • the codec block has a two-dimensional shape (not necessarily limited to a square or a rectangle, and may be any other reasonable two-dimensional shape)
  • the sample values need to be coded in a certain order and then subjected to string matching.
  • the arrangement is also called the scanning method. Scanning methods commonly used are horizontal scanning (which can be divided into gratings and bows) and vertical scanning (which can also be divided into gratings and bows).
  • String matching has a flexible matching shape and a variable matching length, which can achieve a much higher matching accuracy than block matching, but there are also matching parameters (also called matching relationships or copy parameters or copy relationships), which consume more The problem of encoding the number of bits affects the coding efficiency.
  • the embodiment of the invention provides a method and a device for encoding and decoding a data compression, so as to solve at least the problem that the string matching method in the related art has more matching parameters and consumes a larger number of bits to encode the same.
  • a data compression coding method including: adaptively selecting a restricted string mode from a preset plurality of restricted string modes; according to the selected restricted string mode Performing string matching encoding on the coded block to obtain information of the restricted string encoded using the selected restricted string mode, and compressed data bitstream of the syntax element of the restricted string encoded using the selected restricted string mode .
  • the coding block is an coding region of an image, and the coding block includes at least one of the following: an image, a sub-image of an image, a macroblock, a maximum coding unit LCU, a coding tree unit CTU, a coding unit CU, a CU Sub-region, prediction unit PU, and transform unit TU.
  • the restricted string mode includes at least one of the following conditions: the restricted string mode has a preset constraint; the restricted string mode has a plurality of preset constraints; the restricted string The mode does not have a preset constraint.
  • the preset constraint condition of the restricted string mode is one or more combinations of the following basic constraints: a basic constraint condition 1: a value of a length of a reference sample from a preset range of reference positions There is an upper limit and/or a lower limit; basic constraint 2: the value of the reference sample from a preset range of the reference position is limited to a set of preset values; basic constraint 3: in a coding block, The reference sample has an upper limit on the number of strings from a preset reference set or a reference subset; basic constraint 4: in an encoding block, the reference sample has an upper limit from the number of strings of a preset range of the reference position; Basic constraint 5: the length of the string is equal to the number of samples of the coding block; the basic constraint 6: the length of the string is equal to one-half of the number of samples of the coding block; the basic constraint 7: the length of the string is equal to a preset value; basic constraint 8: the value of the length of the
  • the preset multiple restricted string mode includes three restricted string modes, where the preset constraint of the first restricted string mode includes the basic constraint 1 and the basic constraint
  • the preset constraint condition of the second restricted string mode includes the basic constraint condition 5 and the basic constraint condition 6; the preset constraint condition of the third restricted string mode includes the basic constraint condition 13
  • the basic constraint 16 and the basic constraint 17 are described.
  • the preset multiple restricted string modes include four restricted string modes, where a preset constraint condition of the first restricted string mode includes the basic constraint 1 and the basic constraint
  • the preset constraint condition of the second restricted string mode includes the basic constraint condition 5 and the basic constraint condition 6;
  • the preset constraint condition of the third restricted string mode includes the basic constraint condition 13
  • the basic constraint condition 16 and the basic constraint condition 17 are included;
  • the preset constraint condition of the fourth restricted string mode includes the basic constraint condition 18 and the basic constraint condition 19.
  • a preset range of the reference position in the basic constraint 1 is a range of a CTU and a neighboring K CTUs of the coding block, and an upper limit of the string length is 32 and/or a string length.
  • the lower limit of the value is 1; the preset reference set or reference subset in the basic constraint 3 is a primary reference set, and the upper limit of the total number of strings is preset to be the total number of samples of the coded block multiplied by A score M/N.
  • the enable flag of the multiple restricted string mode string matching mode exists in the compressed data bitstream, where the location of the enable flag bit includes at least the following in the compressed data bitstream.
  • the preset multiple restricted string modes are respectively represented by a plurality of preset values, wherein one restricted string mode corresponds to a preset value k, and the coded block is compressed data.
  • a coded stream has a restricted string mode identification code that is directly, or indirectly, or directly indirectly mixed; in the case where the restricted string mode identification code is equal to k, a restricted string mode pair corresponding to k is used.
  • the coding block performs string matching coding.
  • the direct restricted string mode identification code is composed of one or more bit strings in the compressed data code stream; the indirect restricted string mode identification code is from other coding parameters and/or compressed data.
  • the restricted string mode identification code derived by other syntax elements of the code stream; the directly indirectly mixed restricted string mode identification code is a partially and partially indirectly mixed restricted string mode identification code.
  • the restricted string mode identification code syntax element used to represent the restricted string mode of the coding block is present in the compressed data bitstream of the coding block in the following form: coding block header information, restricted string mode identifier a syntax element of a code, a sample string, or an unmatched sample; or, a coded block header information, a partially restricted string mode identification code, a partial syntax element of a first sample string, a remainder of a restricted string mode identification code, A value string or a syntax element that does not match the sample; wherein the coded block is subjected to string matching encoding using a restricted string mode corresponding to the value of the restricted string mode identification code.
  • an apparatus for encoding data compression comprising: a selecting module configured to adaptively select a restricted string mode from a plurality of preset restricted string modes; encoding a module configured to perform string matching encoding on the coded block according to the selected restricted string mode to obtain information of a restricted string encoded using the selected restricted string mode, and encoding using the selected restricted string mode A compressed data stream of syntax elements of a restricted string.
  • a decoding method for data compression comprising: parsing a compressed data code stream, acquiring information of a restricted string mode; and receiving information according to the restricted string mode from a preset plurality of Selecting a restricted string mode in the limited string mode to perform a string copy solution on the decoded block code.
  • the decoding block is a decoding area of an image, and the decoding block includes at least one of the following: an image, a sub-image of an image, a macroblock, a maximum decoding unit LCU, a decoding tree unit CTU, a decoding unit CU, and a CU. Sub-region, prediction unit PU, and transform unit TU.
  • the restricted string mode includes at least one of the following conditions: the restricted string mode optionally, the preset constraint condition of the one restricted string mode is one or more of the following basic constraints Combinations: Basic Constraint 1: Reference Samples There is an upper limit and/or a lower limit for the length of a string from a preset range of reference positions; Basic Constraint 2: Reference Samples are from a preset of the reference position The value of the length of the range string is limited to a set of preset values; basic constraint 3: in a decoding block, the number of reference samples from a preset reference set or a reference subset has an upper limit; basic constraints 4: In a decoding block, there is an upper limit on the number of strings whose reference samples are from a preset range of reference positions; basic constraint 5: the length of the string is equal to the number of samples of the decoded block; basic constraint 6: string The length is equal to one-half of the number of samples of the decoded block; the basic constraint 7: the length of the following basic
  • the decoded block has a two-dimensional shape and the direction of all strings is horizontal and both the start and end points are on the block boundary.
  • the preset multiple restricted string mode includes three restricted string modes, where the preset constraint of the first restricted string mode includes the basic constraint 1 and the basic constraint
  • the preset constraint condition of the second restricted string mode includes the basic constraint condition 5 and the basic constraint condition 6; the preset constraint condition of the third restricted string mode includes the basic constraint condition 13
  • the basic constraint 16 and the basic constraint 17 are described.
  • the preset multiple restricted string modes include four restricted string modes, wherein a preset constraint condition of the first restricted string mode is the basic constraint 1 and the basic constraint
  • the preset constraint condition of the second restricted string mode includes the basic constraint condition 5 and the basic constraint condition 6; the preset constraint condition of the third restricted string mode includes the basic constraint condition 13
  • the basic constraint condition 16 and the basic constraint condition 17 are included; the preset constraint condition of the fourth restricted string mode includes the basic constraint condition 18 and the basic constraint condition 19.
  • a preset range of the reference position in the basic constraint 1 is an area range of the CTU and the adjacent K CTUs, and the upper limit of the string length is 32 and/or a string length.
  • the lower limit of the value is 1; the preset reference set or reference subset in the basic constraint 3 is a primary reference set, and the upper limit of the total number of strings is preset to be the total number of samples included in the decoded block multiplied by A score M/N.
  • the enable flag of the multiple restricted string mode string matching mode exists in the compressed data bitstream, where the location of the enable flag bit includes at least the following in the compressed data bitstream.
  • the preset multiple restricted string modes are respectively represented by a plurality of preset values, wherein one restricted string mode corresponds to a preset value k, and each of the decoded blocks is
  • the compressed data stream has a restricted string mode identification code directly, or indirectly, or directly indirectly mixed; when the restricted string mode identification code is equal to k, a restricted string corresponding to k is used.
  • Mode Performing string matching decoding on the decoded block.
  • the direct restricted string mode identification code is composed of one or more bit strings in the compressed data code stream; the indirect restricted string mode identification code is from other decoding parameters and/or compressed data.
  • the restricted string mode identification code derived by other syntax elements of the code stream; the directly indirectly mixed restricted string mode identification code is a partially and partially indirectly mixed restricted string mode identification code.
  • the restricted string mode identification code syntax element used to represent the restricted string mode of the decoding block exists in the compressed data bitstream of the decoding block in the following form: decoding block header information, restricted string mode identifier a syntax element of a code, a sample string, or an unmatched sample; or, decoding block header information, a partially restricted string mode identification code, a partial syntax element of the first sample string, the remainder of the restricted string pattern identification code, A value string or a syntax element that does not match the sample; wherein the decoded block is subjected to string matching decoding using a restricted string mode corresponding to the value of the restricted string mode identification code.
  • a data compression decoding apparatus comprising: a parsing module configured to parse a compressed data code stream to obtain information of a restricted string mode; and a decoding module configured to be The information of the limited string mode selects one of the preset multiple string modes to perform a string copy decoding on the decoded block.
  • a storage medium is also provided.
  • the storage medium is arranged to store program code for performing the following steps:
  • Adaptively selecting a restricted string mode from a plurality of preset restricted string modes Adaptively selecting a restricted string mode from a plurality of preset restricted string modes; performing string matching encoding on the coded block according to the selected restricted string mode to obtain encoding by using the selected restricted string mode A limited string of information, and a compressed data stream of syntax elements of the restricted string encoded using the selected restricted string mode.
  • a storage medium is also provided.
  • the storage medium is arranged to store program code for performing the following steps:
  • the manner of compressing the data stream of the encoded syntax element of the restricted string is performed by selecting a restricted string mode from a plurality of preset restricted string modes to encode the coded block in the data to be compressed, thereby reducing
  • the matching parameters for encoding the coding block improve the matching precision of the string in the encoding process because only one type of the confined mode is matched, thereby solving the related art that the string matching method has more matching parameters and consumes more bits.
  • the problem of coding is performed by selecting a restricted string mode from a plurality of preset restricted string modes to encode the coded block in the data to be compressed, thereby reducing
  • the matching parameters for encoding the coding block improve the matching precision of the string in the encoding process because
  • FIG. 1 is a flowchart 1 of an encoding method of data compression according to an embodiment of the present invention
  • FIG. 2 is a second flowchart of a decoding method of data compression according to an embodiment of the present invention
  • FIG. 3 is a structural block diagram 1 of an encoding apparatus for data compression according to an embodiment of the present invention
  • FIG. 4 is a block diagram showing the structure of a decoding apparatus for data compression according to an embodiment of the present invention.
  • FIG. 1 is a flowchart of a data compression coding method according to an embodiment of the present invention. As shown in FIG. 1, the process includes the following steps:
  • Step S102 adaptively selecting a restricted string mode from a preset plurality of restricted string modes
  • Step S104 performing string matching encoding on the coding block according to the selected restricted string mode to obtain information of the restricted string encoded using the selected restricted string mode, and using the selected restricted string mode A compressed data stream of syntax elements of a restricted string that is encoded.
  • This embodiment provides a data compression method for performing string matching coding by using multiple restricted string modes.
  • the restricted string refers to a string that is restricted by a preset constraint condition, and uses a restricted string mode pair.
  • the coded block uses string constrained by the reservation constraint in the process of string matching encoding.
  • the coded block in the compressed data is subjected to string matching encoding to obtain information of the restricted string encoded using the selected restricted string mode, and the compressed data stream of the syntax element of the restricted string encoded using the selected restricted string mode
  • the matching parameter for encoding the coded block may be reduced, since only one type of string is encoded.
  • the limit mode also improves the matching precision of the string in the encoding process, thereby solving the problem that the string matching method has more matching parameters and consumes more bits to encode the related art.
  • the data to be compressed involved in the embodiment includes at least one of the following: one-dimensional data, two-dimensional data, multi-dimensional data, images, sequences of images, video, audio, A collection of files, bytes, a collection of bits, a collection of pixels, and a collection of pixel components.
  • the coding block in this embodiment is an coding region of an image
  • the coding block involved in this embodiment includes at least one of the following: an image, a sub-image of an image, a macroblock, a maximum coding unit LCU, and a coding tree unit CTU.
  • the restricted string mode involved in this embodiment includes at least one of the following conditions: the restricted string mode may have a preset constraint; the restricted string mode may have multiple preset constraints; The string limit mode may also have no preset constraints.
  • a plurality of restricted string modes are preset, wherein a plurality of preset constraints that exist in the plurality of preset constraints corresponding to the plurality of restricted string modes have overlapping portions, or multiple presets exist Multiple preset constraints among the constraints have no overlapping parts, for example, when the three restricted string modes are pre-set, the first restricted string The mode has a preset constraint, the second restricted string mode has two preset constraints, and the third restricted string mode does not have a preset constraint, so that it is possible that the first restricted string mode and the second The preset constraint conditions corresponding to the restricted string mode may overlap, or there may be no overlap between the preset constraints corresponding to the second restricted string mode and the third restricted string mode, but not Limited.
  • the preset constraint condition of the restricted string mode involved in this embodiment is composed of one or more of a plurality of basic constraints, wherein the factors related to the basic constraint include: reference samples and strings in the coding block The length and the displacement vector, the shape of the coding block.
  • the basic constraints associated with the reference samples in the coded block may include:
  • the reference sample has an upper limit and/or a lower limit for the length of the string from a preset range of the reference position;
  • the basic constraint 1 may be: for an original string (the string involved in this embodiment), the reference string (ie, the reference sample) is a string located within a preset range, and reference The string can be represented by a reference position, the length of the original string conforming to the above characteristics is L, and for L, there is an upper limit and/or a lower limit.
  • Basic constraint 2 The value of the length of the reference sample from a preset range of reference positions is limited to a set of preset values
  • the basic constraint 2 is substantially the same as the basic constraint 1 described above, except that the value of L is a value of a set of preset values.
  • Basic constraint 3 In a coding block, there is an upper limit on the number of reference samples from a preset reference set or a reference subset;
  • the basic constraint 3 may be: for an original string, the reference string is a string located within a preset range, and the number of lengths of the original string having the above feature is N, N. There is an upper limit.
  • Basic Constraint 4 In a coded block, there is an upper limit on the number of strings in which the reference sample comes from a preset range of reference positions.
  • the basic constraint 4 is similar to the basic constraint 3, except that the "number of strings" (with an upper limit) is defined here instead of “reference samples” from a “number”.
  • Basic constraints related to the length of the string can include:
  • Basic constraint 7 The length of the string is equal to a preset value
  • Basic constraint 8 The value of the length of the string is limited to a set of preset values
  • the length of the string may be one or a set of preset values, or may be related to the samples of the coding block, for example, the length of the string is equal to the number of samples of the coding block, and the string. The length is equal to one-half of the number of samples of the encoded block.
  • the basic constraints associated with the shape of the coding block and the length of the string may include:
  • the coding block has a square shape and the length of the string is equal to the side length of the square;
  • the coded block has a rectangular shape and the length of the string is equal to the width or height of the rectangle.
  • the basic constraints associated with the displacement vector of the string, the shape of the coding block, and the string length and reference samples may include:
  • Basic constraint 12 The value of the displacement vector of the string is limited to a set of preset values
  • the coded block has a square shape and the displacement vector of the string is equal to (0, 1) in horizontal scanning and equal to (1, 0) in vertical scanning, after conversion to an equivalent one-dimensional offset Equal to the side length of the square;
  • the coding block has a rectangular shape and the displacement vector of the string is equal to (0, 1) in horizontal scanning and equal to (1, 0) in vertical scanning, after conversion to an equivalent one-dimensional offset Equal to the width or height of the rectangle;
  • Basic constraint 15 the value of the length of the string is limited to one or a set of predetermined values, and the value of the displacement vector of the string is limited to one or a set of predetermined values;
  • Basic constraint 16 The length of the string is equal to 1, that is, there is only one reference sample, and the current string length is greater than or equal to 1, then all current samples are equal to the reference sample;
  • the coding block has a two-dimensional shape and the directions of all the strings are vertical and the start and end points are on the block boundary;
  • the coded block has a two-dimensional shape and the direction of all strings is horizontal and both the start and end points are on the block boundary.
  • the preset constraint condition of the restricted string mode involved in the embodiment may be combined by one or more of the above basic constraints 1 to 19.
  • the restricted string in this embodiment refers to a string that is restricted by a preset basic constraint.
  • a restricted string mode of the coded block means that all of the strings in the coded block are limited by one or a set of preset constraints. string.
  • Different restricted string patterns have different one or a set of preset constraints.
  • the type, type, and number of optional strings are greatly reduced, so that the number of matching parameters and/or the range of values are also greatly reduced, and the encoding is required to be consumed. The number of bits is also greatly reduced.
  • a preset range of the reference position in the basic constraint 1 is a range of the CTU and the adjacent K CTUs of the current block, and the upper limit of the length of the string is 32 and the preset lower limit is 1;
  • the basic constraint The preset reference set or reference subset in Condition 3 is the primary reference set, and the preset upper limit of the total number of strings is the total number of samples of the current block multiplied by a fraction M/N, and both M and N are positive integers.
  • the preset The plurality of restricted string modes include three restricted string modes: a preset constraint of the first restricted string mode includes a basic constraint 1 and a basic constraint 3; and a preset constraint of the second restricted string mode includes: The basic constraint condition 5 and the basic constraint condition 6; the preset constraint condition of the third restricted string mode includes the basic constraint condition 13, the basic constraint condition 16, and the basic constraint condition 17.
  • the plurality of restricted string modes preset include four restricted string modes: the preset constraint conditions of the first restricted string mode include basic constraint 1 and basic constraints 3; the preset constraint condition of the second restricted string mode includes the basic constraint condition 5 and the basic constraint condition 6; the preset constraint condition of the third restricted string mode includes the basic constraint condition 13, the basic constraint condition 16 and the basic constraint condition Condition 17; the preset constraint of the fourth restricted string mode includes a basic constraint 18 and a basic constraint 19.
  • there are multiple enabled string mode matching manner enable flag bits in the compressed data bitstream, where the location of the enable flag bit is included in the compressed data bitstream. At least one of the following: sequence parameter set, image parameter set, slice header, CTU header, CU header, coding block header.
  • the direct or indirect identification code is used in the header information of the coded block to indicate which one of the current block is used.
  • an optimal constrained string mode can be adaptively selected according to the data characteristics of the codec block, which can achieve high string matching precision, reduce the number of consumed bits, and greatly improve coding efficiency.
  • the multiple restricted string modes related to the preset amount in the embodiment are respectively represented by a plurality of preset values, wherein one restricted string mode corresponds to a preset value k, and the coded block is
  • the compressed data stream has a restricted string mode identification code directly or indirectly or directly indirectly mixed; in the case where the restricted string mode identification code is equal to k, a restricted string mode pair coding block corresponding to k is used. Perform string matching encoding.
  • the direct restricted string mode identification code is composed of one or more bit strings in the compressed data code stream; the indirect restricted string mode identification code is other syntax elements from other coding parameters and/or compressed data code streams.
  • Derived restricted string mode identification code; direct indirect mixed restricted string mode The identification code is a restricted string mode identification code that is partially and partially indirectly mixed; the k is a positive integer.
  • a syntax element that encodes block header information, a restricted string mode identification code, a sample string, or an unmatched sample; or, a coded block header information, a partially restricted string mode identification code, a partial syntax element of the first sample string, or a restricted The syntax element of the remaining part of the string pattern identification code, the sample string or the unmatched sample; wherein the coded block is subjected to string matching encoding by using the restricted string mode corresponding to the value of the restricted string mode identification code.
  • FIG. 2 is a flowchart of a decoding method of data compression according to an embodiment of the present invention. As shown in FIG. 2, the steps of the method include:
  • Step S202 Parsing the compressed data code stream to obtain information of the restricted string mode
  • Step S204 Perform string copy decoding on the decoded block by selecting a restricted string mode from a preset plurality of restricted string modes according to the information of the restricted string mode.
  • the data to be decompressed in this embodiment includes at least one of the following: one-dimensional data, two-dimensional data, multi-dimensional data, images, sequences of images, video, audio, A collection of files, bytes, a collection of bits, a collection of pixels, and a collection of pixel components.
  • the coding block in this embodiment is an coding region of an image
  • the coding block involved in this embodiment includes at least one of the following: an image, a sub-image of an image, a macroblock, a maximum coding unit LCU, and a coding tree unit CTU.
  • the restricted string mode involved in this embodiment includes at least one of the following conditions: the restricted string mode may have a preset constraint; the restricted string mode may have multiple preset constraints; The string limit mode may also have no preset constraints.
  • a plurality of restricted string modes are preset, wherein a plurality of preset constraints that exist in the plurality of preset constraints corresponding to the plurality of restricted string modes have overlapping portions, or multiple presets exist Multiple pre-conditions Let the constraint have no overlapping parts. For example, when there are three restricted string modes, the first restricted string mode has one preset constraint, and the second restricted string mode has two preset constraints.
  • the three restricted string modes do not have preset constraints, so that it is possible that the first restricted string mode and the second restricted string mode have overlapping portions, or may be the second limited.
  • the preset constraint corresponding to the string mode and the third restricted string mode has no overlap, but is not limited thereto.
  • the preset constraint condition of the restricted string mode involved in this embodiment is composed of one or more of a plurality of basic constraints, wherein the factors related to the basic constraint include: reference samples and strings in the coding block The length and the displacement vector, the shape of the coding block.
  • the basic constraints associated with the reference samples in the coded block may include:
  • the reference sample has an upper limit and/or a lower limit for the length of the string from a preset range of the reference position;
  • the basic constraint 1 may be: for an original string (the string involved in this embodiment), the reference string (ie, the reference sample) is a string located within a preset range, and reference The string can be represented by a reference position, the length of the original string conforming to the above characteristics is L, and for L, there is an upper limit and/or a lower limit.
  • Basic constraint 2 The value of the length of the reference sample from a preset range of reference positions is limited to a set of preset values
  • the basic constraint 2 is substantially the same as the basic constraint 1 described above, except that the value of L is a value of a set of preset values.
  • Basic constraint 3 In a coding block, there is an upper limit on the number of reference samples from a preset reference set or a reference subset;
  • the basic constraint 3 may be: for an original string, the reference string is a string located within a preset range, and the number of lengths of the original string having the above feature is N, N. There is an upper limit.
  • Basic Constraint 4 In a coded block, there is an upper limit on the number of strings in which the reference sample comes from a preset range of reference positions.
  • the basic constraint 4 is similar to the basic constraint 3, except that the "number of strings" (with an upper limit) is defined here instead of “reference samples” from a “number”.
  • Basic constraints related to the length of the string can include:
  • Basic constraint 7 The length of the string is equal to a preset value
  • Basic constraint 8 The value of the length of the string is limited to a set of preset values
  • the length of the string may be one or a set of preset values, or may be related to the samples of the coding block, for example, the length of the string is equal to the number of samples of the coding block, and the string. The length is equal to one-half of the number of samples of the encoded block.
  • the basic constraints associated with the shape of the coding block and the length of the string may include:
  • the coding block has a square shape and the length of the string is equal to the side length of the square;
  • the coded block has a rectangular shape and the length of the string is equal to the width or height of the rectangle.
  • the basic constraints associated with the displacement vector of the string, the shape of the coding block, and the string length and reference samples may include:
  • Basic constraint 12 The value of the displacement vector of the string is limited to a set of preset values
  • the coded block has a square shape and the displacement vector of the string is equal to (0, 1) in horizontal scanning and equal to (1, 0) in vertical scanning, after conversion to an equivalent one-dimensional offset Equal to the side length of the square;
  • the coding block has a rectangular shape and the displacement vector of the string is equal to (0, 1) in horizontal scanning and equal to (1, 0) in vertical scanning, after conversion to an equivalent one-dimensional offset Equal to the width or height of the rectangle;
  • Basic constraint 15 the value of the length of the string is limited to one or a set of predetermined values, and the value of the displacement vector of the string is limited to one or a set of predetermined values;
  • Basic constraint 16 The length of the reference string is equal to 1, ie there is only one reference sample, and the length of the current string is greater than or equal to 1 and all current samples are equal to the reference sample;
  • the coding block has a two-dimensional shape and the directions of all the strings are vertical and the start and end points are on the block boundary;
  • the coded block has a two-dimensional shape and the direction of all strings is horizontal and both the start and end points are on the block boundary.
  • the preset constraint condition of the restricted string mode involved in the embodiment may be combined by one or more of the above basic constraints 1 to 19.
  • the restricted string in this embodiment refers to a string that is restricted by a preset basic constraint.
  • a restricted string mode of the coded block means that all of the strings in the coded block are limited by one or a set of preset constraints. string.
  • Different restricted string patterns have different one or a set of preset constraints.
  • the type, type, and number of optional strings are greatly reduced, so that the number of matching parameters and/or the range of values are also greatly reduced, and the encoding is required to be consumed. The number of bits is also greatly reduced.
  • a preset range of the reference position in the basic constraint 1 is a range of the CTU and the adjacent K CTUs of the current block, and the upper limit of the length of the string is 32 and the preset lower limit is 1;
  • the basic constraint The preset reference set or reference subset in Condition 3 is the primary reference set, and the preset upper limit of the total number of strings is the total number of samples of the current block multiplied by a fraction M/N, and both M and N are positive integers.
  • the preset The plurality of restricted string modes include three restricted string modes: a preset constraint of the first restricted string mode includes a basic constraint 1 and a basic constraint 3; and a preset constraint of the second restricted string mode includes: The basic constraint condition 5 and the basic constraint condition 6; the preset constraint condition of the third restricted string mode includes the basic constraint condition 13, the basic constraint condition 16, and the basic constraint condition 17.
  • the plurality of restricted string modes preset include four restricted string modes: the preset constraint conditions of the first restricted string mode include basic constraint 1 and basic constraints 3; the preset constraint condition of the second restricted string mode includes the basic constraint condition 5 and the basic constraint condition 6; the preset constraint condition of the third restricted string mode includes the basic constraint condition 13, the basic constraint condition 16 and the basic constraint condition Condition 17; the preset constraint of the fourth restricted string mode includes a basic constraint 18 and a basic constraint 19.
  • there are multiple enabled string mode matching manner enable flag bits in the decompressed data bitstream, where the location of the enable flag bit is included in the decompressed data bitstream. At least one of the following: sequence parameter set, image parameter set, slice header, CTU header, CU header, coding block header.
  • the direct or indirect identification code is used in the header information of the coded block to indicate which one of the current block is used.
  • an optimal constrained string mode can be adaptively selected according to the data characteristics of the codec block, which can achieve high string matching precision, reduce the number of consumed bits, and greatly improve coding efficiency.
  • the multiple restricted string modes related to the preset amount in the embodiment are respectively represented by a plurality of preset values, wherein one restricted string mode corresponds to a preset value k, and the coded block is
  • the decompressed data stream has a restricted string mode identification code directly or indirectly or directly indirectly mixed; in the case where the restricted string mode identification code is equal to k, a restricted string mode pair coding block corresponding to k is used. Perform string matching encoding.
  • the direct restricted string mode identification code is composed of one or more bit strings in the decompressed data code stream; the indirect restricted string mode identification code is other syntax elements from other coding parameters and/or decompressed data stream.
  • Derived restricted string mode identification code; direct indirect mixed restricted string mode The identification code is a restricted string mode identification code that is partially and partially indirectly mixed; the k is a positive integer.
  • a syntax element that encodes block header information, a restricted string mode identification code, a sample string, or an unmatched sample; or, a coded block header information, a partially restricted string mode identification code, a partial syntax element of the first sample string, or a restricted The syntax element of the remaining part of the string pattern identification code, the sample string or the unmatched sample; wherein the coded block is subjected to string matching encoding by using the restricted string mode corresponding to the value of the restricted string mode identification code.
  • the second embodiment is a decoding method corresponding to the encoding method of the first embodiment.
  • the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware, but in many cases, the former is A better implementation.
  • the technical solution of the present invention which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk,
  • the optical disc includes a number of instructions for causing a terminal device (which may be a cell phone, a computer, a server, or a network device, etc.) to perform the methods described in various embodiments of the present invention.
  • module may implement a combination of software and/or hardware of a predetermined function.
  • apparatus described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware, is also possible and contemplated.
  • the apparatus includes: a selecting module 32 configured to adaptively select one of a plurality of preset limited string modes. Limited string mode; encoding module 34, coupled with the selection module 32, set Performing string matching encoding on the coded block according to the selected restricted string mode results in information of the restricted string encoded using the selected restricted string mode, and syntax elements of the restricted string encoded using the selected restricted string mode Compress the data stream.
  • the data to be compressed involved in the embodiment includes at least one of the following: one-dimensional data, two-dimensional data, multi-dimensional data, images, sequences of images, video, audio, A collection of files, bytes, a collection of bits, a collection of pixels, and a collection of pixel components.
  • the coding block in this embodiment is an coding region of an image
  • the coding block involved in this embodiment includes at least one of the following: an image, a sub-image of an image, a macroblock, a maximum coding unit LCU, and a coding tree unit CTU.
  • the restricted string mode involved in this embodiment includes at least one of the following conditions: the restricted string mode may have a preset constraint; the restricted string mode may have multiple preset constraints; The string limit mode may also have no preset constraints.
  • the restricted string mode may have a preset constraint; the restricted string mode may have multiple preset constraints; The string limit mode may also have no preset constraints.
  • the first restricted string mode has a preset constraint condition
  • the second restricted string mode has Two preset constraints
  • the third restricted string mode does not have a preset constraint, so that it is possible that the first constraint type of the first restricted string mode and the second restricted string mode overlap.
  • the second restricted string mode and the third restricted string mode corresponding preset constraints have no overlapping parts, but are not limited thereto.
  • the preset constraint condition of the restricted string mode involved in this embodiment is composed of one or more of a plurality of basic constraints, wherein the factors related to the basic constraint include: reference samples and strings in the coding block The length and the displacement vector, the shape of the coding block.
  • the basic constraints associated with the reference samples in the coded block may include:
  • the reference sample has an upper limit and/or a lower limit for the length of the string from a preset range of the reference position;
  • the basic constraint 1 may be: for an original string (the string involved in this embodiment), the reference string (ie, the reference sample) is a string located within a preset range, and reference The string can be represented by a reference position, the length of the original string conforming to the above characteristics is L, and for L, there is an upper limit and/or a lower limit.
  • Basic constraint 2 The value of the length of the reference sample from a preset range of reference positions is limited to a set of preset values
  • the basic constraint 2 is substantially the same as the basic constraint 1 described above, except that the value of L is a value of a set of preset values.
  • Basic constraint 3 In a coding block, there is an upper limit on the number of reference samples from a preset reference set or a reference subset;
  • the basic constraint 3 may be: for an original string, the reference string is a string located within a preset range, and the number of lengths of the original string having the above feature is N, N. There is an upper limit.
  • Basic Constraint 4 In a coded block, there is an upper limit on the number of strings in which the reference sample comes from a preset range of reference positions.
  • the basic constraint 4 is similar to the basic constraint 3, except that the "number of strings" (with an upper limit) is defined here instead of “reference samples” from a “number”.
  • Basic constraints related to the length of the string can include:
  • Basic constraint 7 The length of the string is equal to a preset value
  • Basic constraint 8 The value of the length of the string is limited to a set of preset values
  • the length of the string may be one or a set of preset values, or may be related to the samples of the coding block, for example, the length of the string is equal to the number of samples of the coding block, and the string. The length is equal to one-half of the number of samples of the encoded block.
  • the basic constraints associated with the shape of the coding block and the length of the string may include:
  • the coding block has a square shape and the length of the string is equal to the side length of the square;
  • the coded block has a rectangular shape and the length of the string is equal to the width or height of the rectangle.
  • the basic constraints associated with the displacement vector of the string, the shape of the coding block, and the string length and reference samples may include:
  • Basic constraint 12 The value of the displacement vector of the string is limited to a set of preset values
  • the coded block has a square shape and the displacement vector of the string is equal to (0, 1) in horizontal scanning and equal to (1, 0) in vertical scanning, after conversion to an equivalent one-dimensional offset Equal to the side length of the square;
  • the coding block has a rectangular shape and the displacement vector of the string is equal to (0, 1) in horizontal scanning and equal to (1, 0) in vertical scanning, after conversion to an equivalent one-dimensional offset Equal to the width or height of the rectangle;
  • Basic constraint 15 the value of the length of the string is limited to one or a set of predetermined values, and the value of the displacement vector of the string is limited to one or a set of predetermined values;
  • Basic constraint 16 The length of the reference string is equal to 1, ie there is only one reference sample, and the length of the current string is greater than or equal to 1 and all current samples are equal to the reference sample;
  • the coding block has a two-dimensional shape and the directions of all the strings are vertical and the start and end points are on the block boundary;
  • the coding block has a two-dimensional shape and the direction of all the strings is horizontal and Both the start and end points are on the block boundary.
  • the preset constraint condition of the restricted string mode involved in the embodiment may be combined by one or more of the above basic constraints 1 to 19.
  • the restricted string in this embodiment refers to a string that is restricted by a preset basic constraint.
  • a restricted string mode of the coded block means that all of the strings in the coded block are limited by one or a set of preset constraints. string.
  • Different restricted string patterns have different one or a set of preset constraints.
  • the type, type, and number of optional strings are greatly reduced, so that the number of matching parameters and/or the range of values are also greatly reduced, and the encoding is required to be consumed. The number of bits is also greatly reduced.
  • a preset range of the reference position in the basic constraint 1 is a range of the CTU and the adjacent K CTUs of the current block, and the upper limit of the length of the string is 32 and the preset lower limit is 1;
  • the basic constraint The preset reference set or reference subset in Condition 3 is the primary reference set, and the preset upper limit of the total number of strings is the total number of samples of the current block multiplied by a fraction M/N, and both M and N are positive integers.
  • the preset multiple restricted string modes include three restricted string modes: the preset constraint of the first restricted string mode includes a basic constraint. Condition 1 and basic constraint 3; the preset constraint condition of the second restricted string mode includes a basic constraint condition 5 and a basic constraint condition 6; the preset constraint condition of the third restricted string mode includes a basic constraint condition 13, and a basic constraint condition Constraint 16 and basic constraint 17.
  • the plurality of restricted string modes preset include four restricted string modes: the preset constraint conditions of the first restricted string mode include basic constraint 1 and basic constraints 3; the preset constraint condition of the second restricted string mode includes the basic constraint condition 5 and the basic constraint condition 6; the preset constraint condition of the third restricted string mode includes the basic constraint condition 13, the basic constraint condition 16 and the basic constraint condition Condition 17; the preset constraint of the fourth restricted string mode includes a basic constraint 18 and a basic constraint 19.
  • the enable flag of the string-string mode matching mode wherein the position of the enable flag includes at least one of the following in the compressed data stream: a sequence parameter set, an image parameter set, a slice header, a CTU header, a CU header, and an encoding Block head.
  • the direct or indirect identification code is used in the header information of the coded block to indicate which one of the current block is used.
  • an optimal constrained string mode can be adaptively selected according to the data characteristics of the codec block, which can achieve high string matching precision, reduce the number of consumed bits, and greatly improve coding efficiency.
  • the multiple restricted string modes related to the preset amount in the embodiment are respectively represented by a plurality of preset values, wherein one restricted string mode corresponds to a preset value k, and the coded block is
  • the compressed data stream has a restricted string mode identification code directly or indirectly or directly indirectly mixed; in the case where the restricted string mode identification code is equal to k, a restricted string mode pair coding block corresponding to k is used. Perform string matching encoding.
  • the direct restricted string mode identification code is composed of one or more bit strings in the compressed data code stream; the indirect restricted string mode identification code is other syntax elements from other coding parameters and/or compressed data code streams.
  • the derived restricted string mode identification code; the directly indirectly mixed restricted string mode identification code is a partially directly and partially indirectly mixed restricted string mode identification code; the k is a positive integer.
  • a syntax element that encodes block header information, a restricted string mode identification code, a sample string, or an unmatched sample; or, a coded block header information, a partially restricted string mode identification code, a partial syntax element of the first sample string, or a restricted The syntax element of the remaining part of the string pattern identification code, the sample string or the unmatched sample; wherein the coded block is subjected to string matching encoding by using the restricted string mode corresponding to the value of the restricted string mode identification code.
  • the apparatus includes: a parsing module 42 configured to parse a compressed data stream and obtain a restricted string.
  • the information of the mode is coupled to the parsing module 42 and configured to perform a string copy decoding on the decoded block by selecting a restricted string mode from a preset plurality of restricted string modes according to the information of the restricted string mode.
  • the data to be decompressed in this embodiment includes at least one of the following: one-dimensional data, two-dimensional data, multi-dimensional data, images, sequences of images, video, audio, A collection of files, bytes, a collection of bits, a collection of pixels, and a collection of pixel components.
  • the coding block in this embodiment is an coding region of an image
  • the coding block involved in this embodiment includes at least one of the following: an image, a sub-image of an image, a macroblock, a maximum coding unit LCU, and a coding tree unit CTU.
  • the restricted string mode involved in this embodiment includes at least one of the following conditions: the restricted string mode may have a preset constraint; the restricted string mode may have multiple preset constraints; The string limit mode may also have no preset constraints.
  • the restricted string mode may have a preset constraint; the restricted string mode may have multiple preset constraints; The string limit mode may also have no preset constraints.
  • the first restricted string mode has a preset constraint condition
  • the second restricted string mode has Two preset constraints
  • the third restricted string mode does not have a preset constraint, so that it is possible that the first constraint type of the first restricted string mode and the second restricted string mode overlap.
  • the second restricted string mode and the third restricted string mode corresponding preset constraints have no overlapping parts, but are not limited thereto.
  • the preset constraint condition of the restricted string mode involved in this embodiment is composed of one or more of a plurality of basic constraints, wherein the factors related to the basic constraint include: reference samples and strings in the coding block The length and the displacement vector, the shape of the coding block.
  • the basic constraints associated with the reference samples in the coded block may include:
  • the reference sample has an upper limit and/or a lower limit for the length of the string from a preset range of the reference position;
  • the basic constraint 1 may be: for an original string (the string involved in this embodiment), the reference string (ie, the reference sample) is a string located within a preset range, and reference The string can be represented by a reference position, the length of the original string conforming to the above characteristics is L, and for L, there is an upper limit and/or a lower limit.
  • Basic constraint 2 The value of the length of the reference sample from a preset range of reference positions is limited to a set of preset values
  • the basic constraint 2 is substantially the same as the basic constraint 1 described above, except that the value of L is a value of a set of preset values.
  • Basic constraint 3 In a coding block, there is an upper limit on the number of reference samples from a preset reference set or a reference subset;
  • the basic constraint 3 may be: for an original string, the reference string is a string located within a preset range, and the number of lengths of the original string having the above feature is N, N. There is an upper limit.
  • Basic Constraint 4 In a coded block, there is an upper limit on the number of strings in which the reference sample comes from a preset range of reference positions.
  • the basic constraint 4 is similar to the basic constraint 3, except that the "number of strings" (with an upper limit) is defined here instead of “reference samples” from a “number”.
  • Basic constraints related to the length of the string can include:
  • Basic constraint 7 The length of the string is equal to a preset value
  • Basic constraint 8 The value of the length of the string is limited to a set of preset values
  • the length of the string may be one or a set of preset values, or may be related to the samples of the coding block, for example, the length of the string is equal to the number of samples of the coding block, and the string. The length is equal to one-half of the number of samples of the encoded block.
  • the basic constraints associated with the shape of the coding block and the length of the string may include:
  • the coding block has a square shape and the length of the string is equal to the side length of the square;
  • the coded block has a rectangular shape and the length of the string is equal to the width or height of the rectangle.
  • the basic constraints associated with the displacement vector of the string, the shape of the coding block, and the string length and reference samples may include:
  • Basic constraint 12 The value of the displacement vector of the string is limited to a set of preset values
  • the coded block has a square shape and the displacement vector of the string is equal to (0, 1) in horizontal scanning and equal to (1, 0) in vertical scanning, after conversion to an equivalent one-dimensional offset Equal to the side length of the square;
  • the coding block has a rectangular shape and the displacement vector of the string is equal to (0, 1) in horizontal scanning and equal to (1, 0) in vertical scanning, after conversion to an equivalent one-dimensional offset Equal to the width or height of the rectangle;
  • Basic constraint 15 the value of the length of the string is limited to one or a set of predetermined values, and the value of the displacement vector of the string is limited to one or a set of predetermined values;
  • Basic constraint 16 The length of the reference string is equal to 1, that is, there is only one reference sample, and the current string length is greater than or equal to 1, then all current samples are equal to the reference sample;
  • the coding block has a two-dimensional shape and the directions of all the strings are vertical and the start and end points are on the block boundary;
  • the coding block has a two-dimensional shape and the direction of all the strings is horizontal and Both the start and end points are on the block boundary.
  • the preset constraint condition of the restricted string mode involved in the embodiment may be combined by one or more of the above basic constraints 1 to 19.
  • the restricted string in this embodiment refers to a string that is restricted by a preset basic constraint.
  • a restricted string mode of the coded block means that all of the strings in the coded block are limited by one or a set of preset constraints. string.
  • Different restricted string patterns have different one or a set of preset constraints.
  • the type, type, and number of optional strings are greatly reduced, so that the number of matching parameters and/or the range of values are also greatly reduced, and the encoding is required to be consumed. The number of bits is also greatly reduced.
  • a preset range of the reference position in the basic constraint 1 is a range of the CTU and the adjacent K CTUs of the current block, and the upper limit of the length of the string is 32 and the preset lower limit is 1;
  • the basic constraint The preset reference set or reference subset in Condition 3 is the primary reference set, and the preset upper limit of the total number of strings is the total number of samples of the current block multiplied by a fraction M/N, and both M and N are positive integers.
  • the preset multiple restricted string modes include three restricted string modes: the preset constraint of the first restricted string mode includes a basic constraint. Condition 1 and basic constraint 3; the preset constraint condition of the second restricted string mode includes a basic constraint condition 5 and a basic constraint condition 6; the preset constraint condition of the third restricted string mode includes a basic constraint condition 13, and a basic constraint condition Constraint 16 and basic constraint 17.
  • the plurality of restricted string modes preset include four restricted string modes: the preset constraint conditions of the first restricted string mode include basic constraint 1 and basic constraints 3; the preset constraint condition of the second restricted string mode includes the basic constraint condition 5 and the basic constraint condition 6; the preset constraint condition of the third restricted string mode includes the basic constraint condition 13, the basic constraint condition 16 and the basic constraint condition Condition 17; the preset constraint of the fourth restricted string mode includes a basic constraint 18 and a basic constraint 19.
  • the enable flag of the string-limited mode string matching mode wherein the position of the enable flag bit includes at least one of the following in the decompressed data bitstream: a sequence parameter set, an image parameter set, a slice header, a CTU header, a CU header, and an encoding Block head.
  • the direct or indirect identification code is used in the header information of the coded block to indicate which one of the current block is used.
  • an optimal constrained string mode can be adaptively selected according to the data characteristics of the codec block, which can achieve high string matching precision, reduce the number of consumed bits, and greatly improve coding efficiency.
  • the multiple restricted string modes related to the preset amount in the embodiment are respectively represented by a plurality of preset values, wherein one restricted string mode corresponds to a preset value k, and the coded block is
  • the decompressed data stream has a restricted string mode identification code directly or indirectly or directly indirectly mixed; in the case where the restricted string mode identification code is equal to k, a restricted string mode pair coding block corresponding to k is used. Perform string matching encoding.
  • the direct restricted string mode identification code is composed of one or more bit strings in the decompressed data code stream; the indirect restricted string mode identification code is other syntax elements from other coding parameters and/or decompressed data stream.
  • the derived restricted string mode identification code; the directly indirectly mixed restricted string mode identification code is a partially directly and partially indirectly mixed restricted string mode identification code; the k is a positive integer.
  • a syntax element that encodes block header information, a restricted string mode identification code, a sample string, or an unmatched sample; or, a coded block header information, a partially restricted string mode identification code, a partial syntax element of the first sample string, or a restricted The syntax element of the remaining part of the string pattern identification code, the sample string or the unmatched sample; wherein the coded block is subjected to string matching encoding by using the restricted string mode corresponding to the value of the restricted string mode identification code.
  • the present embodiment provides a plurality of Data compression method for string matching codec in the limited string mode:
  • the restricted string refers to a string that is limited by a preset constraint condition.
  • a restricted string mode of the codec block means that all strings in the codec block are limited by one or a set of preset constraints. Restricted string. Different restricted string patterns have different one or a set of preset constraints. Under the limitation of one or a set of preset constraints, the type, type, and number of optional strings are greatly reduced, so that the number of matching parameters and/or the range of values are also greatly reduced, and the encoding is required to be consumed.
  • the number of bits is also greatly reduced.
  • the codec block is code-matched by using a plurality of (at least two) restricted string modes, and the direct or indirect identification code is used in the header information of the codec block to indicate which one of the codec blocks is used.
  • an optimal constrained string mode can be adaptively selected according to the data characteristics of the codec block, which can achieve high string matching precision, reduce the number of consumed bits, and greatly improve coding efficiency.
  • a plurality of (ie, two or more) codec block level restricted string modes are used for string matching codec.
  • the restricted string mode may have a preset constraint condition, or a restricted string mode may have a set of (ie, two or more) preset constraint conditions; the one preset constraint condition is one Or a combination of multiple basic constraints.
  • the restricted string mode has a zero preset constraint condition, that is, there is no preset constraint condition; and two sets of preset constraint conditions corresponding to the plurality of restricted string modes have overlapping portions; Two sets of preset constraints among the multiple sets of preset constraints corresponding to the limited string mode have no overlapping parts.
  • the current encoding block is subjected to string matching encoding by adaptively selecting a restricted string mode from a preset plurality of restricted string modes according to characteristics of a current encoding block, and A compressed data bitstream is generated that generates information of at least a plurality of restricted string patterns and a matching parameter of the corresponding restricted string (ie, a copy parameter required for decoding).
  • the compressed data stream is parsed to obtain the information of the restricted string mode, and the information of the restricted string mode is used to adopt one of a plurality of preset limited string modes.
  • the current decoded block is subjected to serial copy decoding.
  • the present embodiment is applicable to encoding and decoding of lossy data compression, and the present invention is equally applicable to encoding and decoding of lossless data compression.
  • This embodiment is applicable to encoding and decoding of one-dimensional data such as character string data or byte string data, and the present invention is equally applicable to encoding and decoding of two-dimensional or above data such as image or video data.
  • the data involved in data compression includes one or a combination of the following types of data:
  • the coding block or the decoding block is one coding region or one decoding region of the image, including at least one of the following: a sub-image of the image, a macroblock a maximum coding unit LCU, a coding tree unit CTU, a coding unit CU, a sub-region of a CU, a prediction unit PU, and a transform unit TU.
  • the restricted string mode involved in this embodiment has one of the following characteristics or a reasonable combination thereof: the one restricted string mode has a preset constraint; the one restricted string mode has a set (multiple, ie two or more) preset constraints; the one restricted string mode has At least one preset constraint, the one predetermined constraint is a logical combination of one or more basic constraints; the one restricted string mode has a zero preset constraint, that is, there is no preset constraint; Two sets of preset constraints among the plurality of sets of preset constraints corresponding to the plurality of restricted string modes have overlapping portions; two sets of pre-sets of the plurality of sets of preset constraints corresponding to the plurality of restricted string modes Let the constraint have no overlap.
  • the value of the length of the string from a preset range of the reference position has a preset upper limit and/or a preset lower limit;
  • Basic Constraint 3 In a codec block, the number of reference samples from a preset reference set or a reference subset has a preset upper limit
  • the reference sample has a preset upper limit from the number of strings of a preset range of the reference position
  • the length of the basic constraint 5 string is equal to the number of samples of the codec block
  • the length of the basic constraint 6 string is equal to one-half of the number of samples of the codec block
  • the length of the basic constraint 7 string is equal to a preset value
  • the value of the length of the basic constraint 8 string is limited to a set of preset values
  • the basic constraint 9 codec block has a square shape and the length of the string is equal to the side length of the square;
  • the codec block has a rectangular shape and the length of the string is equal to the width or height of the rectangle;
  • the codec block has a square shape and the displacement vector (horizontal component, vertical component) of the string is equal to (0, 1) in horizontal scanning, equal to (1, 0) in vertical scanning, and converted to equivalent.
  • the one-dimensional offset is equal to the side length of the square;
  • the codec block has a rectangular shape and the displacement vector (horizontal component, vertical component) of the string is equal to (0, 1) in horizontal scanning, equal to (1, 0) in vertical scanning, and converted to equivalent.
  • the one-dimensional offset is equal to the width or height of the rectangle;
  • Basic constraint 15 The value of the length of the string is limited to one or a set of preset values, and the value of the displacement vector of the string is limited to one or a set of preset values;
  • the length of the reference string is equal to 1, ie there is only one reference sample, and the length of the current string is greater than or equal to 1 and all current samples are equal to the reference sample;
  • the basic constraint 17 reference sample is inside the current block
  • the codec block has a two-dimensional shape and the direction of all strings is vertical and the start and end points are on the block boundary;
  • the codec block has a two-dimensional shape and the direction of all strings is horizontal and the start and end points are on the block boundary.
  • the preset multiple restricted string modes are the following three restricted string modes:
  • the first constraint of the first restricted string mode is the basic constraint 1 and the basic constraint 3. That is to say, the codec block using the first restricted string mode is subject to the following restrictions: 1) If the reference sample of a string comes from a preset range of the reference position, the length of the string has a value The upper limit and/or a preset lower limit are set; 2) In the codec block, the total number of reference samples from a preset reference set or a reference subset has a preset upper limit.
  • the preset constraints of the second restricted string mode are the basic constraint 5 and the basic constraint 6. That is to say, the codec block using the second restricted string mode is subject to the following restrictions: A code block or a string having only one string length equal to the number of samples of the codec block, or only two strings having a string length equal to one-half of the number of samples of the codec block.
  • the preset constraints of the third restricted string mode are the basic constraint 13, the basic constraint 16, and the basic constraint 17. That is to say, the codec block adopting the third restricted string mode is subject to the following limitation: the codec block has a square shape in which any one of the strings or its displacement vector (horizontal component, vertical component) is equal to horizontal scanning. (0,1), equal to (1,0) in the vertical scan, equal to the side length of the square after conversion to the equivalent one-dimensional offset (ie the current string of this string is to move the reference string by one row or column) The position obtained or its current sample is equal to one reference sample, and all reference samples of the codec block are from the inside of the codec block.
  • the codec block has a square shape in which any one of the strings or its displacement vector (horizontal component, vertical component) is equal to horizontal scanning. (0,1), equal to (1,0) in the vertical scan, equal to the side length of the square after conversion to the equivalent one-dimensional offset (ie the current string of this string is to move the reference string by
  • the preset multiple restricted string modes include four restricted string modes: the preset constraint condition of the first restricted string mode is equivalent to the first limited of the implementation or variant example 2. Preset constraints for string mode.
  • the preset constraint of the second restricted string mode is equivalent to the preset constraint of the second restricted string mode of the implementation or variant 2.
  • the preset constraint of the third restricted string mode is equivalent to the preset constraint of the third restricted string mode of the implementation or variant 2.
  • the preset constraints of the fourth restricted string mode are the basic constraint 18 and the basic constraint 19. That is to say, the codec block adopting the fourth restricted string mode is subject to the following restrictions: the codec block has a two-dimensional shape and the direction of all its strings is vertical or the direction of all its strings is horizontal and the start and end points are horizontal All on the block boundary.
  • a preset range of the reference position in the basic constraint 1 is the CTU and the proximity of the current block (left or left and/or upper left and/or upper and/or upper right) Square) K (usually 1 ⁇ K ⁇ 4) area range composed of CTUs, the preset upper limit of the length of the string is 32 (inclusive) and the preset lower limit is 1 (inclusive), the preset in the basic constraint 3
  • the reference set or reference subset is the primary reference set, and the upper limit of the total number of strings is the total number of samples of the current block multiplied by a fraction M/N (usually 1 ⁇ M ⁇ N ⁇ 16).
  • sequence parameter set usually a grammatical element of a direct or implicit derivation of a sequence parameter set
  • an image parameter set usually a grammatical element of a direct or implicit derivation of an image parameter set
  • Strip head usually a grammatical element of the direct or implicit derivation of the strip head
  • CTU header usually a grammatical element of a direct or implicit derivation of the CTU header
  • CU header usually a grammatic element of a direct or implicit derivation of the CU header
  • Codec block header usually a directly existing or implicitly derived syntax element of the codec block header.
  • the preset multiple restricted string modes are respectively represented by a plurality of preset values, and one restricted string mode corresponds to a preset value k, and each codec block is compressed.
  • the data stream has a restricted string mode identification code that is directly or indirectly or directly indirectly mixed.
  • the direct restricted string mode identification code consists of one or more bit strings (bit strings) in the compressed data stream.
  • the indirect restricted string mode identification code is a restricted string mode identification code derived from other codec parameters and/or other syntax elements of the compressed data stream. Restricted series mode of direct indirect mixing
  • the type identification code is a partially constrained (ie, consisting of one or more bit strings in a compressed data stream) partially indirectly (ie, derived from other codec parameters and/or other syntax elements of the compressed data stream). String mode identification code.
  • the restricted string mode identification code syntax element used to represent the restricted string mode of the codec block exists in the compressed data bitstream of the codec block in the following form:
  • Codec block header information for restricted string mode identification code, more codec block header information, sample string or unmatched sample syntax elements (1 ⁇ N ⁇ the total number of samples of the codec block); or,
  • Codec block header information partially restricted string mode identification code, more codec block header information, partial syntax elements of the first sample string, remainder of the restricted string pattern identification code, sample string or unmatched samples
  • the remaining syntax elements (1 ⁇ N ⁇ the total number of samples of the codec block);
  • the codec block is subjected to string matching encoding and decoding by using the restricted string mode corresponding to the value.
  • modules or steps of the present invention described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein.
  • the steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps thereof are fabricated as a single integrated circuit module.
  • the invention is not limited to any specific combination of hardware and software.
  • the coding block performs string matching coding to obtain information of a restricted string encoded using the selected restricted string mode, and a manner of compressing the data stream of the syntax element of the restricted string encoded using the selected restricted string mode, Selecting a restricted string mode from a plurality of preset restricted string modes to encode the coded block in the compressed data, thereby reducing matching parameters for encoding the coded block, since only one type of the limited block mode is also used.
  • the matching precision of the string in the encoding process is improved, thereby solving the problem that the string matching method has more matching parameters and consumes more bits in the related art.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

Provided are an encoding and decoding method and device for data compression. The encoding method comprises: performing an adaptive selection of a restricted string mode from multiple preset restricted string modes; and performing, according to the selected restricted string mode, string match encoding on an encoding block to obtain information of a restricted string encoded using the selected restricted string mode, and to obtain a compressed data bitstream of a syntax element of the restricted string encoded using the selected restricted string mode. The invention solves the problem of prior art string matching techniques having many matching parameters and consuming more bits to encode the same, thereby achieving higher string matching accuracy, reducing consumption of bits, and increasing encoding efficiency.

Description

数据压缩的编码、解码方法及装置Data compression coding and decoding method and device 技术领域Technical field
本发明涉及通信领域,具体而言,涉及一种数据压缩的编码、解码方法及装置。The present invention relates to the field of communications, and in particular to a method and apparatus for encoding and decoding data compression.
背景技术Background technique
随着人类社会进入大数据、云计算、移动计算、云-移动计算、超高清(4K)和特超高清(8K)视频图像分辨率、4G/5G通讯的时代,对各种数据,包括大数据、图像数据、视频数据,进行超高压缩比和极高质量的数据压缩成为必不可少的技术。As human society enters the era of big data, cloud computing, mobile computing, cloud-mobile computing, ultra-high definition (4K) and ultra-high definition (8K) video image resolution, 4G/5G communication, for various data, including large Data, image data, and video data are essential technologies for ultra-high compression ratio and extremely high-quality data compression.
数据集是由数据的样值(例如:字节、比特、像素、像素分量)组成的集合。对一个数据集(例如:一个文件、一帧图像、一个视频序列)进行数据压缩的编码(以及相应的解码)时,通常把此数据集划分成若干块的子集,称为编码块(从解码的角度也就是解码块,统称为编解码块),以编解码块为单位,一块一块进行编码或解码。在任一时刻,正在编码中的编码块称为当前编码块。在任一时刻,正在解码中的解码块称为当前解码块。当前编码块或当前解码块统称为当前编解码块或简称为当前块。正在编码或解码中的样值称为当前编码样值或当前解码样值,简称为当前样值。A data set is a collection of samples of data (eg, bytes, bits, pixels, pixel components). When data encoding (and corresponding decoding) is performed on a data set (eg, a file, an image, a video sequence), the data set is usually divided into subsets of blocks called code blocks. The decoding angle is also the decoding block, collectively referred to as the codec block, and is coded or decoded in units of codec blocks. At any one time, the coded block being encoded is referred to as the current coded block. At any one time, the decoded block being decoded is referred to as the current decoded block. The current coded block or the current decoded block is collectively referred to as the current codec block or simply as the current block. The sample being encoded or decoded is called the current coded sample or the current decoded sample, which is simply referred to as the current sample.
很多常见的数据集的一个显著特点是具有很多匹配(即相似甚至完全相同)的式样。例如,图像和视频序列中通常有很多匹配的像素图样。因此,现有数据压缩技术中通常采用匹配(也称为预测或补偿)的方式,即用“预测值”(也称为“补偿值”或“参考样值”,例如“参考像素”)来匹配(也称为预测、表示、代表、补偿、近似、逼近等)当前编码或解码中样值(简称为“当前样值”)的方式来达到数据的无损或有损压缩的效果。简单地说,匹配方式的基本操作就是复制参考样值即在参考位置上的样值到当前样值的位置。因此,匹配方式或预测方式也称为复制方式。匹 配方式中,已经经历过至少部分编码运算以及至少部分解码运算的重构(也称重建或复原)样值组成主参考集(也称主参考空间或主参考缓存)。主参考集之中的重构样值及其位置与原始数据集中的原始样值及其位置是一一对应的。匹配方式中,除了主参考集,可能还会构造或产生其他参考集,称为次参考集或从属参考集或者第二参考集、第三参考集等等。A notable feature of many common data sets is that they have many matching (ie similar or even identical) styles. For example, there are often many matching pixel patterns in image and video sequences. Therefore, existing data compression techniques usually use matching (also called prediction or compensation), that is, using "predicted values" (also called "compensation values" or "reference samples", such as "reference pixels"). Matching (also known as prediction, representation, representation, compensation, approximation, approximation, etc.) current encoding or decoding of sample values (referred to as "current samples") to achieve lossless or lossy compression of the data. Simply put, the basic operation of the matching method is to copy the reference sample, that is, the position of the sample at the reference position to the current sample. Therefore, the matching mode or prediction mode is also called the copy mode. Horse In the allocation mode, the reconstructed (also called reconstructed or restored) samples that have undergone at least partial encoding operations and at least partial decoding operations constitute a primary reference set (also referred to as a primary reference space or a primary reference cache). The reconstructed samples and their positions in the primary reference set are in one-to-one correspondence with the original samples and their locations in the original data set. In the matching manner, in addition to the primary reference set, other reference sets may be constructed or generated, called a secondary reference set or a dependent reference set or a second reference set, a third reference set, and the like.
现有常用的匹配方式有两种:块匹配方式和串匹配方式。块匹配方式的特征在于基本匹配单位是若干种预先确定的固定大小的块(样值块)。块匹配的基本匹配参数(也称为匹配关系或复制参数或复制关系)是位移矢量(也称为运动矢量、位置偏移、偏移量、相对位置、位置、相对地址、地址、相对坐标、坐标、相对索引、索引等)。位移矢量表示当前样值块(简称当前块)的参考样值块(简称参考块)的位置(通常称为参考位置)所在。串匹配方式的特征在于基本匹配单位是具有预先确定的一定形状但长度可变的串(样值串)。串匹配的基本匹配参数(也称为匹配关系或复制参数或复制关系)是位移矢量(也称为运动矢量、位置偏移、偏移量、相对位置、位置、相对地址、地址、相对坐标、坐标、相对索引、索引等)和串长度以及未匹配样值。位移矢量表示当前样值串(简称当前串)的参考样值串(简称参考串)的参考位置所在,等价于数据样值排列成一维数据后的一维偏移量。串长度表示当前串的长度即样值的数目。未匹配样值又称无参考样值,表示没有参考样值的当前样值。There are two commonly used matching methods: block matching mode and string matching mode. The block matching method is characterized in that the basic matching unit is a plurality of predetermined fixed-size blocks (sample blocks). The basic matching parameters of block matching (also known as matching or copying or copying) are displacement vectors (also known as motion vectors, positional offsets, offsets, relative positions, positions, relative addresses, addresses, relative coordinates, Coordinates, relative indexes, indexes, etc.). The displacement vector indicates the position (often referred to as the reference position) of the reference sample block (referred to as the reference block) of the current sample block (referred to as the current block). The string matching method is characterized in that the basic matching unit is a string (sample string) having a predetermined shape but a variable length. The basic matching parameters of the string match (also called the matching relationship or the copy parameter or the copy relationship) are displacement vectors (also called motion vectors, position offsets, offsets, relative positions, positions, relative addresses, addresses, relative coordinates, Coordinates, relative indexes, indexes, etc.) and string lengths and unmatched samples. The displacement vector indicates the reference position of the reference sample string (referred to as the reference string) of the current sample string (referred to as the current string), which is equivalent to the one-dimensional offset after the data samples are arranged into one-dimensional data. The string length indicates the length of the current string, that is, the number of samples. Unmatched samples are also referred to as no reference samples, indicating that there are no current samples of the reference samples.
如果编解码块具有二维形状(不一定限于正方形或矩形,可以是任何合理的其他二维形状),则需要将其样值按照一定顺序排列后对其进行串匹配方式的编解码。排列方式也称为扫描方式。通常使用的扫描方式有水平扫描(又可分为光栅和弓形)和垂直扫描(也可分为光栅和弓形)。If the codec block has a two-dimensional shape (not necessarily limited to a square or a rectangle, and may be any other reasonable two-dimensional shape), the sample values need to be coded in a certain order and then subjected to string matching. The arrangement is also called the scanning method. Scanning methods commonly used are horizontal scanning (which can be divided into gratings and bows) and vertical scanning (which can also be divided into gratings and bows).
串匹配具有灵活的匹配形状和可变的匹配长度,能够达到比块匹配高得多的匹配精度,但也存在匹配参数(也称为匹配关系或复制参数或复制关系)较多,消耗较多比特数对其进行编码的问题,影响了编码效率。String matching has a flexible matching shape and a variable matching length, which can achieve a much higher matching accuracy than block matching, but there are also matching parameters (also called matching relationships or copy parameters or copy relationships), which consume more The problem of encoding the number of bits affects the coding efficiency.
发明内容 Summary of the invention
本发明实施例提供了一种数据压缩的编码、解码方法及装置,以至少解决相关技术中串匹配方式存在匹配参数较多以及消耗较多比特数对其进行编码的问题。The embodiment of the invention provides a method and a device for encoding and decoding a data compression, so as to solve at least the problem that the string matching method in the related art has more matching parameters and consumes a larger number of bits to encode the same.
根据本发明实施例的一个方面,提供了一种数据压缩的编码方法,包括:自适应地从预设的多种受限串模式中选择一种受限串模式;根据选择的受限串模式对编码块进行串匹配编码得到使用所述选择的受限串模式进行编码的受限串的信息,以及使用所述选择的受限串模式进行编码的受限串的语法元素的压缩数据码流。According to an aspect of an embodiment of the present invention, a data compression coding method is provided, including: adaptively selecting a restricted string mode from a preset plurality of restricted string modes; according to the selected restricted string mode Performing string matching encoding on the coded block to obtain information of the restricted string encoded using the selected restricted string mode, and compressed data bitstream of the syntax element of the restricted string encoded using the selected restricted string mode .
可选地,所述编码块为图像的编码区域,所述编码块至少包括以下之一:图像、图像的子图像、宏块、最大编码单元LCU、编码树单元CTU、编码单元CU、CU的子区域、预测单元PU、变换单元TU。Optionally, the coding block is an coding region of an image, and the coding block includes at least one of the following: an image, a sub-image of an image, a macroblock, a maximum coding unit LCU, a coding tree unit CTU, a coding unit CU, a CU Sub-region, prediction unit PU, and transform unit TU.
可选地,所述受限串模式至少包括以下之一的条件:所述受限串模式具有一个预设约束条件;所述受限串模式具有多个预设约束条件;所述受限串模式不具有预设约束条件。Optionally, the restricted string mode includes at least one of the following conditions: the restricted string mode has a preset constraint; the restricted string mode has a plurality of preset constraints; the restricted string The mode does not have a preset constraint.
可选地,所述受限串模式的预设约束条件是下列基本约束条件的一个或多个组合:基本约束条件1:参考样值来自参考位置的一个预设范围的串的长度的取值有一个上限和/或一个下限;基本约束条件2:参考样值来自参考位置的一个预设范围的串的长度的取值限于一组预设的值;基本约束条件3:一个编码块中,参考样值来自一个预设参考集或参考子集的串的数目有一个上限;基本约束条件4:一个编码块中,参考样值来自参考位置的一个预设范围的串的数目有一个上限;基本约束条件5:串的长度等于编码块的样值的个数;基本约束条件6:串的长度等于编码块的样值的个数的二分之一;基本约束条件7:串的长度等于一个预设的值;基本约束条件8:串的长度的取值限于一组预设的值;基本约束条件9:编码块具有正方形的形状并且串的长度等于正方形的边长;基本约束条件10:编码块具有矩形的形状并且串的长度等于矩形的宽或高;基本约束条件11:串的位移矢量等于一个预设的值;基本约束条件12:串的位移矢量的 取值限于一组预设的值;基本约束条件13:编码块具有正方形的形状并且串的位移矢量在水平扫描时等于(0,1),在垂直扫描时等于(1,0),在转换为等价的一维偏移量后等于正方形的边长;基本约束条件14:编码块具有矩形的形状并且串的位移矢量在水平扫描时等于(0,1),在垂直扫描时等于(1,0),在转换为等价的一维偏移量后等于矩形的宽或高;基本约束条件15:串的长度的取值限于一个或一组预设的值,并且串的位移矢量的取值限于一个或一组预设的值;基本约束条件16:参考串的长度等于1,即只有一个参考样值,而当前串的长度大于或等于1并且所有当前样值都等于所述参考样值;基本约束条件17:参考样值在当前块内部;基本约束条件18:编码块具有二维形状并且所有串的方向是垂直的且起点和终点都在块边界上;基本约束条件19:编码块具有二维形状并且所有串的方向是水平的且起点和终点都在块边界上。Optionally, the preset constraint condition of the restricted string mode is one or more combinations of the following basic constraints: a basic constraint condition 1: a value of a length of a reference sample from a preset range of reference positions There is an upper limit and/or a lower limit; basic constraint 2: the value of the reference sample from a preset range of the reference position is limited to a set of preset values; basic constraint 3: in a coding block, The reference sample has an upper limit on the number of strings from a preset reference set or a reference subset; basic constraint 4: in an encoding block, the reference sample has an upper limit from the number of strings of a preset range of the reference position; Basic constraint 5: the length of the string is equal to the number of samples of the coding block; the basic constraint 6: the length of the string is equal to one-half of the number of samples of the coding block; the basic constraint 7: the length of the string is equal to a preset value; basic constraint 8: the value of the length of the string is limited to a set of preset values; basic constraint 9: the coded block has a square shape and the length of the string is equal to a square Side length; basic constraint 10: The coding block has a rectangular shape and the length of the string is equal to the width or height of the rectangle; the basic constraint 11: the displacement vector of the string is equal to a preset value; the basic constraint 12: the displacement vector of the string of The value is limited to a set of preset values; basic constraint 13: the coded block has a square shape and the displacement vector of the string is equal to (0, 1) in horizontal scanning and equal to (1, 0) in vertical scanning, in conversion The equivalent one-dimensional offset is equal to the side length of the square; basic constraint 14: the coding block has a rectangular shape and the displacement vector of the string is equal to (0, 1) in horizontal scanning and equal to (1 in vertical scanning) , 0), equal to the width or height of the rectangle after conversion to the equivalent one-dimensional offset; basic constraint 15: the length of the string is limited to one or a set of preset values, and the displacement vector of the string The value is limited to one or a set of preset values; basic constraint 16: the length of the reference string is equal to 1, ie there is only one reference sample, and the length of the current string is greater than or equal to 1 and all current samples are equal to the reference Sample; basic constraint 17: reference sample is inside the current block; basic constraint 18: the coded block has a two-dimensional shape and the direction of all strings is vertical and the start and end points are on the block boundary; basic constraint 19: Code block has Shape and dimension in all directions are horizontal and string start and end points in the block boundary.
可选地,所述预设的多种受限串模式包括三种受限串模式,其中,第一种受限串模式的预设约束条件包括所述基本约束条件1和所述基本约束条件3;第二种受限串模式的预设约束条件包括所述基本约束条件5和所述基本约束条件6;第三种受限串模式的预设约束条件包括所述基本约束条件13、所述基本约束条件16和所述基本约束条件17。Optionally, the preset multiple restricted string mode includes three restricted string modes, where the preset constraint of the first restricted string mode includes the basic constraint 1 and the basic constraint The preset constraint condition of the second restricted string mode includes the basic constraint condition 5 and the basic constraint condition 6; the preset constraint condition of the third restricted string mode includes the basic constraint condition 13 The basic constraint 16 and the basic constraint 17 are described.
可选地,所述预设的多种受限串模式包括四种受限串模式,其中,第一种受限串模式的预设约束条件包括所述基本约束条件1和所述基本约束条件3;第二种受限串模式的预设约束条件包括所述基本约束条件5和所述基本约束条件6;第三种受限串模式的预设约束条件包括所述基本约束条件13、所述基本约束条件16和所述基本约束条件17;第四种受限串模式的预设约束条件包括所述基本约束条件18和所述基本约束条件19。Optionally, the preset multiple restricted string modes include four restricted string modes, where a preset constraint condition of the first restricted string mode includes the basic constraint 1 and the basic constraint The preset constraint condition of the second restricted string mode includes the basic constraint condition 5 and the basic constraint condition 6; the preset constraint condition of the third restricted string mode includes the basic constraint condition 13 The basic constraint condition 16 and the basic constraint condition 17 are included; the preset constraint condition of the fourth restricted string mode includes the basic constraint condition 18 and the basic constraint condition 19.
可选地,所述基本约束条件1中的所述参考位置的一个预设范围是所述编码块所在CTU和邻近K个CTU组成的区域范围,且串长度的上限是32和/或串长度的取值下限是1;所述基本约束条件3中的所述预设参考集或参考子集是主参考集,串的总数目的上限预设为所述编码块的样值的总数目乘以一个分数M/N。 Optionally, a preset range of the reference position in the basic constraint 1 is a range of a CTU and a neighboring K CTUs of the coding block, and an upper limit of the string length is 32 and/or a string length. The lower limit of the value is 1; the preset reference set or reference subset in the basic constraint 3 is a primary reference set, and the upper limit of the total number of strings is preset to be the total number of samples of the coded block multiplied by A score M/N.
可选地,在所述压缩数据码流中存在所述多种受限串模式串匹配方式的使能标志位,其中,所述使能标识位的位置在压缩数据码流中包括以下至少之一:序列参数集、图像参数集、条带头、CTU头、CU头、编码块头。Optionally, the enable flag of the multiple restricted string mode string matching mode exists in the compressed data bitstream, where the location of the enable flag bit includes at least the following in the compressed data bitstream. One: sequence parameter set, image parameter set, strip header, CTU header, CU header, coding block header.
可选地,所述预设的多种受限串模式分别用多个预设的值来表示,其中,一种受限串模式对应于一个预设的值k,所述编码块在压缩数据码流中都有一个直接、或间接、或直接间接混合的受限串模式标识码;在所述受限串模式标识码等于k的情况下,采用与k对应的一种受限串模式对所述编码块进行串匹配编码。Optionally, the preset multiple restricted string modes are respectively represented by a plurality of preset values, wherein one restricted string mode corresponds to a preset value k, and the coded block is compressed data. A coded stream has a restricted string mode identification code that is directly, or indirectly, or directly indirectly mixed; in the case where the restricted string mode identification code is equal to k, a restricted string mode pair corresponding to k is used. The coding block performs string matching coding.
可选地,所述直接的受限串模式标识码由压缩数据码流中的一个或多个比特串所组成;所述间接的受限串模式标识码是从其他编码参数和/或压缩数据码流的其他语法元素导出的受限串模式标识码;所述直接间接混合的受限串模式标识码是部分直接和部分间接混合的受限串模式标识码。Optionally, the direct restricted string mode identification code is composed of one or more bit strings in the compressed data code stream; the indirect restricted string mode identification code is from other coding parameters and/or compressed data. The restricted string mode identification code derived by other syntax elements of the code stream; the directly indirectly mixed restricted string mode identification code is a partially and partially indirectly mixed restricted string mode identification code.
可选地,用来表示所述编码块的受限串模式的受限串模式标识码语法元素以下列形式存在于所述编码块的压缩数据码流中:编码块头信息、受限串模式标识码、样值串或未匹配样值的语法元素;或,编码块头信息、部分受限串模式标识码、第一个样值串的部分语法元素、受限串模式标识码的其余部分、样值串或未匹配样值的语法元素;其中,采用与受限串模式标识码的取值对应的受限串模式对所述编码块进行串匹配编码。Optionally, the restricted string mode identification code syntax element used to represent the restricted string mode of the coding block is present in the compressed data bitstream of the coding block in the following form: coding block header information, restricted string mode identifier a syntax element of a code, a sample string, or an unmatched sample; or, a coded block header information, a partially restricted string mode identification code, a partial syntax element of a first sample string, a remainder of a restricted string mode identification code, A value string or a syntax element that does not match the sample; wherein the coded block is subjected to string matching encoding using a restricted string mode corresponding to the value of the restricted string mode identification code.
根据本发明实施例的另一个方面,提供了一种数据压缩的编码装置,包括:选择模块,设置为自适应地从预设的多种受限串模式中选择一种受限串模式;编码模块,设置为根据选择的受限串模式对编码块进行串匹配编码得到使用所述选择的受限串模式进行编码的受限串的信息,以及使用所述选择的受限串模式进行编码的受限串的语法元素的压缩数据码流。According to another aspect of the embodiments of the present invention, there is provided an apparatus for encoding data compression, comprising: a selecting module configured to adaptively select a restricted string mode from a plurality of preset restricted string modes; encoding a module configured to perform string matching encoding on the coded block according to the selected restricted string mode to obtain information of a restricted string encoded using the selected restricted string mode, and encoding using the selected restricted string mode A compressed data stream of syntax elements of a restricted string.
根据本发明的再一个方面,提供了一种数据压缩的解码方法,包括:解析压缩数据码流,获取受限串模式的信息;根据所述受限串模式的信息从预设的多种受限串模式中选择一种受限串模式对解码块进行串复制解 码。According to still another aspect of the present invention, a decoding method for data compression is provided, comprising: parsing a compressed data code stream, acquiring information of a restricted string mode; and receiving information according to the restricted string mode from a preset plurality of Selecting a restricted string mode in the limited string mode to perform a string copy solution on the decoded block code.
可选地,所述解码块为图像的解码区域,所述解码块至少包括以下之一:图像、图像的子图像、宏块、最大解码单元LCU、解码树单元CTU、解码单元CU、CU的子区域、预测单元PU、变换单元TU。Optionally, the decoding block is a decoding area of an image, and the decoding block includes at least one of the following: an image, a sub-image of an image, a macroblock, a maximum decoding unit LCU, a decoding tree unit CTU, a decoding unit CU, and a CU. Sub-region, prediction unit PU, and transform unit TU.
可选地,所述受限串模式至少包括以下之一的条件:所述受限串模式可选地,所述一种受限串模式的预设约束条件是下列基本约束条件的一个或多个组合:基本约束条件1:参考样值来自参考位置的一个预设范围的串的长度的取值有一个上限和/或一个下限;基本约束条件2:参考样值来自参考位置的一个预设范围的串的长度的取值限于一组预设的值;基本约束条件3:一个解码块中,参考样值来自一个预设参考集或参考子集的串的数目有一个上限;基本约束条件4:一个解码块中,参考样值来自参考位置的一个预设范围的串的数目有一个上限;基本约束条件5:串的长度等于解码块的样值的个数;基本约束条件6:串的长度等于解码块的样值的个数的二分之一;基本约束条件7:串的长度等于一个预设的值;基本约束条件8:串的长度的取值限于一组预设的值;基本约束条件9:解码块具有正方形的形状并且串的长度等于正方形的边长;基本约束条件10:解码块具有矩形的形状并且串的长度等于矩形的宽或高;基本约束条件11:串的位移矢量等于一个预设的值;基本约束条件12:串的位移矢量的取值限于一组预设的值;基本约束条件13:解码块具有正方形的形状并且串的位移矢量在水平扫描时等于(0,1),在垂直扫描时等于(1,0),在转换为等价的一维偏移量后等于正方形的边长;基本约束条件14:解码块具有矩形的形状并且串的位移矢量在水平扫描时等于(0,1),在垂直扫描时等于(1,0),在转换为等价的一维偏移量后等于矩形的宽或高;基本约束条件15:串的长度的取值限于一个或一组预设的值,并且串的位移矢量的取值限于一个或一组预设的值;基本约束条件16:参考串的长度等于1,即只有一个参考样值,而当前串的长度大于或等于1并且所有当前样值都等于所述参考样值;基本约束条件17:参考样值在当前块内部;基本约束条件18:解码块具有二维形状并且所有串的方向是垂直的且起点和 终点都在块边界上;Optionally, the restricted string mode includes at least one of the following conditions: the restricted string mode optionally, the preset constraint condition of the one restricted string mode is one or more of the following basic constraints Combinations: Basic Constraint 1: Reference Samples There is an upper limit and/or a lower limit for the length of a string from a preset range of reference positions; Basic Constraint 2: Reference Samples are from a preset of the reference position The value of the length of the range string is limited to a set of preset values; basic constraint 3: in a decoding block, the number of reference samples from a preset reference set or a reference subset has an upper limit; basic constraints 4: In a decoding block, there is an upper limit on the number of strings whose reference samples are from a preset range of reference positions; basic constraint 5: the length of the string is equal to the number of samples of the decoded block; basic constraint 6: string The length is equal to one-half of the number of samples of the decoded block; the basic constraint 7: the length of the string is equal to a preset value; the basic constraint 8: the length of the string is limited to a set of presets Basic constraint 9: The decoding block has a square shape and the length of the string is equal to the side length of the square; basic constraint 10: the decoding block has a rectangular shape and the length of the string is equal to the width or height of the rectangle; basic constraint 11: string The displacement vector is equal to a preset value; basic constraint 12: the value of the displacement vector of the string is limited to a set of preset values; basic constraint 13: the decoded block has a square shape and the displacement vector of the string is horizontally scanned Equal to (0,1), equal to (1,0) in the vertical scan, equal to the side length of the square after conversion to the equivalent one-dimensional offset; basic constraint 14: the decoded block has a rectangular shape and the string The displacement vector is equal to (0,1) in horizontal scanning and equal to (1,0) in vertical scanning, equal to the width or height of the rectangle after conversion to an equivalent one-dimensional offset; basic constraint 15: string The value of the length is limited to one or a set of preset values, and the value of the displacement vector of the string is limited to one or a set of preset values; the basic constraint 16: the length of the reference string is equal to 1, that is, only one reference sample And the length of the current string is greater than or equal to 1 and all current samples are equal to the reference sample; basic constraint 17: the reference sample is inside the current block; basic constraint 18: the decoded block has a two-dimensional shape and all strings The direction is vertical and the starting point and The end points are all on the block boundary;
基本约束条件19:解码块具有二维形状并且所有串的方向是水平的且起点和终点都在块边界上。Basic Constraint 19: The decoded block has a two-dimensional shape and the direction of all strings is horizontal and both the start and end points are on the block boundary.
可选地,所述预设的多种受限串模式包括三种受限串模式,其中,第一种受限串模式的预设约束条件包括所述基本约束条件1和所述基本约束条件3;第二种受限串模式的预设约束条件包括所述基本约束条件5和所述基本约束条件6;第三种受限串模式的预设约束条件包括所述基本约束条件13、所述基本约束条件16和所述基本约束条件17。Optionally, the preset multiple restricted string mode includes three restricted string modes, where the preset constraint of the first restricted string mode includes the basic constraint 1 and the basic constraint The preset constraint condition of the second restricted string mode includes the basic constraint condition 5 and the basic constraint condition 6; the preset constraint condition of the third restricted string mode includes the basic constraint condition 13 The basic constraint 16 and the basic constraint 17 are described.
可选地,所述预设的多种受限串模式包括四种受限串模式,其中,第一种受限串模式的预设约束条件是所述基本约束条件1和所述基本约束条件3;第二种受限串模式的预设约束条件包括所述基本约束条件5和所述基本约束条件6;第三种受限串模式的预设约束条件包括所述基本约束条件13、所述基本约束条件16和所述基本约束条件17;第四种受限串模式的预设约束条件包括所述基本约束条件18和所述基本约束条件19。Optionally, the preset multiple restricted string modes include four restricted string modes, wherein a preset constraint condition of the first restricted string mode is the basic constraint 1 and the basic constraint The preset constraint condition of the second restricted string mode includes the basic constraint condition 5 and the basic constraint condition 6; the preset constraint condition of the third restricted string mode includes the basic constraint condition 13 The basic constraint condition 16 and the basic constraint condition 17 are included; the preset constraint condition of the fourth restricted string mode includes the basic constraint condition 18 and the basic constraint condition 19.
可选地,所述基本约束条件1中的所述参考位置的一个预设范围是所述解码所在CTU和邻近K个CTU组成的区域范围,且串长度的上限是32和/或串长度的取值下限是1;所述基本约束条件3中的所述预设参考集或参考子集是主参考集,串的总数目的上限预设为所述解码块包含的样值的总数目乘以一个分数M/N。Optionally, a preset range of the reference position in the basic constraint 1 is an area range of the CTU and the adjacent K CTUs, and the upper limit of the string length is 32 and/or a string length. The lower limit of the value is 1; the preset reference set or reference subset in the basic constraint 3 is a primary reference set, and the upper limit of the total number of strings is preset to be the total number of samples included in the decoded block multiplied by A score M/N.
可选地,在所述压缩数据码流中存在所述多种受限串模式串匹配方式的使能标志位,其中,所述使能标识位的位置在压缩数据码流中包括以下至少之一:序列参数集、图像参数集、条带头、CTU头、CU头、解码块头。Optionally, the enable flag of the multiple restricted string mode string matching mode exists in the compressed data bitstream, where the location of the enable flag bit includes at least the following in the compressed data bitstream. One: sequence parameter set, image parameter set, strip header, CTU header, CU header, decoding block header.
可选地,所述预设的多种受限串模式分别用多个预设的值来表示,其中,一种受限串模式对应于一个预设的值k,每个所述解码块在压缩数据码流中都有一个直接、或间接、或直接间接混合的受限串模式标识码;在所述受限串模式标识码等于k的情况下,采用与k对应的一种受限串模式 对所述解码块进行串匹配解码。Optionally, the preset multiple restricted string modes are respectively represented by a plurality of preset values, wherein one restricted string mode corresponds to a preset value k, and each of the decoded blocks is The compressed data stream has a restricted string mode identification code directly, or indirectly, or directly indirectly mixed; when the restricted string mode identification code is equal to k, a restricted string corresponding to k is used. Mode Performing string matching decoding on the decoded block.
可选地,所述直接的受限串模式标识码由压缩数据码流中的一个或多个比特串所组成;所述间接的受限串模式标识码是从其他解码参数和/或压缩数据码流的其他语法元素导出的受限串模式标识码;所述直接间接混合的受限串模式标识码是部分直接和部分间接混合的受限串模式标识码。Optionally, the direct restricted string mode identification code is composed of one or more bit strings in the compressed data code stream; the indirect restricted string mode identification code is from other decoding parameters and/or compressed data. The restricted string mode identification code derived by other syntax elements of the code stream; the directly indirectly mixed restricted string mode identification code is a partially and partially indirectly mixed restricted string mode identification code.
可选地,用来表示所述解码块的受限串模式的受限串模式标识码语法元素以下列形式存在于所述解码块的压缩数据码流中:解码块头信息、受限串模式标识码、样值串或未匹配样值的语法元素;或,解码块头信息、部分受限串模式标识码、第一个样值串的部分语法元素、受限串模式标识码的其余部分、样值串或未匹配样值的语法元素;其中,采用与受限串模式标识码的取值对应的受限串模式对所述解码块进行串匹配解码。Optionally, the restricted string mode identification code syntax element used to represent the restricted string mode of the decoding block exists in the compressed data bitstream of the decoding block in the following form: decoding block header information, restricted string mode identifier a syntax element of a code, a sample string, or an unmatched sample; or, decoding block header information, a partially restricted string mode identification code, a partial syntax element of the first sample string, the remainder of the restricted string pattern identification code, A value string or a syntax element that does not match the sample; wherein the decoded block is subjected to string matching decoding using a restricted string mode corresponding to the value of the restricted string mode identification code.
根据本发明实施例的再一个方面,提供了一种数据压缩的解码装置,包括:解析模块,设置为解析压缩数据码流,获取受限串模式的信息;解码模块,设置为根据所述受限串模式的信息从预设的多种受限串模式中选择一种受限串模式对解码块进行串复制解码。According to still another aspect of the embodiments of the present invention, there is provided a data compression decoding apparatus, comprising: a parsing module configured to parse a compressed data code stream to obtain information of a restricted string mode; and a decoding module configured to be The information of the limited string mode selects one of the preset multiple string modes to perform a string copy decoding on the decoded block.
根据本发明的又一个实施例,还提供了一种存储介质。该存储介质设置为存储用于执行以下步骤的程序代码:According to still another embodiment of the present invention, a storage medium is also provided. The storage medium is arranged to store program code for performing the following steps:
自适应地从预设的多种受限串模式中选择一种受限串模式;根据选择的受限串模式对编码块进行串匹配编码得到使用所述选择的受限串模式进行编码的受限串的信息,以及使用所述选择的受限串模式进行编码的受限串的语法元素的压缩数据码流。Adaptively selecting a restricted string mode from a plurality of preset restricted string modes; performing string matching encoding on the coded block according to the selected restricted string mode to obtain encoding by using the selected restricted string mode A limited string of information, and a compressed data stream of syntax elements of the restricted string encoded using the selected restricted string mode.
根据本发明的又一个实施例,还提供了一种存储介质。该存储介质设置为存储用于执行以下步骤的程序代码:According to still another embodiment of the present invention, a storage medium is also provided. The storage medium is arranged to store program code for performing the following steps:
解析压缩数据码流,获取受限串模式的信息;根据所述受限串模式的信息从预设的多种受限串模式中选择一种受限串模式对解码块进行串复制解码。And parsing the compressed data code stream to obtain information of the restricted string mode; and selecting, according to the restricted string mode information, one of the preset multiple string modes to perform a string copy decoding on the decoded block.
通过本发明实施例,采用自适应地从预设的多种受限串模式中选择一 种受限串模式;进而根据选择的受限串模式对待压缩数据中的编码块进行串匹配编码得到使用选择的受限串模式进行编码的受限串的信息,以及使用选择的受限串模式进行编码的受限串的语法元素的压缩数据码流的方式,由于是从多种预设的受限串模式中选择一种受限串模式对待压缩数据中的编码块进行编码,进而可以减少对编码块进行编码的匹配参数,由于只有一种受串限模式也提高了编码过程中串的匹配精度,从而解决了相关技术中串匹配方式存在匹配参数较多以及消耗较多比特数对其进行编码的问题。Through an embodiment of the present invention, adaptively selecting one of a plurality of preset limited string modes a restricted string mode; further performing string matching encoding on the coded block in the compressed data according to the selected restricted string mode to obtain information of the restricted string encoded using the selected restricted string mode, and using the selected restricted string mode The manner of compressing the data stream of the encoded syntax element of the restricted string is performed by selecting a restricted string mode from a plurality of preset restricted string modes to encode the coded block in the data to be compressed, thereby reducing The matching parameters for encoding the coding block improve the matching precision of the string in the encoding process because only one type of the confined mode is matched, thereby solving the related art that the string matching method has more matching parameters and consumes more bits. The problem of coding.
附图说明DRAWINGS
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:The drawings described herein are intended to provide a further understanding of the invention, and are intended to be a part of the invention. In the drawing:
图1是根据本发明实施例的数据压缩的编码方法的流程图一;1 is a flowchart 1 of an encoding method of data compression according to an embodiment of the present invention;
图2是根据本发明实施例的数据压缩的解码方法的流程图二;2 is a second flowchart of a decoding method of data compression according to an embodiment of the present invention;
图3是根据本发明实施例的数据压缩的编码装置的结构框图一;3 is a structural block diagram 1 of an encoding apparatus for data compression according to an embodiment of the present invention;
图4是根据本发明实施例的数据压缩的解码装置的结构框图二。4 is a block diagram showing the structure of a decoding apparatus for data compression according to an embodiment of the present invention.
具体实施方式detailed description
下文中将参考附图并结合实施例来详细说明本发明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。The invention will be described in detail below with reference to the drawings in conjunction with the embodiments. It should be noted that the embodiments in the present application and the features in the embodiments may be combined with each other without conflict.
在本实施例中提供了一种数据压缩的编码方法,图1是根据本发明实施例的数据压缩的编码方法的流程图,如图1所示,该流程包括如下步骤:In this embodiment, a data compression coding method is provided. FIG. 1 is a flowchart of a data compression coding method according to an embodiment of the present invention. As shown in FIG. 1, the process includes the following steps:
步骤S102,自适应地从预设的多种受限串模式中选择一种受限串模式;Step S102, adaptively selecting a restricted string mode from a preset plurality of restricted string modes;
步骤S104,根据选择的受限串模式对编码块进行串匹配编码得到使用选择的受限串模式进行编码的受限串的信息,以及使用选择的受限串模 式进行编码的受限串的语法元素的压缩数据码流。Step S104, performing string matching encoding on the coding block according to the selected restricted string mode to obtain information of the restricted string encoded using the selected restricted string mode, and using the selected restricted string mode A compressed data stream of syntax elements of a restricted string that is encoded.
本实施例提供了一种采用多种受限串模式进行串匹配编码的数据压缩方法:在串匹配方式中,受限串是指受到预设约束条件的限制的串,使用受限串模式对编码块进行串匹配编码的过程中使用受到预约约束条件限制的串。通过本实施例,采用自适应地从预设的多种受限串模式中选择一种受限串模式来表示编码块采用了哪一种受限串模式,进而根据选择的受限串模式对待压缩数据中的编码块进行串匹配编码得到使用选择的受限串模式进行编码的受限串的信息,以及使用选择的受限串模式进行编码的受限串的语法元素的压缩数据码流的方式,由于是从多种预设的受限串模式中选择一种受限串模式对待压缩数据中的编码块进行编码,进而可以减少对编码块进行编码的匹配参数,由于只有一种受串限模式也就相应地提高了编码过程中串的匹配精度,从而解决了相关技术中串匹配方式存在匹配参数较多以及消耗较多比特数对其进行编码的问题。This embodiment provides a data compression method for performing string matching coding by using multiple restricted string modes. In the string matching mode, the restricted string refers to a string that is restricted by a preset constraint condition, and uses a restricted string mode pair. The coded block uses string constrained by the reservation constraint in the process of string matching encoding. With this embodiment, adaptively selecting a restricted string mode from a preset plurality of restricted string modes to indicate which restricted string mode is adopted by the coding block, and then treating according to the selected restricted string mode The coded block in the compressed data is subjected to string matching encoding to obtain information of the restricted string encoded using the selected restricted string mode, and the compressed data stream of the syntax element of the restricted string encoded using the selected restricted string mode In this manner, since a limited string mode is selected from a plurality of preset restricted string modes to encode a coded block in the compressed data, the matching parameter for encoding the coded block may be reduced, since only one type of string is encoded. The limit mode also improves the matching precision of the string in the encoding process, thereby solving the problem that the string matching method has more matching parameters and consumes more bits to encode the related art.
在本实施例的一个可选实施方式中,本实施例中涉及到的待压缩的数据至少包括以下之一:一维数据、二维数据、多维数据、图像、图像的序列、视频、音频、文件、字节的集合、比特的集合、像素的集合、像素分量的集合。In an optional implementation manner of this embodiment, the data to be compressed involved in the embodiment includes at least one of the following: one-dimensional data, two-dimensional data, multi-dimensional data, images, sequences of images, video, audio, A collection of files, bytes, a collection of bits, a collection of pixels, and a collection of pixel components.
另外,本实施例中的编码块为图像的编码区域,且本实施例中涉及到的编码块至少包括以下之一:图像、图像的子图像、宏块、最大编码单元LCU、编码树单元CTU、编码单元CU、CU的子区域、预测单元PU、变换单元TU。In addition, the coding block in this embodiment is an coding region of an image, and the coding block involved in this embodiment includes at least one of the following: an image, a sub-image of an image, a macroblock, a maximum coding unit LCU, and a coding tree unit CTU. a coding unit CU, a sub-area of the CU, a prediction unit PU, and a transform unit TU.
此外,本实施例中涉及到的受限串模式至少包括以下之一的条件:该受限串模式可以具有一个预设约束条件;该受限串模式可以具有多个预设约束条件;该受限串模式也可以不具有预设约束条件。当预设有多种受限串模式时,其中,该多种受限串模式对应的多个预设约束条件之中会存在的多个预设约束条件有重叠部分,或存在多个预设约束条件之中的多个预设约束条件无重叠部分,例如:预设有3种受限串模式时,第一种受限串 模式具有一个预设约束条件,第二种受限串模式具有两个预设约束条件,第三种受限串模式不具有预设约束条件,这样有可能第一种受限串模式与第二种受限串模式对应的预设约束条件会有重叠部分,或者有可能第二种受限串模式与第三种受限串模式对应的预设约束条件会没有重叠部分,但并不以此为限。In addition, the restricted string mode involved in this embodiment includes at least one of the following conditions: the restricted string mode may have a preset constraint; the restricted string mode may have multiple preset constraints; The string limit mode may also have no preset constraints. When a plurality of restricted string modes are preset, wherein a plurality of preset constraints that exist in the plurality of preset constraints corresponding to the plurality of restricted string modes have overlapping portions, or multiple presets exist Multiple preset constraints among the constraints have no overlapping parts, for example, when the three restricted string modes are pre-set, the first restricted string The mode has a preset constraint, the second restricted string mode has two preset constraints, and the third restricted string mode does not have a preset constraint, so that it is possible that the first restricted string mode and the second The preset constraint conditions corresponding to the restricted string mode may overlap, or there may be no overlap between the preset constraints corresponding to the second restricted string mode and the third restricted string mode, but not Limited.
本实施例中涉及到的受限串模式的预设约束条件由多个基本约束条件中的一个或多个组成,其中,与基本约束条件有关的因素包括:编码块中的参考样值、串的长度以及位移矢量、编码块的形状。The preset constraint condition of the restricted string mode involved in this embodiment is composed of one or more of a plurality of basic constraints, wherein the factors related to the basic constraint include: reference samples and strings in the coding block The length and the displacement vector, the shape of the coding block.
下面在本实施例的可选实施方式中,对上述与基本约束条件有关的因素进行举例说明:In the following optional embodiments of the embodiment, the above factors related to the basic constraints are exemplified:
与编码块中的参考样值有关的基本约束条件可以包括:The basic constraints associated with the reference samples in the coded block may include:
基本约束条件1:参考样值来自参考位置的一个预设范围的串的长度的取值有一个上限和/或一个下限;Basic Constraint 1: The reference sample has an upper limit and/or a lower limit for the length of the string from a preset range of the reference position;
在具体应用场景中,该基本约束条件1可以是:对于一个原始串(本实施例中涉及到的串),其参考串(即参考样值)是一个位于一个预设范围内的串,参考串可以以参考位置进行表示,符合上述特征的原始串的长度的取值为L,对于L,有一个上限和/或一个下限值。In a specific application scenario, the basic constraint 1 may be: for an original string (the string involved in this embodiment), the reference string (ie, the reference sample) is a string located within a preset range, and reference The string can be represented by a reference position, the length of the original string conforming to the above characteristics is L, and for L, there is an upper limit and/or a lower limit.
基本约束条件2:参考样值来自参考位置的一个预设范围的串的长度的取值限于一组预设的值;Basic constraint 2: The value of the length of the reference sample from a preset range of reference positions is limited to a set of preset values;
在具体应用场景中,该基本约束条件2与上述基本约束条件1基本相同,不同之处在于L的取值是一组预设的值中的某个值。In a specific application scenario, the basic constraint 2 is substantially the same as the basic constraint 1 described above, except that the value of L is a value of a set of preset values.
基本约束条件3:在一个编码块中,参考样值来自一个预设参考集或参考子集的串的数目有一个上限;Basic constraint 3: In a coding block, there is an upper limit on the number of reference samples from a preset reference set or a reference subset;
在具体应用场景中,该基本约束条件3可以是:对于一个原始串,其参考串是一个位于一个预设范围内的串,具有上述特征的原始串的长度的数量为N,N的取值有一个上限值。 In a specific application scenario, the basic constraint 3 may be: for an original string, the reference string is a string located within a preset range, and the number of lengths of the original string having the above feature is N, N. There is an upper limit.
基本约束条件4:一个编码块中,参考样值来自参考位置的一个预设范围的串的数目有一个上限。Basic Constraint 4: In a coded block, there is an upper limit on the number of strings in which the reference sample comes from a preset range of reference positions.
在具体应用场景中,该基本约束条件4与基本约束条件3类似,不同之处在于这里限定的是“串的数目”(有一个上限)而不是“参考样值”来自于一个“数目”。In a specific application scenario, the basic constraint 4 is similar to the basic constraint 3, except that the "number of strings" (with an upper limit) is defined here instead of "reference samples" from a "number".
与串的长度有关的基本约束条件可以包括:Basic constraints related to the length of the string can include:
基本约束条件5:串的长度等于编码块的样值的个数;Basic constraint 5: the length of the string is equal to the number of samples of the coding block;
基本约束条件6:串的长度等于编码块的样值的个数的二分之一;Basic constraint 6: the length of the string is equal to one-half of the number of samples of the coded block;
基本约束条件7:串的长度等于一个预设的值;Basic constraint 7: The length of the string is equal to a preset value;
基本约束条件8:串的长度的取值限于一组预设的值;Basic constraint 8: The value of the length of the string is limited to a set of preset values;
由上述基本约束条件5至8可知,串的长度可以是一个或一组预设的值,也可以是与编码块的样值有关,例如串的长度等于编码块的样值的个数、串的长度等于编码块的样值的个数的二分之一。It can be known from the above basic constraints 5 to 8 that the length of the string may be one or a set of preset values, or may be related to the samples of the coding block, for example, the length of the string is equal to the number of samples of the coding block, and the string. The length is equal to one-half of the number of samples of the encoded block.
与编码块的形状,以及与串的长度有关的基本约束条件可以包括:The basic constraints associated with the shape of the coding block and the length of the string may include:
基本约束条件9:编码块具有正方形的形状并且串的长度等于正方形的边长;Basic constraint 9: the coding block has a square shape and the length of the string is equal to the side length of the square;
基本约束条件10:编码块具有矩形的形状并且串的长度等于矩形的宽或高。Basic Constraint 10: The coded block has a rectangular shape and the length of the string is equal to the width or height of the rectangle.
与串的位移矢量、与编码块的形状、以及串长度和参考样值有关的基本约束条件可以包括:The basic constraints associated with the displacement vector of the string, the shape of the coding block, and the string length and reference samples may include:
基本约束条件11:串的位移矢量等于一个预设的值;Basic constraint 11: The displacement vector of the string is equal to a preset value;
基本约束条件12:串的位移矢量的取值限于一组预设的值;Basic constraint 12: The value of the displacement vector of the string is limited to a set of preset values;
基本约束条件13:编码块具有正方形的形状并且串的位移矢量在水平扫描时等于(0,1),在垂直扫描时等于(1,0),在转换为等价的一维偏移量后等于正方形的边长; Basic Constraint 13: The coded block has a square shape and the displacement vector of the string is equal to (0, 1) in horizontal scanning and equal to (1, 0) in vertical scanning, after conversion to an equivalent one-dimensional offset Equal to the side length of the square;
基本约束条件14:编码块具有矩形的形状并且串的位移矢量在水平扫描时等于(0,1),在垂直扫描时等于(1,0),在转换为等价的一维偏移量后等于矩形的宽或高;Basic constraint 14: The coding block has a rectangular shape and the displacement vector of the string is equal to (0, 1) in horizontal scanning and equal to (1, 0) in vertical scanning, after conversion to an equivalent one-dimensional offset Equal to the width or height of the rectangle;
基本约束条件15:串的长度的取值限于一个或一组预定的值,并且串的位移矢量的取值限于一个或一组预定的值;Basic constraint 15: the value of the length of the string is limited to one or a set of predetermined values, and the value of the displacement vector of the string is limited to one or a set of predetermined values;
基本约束条件16:串的长度等于1,即只有一个参考样值,而当前串的长度大于或等于1则所有当前样值都等于参考样值;Basic constraint 16: The length of the string is equal to 1, that is, there is only one reference sample, and the current string length is greater than or equal to 1, then all current samples are equal to the reference sample;
基本约束条件17:参考样值在当前块内部;Basic constraint 17: The reference sample is inside the current block;
基本约束条件18:编码块具有二维形状并且所有串的方向是垂直的且起点和终点都在块边界上;Basic constraint 18: The coding block has a two-dimensional shape and the directions of all the strings are vertical and the start and end points are on the block boundary;
基本约束条件19:编码块具有二维形状并且所有串的方向是水平的且起点和终点都在块边界上。Basic Constraint 19: The coded block has a two-dimensional shape and the direction of all strings is horizontal and both the start and end points are on the block boundary.
基于上述基本约束条件,本实施例中涉及到的受限串模式的预设约束条件可以由上述基本约束条件1至19中的一个或多个组合。Based on the above basic constraints, the preset constraint condition of the restricted string mode involved in the embodiment may be combined by one or more of the above basic constraints 1 to 19.
由上述基本约束条件可知,本实施例中的受限串是指受到预设基本约束条件的限制的串。在对一个编码块使用受限串匹配模式进行编码时,编码块的一种受限串模式是指所述编码块中的所有串都是受到一个或一组预设约束条件的限制的受限串。不同的受限串模式有不同的一个或一组预设约束条件。在一个或一组预设约束条件的限制下,可选的串的类型、种类、数目大为减少,从而匹配参数的数目和/或取值范围也大为减少,对其进行编码所需消耗的比特数也大为减少。It can be seen from the above basic constraints that the restricted string in this embodiment refers to a string that is restricted by a preset basic constraint. When encoding a coded block using a restricted string matching mode, a restricted string mode of the coded block means that all of the strings in the coded block are limited by one or a set of preset constraints. string. Different restricted string patterns have different one or a set of preset constraints. Under the limitation of one or a set of preset constraints, the type, type, and number of optional strings are greatly reduced, so that the number of matching parameters and/or the range of values are also greatly reduced, and the encoding is required to be consumed. The number of bits is also greatly reduced.
需要说明的是,基本约束条件1中的参考位置的一个预设范围是当前块所在CTU和邻近K个CTU组成的区域范围,串的长度的上限是32且预设的下限是1;基本约束条件3中的预设参考集或参考子集是主参考集,串的总数目的预设的上限是当前块的样值的总数目乘以一个分数M/N,M和N均为正整数。It should be noted that a preset range of the reference position in the basic constraint 1 is a range of the CTU and the adjacent K CTUs of the current block, and the upper limit of the length of the string is 32 and the preset lower limit is 1; the basic constraint The preset reference set or reference subset in Condition 3 is the primary reference set, and the preset upper limit of the total number of strings is the total number of samples of the current block multiplied by a fraction M/N, and both M and N are positive integers.
基于上述基本约束条件,在本实施例的一个可选实施方式中,预设的 多种受限串模式包括三种受限串模式:第一种受限串模式的预设约束条件包括基本约束条件1和基本约束条件3;第二种受限串模式的预设约束条件包括基本约束条件5和基本约束条件6;第三种受限串模式的预设约束条件包括基本约束条件13、基本约束条件16和基本约束条件17。Based on the above basic constraints, in an optional implementation manner of this embodiment, the preset The plurality of restricted string modes include three restricted string modes: a preset constraint of the first restricted string mode includes a basic constraint 1 and a basic constraint 3; and a preset constraint of the second restricted string mode includes: The basic constraint condition 5 and the basic constraint condition 6; the preset constraint condition of the third restricted string mode includes the basic constraint condition 13, the basic constraint condition 16, and the basic constraint condition 17.
在本实施例的另一个可选实施方式中预设的多种受限串模式包括四种受限串模式:第一种受限串模式的预设约束条件包括基本约束条件1和基本约束条件3;第二种受限串模式的预设约束条件包括基本约束条件5和基本约束条件6;第三种受限串模式的预设约束条件包括基本约束条件13、基本约束条件16和基本约束条件17;第四种受限串模式的预设约束条件包括基本约束条件18和基本约束条件19。In another alternative embodiment of this embodiment, the plurality of restricted string modes preset include four restricted string modes: the preset constraint conditions of the first restricted string mode include basic constraint 1 and basic constraints 3; the preset constraint condition of the second restricted string mode includes the basic constraint condition 5 and the basic constraint condition 6; the preset constraint condition of the third restricted string mode includes the basic constraint condition 13, the basic constraint condition 16 and the basic constraint condition Condition 17; the preset constraint of the fourth restricted string mode includes a basic constraint 18 and a basic constraint 19.
在本实施例的另一个可选实施方式中,在压缩数据码流中存在多种受限串模式串匹配方式的使能标志位,其中,使能标识位的位置在压缩数据码流中包括以下至少之一:序列参数集、图像参数集、条带头、CTU头、CU头、编码块头。In another optional implementation manner of this embodiment, there are multiple enabled string mode matching manner enable flag bits in the compressed data bitstream, where the location of the enable flag bit is included in the compressed data bitstream. At least one of the following: sequence parameter set, image parameter set, slice header, CTU header, CU header, coding block header.
对于该使能标志位,在采用多种受限串模式对编码块进行串匹配模式的编码时,在编码块的头信息中用直接或间接的标识码来表示当前块采用了哪一种受限串模式,就可以自适应地根据编解码块的数据特性选择一种最优的受限串模式,既可以达到很高的串匹配精度,又可以减少消耗的比特数,大大提高编码效率。For the enable flag bit, when encoding the coded block in the string matching mode by using multiple restricted string modes, the direct or indirect identification code is used in the header information of the coded block to indicate which one of the current block is used. In the limited string mode, an optimal constrained string mode can be adaptively selected according to the data characteristics of the codec block, which can achieve high string matching precision, reduce the number of consumed bits, and greatly improve coding efficiency.
此外,对于本实施例中涉及到额预设的多种受限串模式分别用多个预设的值来表示,其中,一种受限串模式对应于一个预设的值k,编码块在压缩数据码流中都有一个直接或间接或直接间接混合的受限串模式标识码;在受限串模式标识码等于k的情况下,采用与k对应的一种受限串模式对编码块进行串匹配编码。In addition, the multiple restricted string modes related to the preset amount in the embodiment are respectively represented by a plurality of preset values, wherein one restricted string mode corresponds to a preset value k, and the coded block is The compressed data stream has a restricted string mode identification code directly or indirectly or directly indirectly mixed; in the case where the restricted string mode identification code is equal to k, a restricted string mode pair coding block corresponding to k is used. Perform string matching encoding.
其中,直接的受限串模式标识码由压缩数据码流中的一个或多个比特串所组成;间接的受限串模式标识码是从其他编码参数和/或压缩数据码流的其他语法元素导出的受限串模式标识码;直接间接混合的受限串模式标 识码是部分直接和部分间接混合的受限串模式标识码;该k为正整数。Wherein the direct restricted string mode identification code is composed of one or more bit strings in the compressed data code stream; the indirect restricted string mode identification code is other syntax elements from other coding parameters and/or compressed data code streams. Derived restricted string mode identification code; direct indirect mixed restricted string mode The identification code is a restricted string mode identification code that is partially and partially indirectly mixed; the k is a positive integer.
需要说明的是,本实施例中涉及到的用来表示编码块的受限串模式的受限串模式标识码语法元素以下列形式存在于编码块的压缩数据码流中:It should be noted that the restricted string mode identification code syntax element used in the embodiment to represent the restricted string mode of the coding block exists in the compressed data code stream of the coding block in the following form:
编码块头信息、受限串模式标识码、样值串或未匹配样值的语法元素;或,编码块头信息、部分受限串模式标识码、第一个样值串的部分语法元素、受限串模式标识码的其余部分、样值串或未匹配样值的语法元素;其中,采用与受限串模式标识码的取值对应的受限串模式对编码块进行串匹配编码。a syntax element that encodes block header information, a restricted string mode identification code, a sample string, or an unmatched sample; or, a coded block header information, a partially restricted string mode identification code, a partial syntax element of the first sample string, or a restricted The syntax element of the remaining part of the string pattern identification code, the sample string or the unmatched sample; wherein the coded block is subjected to string matching encoding by using the restricted string mode corresponding to the value of the restricted string mode identification code.
实施例2Example 2
图2是根据本发明实施例的数据压缩的解码方法流程图,如图2所示,该方法的步骤包括:2 is a flowchart of a decoding method of data compression according to an embodiment of the present invention. As shown in FIG. 2, the steps of the method include:
步骤S202:解析压缩数据码流,获取受限串模式的信息;Step S202: Parsing the compressed data code stream to obtain information of the restricted string mode;
步骤S204:根据受限串模式的信息从预设的多种受限串模式中选择一种受限串模式对解码块进行串复制解码。Step S204: Perform string copy decoding on the decoded block by selecting a restricted string mode from a preset plurality of restricted string modes according to the information of the restricted string mode.
在本实施例的一个可选实施方式中,本实施例中涉及到的待解压的数据至少包括以下之一:一维数据、二维数据、多维数据、图像、图像的序列、视频、音频、文件、字节的集合、比特的集合、像素的集合、像素分量的集合。In an optional implementation manner of this embodiment, the data to be decompressed in this embodiment includes at least one of the following: one-dimensional data, two-dimensional data, multi-dimensional data, images, sequences of images, video, audio, A collection of files, bytes, a collection of bits, a collection of pixels, and a collection of pixel components.
另外,本实施例中的编码块为图像的编码区域,且本实施例中涉及到的编码块至少包括以下之一:图像、图像的子图像、宏块、最大编码单元LCU、编码树单元CTU、编码单元CU、CU的子区域、预测单元PU、变换单元TU。In addition, the coding block in this embodiment is an coding region of an image, and the coding block involved in this embodiment includes at least one of the following: an image, a sub-image of an image, a macroblock, a maximum coding unit LCU, and a coding tree unit CTU. a coding unit CU, a sub-area of the CU, a prediction unit PU, and a transform unit TU.
此外,本实施例中涉及到的受限串模式至少包括以下之一的条件:该受限串模式可以具有一个预设约束条件;该受限串模式可以具有多个预设约束条件;该受限串模式也可以不具有预设约束条件。当预设有多种受限串模式时,其中,该多种受限串模式对应的多个预设约束条件之中会存在的多个预设约束条件有重叠部分,或存在多个预设约束条件之中的多个预 设约束条件无重叠部分,例如:预设有3种受限串模式时,第一种受限串模式具有一个预设约束条件,第二种受限串模式具有两个预设约束条件,第三种受限串模式不具有预设约束条件,这样有可能第一种受限串模式与第二种受限串模式对应的预设约束条件会有重叠部分,或者有可能第二种受限串模式与第三种受限串模式对应的预设约束条件会没有重叠部分,但并不以此为限。In addition, the restricted string mode involved in this embodiment includes at least one of the following conditions: the restricted string mode may have a preset constraint; the restricted string mode may have multiple preset constraints; The string limit mode may also have no preset constraints. When a plurality of restricted string modes are preset, wherein a plurality of preset constraints that exist in the plurality of preset constraints corresponding to the plurality of restricted string modes have overlapping portions, or multiple presets exist Multiple pre-conditions Let the constraint have no overlapping parts. For example, when there are three restricted string modes, the first restricted string mode has one preset constraint, and the second restricted string mode has two preset constraints. The three restricted string modes do not have preset constraints, so that it is possible that the first restricted string mode and the second restricted string mode have overlapping portions, or may be the second limited. The preset constraint corresponding to the string mode and the third restricted string mode has no overlap, but is not limited thereto.
本实施例中涉及到的受限串模式的预设约束条件由多个基本约束条件中的一个或多个组成,其中,与基本约束条件有关的因素包括:编码块中的参考样值、串的长度以及位移矢量、编码块的形状。The preset constraint condition of the restricted string mode involved in this embodiment is composed of one or more of a plurality of basic constraints, wherein the factors related to the basic constraint include: reference samples and strings in the coding block The length and the displacement vector, the shape of the coding block.
下面在本实施例的可选实施方式中,对上述与基本约束条件有关的因素进行举例说明:In the following optional embodiments of the embodiment, the above factors related to the basic constraints are exemplified:
与编码块中的参考样值有关的基本约束条件可以包括:The basic constraints associated with the reference samples in the coded block may include:
基本约束条件1:参考样值来自参考位置的一个预设范围的串的长度的取值有一个上限和/或一个下限;Basic Constraint 1: The reference sample has an upper limit and/or a lower limit for the length of the string from a preset range of the reference position;
在具体应用场景中,该基本约束条件1可以是:对于一个原始串(本实施例中涉及到的串),其参考串(即参考样值)是一个位于一个预设范围内的串,参考串可以以参考位置进行表示,符合上述特征的原始串的长度的取值为L,对于L,有一个上限和/或一个下限值。In a specific application scenario, the basic constraint 1 may be: for an original string (the string involved in this embodiment), the reference string (ie, the reference sample) is a string located within a preset range, and reference The string can be represented by a reference position, the length of the original string conforming to the above characteristics is L, and for L, there is an upper limit and/or a lower limit.
基本约束条件2:参考样值来自参考位置的一个预设范围的串的长度的取值限于一组预设的值;Basic constraint 2: The value of the length of the reference sample from a preset range of reference positions is limited to a set of preset values;
在具体应用场景中,该基本约束条件2与上述基本约束条件1基本相同,不同之处在于L的取值是一组预设的值中的某个值。In a specific application scenario, the basic constraint 2 is substantially the same as the basic constraint 1 described above, except that the value of L is a value of a set of preset values.
基本约束条件3:在一个编码块中,参考样值来自一个预设参考集或参考子集的串的数目有一个上限;Basic constraint 3: In a coding block, there is an upper limit on the number of reference samples from a preset reference set or a reference subset;
在具体应用场景中,该基本约束条件3可以是:对于一个原始串,其参考串是一个位于一个预设范围内的串,具有上述特征的原始串的长度的数量为N,N的取值有一个上限值。 In a specific application scenario, the basic constraint 3 may be: for an original string, the reference string is a string located within a preset range, and the number of lengths of the original string having the above feature is N, N. There is an upper limit.
基本约束条件4:一个编码块中,参考样值来自参考位置的一个预设范围的串的数目有一个上限。Basic Constraint 4: In a coded block, there is an upper limit on the number of strings in which the reference sample comes from a preset range of reference positions.
在具体应用场景中,该基本约束条件4与基本约束条件3类似,不同之处在于这里限定的是“串的数目”(有一个上限)而不是“参考样值”来自于一个“数目”。In a specific application scenario, the basic constraint 4 is similar to the basic constraint 3, except that the "number of strings" (with an upper limit) is defined here instead of "reference samples" from a "number".
与串的长度有关的基本约束条件可以包括:Basic constraints related to the length of the string can include:
基本约束条件5:串的长度等于编码块的样值的个数;Basic constraint 5: the length of the string is equal to the number of samples of the coding block;
基本约束条件6:串的长度等于编码块的样值的个数的二分之一;Basic constraint 6: the length of the string is equal to one-half of the number of samples of the coded block;
基本约束条件7:串的长度等于一个预设的值;Basic constraint 7: The length of the string is equal to a preset value;
基本约束条件8:串的长度的取值限于一组预设的值;Basic constraint 8: The value of the length of the string is limited to a set of preset values;
由上述基本约束条件5至8可知,串的长度可以是一个或一组预设的值,也可以是与编码块的样值有关,例如串的长度等于编码块的样值的个数、串的长度等于编码块的样值的个数的二分之一。It can be known from the above basic constraints 5 to 8 that the length of the string may be one or a set of preset values, or may be related to the samples of the coding block, for example, the length of the string is equal to the number of samples of the coding block, and the string. The length is equal to one-half of the number of samples of the encoded block.
与编码块的形状,以及与串的长度有关的基本约束条件可以包括:The basic constraints associated with the shape of the coding block and the length of the string may include:
基本约束条件9:编码块具有正方形的形状并且串的长度等于正方形的边长;Basic constraint 9: the coding block has a square shape and the length of the string is equal to the side length of the square;
基本约束条件10:编码块具有矩形的形状并且串的长度等于矩形的宽或高。Basic Constraint 10: The coded block has a rectangular shape and the length of the string is equal to the width or height of the rectangle.
与串的位移矢量、与编码块的形状、以及串长度和参考样值有关的基本约束条件可以包括:The basic constraints associated with the displacement vector of the string, the shape of the coding block, and the string length and reference samples may include:
基本约束条件11:串的位移矢量等于一个预设的值;Basic constraint 11: The displacement vector of the string is equal to a preset value;
基本约束条件12:串的位移矢量的取值限于一组预设的值;Basic constraint 12: The value of the displacement vector of the string is limited to a set of preset values;
基本约束条件13:编码块具有正方形的形状并且串的位移矢量在水平扫描时等于(0,1),在垂直扫描时等于(1,0),在转换为等价的一维偏移量后等于正方形的边长; Basic Constraint 13: The coded block has a square shape and the displacement vector of the string is equal to (0, 1) in horizontal scanning and equal to (1, 0) in vertical scanning, after conversion to an equivalent one-dimensional offset Equal to the side length of the square;
基本约束条件14:编码块具有矩形的形状并且串的位移矢量在水平扫描时等于(0,1),在垂直扫描时等于(1,0),在转换为等价的一维偏移量后等于矩形的宽或高;Basic constraint 14: The coding block has a rectangular shape and the displacement vector of the string is equal to (0, 1) in horizontal scanning and equal to (1, 0) in vertical scanning, after conversion to an equivalent one-dimensional offset Equal to the width or height of the rectangle;
基本约束条件15:串的长度的取值限于一个或一组预定的值,并且串的位移矢量的取值限于一个或一组预定的值;Basic constraint 15: the value of the length of the string is limited to one or a set of predetermined values, and the value of the displacement vector of the string is limited to one or a set of predetermined values;
基本约束条件16:参考串的长度等于1,即只有一个参考样值,而当前串的长度大于或等于1并且所有当前样值都等于参考样值;Basic constraint 16: The length of the reference string is equal to 1, ie there is only one reference sample, and the length of the current string is greater than or equal to 1 and all current samples are equal to the reference sample;
基本约束条件17:参考样值在当前块内部;Basic constraint 17: The reference sample is inside the current block;
基本约束条件18:编码块具有二维形状并且所有串的方向是垂直的且起点和终点都在块边界上;Basic constraint 18: The coding block has a two-dimensional shape and the directions of all the strings are vertical and the start and end points are on the block boundary;
基本约束条件19:编码块具有二维形状并且所有串的方向是水平的且起点和终点都在块边界上。Basic Constraint 19: The coded block has a two-dimensional shape and the direction of all strings is horizontal and both the start and end points are on the block boundary.
基于上述基本约束条件,本实施例中涉及到的受限串模式的预设约束条件可以由上述基本约束条件1至19中的一个或多个组合。Based on the above basic constraints, the preset constraint condition of the restricted string mode involved in the embodiment may be combined by one or more of the above basic constraints 1 to 19.
由上述基本约束条件可知,本实施例中的受限串是指受到预设基本约束条件的限制的串。在对一个编码块使用受限串匹配模式进行编码时,编码块的一种受限串模式是指所述编码块中的所有串都是受到一个或一组预设约束条件的限制的受限串。不同的受限串模式有不同的一个或一组预设约束条件。在一个或一组预设约束条件的限制下,可选的串的类型、种类、数目大为减少,从而匹配参数的数目和/或取值范围也大为减少,对其进行编码所需消耗的比特数也大为减少。It can be seen from the above basic constraints that the restricted string in this embodiment refers to a string that is restricted by a preset basic constraint. When encoding a coded block using a restricted string matching mode, a restricted string mode of the coded block means that all of the strings in the coded block are limited by one or a set of preset constraints. string. Different restricted string patterns have different one or a set of preset constraints. Under the limitation of one or a set of preset constraints, the type, type, and number of optional strings are greatly reduced, so that the number of matching parameters and/or the range of values are also greatly reduced, and the encoding is required to be consumed. The number of bits is also greatly reduced.
需要说明的是,基本约束条件1中的参考位置的一个预设范围是当前块所在CTU和邻近K个CTU组成的区域范围,串的长度的上限是32且预设的下限是1;基本约束条件3中的预设参考集或参考子集是主参考集,串的总数目的预设的上限是当前块的样值的总数目乘以一个分数M/N,M和N均为正整数。It should be noted that a preset range of the reference position in the basic constraint 1 is a range of the CTU and the adjacent K CTUs of the current block, and the upper limit of the length of the string is 32 and the preset lower limit is 1; the basic constraint The preset reference set or reference subset in Condition 3 is the primary reference set, and the preset upper limit of the total number of strings is the total number of samples of the current block multiplied by a fraction M/N, and both M and N are positive integers.
基于上述基本约束条件,在本实施例的一个可选实施方式中,预设的 多种受限串模式包括三种受限串模式:第一种受限串模式的预设约束条件包括基本约束条件1和基本约束条件3;第二种受限串模式的预设约束条件包括基本约束条件5和基本约束条件6;第三种受限串模式的预设约束条件包括基本约束条件13、基本约束条件16和基本约束条件17。Based on the above basic constraints, in an optional implementation manner of this embodiment, the preset The plurality of restricted string modes include three restricted string modes: a preset constraint of the first restricted string mode includes a basic constraint 1 and a basic constraint 3; and a preset constraint of the second restricted string mode includes: The basic constraint condition 5 and the basic constraint condition 6; the preset constraint condition of the third restricted string mode includes the basic constraint condition 13, the basic constraint condition 16, and the basic constraint condition 17.
在本实施例的另一个可选实施方式中预设的多种受限串模式包括四种受限串模式:第一种受限串模式的预设约束条件包括基本约束条件1和基本约束条件3;第二种受限串模式的预设约束条件包括基本约束条件5和基本约束条件6;第三种受限串模式的预设约束条件包括基本约束条件13、基本约束条件16和基本约束条件17;第四种受限串模式的预设约束条件包括基本约束条件18和基本约束条件19。In another alternative embodiment of this embodiment, the plurality of restricted string modes preset include four restricted string modes: the preset constraint conditions of the first restricted string mode include basic constraint 1 and basic constraints 3; the preset constraint condition of the second restricted string mode includes the basic constraint condition 5 and the basic constraint condition 6; the preset constraint condition of the third restricted string mode includes the basic constraint condition 13, the basic constraint condition 16 and the basic constraint condition Condition 17; the preset constraint of the fourth restricted string mode includes a basic constraint 18 and a basic constraint 19.
在本实施例的另一个可选实施方式中,在解压数据码流中存在多种受限串模式串匹配方式的使能标志位,其中,使能标识位的位置在解压数据码流中包括以下至少之一:序列参数集、图像参数集、条带头、CTU头、CU头、编码块头。In another optional implementation manner of this embodiment, there are multiple enabled string mode matching manner enable flag bits in the decompressed data bitstream, where the location of the enable flag bit is included in the decompressed data bitstream. At least one of the following: sequence parameter set, image parameter set, slice header, CTU header, CU header, coding block header.
对于该使能标志位,在采用多种受限串模式对编码块进行串匹配模式的编码时,在编码块的头信息中用直接或间接的标识码来表示当前块采用了哪一种受限串模式,就可以自适应地根据编解码块的数据特性选择一种最优的受限串模式,既可以达到很高的串匹配精度,又可以减少消耗的比特数,大大提高编码效率。For the enable flag bit, when encoding the coded block in the string matching mode by using multiple restricted string modes, the direct or indirect identification code is used in the header information of the coded block to indicate which one of the current block is used. In the limited string mode, an optimal constrained string mode can be adaptively selected according to the data characteristics of the codec block, which can achieve high string matching precision, reduce the number of consumed bits, and greatly improve coding efficiency.
此外,对于本实施例中涉及到额预设的多种受限串模式分别用多个预设的值来表示,其中,一种受限串模式对应于一个预设的值k,编码块在解压数据码流中都有一个直接或间接或直接间接混合的受限串模式标识码;在受限串模式标识码等于k的情况下,采用与k对应的一种受限串模式对编码块进行串匹配编码。In addition, the multiple restricted string modes related to the preset amount in the embodiment are respectively represented by a plurality of preset values, wherein one restricted string mode corresponds to a preset value k, and the coded block is The decompressed data stream has a restricted string mode identification code directly or indirectly or directly indirectly mixed; in the case where the restricted string mode identification code is equal to k, a restricted string mode pair coding block corresponding to k is used. Perform string matching encoding.
其中,直接的受限串模式标识码由解压数据码流中的一个或多个比特串所组成;间接的受限串模式标识码是从其他编码参数和/或解压数据码流的其他语法元素导出的受限串模式标识码;直接间接混合的受限串模式标 识码是部分直接和部分间接混合的受限串模式标识码;该k为正整数。Wherein the direct restricted string mode identification code is composed of one or more bit strings in the decompressed data code stream; the indirect restricted string mode identification code is other syntax elements from other coding parameters and/or decompressed data stream. Derived restricted string mode identification code; direct indirect mixed restricted string mode The identification code is a restricted string mode identification code that is partially and partially indirectly mixed; the k is a positive integer.
需要说明的是,本实施例中涉及到的用来表示编码块的受限串模式的受限串模式标识码语法元素以下列形式存在于编码块的解压数据码流中:It should be noted that the restricted string mode identification code syntax element used in the embodiment to represent the restricted string mode of the coding block exists in the decompressed data bitstream of the coding block in the following form:
编码块头信息、受限串模式标识码、样值串或未匹配样值的语法元素;或,编码块头信息、部分受限串模式标识码、第一个样值串的部分语法元素、受限串模式标识码的其余部分、样值串或未匹配样值的语法元素;其中,采用与受限串模式标识码的取值对应的受限串模式对编码块进行串匹配编码。a syntax element that encodes block header information, a restricted string mode identification code, a sample string, or an unmatched sample; or, a coded block header information, a partially restricted string mode identification code, a partial syntax element of the first sample string, or a restricted The syntax element of the remaining part of the string pattern identification code, the sample string or the unmatched sample; wherein the coded block is subjected to string matching encoding by using the restricted string mode corresponding to the value of the restricted string mode identification code.
需要说明的是,实施例2是与实施例1编码方法相对应的解码方法。It should be noted that the second embodiment is a decoding method corresponding to the encoding method of the first embodiment.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本发明各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware, but in many cases, the former is A better implementation. Based on such understanding, the technical solution of the present invention, which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk, The optical disc includes a number of instructions for causing a terminal device (which may be a cell phone, a computer, a server, or a network device, etc.) to perform the methods described in various embodiments of the present invention.
实施例3Example 3
在本实施例中还提供了一种数据压缩的编码装置,该装置用于实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预设功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。An encoding device for data compression is also provided in this embodiment, and the device is used to implement the foregoing embodiments and preferred embodiments, and details are not described herein. As used below, the term "module" may implement a combination of software and/or hardware of a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware, is also possible and contemplated.
图3是根据本发明实施例的数据压缩的编码装置的结构框图,如图3所示,该装置包括:选择模块32,设置为自适应地从预设的多种受限串模式中选择一种受限串模式;编码模块34,与选择模块32耦合链接,设置 为根据选择的受限串模式对编码块进行串匹配编码得到使用选择的受限串模式进行编码的受限串的信息,以及使用选择的受限串模式进行编码的受限串的语法元素的压缩数据码流。3 is a structural block diagram of an encoding apparatus for data compression according to an embodiment of the present invention. As shown in FIG. 3, the apparatus includes: a selecting module 32 configured to adaptively select one of a plurality of preset limited string modes. Limited string mode; encoding module 34, coupled with the selection module 32, set Performing string matching encoding on the coded block according to the selected restricted string mode results in information of the restricted string encoded using the selected restricted string mode, and syntax elements of the restricted string encoded using the selected restricted string mode Compress the data stream.
在本实施例的一个可选实施方式中,本实施例中涉及到的待压缩的数据至少包括以下之一:一维数据、二维数据、多维数据、图像、图像的序列、视频、音频、文件、字节的集合、比特的集合、像素的集合、像素分量的集合。In an optional implementation manner of this embodiment, the data to be compressed involved in the embodiment includes at least one of the following: one-dimensional data, two-dimensional data, multi-dimensional data, images, sequences of images, video, audio, A collection of files, bytes, a collection of bits, a collection of pixels, and a collection of pixel components.
另外,本实施例中的编码块为图像的编码区域,且本实施例中涉及到的编码块至少包括以下之一:图像、图像的子图像、宏块、最大编码单元LCU、编码树单元CTU、编码单元CU、CU的子区域、预测单元PU、变换单元TU。In addition, the coding block in this embodiment is an coding region of an image, and the coding block involved in this embodiment includes at least one of the following: an image, a sub-image of an image, a macroblock, a maximum coding unit LCU, and a coding tree unit CTU. a coding unit CU, a sub-area of the CU, a prediction unit PU, and a transform unit TU.
此外,本实施例中涉及到的受限串模式至少包括以下之一的条件:该受限串模式可以具有一个预设约束条件;该受限串模式可以具有多个预设约束条件;该受限串模式也可以不具有预设约束条件。当预设有多种受限串模式时,其中,该多种受限串模式对应的多个预设约束条件之中会存在的多个预设约束条件有重叠部分,或存在多个预设约束条件之中的多个预设约束条件无重叠部分,例如:预设有3种受限串模式时,第一种受限串模式具有一个预设约束条件,第二种受限串模式具有两个预设约束条件,第三种受限串模式不具有预设约束条件,这样有可能第一种受限串模式与第二种受限串模式对应的预设约束条件会有重叠部分,或者有可能第二种受限串模式与第三种受限串模式对应的预设约束条件会没有重叠部分,但并不以此为限。In addition, the restricted string mode involved in this embodiment includes at least one of the following conditions: the restricted string mode may have a preset constraint; the restricted string mode may have multiple preset constraints; The string limit mode may also have no preset constraints. When a plurality of restricted string modes are preset, wherein a plurality of preset constraints that exist in the plurality of preset constraints corresponding to the plurality of restricted string modes have overlapping portions, or multiple presets exist The plurality of preset constraints in the constraint have no overlapping portion. For example, when three restricted string modes are preset, the first restricted string mode has a preset constraint condition, and the second restricted string mode has Two preset constraints, the third restricted string mode does not have a preset constraint, so that it is possible that the first constraint type of the first restricted string mode and the second restricted string mode overlap. Or it is possible that the second restricted string mode and the third restricted string mode corresponding preset constraints have no overlapping parts, but are not limited thereto.
本实施例中涉及到的受限串模式的预设约束条件由多个基本约束条件中的一个或多个组成,其中,与基本约束条件有关的因素包括:编码块中的参考样值、串的长度以及位移矢量、编码块的形状。The preset constraint condition of the restricted string mode involved in this embodiment is composed of one or more of a plurality of basic constraints, wherein the factors related to the basic constraint include: reference samples and strings in the coding block The length and the displacement vector, the shape of the coding block.
下面在本实施例的可选实施方式中,对上述与基本约束条件有关的因素进行举例说明: In the following optional embodiments of the embodiment, the above factors related to the basic constraints are exemplified:
与编码块中的参考样值有关的基本约束条件可以包括:The basic constraints associated with the reference samples in the coded block may include:
基本约束条件1:参考样值来自参考位置的一个预设范围的串的长度的取值有一个上限和/或一个下限;Basic Constraint 1: The reference sample has an upper limit and/or a lower limit for the length of the string from a preset range of the reference position;
在具体应用场景中,该基本约束条件1可以是:对于一个原始串(本实施例中涉及到的串),其参考串(即参考样值)是一个位于一个预设范围内的串,参考串可以以参考位置进行表示,符合上述特征的原始串的长度的取值为L,对于L,有一个上限和/或一个下限值。In a specific application scenario, the basic constraint 1 may be: for an original string (the string involved in this embodiment), the reference string (ie, the reference sample) is a string located within a preset range, and reference The string can be represented by a reference position, the length of the original string conforming to the above characteristics is L, and for L, there is an upper limit and/or a lower limit.
基本约束条件2:参考样值来自参考位置的一个预设范围的串的长度的取值限于一组预设的值;Basic constraint 2: The value of the length of the reference sample from a preset range of reference positions is limited to a set of preset values;
在具体应用场景中,该基本约束条件2与上述基本约束条件1基本相同,不同之处在于L的取值是一组预设的值中的某个值。In a specific application scenario, the basic constraint 2 is substantially the same as the basic constraint 1 described above, except that the value of L is a value of a set of preset values.
基本约束条件3:在一个编码块中,参考样值来自一个预设参考集或参考子集的串的数目有一个上限;Basic constraint 3: In a coding block, there is an upper limit on the number of reference samples from a preset reference set or a reference subset;
在具体应用场景中,该基本约束条件3可以是:对于一个原始串,其参考串是一个位于一个预设范围内的串,具有上述特征的原始串的长度的数量为N,N的取值有一个上限值。In a specific application scenario, the basic constraint 3 may be: for an original string, the reference string is a string located within a preset range, and the number of lengths of the original string having the above feature is N, N. There is an upper limit.
基本约束条件4:一个编码块中,参考样值来自参考位置的一个预设范围的串的数目有一个上限。Basic Constraint 4: In a coded block, there is an upper limit on the number of strings in which the reference sample comes from a preset range of reference positions.
在具体应用场景中,该基本约束条件4与基本约束条件3类似,不同之处在于这里限定的是“串的数目”(有一个上限)而不是“参考样值”来自于一个“数目”。In a specific application scenario, the basic constraint 4 is similar to the basic constraint 3, except that the "number of strings" (with an upper limit) is defined here instead of "reference samples" from a "number".
与串的长度有关的基本约束条件可以包括:Basic constraints related to the length of the string can include:
基本约束条件5:串的长度等于编码块的样值的个数;Basic constraint 5: the length of the string is equal to the number of samples of the coding block;
基本约束条件6:串的长度等于编码块的样值的个数的二分之一;Basic constraint 6: the length of the string is equal to one-half of the number of samples of the coded block;
基本约束条件7:串的长度等于一个预设的值;Basic constraint 7: The length of the string is equal to a preset value;
基本约束条件8:串的长度的取值限于一组预设的值; Basic constraint 8: The value of the length of the string is limited to a set of preset values;
由上述基本约束条件5至8可知,串的长度可以是一个或一组预设的值,也可以是与编码块的样值有关,例如串的长度等于编码块的样值的个数、串的长度等于编码块的样值的个数的二分之一。It can be known from the above basic constraints 5 to 8 that the length of the string may be one or a set of preset values, or may be related to the samples of the coding block, for example, the length of the string is equal to the number of samples of the coding block, and the string. The length is equal to one-half of the number of samples of the encoded block.
与编码块的形状,以及与串的长度有关的基本约束条件可以包括:The basic constraints associated with the shape of the coding block and the length of the string may include:
基本约束条件9:编码块具有正方形的形状并且串的长度等于正方形的边长;Basic constraint 9: the coding block has a square shape and the length of the string is equal to the side length of the square;
基本约束条件10:编码块具有矩形的形状并且串的长度等于矩形的宽或高。Basic Constraint 10: The coded block has a rectangular shape and the length of the string is equal to the width or height of the rectangle.
与串的位移矢量、与编码块的形状、以及串长度和参考样值有关的基本约束条件可以包括:The basic constraints associated with the displacement vector of the string, the shape of the coding block, and the string length and reference samples may include:
基本约束条件11:串的位移矢量等于一个预设的值;Basic constraint 11: The displacement vector of the string is equal to a preset value;
基本约束条件12:串的位移矢量的取值限于一组预设的值;Basic constraint 12: The value of the displacement vector of the string is limited to a set of preset values;
基本约束条件13:编码块具有正方形的形状并且串的位移矢量在水平扫描时等于(0,1),在垂直扫描时等于(1,0),在转换为等价的一维偏移量后等于正方形的边长;Basic Constraint 13: The coded block has a square shape and the displacement vector of the string is equal to (0, 1) in horizontal scanning and equal to (1, 0) in vertical scanning, after conversion to an equivalent one-dimensional offset Equal to the side length of the square;
基本约束条件14:编码块具有矩形的形状并且串的位移矢量在水平扫描时等于(0,1),在垂直扫描时等于(1,0),在转换为等价的一维偏移量后等于矩形的宽或高;Basic constraint 14: The coding block has a rectangular shape and the displacement vector of the string is equal to (0, 1) in horizontal scanning and equal to (1, 0) in vertical scanning, after conversion to an equivalent one-dimensional offset Equal to the width or height of the rectangle;
基本约束条件15:串的长度的取值限于一个或一组预定的值,并且串的位移矢量的取值限于一个或一组预定的值;Basic constraint 15: the value of the length of the string is limited to one or a set of predetermined values, and the value of the displacement vector of the string is limited to one or a set of predetermined values;
基本约束条件16:参考串的长度等于1,即只有一个参考样值,而当前串的长度大于或等于1并且所有当前样值都等于参考样值;Basic constraint 16: The length of the reference string is equal to 1, ie there is only one reference sample, and the length of the current string is greater than or equal to 1 and all current samples are equal to the reference sample;
基本约束条件17:参考样值在当前块内部;Basic constraint 17: The reference sample is inside the current block;
基本约束条件18:编码块具有二维形状并且所有串的方向是垂直的且起点和终点都在块边界上;Basic constraint 18: The coding block has a two-dimensional shape and the directions of all the strings are vertical and the start and end points are on the block boundary;
基本约束条件19:编码块具有二维形状并且所有串的方向是水平的且 起点和终点都在块边界上。Basic constraint 19: The coding block has a two-dimensional shape and the direction of all the strings is horizontal and Both the start and end points are on the block boundary.
基于上述基本约束条件,本实施例中涉及到的受限串模式的预设约束条件可以由上述基本约束条件1至19中的一个或多个组合。Based on the above basic constraints, the preset constraint condition of the restricted string mode involved in the embodiment may be combined by one or more of the above basic constraints 1 to 19.
由上述基本约束条件可知,本实施例中的受限串是指受到预设基本约束条件的限制的串。在对一个编码块使用受限串匹配模式进行编码时,编码块的一种受限串模式是指所述编码块中的所有串都是受到一个或一组预设约束条件的限制的受限串。不同的受限串模式有不同的一个或一组预设约束条件。在一个或一组预设约束条件的限制下,可选的串的类型、种类、数目大为减少,从而匹配参数的数目和/或取值范围也大为减少,对其进行编码所需消耗的比特数也大为减少。It can be seen from the above basic constraints that the restricted string in this embodiment refers to a string that is restricted by a preset basic constraint. When encoding a coded block using a restricted string matching mode, a restricted string mode of the coded block means that all of the strings in the coded block are limited by one or a set of preset constraints. string. Different restricted string patterns have different one or a set of preset constraints. Under the limitation of one or a set of preset constraints, the type, type, and number of optional strings are greatly reduced, so that the number of matching parameters and/or the range of values are also greatly reduced, and the encoding is required to be consumed. The number of bits is also greatly reduced.
需要说明的是,基本约束条件1中的参考位置的一个预设范围是当前块所在CTU和邻近K个CTU组成的区域范围,串的长度的上限是32且预设的下限是1;基本约束条件3中的预设参考集或参考子集是主参考集,串的总数目的预设的上限是当前块的样值的总数目乘以一个分数M/N,M和N均为正整数。It should be noted that a preset range of the reference position in the basic constraint 1 is a range of the CTU and the adjacent K CTUs of the current block, and the upper limit of the length of the string is 32 and the preset lower limit is 1; the basic constraint The preset reference set or reference subset in Condition 3 is the primary reference set, and the preset upper limit of the total number of strings is the total number of samples of the current block multiplied by a fraction M/N, and both M and N are positive integers.
基于上述基本约束条件,在本实施例的一个可选实施方式中,预设的多种受限串模式包括三种受限串模式:第一种受限串模式的预设约束条件包括基本约束条件1和基本约束条件3;第二种受限串模式的预设约束条件包括基本约束条件5和基本约束条件6;第三种受限串模式的预设约束条件包括基本约束条件13、基本约束条件16和基本约束条件17。Based on the foregoing basic constraint, in an optional implementation manner of this embodiment, the preset multiple restricted string modes include three restricted string modes: the preset constraint of the first restricted string mode includes a basic constraint. Condition 1 and basic constraint 3; the preset constraint condition of the second restricted string mode includes a basic constraint condition 5 and a basic constraint condition 6; the preset constraint condition of the third restricted string mode includes a basic constraint condition 13, and a basic constraint condition Constraint 16 and basic constraint 17.
在本实施例的另一个可选实施方式中预设的多种受限串模式包括四种受限串模式:第一种受限串模式的预设约束条件包括基本约束条件1和基本约束条件3;第二种受限串模式的预设约束条件包括基本约束条件5和基本约束条件6;第三种受限串模式的预设约束条件包括基本约束条件13、基本约束条件16和基本约束条件17;第四种受限串模式的预设约束条件包括基本约束条件18和基本约束条件19。In another alternative embodiment of this embodiment, the plurality of restricted string modes preset include four restricted string modes: the preset constraint conditions of the first restricted string mode include basic constraint 1 and basic constraints 3; the preset constraint condition of the second restricted string mode includes the basic constraint condition 5 and the basic constraint condition 6; the preset constraint condition of the third restricted string mode includes the basic constraint condition 13, the basic constraint condition 16 and the basic constraint condition Condition 17; the preset constraint of the fourth restricted string mode includes a basic constraint 18 and a basic constraint 19.
在本实施例的另一个可选实施方式中,在压缩数据码流中存在多种受 限串模式串匹配方式的使能标志位,其中,使能标识位的位置在压缩数据码流中包括以下至少之一:序列参数集、图像参数集、条带头、CTU头、CU头、编码块头。In another optional embodiment of this embodiment, there are multiple types of compression in the compressed data stream. The enable flag of the string-string mode matching mode, wherein the position of the enable flag includes at least one of the following in the compressed data stream: a sequence parameter set, an image parameter set, a slice header, a CTU header, a CU header, and an encoding Block head.
对于该使能标志位,在采用多种受限串模式对编码块进行串匹配模式的编码时,在编码块的头信息中用直接或间接的标识码来表示当前块采用了哪一种受限串模式,就可以自适应地根据编解码块的数据特性选择一种最优的受限串模式,既可以达到很高的串匹配精度,又可以减少消耗的比特数,大大提高编码效率。For the enable flag bit, when encoding the coded block in the string matching mode by using multiple restricted string modes, the direct or indirect identification code is used in the header information of the coded block to indicate which one of the current block is used. In the limited string mode, an optimal constrained string mode can be adaptively selected according to the data characteristics of the codec block, which can achieve high string matching precision, reduce the number of consumed bits, and greatly improve coding efficiency.
此外,对于本实施例中涉及到额预设的多种受限串模式分别用多个预设的值来表示,其中,一种受限串模式对应于一个预设的值k,编码块在压缩数据码流中都有一个直接或间接或直接间接混合的受限串模式标识码;在受限串模式标识码等于k的情况下,采用与k对应的一种受限串模式对编码块进行串匹配编码。In addition, the multiple restricted string modes related to the preset amount in the embodiment are respectively represented by a plurality of preset values, wherein one restricted string mode corresponds to a preset value k, and the coded block is The compressed data stream has a restricted string mode identification code directly or indirectly or directly indirectly mixed; in the case where the restricted string mode identification code is equal to k, a restricted string mode pair coding block corresponding to k is used. Perform string matching encoding.
其中,直接的受限串模式标识码由压缩数据码流中的一个或多个比特串所组成;间接的受限串模式标识码是从其他编码参数和/或压缩数据码流的其他语法元素导出的受限串模式标识码;直接间接混合的受限串模式标识码是部分直接和部分间接混合的受限串模式标识码;该k为正整数。Wherein the direct restricted string mode identification code is composed of one or more bit strings in the compressed data code stream; the indirect restricted string mode identification code is other syntax elements from other coding parameters and/or compressed data code streams. The derived restricted string mode identification code; the directly indirectly mixed restricted string mode identification code is a partially directly and partially indirectly mixed restricted string mode identification code; the k is a positive integer.
需要说明的是,本实施例中涉及到的用来表示编码块的受限串模式的受限串模式标识码语法元素以下列形式存在于编码块的压缩数据码流中:It should be noted that the restricted string mode identification code syntax element used in the embodiment to represent the restricted string mode of the coding block exists in the compressed data code stream of the coding block in the following form:
编码块头信息、受限串模式标识码、样值串或未匹配样值的语法元素;或,编码块头信息、部分受限串模式标识码、第一个样值串的部分语法元素、受限串模式标识码的其余部分、样值串或未匹配样值的语法元素;其中,采用与受限串模式标识码的取值对应的受限串模式对编码块进行串匹配编码。a syntax element that encodes block header information, a restricted string mode identification code, a sample string, or an unmatched sample; or, a coded block header information, a partially restricted string mode identification code, a partial syntax element of the first sample string, or a restricted The syntax element of the remaining part of the string pattern identification code, the sample string or the unmatched sample; wherein the coded block is subjected to string matching encoding by using the restricted string mode corresponding to the value of the restricted string mode identification code.
实施例4Example 4
图4是根据本发明实施例的数据压缩的解码装置的结构框图,如图4所示,该装置包括:解析模块42,设置为解析压缩数据码流,获取受限串 模式的信息;解码模块44,与解析模块42耦合链接,设置为根据受限串模式的信息从预设的多种受限串模式中选择一种受限串模式对解码块进行串复制解码。4 is a structural block diagram of a decoding apparatus for data compression according to an embodiment of the present invention. As shown in FIG. 4, the apparatus includes: a parsing module 42 configured to parse a compressed data stream and obtain a restricted string. The information of the mode is coupled to the parsing module 42 and configured to perform a string copy decoding on the decoded block by selecting a restricted string mode from a preset plurality of restricted string modes according to the information of the restricted string mode.
在本实施例的一个可选实施方式中,本实施例中涉及到的待解压的数据至少包括以下之一:一维数据、二维数据、多维数据、图像、图像的序列、视频、音频、文件、字节的集合、比特的集合、像素的集合、像素分量的集合。In an optional implementation manner of this embodiment, the data to be decompressed in this embodiment includes at least one of the following: one-dimensional data, two-dimensional data, multi-dimensional data, images, sequences of images, video, audio, A collection of files, bytes, a collection of bits, a collection of pixels, and a collection of pixel components.
另外,本实施例中的编码块为图像的编码区域,且本实施例中涉及到的编码块至少包括以下之一:图像、图像的子图像、宏块、最大编码单元LCU、编码树单元CTU、编码单元CU、CU的子区域、预测单元PU、变换单元TU。In addition, the coding block in this embodiment is an coding region of an image, and the coding block involved in this embodiment includes at least one of the following: an image, a sub-image of an image, a macroblock, a maximum coding unit LCU, and a coding tree unit CTU. a coding unit CU, a sub-area of the CU, a prediction unit PU, and a transform unit TU.
此外,本实施例中涉及到的受限串模式至少包括以下之一的条件:该受限串模式可以具有一个预设约束条件;该受限串模式可以具有多个预设约束条件;该受限串模式也可以不具有预设约束条件。当预设有多种受限串模式时,其中,该多种受限串模式对应的多个预设约束条件之中会存在的多个预设约束条件有重叠部分,或存在多个预设约束条件之中的多个预设约束条件无重叠部分,例如:预设有3种受限串模式时,第一种受限串模式具有一个预设约束条件,第二种受限串模式具有两个预设约束条件,第三种受限串模式不具有预设约束条件,这样有可能第一种受限串模式与第二种受限串模式对应的预设约束条件会有重叠部分,或者有可能第二种受限串模式与第三种受限串模式对应的预设约束条件会没有重叠部分,但并不以此为限。In addition, the restricted string mode involved in this embodiment includes at least one of the following conditions: the restricted string mode may have a preset constraint; the restricted string mode may have multiple preset constraints; The string limit mode may also have no preset constraints. When a plurality of restricted string modes are preset, wherein a plurality of preset constraints that exist in the plurality of preset constraints corresponding to the plurality of restricted string modes have overlapping portions, or multiple presets exist The plurality of preset constraints in the constraint have no overlapping portion. For example, when three restricted string modes are preset, the first restricted string mode has a preset constraint condition, and the second restricted string mode has Two preset constraints, the third restricted string mode does not have a preset constraint, so that it is possible that the first constraint type of the first restricted string mode and the second restricted string mode overlap. Or it is possible that the second restricted string mode and the third restricted string mode corresponding preset constraints have no overlapping parts, but are not limited thereto.
本实施例中涉及到的受限串模式的预设约束条件由多个基本约束条件中的一个或多个组成,其中,与基本约束条件有关的因素包括:编码块中的参考样值、串的长度以及位移矢量、编码块的形状。The preset constraint condition of the restricted string mode involved in this embodiment is composed of one or more of a plurality of basic constraints, wherein the factors related to the basic constraint include: reference samples and strings in the coding block The length and the displacement vector, the shape of the coding block.
下面在本实施例的可选实施方式中,对上述与基本约束条件有关的因素进行举例说明: In the following optional embodiments of the embodiment, the above factors related to the basic constraints are exemplified:
与编码块中的参考样值有关的基本约束条件可以包括:The basic constraints associated with the reference samples in the coded block may include:
基本约束条件1:参考样值来自参考位置的一个预设范围的串的长度的取值有一个上限和/或一个下限;Basic Constraint 1: The reference sample has an upper limit and/or a lower limit for the length of the string from a preset range of the reference position;
在具体应用场景中,该基本约束条件1可以是:对于一个原始串(本实施例中涉及到的串),其参考串(即参考样值)是一个位于一个预设范围内的串,参考串可以以参考位置进行表示,符合上述特征的原始串的长度的取值为L,对于L,有一个上限和/或一个下限值。In a specific application scenario, the basic constraint 1 may be: for an original string (the string involved in this embodiment), the reference string (ie, the reference sample) is a string located within a preset range, and reference The string can be represented by a reference position, the length of the original string conforming to the above characteristics is L, and for L, there is an upper limit and/or a lower limit.
基本约束条件2:参考样值来自参考位置的一个预设范围的串的长度的取值限于一组预设的值;Basic constraint 2: The value of the length of the reference sample from a preset range of reference positions is limited to a set of preset values;
在具体应用场景中,该基本约束条件2与上述基本约束条件1基本相同,不同之处在于L的取值是一组预设的值中的某个值。In a specific application scenario, the basic constraint 2 is substantially the same as the basic constraint 1 described above, except that the value of L is a value of a set of preset values.
基本约束条件3:在一个编码块中,参考样值来自一个预设参考集或参考子集的串的数目有一个上限;Basic constraint 3: In a coding block, there is an upper limit on the number of reference samples from a preset reference set or a reference subset;
在具体应用场景中,该基本约束条件3可以是:对于一个原始串,其参考串是一个位于一个预设范围内的串,具有上述特征的原始串的长度的数量为N,N的取值有一个上限值。In a specific application scenario, the basic constraint 3 may be: for an original string, the reference string is a string located within a preset range, and the number of lengths of the original string having the above feature is N, N. There is an upper limit.
基本约束条件4:一个编码块中,参考样值来自参考位置的一个预设范围的串的数目有一个上限。Basic Constraint 4: In a coded block, there is an upper limit on the number of strings in which the reference sample comes from a preset range of reference positions.
在具体应用场景中,该基本约束条件4与基本约束条件3类似,不同之处在于这里限定的是“串的数目”(有一个上限)而不是“参考样值”来自于一个“数目”。In a specific application scenario, the basic constraint 4 is similar to the basic constraint 3, except that the "number of strings" (with an upper limit) is defined here instead of "reference samples" from a "number".
与串的长度有关的基本约束条件可以包括:Basic constraints related to the length of the string can include:
基本约束条件5:串的长度等于编码块的样值的个数;Basic constraint 5: the length of the string is equal to the number of samples of the coding block;
基本约束条件6:串的长度等于编码块的样值的个数的二分之一;Basic constraint 6: the length of the string is equal to one-half of the number of samples of the coded block;
基本约束条件7:串的长度等于一个预设的值;Basic constraint 7: The length of the string is equal to a preset value;
基本约束条件8:串的长度的取值限于一组预设的值; Basic constraint 8: The value of the length of the string is limited to a set of preset values;
由上述基本约束条件5至8可知,串的长度可以是一个或一组预设的值,也可以是与编码块的样值有关,例如串的长度等于编码块的样值的个数、串的长度等于编码块的样值的个数的二分之一。It can be known from the above basic constraints 5 to 8 that the length of the string may be one or a set of preset values, or may be related to the samples of the coding block, for example, the length of the string is equal to the number of samples of the coding block, and the string. The length is equal to one-half of the number of samples of the encoded block.
与编码块的形状,以及与串的长度有关的基本约束条件可以包括:The basic constraints associated with the shape of the coding block and the length of the string may include:
基本约束条件9:编码块具有正方形的形状并且串的长度等于正方形的边长;Basic constraint 9: the coding block has a square shape and the length of the string is equal to the side length of the square;
基本约束条件10:编码块具有矩形的形状并且串的长度等于矩形的宽或高。Basic Constraint 10: The coded block has a rectangular shape and the length of the string is equal to the width or height of the rectangle.
与串的位移矢量、与编码块的形状、以及串长度和参考样值有关的基本约束条件可以包括:The basic constraints associated with the displacement vector of the string, the shape of the coding block, and the string length and reference samples may include:
基本约束条件11:串的位移矢量等于一个预设的值;Basic constraint 11: The displacement vector of the string is equal to a preset value;
基本约束条件12:串的位移矢量的取值限于一组预设的值;Basic constraint 12: The value of the displacement vector of the string is limited to a set of preset values;
基本约束条件13:编码块具有正方形的形状并且串的位移矢量在水平扫描时等于(0,1),在垂直扫描时等于(1,0),在转换为等价的一维偏移量后等于正方形的边长;Basic Constraint 13: The coded block has a square shape and the displacement vector of the string is equal to (0, 1) in horizontal scanning and equal to (1, 0) in vertical scanning, after conversion to an equivalent one-dimensional offset Equal to the side length of the square;
基本约束条件14:编码块具有矩形的形状并且串的位移矢量在水平扫描时等于(0,1),在垂直扫描时等于(1,0),在转换为等价的一维偏移量后等于矩形的宽或高;Basic constraint 14: The coding block has a rectangular shape and the displacement vector of the string is equal to (0, 1) in horizontal scanning and equal to (1, 0) in vertical scanning, after conversion to an equivalent one-dimensional offset Equal to the width or height of the rectangle;
基本约束条件15:串的长度的取值限于一个或一组预定的值,并且串的位移矢量的取值限于一个或一组预定的值;Basic constraint 15: the value of the length of the string is limited to one or a set of predetermined values, and the value of the displacement vector of the string is limited to one or a set of predetermined values;
基本约束条件16:参考串的长度等于1,即只有一个参考样值,而当前串的长度大于或等于1则所有当前样值都等于参考样值;Basic constraint 16: The length of the reference string is equal to 1, that is, there is only one reference sample, and the current string length is greater than or equal to 1, then all current samples are equal to the reference sample;
基本约束条件17:参考样值在当前块内部;Basic constraint 17: The reference sample is inside the current block;
基本约束条件18:编码块具有二维形状并且所有串的方向是垂直的且起点和终点都在块边界上;Basic constraint 18: The coding block has a two-dimensional shape and the directions of all the strings are vertical and the start and end points are on the block boundary;
基本约束条件19:编码块具有二维形状并且所有串的方向是水平的且 起点和终点都在块边界上。Basic constraint 19: The coding block has a two-dimensional shape and the direction of all the strings is horizontal and Both the start and end points are on the block boundary.
基于上述基本约束条件,本实施例中涉及到的受限串模式的预设约束条件可以由上述基本约束条件1至19中的一个或多个组合。Based on the above basic constraints, the preset constraint condition of the restricted string mode involved in the embodiment may be combined by one or more of the above basic constraints 1 to 19.
由上述基本约束条件可知,本实施例中的受限串是指受到预设基本约束条件的限制的串。在对一个编码块使用受限串匹配模式进行编码时,编码块的一种受限串模式是指所述编码块中的所有串都是受到一个或一组预设约束条件的限制的受限串。不同的受限串模式有不同的一个或一组预设约束条件。在一个或一组预设约束条件的限制下,可选的串的类型、种类、数目大为减少,从而匹配参数的数目和/或取值范围也大为减少,对其进行编码所需消耗的比特数也大为减少。It can be seen from the above basic constraints that the restricted string in this embodiment refers to a string that is restricted by a preset basic constraint. When encoding a coded block using a restricted string matching mode, a restricted string mode of the coded block means that all of the strings in the coded block are limited by one or a set of preset constraints. string. Different restricted string patterns have different one or a set of preset constraints. Under the limitation of one or a set of preset constraints, the type, type, and number of optional strings are greatly reduced, so that the number of matching parameters and/or the range of values are also greatly reduced, and the encoding is required to be consumed. The number of bits is also greatly reduced.
需要说明的是,基本约束条件1中的参考位置的一个预设范围是当前块所在CTU和邻近K个CTU组成的区域范围,串的长度的上限是32且预设的下限是1;基本约束条件3中的预设参考集或参考子集是主参考集,串的总数目的预设的上限是当前块的样值的总数目乘以一个分数M/N,M和N均为正整数。It should be noted that a preset range of the reference position in the basic constraint 1 is a range of the CTU and the adjacent K CTUs of the current block, and the upper limit of the length of the string is 32 and the preset lower limit is 1; the basic constraint The preset reference set or reference subset in Condition 3 is the primary reference set, and the preset upper limit of the total number of strings is the total number of samples of the current block multiplied by a fraction M/N, and both M and N are positive integers.
基于上述基本约束条件,在本实施例的一个可选实施方式中,预设的多种受限串模式包括三种受限串模式:第一种受限串模式的预设约束条件包括基本约束条件1和基本约束条件3;第二种受限串模式的预设约束条件包括基本约束条件5和基本约束条件6;第三种受限串模式的预设约束条件包括基本约束条件13、基本约束条件16和基本约束条件17。Based on the foregoing basic constraint, in an optional implementation manner of this embodiment, the preset multiple restricted string modes include three restricted string modes: the preset constraint of the first restricted string mode includes a basic constraint. Condition 1 and basic constraint 3; the preset constraint condition of the second restricted string mode includes a basic constraint condition 5 and a basic constraint condition 6; the preset constraint condition of the third restricted string mode includes a basic constraint condition 13, and a basic constraint condition Constraint 16 and basic constraint 17.
在本实施例的另一个可选实施方式中预设的多种受限串模式包括四种受限串模式:第一种受限串模式的预设约束条件包括基本约束条件1和基本约束条件3;第二种受限串模式的预设约束条件包括基本约束条件5和基本约束条件6;第三种受限串模式的预设约束条件包括基本约束条件13、基本约束条件16和基本约束条件17;第四种受限串模式的预设约束条件包括基本约束条件18和基本约束条件19。In another alternative embodiment of this embodiment, the plurality of restricted string modes preset include four restricted string modes: the preset constraint conditions of the first restricted string mode include basic constraint 1 and basic constraints 3; the preset constraint condition of the second restricted string mode includes the basic constraint condition 5 and the basic constraint condition 6; the preset constraint condition of the third restricted string mode includes the basic constraint condition 13, the basic constraint condition 16 and the basic constraint condition Condition 17; the preset constraint of the fourth restricted string mode includes a basic constraint 18 and a basic constraint 19.
在本实施例的另一个可选实施方式中,在解压数据码流中存在多种受 限串模式串匹配方式的使能标志位,其中,使能标识位的位置在解压数据码流中包括以下至少之一:序列参数集、图像参数集、条带头、CTU头、CU头、编码块头。In another optional implementation of this embodiment, there are multiple types of compression in the decompressed data stream. The enable flag of the string-limited mode string matching mode, wherein the position of the enable flag bit includes at least one of the following in the decompressed data bitstream: a sequence parameter set, an image parameter set, a slice header, a CTU header, a CU header, and an encoding Block head.
对于该使能标志位,在采用多种受限串模式对编码块进行串匹配模式的编码时,在编码块的头信息中用直接或间接的标识码来表示当前块采用了哪一种受限串模式,就可以自适应地根据编解码块的数据特性选择一种最优的受限串模式,既可以达到很高的串匹配精度,又可以减少消耗的比特数,大大提高编码效率。For the enable flag bit, when encoding the coded block in the string matching mode by using multiple restricted string modes, the direct or indirect identification code is used in the header information of the coded block to indicate which one of the current block is used. In the limited string mode, an optimal constrained string mode can be adaptively selected according to the data characteristics of the codec block, which can achieve high string matching precision, reduce the number of consumed bits, and greatly improve coding efficiency.
此外,对于本实施例中涉及到额预设的多种受限串模式分别用多个预设的值来表示,其中,一种受限串模式对应于一个预设的值k,编码块在解压数据码流中都有一个直接或间接或直接间接混合的受限串模式标识码;在受限串模式标识码等于k的情况下,采用与k对应的一种受限串模式对编码块进行串匹配编码。In addition, the multiple restricted string modes related to the preset amount in the embodiment are respectively represented by a plurality of preset values, wherein one restricted string mode corresponds to a preset value k, and the coded block is The decompressed data stream has a restricted string mode identification code directly or indirectly or directly indirectly mixed; in the case where the restricted string mode identification code is equal to k, a restricted string mode pair coding block corresponding to k is used. Perform string matching encoding.
其中,直接的受限串模式标识码由解压数据码流中的一个或多个比特串所组成;间接的受限串模式标识码是从其他编码参数和/或解压数据码流的其他语法元素导出的受限串模式标识码;直接间接混合的受限串模式标识码是部分直接和部分间接混合的受限串模式标识码;该k为正整数。Wherein the direct restricted string mode identification code is composed of one or more bit strings in the decompressed data code stream; the indirect restricted string mode identification code is other syntax elements from other coding parameters and/or decompressed data stream. The derived restricted string mode identification code; the directly indirectly mixed restricted string mode identification code is a partially directly and partially indirectly mixed restricted string mode identification code; the k is a positive integer.
需要说明的是,本实施例中涉及到的用来表示编码块的受限串模式的受限串模式标识码语法元素以下列形式存在于编码块的解压数据码流中:It should be noted that the restricted string mode identification code syntax element used in the embodiment to represent the restricted string mode of the coding block exists in the decompressed data bitstream of the coding block in the following form:
编码块头信息、受限串模式标识码、样值串或未匹配样值的语法元素;或,编码块头信息、部分受限串模式标识码、第一个样值串的部分语法元素、受限串模式标识码的其余部分、样值串或未匹配样值的语法元素;其中,采用与受限串模式标识码的取值对应的受限串模式对编码块进行串匹配编码。a syntax element that encodes block header information, a restricted string mode identification code, a sample string, or an unmatched sample; or, a coded block header information, a partially restricted string mode identification code, a partial syntax element of the first sample string, or a restricted The syntax element of the remaining part of the string pattern identification code, the sample string or the unmatched sample; wherein the coded block is subjected to string matching encoding by using the restricted string mode corresponding to the value of the restricted string mode identification code.
下面结合本发明实施例的具体实施例对本发明进行详细说明。The present invention will be described in detail below with reference to specific embodiments of the embodiments of the present invention.
实施例5Example 5
为了解决串匹配方式中的这一问题,本实施例提供了一种采用多种受 限串模式进行串匹配编解码的数据压缩方法:在串匹配方式中,受限串是指受到预设约束条件的限制的串。在对一个编解码块使用串匹配方式进行编解码时,编解码块的一种受限串模式是指所述编解码块中的所有串都是受到一个或一组预设约束条件的限制的受限串。不同的受限串模式有不同的一个或一组预设约束条件。在一个或一组预设约束条件的限制下,可选的串的类型、种类、数目大为减少,从而匹配参数的数目和/或取值范围也大为减少,对其进行编码所需消耗的比特数也大为减少。采用多种(至少两种)受限串模式对编解码块进行串匹配方式的编解码,在编解码块的头信息中用直接或间接的标识码来表示编解码块采用了哪一种受限串模式,就可以自适应地根据编解码块的数据特性选择一种最优的受限串模式,既可以达到很高的串匹配精度,又可以减少消耗的比特数,大大提高编码效率。In order to solve this problem in the string matching mode, the present embodiment provides a plurality of Data compression method for string matching codec in the limited string mode: In the string matching mode, the restricted string refers to a string that is limited by a preset constraint condition. When encoding and decoding a codec block using a string matching mode, a restricted string mode of the codec block means that all strings in the codec block are limited by one or a set of preset constraints. Restricted string. Different restricted string patterns have different one or a set of preset constraints. Under the limitation of one or a set of preset constraints, the type, type, and number of optional strings are greatly reduced, so that the number of matching parameters and/or the range of values are also greatly reduced, and the encoding is required to be consumed. The number of bits is also greatly reduced. The codec block is code-matched by using a plurality of (at least two) restricted string modes, and the direct or indirect identification code is used in the header information of the codec block to indicate which one of the codec blocks is used. In the limited string mode, an optimal constrained string mode can be adaptively selected according to the data characteristics of the codec block, which can achieve high string matching precision, reduce the number of consumed bits, and greatly improve coding efficiency.
在本实施例中采用多种(即两种或以上)编解码块层次的受限串模式进行串匹配编解码。In this embodiment, a plurality of (ie, two or more) codec block level restricted string modes are used for string matching codec.
其中,对于受限串模式可以具有一个预设约束条件,也可以是一种受限串模式具有一组(即两个或以上)预设约束条件;该所述一个预设约束条件是一项或多项基本约束条件的组合。Wherein, the restricted string mode may have a preset constraint condition, or a restricted string mode may have a set of (ie, two or more) preset constraint conditions; the one preset constraint condition is one Or a combination of multiple basic constraints.
另外,受限串模式具有零预设约束条件,即没有预设约束条件;多种受限串模式对应的多组预设约束条件之中的两组预设约束条件有重叠部分;多种受限串模式对应的多组预设约束条件之中的两组预设约束条件无重叠部分。In addition, the restricted string mode has a zero preset constraint condition, that is, there is no preset constraint condition; and two sets of preset constraint conditions corresponding to the plurality of restricted string modes have overlapping portions; Two sets of preset constraints among the multiple sets of preset constraints corresponding to the limited string mode have no overlapping parts.
在本实施例的编码方法中,采用根据一个当前编码块的特性自适应地从预设的多种受限串模式中选择一种受限串模式对所述当前编码块进行串匹配编码,并产生至少含多种受限串模式的标识码及其对应的受限串的匹配参数(即解码时需要的复制参数)的信息的压缩数据码流。In the encoding method of this embodiment, the current encoding block is subjected to string matching encoding by adaptively selecting a restricted string mode from a preset plurality of restricted string modes according to characteristics of a current encoding block, and A compressed data bitstream is generated that generates information of at least a plurality of restricted string patterns and a matching parameter of the corresponding restricted string (ie, a copy parameter required for decoding).
在本实施例的解码方法中,采用解析压缩数据码流,获取受限串模式的信息,根据所述受限串模式的信息采用预设的多种受限串模式之一对一 个当前解码块进行串复制解码。In the decoding method of the embodiment, the compressed data stream is parsed to obtain the information of the restricted string mode, and the information of the restricted string mode is used to adopt one of a plurality of preset limited string modes. The current decoded block is subjected to serial copy decoding.
需要说明的是,本实施例适用于有损数据压缩的编码和解码,本发明也同样适用于无损数据压缩的编码和解码。本实施例适用于一维数据如字符串数据或字节串数据的编码和解码,本发明也同样适用于二维或以上数据如图像或视频数据的编码和解码。It should be noted that the present embodiment is applicable to encoding and decoding of lossy data compression, and the present invention is equally applicable to encoding and decoding of lossless data compression. This embodiment is applicable to encoding and decoding of one-dimensional data such as character string data or byte string data, and the present invention is equally applicable to encoding and decoding of two-dimensional or above data such as image or video data.
其中,数据压缩所涉及的数据包括下列类型的数据之一或其组合:Among them, the data involved in data compression includes one or a combination of the following types of data:
1)一维数据;1) One-dimensional data;
2)二维数据;2) two-dimensional data;
3)多维数据;3) Multidimensional data;
4)图像;4) image;
5)图像的序列;5) a sequence of images;
6)视频;6) video;
7)音频;7) audio;
8)文件;8) documents;
9)字节的集合;9) a collection of bytes;
10)比特的集合;10) a collection of bits;
11)像素的集合;11) a collection of pixels;
12)像素分量的集合。12) A collection of pixel components.
另外,本实施例中,在数据是图像、图像的序列、视频等的情形,编码块或解码块是图像的一个编码区域或一个解码区域,包括以下至少一种:图像的子图像、宏块、最大编码单元LCU、编码树单元CTU、编码单元CU、CU的子区域、预测单元PU、变换单元TU。In addition, in the embodiment, in the case where the data is an image, a sequence of images, a video, or the like, the coding block or the decoding block is one coding region or one decoding region of the image, including at least one of the following: a sub-image of the image, a macroblock a maximum coding unit LCU, a coding tree unit CTU, a coding unit CU, a sub-region of a CU, a prediction unit PU, and a transform unit TU.
其中,本实施例中涉及到的受限串模式具有下列特性之一或其合理的组合:所述一种受限串模式具有一个预设约束条件;所述一种受限串模式具有一组(多个即两个或以上)预设约束条件;所述一种受限串模式具有 至少一个预设约束条件,所述一个预设约束条件是一项或多项基本约束条件的逻辑组合;所述一种受限串模式具有零预设约束条件,即没有预设约束条件;所述多种受限串模式对应的多组预设约束条件之中的两组预设约束条件有重叠部分;所述多种受限串模式对应的多组预设约束条件之中的两组预设约束条件无重叠部分。The restricted string mode involved in this embodiment has one of the following characteristics or a reasonable combination thereof: the one restricted string mode has a preset constraint; the one restricted string mode has a set (multiple, ie two or more) preset constraints; the one restricted string mode has At least one preset constraint, the one predetermined constraint is a logical combination of one or more basic constraints; the one restricted string mode has a zero preset constraint, that is, there is no preset constraint; Two sets of preset constraints among the plurality of sets of preset constraints corresponding to the plurality of restricted string modes have overlapping portions; two sets of pre-sets of the plurality of sets of preset constraints corresponding to the plurality of restricted string modes Let the constraint have no overlap.
下面对本实施例中的具体的可选实施方式进行详细说明;Specific specific implementation manners in this embodiment are described in detail below;
可选实施方式一Alternative embodiment 1
本实施例中涉及到的受限串模式的预设约束条件是下列基本约束条件的一项或若干项的组合:The preset constraint condition of the restricted string mode involved in this embodiment is a combination of one or several of the following basic constraints:
基本约束条件1参考样值来自参考位置的一个预设范围的串的长度的取值有一个预设的上限和/或一个预设的下限;Basic Constraint 1 Reference Sample The value of the length of the string from a preset range of the reference position has a preset upper limit and/or a preset lower limit;
基本约束条件2参考样值来自参考位置的一个预设范围的串的长度的取值限于一组预设的值;Basic Constraint 2 Reference Sample The value of the length of the string from a preset range of the reference position is limited to a set of preset values;
基本约束条件3一个编解码块中,参考样值来自一个预设参考集或参考子集的串的数目有一个预设的上限;Basic Constraint 3 In a codec block, the number of reference samples from a preset reference set or a reference subset has a preset upper limit;
基本约束条件4一个编解码块中,参考样值来自参考位置的一个预设范围的串的数目有一个预设的上限;Basic constraint 4 In a codec block, the reference sample has a preset upper limit from the number of strings of a preset range of the reference position;
基本约束条件5串的长度等于编解码块的样值的个数;The length of the basic constraint 5 string is equal to the number of samples of the codec block;
基本约束条件6串的长度等于编解码块的样值的个数的二分之一;The length of the basic constraint 6 string is equal to one-half of the number of samples of the codec block;
基本约束条件7串的长度等于一个预设的值;The length of the basic constraint 7 string is equal to a preset value;
基本约束条件8串的长度的取值限于一组预设的值;The value of the length of the basic constraint 8 string is limited to a set of preset values;
基本约束条件9编解码块具有正方形的形状并且串的长度等于正方形的边长;The basic constraint 9 codec block has a square shape and the length of the string is equal to the side length of the square;
基本约束条件10  编解码块具有矩形的形状并且串的长度等于矩形的宽或高; Basic Constraint 10 The codec block has a rectangular shape and the length of the string is equal to the width or height of the rectangle;
基本约束条件11  串的位移矢量等于一个预设的值;Basic constraint 11 The displacement vector of the string is equal to a preset value;
基本约束条件12  串的位移矢量的取值限于一组预设的值;Basic constraint 12 The value of the displacement vector of the string is limited to a set of preset values;
基本约束条件13  编解码块具有正方形的形状并且串的位移矢量(水平分量,垂直分量)在水平扫描时等于(0,1),在垂直扫描时等于(1,0),在转换为等价的一维偏移量后等于正方形的边长;Basic Constraint 13 The codec block has a square shape and the displacement vector (horizontal component, vertical component) of the string is equal to (0, 1) in horizontal scanning, equal to (1, 0) in vertical scanning, and converted to equivalent. The one-dimensional offset is equal to the side length of the square;
基本约束条件14  编解码块具有矩形的形状并且串的位移矢量(水平分量,垂直分量)在水平扫描时等于(0,1),在垂直扫描时等于(1,0),在转换为等价的一维偏移量后等于矩形的宽或高;Basic Constraint 14 The codec block has a rectangular shape and the displacement vector (horizontal component, vertical component) of the string is equal to (0, 1) in horizontal scanning, equal to (1, 0) in vertical scanning, and converted to equivalent. The one-dimensional offset is equal to the width or height of the rectangle;
基本约束条件15  串的长度的取值限于一个或一组预设的值,并且串的位移矢量的取值限于一个或一组预设的值;Basic constraint 15 The value of the length of the string is limited to one or a set of preset values, and the value of the displacement vector of the string is limited to one or a set of preset values;
基本约束条件16  参考串的长度等于1,即只有一个参考样值,而当前串的长度大于或等于1并且所有当前样值都等于参考样值;Basic constraint 16 The length of the reference string is equal to 1, ie there is only one reference sample, and the length of the current string is greater than or equal to 1 and all current samples are equal to the reference sample;
基本约束条件17  参考样值在当前块内部;The basic constraint 17 reference sample is inside the current block;
基本约束条件18  编解码块具有二维形状并且所有串的方向是垂直的且起点和终点都在块边界上;Basic Constraint 18 The codec block has a two-dimensional shape and the direction of all strings is vertical and the start and end points are on the block boundary;
基本约束条件19  编解码块具有二维形状并且所有串的方向是水平的且起点和终点都在块边界上。Basic Constraints 19 The codec block has a two-dimensional shape and the direction of all strings is horizontal and the start and end points are on the block boundary.
可选实施方式二Optional implementation method 2
预设的多种受限串模式是下列三种受限串模式:The preset multiple restricted string modes are the following three restricted string modes:
第一种受限串模式的预设约束条件是基本约束条件1和基本约束条件3。也就是说,采用第一种受限串模式的编解码块都受到下列限制:1)如果一个串的参考样值来自参考位置的一个预设范围,则这个串的长度的取值有一个预设的上限和/或一个预设的下限;2)编解码块中,参考样值来自一个预设参考集或参考子集的串的总数目有一个预设的上限。The first constraint of the first restricted string mode is the basic constraint 1 and the basic constraint 3. That is to say, the codec block using the first restricted string mode is subject to the following restrictions: 1) If the reference sample of a string comes from a preset range of the reference position, the length of the string has a value The upper limit and/or a preset lower limit are set; 2) In the codec block, the total number of reference samples from a preset reference set or a reference subset has a preset upper limit.
第二种受限串模式的预设约束条件是基本约束条件5和基本约束条件6。也就是说,采用第二种受限串模式的编解码块都受到下列限制:编解 码块或者仅有一个串长度等于编解码块的样值的个数的串,或者仅有两个串长度等于编解码块的样值的个数的二分之一的串。The preset constraints of the second restricted string mode are the basic constraint 5 and the basic constraint 6. That is to say, the codec block using the second restricted string mode is subject to the following restrictions: A code block or a string having only one string length equal to the number of samples of the codec block, or only two strings having a string length equal to one-half of the number of samples of the codec block.
第三种受限串模式的预设约束条件是基本约束条件13、基本约束条件16和基本约束条件17。也就是说,采用第三种受限串模式的编解码块都受到下列限制:编解码块具有正方形的形状,其中任何一个串都或者其位移矢量(水平分量,垂直分量)在水平扫描时等于(0,1),在垂直扫描时等于(1,0),在转换为等价的一维偏移量后等于正方形的边长(即这个串的当前串是将参考串移动一行或一列的位置得到的)或者其当前样值都等于一个参考样值,并且,编解码块的所有参考样值都来自编解码块的内部。The preset constraints of the third restricted string mode are the basic constraint 13, the basic constraint 16, and the basic constraint 17. That is to say, the codec block adopting the third restricted string mode is subject to the following limitation: the codec block has a square shape in which any one of the strings or its displacement vector (horizontal component, vertical component) is equal to horizontal scanning. (0,1), equal to (1,0) in the vertical scan, equal to the side length of the square after conversion to the equivalent one-dimensional offset (ie the current string of this string is to move the reference string by one row or column) The position obtained or its current sample is equal to one reference sample, and all reference samples of the codec block are from the inside of the codec block.
可选实施方式3Alternative embodiment 3
在可选实施方式1中,预设的多种受限串模式包括四种受限串模式:第一种受限串模式的预设约束条件等同于实施或变体例2的第一种受限串模式的预设约束条件。In the optional implementation manner 1, the preset multiple restricted string modes include four restricted string modes: the preset constraint condition of the first restricted string mode is equivalent to the first limited of the implementation or variant example 2. Preset constraints for string mode.
第二种受限串模式的预设约束条件等同于实施或变体例2的第二种受限串模式的预设约束条件。The preset constraint of the second restricted string mode is equivalent to the preset constraint of the second restricted string mode of the implementation or variant 2.
第三种受限串模式的预设约束条件等同于实施或变体例2的第三种受限串模式的预设约束条件。The preset constraint of the third restricted string mode is equivalent to the preset constraint of the third restricted string mode of the implementation or variant 2.
第四种受限串模式的预设约束条件是基本约束条件18和基本约束条件19。也就是说,采用第四种受限串模式的编解码块都受到下列限制:编解码块具有二维形状并且其所有串的方向都是垂直或者其所有串的方向都是水平且起点和终点都在块边界上。The preset constraints of the fourth restricted string mode are the basic constraint 18 and the basic constraint 19. That is to say, the codec block adopting the fourth restricted string mode is subject to the following restrictions: the codec block has a two-dimensional shape and the direction of all its strings is vertical or the direction of all its strings is horizontal and the start and end points are horizontal All on the block boundary.
可选实施方式4Alternative embodiment 4
在上述可选实施方式1-3中,基本约束条件1中的参考位置的一个预设范围是当前块所在CTU和邻近(左方或者左方和/或左上方和/或上方和/或右上方)K(通常1≤K≤4)个CTU组成的区域范围,串的长度的预设的上限是32(含)而预设的下限是1(含),基本约束条件3中的预设 参考集或参考子集是主参考集,串的总数目的预设的上限是当前块的样值的总数目乘以一个分数M/N(通常1≤M<N≤16)。In the above optional embodiments 1-3, a preset range of the reference position in the basic constraint 1 is the CTU and the proximity of the current block (left or left and/or upper left and/or upper and/or upper right) Square) K (usually 1 ≤ K ≤ 4) area range composed of CTUs, the preset upper limit of the length of the string is 32 (inclusive) and the preset lower limit is 1 (inclusive), the preset in the basic constraint 3 The reference set or reference subset is the primary reference set, and the upper limit of the total number of strings is the total number of samples of the current block multiplied by a fraction M/N (usually 1 ≤ M < N ≤ 16).
可选实施方式5Alternative embodiment 5
在编码方法或解码方法中,在压缩数据码流的下列地方之一或若干处存在多种受限串模式串匹配方式的使能标志位:In the encoding method or the decoding method, there are multiple enabled string mode matching mode enable flag bits at one or several places in the compressed data stream:
1)序列参数集;通常是是序列参数集的一个直接存在或隐含推导的语法元素;1) a sequence parameter set; usually a grammatical element of a direct or implicit derivation of a sequence parameter set;
2)图像参数集;通常是图像参数集的一个直接存在或隐含推导的语法元素;2) an image parameter set; usually a grammatical element of a direct or implicit derivation of an image parameter set;
3)条带头;通常是条带头的一个直接存在或隐含推导的语法元素;3) Strip head; usually a grammatical element of the direct or implicit derivation of the strip head;
4)CTU头;通常是CTU头的一个直接存在或隐含推导的语法元素;4) CTU header; usually a grammatical element of a direct or implicit derivation of the CTU header;
5)CU头;通常是CU头的一个直接存在或隐含推导的语法元素;5) CU header; usually a grammatic element of a direct or implicit derivation of the CU header;
6)编解码块头;通常是编解码块头的一个直接存在或隐含推导的语法元素。6) Codec block header; usually a directly existing or implicitly derived syntax element of the codec block header.
可选实施方式6Alternative embodiment 6
在编码方法或解码方法中,预设的多种受限串模式分别用多个预设的值来表示,一种受限串模式对应于一个预设的值k,每个编解码块在压缩数据码流中都有一个直接或间接或直接间接混合的受限串模式标识码,In the encoding method or the decoding method, the preset multiple restricted string modes are respectively represented by a plurality of preset values, and one restricted string mode corresponds to a preset value k, and each codec block is compressed. The data stream has a restricted string mode identification code that is directly or indirectly or directly indirectly mixed.
如果受限串模式标识码等于k,则If the restricted string mode identification code is equal to k, then
{{
采用与k对应的一种受限串模式对编解码块进行串匹配编解码Performing string matching encoding and decoding on codec blocks using a restricted string mode corresponding to k
}}
直接的受限串模式标识码由压缩数据码流中的一个或多个位串(比特串)所组成。间接的受限串模式标识码是从其他编解码参数和/或压缩数据码流的其他语法元素导出的受限串模式标识码。直接间接混合的受限串模 式标识码是部分直接(即由压缩数据码流中的一个或多个位串所组成)部分间接(即从其他编解码参数和/或压缩数据码流的其他语法元素导出)混合的受限串模式标识码。The direct restricted string mode identification code consists of one or more bit strings (bit strings) in the compressed data stream. The indirect restricted string mode identification code is a restricted string mode identification code derived from other codec parameters and/or other syntax elements of the compressed data stream. Restricted series mode of direct indirect mixing The type identification code is a partially constrained (ie, consisting of one or more bit strings in a compressed data stream) partially indirectly (ie, derived from other codec parameters and/or other syntax elements of the compressed data stream). String mode identification code.
可选实施方式7Alternative embodiment 7
编码方或解码方法中,用来表示编解码块的受限串模式的受限串模式标识码语法元素以下列形式存在于编解码块的压缩数据码流中:In the encoding side or the decoding method, the restricted string mode identification code syntax element used to represent the restricted string mode of the codec block exists in the compressed data bitstream of the codec block in the following form:
编解码块头信息、受限串模式标识码、更多的编解码块头信息、样值串或未匹配样值的语法元素(1≤N≤编解码块的样值的总数目);或,Codec block header information, restricted string mode identification code, more codec block header information, sample string or unmatched sample syntax elements (1 ≤ N ≤ the total number of samples of the codec block); or,
编解码块头信息、部分受限串模式标识码、更多的编解码块头信息、第一个样值串的部分语法元素、受限串模式标识码的其余部分、样值串或未匹配样值的其余语法元素(1≤N≤编解码块的样值的总数目);Codec block header information, partially restricted string mode identification code, more codec block header information, partial syntax elements of the first sample string, remainder of the restricted string pattern identification code, sample string or unmatched samples The remaining syntax elements (1 ≤ N ≤ the total number of samples of the codec block);
其中,受限串模式标识码取一个值时,采用与值对应的那种受限串模式对编解码块进行串匹配编解码。Wherein, when the restricted string mode identification code takes a value, the codec block is subjected to string matching encoding and decoding by using the restricted string mode corresponding to the value.
可选地,本实施例中的具体示例可以参考上述实施例及可选实施方式中所描述的示例,本实施例在此不再赘述。For example, the specific examples in this embodiment may refer to the examples described in the foregoing embodiments and the optional embodiments, and details are not described herein again.
显然,本领域的技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。It will be apparent to those skilled in the art that the various modules or steps of the present invention described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein. The steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps thereof are fabricated as a single integrated circuit module. Thus, the invention is not limited to any specific combination of hardware and software.
以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明 的保护范围之内。The above description is only the preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes can be made to the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and scope of the present invention are intended to be included in the present invention. Within the scope of protection.
工业实用性Industrial applicability
在本发明实施例的数据压缩的编码、解码过程中,采用自适应地从预设的多种受限串模式中选择一种受限串模式;进而根据选择的受限串模式对待压缩数据中的编码块进行串匹配编码得到使用选择的受限串模式进行编码的受限串的信息,以及使用选择的受限串模式进行编码的受限串的语法元素的压缩数据码流的方式,由于是从多种预设的受限串模式中选择一种受限串模式对待压缩数据中的编码块进行编码,进而可以减少对编码块进行编码的匹配参数,由于只有一种受串限模式也提高了编码过程中串的匹配精度,从而解决了相关技术中串匹配方式存在匹配参数较多以及消耗较多比特数对其进行编码的问题。 In the encoding and decoding process of data compression in the embodiment of the present invention, adaptively selecting a restricted string mode from a preset plurality of restricted string modes; and further compressing the data according to the selected restricted string mode. The coding block performs string matching coding to obtain information of a restricted string encoded using the selected restricted string mode, and a manner of compressing the data stream of the syntax element of the restricted string encoded using the selected restricted string mode, Selecting a restricted string mode from a plurality of preset restricted string modes to encode the coded block in the compressed data, thereby reducing matching parameters for encoding the coded block, since only one type of the limited block mode is also used. The matching precision of the string in the encoding process is improved, thereby solving the problem that the string matching method has more matching parameters and consumes more bits in the related art.

Claims (24)

  1. 一种数据压缩的编码方法,包括:A method of encoding data compression, comprising:
    自适应地从预设的多种受限串模式中选择一种受限串模式;Adaptively selecting a restricted string mode from a plurality of preset limited string modes;
    根据选择的受限串模式对编码块进行串匹配编码得到使用所述选择的受限串模式进行编码的受限串的信息,以及使用所述选择的受限串模式进行编码的受限串的语法元素的压缩数据码流。Performing string matching encoding on the coded block according to the selected restricted string mode results in information of the restricted string encoded using the selected restricted string mode, and a restricted string encoded using the selected restricted string mode A compressed data stream of syntax elements.
  2. 根据权利要求1所述的方法,其中,The method of claim 1 wherein
    所述编码块为图像的编码区域,所述编码块至少包括以下之一:图像、图像的子图像、宏块、最大编码单元LCU、编码树单元CTU、编码单元CU、CU的子区域、预测单元PU、变换单元TU。The coding block is an coding region of an image, and the coding block includes at least one of: an image, a sub-image of an image, a macroblock, a maximum coding unit LCU, a coding tree unit CTU, a coding unit CU, a sub-region of a CU, and a prediction. Unit PU, transform unit TU.
  3. 根据权利要求1所述的方法,其中,所述受限串模式至少包括以下之一的条件:The method of claim 1, wherein the restricted string mode comprises at least one of the following conditions:
    所述受限串模式具有一个预设约束条件;The restricted string mode has a preset constraint condition;
    所述受限串模式具有多个预设约束条件;The restricted string mode has a plurality of preset constraints;
    所述受限串模式不具有预设约束条件。The restricted string mode does not have a preset constraint.
  4. 根据权利要求1所述的方法,其中,所述受限串模式的预设约束条件是下列基本约束条件的一个或多个组合:The method of claim 1 wherein the predetermined constraint condition of the restricted string mode is one or more combinations of the following basic constraints:
    基本约束条件1:参考样值来自参考位置的一个预设范围的串的长度的取值有一个上限和/或一个下限;Basic Constraint 1: The reference sample has an upper limit and/or a lower limit for the length of the string from a preset range of the reference position;
    基本约束条件2:参考样值来自参考位置的一个预设范围的串的长度的取值限于一组预设的值;Basic constraint 2: The value of the length of the reference sample from a preset range of reference positions is limited to a set of preset values;
    基本约束条件3:一个编码块中,参考样值来自一个预设参考集或参考子集的串的数目有一个上限; Basic constraint 3: In a coding block, there is an upper limit on the number of reference samples from a preset reference set or a reference subset;
    基本约束条件4:一个编码块中,参考样值来自参考位置的一个预设范围的串的数目有一个上限;Basic constraint 4: In a coding block, there is an upper limit on the number of strings whose reference samples are from a preset range of reference positions;
    基本约束条件5:串的长度等于编码块的样值的个数;Basic constraint 5: the length of the string is equal to the number of samples of the coding block;
    基本约束条件6:串的长度等于编码块的样值的个数的二分之一;Basic constraint 6: the length of the string is equal to one-half of the number of samples of the coded block;
    基本约束条件7:串的长度等于一个预设的值;Basic constraint 7: The length of the string is equal to a preset value;
    基本约束条件8:串的长度的取值限于一组预设的值;Basic constraint 8: The value of the length of the string is limited to a set of preset values;
    基本约束条件9:编码块具有正方形的形状并且串的长度等于正方形的边长;Basic constraint 9: the coding block has a square shape and the length of the string is equal to the side length of the square;
    基本约束条件10:编码块具有矩形的形状并且串的长度等于矩形的宽或高;Basic constraint 10: The coding block has a rectangular shape and the length of the string is equal to the width or height of the rectangle;
    基本约束条件11:串的位移矢量等于一个预设的值;Basic constraint 11: The displacement vector of the string is equal to a preset value;
    基本约束条件12:串的位移矢量的取值限于一组预设的值;Basic constraint 12: The value of the displacement vector of the string is limited to a set of preset values;
    基本约束条件13:编码块具有正方形的形状并且串的位移矢量在水平扫描时等于(0,1),在垂直扫描时等于(1,0),在转换为等价的一维偏移量后等于正方形的边长;Basic Constraint 13: The coded block has a square shape and the displacement vector of the string is equal to (0, 1) in horizontal scanning and equal to (1, 0) in vertical scanning, after conversion to an equivalent one-dimensional offset Equal to the side length of the square;
    基本约束条件14:编码块具有矩形的形状并且串的位移矢量在水平扫描时等于(0,1),在垂直扫描时等于(1,0),在转换为等价的一维偏移量后等于矩形的宽或高;Basic constraint 14: The coding block has a rectangular shape and the displacement vector of the string is equal to (0, 1) in horizontal scanning and equal to (1, 0) in vertical scanning, after conversion to an equivalent one-dimensional offset Equal to the width or height of the rectangle;
    基本约束条件15:串的长度的取值限于一个或一组预设的值,并且串的位移矢量的取值限于一个或一组预设的值;Basic constraint 15: the value of the length of the string is limited to one or a set of preset values, and the value of the displacement vector of the string is limited to one or a set of preset values;
    基本约束条件16:参考串的长度等于1,即只有一个参考样值,而当前串的长度大于或等于1并且所有当前样值都等于所述参考样 值;Basic constraint 16: The length of the reference string is equal to 1, ie there is only one reference sample, and the length of the current string is greater than or equal to 1 and all current samples are equal to the reference sample value;
    基本约束条件17:参考样值在当前块内部;Basic constraint 17: The reference sample is inside the current block;
    基本约束条件18:编码块具有二维形状并且所有串的方向是垂直的且起点和终点都在块边界上;Basic constraint 18: The coding block has a two-dimensional shape and the directions of all the strings are vertical and the start and end points are on the block boundary;
    基本约束条件19:编码块具有二维形状并且所有串的方向是水平的且起点和终点都在块边界上。Basic Constraint 19: The coded block has a two-dimensional shape and the direction of all strings is horizontal and both the start and end points are on the block boundary.
  5. 根据权利要求4所述的方法,其中,The method of claim 4, wherein
    所述预设的多种受限串模式包括三种受限串模式,其中,第一种受限串模式的预设约束条件包括所述基本约束条件1和所述基本约束条件3;第二种受限串模式的预设约束条件包括所述基本约束条件5和所述基本约束条件6;第三种受限串模式的预设约束条件包括所述基本约束条件13、所述基本约束条件16和所述基本约束条件17。The preset plurality of restricted string modes includes three restricted string modes, wherein a preset constraint condition of the first restricted string mode includes the basic constraint condition 1 and the basic constraint condition 3; The preset constraint condition of the restricted string mode includes the basic constraint condition 5 and the basic constraint condition 6; the preset constraint condition of the third restricted string mode includes the basic constraint condition 13 and the basic constraint condition 16 and the basic constraint 17.
  6. 根据权利要求4所述的方法,其中,The method of claim 4, wherein
    所述预设的多种受限串模式包括四种受限串模式,其中,第一种受限串模式的预设约束条件包括所述基本约束条件1和所述基本约束条件3;第二种受限串模式的预设约束条件包括所述基本约束条件5和所述基本约束条件6;第三种受限串模式的预设约束条件包括所述基本约束条件13、所述基本约束条件16和所述基本约束条件17;第四种受限串模式的预设约束条件包括所述基本约束条件18和所述基本约束条件19。The preset multiple restricted string modes include four restricted string modes, wherein the preset constraint conditions of the first restricted string mode include the basic constraint 1 and the basic constraint 3; The preset constraint condition of the restricted string mode includes the basic constraint condition 5 and the basic constraint condition 6; the preset constraint condition of the third restricted string mode includes the basic constraint condition 13 and the basic constraint condition 16 and the basic constraint 17; the preset constraint of the fourth restricted string mode includes the basic constraint 18 and the basic constraint 19.
  7. 根据权利要求4所述的方法,其中,The method of claim 4, wherein
    所述基本约束条件1中的所述参考位置的一个预设范围是所述编码块所在CTU和邻近K个CTU组成的区域范围,且串长度的上限是 32和/或串长度的取值下限是1;A preset range of the reference position in the basic constraint 1 is a range of regions in which the CTU of the coding block and the adjacent K CTUs are formed, and the upper limit of the string length is The lower limit of 32 and / or string length is 1;
    所述基本约束条件3中的所述预设参考集或参考子集是主参考集,串的总数目的上限预设为所述编码块的样值的总数目乘以一个分数M/N。The preset reference set or reference subset in the basic constraint 3 is a primary reference set, and the upper limit of the total number of strings is preset to be the total number of samples of the coding block multiplied by a fraction M/N.
  8. 根据权利要求1所述的方法,其中,在所述压缩数据码流中存在所述多种受限串模式串匹配方式的使能标志位,其中,所述使能标识位的位置在压缩数据码流中包括以下至少之一:The method of claim 1, wherein the plurality of restricted string mode string matching mode enable flag bits are present in the compressed data bitstream, wherein the location of the enable flag bit is compressed data The code stream includes at least one of the following:
    序列参数集、图像参数集、条带头、CTU头、CU头、编码块头。Sequence parameter set, image parameter set, strip header, CTU header, CU header, encoding block header.
  9. 根据权利要求1所述的方法,其中,The method of claim 1 wherein
    所述预设的多种受限串模式分别用多个预设的值来表示,其中,一种受限串模式对应于一个预设的值k,所述编码块在压缩数据码流中都有一个直接、或间接、或直接间接混合的受限串模式标识码;The preset multiple restricted string modes are respectively represented by a plurality of preset values, wherein a restricted string mode corresponds to a preset value k, and the coded block is in a compressed data stream. There is a restricted string mode identification code that is directly, or indirectly, or directly indirectly mixed;
    在所述受限串模式标识码等于k的情况下,采用与k对应的一种受限串模式对所述编码块进行串匹配编码。In the case that the restricted string mode identification code is equal to k, the coded block is subjected to string matching encoding using a restricted string mode corresponding to k.
  10. 根据权利要求9所述的方法,其中,The method of claim 9 wherein
    所述直接的受限串模式标识码由压缩数据码流中的一个或多个比特串所组成;所述间接的受限串模式标识码是从其他编码参数和/或压缩数据码流的其他语法元素导出的受限串模式标识码;所述直接间接混合的受限串模式标识码是部分直接和部分间接混合的受限串模式标识码。The direct restricted string mode identification code is composed of one or more bit strings in a compressed data code stream; the indirect restricted string mode identification code is from other encoding parameters and/or compressed data stream other The restricted string mode identification code derived by the syntax element; the directly indirectly mixed restricted string mode identification code is a partially directly and partially indirectly mixed restricted string mode identification code.
  11. 根据权利要求9所述的方法,其中,The method of claim 9 wherein
    用来表示所述编码块的受限串模式的受限串模式标识码语法元素以下列形式存在于所述编码块的压缩数据码流中: A restricted string mode identification code syntax element used to represent a restricted string mode of the coded block is present in the compressed data bitstream of the coded block in the following form:
    编码块头信息、受限串模式标识码、样值串或未匹配样值的语法元素;或,a syntax element that encodes block header information, a restricted string mode identification code, a sample string, or an unmatched sample; or,
    编码块头信息、部分受限串模式标识码、第一个样值串的部分语法元素、受限串模式标识码的其余部分、样值串或未匹配样值的语法元素;其中,采用与受限串模式标识码的取值对应的受限串模式对所述编码块进行串匹配编码。Encoding block header information, a partially restricted string mode identification code, a partial syntax element of the first sample string, a remainder of the restricted string mode identification code, a sample string, or a syntax element of an unmatched sample; The restricted string mode corresponding to the value of the limited string mode identification code performs string matching encoding on the coded block.
  12. 一种数据压缩的编码装置,包括:An encoding device for data compression, comprising:
    选择模块,设置为自适应地从预设的多种受限串模式中选择一种受限串模式;Selecting a module, configured to adaptively select a restricted string mode from a plurality of preset restricted string modes;
    编码模块,设置为根据选择的受限串模式对编码块进行串匹配编码得到使用所述选择的受限串模式进行编码的受限串的信息,以及使用所述选择的受限串模式进行编码的受限串的语法元素的压缩数据码流。An encoding module configured to perform string matching encoding on the encoded block according to the selected restricted string mode to obtain information of the restricted string encoded using the selected restricted string mode, and encoding using the selected restricted string mode A compressed data stream of syntax elements of a restricted string.
  13. 一种数据压缩的解码方法,包括:A decoding method for data compression, comprising:
    解析压缩数据码流,获取受限串模式的信息;Parsing the compressed data stream to obtain information of the restricted string mode;
    根据所述受限串模式的信息从预设的多种受限串模式中选择一种受限串模式对解码块进行串复制解码。And performing a string copy decoding on the decoded block by selecting one of the preset multiple string modes according to the restricted string mode information.
  14. 根据权利要求13所述的方法,其中,The method of claim 13 wherein
    所述解码块为图像的解码区域,所述解码块至少包括以下之一:图像、图像的子图像、宏块、最大解码单元LCU、解码树单元CTU、解码单元CU、CU的子区域、预测单元PU、变换单元TU。The decoding block is a decoding region of an image, and the decoding block includes at least one of: an image, a sub-image of an image, a macroblock, a maximum decoding unit LCU, a decoding tree unit CTU, a decoding unit CU, a sub-region of a CU, and a prediction. Unit PU, transform unit TU.
  15. 根据权利要求13所述的方法,其中,所述受限串模式至少包括以下之一的条件:The method of claim 13, wherein the restricted string mode includes at least one of the following conditions:
    所述受限串模式具有一个预设约束条件; The restricted string mode has a preset constraint condition;
    所述受限串模式具有多个预设约束条件;The restricted string mode has a plurality of preset constraints;
    所述受限串模式不具有预设约束条件。The restricted string mode does not have a preset constraint.
  16. 根据权利要求13所述的方法,其中,所述一种受限串模式的预设约束条件是下列基本约束条件的一个或多个组合:The method of claim 13 wherein the predetermined constraint condition of the restricted string mode is one or more combinations of the following basic constraints:
    基本约束条件1:参考样值来自参考位置的一个预设范围的串的长度的取值有一个上限和/或一个下限;Basic Constraint 1: The reference sample has an upper limit and/or a lower limit for the length of the string from a preset range of the reference position;
    基本约束条件2:参考样值来自参考位置的一个预设范围的串的长度的取值限于一组预设的值;Basic constraint 2: The value of the length of the reference sample from a preset range of reference positions is limited to a set of preset values;
    基本约束条件3:一个解码块中,参考样值来自一个预设参考集或参考子集的串的数目有一个上限;Basic constraint 3: In a decoding block, there is an upper limit on the number of reference samples from a preset reference set or a reference subset;
    基本约束条件4:一个解码块中,参考样值来自参考位置的一个预设范围的串的数目有一个上限;Basic constraint 4: In a decoding block, there is an upper limit on the number of strings in which the reference sample is from a preset range of reference positions;
    基本约束条件5:串的长度等于解码块的样值的个数;Basic constraint 5: the length of the string is equal to the number of samples of the decoded block;
    基本约束条件6:串的长度等于解码块的样值的个数的二分之一;Basic constraint 6: the length of the string is equal to one-half of the number of samples of the decoded block;
    基本约束条件7:串的长度等于一个预设的值;Basic constraint 7: The length of the string is equal to a preset value;
    基本约束条件8:串的长度的取值限于一组预设的值;Basic constraint 8: The value of the length of the string is limited to a set of preset values;
    基本约束条件9:解码块具有正方形的形状并且串的长度等于正方形的边长;Basic constraint 9: The decoding block has a square shape and the length of the string is equal to the side length of the square;
    基本约束条件10:解码块具有矩形的形状并且串的长度等于矩形的宽或高;Basic constraint 10: The decoding block has a rectangular shape and the length of the string is equal to the width or height of the rectangle;
    基本约束条件11:串的位移矢量等于一个预设的值; Basic constraint 11: The displacement vector of the string is equal to a preset value;
    基本约束条件12:串的位移矢量的取值限于一组预设的值;Basic constraint 12: The value of the displacement vector of the string is limited to a set of preset values;
    基本约束条件13:解码块具有正方形的形状并且串的位移矢量在水平扫描时等于(0,1),在垂直扫描时等于(1,0),在转换为等价的一维偏移量后等于正方形的边长;Basic Constraint 13: The decoded block has a square shape and the displacement vector of the string is equal to (0, 1) in horizontal scanning and equal to (1, 0) in vertical scanning, after conversion to an equivalent one-dimensional offset Equal to the side length of the square;
    基本约束条件14:解码块具有矩形的形状并且串的位移矢量在水平扫描时等于(0,1),在垂直扫描时等于(1,0),在转换为等价的一维偏移量后等于矩形的宽或高;Basic Constraint 14: The decoded block has a rectangular shape and the displacement vector of the string is equal to (0, 1) in horizontal scanning and equal to (1, 0) in vertical scanning, after conversion to an equivalent one-dimensional offset Equal to the width or height of the rectangle;
    基本约束条件15:串的长度的取值限于一个或一组预设的值,并且串的位移矢量的取值限于一个或一组预设的值;Basic constraint 15: the value of the length of the string is limited to one or a set of preset values, and the value of the displacement vector of the string is limited to one or a set of preset values;
    基本约束条件16:参考串的长度等于1,即只有一个参考样值,而当前串的长度大于或等于1并且所有当前样值都等于所述参考样值;Basic constraint 16: the length of the reference string is equal to 1, ie there is only one reference sample, and the length of the current string is greater than or equal to 1 and all current samples are equal to the reference sample;
    基本约束条件17:参考样值在当前块内部;Basic constraint 17: The reference sample is inside the current block;
    基本约束条件18:解码块具有二维形状并且所有串的方向是垂直的且起点和终点都在块边界上;Basic constraint 18: The decoded block has a two-dimensional shape and the directions of all the strings are vertical and the start and end points are on the block boundary;
    基本约束条件19:解码块具有二维形状并且所有串的方向是水平的且起点和终点都在块边界上。Basic Constraint 19: The decoded block has a two-dimensional shape and the direction of all strings is horizontal and both the start and end points are on the block boundary.
  17. 根据权利要求16所述的方法,其中,The method of claim 16 wherein
    所述预设的多种受限串模式包括三种受限串模式,其中,第一种受限串模式的预设约束条件包括所述基本约束条件1和所述基本约束条件3;第二种受限串模式的预设约束条件包括所述基本约束条件5和所述基本约束条件6;第三种受限串模式的预设约束条件包括所述基本约束条件13、所述基本约束条件16和所述基本约束条件17。 The preset plurality of restricted string modes includes three restricted string modes, wherein a preset constraint condition of the first restricted string mode includes the basic constraint condition 1 and the basic constraint condition 3; The preset constraint condition of the restricted string mode includes the basic constraint condition 5 and the basic constraint condition 6; the preset constraint condition of the third restricted string mode includes the basic constraint condition 13 and the basic constraint condition 16 and the basic constraint 17.
  18. 根据权利要求16所述的方法,其中,The method of claim 16 wherein
    所述预设的多种受限串模式包括四种受限串模式,其中,第一种受限串模式的预设约束条件是所述基本约束条件1和所述基本约束条件3;第二种受限串模式的预设约束条件包括所述基本约束条件5和所述基本约束条件6;第三种受限串模式的预设约束条件包括所述基本约束条件13、所述基本约束条件16和所述基本约束条件17;第四种受限串模式的预设约束条件包括所述基本约束条件18和所述基本约束条件19。The preset multiple restricted string modes include four restricted string modes, wherein a preset constraint condition of the first restricted string mode is the basic constraint condition 1 and the basic constraint condition 3; The preset constraint condition of the restricted string mode includes the basic constraint condition 5 and the basic constraint condition 6; the preset constraint condition of the third restricted string mode includes the basic constraint condition 13 and the basic constraint condition 16 and the basic constraint 17; the preset constraint of the fourth restricted string mode includes the basic constraint 18 and the basic constraint 19.
  19. 根据权利要求16所述的方法,其中,The method of claim 16 wherein
    所述基本约束条件1中的所述参考位置的一个预设范围是所述解码所在CTU和邻近K个CTU组成的区域范围,且串长度的上限是32和/或串长度的取值下限是1;A preset range of the reference position in the basic constraint 1 is an area range of the CTU and the adjacent K CTUs, and the upper limit of the string length is 32 and/or the lower limit of the string length is 1;
    所述基本约束条件3中的所述预设参考集或参考子集是主参考集,串的总数目的上限预设为所述解码块包含的样值的总数目乘以一个分数M/N。The preset reference set or reference subset in the basic constraint 3 is a primary reference set, and the upper limit of the total number of strings is preset to be the total number of samples included in the decoding block multiplied by a fraction M/N.
  20. 根据权利要求13所述的方法,其中,在所述压缩数据码流中存在所述多种受限串模式串匹配方式的使能标志位,其中,所述使能标识位的位置在压缩数据码流中包括以下至少之一:The method of claim 13, wherein the plurality of restricted string mode string matching mode enable flag bits are present in the compressed data bitstream, wherein the location of the enable flag bit is compressed data The code stream includes at least one of the following:
    序列参数集、图像参数集、条带头、CTU头、CU头、解码块头。Sequence parameter set, image parameter set, strip header, CTU header, CU header, decoding block header.
  21. 根据权利要求13所述的方法,其中,The method of claim 13 wherein
    所述预设的多种受限串模式分别用多个预设的值来表示,其中,一种受限串模式对应于一个预设的值k,每个所述解码块在压缩数据码流中都有一个直接、或间接、或直接间接混合的受限串模式标识码; The preset multiple restricted string modes are respectively represented by a plurality of preset values, wherein one restricted string mode corresponds to a preset value k, and each of the decoded blocks is in a compressed data stream. There is a restricted string mode identification code that is directly, or indirectly, or directly indirectly mixed;
    在所述受限串模式标识码等于k的情况下,采用与k对应的一种受限串模式对所述解码块进行串匹配解码。In the case that the restricted string mode identification code is equal to k, the decoded block is subjected to string matching decoding using a restricted string mode corresponding to k.
  22. 根据权利要求21所述的方法,其中,The method of claim 21, wherein
    所述直接的受限串模式标识码由压缩数据码流中的一个或多个比特串所组成;所述间接的受限串模式标识码是从其他解码参数和/或压缩数据码流的其他语法元素导出的受限串模式标识码;所述直接间接混合的受限串模式标识码是部分直接和部分间接混合的受限串模式标识码。The direct restricted string mode identification code is composed of one or more bit strings in a compressed data code stream; the indirect restricted string mode identification code is from other decoding parameters and/or compressed data stream other The restricted string mode identification code derived by the syntax element; the directly indirectly mixed restricted string mode identification code is a partially directly and partially indirectly mixed restricted string mode identification code.
  23. 根据权利要求21所述的方法,其中,The method of claim 21, wherein
    用来表示所述解码块的受限串模式的受限串模式标识码语法元素以下列形式存在于所述解码块的压缩数据码流中:A restricted string mode identification code syntax element used to represent a restricted string mode of the decoded block is present in the compressed data bitstream of the decoded block in the following form:
    解码块头信息、受限串模式标识码、样值串或未匹配样值的语法元素;或,Decoding block header information, restricted string mode identification code, sample string, or syntax elements that do not match samples; or,
    解码块头信息、部分受限串模式标识码、第一个样值串的部分语法元素、受限串模式标识码的其余部分、样值串或未匹配样值的语法元素;其中,采用与受限串模式标识码的取值对应的受限串模式对所述解码块进行串匹配解码。Decoding block header information, a partially restricted string mode identification code, a partial syntax element of the first sample string, a remainder of the restricted string pattern identification code, a sample string, or a syntax element of an unmatched sample; The restricted string mode corresponding to the value of the limited string mode identification code performs string matching decoding on the decoded block.
  24. 一种数据压缩的解码装置,包括:A decoding device for data compression, comprising:
    解析模块,设置为解析压缩数据码流,获取受限串模式的信息;a parsing module configured to parse the compressed data stream to obtain information of the restricted string mode;
    解码模块,设置为根据所述受限串模式的信息从预设的多种受限串模式中选择一种受限串模式对解码块进行串复制解码。 The decoding module is configured to perform string copy decoding on the decoded block by selecting one of the preset multiple string modes according to the restricted string mode information.
PCT/CN2017/073247 2016-02-10 2017-02-10 Encoding and decoding method and device for data compression WO2017137006A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
US16/090,101 US10820016B2 (en) 2016-02-10 2017-02-10 Encoding and decoding method and device for data compression
EP17749897.9A EP3416389B1 (en) 2016-02-10 2017-02-10 Encoding and decoding method and device for data compression

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN201610083476.5 2016-02-10
CN201610083476 2016-02-10
CN201710069807.4 2017-02-08
CN201710069807.4A CN107071450B (en) 2016-02-10 2017-02-08 Coding and decoding method and device for data compression

Publications (1)

Publication Number Publication Date
WO2017137006A1 true WO2017137006A1 (en) 2017-08-17

Family

ID=59563642

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/073247 WO2017137006A1 (en) 2016-02-10 2017-02-10 Encoding and decoding method and device for data compression

Country Status (1)

Country Link
WO (1) WO2017137006A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111131826A (en) * 2018-10-31 2020-05-08 上海天荷电子信息有限公司 Data compression method and device for fixed-length code unit containing multiple coding parameter variable-length codes
CN112532988A (en) * 2020-06-02 2021-03-19 腾讯科技(深圳)有限公司 Video encoding method, video decoding method and related equipment
CN112637600A (en) * 2020-12-14 2021-04-09 绍兴文理学院 Method and apparatus for encoding and decoding data with lossy or lossless compression

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104244007A (en) * 2013-06-13 2014-12-24 上海天荷电子信息有限公司 Image compression method and device based on arbitrary shape matching
US20150229971A1 (en) * 2014-02-07 2015-08-13 Mediatek Singapore Pte. Ltd. Method of Coding Based on String Matching for Video Compression

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104244007A (en) * 2013-06-13 2014-12-24 上海天荷电子信息有限公司 Image compression method and device based on arbitrary shape matching
US20150229971A1 (en) * 2014-02-07 2015-08-13 Mediatek Singapore Pte. Ltd. Method of Coding Based on String Matching for Video Compression

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
CHEN, XIANYI ET AL.: "2D intra string copy for screen content coding", JOURNAL OF COMPUTER APPLICATIONS, 10 September 2015 (2015-09-10), pages 2641 - 2644, XP055406015, ISSN: 1001-9081 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111131826A (en) * 2018-10-31 2020-05-08 上海天荷电子信息有限公司 Data compression method and device for fixed-length code unit containing multiple coding parameter variable-length codes
CN112532988A (en) * 2020-06-02 2021-03-19 腾讯科技(深圳)有限公司 Video encoding method, video decoding method and related equipment
CN112637600A (en) * 2020-12-14 2021-04-09 绍兴文理学院 Method and apparatus for encoding and decoding data with lossy or lossless compression
CN112637600B (en) * 2020-12-14 2024-04-05 绍兴文理学院 Method and device for encoding and decoding data in a lossy or lossless compression mode

Similar Documents

Publication Publication Date Title
CN107071450B (en) Coding and decoding method and device for data compression
RU2682838C1 (en) Method and device for coding with transformation with choice of transformation of the block level and implicit alarm system within the framework of the hierarchical division
US10397575B2 (en) Image coding apparatus, image coding method, and program, and image decoding apparatus, image decoding method, and program
KR101620191B1 (en) Coding position data for the last non-zero transform coefficient in a coefficient group
JP6042943B2 (en) Video decoding method and video decoding device
US7764842B2 (en) Image encoding method, image decoding method, image encoding apparatus, image decoding apparatus, image encoding program, and image decoding program
US9497461B2 (en) Method and apparatus for encoding frequency transformed block using frequency mask table, and method and apparatus for encoding/decoding video using same
KR101609468B1 (en) Transposing a block of transform coefficients, based upon an intra-prediction mode
CN110800299B (en) Scan order adaptation for entropy coding blocks of image data
WO2015078422A1 (en) Image encoding and decoding method and device
CN104853211A (en) Image compression method and apparatus employing various forms of reference pixel storage spaces
WO2017211306A1 (en) Methods and devices for decoding compressed stream of video data and encoding video data
US20110243220A1 (en) Method and apparatus for encoding and decoding image and method and apparatus for decoding image using adaptive coefficient scan order
US10368086B2 (en) Image coding/decoding method, device, and system
KR20110112171A (en) Method and apparatus for video encoding, and method and apparatus for video decoding using adaptive coefficient scan order
TW202027505A (en) Unified transform type signaling and transform type dependent transform coefficient level coding
JP5400133B2 (en) Encoding and decoding images or image sequences sliced into linearly shaped pixel partitions
WO2017137006A1 (en) Encoding and decoding method and device for data compression
US20230044030A1 (en) Determining a parametrization for context-adaptive binary arithmetic coding
CN110870312A (en) Method and apparatus for intra coding in video compression
CN110944178B (en) Data compression encoding method and device, and data compression decoding method and device
JP2014096638A (en) Image encoder, image encoding method, image encoding program, image decoder, image decoding method and image decoding program
KR20160091392A (en) Method for encoding and decoding images, device for encoding and decoding images and corresponding computer programs
KR102248172B1 (en) Method and apparatus for video encoding/decoding using image analysis
US20060278725A1 (en) Image encoding and decoding method and apparatus, and computer-readable recording medium storing program for executing the method

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: 17749897

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

WWE Wipo information: entry into national phase

Ref document number: 2017749897

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 2017749897

Country of ref document: EP

Effective date: 20180910