CN108989819A - Each mode uses the data compression method and device of respectively corresponding color space - Google Patents

Each mode uses the data compression method and device of respectively corresponding color space Download PDF

Info

Publication number
CN108989819A
CN108989819A CN201710410669.1A CN201710410669A CN108989819A CN 108989819 A CN108989819 A CN 108989819A CN 201710410669 A CN201710410669 A CN 201710410669A CN 108989819 A CN108989819 A CN 108989819A
Authority
CN
China
Prior art keywords
bitdepth
color space
coding mode
coding
data
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
CN201710410669.1A
Other languages
Chinese (zh)
Other versions
CN108989819B (en
Inventor
林涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Tianhe Electronic Information Co Ltd
Original Assignee
Shanghai Tianhe Electronic Information Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Tianhe Electronic Information Co Ltd filed Critical Shanghai Tianhe Electronic Information Co Ltd
Priority to CN201710410669.1A priority Critical patent/CN108989819B/en
Publication of CN108989819A publication Critical patent/CN108989819A/en
Application granted granted Critical
Publication of CN108989819B publication Critical patent/CN108989819B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/597Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding specially adapted for multi-view video sequence encoding

Landscapes

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

Abstract

The present invention provides a kind of each coding modes using the data compression method and device of the data color space progress encoding and decoding for meeting each mode self character.In this method and device, by usual 2≤L≤10 scheduled L() kind coding mode be classified as scheduled K(2≤K≤L) group, the corresponding mutually different data color space of K kind is respectively adopted in K group coding mode, and the coding mode with group all uses same data color space.In this way, making data color spatial adaptation in the characteristic of each coding mode, binary encoding efficiency is improved.When the color space of original input data plants color space different from the kth (1≤k≤K) among the K kind color space, need to convert the data that original input data is converted to the kth kind color space using color space.

Description

Each mode uses the data compression method and device of respectively corresponding color space
Technical field
It is damaged the present invention relates to a kind of pair of data or the encoding and decoding system of lossless compression, especially image and view The method and apparatus of the encoding and decoding of frequency evidence.
Background technique
As human society enters big data, cloud computing, mobile computing, cloud-mobile computing, ultra high-definition (4K) and special superelevation The epoch of (8K) video image resolution ratio, 4G/5G communication, virtual reality, artificial intelligence clearly, to various data, including big data, Image data, video data, the data compression for carrying out superelevation compression ratio and very high-quality become essential technology.
Data set be by data element (such as: byte, bit, pixel, pixel component, spatial sampling point, transform domain system Number) composition set.To be arranged in certain space (one-dimensional, two-dimentional or multidimensional) shape data set (such as: a dimension According to queue, a two-dimensional data files, a frame image, a video sequence, a transform domain, a transform block, multiple transformation The sequence of block, a three-dimensional scenic, three-dimensional scenic persistently changed), especially two dimension or above data collection carries out data When coding (and corresponding decoding) of compression, usually this data set is divided into several with predetermined shape and/or size Subset, referred to as encoding block (from decoded angle i.e. decoding block, are referred to as encoding and decoding block), as unit of encoding and decoding block, with Scheduled sequence, one piece one piece is encoded or is decoded.At any one time, the encoding block encoded is known as present encoding Block.At any one time, the decoding block decoded is known as current decoding block.Present encoding block or current decoding block are referred to as working as Preceding encoding and decoding block or referred to as current block.Data element (being also referred to as element sometimes) just in encoding or decoding is known as working as Preceding encoding data elements or current decoded data element, are referred to as current data element, referred to as currentElement.Work as the list of elements When showing color, element is made of N number of component (usual 1≤N≤5), for example, being made of 3 components: G(green) component, B (blue) component, R(are red) component or Y(brightness) component, U(coloration 1) component, V(coloration 2) component or Y(brightness) component, Cb (colour difference blue) component, Cr(colour difference are red) component or Y(brightness) component, Cg(coloration is green) and component, Co(coloration orange) component or H (form and aspect) component, S(saturation degree) component, V(lightness) component or H(form and aspect) component, S(saturation degree) component, L(brightness) component; Or it is made of 4 components: (C, M, Y, K) i.e. (cyan, magenta, yellow, black) or (R, G, B, A) i.e. (red, green, blue, A Er Method) or (Y, U, V, A) i.e. (brightness, coloration 1, coloration 2, Alpha) or (Y, Cb, Cr, A) i.e. (brightness, colour difference is blue, colour difference It is red, Alpha) or (brightness, coloration is green, coloration orange, Alpha) (Y, Cg, Co, A) i.e..These different representation in components of color Method is known as color space.It usually can mutually lossless (not losing any color information) or damage (can between different color space A part of color information can be lost) convert.The nothing between the different representations of same color is set up in color space conversion Damage is i.e. mathematically accurate or damages the relationship for mathematically having error to a certain degree.
For one with certain shapes (being not necessarily limited to square or rectangle, can be any reasonable other shapes) A encoding and decoding block needs to be divided into many occasions finer primitive (basic unit), according to scheduled time sequencing, One primitive, one primitive is encoded or is decoded.To all sample values in a primitive, same type of coding is usually implemented Or decoding operate.At any one time, the primitive in encoding or decoding is known as current primitive.One primitive is encoded The result is that one or more coding parameters, finally generate the compressed data code stream containing these coding parameters.One primitive is carried out Decoding is exactly to parse the compressed data code stream to obtain one or more coding parameters, multiple from one or more of coding parameters Original goes out the sample value of the data of reconstruct.
The example of primitive include encoding and decoding block (entire block is as a primitive), sub-block, microlith, string, byte serial, alpha(Ah That method) string, pixel string, sample value string, index string, lines.
One distinguishing feature of many common data sets is the formula with many matchings (i.e. similar or even identical) Sample.For example, usually there is many matched pixel patterns in image and video sequence.Therefore, in available data compress technique usually By the way of matching (also referred to as predict or compensate), i.e., with " predicted value " (also referred to as " offset " or " referring to sample value ", such as " reference pixel ") come match (also referred to as predict, indicate, represent, compensation, it is approximate, approach) sample value in present encoding or decoding The mode of (referred to as " current sample ") achievees the effect that the lossless or lossy compressions of data.In many occasions, matching way Basic operation be exactly duplication with reference to sample value of the sample value i.e. on reference position to the position of current sample.Therefore, matching way Or prediction mode is also referred to as copy mode.In matching way, had been subjected at least partly encoding operation and at least partly solved Reconstruct (also referred to as rebuild or restore) sample value composition reference set (also referred to as reference set space or with reference to space or with reference to slow of code operation It deposits).The original samples and its position that reconstruct sample value and its position among reference set are concentrated with initial data are one-to-one.
When carrying out the encoding and decoding of a current block, current block is divided into several matchings and (also referred to as predicts) base by matching way Member, a Matching unit have one or more matching (coding) parameter (also referred to as matching relationship or duplication parameter or replication relations Or referring-to relation) indicate its feature.In match parameter a most important parameter be displacement vector (also referred to as motion vector, Positional shift, offset, relative position, position, relative address, address, relative coordinate, coordinate, relative indexing, index etc.).Position Move the current primitive of vector representation sample value and its with reference to the relative shift between sample value, be equivalent to data sample be arranged in it is one-dimensional One-dimensional offset after data.Obviously, it can be exported with reference to where the reference position of sample value from displacement vector.The displacement of current primitive Vector is known as current displacement vector.Other examples of match parameter: primitive mode, scan pattern, match-type, matching length, no (prediction) sample value can be matched, etc..
The example of Matching unit includes encoding and decoding block, sub-block, microlith, string, pixel string, sample value string, index string, lines.
In available data compress technique, usually data are compressed using a variety of coding modes, such as prediction+transformation Traditional Hybrid coding mode or its variant, for another example the various match patterns based on matching way or its.
In available data compress technique, all coding modes all compile data element using same color space Decoding, that is, data element color space be it is fixed, may not change with the difference of coding mode.Another party Face, a kind of coding mode may be different the code efficiency of the data in different color space, to a kind of number of color space According to code efficiency may be much higher than the code efficiency to the data of another color space.In available data compress technique, The characteristic that may not be changed with data color space using the code efficiency of coding mode, affects mentioning for code efficiency It is high.
Summary of the invention
In order to solve the problems, such as this in data compression, is used the present invention provides a kind of each coding mode and meet each mode The data color space of self character carries out the data compression method and device of encoding and decoding.In this method and device, it will make a reservation for Usual 2≤L≤10 L() kind coding mode is classified as scheduled K(2≤K≤L) group, K group coding mode is respectively adopted The corresponding mutually different data color space of K kind, the coding mode with group all use same data color space.In this way, Make data color spatial adaptation in the characteristic of each coding mode, improves binary encoding efficiency.When the color of original input data is empty Between be different from the K kind color space among kth (1≤k≤K) plant color space when, need using color space turn Original input data of changing commanders is converted to the data of the kth kind color space.
For example, using scheduled L1(1≤L1≤ 10) Hybrid coding mode and its variant and scheduled L are planted2(1 ≤ L2≤ 10) kind matching coding mode is when encode the original input data of (R, G, B) color space, by L= L1 + L2Kind coding mode is classified as 2 groups (K=2), L1Kind Hybrid coding mode and its variant belong to first group, L2Kind matching is compiled Pattern belongs to second group.To first group of coding mode, second group of coding mode is adopted using (Y, U, V) data color space With (R, G, B) data color space.
The most basic peculiar technical characteristic of coding method or device of the invention is to use scheduled L(L > 1) kind coding mould Coding mode is returned into K(K > 1 according to the characteristic of each coding mode itself and the requirement to data color space by the occasion of formula) Group, it is corresponding with K kind color space respectively.When being encoded using a kind of coding mode to a present encoding block, according to volume Group belonging to pattern selects corresponding color space, encodes to the present encoding block, generates at least true containing can be used for The identification code of the coding mode of fixed corresponding color space and/or the compressed data stream of the information of equal value with it.Preferably, if The color space of original input data is not the corresponding color space, then is converted first using color space by present encoding The data of block are converted to the data of the corresponding color space, then encode again to the data after conversion.Preferably, make The data of present encoding block generated in an encoding process are converted into other one or more colors skies with color space conversion Between data.Fig. 1 is a schematic diagram of coding method or device of the invention.
The most basic peculiar technical characteristic of coding/decoding method or device of the invention is parsing compressed data stream, obtains coding mode Information, according to the information of the coding mode using the corresponding color space in one of scheduled multicolour space to one Current decoding block is decoded.Preferably, if the color space for rebuilding data (is equal to the original input data of encoder Color space) it is not the corresponding color space, then it is converted current decoding block in decoding process using color space The data of generation are converted to the data of the corresponding color space.Preferably, it is converted using color space by current decoding block The data generated in decoding process be converted to the data of other one or more color spaces.Fig. 2 is decoding of the invention One schematic diagram of method or apparatus.
According to an aspect of the invention, there is provided coding method or the device of a kind of data compression, it is following to include at least completion The step of function and operation or module:
According to scheduled L(L > 1) characteristic of coding mode itself and the requirement to data color space are planted, coding mode is returned into K(K > 1) group, it is corresponding with scheduled K kind color space respectively.One present encoding block is being compiled using a kind of coding mode When code, according to group belonging to coding mode, corresponding color space is selected, the present encoding block is encoded, generated extremely The compressed data of few identification code containing the coding mode that can be used for determining corresponding color space and/or the information of equal value with it Stream.
According to another aspect of the present invention, the coding/decoding method or device of a kind of data compression are additionally provided, includes at least and completes The step of following function and operation or module:
Parsing uses scheduled L(L > 1) compressed data stream that coding mode generates is planted, the information of coding mode is obtained, according to institute The information of coding mode is stated using scheduled K(K > 1) the corresponding color space of one of color space is planted to a current decoding Block is decoded.
The present invention is suitable for carrying out data the coding and decoding of lossy compression, and present invention is equally applicable to carry out nothing to data Damage the coding and decoding of compression.The present invention is suitable for one-dimensional data such as string data or byte string data or one-dimensional pattern or divides The coding and decoding for tieing up figure, present invention is equally applicable to the reconciliation of the coding of two dimension or above data such as image or video data Code.
In the present invention, data involved in data compression include one or a combination set of data of following classes
1) one-dimensional data;
2) 2-D data;
3) multidimensional data;
4) figure;
5) divide dimension figure;
6) image;
7) sequence of image;
8) video;
9) three-dimensional scenic;
10) sequence of the three-dimensional scenic persistently changed;
11) scene of virtual reality;
12) sequence of the scene of the virtual reality persistently changed
13) image of pixel form;
14) the transformation numeric field data of image;
15) set of two dimension or the above byte of two dimension;
16) two dimension or the set of the above bit of two dimension;
17) set of pixel;
18) set of four component pixels (C, M, Y, K);
19) set of four component pixels (R, G, B, A);
20) set of four component pixels (Y, U, V, A);
21) set of four component pixels (Y, Cb, Cr, A);
22) set of four component pixels (Y, Cg, Co, A);
23) set of three-component pixel (R, G, B);
24) set of three-component pixel (Y, U, V);
25) set of three-component pixel (Y, Cb, Cr);
26) set of three-component pixel (Y, Cg, Co);
27) set of three-component pixel (H, S, V);
28) set of three-component pixel (H, S, L).
In the present invention, the coding mode includes one or a combination set of following coding mode or its variant:
1) include intra prediction Hybrid coding mode;
2) include inter-prediction Hybrid coding mode;
3) include wavelet transformation coding mode;
4) include residual coding coding mode;
5) include matching way coding mode;
6) include Block- matching coding mode;
It 7) include the matched coding mode of sub-block;
It 8) include the matched coding mode of microlith;
It 9) include the matched coding mode of lines;
10) include String matching coding mode;
11) include pixel String matching coding mode;
12) include sample value String matching coding mode;
It 13) include the coding mode for indexing String matching;
14) include main reference buffer area String matching coding mode;
It 15) include time coding mode of reference buffer area String matching;
16) include string prediction coding mode;
It 17) include the general coding mode gone here and there and predicted;
It 18) include the coding mode for deviating string prediction;
19) include coordinate string prediction coding mode;
20) include non-matched pixel coding mode;
21) include non-matched pixel string coding mode;
22) include unpredictable pixel coding mode;
23) include unpredictable pixel string coding mode.
It is the situation of image, the sequence of image, video etc. in data in the present invention, encoding block or decoding block are one of image Coding region or a decoding region, comprise at least one of the following: entire image, the subgraph of image, macro block, maximum coding are single First LCU, coding tree unit CTU, the subregion of coding unit CU, CU, predicting unit PU, converter unit TU.
In the present invention, the primitive includes one or a combination set of following state: encoding and decoding block, sub-block, microlith, string, byte serial, Alpha(Alpha) string, pixel string, sample value string, index string, lines, match block, matched sub-block, matching microlith, matching go here and there, With pixel string, matching sample value string, match index string, matching item, matching lines, offset string, coordinate string, unpredictable pixel, no Predictable pixel string, coordinate or unpredictable pixel string.
Illustrate technical characteristic of the invention above by several specific specific examples.Those skilled in the art can be by this specification Other advantages and efficacy of the present invention can be easily understood for revealed content.The present invention can also pass through in addition different specific realities The mode of applying is embodied or practiced, and the various details in this specification can also be based on different viewpoints and application, without departing substantially from this Various modifications or alterations are carried out under the spirit of invention.
It is more implementation details or variant of the invention below.
Implementation or variant example 1
The coding method or device perhaps the color space of original input data or rebuild data in coding/decoding method or device Color space be not the corresponding color space, use color space conversion carry out these color spaces between mutually turn It changes, including one or a combination set of following conversion:
The color space of the original input data is converted into the corresponding color space
Or
The color space for rebuilding data is converted into the corresponding color space
Or
The corresponding color space is converted to the color space of the original input data
Or
The corresponding color space is converted into the color space for rebuilding data.
Implementation or variant example 2
In the coding method or device or coding/decoding method or device, using color space conversion by current block in coding or It is one or more that the data of before person's decoding process and/or centre and/or a kind of color space being related to later are converted to other The data of color space.
Implementation or variant example 3
In the coding method or device or coding/decoding method or device, the scheduled L kind coding mode includes at least predetermined L1Kind Hybrid coding mode or its variant and scheduled L2Kind matching coding mode;The scheduled K kind color space is at least Including one or a combination set of following color space:
(R, G, B) color space or its variant;
(Y, U, V) color space or its variant;
(Y, Cb, Cr) color space or its variant;
(Y, Cg, Co) color space or its variant;
(H, S, V) color space or its variant;
(H, S, L) color space or its variant;
(C, M, Y, K) color space or its variant;
(R, G, B, A) color space or its variant;
(Y, U, V, A) color space or its variant;
(Y, Cb, Cr, A) color space or its variant;
(Y, Cg, Co, A) color space or its variant.
Implementation or variant example 4
In the coding method or device or coding/decoding method or device, the scheduled L kind coding mode includes at least predetermined L1Hybrid coding mode or its variant and scheduled L of the kind based on prediction and transformation2Coding mould of the kind based on general string prediction Formula or its variant;The L1Kind coding mode is classified as K1Group, respectively with scheduled K1Kind color space is corresponding;The L2Kind coding Mode is classified as K2Group, respectively with scheduled K2Kind color space is corresponding;The scheduled K1Kind of color space include at least (Y, U, V) color space or its variant;The scheduled K2Kind color space includes at least (R, G, B) color space or its variant.
Implementation or variant example 5
In the coding method or device or coding/decoding method or device, using color space conversion by current block in coding or In person's decoding after the prediction that generates after data (i.e. forecast sample data) and/or matching data (reference data replicated) and/ Or it data and/or rebuilds data after compensation and from a kind of color space is converted to other one or more color spaces.
Implementation or variant example 6
In the coding method or device or coding/decoding method or device, the scheduled K kind color space includes (R, G, B) color Color space or its variant and (Y, U, V) color space or its variant;(R, G, the B) color space or its variant and (Y, U, V) Color space conversion between color space or its variant is following five one or a combination set of the conversions or its change for applying a formula expression Body:
The first direct transform formula that applies a formula is
t = 0.2126*R + 0.7152*G + 0.0722*B
Y = floor ((16 + 219 * t / (2BitDepth–1)) * 2BitDepth–8 + 0.5)
U = floor ((128 + 112 * (B – t) / ((2BitDepth–1) * (1 – 0.0722))) * 2BitDepth–8 + 0.5)
V = floor ((128 + 112 * (R – t) / ((2BitDepth–1) * (1 – 0.2126))) * 2BitDepth–8 + 0.5)
The first inverse transformation formula that applies a formula is
t = floor ((Y - 16 * 2BitDepth–8) * (2BitDepth–1) / (219 * 2BitDepth–8) + 0.5)
R = clamp [t + (Cr - 2BitDepth–1) * (2BitDepth–1) * (1-0.2126)/(112 * 2BitDepth–8) + 0.5]
B = clamp [t + (Cb - 2BitDepth–1) * (2BitDepth–1) * (1-0.0722)/(112 * 2BitDepth–8) + 0.5]
G = clamp [( t - 0.2126*R - 0.0722*B)/0.7152 + 0.5]
Wherein, t is floating number, and R, G, B, Y, U, V are integers, and number of bits is BitDepth.Floor (x) is less than Maximum integer equal to x, clamp [x] is the maximum for first taking 0 and floor (x), then takes itself and 2BitDepth- 1 reckling;
The second direct transform formula that applies a formula is
t = 0.2126*R + 0.7152*G + 0.0722*B
Y = floor (t)
U = floor (2BitDepth–1 + 0.5 * (B – t) / (1 – 0.0722))
V = floor (2BitDepth–1 + 0.5 * (R – t) / (1 – 0.2126))
The second inverse transformation formula that applies a formula is
R = clamp [Y + (Cr - 2BitDepth–1) * 2 * (1-0.2126) + 0.5]
B = clamp [Y + (Cb - 2BitDepth–1) * 2 * (1-0.0722) + 0.5]
G = clamp [(Y - 0.2126*R - 0.0722*B)/0.7152 + 0.5]
The direct transform formula that third applies a formula is
Y = (G + ((R + B) >> 1) + 1) >> 1
U = ((R - B - 1) >> 1) + (1<<(BitDepth-1))
V = (G – Y) + (1<<(BitDepth-1))
The inverse transformation formula that third applies a formula is
R = clip3(0, (1<<BitDepth) - 1, Y – V + U)
G = clip3(0, (1<<BitDepth) - 1, Y + V - (1<<(BitDepth-1)))
B = clip3(0, (1<<BitDepth) - 1, Y – V – U + (1<<BitDepth))
Wherein,<<is binary shift left operation, and>>is binary shift right operation, clip3 (0, (1<<BitDepth) -1, x) It is first to take the maximum of 0 and x, then take itself and 2BitDepth- 1 reckling;
The 4th direct transform formula that applies a formula is
Y = (G + ((R + B) >> 1) + 1) >> 1
U = ((G - B - 1) >> 1) + (1<<(BitDepth-1))
V = ((G - R - 1) >> 1) + (1<<(BitDepth-1))
The 4th inverse transformation formula that applies a formula is
G = clip3(0, (1<<BitDepth) - 1, Y + ((U + V - (1<<BitDepth)) >> 1))
B = clip3(0, (1<<BitDepth) - 1, G - 2U + (1<<BitDepth) - 1)
R = clip3(0, (1<<BitDepth) - 1, G - 2V + (1<<BitDepth) - 1)
The 5th direct transform formula that applies a formula is
Y = (G + ((R + B) >> 1) + 1) >> 1
U = ((Y - B) >> 1) + (1<<(BitDepth-1))
V = ((Y - R) >> 1) + (1<<(BitDepth-1))
The 5th inverse transformation formula that applies a formula is
G = clip3(0, (1<<BitDepth) - 1, Y + U + V - (1<<BitDepth))
B = clip3(0, (1<<BitDepth) - 1, Y - 2U + (1<<BitDepth))
R = clip3(0, (1<<BitDepth) - 1, Y - 2V + (1<<BitDepth))。
Implementation or variant example 7
In the coding method or device or coding/decoding method or device, the encoding and decoding block has one in the compressed data stream A coding mode identification code directly or indirectly or directly mixed indirectly, it is empty using corresponding color according to the value of the identification code Between to the encoding and decoding block carry out encoding and decoding;The direct coding mode identification code is by one or more of compressed data stream Bit string (binary symbols string) is formed;The indirect coding mode identification code is from other codec parameters and/or compression number Coding mode identification code derived from other syntactic elements according to stream or scheduled identification code default value;It is described directly indirectly to mix Coding mode identification code be part directly (being made of one or more bit strings in compressed data stream) part it is indirect (i.e. from Other syntactic elements of other codec parameters and/or compressed data stream export or make a reservation for default) mixing coding mode mark Code.
Detailed description of the invention
Fig. 1 is a schematic diagram of coding method or device of the invention.
Fig. 2 is a schematic diagram of coding/decoding method or device of the invention.

