Coding and decoding method and device for different types of strings by adopting different length binarization schemes

文档序号:118227 发布日期:2021-10-19 浏览:42次 中文

阅读说明:本技术 不同类型串采用不同长度二值化方案的编解码方法及装置 (Coding and decoding method and device for different types of strings by adopting different length binarization schemes ) 是由 林涛 张文娟 周开伦 赵利平 王慧慧 焦孟草 王淑慧 于 2021-06-07 设计创作,主要内容包括:本发明公开了一种不同类型串采用不同长度二值化方案的编解码方法及装置,通过对等数值串的串长度参数和单位基矢量串的串长度参数分别采用两种至少具有不同的但又有关联的取值范围区间划分二值化及其对应的反二值化。本发明适用于对数据进行有损压缩或无损压缩的编码和解码,适用于一维数据、二维或以上维度的数据的编码和解码。(The invention discloses a coding and decoding method and a device for different types of strings by adopting different length binarization schemes. The invention is suitable for coding and decoding data by lossy compression or lossless compression, and is suitable for coding and decoding one-dimensional data and data with two or more dimensions.)

1. A method for encoding by combining point prediction and string prediction, characterized by comprising at least the steps of:

the string length parameter of the equal-value string called as a first string is binarized by adopting a first string length binarization scheme, and the string length parameter of the unit base vector string which is symmetrical to a second string is binarized by adopting a second string length binarization scheme, wherein the two schemes at least have different and preset associated value range interval division.

2. An apparatus for encoding a combination of point prediction and string prediction, comprising at least the following modules for:

the string length parameter of the equal-value string called as a first string is binarized by adopting a first string length binarization scheme, and the string length parameter of the unit base vector string which is symmetrical to a second string is binarized by adopting a second string length binarization scheme, wherein the two schemes at least have different and preset associated value range interval division.

3. A decoding method combining point prediction and string prediction, characterized by comprising at least the steps of:

the string length parameter of the equal-value string called as a first string is subjected to inverse binarization by adopting a first string length inverse binarization scheme, and the string length parameter of the unit base vector string which is symmetrical as a second string is subjected to inverse binarization by adopting a second string length inverse binarization scheme, wherein the two schemes at least have different and preset associated value range interval division.

4. A decoding device combining point prediction and string prediction, characterized by comprising at least the following modules for:

the string length parameter of the equal-value string called as a first string is subjected to inverse binarization by adopting a first string length inverse binarization scheme, and the string length parameter of the unit base vector string which is symmetrical as a second string is subjected to inverse binarization by adopting a second string length inverse binarization scheme, wherein the two schemes at least have different and preset associated value range interval division.

5. The decoding method or device according to claim 3 or 4, wherein in the case where the original data is a sequence comprising an image, a sequence of images, an array or array of two-dimensional data elements of video, the entire compression unit comprises a macroblock, a coding unit CU, a sub-region of a CU, a sub-coding unit SubCU, a prediction block, a prediction unit PU, a sub-region of a PU, a sub-prediction unit SubPU, a transform block, a transform unit TU, a sub-region of a TU, a sub-transform unit SubTU.

6. The decoding method or device combining point prediction and string prediction according to claim 3 or 4, wherein the predetermined association is:

1) the first string length binarization or anti-binarization scheme divides the value range of the string length parameter into M intervals, the second string length binarization or anti-binarization scheme divides the value range of the string length parameter into N intervals, and M is larger than N;

alternatively, the first and second electrodes may be,

2) the common value range of the string length minus one of the equal value string and the string length minus one of the unit base vector string is an interval [0, T), namely, all integers which are greater than or equal to 0 and less than T;

the first string length binarization or inverse binarization scheme divides the value range of string length minus one into MInterval: [ I ] ofm,Im+1) M is 0 to M-1, wherein I0=0,IM=T;

The second string length binarization or inverse binarization scheme divides the value range of the string length minus one into N intervals: [ J ]n,Jn+1) N is 0 to N-1, wherein J0=0,JN=T;

M>N;

Alternatively, the first and second electrodes may be,

3) the common value range of the string length minus one of the equal value string and the string length minus one of the unit base vector string is an interval [0, T), namely, all integers which are greater than or equal to 0 and less than T;

the first string length binarization or inverse binarization scheme divides the value range of the string length minus one into M intervals: [ I ] ofm,Im+1) M is 0 to M-1, wherein I0=0,IM=T;

The second string length binarization or anti-binarization scheme divides the value range of the string length minus one into M-1 intervals: [0, I ]2),[Jm,Jm+1) M is 2 to M-1, wherein IM=T;

Alternatively, the first and second electrodes may be,

4) the common value range of the string length minus one of the equal value string and the string length minus one of the unit base vector string is the interval [0,2P) I.e. greater than or equal to 0 and less than 2PAll integers of (a);

the first string length binarization or inverse binarization scheme divides the value range of the string length minus one into P +1 intervals: [0,1),[2p,2p+1),p=0~P-1;

The second string length binarization or inverse binarization scheme divides the value range of the string length minus one into P intervals: [0,2),[2p,2p+1),p=1~P-1。

7. The decoding method or device according to claim 3 or 4, wherein the decoding method or device comprises the steps of,

the total number of elements of the whole compression unit is T, and T is the power P of 2, namely T is 2PThe number of elements currently encoded or decoded in the whole compression unit is U, and the number of remaining elements currently to be encoded or decoded in the whole compression unit is V ═ T-U, obviously, V ≧ 1 and V is the current maximum value of the values that the string length to be currently encoded or decoded may take, that is, the value range of the string length to be currently encoded or decoded minus one is [0, V); the predetermined association is:

1) the first string length binarization or anti-binarization scheme divides the total value range of the string length parameters into M intervals, the second string length binarization or anti-binarization scheme divides the total value range of the string length parameters into N intervals, and M is larger than N;

if the current string to be coded or decoded is an equal numerical string, dividing the current value range of the length parameter of the current string to be coded or decoded into MVA section wherein MVM is less than or equal to M, and the values possibly taken by the string length parameter to be currently encoded or decoded all fall within the MVWithin each interval;

if the current string to be coded or decoded is a unit base vector string, the current value range of the length parameter of the current string to be coded or decoded is divided into NVA section in which NVN and the possible values of the string length parameter to be currently encoded or decoded all fall within the NVWithin each interval;

alternatively, the first and second electrodes may be,

2) the common total value range of the string length minus one of the equal value string and the string length minus one of the unit base vector string is an interval [0, T ], namely all integers which are greater than or equal to 0 and less than T;

the first string length binarization or inverse binarization scheme divides the total value range of the string length minus one into M intervals: [ I ] ofm,Im+1) M is 0 to M-1, wherein I0=0,IM=T;

The second string length binarization or inverse binarization scheme divides the total value range of the string length minus one into N intervals: [ J ]n,Jn+1) N is 0 to N-1, wherein J0=0,JN=T;

M>N;

If the current string to be coded or decoded is an equal numerical string, dividing the current value range of the length of the current string to be coded or decoded minus one into MVThe individual interval: [ I ] ofm,I2m+1),m=0~MV-1, wherein I0=0,IMv-1<V≤IMv,I2m+1=min(Im+1,V);

If the current string to be coded or decoded is a unit base vector string, dividing the current value range of the length of the current string to be coded or decoded minus one into NVThe individual interval: [ J ]n,J2n+1),n=0~NV-1, wherein, J0=0,JNv-1<V≤JNv,J2n+1=min(Jn+1,V);

Alternatively, the first and second electrodes may be,

3) the common total value range of the string length minus one of the equal value string and the string length minus one of the unit base vector string is an interval [0, T), namely, all integers which are greater than or equal to 0 and less than T;

the first string length binarization or inverse binarization scheme divides the total value range of the string length minus one into M intervals: [ I ] ofm,Im+1) M is 0 to M-1, wherein I0=0,IM=T;;

The second string length binarization or anti-binarization scheme divides the total value range of the string length minus one into M-1 intervals: [0, I ]2),[Jm,Jm+1) M is 2 to M-1, wherein IM=T

If the current string to be coded or decoded is an equal numerical string, dividing the current value range of the length of the current string to be coded or decoded minus one into MVThe individual interval: [ I ] ofm,I2m+1),m=0~MV-1, wherein I0=0,IMv-1<V≤IMv,I2m+1=min(Im+1,V);

If the current string to be coded or decoded is a unit base vector string, dividing the current value range of the length of the current string to be coded or decoded minus one into the following intervals according to the following mode:

if V is less than or equal to I2Then, the current value range of the current string length to be coded or decoded minus one is divided into 1 interval: [0, V);

otherwise, I is2<V, dividing the current value range of the current string length to be coded or decoded minus one into MV-1 interval: [0, I ]2),[Im,I2m+1),m=2~MV-1, wherein MV≥3,IMv-1<V≤IMv,I2m+1=min(Im+1,V);

Alternatively, the first and second electrodes may be,

4) the common total value range of the string length minus one of the equal value strings and the string length minus one of the unit base vector strings is an interval [0,2 ]P) I.e. greater than or equal to 0 and less than 2PAll integers of (a);

the first string length binarization or inverse binarization scheme divides the total value range of the string length minus one into P +1 intervals: [0,1),[2p,2p+1),p=0~P-1;;

The second string length binarization or inverse binarization scheme divides the total value range of the string length minus one into P intervals: [0,2),[2p,2p+1),p=1~P-1;

If the current string to be coded or decoded is an equal numerical string, dividing the current value range of the length of the current string to be coded or decoded minus one into the following intervals according to the following mode:

if V is 1, dividing the current value range of the current string length to be coded or decoded minus one into 1 interval: [0, 1);

otherwise, namely V>1, dividing the current value range of the current string length to be coded or decoded minus one into PV+1 intervals: [0,1),[2p,I2p+1),p=0~PV-1, wherein PV=ceil(log2(V)), ceil () is a ceiling operation, I2p+1=min(2p+1,V);

If the current string to be coded or decoded is a unit base vector string, dividing the current value range of the length of the current string to be coded or decoded minus one into the following intervals according to the following mode:

if V is less than or equal to 2, dividing the current value range of the current string length to be coded or decoded minus one into 1 interval: [0, V);

otherwise, namely V>2, dividing the current value range of the current string length to be coded or decoded minus one into PV intervals: [0,2),[2p,I2p+1),p=1~PV-1, wherein PV≥2,2Pv-1<V≤2Pv,I2p+1=min(2p+1,V)。

8. The decoding method or device according to claim 7, wherein the total number of elements T of the whole compression unit is equal to 16, 32, 64, 128, 256, 512, 1024, 2048;

the number of intervals generated after dividing the current value range of reducing the string length by SLminus1 is recorded as S, and S intervals are recorded as [ R ]s,Rs+1) S is 0 to S-1, wherein R is0=0,RSV, s is called the section number, RsReferred to as the start of the interval s;

reducing the string length by SLminus1 to be represented as a Prefix SLminus1Prefix, a Infix SLminus1Infix and a Suffix SLminus1Suffix, and respectively using a truncated unary code, a 1 or multi-bit fixed length code and a 1-bit fixed length code to carry out binarization and anti-binarization on the Prefix, the Infix and the Suffix;

the prefix represents which interval of the S intervals the value of SLminus1 is located in, namely represents an interval serial number S;

the infixes and/or suffixes represent the distance of the value of SLminus1 relative to the start of the interval, i.e. represent the difference SLminus1-Rs between the value of SLminus1 and Rs.

9. The decoding method or device according to claim 3 or 4, wherein the decoding method or device comprises the steps of,

s, R if the string currently to be encoded or decoded is an equal-valued strings,Rs+1The values are as follows:

when V is 1, S is 1, R0=0,R1=1;

When V is>1, S ═ ceil (log)2(V)) +1, ceil () is a ceiling operation, R0=0,Rs=2s-1,s=1~S-1,RS=V;

S, R if the current string to be encoded or decoded is a string of unit basis vectorss,Rs+1The values are as follows:

when V is less than or equal to 2, S is 1, R0=0,R1=2;

When V is>2, S ═ ceil (log)2(V)), ceil () is a ceiling operation, R0=0,Rs=2s,s=1~S-1,RS=V;

In the case that the string to be currently encoded or decoded is an equal-valued string or a unit basis vector string, the binarization or anti-binarization schemes of the Prefix SLminus1Prefix, the Suffix SLminus1Infix, and the Suffix SLminus1Suffix are as follows:

carrying out binarization and inverse binarization on the prefix by adopting a truncated unary code with the maximum value maxVal ═ S-1;

for example: when S is 5, maxVal is 4, and the section number S indicated by the prefix is 0, and the truncated unary code binary symbol strings of 1,01,001,0001, and 0000 are respectively;

using len-ceil (log) with length, i.e. binary digit, for infixes2(min(V,Rs+1)-Rs) Fixed length code of-1 is binarized and anti-binarized, but len)<When the code stream is 1, the value of the Infix SLminus1Infix is equal to 0 by default, the Infix does not exist in the code stream, and binarization and inverse binarization are not required to be carried out;

if the value of the middle affix SLminus1Infix is greater than or equal to 2len+1-(min(V,Rs+1)-Rs) And (min (V, R)s+1)-Rs)>1, performing binarization and inverse binarization on the Suffix by adopting a k-1 bit fixed length code, otherwise, defaulting the value of the Suffix SLminus1Suffix to be equal to 0, not existing the Suffix in the code stream, and not needing binarization and inverse binarization, and defaulting k to be equal to 0;

from the value of the prefix SLminus1, i.e. the interval number s, the value of the middle prefix SLminus1Infix, the value of the Suffix SLminus1Suffix, the value of len +1, the value of k, the string length minus one SLminus1 and the string length StringLength are calculated as follows:

SLminus1=Rs+SLminus1Infix×2k+SLminus1Suffix-(2len+1-(min(V,Rs+1)-Rs))×k,

StringLength=SLminus1+1。

10. the decoding method or device according to claim 9, wherein the decoding method or device comprises the steps of,