Claims (10)

1. coding method or the device of a kind of data compression, which is characterized in that including at least the step for completing following function and operation Rapid or module:
According to scheduled L(L > 1) characteristic of coding mode itself and the requirement to data color space are planted, coding mode is returned into K(K > 1) group, it is corresponding with scheduled K kind color space respectively;One present encoding block is being compiled using a kind of coding mode When code, according to group belonging to coding mode, corresponding color space is selected, the present encoding block is encoded, generated extremely The compressed data of few identification code containing the coding mode that can be used for determining corresponding color space and/or the information of equal value with it Stream.
2. the coding/decoding method or device of a kind of data compression, which is characterized in that including at least the step for completing following function and operation Rapid or module:
Parsing uses scheduled L(L > 1) compressed data stream that coding mode generates is planted, the information of coding mode is obtained, according to institute The information of coding mode is stated using scheduled K(K > 1) the corresponding color space of one of color space is planted to a current decoding Block is decoded.
3. coding method according to claim 1 or device or coding/decoding method according to claim 2 or device, It is characterized in that the coding mode includes one or a combination set of following coding mode or its variant:
Hybrid coding mode including intra prediction;
Hybrid coding mode including inter-prediction;
Coding mode including wavelet transformation;
Coding mode including residual coding;
Coding mode including matching way;
Coding mode including Block- matching;
Including the matched coding mode of sub-block;
Including the matched coding mode of microlith;
Including the matched coding mode of lines;
Coding mode including String matching;
Coding mode including pixel String matching;
Coding mode including sample value String matching;
Coding mode including indexing String matching;
Coding mode including main reference buffer area String matching;
Coding mode including secondary reference buffer area String matching;
Coding mode including string prediction;
Coding mode including general string prediction;
Coding mode including offset string prediction;
Coding mode including the prediction of coordinate string;
Coding mode including non-matched pixel;
Coding mode including non-matched pixel string;
Coding mode including unpredictable pixel;
Coding mode including unpredictable pixel string.
4. coding method according to claim 1 or device or coding/decoding method according to claim 2 or device, It is characterized by:
Data involved in the data compression are image data or image sequence data or video data;
The encoding block or the decoding block be image a coding region or a decoding region, including following at least one Kind: entire image, the subgraph of image, macro block, maximum coding unit LCU, coding tree unit CTU, coding unit CU, CU son Region, predicting unit PU, converter unit TU.
5. coding method according to claim 1 or device or coding/decoding method according to claim 2 or device, It is characterized in that being converted current block before encoding or decoding process using color space and/or intermediate and/or later A kind of data for the color space being related to are converted to the data of other one or more color spaces.
6. coding method according to claim 1 or device or coding/decoding method according to claim 2 or device, It is characterized in that the scheduled L kind coding mode includes at least scheduled L1It plants Hybrid coding mode or its variant and makes a reservation for L2Kind matching coding mode;The scheduled K kind color space includes at least one or a combination set of following color space:
(R, G, B) color space or its variant;
(Y, U, V) color space or its variant;
(Y, Cb, Cr) color space or its variant;
(Y, Cg, Co) color space or its variant;
(H, S, V) color space or its variant;
(H, S, L) color space or its variant;
(C, M, Y, K) color space or its variant;
(R, G, B, A) color space or its variant;
(Y, U, V, A) color space or its variant;
(Y, Cb, Cr, A) color space or its variant;
(Y, Cg, Co, A) color space or its variant.
7. coding method according to claim 1 or device or coding/decoding method according to claim 2 or device, It is characterized in that, the scheduled L kind coding mode includes at least scheduled L1Hybrid coding of the kind based on prediction and transformation Mode or its variant and scheduled L2Coding mode or its variant of the kind based on general string prediction;The L1Kind coding mode is classified as K1Group, respectively with scheduled K1Kind color space is corresponding;The L2Kind coding mode is classified as K2Group, respectively with scheduled K2Kind color Space is corresponding;The scheduled K1Kind color space includes at least (Y, U, V) color space or its variant;The scheduled K2Kind Color space includes at least (R, G, B) color space or its variant.
8. coding method according to claim 1 or device or coding/decoding method according to claim 2 or device, It is characterized in that being converted using color space by data (i.e. pre- test sample after the prediction of current block generated in encoding or decoding Notebook data) and/or matching after data and/or rebuild data from a kind of color after data (reference data replicated) and/or compensation Color space is converted to other one or more color spaces.
9. coding method according to claim 1 or device or coding/decoding method according to claim 2 or device, It is characterized in that, the scheduled K kind color space includes (R, G, B) color space or its variant and (Y, U, V) color space Or its variant;Color space between (R, G, the B) color space or its variant and (Y, U, V) color space or its variant turns Change be following five apply a formula expression one or a combination set of conversion or its variant:
The first direct transform formula that applies a formula is
t = 0.2126*R + 0.7152*G + 0.0722*B
Y= floor ((16 + 219 * t / (2BitDepth–1)) * 2BitDepth–8 + 0.5)
U = floor ((128 + 112 * (B – t) / ((2BitDepth–1) * (1 – 0.0722))) * 2BitDepth–8 + 0.5)
V = floor ((128 + 112 * (R – t) / ((2BitDepth–1) * (1 – 0.2126))) * 2BitDepth–8 + 0.5)
The first inverse transformation formula that applies a formula is
t = floor ((Y - 16 * 2BitDepth–8) * (2BitDepth–1) / (219 * 2BitDepth–8) + 0.5)
R = clamp [t + (Cr - 2BitDepth–1) * (2BitDepth–1) * (1-0.2126)/(112 * 2BitDepth–8) + 0.5]
B = clamp [t + (Cb - 2BitDepth–1) * (2BitDepth–1) * (1-0.0722)/(112 * 2BitDepth–8) + 0.5]
G = clamp [( t - 0.2126*R - 0.0722*B)/0.7152 + 0.5]
Wherein, t is floating number, and R, G, B, Y, U, V are integers, and number of bits is BitDepth;Floor (x) is less than Maximum integer equal to x, clamp [x] is the maximum for first taking 0 and floor (x), then takes itself and 2BitDepth- 1 reckling;
The second direct transform formula that applies a formula is
t = 0.2126*R + 0.7152*G + 0.0722*B
Y = floor (t)
U = floor (2BitDepth–1 + 0.5 * (B – t) / (1 – 0.0722))
V = floor (2BitDepth–1 + 0.5 * (R – t) / (1 – 0.2126))
The second inverse transformation formula that applies a formula is
R = clamp [Y + (Cr - 2BitDepth–1) * 2 * (1-0.2126) + 0.5]
B = clamp [Y + (Cb - 2BitDepth–1) * 2 * (1-0.0722) + 0.5]
G = clamp [(Y - 0.2126*R - 0.0722*B)/0.7152 + 0.5]
The direct transform formula that third applies a formula is
Y = (G + ((R + B) >> 1) + 1) >> 1
U = ((R - B - 1) >> 1) + (1<<(BitDepth-1))
V = (G – Y) + (1<<(BitDepth-1))
The inverse transformation formula that third applies a formula is
R = clip3(0, (1<<BitDepth) - 1, Y – V + U)
G = clip3(0, (1<<BitDepth) - 1, Y + V - (1<<(BitDepth-1)))
B = clip3(0, (1<<BitDepth) - 1, Y – V – U + (1<<BitDepth))
Wherein,<<is binary shift left operation, and>>is binary shift right operation, clip3 (0, (1<<BitDepth) -1, x) It is first to take the maximum of 0 and x, then take itself and 2BitDepth- 1 reckling;
The 4th direct transform formula that applies a formula is
Y = (G + ((R + B) >> 1) + 1) >> 1
U = ((G - B - 1) >> 1) + (1<<(BitDepth-1))
V = ((G - R - 1) >> 1) + (1<<(BitDepth-1))
The 4th inverse transformation formula that applies a formula is
G = clip3(0, (1<<BitDepth) - 1, Y + ((U + V - (1<<BitDepth)) >> 1))
B = clip3(0, (1<<BitDepth) - 1, G - 2U + (1<<BitDepth) - 1)
R = clip3(0, (1<<BitDepth) - 1, G - 2V + (1<<BitDepth) - 1)
The 5th direct transform formula that applies a formula is
Y = (G + ((R + B) >> 1) + 1) >> 1
U = ((Y - B) >> 1) + (1<<(BitDepth-1))
V = ((Y - R) >> 1) + (1<<(BitDepth-1))
The 5th inverse transformation formula that applies a formula is
G = clip3(0, (1<<BitDepth) - 1, Y + U + V - (1<<BitDepth))
B = clip3(0, (1<<BitDepth) - 1, Y - 2U + (1<<BitDepth))
R = clip3(0, (1<<BitDepth) - 1, Y - 2V + (1<<BitDepth))。
10. coding method according to claim 1 or device or coding/decoding method according to claim 2 or dress It sets, which is characterized in that the encoding and decoding block has one directly or indirectly or directly to mix indirectly in the compressed data stream Coding mode identification code carries out encoding and decoding to the encoding and decoding block using corresponding color space according to the value of the identification code; The direct coding mode identification code is made of one or more bit strings (binary symbols string) in compressed data stream;It is described Indirect coding mode identification code is from coding derived from other syntactic elements of other codec parameters and/or compressed data stream Pattern identification code or scheduled identification code default value;The coding mode identification code directly mixed indirectly is that part is direct (i.e. It is made of one or more bit strings in compressed data stream) partially indirectly (i.e. from other codec parameters and/or compressed data Stream other syntactic elements export or make a reservation for default) mixing coding mode identification code.
CN201710410669.1A 2017-06-03 2017-06-03 Data compression method and device adopting respective corresponding color spaces for modes Active CN108989819B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710410669.1A CN108989819B (en) 2017-06-03 2017-06-03 Data compression method and device adopting respective corresponding color spaces for modes

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710410669.1A CN108989819B (en) 2017-06-03 2017-06-03 Data compression method and device adopting respective corresponding color spaces for modes