if the current string to be coded or decoded is an equal numerical string, dividing the current value range of the string length minus SLminus1, and carrying out binarization and inverse binarization on a Prefix SLminus1Prefix, an Infix SLminus1Infix and a Suffix SLminus1 Suffix; the syntax description table for the process of calculating string length minus SLminus1 and string length StringLength is:

SL _ minus1_ prefix, SL _ minus1_ infix, and SL _ minus1_ suffix in the table denote syntax elements present in the codestream;

if the current string to be coded or decoded is a unit base vector string, dividing the current value range of the string length minus SLminus1, and carrying out binarization and inverse binarization on a Prefix SLminus1Prefix, an Infix SLminus1Infix and a Suffix SLminus1 Suffix; the syntax description table for the process of calculating string length minus SLminus1 and string length StringLength is:

SL _ minus1_ prefix, SL _ minus1_ infix, and SL _ minus1_ suffix in the table denote syntax elements present in the codestream.

Technical Field

The present invention relates to an encoding and decoding system for lossy or lossless compression of data, and more particularly to an encoding method and a decoding method for compressing data using point prediction and point vectors.

Background

With the human society entering the era of artificial intelligence, big data, virtual reality, augmented reality, mixed reality, cloud computing, mobile computing, cloud-mobile computing, ultra-high definition (4K) and ultra-high definition (8K) video image resolution, 4G/5G communication, it becomes an indispensable technology to perform ultra-high compression ratio and extremely high quality data compression on various data including big data, image data, video data, and various new forms of data.

A data set is a set of data elements (e.g., bytes, bits, pixels, pixel components, spatial sampling points, transform domain coefficients).

When encoding or decoding a data set (abbreviated as "codec"), data elements are usually ordered according to a predetermined rule, that is, in a predetermined order, and then encoded and decoded in the order.

When encoding (and correspondingly decoding) data compression of a data set (e.g., a one-dimensional data queue, a two-dimensional data file, a frame of image, a video sequence, a transform domain, a transform block, a plurality of transform blocks, a three-dimensional scene, a sequence of continuously-changing three-dimensional scenes) arranged in a certain spatial (one-dimensional, two-dimensional, or multi-dimensional) shape, especially a two-dimensional or more data sets, the data set is sometimes divided into a plurality of subsets having predetermined shapes and/or sizes (i.e., the number of elements), called whole compression units, and the data set is encoded or decoded in units of whole compression units, in a predetermined order, in units of whole compression units. At any one time, the integer compression unit being encoded or decoded is referred to as the current integer compression unit. A data element (also sometimes simply referred to as an element) being encoded or decoded is referred to as a currently encoded data element or a currently decoded data element, collectively referred to as a current data element, simply referred to as a current element. An element consists of N components (typically 1 ≦ N ≦ 5), so both the data set and the entire compression unit consist of N components. The components of an element are also referred to as component elements.

For example, elements of one frame image, i.e., pixels, are arranged in a rectangular shape, have a size (resolution) of 1920 (width) x 1080 (height), and are composed of 3 components: g (green), B (blue), R (red) or Y (luminance), U (Cb), V (Cr).

The relationship between the multi-component data set as an encoding object and the sampling rates of the components of the integral compression unit is generally expressed in a sampling format. For example, for an array of two-dimensional data elements of the type comprising computer-generated graphics and text-containing images, a sampling format known as 4:4:4 (or simply 444) is commonly employed, i.e., 3 components of the data set all have the same sampling rate and size (i.e., number of component samples). For another type of two-dimensional data element array, including natural images and videos captured by a camera, a sampling format called 4:2:0 (abbreviated 420) is commonly used, that is, the sampling rate and size of 2 components called minor components (D-component and E-component) of a data set (e.g., an image or video) having a rectangular shape and 3 components are each one quarter of the other component called major component (F-component), that is, there is a 4:1 downsampling relationship between the major and minor components. In this case, one D component D [ i ] [ j ] and one E component E [ i ] [ j ] correspond to four (2 × 2) F components F [2i ] [2j ], F [2i +1] [2j ], F [2i ] [2j +1], F [2i +1] [2j +1 ]. If the resolution of the F component is 2 mx 2N (2M component elements horizontally, 2N component elements vertically), i.e., the F component of the data set is F ═ { F [ M ] [ N ]: M-0-2M-1, N-0-2N-1, the resolutions of the D and E components are M × N (M component elements horizontally, N component elements vertically), i.e., the D and E components of the dataset are D { D [ M ] [ N ]: m is 0 to M-1, N is 0 to N-1, and E is { E [ M ] [ N ]: m is 0 to M-1, and N is 0 to N-1. Where higher quality is also required for the subcomponents, a sampling format called 4:2:2 (422 for short) is often used, i.e. the sampling rate and size of the 2 subcomponents (D-component and E-component) of a data set (e.g. an image or video) having a rectangular shape and 3 components are each half of the other principal component (F-component), i.e. there is a 2:1 down-sampling relationship between the principal and subcomponents. In this case, in one direction (e.g., horizontal direction) of a data set (e.g., image or video), one D component D [ i ] [ j ] and one E component E [ i ] [ j ] correspond to two (2 × 1) F components F [2i ] [ j ] and F [2i +1] [ j ]. If the resolution of the F component is 2 mxn, i.e., the F component of the dataset is F ═ F [ M ] [ N ]: m is 0 to 2M-1, N is 0 to N-1, and the resolutions of the D and E components are mxn, respectively, i.e., the D and E components of the dataset are D { D [ M ] [ N ]: m is 0 to M-1, N is 0 to N-1, and E is { E [ M ] [ N ]: m is 0 to M-1, and N is 0 to N-1. In images and video in YUV color format, the F, D, E components described above are typically Y, U, V components, respectively. In images and video in RGB color format, the F, D, E components described above are typically G, B, R components or G, R, B components, respectively. Where the data is an image or video, the sampling format is also often referred to as a chroma format. The chroma format in which the components all have the same sampling rate is referred to as the panchromatic format. A chroma format having a downsampled relationship between a portion of components and another portion of components is referred to as a downsampled chroma format.

In the case of a data set divided into whole compression units, one predetermined rule of ordering is to first order the whole compression units, and then order the elements within each whole compression unit.

One effective means of data compression is string prediction, also known as string matching. The string prediction divides an element of a current whole compression unit into element strings with variable length after being arranged according to a preset scanning mode, and obtains a reference element string, called a reference string or a prediction string or a matching string of the current string, which has the same or similar numerical value with the current string, in a set or a subset of elements called a reference set and subjected to coding and decoding with preset degree, wherein the set is called the reference set. For a reference string of a current string, only a plurality of coding parameters are needed to record the position and/or shape and/or size and/or dimension of the reference string in a reference set, and the numerical value of each element in the current string is not needed to be recorded one by one, so that all elements of the current string and the numerical value thereof can be completely represented, and the purpose of data compression is achieved.

For example, if a current string ordered according to a predetermined scanning manner can find a corresponding reference string in a reference set, only two encoding parameters, namely, the position relationship between the first element, i.e., the starting element, of the current string and the first element, i.e., the starting element, of the reference string and the string length (the number of elements in the string) need to be used to record the position and size of the reference string in the reference set, and the numerical value of each element in the current string itself does not need to be recorded one by one, so that all elements of the current string and the numerical value thereof can be completely represented. The number of bits consumed by recording the two encoding parameters is often much less than the number of bits consumed by recording the numerical value of each element in the current string one by one, so that the purpose of data compression is achieved.

In string prediction, unpredictable elements may also be present in the reference set for which no reference element is found. The components, principal components, and secondary components of the unpredictable element are referred to as unpredictable components, unpredictable principal components, and unpredictable secondary components, respectively.

Scanning methods often used in string prediction include:

horizontal raster scanning: the elements in the whole compression unit are arranged one by one along the horizontal direction, the next row is arranged after one row is arranged, and all the in-row scanning directions are arranged from left to right or all the in-row scanning directions are arranged from right to left.

Or

Horizontal back and forth scanning is also known as reciprocating scanning or arcuate scanning: the elements in the whole compression unit are arranged one by one along the horizontal direction, the next row is arranged after the row is arranged, the in-row scanning direction of one row in any two adjacent rows is arranged from left to right, the in-row scanning direction of the other row is arranged from right to left, the row arranged from left to right is called a forward row, and the row arranged from right to left is called a reverse row;

or

Vertical raster scanning: the elements in the whole compression unit are arranged one by one along the vertical direction, the next column is arranged after one column is arranged, and all in-column scanning directions are arranged from top to bottom or all in-column scanning directions are arranged from bottom to top;

or

The vertical back and forth scan is also called a back and forth scan or an arcuate scan: the elements in one whole compression unit are arranged one by one along the vertical direction, the next column is arranged after one column is arranged, the in-column scanning direction of one column in any two adjacent columns is arranged from top to bottom, the in-column scanning direction of the other column is arranged from bottom to top, the columns arranged from top to bottom are called positive columns, and the columns arranged from bottom to top are called reverse columns.

The first element in the scan, i.e., the permutation, of the string is called the starting element and the last element in the scan, i.e., the permutation, of the string is called the terminating element.

Point prediction is a variant of string prediction and is also an efficient means of data compression.

The point prediction technique stores the positions of a plurality of data elements in the data set, which have been coded and decoded to a predetermined degree and whose values frequently repeatedly appear in or near the current whole compression unit, called common positions, in a common position array, and each common position stored in the array is marked by an index. The data elements in the current positions are used as reference elements or prediction elements or matching elements. An equal-value string to be encoded or decoded with equal values in the current whole compression unit only needs to use an encoding parameter called an index and an encoding parameter of the length of the equal-value string, which is the number of times of repetition of a constant-current position indicated by the index, to indicate that the values of all elements of the equal-value string are equal to the values of the elements at the constant-current position indicated by the index (the constant-current position may be the position of a certain element in a data set before the equal-value string, or the position of the first element of the equal-value string), and does not need to record the values of each element in the equal-value string one by one, thereby achieving the purpose of data compression. The commonly occurring location is typically represented by a point vector, and the commonly occurring location array is typically a point vector array, i.e., an array of stored point vectors.

In the point prediction technique, the reference elements are all single data elements (data elements at the current position), and whether down-sampling is performed on a single data element is not referred to, and it is considered that the data element has all components. Therefore, even in the point prediction of the downsampled chroma format such as the 420-sample format and the 422-sample format, each reference element has 3 components in its entirety. In fact, in the point prediction technique of the downsampled chroma format, the reference elements are all full-component elements having a 444 sample format after the original elements of the 420 sample format and the 422 sample format are subjected to upsampling including clustering and/or filtering.

In the string prediction technique, the strings that occur most frequently are strings in which the reference string is located one unit distance directly above the current string in the horizontal scanning mode and strings in which the reference string is located one unit distance directly to the left of the current string in the vertical scanning mode, which are collectively referred to as unit base vector strings.

Since the equal-valued string and the unit base vector string are two strings that occur most frequently, in a compression technique combining point prediction and string prediction, an entire compression unit is compressed using at least the equal-valued string and the unit base vector string.

Binarization of the coding parameters is an important step in entropy coding of the coding parameters. Binarization converts a value of the coding parameter into a binary string of symbols, also called binary codeword. And carrying out binary entropy coding on the generated binary symbol string. Inverse binarization is the inverse operation of binarization, converting a binary symbol string of the encoding parameter into a value of the encoding parameter. An example of binarization: the value range of one coding parameter is { v0, v1, v2, v3, v4}, and a total of 5 values can be taken, and binarization converts the 5 values v0, v1, v2, v3 and v4 into binary symbol strings 00, 01, 10, 110 and 111 respectively. In the binary symbol string, the arrangement sequence of binary symbols is from left to right, and sequentially includes the 1 st bit, the 2 nd bit, the 3 rd bit and the like. Binarization must satisfy a basic condition: any one binary symbol string cannot be the beginning of another binary symbol string.

One important coding parameter in string prediction or point prediction is a string length parameter. The most common string length parameters include:

1) a string length, stringelength, representing the number of elements in the string (obviously, the string length is always greater than or equal to 1);

2) the string length, representing the number of elements in the string minus one, is reduced by one SLminus1 (obviously, the string length minus one is always greater than or equal to 0).

In the prior art of combining point prediction and string prediction, the string length parameter of a numerical string and the string length parameter of a unit base vector string are subjected to binarization and inverse binarization by adopting the same binarization and an inverse binarization scheme corresponding to the same binarization. However, since the string length parameter of the equal-value string and the string length parameter of the unit basis vector string have different characteristics, the same binarization and the corresponding inverse binarization scheme are adopted, which is beneficial to reducing the implementation complexity, but has negative influence on the encoding efficiency.

Disclosure of Invention

In order to solve the problem of the combination technology of point prediction and string prediction, the invention provides a length binarization technology for performing binarization and inverse binarization by respectively adopting two binarization schemes which at least have different but related value range division and are corresponding to the binarization schemes for the string length parameter of an equivalent numerical string and the string length parameter of a unit base vector string.

The technical purpose of the invention is realized by the following technical scheme:

a coding method combining point prediction and string prediction at least comprises the following functions and operations:

the string length parameter of the equal-value string called as a first string is binarized by adopting a first string length binarization scheme, and the string length parameter of the unit base vector string which is symmetrical to a second string is binarized by adopting a second string length binarization scheme, wherein the two schemes at least have different and preset associated value range interval division.

An encoding apparatus combining point prediction and string prediction, comprising at least modules for performing the following functions and operations:

the string length parameter of the equal-value string called as a first string is binarized by adopting a first string length binarization scheme, and the string length parameter of the unit base vector string which is symmetrical to a second string is binarized by adopting a second string length binarization scheme, wherein the two schemes at least have different and preset associated value range interval division.

A decoding method combining point prediction and string prediction, comprising at least the following steps of:

the string length parameter of the equal-value string called as a first string is subjected to inverse binarization by adopting a first string length inverse binarization scheme, and the string length parameter of the unit base vector string which is symmetrical as a second string is subjected to inverse binarization by adopting a second string length inverse binarization scheme, wherein the two schemes at least have different and preset associated value range interval division.

A decoding apparatus combining point prediction and string prediction, comprising at least the following modules for performing the functions and operations:

the string length parameter of the equal-value string called as a first string is subjected to inverse binarization by adopting a first string length inverse binarization scheme, and the string length parameter of the unit base vector string which is symmetrical as a second string is subjected to inverse binarization by adopting a second string length inverse binarization scheme, wherein the two schemes at least have different and preset associated value range interval division.

Further, in the decoding method or the decoding apparatus, in a case where the original data is a sequence including an image, a sequence of images, an array or an array of two-dimensional data elements of a video, the entire compression unit includes a macroblock, a coding unit CU, a sub-region of the CU, a sub-coding unit SubCU, a prediction block, a prediction unit PU, a sub-region of the PU, a sub-prediction unit SubPU, a transform block, a transform unit TU, a sub-region of the TU, a sub-transform unit SubTU.

Further, in the decoding method or the decoding apparatus, the predetermined association is:

1) the first string length binarization or anti-binarization scheme divides the value range of the string length parameter into M intervals, the second string length binarization or anti-binarization scheme divides the value range of the string length parameter into N intervals, and M is larger than N;

alternatively, the first and second electrodes may be,

2) the common value range of the string length minus one of the equal value string and the string length minus one of the unit base vector string is an interval [0, T), namely, all integers which are greater than or equal to 0 and less than T;

the first string length binarization or inverse binarization scheme divides the value range of the string length minus one into M intervals: [ I ] ofm,Im+1) M is 0 to M-1, wherein I0=0,IM=T;

The second string length binarization or inverse binarization scheme divides the value range of the string length minus one into N intervals: [ J ]n,Jn+1) N is 0 to N-1, wherein J0=0,JN=T;

M>N;

Alternatively, the first and second electrodes may be,

3) the common value range of the string length minus one of the equal value string and the string length minus one of the unit base vector string is an interval [0, T), namely, all integers which are greater than or equal to 0 and less than T;

the first string length binarization or inverse binarization scheme divides the value range of the string length minus one into M intervals: [ I ] ofm,Im+1) M is 0 to M-1, wherein I0=0,IM=T;

The second string length binarization or anti-binarization scheme divides the value range of the string length minus one into M-1 intervals: [0, I ]2),[Jm,Jm+1) M is 2 to M-1, wherein IM=T;

Alternatively, the first and second electrodes may be,

4) the common value range of the string length minus one of the equal value string and the string length minus one of the unit base vector string is the interval [0,2P) I.e. greater than or equal to 0 and less than 2PAll integers of (a);

the first string length binarization or inverse binarization scheme divides the value range of the string length minus one into P +1 intervals: [0,1),[2p,2p+1),p=0~P-1;

The second string length binarization or inverse binarization scheme divides the value range of the string length minus one into P intervals: [0,2),[2p,2p+1),p=1~P-1。

Further, in the decoding method or the decoding apparatus,

the total number of elements of the whole compression unit is T, and T is the power P of 2, namely T is 2PThe number of elements currently encoded or decoded in the whole compression unit is U, and the number of remaining elements currently to be encoded or decoded in the whole compression unit is V ═ T-U, obviously, V ≧ 1 and V is the current maximum value of the values that the string length to be currently encoded or decoded may take, that is, the value range of the string length to be currently encoded or decoded minus one is [0, V); the predetermined association is:

1) the first string length binarization or anti-binarization scheme divides the total value range of the string length parameters into M intervals, the second string length binarization or anti-binarization scheme divides the total value range of the string length parameters into N intervals, and M is larger than N;

if the current string to be coded or decoded is an equal numerical string, dividing the current value range of the length parameter of the current string to be coded or decoded into MVA section wherein MVM is less than or equal to M, and the values possibly taken by the string length parameter to be currently encoded or decoded all fall within the MVWithin each interval;

if the current string to be coded or decoded is a unit base vector string, the current value range of the length parameter of the current string to be coded or decoded is divided into NVA section in which NVN and the possible values of the string length parameter to be currently encoded or decoded all fall within the NVWithin each interval;

alternatively, the first and second electrodes may be,

2) the common total value range of the string length minus one of the equal value string and the string length minus one of the unit base vector string is an interval [0, T ], namely all integers which are greater than or equal to 0 and less than T;

the first string length binarization or inverse binarization scheme divides the total value range of the string length minus one into M intervals: [ I ] ofm,Im+1) M is 0 to M-1, wherein I0=0,IM=T;

The second string length binarization or inverse binarization scheme is toThe total value range of the string length minus one is divided into N intervals: [ J ]n,Jn+1) N is 0 to N-1, wherein J0=0,JN=T;

M>N;

If the current string to be coded or decoded is an equal numerical string, dividing the current value range of the length of the current string to be coded or decoded minus one into MVThe individual interval: [ I ] ofm,I2m+1),m=0~ MV-1, wherein I0=0,IMv-1<V≤IMv,I2m+1=min(Im+1,V);

If the current string to be coded or decoded is a unit base vector string, dividing the current value range of the length of the current string to be coded or decoded minus one into NVThe individual interval: [ J ]n,J2n+1),n=0~ NV-1, wherein, J0=0,JNv-1<V≤JNv,J2n+1=min(Jn+1,V);

Alternatively, the first and second electrodes may be,

3) the common total value range of the string length minus one of the equal value string and the string length minus one of the unit base vector string is an interval [0, T), namely, all integers which are greater than or equal to 0 and less than T;

the first string length binarization or inverse binarization scheme divides the total value range of the string length minus one into M intervals: [ I ] ofm,Im+1) M is 0 to M-1, wherein I0=0,IM=T;;

The second string length binarization or anti-binarization scheme divides the total value range of the string length minus one into M-1 intervals: [0, I ]2),[Jm,Jm+1) M is 2 to M-1, wherein IM=T

If the current string to be coded or decoded is an equal numerical string, dividing the current value range of the length of the current string to be coded or decoded minus one into MVThe individual interval: [ I ] ofm,I2m+1),m=0~MV-1, wherein I0=0,IMv-1<V≤IMv,I2m+1=min(Im+1,V);

If the current string to be coded or decoded is a unit base vector string, dividing the current value range of the length of the current string to be coded or decoded minus one into the following intervals according to the following mode:

if V is less than or equal to I2Then, the current value range of the current string length to be coded or decoded minus one is divided into 1 interval: [0, V);

otherwise, I is2<V, dividing the current value range of the current string length to be coded or decoded minus one into MV-1 interval: [0, I ]2),[Im,I2m+1),m=2~MV-1, wherein MV≥3, IMv-1<V≤IMv,I2m+1=min(Im+1,V);

Alternatively, the first and second electrodes may be,

4) the common total value range of the string length minus one of the equal value strings and the string length minus one of the unit base vector strings is an interval [0,2 ]P) I.e. greater than or equal to 0 and less than 2PAll integers of (a);

the first string length binarization or inverse binarization scheme divides the total value range of the string length minus one into P +1 intervals: [0,1),[2p,2p+1),p=0~P-1;;

The second string length binarization or inverse binarization scheme divides the total value range of the string length minus one into P intervals: [0,2),[2p,2p+1),p=1~P-1;

If the current string to be coded or decoded is an equal numerical string, dividing the current value range of the length of the current string to be coded or decoded minus one into the following intervals according to the following mode:

if V is 1, dividing the current value range of the current string length to be coded or decoded minus one into 1 interval: [0, 1);

otherwise, namely V>1, dividing the current value range of the current string length to be coded or decoded minus one into PV+1 intervals: [0,1),[2p,I2p+1),p=0~PV-1, wherein PV=ceil(log2(V)), ceil () is a ceiling operation, I2p+1=min(2p+1,V);

If the current string to be coded or decoded is a unit base vector string, dividing the current value range of the length of the current string to be coded or decoded minus one into the following intervals according to the following mode:

if V is less than or equal to 2, dividing the current value range of the current string length to be coded or decoded minus one into 1 interval: [0, V);

otherwise, namely V>2, dividing the current value range of the current string length to be coded or decoded minus one into PV intervals: [0,2),[2p,I2p+1),p=1~PV-1, wherein PV≥2,2Pv-1< V≤2Pv,I2p+1=min(2p+1,V)。

Further, in the decoding method or the decoding apparatus, the total number of elements T of the whole compression unit is equal to 16, 32, 64, 128, 256, 512, 1024, or 2048;

the number of intervals generated after dividing the current value range of reducing the string length by SLminus1 is recorded as S, and S intervals are recorded as [ R ]s,Rs+1) S is 0 to S-1, wherein R is0=0,RSV, s is called the section number, RsReferred to as the start of the interval s;

reducing the string length by SLminus1 to be represented as a Prefix SLminus1Prefix, a Infix SLminus1Infix and a Suffix SLminus1Suffix, and respectively using a truncated unary code, a 1 or multi-bit fixed length code and a 1-bit fixed length code to carry out binarization and anti-binarization on the Prefix, the Infix and the Suffix;

the prefix represents which interval of the S intervals the value of SLminus1 is located in, namely represents an interval serial number S;

the infixes and/or suffixes represent the distance of the value of SLminus1 relative to the start of the interval, i.e. represent the difference SLminus1-Rs between the value of SLminus1 and Rs.

Further, in the decoding method or the decoding apparatus,

s, R if the string currently to be encoded or decoded is an equal-valued strings,Rs+1The values are as follows:

when V is 1, S is 1, R0=0,R1=1;

When V is>1, S ═ ceil (log)2(V)) +1, ceil () is a ceiling operation, R0=0,Rs= 2s-1,s=1~S-1,RS=V;

S, R if the current string to be encoded or decoded is a string of unit basis vectorss,Rs+1The values are as follows:

when V is less than or equal to 2, S is 1, R0=0,R1=2;

When V is>2, S ═ ceil (log)2(V)), ceil () is a ceiling operation, R0=0,Rs=2s, s=1~S-1,RS=V;

In the case that the string to be currently encoded or decoded is an equal-valued string or a unit basis vector string, the binarization or anti-binarization schemes of the Prefix SLminus1Prefix, the Suffix SLminus1Infix, and the Suffix SLminus1Suffix are as follows:

carrying out binarization and inverse binarization on the prefix by adopting a truncated unary code with the maximum value maxVal ═ S-1;

for example: when S is 5, maxVal is 4, and the section number S indicated by the prefix is 0, and the truncated unary binary symbol string of 1,01,001,0001,0000 is 1,2,3,4, respectively.

Using len-ceil (log) with length, i.e. binary digit, for infixes2(min(V,Rs+1)-Rs) Fixed length code of-1 is binarized and anti-binarized, but len)<When the code stream is 1, the value of the Infix SLminus1Infix is equal to 0 by default, the Infix does not exist in the code stream, and binarization and inverse binarization are not required to be carried out;

if the value of the middle affix SLminus1Infix is greater than or equal to 2len+1-(min(V,Rs+1)-Rs) And (min (V, R)s+1)-Rs)>1, the Suffix is binarized and inversely binarized by using a k ═ 1 bit fixed length code, otherwise, the value of the Suffix SLminus1Suffix is equal to 0 by default,suffixes do not exist in the code stream, binarization and inverse binarization do not need to be carried out, and k is equal to 0 by default;

from the value of the prefix SLminus1, i.e. the interval number s, the value of the middle prefix SLminus1Infix, the value of the Suffix SLminus1Suffix, the value of len +1, the value of k, the string length minus one SLminus1 and the string length StringLength are calculated as follows:

SLminus1=Rs+SLminus1Infix×2k+SLminus1Suffix-(2len+1-(min(V, Rs+1)-Rs))×k,

StringLength=SLminus1+1。

further, in the decoding method or the decoding apparatus,

if the current string to be coded or decoded is an equal numerical string, dividing the current value range of the string length minus SLminus1, and carrying out binarization and inverse binarization on a Prefix SLminus1Prefix, an Infix SLminus1Infix and a Suffix SLminus1 Suffix;

if the current string to be coded or decoded is a unit basis vector string, dividing the current value range of the string length minus SLminus1 and carrying out binarization and inverse binarization on a Prefix SLminus1Prefix, an Infix SLminus1Infix and a Suffix SLminus1 Suffix.

The present invention is applicable to encoding and decoding for lossy compression of data, and is also applicable to encoding and decoding for lossless compression of data. The invention is suitable for encoding and decoding one-dimensional data such as character string data or byte string data or one-dimensional graphics or fractal graphics, and is also suitable for encoding and decoding data with two or more dimensions such as images, image sequences or video data.

In lossy compression, the values of the elements on the original constant value string before encoding are allowed to differ, but the difference is less than a predetermined threshold.

In the present invention, the data involved in data compression includes one or a combination of the following types of data

1) One-dimensional data;

2) two-dimensional data;

3) multidimensional data;

4) a graph;

5) dimension division graphics;

6) an image;

7) a sequence of images;

8) video;

9) audio frequency;

10) a file;

11) a byte;

12) a bit;

13) a pixel;

14) a three-dimensional scene;

15) a sequence of continuously changing three-dimensional scenes;

16) a virtual reality scene;

17) sequence of scenes of continuously changing virtual reality

18) An image in the form of pixels;

19) transform domain data of the image;

20) a set of bytes in two or more dimensions;

21) a set of bits in two or more dimensions;

22) a set of pixels;

23) a set of single component pixels;

24) a set of three-component pixels (R, G, B, A);

25) a set of three-component pixels (Y, U, V);

26) a set of three-component pixels (Y, Cb, Cr);

27) a set of three-component pixels (Y, Cg, Co);

28) a set of four component pixels (C, M, Y, K);

29) a set of four component pixels (R, G, B, A);

30) a set of four component pixels (Y, U, V, A);

31) a set of four component pixels (Y, Cb, Cr, A);

32) a set of four component pixels (Y, Cg, Co, a).

Detailed Description

In order to make the technical means, the creation characteristics, the achievement purposes and the effects of the invention easy to understand, the invention is further described with the specific embodiments.

The invention provides an encoding method combining point prediction and string prediction, which at least comprises the following steps of:

the string length parameter of the equal-value string called as a first string is binarized by adopting a first string length binarization scheme, and the string length parameter of the unit base vector string which is symmetrical to a second string is binarized by adopting a second string length binarization scheme, wherein the two schemes at least have different and preset associated value range interval division.

An encoding apparatus combining point prediction and string prediction, comprising at least modules for performing the following functions and operations:

the string length parameter of the equal-value string called as a first string is binarized by adopting a first string length binarization scheme, and the string length parameter of the unit base vector string which is symmetrical to a second string is binarized by adopting a second string length binarization scheme, wherein the two schemes at least have different and preset associated value range interval division.

A decoding method combining point prediction and string prediction, comprising at least the following steps of:

the string length parameter of the equal-value string called as a first string is subjected to inverse binarization by adopting a first string length inverse binarization scheme, and the string length parameter of the unit base vector string which is symmetrical as a second string is subjected to inverse binarization by adopting a second string length inverse binarization scheme, wherein the two schemes at least have different and preset associated value range interval division.

A decoding apparatus combining point prediction and string prediction, comprising at least the following modules for performing the functions and operations:

the string length parameter of the equal-value string called as a first string is subjected to inverse binarization by adopting a first string length inverse binarization scheme, and the string length parameter of the unit base vector string which is symmetrical as a second string is subjected to inverse binarization by adopting a second string length inverse binarization scheme, wherein the two schemes at least have different and preset associated value range interval division.

Example 1

In the encoding and decoding method or the decoding apparatus, in a case where original data is a sequence including an image, a sequence of images, an array or an array of two-dimensional data elements of a video, the entire compression unit includes a macroblock, a coding unit CU, a sub-region of the CU, a sub-coding unit SubCU, a prediction block, a prediction unit PU, a sub-region of the PU, a sub-prediction unit SubPU, a transform block, a transform unit TU, a sub-region of the TU, a sub-transform unit SubTU.

Example 2

In the encoding and decoding method or the encoding and decoding device, the predetermined association is:

1) the first string length binarization or anti-binarization scheme divides the value range of the string length parameter into M intervals, the second string length binarization or anti-binarization scheme divides the value range of the string length parameter into N intervals, and M is larger than N;

alternatively, the first and second electrodes may be,

2) the common value range of the string length minus one of the equal value string and the string length minus one of the unit base vector string is an interval [0, T), namely, all integers which are greater than or equal to 0 and less than T;

the first string length binarization or inverse binarization scheme divides the value range of the string length minus one into M intervals: [ I ] ofm,Im+1) M is 0 to M-1, wherein I0=0,IM=T;

The second string length binarization or inverse binarization scheme divides the value range of the string length minus one into N intervals: [ J ]n,Jn+1) N is 0 to N-1, wherein J0=0,JN=T;

M>N;

Alternatively, the first and second electrodes may be,

3) the common value range of the string length minus one of the equal value string and the string length minus one of the unit base vector string is an interval [0, T), namely, all integers which are greater than or equal to 0 and less than T;

the first string length binarization or inverse binarizationThe scheme divides the value range of the string length minus one into M intervals: [ I ] ofm,Im+1) M is 0 to M-1, wherein I0=0,IM=T;

The second string length binarization or anti-binarization scheme divides the value range of the string length minus one into M-1 intervals: [0, I ]2),[Jm,Jm+1) M is 2 to M-1, wherein IM=T;

Alternatively, the first and second electrodes may be,

4) the common value range of the string length minus one of the equal value string and the string length minus one of the unit base vector string is the interval [0,2P) I.e. greater than or equal to 0 and less than 2PAll integers of (a);

the first string length binarization or inverse binarization scheme divides the value range of the string length minus one into P +1 intervals: [0,1),[2p,2p+1),p=0~P-1;

The second string length binarization or inverse binarization scheme divides the value range of the string length minus one into P intervals: [0,2),[2p,2p+1),p=1~P-1。

Example 3

In the encoding and decoding method or the encoding and decoding device,

the total number of elements of the whole compression unit is T, and T is the power P of 2, namely T is 2PThe number of elements currently encoded or decoded in the whole compression unit is U, and the number of remaining elements currently to be encoded or decoded in the whole compression unit is V ═ T-U, obviously, V ≧ 1 and V is the current maximum value of the values that the string length to be currently encoded or decoded may take, that is, the value range of the string length to be currently encoded or decoded minus one is [0, V); the predetermined association is:

1) the first string length binarization or anti-binarization scheme divides the total value range of the string length parameters into M intervals, the second string length binarization or anti-binarization scheme divides the total value range of the string length parameters into N intervals, and M is larger than N;

if the string currently to be encoded or decoded is an equal-valued string,the current value range of the current string length parameter to be currently encoded or decoded is divided into MVA section wherein MVM is less than or equal to M, and the values possibly taken by the string length parameter to be currently encoded or decoded all fall within the MVWithin each interval;

if the current string to be coded or decoded is a unit base vector string, the current value range of the length parameter of the current string to be coded or decoded is divided into NV intervals, wherein N isVN and the possible values of the string length parameter to be currently encoded or decoded all fall within the NVWithin each interval;

alternatively, the first and second electrodes may be,

2) the common total value range of the string length minus one of the equal value string and the string length minus one of the unit base vector string is an interval [0, T ], namely all integers which are greater than or equal to 0 and less than T;

the first string length binarization or inverse binarization scheme divides the total value range of the string length minus one into M intervals: [ I ] ofm,Im+1) M is 0 to M-1, wherein I0=0,IM=T;

The second string length binarization or inverse binarization scheme divides the total value range of the string length minus one into N intervals: [ J ]n,Jn+1) N is 0 to N-1, wherein J0=0,JN=T;

M>N;

If the current string to be coded or decoded is an equal numerical string, dividing the current value range of the length of the current string to be coded or decoded minus one into MVThe individual interval: [ I ] ofm,I2m+1),m=0~ MV-1, wherein I0=0,IMv-1<V≤IMv,I2m+1=min(Im+1,V);

If the current string to be coded or decoded is a unit base vector string, dividing the current value range of the length of the current string to be coded or decoded minus one into NVThe individual interval: [ J ]n,J2n+1),n=0~ NV-1, wherein, J0=0,JNv-1<V≤JNv,J2n+1=min(Jn+1,V);

Alternatively, the first and second electrodes may be,

3) the common total value range of the string length minus one of the equal value string and the string length minus one of the unit base vector string is an interval [0, T), namely, all integers which are greater than or equal to 0 and less than T;

the first string length binarization or inverse binarization scheme divides the total value range of the string length minus one into M intervals: [ I ] ofm,Im+1) M is 0 to M-1, wherein I0=0,IM=T;;

The second string length binarization or anti-binarization scheme divides the total value range of the string length minus one into M-1 intervals: [0, I ]2),[Jm,Jm+1) M is 2 to M-1, wherein IM=T

If the current string to be coded or decoded is an equal numerical string, dividing the current value range of the length of the current string to be coded or decoded minus one into MVThe individual interval: [ I ] ofm,I2m+1),m=0~MV-1, wherein I0=0,IMv-1<V≤IMv,I2m+1=min(Im+1,V);

If the current string to be coded or decoded is a unit base vector string, dividing the current value range of the length of the current string to be coded or decoded minus one into the following intervals according to the following mode:

if V is less than or equal to I2Then, the current value range of the current string length to be coded or decoded minus one is divided into 1 interval: [0, V);

otherwise, I is2<V, dividing the current value range of the current string length to be coded or decoded minus one into MV-1 interval: [0, I ]2),[Im,I2m+1),m=2~MV-1, wherein MV≥3, IMv-1<V≤IMv,I2m+1=min(Im+1,V);

Alternatively, the first and second electrodes may be,

4) of strings of equal valuesThe common total value range of the string length minus one and the string length minus one of the unit base vector string is the interval [0,2P) I.e. greater than or equal to 0 and less than 2PAll integers of (a);

the first string length binarization or inverse binarization scheme divides the total value range of the string length minus one into P +1 intervals: [0,1),[2p,2p+1),p=0~P-1;;

The second string length binarization or inverse binarization scheme divides the total value range of the string length minus one into P intervals: [0,2),[2p,2p+1),p=1~P-1;

If the current string to be coded or decoded is an equal numerical string, dividing the current value range of the length of the current string to be coded or decoded minus one into the following intervals according to the following mode:

if V is 1, dividing the current value range of the current string length to be coded or decoded minus one into 1 interval: [0, 1);

otherwise, namely V>1, dividing the current value range of the current string length to be coded or decoded minus one into PV+1 intervals: [0,1),[2p,I2p+1),p=0~PV-1, wherein PV=ceil(log2(V)), ceil () is a ceiling operation, I2p+1=min(2p+1,V);

If the current string to be coded or decoded is a unit base vector string, dividing the current value range of the length of the current string to be coded or decoded minus one into the following intervals according to the following mode:

if V is less than or equal to 2, dividing the current value range of the current string length to be coded or decoded minus one into 1 interval: [0, V);

otherwise, namely V>2, dividing the current value range of the current string length to be coded or decoded minus one into PV intervals: [0,2),[2p,I2p+1),p=1~PV-1, wherein PV≥2,2Pv-1< V≤2Pv,I2p+1=min(2p+1,V)。

Example 4

In the coding and decoding method or the coding and decoding device, the total element number T of the whole compression unit is equal to 16, 32, 64, 128, 256, 512, 1024 or 2048;

the number of intervals generated after dividing the current value range of reducing the string length by SLminus1 is recorded as S, and S intervals are recorded as [ R ]s,Rs+1) S is 0 to S-1, wherein R is0=0,RSV, s is called the section number, RsReferred to as the start of the interval s;

reducing the string length by SLminus1 to be represented as a Prefix SLminus1Prefix, a Infix SLminus1Infix and a Suffix SLminus1Suffix, and respectively using a truncated unary code, a 1 or multi-bit fixed length code and a 1-bit fixed length code to carry out binarization and anti-binarization on the Prefix, the Infix and the Suffix;

the prefix represents which interval of the S intervals the value of SLminus1 is located in, namely represents an interval serial number S;

the infixes and/or suffixes represent the distance of the value of SLminus1 relative to the start of the interval, i.e. represent the difference SLminus1-Rs between the value of SLminus1 and Rs.

Example 5

In the encoding and decoding method or the encoding and decoding device,

s, R if the string currently to be encoded or decoded is an equal-valued strings,Rs+1The values are as follows:

when V is 1, S is 1, R0=0,R1=1;

When V is>1, S ═ ceil (log)2(V)) +1, ceil () is a ceiling operation, R0=0,Rs= 2s-1,s=1~S-1,RS=V;

S, R if the current string to be encoded or decoded is a string of unit basis vectorss,Rs+1The values are as follows:

when V is less than or equal to 2, S is 1, R0=0,R1=2;

When V is>2, S ═ ceil (log)2(V)), ceil () is a ceiling operation, R0=0,Rs=2s, s=1~S-1,RS=V;

In the case that the string to be currently encoded or decoded is an equal-valued string or a unit basis vector string, the binarization or anti-binarization schemes of the Prefix SLminus1Prefix, the Suffix SLminus1Infix, and the Suffix SLminus1Suffix are as follows:

carrying out binarization and inverse binarization on the prefix by adopting a truncated unary code with the maximum value maxVal ═ S-1;

for example: when S is 5, maxVal is 4, and the section number S indicated by the prefix is 0, and the truncated unary binary symbol string of 1,01,001,0001,0000 is 1,2,3,4, respectively.

Using len-ceil (log) with length, i.e. binary digit, for infixes2(min(V,Rs+1)-Rs) Fixed length code of-1 is binarized and anti-binarized, but len)<When the code stream is 1, the value of the Infix SLminus1Infix is equal to 0 by default, the Infix does not exist in the code stream, and binarization and inverse binarization are not required to be carried out;

if the value of the middle affix SLminus1Infix is greater than or equal to 2len+1-(min(V,Rs+1)-Rs) And (min (V, R)s+1)-Rs)>1, performing binarization and inverse binarization on the Suffix by adopting a k-1 bit fixed length code, otherwise, defaulting the value of the Suffix SLminus1Suffix to be equal to 0, not existing the Suffix in the code stream, and not needing binarization and inverse binarization, and defaulting k to be equal to 0;

from the value of the prefix SLminus1, i.e. the interval number s, the value of the middle prefix SLminus1Infix, the value of the Suffix SLminus1Suffix, the value of len +1, the value of k, the string length minus one SLminus1 and the string length StringLength are calculated as follows:

SLminus1=Rs+SLminus1Infix×2k+SLminus1Suffix-(2len+1-(min(V, Rs+1)-Rs))×k,

StringLength=SLminus1+1。

example 6

In the encoding and decoding method or the encoding and decoding device,

if the current string to be coded or decoded is an equal numerical string, dividing the current value range of the string length minus SLminus1 and carrying out binarization and inverse binarization on a Prefix SLminus1Prefix, an Infix SLminus1Infix and a Suffix SLminus1 Suffix. The syntax description table for the process of calculating string length minus SLminus1 and string length StringLength is:

SL _ minus1_ prefix, SL _ minus1_ infix, and SL _ minus1_ suffix in the table denote syntax elements present in the codestream.

If the current string to be coded or decoded is a unit basis vector string, dividing the current value range of the string length minus SLminus1 and carrying out binarization and inverse binarization on a Prefix SLminus1Prefix, an Infix SLminus1Infix and a Suffix SLminus1 Suffix. The syntax description table for the process of calculating string length minus SLminus1 and string length StringLength is:

SL _ minus1_ prefix, SL _ minus1_ infix, and SL _ minus1_ suffix in the table denote syntax elements present in the codestream.

As used herein, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, including not only those elements listed, but also other elements not expressly listed.

The foregoing shows and describes the general principles, essential features, and advantages of the invention. It will be understood by those skilled in the art that the present invention is not limited to the embodiments described above, which are given by way of illustration of the principles of the present invention, and that various changes and modifications may be made without departing from the spirit and scope of the invention as defined by the appended claims. The scope of the invention is defined by the appended claims and equivalents thereof.

22页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:用于纹理解压缩的解码器单元

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类