Publications (2)

Publication Number Publication Date
CN108989819A true CN108989819A (en) 2018-12-11
CN108989819B CN108989819B (en) 2023-04-07

Family

ID=64502706

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710410669.1A Active CN108989819B (en) 2017-06-03 2017-06-03 Data compression method and device adopting respective corresponding color spaces for modes

Country Status (1)

Country Link
CN (1) CN108989819B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110312136A (en) * 2019-05-10 2019-10-08 同济大学 A kind of coding and decoding methods of pair of multi-component data
CN112622276A (en) * 2020-11-30 2021-04-09 北京恒创增材制造技术研究院有限公司 Color model maximum color difference representation method for 3DP multi-color printing

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008271411A (en) * 2007-04-24 2008-11-06 Canon Inc Image coding unit, control method of image coding unit, program and recording medium
US20100097394A1 (en) * 2008-10-16 2010-04-22 Ming-Hsun Lu Method for clearing blur images of a monitor
CN103077396A (en) * 2013-01-11 2013-05-01 上海电机学院 Method and device for extracting vector space feature points of color image
CN103096092A (en) * 2013-02-07 2013-05-08 上海国茂数字技术有限公司 Method and system of conducting coding and decoding error correction based on color space transformation
US20150181223A1 (en) * 2013-12-20 2015-06-25 Canon Kabushiki Kaisha Method and apparatus for transition encoding in video coding and decoding
US20150271509A1 (en) * 2014-03-19 2015-09-24 Arris Enterprises, Inc. Scalable coding of video sequences using tone mapping and different color gamuts
WO2016202470A1 (en) * 2015-06-18 2016-12-22 Gurulogic Microsystems Oy Encoder, decoder and method employing palette utilization and compression
US20170105012A1 (en) * 2015-10-08 2017-04-13 Mediatek Inc. Method and Apparatus for Cross Color Space Mode Decision
US20170105011A1 (en) * 2015-10-08 2017-04-13 Mediatek Inc. Method and Apparatus for Syntax Signaling in Image and Video Compression
CN106657945A (en) * 2016-12-30 2017-05-10 上海集成电路研发中心有限公司 Nonlinear segmented gamma correction implementation method

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008271411A (en) * 2007-04-24 2008-11-06 Canon Inc Image coding unit, control method of image coding unit, program and recording medium
US20100097394A1 (en) * 2008-10-16 2010-04-22 Ming-Hsun Lu Method for clearing blur images of a monitor
CN103077396A (en) * 2013-01-11 2013-05-01 上海电机学院 Method and device for extracting vector space feature points of color image
CN103096092A (en) * 2013-02-07 2013-05-08 上海国茂数字技术有限公司 Method and system of conducting coding and decoding error correction based on color space transformation
US20150181223A1 (en) * 2013-12-20 2015-06-25 Canon Kabushiki Kaisha Method and apparatus for transition encoding in video coding and decoding
US20150271509A1 (en) * 2014-03-19 2015-09-24 Arris Enterprises, Inc. Scalable coding of video sequences using tone mapping and different color gamuts
WO2016202470A1 (en) * 2015-06-18 2016-12-22 Gurulogic Microsystems Oy Encoder, decoder and method employing palette utilization and compression
US20170105012A1 (en) * 2015-10-08 2017-04-13 Mediatek Inc. Method and Apparatus for Cross Color Space Mode Decision
US20170105011A1 (en) * 2015-10-08 2017-04-13 Mediatek Inc. Method and Apparatus for Syntax Signaling in Image and Video Compression
CN106973296A (en) * 2015-10-08 2017-07-21 联发科技股份有限公司 Video or method for encoding images and relevant apparatus
CN106657945A (en) * 2016-12-30 2017-05-10 上海集成电路研发中心有限公司 Nonlinear segmented gamma correction implementation method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
A.M. TOURAPIS: "A new tool for Color Gamut Analysis of MPEG video content", 《JCTVC》 *
向方明: "YUV到RGB颜色空间转换算法研究", 《现代电子技术》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110312136A (en) * 2019-05-10 2019-10-08 同济大学 A kind of coding and decoding methods of pair of multi-component data
CN112622276A (en) * 2020-11-30 2021-04-09 北京恒创增材制造技术研究院有限公司 Color model maximum color difference representation method for 3DP multi-color printing

Also Published As

Publication number Publication date
CN108989819B (en) 2023-04-07

Similar Documents

Publication Publication Date Title
CN108632607B (en) A kind of point cloud genera compression method based on multi-angle self-adaption intra-frame prediction
CN105284111B (en) Dynamic image encoding device, moving image decoding apparatus, dynamic image encoding method, dynamic image decoding method and program
CN105704491B (en) Image encoding method, decoding method, encoding device, and decoding device
CN104702962B (en) Decoding method, encoder and decoder in frame
CN104144343B (en) A kind of digital image compression encrypts joint coding method
CN109076221A (en) Method for video coding and its device
KR101868247B1 (en) Image encoding and decoding method and device
CN108702501A (en) The method and device that the compartmentalization luma prediction modes of colorimetric prediction for Video coding are inherited
CN107071450A (en) Coding, coding/decoding method and the device of data compression
CN107835431A (en) Method and apparatus to Video coding and the method and apparatus to video decoding
CN106030651A (en) Advanced screen content coding with improved color table and index map coding methods
CN110830803B (en) Image compression method combining block matching and string matching
CN105100814B (en) Image coding and decoding method and device
CN106797468A (en) Improved pallet mode in efficient video coding (HEVC) screen content coding (SCC)
CN113784124B (en) Block matching encoding and decoding method for fine division using multi-shape sub-blocks
CN103957412B (en) Base color and index map algorithm for correcting inter-frame residual errors of screen video
CN108495135A (en) A kind of fast encoding method of screen content Video coding
CN110087083A (en) The selection method of prediction mode for chroma, image processing equipment and storage equipment in frame
CN110087090A (en) Using data encoding, the coding/decoding method of mixing String matching and intra prediction
CN110392256A (en) Method, coding side, decoding end and the system coded and decoded
CN105847842A (en) Image encoding method and apparatus and image decoding method and apparatus
CN104539970A (en) 3D-HEVC interframe coding merge mode fast decision making method
CN105392009A (en) Low bit rate image coding method based on block self-adaptive sampling and super-resolution reconstruction
CN107770540B (en) Data compression method and device for fusing multiple primitives with different reference relations
CN108989819A (en) Each mode uses the data compression method and device of respectively corresponding color space

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant