WO2015120823A1 - Image compression method and device using reference pixel storage space in multiple forms - Google Patents

Image compression method and device using reference pixel storage space in multiple forms Download PDF

Info

Publication number
WO2015120823A1
WO2015120823A1 PCT/CN2015/073204 CN2015073204W WO2015120823A1 WO 2015120823 A1 WO2015120823 A1 WO 2015120823A1 CN 2015073204 W CN2015073204 W CN 2015073204W WO 2015120823 A1 WO2015120823 A1 WO 2015120823A1
Authority
WO
WIPO (PCT)
Prior art keywords
decoding
reference pixel
matching
module
pixel sample
Prior art date
Application number
PCT/CN2015/073204
Other languages
French (fr)
Chinese (zh)
Inventor
林涛
Original Assignee
同济大学
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 同济大学 filed Critical 同济大学
Publication of WO2015120823A1 publication Critical patent/WO2015120823A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/573Motion compensation with multiple frame prediction using two or more reference frames in a given prediction direction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/105Selection of the reference unit for prediction within a chosen coding or prediction mode, e.g. adaptive choice of position and number of pixels used for prediction
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/157Assigned coding mode, i.e. the coding mode being predefined or preselected to be further used for selection of another element or parameter
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
    • H04N19/43Hardware specially adapted for motion estimation or compensation
    • H04N19/433Hardware specially adapted for motion estimation or compensation characterised by techniques for memory access
    • 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/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction

Definitions

  • the present invention relates to a digital video compression encoding and decoding system, and more particularly to a method and apparatus for encoding and decoding composite images and video containing computer screen images.
  • a digital video signal of an image is a sequence of images.
  • a frame of image is usually a rectangular area composed of several pixels, and a digital video signal is a sequence of video images composed of tens of frames to thousands of frames of images, sometimes simply referred to as a video sequence or sequence.
  • Encoding a digital video signal encodes a frame by frame image.
  • coding one frame of image in almost all international standards for video image encoding such as MPEG-1/2/4, H.264/AVC and the latest international video compression standard HEVC (High Efficiency Video Coding)
  • a frame image is divided into sub-images of a plurality of blocks of MxM pixels, it is called a "Coding Unit (CU)", and the sub-images are coded one by one with CU as a basic coding unit.
  • the size of the commonly used M is 8, 16, 32, 64. Therefore, encoding a video image sequence is to sequentially encode each coding unit of each frame.
  • decoding each coding unit of each frame is sequentially decoded in the same order, and finally the entire video image sequence is reconstructed.
  • each CU in one frame of image can be different, some are 8x8, some are 64x64, and so on.
  • LCUs Large Coding Units
  • NxN pixels the same size and having NxN pixels
  • each LCU is further divided into trees.
  • CTU Coding Tree Unit
  • One of the LCUs is composed of three 32x32 pixel CUs and four 16x16 pixel CUs, so that seven tree-structured CUs form a CTU.
  • the other LCU consists of two 32x32 pixel CUs, three 16x16 pixel CUs, and 20 8x8 pixel CUs.
  • Such 25 CUs in a tree structure constitute another CTU.
  • Encoding one frame of image is to sequentially encode one CU in one CTU. At any one time, the CU being coded is referred to as the current coded CU.
  • Decoding one frame of image also sequentially decodes one CU in one CTU in the same order.
  • the CU being decoded is referred to as the currently decoded CU.
  • the current encoded CU or the currently decoded CU is typically the current CU.
  • one CU is usually further divided into smaller sub-areas.
  • the sub-regions include, but are not limited to, a prediction unit (PU), a transform unit (TU), an asymmetric partition (AMP) region, a macroblock, a block, a microblock, and a strip (width or height is one pixel or one pixel component) Area), a variable-sized rectangular area, a variable-sized pixel string (segment) or a pixel component string (segment) or a pixel index string (segment).
  • Encoding (and corresponding decoding) a CU is to encode one sub-region (and corresponding decoding).
  • a sub-area is called a coding sub-area
  • a sub-area is called a decoding sub-area.
  • the coding sub-area and the decoding sub-area are collectively referred to as a codec sub-area.
  • the sub-regions particularly prediction units, transform units, asymmetrically divided regions, macroblocks, blocks, microblocks, strips
  • the coding sub-region and the decoding sub-region are often referred to as coding blocks and decoding blocks, respectively, in many cases, collectively referred to as codec blocks.
  • a color pixel consists of three components.
  • the two most commonly used pixel color formats are the GBR color format consisting of a green component, a blue component, and a red component, and a generic term called YUV consisting of a luma component and two chroma components.
  • Color formats such as YCbCr color format. Therefore, when encoding a sub-area, a sub-area can be divided into three component planes (G plane, B plane, R plane or Y plane, U plane, V plane), and the three component planes are respectively coded;
  • the three components of one pixel can be bundled into one 3-tuple, and the sub-regions composed of these 3-tuples are encoded as a whole.
  • the arrangement of the former pixel and its components is called the planar format of the image (and its sub-regions), and the arrangement of the latter pixel and its components is called the overlay format of the image (and its sub-regions). (packed format).
  • a planar format is arranged. First arrange all WxH G components of a frame image (or a CU) with a width of W pixels of H pixels, then arrange all WxH B components, and finally arrange all WxH R components:
  • a stacking format is arranged by first arranging the G components of the first pixel, then arranging the B component and the R component, then arranging the G component, the B component, and the R component of the second pixel, and so on, and finally arranging.
  • palette index representation Another common representation of pixels and their components is the palette index form.
  • the value of a component of a pixel is represented by the index of the palette.
  • the palette space stores the value or approximate value of the three components of the pixel that needs to be represented.
  • the address of the palette is called the index of the pixel (called the palette color) stored in this address.
  • An index can represent one component of a pixel, and an index can also represent three components of a pixel.
  • the palette can be one or more. In the case of multiple palettes, a complete index is actually composed of the palette number and the index of the numbered palette.
  • the index representation of a pixel and its components is an index to represent this pixel.
  • the index representation of a pixel is also referred to in the prior art as an indexed color or a pseudo color representation of a pixel, or is often referred to directly as an indexed pixel or a pseudo pixel (pseudo pixel). ) or pixel index or cable lead. Indexes are sometimes referred to as indices. Representing a pixel in its indexed representation is also referred to as indexing or exponentialization.
  • the palette index representation of a pixel and its components is a color-based aggregation and sorting format of the pixel and its components.
  • CMYK color format CMYK color format
  • grayscale color format CMYK color format
  • the index representation of a pixel is also a color format of a pixel, called an index color format or a pseudo color format.
  • the YUV color format can be subdivided into several seed formats according to whether the chroma component is downsampled: a YUV 4:4:4 pixel color format consisting of 1 Y component, 1 U component, and 1 V component.
  • the left and right adjacent pixels are composed of two Y components, one U component, and one V component in a YUV 4:2:2 pixel color format; four pixels arranged in a left and right adjacent position by 2x2 spatial position are composed of four pixels.
  • YUV4: 2:0 pixel color format consisting of Y component, 1 U component, and 1 V component.
  • a component is generally represented by a number of 8 to 16 bits.
  • the YUV4:2:2 pixel color format and the YUV4:2:0 pixel color format are all downsampled for the YUV4:4:4 pixel color format.
  • a pixel component is also referred to as a pixel sample or simply as a sample.
  • a sample can be an 8-bit number, ie one sample occupies one byte.
  • a sample can also be a 10-bit number or a 12-bit number or a 14-bit number or a 16-bit number.
  • reconstructed pixels are generated, which are further divided into different degrees of partially reconstructed pixels generated in the encoding or decoding process and fully reconstructed pixels generated after the encoding or decoding process is completed. . If the fully reconstructed pixel samples have equal values to the original input pixel samples prior to encoding, the encoding and decoding process that is experienced is referred to as lossless encoding and decoding. If the fully reconstructed pixel samples have unequal values from the original input pixel samples prior to encoding, the encoding and decoding process that is experienced is referred to as lossy encoding and decoding.
  • the generated reconstructed pixel samples are usually saved as historical data and used as reference pixel samples for subsequent sub-region encoding or decoding.
  • the storage space in which the reconstructed pixel history data is saved is referred to as a reference pixel sample storage space.
  • the reference pixel sample storage space is limited and only a portion of the historical data can be saved.
  • the historical data in the reference pixel sample storage space may also include reconstructed pixel samples of the reconstructed sub-region of the current CU.
  • a notable feature of computer screen images is that there are often many similar or even identical pixel patterns within the same frame of image.
  • Chinese or foreign text that often appears in computer screen images is composed of a few basic strokes, and many similar or identical strokes can be found in the same frame image.
  • Menus, icons, etc. which are common in computer screen images, also have many similar or identical patterns.
  • the intra prediction method used in the existing image and video compression technology only refers to adjacent pixel samples, and cannot improve the compression efficiency by using the similarity or the similarity in one frame image.
  • the intra motion compensation method in the prior art is also called intra block copy mode, and uses several fixed size (8x8, 16x16, 32x32, 64x64 pixels) blocks for intraframe.
  • Intra block matching coding does not achieve a finer match with a variety of different sizes and shapes.
  • the microblock matching method, the fine division matching method, the string matching method, and the palette matching method also called the palette index matching method or the index matching method.
  • the palette matching method also called the palette index matching method or the index matching method.
  • the historical data of the encoded (or decoded) reconstructed pixel samples must be used as the reference pixel samples.
  • the larger the reference pixel sample storage space the better the efficiency of prediction and matching.
  • the reference pixel sample storage space can generally accommodate historical data of a few frames or even tens of pixels (such as palette pixels) and dozens of frames.
  • the historical data of the reconstructed pixel is represented in a single form and placed in a single reference pixel sample storage space module. Take a frame of 640x480 pixels of YUV4:4:4 image and each pixel sample occupies one byte.
  • the most common form of historical data is in a storage space module with a linear (1D) address.
  • the linear placement order is a planar format and each plane is divided into equally sized blocks, each block having WxH pixel samples (ie, one component of the pixel), first arranged in blocks in a certain linear order.
  • Each prediction method or method of matching has its specific and most effective form of historical data.
  • Historical data and reference pixel sample storage space will greatly reduce coding efficiency. Therefore, multiple forms of historical data and reference pixel sample storage space must be used to improve prediction or matching performance and reduce the bandwidth required to read and write historical data.
  • the main technical feature of the present invention is that when encoding or decoding a plurality of prediction and matching modes in combination with a current coding unit, various forms of historical data and reference pixel sample storage space are used accordingly.
  • pixel sample storage space usually consists of four elements:
  • pixels and their component arrangement formats such as stack format and plane format
  • Pixel color format such as GBR color format, RGB color format, YCbCr color format, YUV color format, CMYK color format, YIQ color format, HSV color format, HSL color format, index color format, etc., different color formats Usually can be converted to each other;
  • Pixel aggregation and sorting format For example, pixels are aggregated and ordered according to their position coordinates: the historical data of a pixel whose shape is a 2-dimensional area or its components is aggregated in a 2-dimensional array space, or aggregated in a 1-dimensional array space. In the case of 1 dimension, the linear placement of the historical data in a storage space having a linear (1 dimensional) address is also determined; a typical linear placement is to first divide the 2-dimensional region into equal sizes.
  • each block having WxH pixels (in the case of a stack format) or one component thereof (in the case of a planar format), and then placing the blocks in a determined linear order (eg row order or column order or depth)
  • the 4-point tree order for D is placed in front of the linear address storage space, and the pixels inside each block or one of its components are scanned according to a certain linearity (for example: line scan or column scan or zigzag scan or Z-scan or bow scan or 4-point tree scan with depth D is arranged in 1D data and placed in linear address storage space; for example, pixels are clustered and sorted according to their colors: color palette color, texture color
  • the pixels in the palette are sorted according to one of their characteristics to form a reference pixel sample storage space with a linear address; two examples of the characteristics: 1) the palette color appears in a CU Sequence, 2) the frequency of occurrence of colors in a color palette in the CU;
  • Downsampling format of chroma components such as YUV4:4:4 format or YUV4:2:2 format or YUV4:2:0 format.
  • the 4 elements determine the form of the reference pixel sample storage space. One difference between these four elements is the form of a different reference pixel sample storage space.
  • the most basic characteristic feature is to determine A (2 ⁇ A ⁇ 5) kinds of predictive coding modes and matching coding modes, and determine B (2 ⁇ B ⁇ A ⁇ 5) of historical data.
  • A (2 ⁇ A ⁇ 5) kinds of predictive coding modes and matching coding modes
  • B (2 ⁇ B ⁇ A ⁇ 5) of historical data.
  • Different forms of reference pixel sample storage space, and class A predictive coding mode and matching coding mode are classified into class B, and respectively correspond to B reference pixel sample storage spaces.
  • each predictive coding mode or matching coding mode performs predictive coding or matching coding according to the corresponding reference pixel sample storage space according to its classification, and selects A prediction according to a predetermined evaluation criterion.
  • One of the coding mode and the matching coding mode encodes the current sub-area. Regardless of which prediction encoding mode and matching encoding method are selected, the current sub-region is encoded, and the generated new historical data is converted into the main reference pixel sample storage space and placed in the main reference pixel sample storage space. It may also be converted to other reference pixel sample storage spaces (which may be in another level of partial reconstruction) and placed in other reference pixel sample storage spaces. Historical data in different reference pixel sample storage spaces needs to be synchronized.
  • the most basic characteristic feature is to determine A (2 ⁇ A ⁇ 5) kinds of predictive decoding mode and copy decoding mode, and determine B (2 ⁇ B ⁇ A ⁇ 5) of historical data.
  • A (2 ⁇ A ⁇ 5) kinds of predictive decoding mode and copy decoding mode
  • B (2 ⁇ B ⁇ A ⁇ 5) of historical data.
  • Different types of reference pixel sample storage spaces, and class A prediction decoding mode and matching decoding mode are classified into class B, and respectively correspond to B reference pixel sample storage spaces.
  • B different forms of reference pixel sample storage space may have different spatial sizes to store different amounts of historical data, wherein the one storing the most historical data is called the primary reference pixel sample storage space, and the other reference pixel samples are
  • the historical data in the storage space is a subset of the historical data of the primary reference pixel sample storage space, but has different representations and may be in different degrees of partial reconstruction (such as having been color clustered or matched) The residual or the matching residual has not been added).
  • each of the prediction decoding mode or the copy decoding mode performs prediction decoding or copy decoding according to the corresponding reference pixel sample storage space according to the classification.
  • the information read from the video stream data or the information read from the video stream data plus the characteristics of the current decoding sub-region and the neighboring sub-regions one of the A prediction decoding modes and the copy decoding mode is selected. Decode the current subregion. Regardless of which prediction decoding mode and copy decoding mode are selected to decode the current sub-area, the generated new historical data is converted into the main reference pixel sample storage space and placed in the main reference pixel sample storage space. It may also be converted to other reference pixel sample storage spaces (which may be in another level of partial reconstruction) and placed in other reference pixel sample storage spaces. Historical data in different reference pixel sample storage spaces needs to be synchronized.
  • an image encoding method or apparatus comprising at least one of the steps or modules for performing the following functions and operations:
  • the video code stream includes at least decoding corresponding decoding in the decoding method and the device.
  • an image decoding method or apparatus comprising at least one of the steps or modules for performing the following functions and operations:
  • the prediction and matching coding module is configured to be a plurality of coding processing units using different coding modes, wherein the coding processing unit is configured to perform data using one of intra prediction coding, inter prediction coding, or a plurality of different matching coding modes. deal with;
  • An encoding storage module configured to store a plurality of storage units of different forms of reconstructed pixel sample data
  • An encoding data control module configured to control the prediction and matching encoding module to read data of a corresponding one or more storage units in the code storage module that is preset; and to control the prediction according to the read data
  • the matching coding module hands over the data to be encoded to the corresponding coding processing unit; and controls the prediction and matching coding mode
  • the block writes output data of the encoding processing unit to one or more storage units of the code storage module that are preset.
  • the prediction and copy decoding module is configured to be a plurality of decoding processing units using different decoding modes, wherein the decoding processing unit is configured to perform data using one of intra prediction decoding, inter prediction decoding, or a plurality of different copy decoding modes. deal with;
  • Decoding the storage module configured to store a plurality of storage units of different forms of reconstructed pixel sample data
  • a decoding data control module configured to control the prediction and copy decoding module to read data of a corresponding one or more storage units in the preset decoding storage module; and to control the prediction according to the read data
  • the copy decoding module hands over the data to be decoded to the corresponding decoding processing unit; and controls the prediction and copy decoding module to write the output data of the decoding processing unit to one or more storage units in the preset decoding storage module.
  • Predictive coding mode module matching coding mode 1 module, matching coding mode 2 module, ..., matching coding mode A-1 module: A is a positive integer satisfying 2 ⁇ A ⁇ 5; Using input prediction (intra prediction or inter prediction or both) coding mode, matching coding mode 1, matching coding mode 2, ..., matching coding mode A-1, an input coding unit of the input video image Performing a prediction or matching coding operation on a current coding sub-region; the output of the prediction coding mode module is a prediction mode, an inter-predicted motion vector, and a prediction residual, that is, an original input pixel sample and prediction of the input video image a difference between the pixel samples; the output of each of the matching coding mode modules is a matching mode, a matching position, an unmatched sample, and a matching residual; the matching position is used to represent the currently encoded pixel in the current coding sub-region a variable of a position of the matched reference pixel sample in the reference pixel sample storage space, the reference image matching the
  • the unmatched samples are found in the reference pixel sample storage space according to a predetermined matching criterion, if a matching matching criterion is determined Very loose, allowing arbitrarily large matching errors, so that a match can always be found, then there is no unmatched sample as an output in this matching coding mode; the matching residual is the original input pixel sample and the matching pixel The difference between the samples, if a matching matching criterion is an absolutely accurate lossless matching, the matching residual is zero, that is, the matching encoding method has no matching residual as an output, if a matching If the matching criterion determined by the coding mode is an approximate lossy match, the matching residual may not be zero, and another case of lossy matching is to first perform sample quantization, color quantization or based on the original input pixel sample.
  • Pre-processing of pixel clustering of colors and then performing matching encoding operations.
  • sample quantization, color quantization, or color-based pixel clustering is lossy, even if the matching encoding operation itself is lossless,
  • the matching residual ie, the difference between the original input pixel sample and the matched pixel sample
  • the matching residual may also be non-zero;
  • the reference pixel sample storage space stores the reconstructed pixel sample history data generated in the encoding process in a unique mutually different form, and is used as a reference pixel sample required for subsequent encoding and reconstruction of various operations;
  • Different forms of reference pixel sample storage space may have different spatial sizes to store different amounts of historical data, wherein the one storing the most historical data is called the primary reference pixel sample storage space, and the other reference pixel sample storage spaces.
  • the historical data in the data is a subset of the historical data of the primary reference pixel sample storage space, but has different representations and may be in different degrees of partial reconstruction (such as having been color clustered or added matching residuals) Or no matching residuals are added; corresponding to the B reference pixel sample storage spaces, the predictive coding mode module, the matching coding mode 1 module, and the matching code Mode 2 module, ..., matching coding mode A-1 module
  • a coding mode is also divided into B class correspondingly, corresponding to B reference pixel sample storage space; in the current coding sub-area
  • each predictive coding mode or matching coding mode uses the corresponding reference pixel sample storage space for predictive coding or matching coding according to its classification, and selects A predictive coding mode and matching coding mode according to predetermined evaluation criteria.
  • the form conversion module of the pixel sample storage space converts one form of the form of the reference pixel sample storage space into another form; the reconstructed pixel generated and output by the module 3) passes through the module. Converted into the form of the main reference pixel sample storage space and placed in the module 2) the main reference pixel sample storage space, or may be converted into other reference pixel sample storage space by the module (may be at another level Partial reconstruction stage) and put into the other reference pixel sample storage space of module 2), used as reference pixel samples needed for subsequent encoding and reconstruction of various operations; this module makes different reference pixel samples Historical data in the storage space is synchronized with each other.
  • An embodiment of the decoding apparatus of the present invention is composed of the following modules:
  • Code stream data parsing and partial decoding module performing entropy decoding on the video stream of the currently decoded CU including the prediction mode, the motion vector, the matching mode, the matching position, the unmatched sample compressed data, and all other syntax element compressed data.
  • parsing and performing partial decoding such as transform decoding, prediction and compensation, ie inverse operation of residual operation, DPCM decoding, first-order and high-order differential decoding, mapping Parameters such as prediction mode, motion vector, matching mode, matching position, and unmatched samples obtained by decoding, run-length decoding, and index decoding are sent to each prediction decoding mode module and matching decoding mode module;
  • Other syntax elements such as prediction residuals and matching residual entropy decoded output data (ie, the result of entropy decoding) are sent to the remaining common techniques of decoding and reconstruction modules; in particular, based on parsing from video stream data.
  • the information is based on the information parsed from the video stream data plus the current decoding sub-region and the neighboring sub-region. Selecting a corresponding prediction decoding mode or matching decoding mode, and sending several parameters and variables corresponding to the prediction mode, the motion vector, the matching mode, the matching position, the unmatched sample, and the like to a corresponding prediction decoding mode module or matching Decoding mode module, starting the corresponding predictive decoding mode module or matching decoding mode module to decode the current decoding sub-region;
  • Predictive decoding mode module Predictive decoding mode module, matching decoding mode 1 module, matching decoding mode 2 module, ..., matching decoding mode A-1 module: A is a positive integer satisfying 2 ⁇ A ⁇ 5; the A decoding mode modules respectively Using the prediction (intra prediction or inter prediction or both) decoding mode, matching decoding mode 1, matching decoding mode 2, ..., matching decoding mode A-1, the A decoding mode corresponds to the corresponding A current decoding The region performs prediction or matching decoding operation; the input of the prediction decoding mode module is a motion vector of a prediction mode and an inter prediction; the input of the matching decoding mode module is a matching mode, a matching position, and possibly an unmatched sample.
  • the matching position is used to indicate from the reference
  • the matching reference pixel samples are copied and pasted to the position of the currently decoded pixel sample (referred to as the matched pixel sample) of the current decoded sub-region, the matched reference pixel
  • the sample values are referred to as matching pixel samples (obviously, the matched pixel samples are replicas of matching pixel samples, both of which are numerically equal), and the positions of the matching pixel samples are not necessarily in the reference
  • One area connected together in the pixel sample storage space may also be several areas separated in the reference pixel sample storage space; the unmatched samples are directly parsed and decoded from the video stream data.
  • the unmatched sample is typically not present in the reference pixel sample storage space;
  • the A decoding mode module The output is a predicted pixel sample or the matched pixel sample (which is numerically equal to the matched pixel sample) plus the unmatched sample (present in some matching decoding modes); Pixel sample values are matched and the match is not possible to sample all together constitute the complete data matching the decoded output of the current decoding CU;
  • the reference pixel sample storage space stores the reconstructed pixel sample history data generated in the decoding process in a unique mutually different form, and is used as a reference pixel sample required for subsequent decoding and reconstruction of various operations;
  • Different forms of reference pixel sample storage space may have different spatial sizes to store different amounts of historical data, wherein the one storing the most historical data is called the primary reference pixel sample storage space, and the other reference pixel sample storage spaces.
  • the historical data in the data is a subset of the historical data of the primary reference pixel sample storage space, but has different representations and may be in different stages of partial reconstruction (such as matching residuals or no matching residuals)
  • the A decoding modes of the decoding mode A-1 module are also divided into B classes correspondingly, corresponding to the B reference pixel sample storage spaces; when decoding the current decoding sub-region, each prediction decoding The mode or the matching decoding mode performs prediction decoding or matching decoding according to the corresponding reference pixel sample storage space according to its classification, and each reference pixel sample storage space is all decoding modes corresponding to the decoding mode (possibly There are a variety of) providing reference pixel samples;
  • the remaining common techniques of decoding and reconstructing modules performing the remaining common techniques on the current decoding sub-region, such as inverse transform, inverse quantization, compensation corresponding to prediction residuals and matching residuals (ie, taking Inverse operation of residual operation), prediction and compensation (ie inverse operation of residual operation), DPCM, first-order and high-order difference, mapping, run, index, deblocking filtering, sample adaptive compensation (Sample Adaptive Offset), decoding and reconstruction operations;
  • the input to this module is all other syntax elements of module 1) output such as entropy decoded output data for prediction residuals and matching residuals and modules 2)
  • the output of the block is the predicted pixel sample or the matched pixel sample plus the unmatched sample that may exist;
  • the output of the module is a reconstructed pixel (including fully reconstructed pixels and varying degrees of partial reconstruction) Pixels); the reconstructed pixels are converted into a form of a primary reference pixel sample storage space and placed in the module 3) the primary reference pixel sample storage space, and
  • Form conversion module of pixel sample storage space convert one form of the form of B reference pixel sample storage space into another form; module 4) reconstructed pixels generated and output must pass through this module Converted into the form of the main reference pixel sample storage space and placed in the module 3) the main reference pixel sample storage space, may also be converted into other reference pixel sample storage space by the module (may be in another degree Partial reconstruction stage) and put into the other reference pixel sample storage space of module 3), used as reference pixel samples needed for subsequent decoding and reconstruction of various operations; this module makes different reference pixel samples Historical data in the storage space is synchronized with each other.
  • the positive integer A is equal to 4, and the four coding mode modules are a prediction coding mode module, a block matching coding mode module, a string matching coding mode module, and a palette matching coding mode module; the positive integer B is equal to 2,
  • the two reference pixel sample storage spaces are reference pixel storage spaces in the form of a planar format and a two-dimensional array space (referred to as a planar two-dimensional reference space) and a reference to a form of a stacked format and a one-dimensional array space.
  • a pixel sample storage space (referred to as a stacked 1-dimensional reference space);
  • the primary reference pixel sample storage space is the planar 2-dimensional reference space, and historical data in the stacked 1-dimensional reference space are all A subset of the historical data of a planar 2-dimensional reference space, but with different representations and possibly at different degrees of partial reconstruction (eg if a matching residual has been added or a matching residual has not been added); the 4 encodings
  • the method is also divided into two categories correspondingly, and the prediction coding mode and the block matching coding mode are both the first type coding mode, corresponding to the planar two-dimensional reference space, and the string matching coding mode and the color palette.
  • Encoding with a second coding method are based, and the The stacked packet corresponds to a 1-dimensional reference space; when encoding the current coding sub-region, the predictive coding mode uses the planar 2-dimensional reference space for predictive coding, and the block-matching coding mode also uses the planar 2-dimensional reference space.
  • Block matching coding, the string matching coding method uses the overlapping packet 1D reference space for string matching coding, and the palette matching coding mode also uses the overlapping packet 1D reference space for palette matching coding;
  • the dimension reference space provides reference pixel samples for predictive coding and block matching encoding, and the stacked 1-dimensional reference space provides reference pixel samples for string matching encoding and palette matching encoding;
  • a block-matching coding scheme is a block of a certain size (such as 64x64 samples, 32x32 samples, 16x16 samples, 8x8 samples, 8x4 samples, 4x8 samples, 4x4 samples, etc.) (referred to as a matched block, which is Matching encoding is performed in units of a 2-dimensional coordinate, the matching pixel samples form a matching block in the planar 2-dimensional reference space, and the position within one frame of the image is also available.
  • a two-dimensional coordinate representation and thus in the block matching coding mode, the matching position can be represented by a difference between a 2-dimensional coordinate of the matching block and a 2-dimensional coordinate of the matched block, which is called a displacement vector;
  • the string matching coding method arranges the pixel samples of the current coding sub-region into a 1-dimensional pixel sample string in a stack format according to a predetermined linear scan format, and uses a variable-length pixel sample string (referred to as being matched).
  • the string whose position can be represented by a 2D coordinate or a linear address, is matched and encoded.
  • the matched pixel sample forms a matching string in the 1D-dimensional reference space of the stack, and the position is also available.
  • a 2-dimensional coordinate can also be represented by a linear address. Therefore, in the string matching coding mode, the matching position can use the difference between the 2-dimensional coordinates of the matching string and the 2-dimensional coordinates of the matched string, and the linear address of the matching string can also be used.
  • the difference between the linear addresses of the matched strings is generally referred to as the displacement vector. Since the length of the matching string (equal to the length of the matched string) is variable, another variable called the matching length and the displacement vector are needed. Together, that is, (displacement vector, matching length), the matching position is completely represented; the result of performing string matching encoding on the current coding CU is M (M ⁇ 1) matching strings and N (N) ⁇ 0) unmatched pixel samples, output M pairs (displacement vector, matching length) and N unmatched pixel samples;
  • the palette matching encoding uses only a part of the pixels of the stacked 1-dimensional reference space (generally containing a number of pixel samples in the current CU) as reference pixels, and thus a predetermined method from the stacked 1-dimensional reference space Pick out and update a set of K pixels (usually 4 ⁇ K ⁇ 64). These K pixels form a palette. Each pixel in the palette is represented by an index. Using the pixels of the palette as reference pixels, and the matching position of the matching pixel samples is an index of the matching pixel samples in a palette, all of the matching pixels of the current encoding CU The index of the sample value constitutes an index array as an index map;
  • One of the functions of the remaining common techniques of coding and reconstruction modules is to perform various commonly used transformations and predictions on parameters and variables such as matching patterns, displacement vectors, matching lengths, index mappings, unmatched samples, and the like. And find the residual, DPCM, first-order and high-order difference, mapping, run, index coding;
  • the form conversion module of the pixel sample storage space performs mutual conversion between the following two expression forms of the pixel: 1) a format of a planar format and a 2-dimensional array space, 2) a form of a stacked packet format and a 1-dimensional array space;
  • the palette matching encoding mode module and the color palette are optional and may be omitted, so that in the encoding device, the positive integer A is equal to 3, and the three encoding mode modules are predictions respectively.
  • the string matching coding mode module is optional and may be omitted. Therefore, in the coding apparatus, the positive integer A is equal to 3, and the three coding mode modules are respectively a prediction coding mode module and a block matching coding mode. Module, palette matching encoding mode module.
  • the positive integer A is equal to 4, and the four decoding mode modules are a prediction decoding mode module, a block matching decoding mode module, a string matching decoding mode module, and a palette matching decoding mode module; the positive integer B is equal to 2,
  • the two reference pixel sample storage spaces are reference pixel storage spaces in the form of a planar format and a two-dimensional array space (referred to as a planar two-dimensional reference space) and a reference to a form of a stacked format and a one-dimensional array space.
  • a pixel sample storage space (referred to as a stacked 1-dimensional reference space);
  • the primary reference pixel sample storage space is the planar 2-dimensional reference space, and historical data in the stacked 1-dimensional reference space are all A subset of the historical data of the planar 2-dimensional reference space, but with different representations and possibly at different degrees of partial reconstruction (eg if a matching residual has been added or a matching residual has not been added);
  • the 4 decodings The mode is also divided into two categories correspondingly, and the prediction decoding mode and the block matching decoding mode are both the first type decoding mode, corresponding to the planar 2-dimensional reference space, and the string matching decoding mode and the color palette.
  • the decoding mode is a type 2 decoding mode corresponding to the stacked packet 1-dimensional reference space; when decoding the current decoding CU, the prediction decoding mode uses the planar 2-dimensional reference space for prediction decoding, and the block
  • the matching decoding method also uses the planar 2-dimensional reference space for block matching decoding, and the string matching decoding method uses the stacked packet 1-dimensional reference space for string matching decoding, and the palette matching decoding method also uses the stacked packet 1D.
  • the reference space performs palette matching decoding; the planar 2-dimensional reference space provides reference pixel samples for predictive decoding and block matching decoding, and the stacked 1-dimensional reference space provides for string matching decoding and palette matching decoding. Reference pixel sample;
  • a block-matching decoding method is a block of a certain size (such as 64x64 samples, 32x32 samples, 16x16 samples, 8x8 samples, 8x4 samples, 4x8 samples, 4x4 samples, etc.) (referred to as a matched block, which is Matching decoding is performed in units of a 2-dimensional coordinate, which forms a matching block in the planar 2-dimensional reference space, and the position within one frame of the image is also available.
  • a two-dimensional coordinate representation and thus in the block matching decoding mode, the matching position can be represented by a difference between a 2-dimensional coordinate of the matching block and a 2-dimensional coordinate of the matched block, which is called a displacement vector;
  • the string matching decoding method arranges the pixel samples of the currently decoded CU into a 1-dimensional pixel sample string in a stack format according to a predetermined linear scan format, and uses a variable length pixel sample string (referred to as a matched string). , the position of which can be represented by a 2D coordinate or a linear address.
  • the matching pixel sample forms a matching string in the 1st dimension reference space of the stack, and the position is also available.
  • the 2-dimensional coordinates can also be represented by a linear address. Therefore, in the string matching decoding mode, the matching position can use both the difference between the 2-dimensional coordinates of the matching string and the 2-dimensional coordinates of the matched string, and the linear address of the matching string can also be used.
  • the difference between the linear addresses of the matching strings is generally referred to as the displacement vector.
  • the length of the matching string is variable, another variable called the matching length is required along with the displacement vector. , ie (displacement vector, matching length), to completely represent the matching position; the input when performing string matching decoding on the current decoding CU is parsed from the video stream data And the matching pattern obtained by decoding, M (M ⁇ 1) pairs (displacement vector, matching length) and N (N ⁇ 0) unmatched pixel samples;
  • Palette matching decoding uses only a portion of the pixels of the stacked 1-dimensional reference space (typically containing a number of pixel samples within the current CU) as reference pixels, thus following a predetermined method from the stacked 1-dimensional reference space Pick out and update a set of K pixels (usually 4 ⁇ K ⁇ 64). These K pixels form a palette. Each pixel in the palette is represented by an index. The palette matches the decoding method.
  • the matching position of the matching pixel samples is an index of the matching pixel samples in a palette
  • all of the matching pixels of the currently decoded CU The index of the sample form an index array as an index map; the index map is parsed and decoded from the video stream data, and is one of the input of the palette matching decoding;
  • One of the functions of the code stream data parsing and partial decoding module is to represent parameters such as a matching pattern, a displacement vector, a matching length, an index map, an unmatched sample, and the like obtained by entropy decoding from the video code stream.
  • the partial decoded data of the syntax element performs various commonly used transform decoding, prediction and compensation, that is, inverse operation of residual operation, DPCM decoding, first-order and high-order differential decoding, mapping decoding, run-length decoding, and index decoding.
  • the operation obtains the original matching mode, the displacement vector, the matching length, the index mapping, the unmatched sample and other parameters and variables, and is used as a block matching decoding mode module, a string matching decoding mode module, and a palette matching decoding mode module input;
  • the form conversion module of the pixel sample storage space performs mutual conversion between the following two expression forms of the pixel: 1) a format of a planar format and a 2-dimensional array space, 2) a form of a stacked packet format and a 1-dimensional array space;
  • the palette matching decoding mode module and the color palette are optional and may be omitted, so that in the decoding device, the positive integer A is equal to 3, and the three decoding mode modules are predictions respectively.
  • the string matching decoding mode module is optional and may be omitted, so that in the decoding device, the positive integer A is equal to 3, and the three decoding mode modules are respectively a prediction decoding mode module, and a block matching decoding mode. Module, palette matching decoding mode module.
  • the coding unit in the video stream ie the CU part, consists of syntax elements loaded with the following information:
  • CU header prediction and matching mode identification code, prediction mode or matching mode, motion vector 1 or matching position 1, unmatched pixel sample 1, motion vector 2 or matching position 2, unmatched pixel sample 2, ......... ..., more motion vectors or matching positions, more unmatched pixel samples, prediction residuals or matching residuals, other coding results;
  • the order in which all other of the syntax elements are placed in the code stream is not unique, and any predetermined predetermined order may be employed; any one of the syntax elements may also be split into several parts. The parts may be placed centrally in the same place in the code stream, or may be placed in different places in the code stream; any number of syntax elements may also be combined into one syntax element; in addition to the CU header syntax elements and prediction and matching The mode identifier code syntax element, and other syntax elements may not exist in the compressed code stream data of a certain CU;
  • the prediction and matching mode identification code may take the following code values and have the following semantics:
  • the current encoding or decoding CU (referred to as the current CU) adopts predictive coding or decoding 1
  • the current encoding or decoding CU (referred to as the current CU) adopts matching encoding or decoding mode 1 2
  • the current encoding or decoding CU (referred to as the current CU) adopts matching encoding or decoding mode 2 ... ...2015........ A-1
  • the current encoding or decoding CU (referred to as the current CU for short) adopts matching encoding or decoding mode A-1
  • the value ranges from 1 to B, and corresponds to the B reference pixel sample storage spaces, respectively.
  • the code value of the current CU prediction and matching mode identification code and the A-ary array ClassOfCoding[A] can be followed.
  • the following judgment conditions determine which reference pixel sample storage space the current CU uses for encoding or decoding:
  • the reference pixel sample storage space j is used.
  • Embodiment 1 of a video code stream including a prediction and matching mode identification code and other coding results, and a class 2 coding or decoding mode
  • the coding unit in the video stream ie the CU part, consists of syntax elements loaded with the following information:
  • CU header prediction and matching mode identification code, prediction mode or matching mode, motion vector 1 or displacement vector 1 or (displacement vector 1, matching length 1) or index map 1, unmatched pixel sample 1, motion vector 2 or displacement Vector 2 or (displacement vector 2, matching length 2) or index map 2, unmatched pixel samples 2, .........., more motion vectors or displacement vectors or (displacement vectors, matching lengths) or index mapping, more Multiple unmatched pixel samples, prediction residuals or matching residuals, other coding results;
  • the order in which all other of the syntax elements are placed in the code stream is not unique, and any predetermined predetermined order may be employed; any one of the syntax elements may also be split into several parts. The parts may be placed centrally in the same place in the code stream, or may be placed in different places in the code stream; any number of syntax elements may also be combined into one syntax element; in addition to the CU header syntax elements and prediction and matching The mode identifier code syntax element, and other syntax elements may not exist in the video code stream data of a certain CU;
  • the prediction and matching mode identification code may take the following code values and have the following semantics:
  • the current encoding or decoding CU (referred to as the current CU) adopts predictive coding or decoding 1
  • the current encoding or decoding CU (referred to as the current CU) adopts block matching encoding or decoding mode.
  • the current encoding or decoding CU uses string matching encoding or decoding.
  • the current encoding or decoding CU (referred to as the current CU) adopts palette matching encoding or decoding mode.
  • the division of the four coding modes or the four decoding modes is defined by a predetermined 4-element array ClassOfCoding[4], and each ClassOfCoding[i] (where i satisfies 0 ⁇ i ⁇ 4) Yes:
  • the values 1 and 2 correspond to the reference pixel sample storage space 1 (ie, the planar 2-dimensional reference space) and the reference pixel sample storage space 2 (the stacked 1-dimensional reference space), respectively, thereby, from the current CU
  • the code value of the prediction and matching mode identification code and the 4-ary array ClassOfCoding[4] can determine which reference pixel sample storage space the current CU uses for encoding or decoding according to the following judgment conditions:
  • the current CU is encoded or decoded by using a planar 2-dimensional reference space
  • the current CU is encoded or decoded by using the planar 2-dimensional reference space;
  • the current CU is encoded or decoded by using the overlapping 1D reference space;
  • the current CU is encoded or decoded using the superimposed 1-dimensional reference space.
  • Embodiment 2 of a video code stream including a prediction and matching mode identification code and other coding results, and a class 2 coding or decoding mode
  • the coding unit in the video stream ie the CU part, consists of syntax elements loaded with the following information:
  • CU header prediction and matching mode identification code, prediction mode or matching mode, motion vector 1 or displacement vector 1 or (displacement vector 1, matching length 1), unmatched pixel sample 1, motion vector 2 or displacement vector 2 or ( Displacement vector 2, matching length 2), unmatched pixel samples 2, .........., more motion vectors or displacement vectors Quantity or (displacement vector, matching length), more unmatched pixel samples, prediction residuals or matching residuals, other coding results;
  • the order in which all other of the syntax elements are placed in the code stream is not unique, and any predetermined predetermined order may be employed; any one of the syntax elements may also be split into several parts. The parts may be placed centrally in the same place in the code stream, or may be placed in different places in the code stream; any number of syntax elements may also be combined into one syntax element; in addition to the CU header syntax elements and prediction and matching The mode identifier code syntax element, and other syntax elements may not exist in the video code stream data of a certain CU;
  • the prediction and matching mode identification code may take the following code values and have the following semantics:
  • the current encoding or decoding CU (referred to as the current CU) adopts predictive coding or decoding 1
  • the current encoding or decoding CU (referred to as the current CU) adopts block matching encoding or decoding mode.
  • the current encoding or decoding CU (referred to as the current CU) uses string matching encoding or decoding.
  • the division of the three coding modes or the three decoding modes is defined by a predetermined 3-element array ClassOfCoding[3], and each ClassOfCoding[i] (where i satisfies 0 ⁇ i ⁇ 3) Yes:
  • the values 1 and 2 correspond to the reference pixel sample storage space 1 (ie, the planar 2-dimensional reference space) and the reference pixel sample storage space 2 (the stacked 1-dimensional reference space), respectively, thereby, from the current CU
  • the code value of the prediction and matching mode identification code and the 3-ary array ClassOfCoding[3] can determine which reference pixel sample storage space the current CU uses for encoding or decoding according to the following judgment conditions:
  • the current CU is encoded or decoded by using a planar 2-dimensional reference space
  • the current CU is encoded or decoded by using the planar 2-dimensional reference space;
  • the current CU is encoded or decoded using the superimposed 1-dimensional reference space.
  • the coding unit in the video stream ie the CU part, consists of syntax elements loaded with the following information:
  • CU header prediction and matching mode identification code, prediction mode or matching mode, motion vector 1 or displacement vector 1 or index map 1, unmatched pixel sample 1, motion vector 2 or displacement vector 2 or index map 2, unmatched pixel Sample 2, ........., more motion vectors or displacement vectors or index maps, more unmatched pixel samples, prediction residuals or matching residuals, other coding results;
  • the order in which all other of the syntax elements are placed in the code stream is not unique, and any predetermined predetermined order may be employed; any one of the syntax elements may also be split into several parts. The parts may be placed centrally in the same place in the code stream, or may be placed in different places in the code stream; any number of syntax elements may also be combined into one syntax element; in addition to the CU header syntax elements and prediction and matching The mode identifier code syntax element, and other syntax elements may not exist in the video code stream data of a certain CU;
  • the prediction and matching mode identification code may take the following code values and have the following semantics:
  • the current encoding or decoding CU (referred to as the current CU) adopts predictive coding or decoding 1
  • the current encoding or decoding CU (referred to as the current CU) adopts block matching encoding or decoding mode.
  • the current encoding or decoding CU (referred to as the current CU) adopts palette matching encoding or decoding mode.
  • the division of the three coding modes or the three decoding modes is defined by a predetermined 3-element array ClassOfCoding[3], and each ClassOfCoding[i] (where i satisfies 0 ⁇ i ⁇ 3) Yes:
  • the values 1 and 2 correspond to the reference pixel sample storage space 1 (ie, the planar 2-dimensional reference space) and the reference pixel sample storage space 2 (the stacked 1-dimensional reference space), respectively, thereby, from the current CU
  • the code value of the prediction and matching mode identification code and the 3-ary array ClassOfCoding[3] can determine which reference pixel sample storage space the current CU uses for encoding or decoding according to the following judgment conditions:
  • the current CU is encoded or decoded by using a planar 2-dimensional reference space
  • the current CU is encoded or decoded by using the planar 2-dimensional reference space;
  • the current CU is encoded or decoded using the superimposed 1-dimensional reference space.
  • the reference pixel sample storage space in the form of the planar format and the 2-dimensional array space is composed of pixel samples of two frames of images placed in the following order;
  • the Y component of the first row of pixels of the L-1 frame image is placed in the scanning order from left to right.
  • the Y component of the second row of pixels of the L-1 frame image is placed in the scanning order from left to right.
  • the Y component of the last row of pixels of the L-1 frame image is placed in the scanning order from left to right.
  • the U component of the first row of pixels of the L-1 frame image is placed in the scanning order from left to right.
  • the U component of the second row of pixels of the L-1 frame image is placed in the scanning order from left to right.
  • the U component of the last row of pixels of the L-1 frame image is placed in the scanning order from left to right.
  • the V component of the first row of pixels of the L-1 frame image is placed in the scanning order from left to right.
  • the V component of the second row of pixels of the L-1 frame image is placed in the scanning order from left to right.
  • the V component of the last row of pixels of the L-1 frame image is placed in the scanning order from left to right.
  • the Y component of the second row of pixels of the Lth frame image is placed in the scanning order from left to right.
  • the U component of the first row of pixels of the Lth frame image is placed in the scanning order from left to right.
  • the U component of the second row of pixels of the Lth frame image is placed in the scanning order from left to right.
  • the V component of the first row of pixels of the Lth frame image is placed in the scanning order from left to right.
  • the V component of the second row of pixels of the Lth frame image is placed in the scanning order from left to right.
  • the V component of the last row of pixels of the Lth frame image is placed in the scanning order from left to right.
  • the above Lth frame image is the frame image in the current encoding or decoding
  • the L-1 frame image is the frame image before the Lth frame image (in the encoding or decoding order).
  • the reference pixel sample storage space in the form of the stack format and the 1-dimensional array space is composed of pixel samples of 1 frame image, and the 1 frame image is first divided into 64 ⁇ 64 pixels (overlapping format, 64 ⁇ 64 ⁇ 3 pixels)
  • the block of the sample) gives each block a sequence number according to the raster scan order of the block, that is, the sequence number of the block in the upper left corner is 1, the block number on the right side of the block numbered 1 is 2, and the block number 2 is The sequence number of the block on the right is 3, and so on. If the block with the sequence number X is the rightmost block and there is no block on the right side, the sequence of the leftmost block directly below the block with the sequence number X is X+1.
  • the block on the right side of the block with the sequence number X+1 has the sequence number X+2, the block number on the right side of the block with the sequence number X+2 is X+3, and so on, all the blocks of the image of one frame are There is a sequence number; then, all pixels are placed and arranged in the following order to form a 1-dimensional array space:
  • the first column of the block of sequence number 1 is arranged in pixels from top to bottom in one column, and arranged in Y, U, and V in one pixel.
  • the second column of the block of sequence number 1 is arranged in pixels from top to bottom in one column, and arranged in Y, U, and V in one pixel.
  • the 64th column of the block of sequence number 1 is arranged in pixels from top to bottom in one column, and arranged in Y, U, and V in one pixel.
  • the first column of the block of the number 2 is arranged in pixels from top to bottom in one column, and arranged in Y, U, and V in one pixel.
  • the second column of the block with the number 2 is arranged in pixels from top to bottom in one column, and arranged in Y, U, and V in one pixel.
  • the 64th column of the block with the number 2 is arranged in pixels from top to bottom in one column, and arranged in Y, U, and V in one pixel.
  • the first column of pixels of the largest block the columns are arranged in pixels from top to bottom, and the pixels are arranged in Y, U, and V.
  • the second column of pixels with the largest serial number arranged in pixels from top to bottom in one column, and arranged in Y, U, and V in one pixel.
  • the 64th column pixel of the largest block of the largest number is arranged in pixels from top to bottom in one column, and is arranged in Y, U, and V in one pixel.
  • the blocks are arranged in a row order and the pixels in the block are arranged in a column scan format.
  • Change the row order in this embodiment to another order such as column order or 4-point tree order with depth D
  • change the column scan format to other scan formats such as line scan or zigzag scan or Z scan or depth D. More examples can be obtained by 4-tree scanning and other formats.
  • the size of the block is 64 x 64 pixels. More embodiments can be obtained by changing the size of the block, such as 32x32 or 16x16 or 8x8 or 8x4 or 4x8 or 4x4 pixels.
  • the reference pixel sample storage space in the form of the stack format and the 1-dimensional array space is composed of pixel samples of 1 frame image, and the 1 frame image is first divided into 64 ⁇ 64 pixels (overlapping format, 64 ⁇ 64 ⁇ 3 pixels)
  • the block of the sample (abbreviated as 64x64 block) gives each block a sequence number according to the raster scan order of the block, that is, the sequence number of the block in the upper left corner is 1, and the block number on the right side of the block numbered 1 is 2. On the right side of the block numbered 2 The serial number of the block is 3, and so on.
  • the block with the sequence number X is the rightmost block and there is no block on the right side
  • the sequence of the leftmost block directly below the block with the sequence number X is X+1
  • the serial number is The block of the right side of the block of X+1 has the serial number X+2
  • the block of the right side of the block of the sequence number X+2 has the serial number of X+3, and so on, all the blocks of the image of one frame have A sequence number; then, divide a 64x64 block into sub-blocks of different depths according to the 4-point tree method and give each sub-block a sequence number; the division method is as follows:
  • the division with depth 1 is to divide 64x64 blocks into 32x32 sub-blocks with up to the left and right and 4 depths, and the numbers of the sub-blocks with depth 1 being upper left, upper right, lower left, and lower right are called the depth 1 serial number. 1, 2, 3, 4, as shown in Figure 5;
  • the subdivision with depth of 2 is divided into four sub-blocks with a depth of 1 and divided into four 16x16 sub-blocks with a depth of 2, and the sub-blocks with a depth of 1 are divided into upper left, upper right, lower left, and lower right.
  • the sub-blocks of four sub-blocks of depth 2 (called depth 2 numbers) are 1, 2, 3, 4, and the sub-blocks of depth 1 and number 2 are divided into upper left, upper right, lower left, and lower right.
  • the sub-blocks of 2 are called 5, 6, 7, 8, and the sub-blocks of depth 1 and 3 are divided into upper sub-tops, upper right, lower left, and lower right sub-blocks of depth 2
  • the serial number (called the depth 2 serial number) is 9, 10, 11, 12, and the sub-blocks with the depth 1 and the number 4 are divided into the upper left, upper right, lower left, and lower right sub-blocks with a depth of 2 (called The depth 2 serial number is 13, 14, 15, 16 respectively, so that there are 16 sub-blocks with a depth of 2, as shown in FIG. 6;
  • the subdivision with a depth of 3 is divided into 16 sub-blocks of depth 2 and divided into 8 x 8 sub-blocks of 3 depths and 3 depths, and the sub-blocks whose depth 2 is k (1 ⁇ k ⁇ 16) are divided into upper left.
  • the upper, lower left, and lower right sub-blocks of depth 3 are called 4x(k-1)+1, 4x(k-1)+2, 4x(k-1). +3,4x(k-1)+4, so that there are 64 sub-blocks with a depth of 3, as shown in Figure 7;
  • the partition with a depth of 4 is divided into 64 sub-blocks with a depth of 3 and divided into 4 x 4 sub-blocks with 4 depths up and down, and a sub-block whose depth 3 is k (1 ⁇ k ⁇ 64).
  • the upper, lower left, and lower right sub-blocks of depth 4 (called depth 4 numbers) are 4x(k-1)+1, 4x(k-1)+2, 4x(k-1), respectively. +3,4x(k-1)+4, so that there are 256 sub-blocks with a depth of 4, as shown in Figure 8;
  • the first column of the sub-block of depth D is number 1, and the pixel values in one column are arranged in a predetermined order.
  • the second column of the sub-block of depth D is number 1, and the pixel values in one column are arranged in a predetermined order.
  • the last column of the sub-block with the depth D number is 1, and the pixel values in the 1 column are arranged in a predetermined order.
  • the first column of the sub-block of depth D is number 2, and the pixel values in one column are arranged in a predetermined order.
  • the second column of the sub-block of depth D is number 2, and the pixel values in one column are arranged in a predetermined order.
  • the last column of the sub-block whose depth D is number 2, and the pixel values in the 1 column are arranged in a predetermined order.
  • the first column of pixels of the sub-block with the largest depth D number, and the pixel values in one column are arranged in a predetermined order
  • the second column of the sub-block with the largest depth D number, the pixel values in one column are arranged in a predetermined order
  • the last column pixel of the sub-block with the largest depth D number, and the pixel values in one column are arranged in a predetermined order.
  • the size of the block is 64 x 64 pixels. More embodiments can be obtained by changing the size of the block, such as 32x32 or 16x16 or 8x8 or 8x4 or 4x8 or 4x4 pixels.
  • the analyzing and evaluating the characteristics of the codec sub-region and/or the neighboring region in the codec method or device to select and determine a codec mode of the codec sub-region and a corresponding reference pixel sample storage space thereof includes at least one of the following or a combination thereof:
  • the decoding method or device adopts at least the following two decoding modes and two corresponding reference pixel samples respectively Value storage space:
  • the corresponding reference pixel sample storage space is a reference pixel sample storage space 1 composed of reconstructed pixel samples of a part of the current decoding CU but adjacent to the CU;
  • the corresponding reference pixel sample storage space is the reference pixel sample storage space 2 composed of part or all of the reconstructed index of the current decoding CU;
  • the value of the reference pixel is copied from the reference pixel sample storage space 1 by using the pixel string copying method. a predicted value or a reconstructed value of the currently decoded pixel; if the reference pixel of the currently decoded pixel is located inside the currently decoded CU, the value of the reference index is copied from the reference pixel sample storage space 2 as the current decoded pixel by using an index copy manner Index and get the palette color corresponding to the index from the palette as the predicted or reconstructed value of the currently decoded pixel.
  • the reference pixel sample storage space 1 in the implementation or variant 11 adopts a pixel color format of a non-index color format; the reference pixel sample storage space 2 in the implementation or variant 11 adopts a pixel color format of an index color format.
  • the decoding method or apparatus adopts at least the following two decoding modes and two corresponding reference pixel sample storage spaces:
  • the corresponding reference pixel sample storage space is a reference pixel sample storage space 1 composed of reconstructed pixel samples of a part of the current decoding CU but adjacent to the CU;
  • the corresponding reference pixel sample storage space is a palette associated with the currently decoded CU, that is, part or all of the pixels of the currently decoded CU may be represented by an index of the palette;
  • the value of the reference pixel is copied from the reference pixel sample storage space 1 by the pixel string copy method.
  • the index copy mode is adopted, the reference index is first decoded, and then the target is obtained from the palette.
  • the palette color corresponding to the index is used as a predicted value or a reconstructed value of the currently decoded pixel.
  • the reference pixel sample storage space 1 in the implementation or variant example 13 adopts the pixel color format of the non-index color format; the reference pixel sample storage space composed of the palette in the implementation or variant example 13 adopts the pixel color of the index color format. format.
  • FIG. 1 is a block diagram showing the composition of an encoding apparatus of the present invention.
  • FIG. 2 is a block diagram showing the composition of a decoding apparatus of the present invention.
  • 3 is an embodiment of four coding modes and two different forms of reference pixel sample storage spaces
  • 4 is an embodiment of four decoding modes and two different forms of reference pixel sample storage spaces.
  • Figure 5 is a sub-block of depth 1 and a depth 1 number of each sub-block
  • Figure 6 is a sub-block of depth 2 and a depth 2 number of each sub-block
  • Figure 7 is a sub-block of depth 3 and a depth 3 number of each sub-block
  • Figure 8 is a sub-block of depth 4 and a depth 4 number of each sub-block

Abstract

Provided are an image compression method and device. When conducting predictive and matching coding (or decoding) in respect of a coding unit (CU), representing in at least two formats the historical data used as reference pixel sample values, and storing in at least two reference pixel sample value storage spaces respectively. One reference pixel sample value storage space is the main reference pixel sample value storage space and comprises the greater amount of historical data; the historical data in the other reference pixel sample value storage space is a subset of the historical data in the main reference pixel sample value storage space, but has different forms of representation. All modes of predictive and matching coding (or decoding) are correspondingly classified into at least two types, and respectively use different reference pixel sample value storage spaces to conduct respective predictive and matching coding (or decoding). The different reference pixel sample value storage spaces actually store the same historical data only in different forms of representation. Therefore, historical data in different reference pixel sample value storage spaces needs to remain synchronized.

Description

使用多种形式的参考像素存储空间的图像压缩方法和装置Image compression method and apparatus using multiple forms of reference pixel storage space 技术领域Technical field
本发明涉及一种数字视频压缩编码及解码系统,特别是含计算机屏幕图像的复合图像和视频的编码及解码的的方法和装置。The present invention relates to a digital video compression encoding and decoding system, and more particularly to a method and apparatus for encoding and decoding composite images and video containing computer screen images.
背景技术Background technique
图像的数字视频信号的自然形式是图像的序列。一帧图像通常是由若干像素组成的矩形区域,而数字视频信号就是由几十帧至成千上万帧图像组成的视频图像序列,有时也简称为视频序列或序列。对数字视频信号进行编码就是对一帧一帧图像进行编码。The natural form of a digital video signal of an image is a sequence of images. A frame of image is usually a rectangular area composed of several pixels, and a digital video signal is a sequence of video images composed of tens of frames to thousands of frames of images, sometimes simply referred to as a video sequence or sequence. Encoding a digital video signal encodes a frame by frame image.
在几乎所有视频图像编码的国际标准如MPEG-1/2/4,H.264/AVC以及最新国际视频压缩标准HEVC(High Efficiency Video Coding)中,对一帧图像进行编码(以及相应的解码)时,把一帧图像划分成若干块MxM像素的子图像,称为“编码单元(Coding Unit简称CU)”,以CU为基本编码单位,对子图像一块一块进行编码。常用的M的大小是8,16,32,64。因此,对一个视频图像序列进行编码就是对各帧的各个编码单元依次进行编码。同样,解码时也是对各帧的各个编码单元按照同样的顺序依次进行解码,最终重构出整个视频图像序列。Encoding one frame of image (and corresponding decoding) in almost all international standards for video image encoding such as MPEG-1/2/4, H.264/AVC and the latest international video compression standard HEVC (High Efficiency Video Coding) When a frame image is divided into sub-images of a plurality of blocks of MxM pixels, it is called a "Coding Unit (CU)", and the sub-images are coded one by one with CU as a basic coding unit. The size of the commonly used M is 8, 16, 32, 64. Therefore, encoding a video image sequence is to sequentially encode each coding unit of each frame. Similarly, in decoding, each coding unit of each frame is sequentially decoded in the same order, and finally the entire video image sequence is reconstructed.
为适应一帧图像内各部分图像内容与性质的不同,有针对性地进行最有效的编码,一帧图像内各CU的大小可以是不同的,有的是8x8,有的是64x64,等等。为了使不同大小的CU能够无缝拼接起来,一帧图像总是先划分成大小完全相同具有NxN像素的“最大编码单元(Largest Coding Unit简称LCU)”,然后每个LCU再进一步划分成树状结构的多个大小不一定相同的CU。因此,LCU也称为“编码树单元(Coding Tree Unit简称CTU)”。例如,一帧图像先划分成大小完全相同的64x64像素的LCU(N=64)。其中某个LCU由3个32x32像素的CU和4个16x16像素的CU构成,这样7个成树状结构的CU构成一个CTU。而另一个LCU由2个32x32像素的CU、3个16x16像素的CU和20个8x8像素的CU构成。这样25个成树状结构的CU构成另一个CTU。对一帧图像进行编码,就是依次对一个一个CTU中的一个一个CU进行编码。在任一时刻,正在编码中的CU称为当前编码CU。对一帧图像进行解码,也是按照同样的顺序依次对一个一个CTU中的一个一个CU进行解码。在任一时刻,正在解码中的CU称为当前解码CU。当前编码CU或当前解码CU都通常为当前CU。 In order to adapt to the difference in image content and properties of each part of a frame of image, the most efficient coding is performed in a targeted manner. The size of each CU in one frame of image can be different, some are 8x8, some are 64x64, and so on. In order to enable seamlessly splicing CUs of different sizes, one frame of image is always divided into "Largest Coding Units (LCUs)" having the same size and having NxN pixels, and then each LCU is further divided into trees. Multiple CUs of a structure that are not necessarily the same size. Therefore, the LCU is also referred to as a "Coding Tree Unit (CTU)". For example, a frame of image is first divided into 64x64 pixel LCUs of the same size (N=64). One of the LCUs is composed of three 32x32 pixel CUs and four 16x16 pixel CUs, so that seven tree-structured CUs form a CTU. The other LCU consists of two 32x32 pixel CUs, three 16x16 pixel CUs, and 20 8x8 pixel CUs. Such 25 CUs in a tree structure constitute another CTU. Encoding one frame of image is to sequentially encode one CU in one CTU. At any one time, the CU being coded is referred to as the current coded CU. Decoding one frame of image also sequentially decodes one CU in one CTU in the same order. At any one time, the CU being decoded is referred to as the currently decoded CU. The current encoded CU or the currently decoded CU is typically the current CU.
在以MPEG-1/2/4,H.264/AVC以及HEVC等为代表的现有技术中,为了提高编码效率,通常还将一个CU进一步划分成更小的子区域。所述子区域包括但不限于:预测单元(PU),变换单元(TU),不对称划分(AMP)的区域,宏块,块,微块,条(宽度或高度为一个像素或一个像素分量的区域),可变大小的矩形区域,可变大小的像素串(段)或像素分量串(段)或像素索引串(段)。对一个CU进行编码(以及相应的解码)就是对一个一个子区域进行编码(以及相应的解码)。在编码中,子区域称为编码子区域,而在解码中,子区域称为解码子区域。编码子区域和解码子区域统称为编解码子区域。在现有技术中,所述子区域(特别是预测单元,变换单元,不对称划分的区域,宏块,块,微块,条的情形)常称为“块”。所以,编码子区域和解码子区域在很多情况下常分别称为编码块和解码块,统称为编解码块。In the prior art represented by MPEG-1/2/4, H.264/AVC, and HEVC, etc., in order to improve coding efficiency, one CU is usually further divided into smaller sub-areas. The sub-regions include, but are not limited to, a prediction unit (PU), a transform unit (TU), an asymmetric partition (AMP) region, a macroblock, a block, a microblock, and a strip (width or height is one pixel or one pixel component) Area), a variable-sized rectangular area, a variable-sized pixel string (segment) or a pixel component string (segment) or a pixel index string (segment). Encoding (and corresponding decoding) a CU is to encode one sub-region (and corresponding decoding). In coding, a sub-area is called a coding sub-area, and in decoding, a sub-area is called a decoding sub-area. The coding sub-area and the decoding sub-area are collectively referred to as a codec sub-area. In the prior art, the sub-regions (particularly prediction units, transform units, asymmetrically divided regions, macroblocks, blocks, microblocks, strips) are often referred to as "blocks". Therefore, the coding sub-region and the decoding sub-region are often referred to as coding blocks and decoding blocks, respectively, in many cases, collectively referred to as codec blocks.
一个彩色像素有3个分量(component)组成。最常用的两种像素色彩格式(pixel color format)是由绿色分量、蓝色分量、红色分量组成的GBR色彩格式和由一个亮度(luma)分量及两个色度(chroma)分量组成的通称YUV色彩格式如YCbCr色彩格式。因此,对一个子区域进行编码时,可以把一个子区域分成3个分量平面(G平面、B平面、R平面或Y平面、U平面、V平面),对3个分量平面分别进行编码;也可以把一个像素的3个分量捆绑组合成一个3元组,对由这些3元组组成的子区域整体进行编码。前一种像素及其分量的排列方式称为图像(及其子区域)的平面格式(planar format),而后一种像素及其分量的排列方式称为图像(及其子区域)的叠包格式(packed format)。A color pixel consists of three components. The two most commonly used pixel color formats are the GBR color format consisting of a green component, a blue component, and a red component, and a generic term called YUV consisting of a luma component and two chroma components. Color formats such as YCbCr color format. Therefore, when encoding a sub-area, a sub-area can be divided into three component planes (G plane, B plane, R plane or Y plane, U plane, V plane), and the three component planes are respectively coded; The three components of one pixel can be bundled into one 3-tuple, and the sub-regions composed of these 3-tuples are encoded as a whole. The arrangement of the former pixel and its components is called the planar format of the image (and its sub-regions), and the arrangement of the latter pixel and its components is called the overlay format of the image (and its sub-regions). (packed format).
以像素的GBR色彩格式p[x][y]={g[x][y],b[x][y],r[x][y]}为例,一种平面格式的排列方式是先排列宽度为W个像素高度为H个像素的一帧图像(或者一个CU)的所有WxH个G分量,然后排列所有WxH个B分量,最后排列所有WxH个R分量:Taking the pixel's GBR color format p[x][y]={g[x][y],b[x][y],r[x][y]} as an example, a planar format is arranged. First arrange all WxH G components of a frame image (or a CU) with a width of W pixels of H pixels, then arrange all WxH B components, and finally arrange all WxH R components:
g[1][1],g[2][1],…,g[W-1][1],g[W][1],g[1][1],g[2][1],...,g[W-1][1],g[W][1],
g[1][2],g[2][2],…,g[W-1][2],g[W][2],g[1][2],g[2][2],...,g[W-1][2],g[W][2],
………………………………………,.............................................,
………………………………………,.............................................,
g[1][H],g[2][H],…,g[W-1][H],g[W][H],g[1][H],g[2][H],...,g[W-1][H],g[W][H],
b[1][1],b[2][1],…,b[W-1][1],b[W][1],b[1][1],b[2][1],...,b[W-1][1],b[W][1],
b[1][2],b[2][2],…,b[W-1][2],b[W][2],b[1][2],b[2][2],...,b[W-1][2],b[W][2],
………………………………………,.............................................,
………………………………………,.............................................,
b[1][H],b[2][H],…,b[W-1][H],b[W][H], b[1][H],b[2][H],...,b[W-1][H],b[W][H],
r[1][1],r[2][1],…,r[W-1][1],r[W][1],r[1][1],r[2][1],...,r[W-1][1],r[W][1],
r[1][2],r[2][2],…,r[W-1][2],r[W][2],r[1][2],r[2][2],...,r[W-1][2],r[W][2],
………………………………………,.............................................,
………………………………………,.............................................,
r[1][H],r[2][H],…,r[W-1][H],r[W][H]。r[1][H],r[2][H],...,r[W-1][H],r[W][H].
而一种叠包格式的排列方式是先排列第一个像素的G分量,然后排列其B分量和R分量,接着排列第二个像素的G分量、B分量和R分量,等等,最后排列最后一个(第WxH个)像素的G分量、B分量和R分量:A stacking format is arranged by first arranging the G components of the first pixel, then arranging the B component and the R component, then arranging the G component, the B component, and the R component of the second pixel, and so on, and finally arranging. The G component, B component, and R component of the last (WxHth) pixel:
g[1][1],b[1][1],r[1][1],g[2][1],b[2][1],r[2][1],…………,g[W][1],b[W][1],r[W][1],g[1][1],b[1][1],r[1][1],g[2][1],b[2][1],r[2][1],... ..., g[W][1],b[W][1],r[W][1],
g[1][2],b[1][2],r[1][2],g[2][2],b[2][2],r[2][2],…………,g[W][2],b[W][2],r[W][2],g[1][2],b[1][2],r[1][2],g[2][2],b[2][2],r[2][2],... ..., g[W][2],b[W][2],r[W][2],
………………………………………………………………………………………,.......................................................................................,
………………………………………………………………………………………,.......................................................................................,
g[1][H],b[1][H],r[1][H],g[2][H],b[2][H],r[2][H],………,g[W][H],b[W][H],r[W][H]。g[1][H],b[1][H],r[1][H],g[2][H],b[2][H],r[2][H],... ...,g[W][H],b[W][H],r[W][H].
这种叠包格式的排列方式也可以简化地表示为:The arrangement of such stacking formats can also be simplified as:
p[1][1],p[2][1],……,p[W-1][1],p[W][1],p[1][1],p[2][1],...,p[W-1][1],p[W][1],
p[1][2],p[2][2],……,p[W-1][2],p[W][2],p[1][2],p[2][2],...,p[W-1][2],p[W][2],
…………………………………………,................................................,
…………………………………………,................................................,
p[1][H],p[2][H],……,p[W-1][H],p[W][H]。p[1][H], p[2][H],......,p[W-1][H],p[W][H].
除了以上的平面格式的排列方式和叠包格式的排列方式外,按照三个分量的不同顺序,还可以有其他多种平面格式的排列方式和叠包格式的排列方式。In addition to the above arrangement of the planar format and the arrangement of the stacked format, in accordance with the different order of the three components, there may be other arrangements of the plurality of planar formats and the arrangement of the stacked formats.
像素及其分量的另一种常用表示形式是调色板索引形式。在调色板索引表示形式中,一个像素的分量的数值用调色板的索引来表示。调色板空间中存储了需要被表示的像素的3个分量的数值或近似数值,调色板的地址被称为这个地址中存储的像素(称为调色板颜色)的索引。一个索引可以表示像素的一个分量,一个索引也可以同时表示像素的3个分量。调色板可以是一个,也可以是多个。在多个调色板的情形,一个完整的索引实际上由调色板编号和该编号的调色板的索引两部分组成。像素及其分量的索引表示形式就是用索引来表示这个像素。像素的索引表示形式在现有技术中也被称为像素的索引颜色(indexed color)或仿颜色(pseudo color)表示形式,或者常常被直接称为索引像素(indexed pixel)或仿像素(pseudo pixel)或像素索引或索 引。索引有时也被称为指数。把像素用其索引表示形式来表示也称为索引化或指数化。像素及其分量的调色板索引表示形式是像素及其分量的一种按照颜色的聚集和排序格式。Another common representation of pixels and their components is the palette index form. In the palette index representation, the value of a component of a pixel is represented by the index of the palette. The palette space stores the value or approximate value of the three components of the pixel that needs to be represented. The address of the palette is called the index of the pixel (called the palette color) stored in this address. An index can represent one component of a pixel, and an index can also represent three components of a pixel. The palette can be one or more. In the case of multiple palettes, a complete index is actually composed of the palette number and the index of the numbered palette. The index representation of a pixel and its components is an index to represent this pixel. The index representation of a pixel is also referred to in the prior art as an indexed color or a pseudo color representation of a pixel, or is often referred to directly as an indexed pixel or a pseudo pixel (pseudo pixel). ) or pixel index or cable lead. Indexes are sometimes referred to as indices. Representing a pixel in its indexed representation is also referred to as indexing or exponentialization. The palette index representation of a pixel and its components is a color-based aggregation and sorting format of the pixel and its components.
其他的常用的现有技术的像素表示形式包括CMYK色彩格式和灰度色彩格式。Other commonly used prior art pixel representations include the CMYK color format and the grayscale color format.
像素的索引表示形式也是一种像素的色彩格式,称为索引色彩格式(index color format)或仿色彩格式(pseudo color format)。The index representation of a pixel is also a color format of a pixel, called an index color format or a pseudo color format.
YUV色彩格式又可根据是否对色度分量进行下采样再细分成若干种子格式:1个像素由1个Y分量、1个U分量、1个V分量组成的YUV4:4:4像素色彩格式;左右相邻的2个像素由2个Y分量、1个U分量、1个V分量组成的YUV4:2:2像素色彩格式;左右上下相邻按2x2空间位置排列的4个像素由4个Y分量、1个U分量、1个V分量组成的YUV4:2:0像素色彩格式。一个分量一般用1个8~16比特的数字来表示。YUV4:2:2像素色彩格式和YUV4:2:0像素色彩格式都是对YUV4:4:4像素色彩格式施行色度分量的下采样得到。一个像素分量也称为一个像素样值(pixel sample)或简单地称为一个样值(sample)。一个样值可以是一个8比特的数即一个样值占用一个字节。一个样值也可以是一个10比特的数或一个12比特的数或一个14比特的数或一个16比特的数。The YUV color format can be subdivided into several seed formats according to whether the chroma component is downsampled: a YUV 4:4:4 pixel color format consisting of 1 Y component, 1 U component, and 1 V component. The left and right adjacent pixels are composed of two Y components, one U component, and one V component in a YUV 4:2:2 pixel color format; four pixels arranged in a left and right adjacent position by 2x2 spatial position are composed of four pixels. YUV4: 2:0 pixel color format consisting of Y component, 1 U component, and 1 V component. A component is generally represented by a number of 8 to 16 bits. The YUV4:2:2 pixel color format and the YUV4:2:0 pixel color format are all downsampled for the YUV4:4:4 pixel color format. A pixel component is also referred to as a pixel sample or simply as a sample. A sample can be an 8-bit number, ie one sample occupies one byte. A sample can also be a 10-bit number or a 12-bit number or a 14-bit number or a 16-bit number.
在对任一个子区域进行编码或解码时,都会产生重构像素,又分为编码或解码过程之中产生的不同程度的部分重构像素和编码或解码过程全部完成后产生的完全重构像素。如果完全重构像素样值与编码之前的原始输入像素样值有相等的数值,则所经历的编码和解码过程称为无损编码和解码。如果完全重构像素样值与编码之前的原始输入像素样值有不相等的数值,则所经历的编码和解码过程称为有损编码和解码。在对各子区域依次进行编码或解码时,所产生的重构像素样值通常都作为历史数据保存起来,用作后续子区域编码或解码时的参考像素样值。保存重构像素历史数据的存储空间称为参考像素样值存储空间。参考像素样值存储空间都是有限的,只能保存一部分历史数据。参考像素样值存储空间中的历史数据也可以包括当前CU的已重构的子区域的重构像素样值。When encoding or decoding any sub-region, reconstructed pixels are generated, which are further divided into different degrees of partially reconstructed pixels generated in the encoding or decoding process and fully reconstructed pixels generated after the encoding or decoding process is completed. . If the fully reconstructed pixel samples have equal values to the original input pixel samples prior to encoding, the encoding and decoding process that is experienced is referred to as lossless encoding and decoding. If the fully reconstructed pixel samples have unequal values from the original input pixel samples prior to encoding, the encoding and decoding process that is experienced is referred to as lossy encoding and decoding. When the sub-regions are sequentially encoded or decoded, the generated reconstructed pixel samples are usually saved as historical data and used as reference pixel samples for subsequent sub-region encoding or decoding. The storage space in which the reconstructed pixel history data is saved is referred to as a reference pixel sample storage space. The reference pixel sample storage space is limited and only a portion of the historical data can be saved. The historical data in the reference pixel sample storage space may also include reconstructed pixel samples of the reconstructed sub-region of the current CU.
随着以远程桌面为典型表现形式的新一代云计算与信息处理模式及平台的发展和普及,多台计算机之间、计算机主机与智能电视、智能手机、平板电脑等其他数字设备之间及各种各类数字设备之间的互联已经成为现实并日趋成为一种主流趋势。这使得服务器端(云)到用户端的实时屏幕传输成为当前的迫切需求。由于需要传输的屏幕视频数据量巨大,对计算机屏幕图像必须进行高效高质量的数据压缩。With the development and popularization of a new generation of cloud computing and information processing modes and platforms based on remote desktops, between multiple computers, computer hosts and other digital devices such as smart TVs, smart phones, and tablets The interconnection between various types of digital devices has become a reality and is becoming a mainstream trend. This makes the real-time screen transmission from the server side (cloud) to the client side an urgent need. Due to the large amount of screen video data that needs to be transmitted, efficient and high quality data compression must be performed on computer screen images.
充分利用计算机屏幕图像的特点,对计算机屏幕图像进行超高效率的压缩,也是 最新国际视频压缩标准HEVC的一个主要目标。Make full use of the characteristics of computer screen images to achieve ultra-efficient compression of computer screen images. A major goal of the latest international video compression standard HEVC.
计算机屏幕图像的一个显著特点是同一帧图像内通常会有很多相似甚至完全相同的像素图样(pixel pattern)。例如,计算机屏幕图像中常出现的中文或外文文字,都是由少数几种基本笔划所构成,同一帧图像内可以找到很多相似或相同的笔划。计算机屏幕图像中常见的菜单、图标等,也具有很多相似或相同的图样。现有的图像和视频压缩技术中采用的帧内预测(intra prediction)方式,仅参考相邻的像素样值,无法利用一帧图像中的相似性或相同性来提高压缩效率。现有技术中的帧内运动补偿(intra motion compensation)方式也称为帧内块复制(intra block copy)方式,用几种固定大小(8x8,16x16,32x32,64x64像素)的块来进行帧内块匹配(intra block matching)编码,不能达到具有各种不同大小和形状的比较精细的匹配。而另几种现有技术中的微块匹配方式、精细划分匹配方式、串匹配(string matching)方式、调色板(palette)匹配方式(也称调色板索引匹配方式或简称索引匹配方式),虽然能有效找到各种不同大小和形状的精细匹配,但在某些图像情况下,却可能需要较多参数来表示各种不同大小和形状的精细匹配,也存在复杂度、计算量、存储器读写带宽都较大等问题。A notable feature of computer screen images is that there are often many similar or even identical pixel patterns within the same frame of image. For example, Chinese or foreign text that often appears in computer screen images is composed of a few basic strokes, and many similar or identical strokes can be found in the same frame image. Menus, icons, etc., which are common in computer screen images, also have many similar or identical patterns. The intra prediction method used in the existing image and video compression technology only refers to adjacent pixel samples, and cannot improve the compression efficiency by using the similarity or the similarity in one frame image. The intra motion compensation method in the prior art is also called intra block copy mode, and uses several fixed size (8x8, 16x16, 32x32, 64x64 pixels) blocks for intraframe. Intra block matching coding does not achieve a finer match with a variety of different sizes and shapes. In other prior art, the microblock matching method, the fine division matching method, the string matching method, and the palette matching method (also called the palette index matching method or the index matching method). Although it can effectively find fine matching of different sizes and shapes, in some image cases, more parameters may be needed to represent fine matching of various sizes and shapes, as well as complexity, calculation amount, memory. The read and write bandwidth is large and so on.
因此,必须把多种预测编码方式和匹配编码方式(包括块匹配方式、微块匹配方式、精细划分匹配方式、串匹配方式、调色板匹配方式等)结合起来,才能实现对屏幕图像的高效编码。需要说明的是,“匹配”是编码的操作,对应的重构和解码操作是“复制”。因此,块匹配方式、微块匹配方式、精细划分匹配方式、串匹配方式、调色板匹配方式等也称为块复制方式、微块复制方式、精细划分复制方式、串复制方式、调色板复制方式(也称调色板索引复制方式或简称索引复制方式)等。Therefore, multiple predictive coding methods and matching coding methods (including block matching method, microblock matching method, fine division matching method, string matching method, palette matching method, etc.) must be combined to achieve efficient image on the screen. coding. It should be noted that "matching" is an encoding operation, and the corresponding reconstruction and decoding operations are "copying". Therefore, the block matching method, the microblock matching method, the fine division matching method, the string matching method, the palette matching method, and the like are also referred to as a block copy mode, a microblock copy mode, a fine partition copy mode, a string copy mode, and a palette. Copy mode (also known as palette index copy mode or simply index copy mode).
所有的预测方式和匹配方式都有一个共同点,就是必须用到编码(或解码)的重构像素样值的历史数据作为参考像素样值。一般来说,参考像素样值存储空间越大,预测和匹配的效率性能就越好。现有技术中,参考像素样值存储空间通常可以容纳少则几帧甚至几十个像素(如调色板像素),多则几十帧的历史数据。现有技术中,重构像素的历史数据用一种单一的形式来表示,放在一个单一的参考像素样值存储空间模块内。以一帧640x480像素的YUV4:4:4图像且每个像素样值占用一个字节为例,最常见的一种历史数据的形式及其在具有线性(1维)地址的存储空间模块内的线性放置顺序是平面格式且每个平面划分成大小相等的块,每个块有WxH个像素样值(即像素的一个分量),首先以块为单位把这些块按照一定的线性顺序前后排列起来放置在存储空间模块中,而每个块内部的像素样值则再按照某种确定的线性扫描格式排列成1维数据后放置到线性地址存储空间中,如下表所示(其中WxH=8x8): All prediction methods and matching methods have one thing in common, that is, the historical data of the encoded (or decoded) reconstructed pixel samples must be used as the reference pixel samples. In general, the larger the reference pixel sample storage space, the better the efficiency of prediction and matching. In the prior art, the reference pixel sample storage space can generally accommodate historical data of a few frames or even tens of pixels (such as palette pixels) and dozens of frames. In the prior art, the historical data of the reconstructed pixel is represented in a single form and placed in a single reference pixel sample storage space module. Take a frame of 640x480 pixels of YUV4:4:4 image and each pixel sample occupies one byte. The most common form of historical data is in a storage space module with a linear (1D) address. The linear placement order is a planar format and each plane is divided into equally sized blocks, each block having WxH pixel samples (ie, one component of the pixel), first arranged in blocks in a certain linear order. Placed in the storage space module, and the pixel samples inside each block are arranged into 1D data according to a certain linear scan format and then placed in the linear address storage space, as shown in the following table (WxH=8x8) :
Figure PCTCN2015073204-appb-000001
Figure PCTCN2015073204-appb-000001
每种预测方式或匹配方式,都有其特定的最有效的历史数据的形式。结合多种预测方式和匹配方式对屏幕图像进行编码时,如果继续采用现有技术中的单一形式的历 史数据和参考像素样值存储空间,就会大大降低编码效率。因此必须使用多种形式的历史数据和参考像素样值存储空间,以提高预测或匹配性能,减少读取和写入历史数据所需带宽。Each prediction method or method of matching has its specific and most effective form of historical data. When encoding screen images in combination with multiple prediction methods and matching methods, if you continue to use the single-form calendar in the prior art Historical data and reference pixel sample storage space will greatly reduce coding efficiency. Therefore, multiple forms of historical data and reference pixel sample storage space must be used to improve prediction or matching performance and reduce the bandwidth required to read and write historical data.
发明内容Summary of the invention
本发明的主要技术特征是在对一个当前编码单元进行结合了多种预测和匹配方式的编码或解码时,相应地使用多种形式的历史数据和参考像素样值存储空间。The main technical feature of the present invention is that when encoding or decoding a plurality of prediction and matching modes in combination with a current coding unit, various forms of historical data and reference pixel sample storage space are used accordingly.
一般的像素样值存储空间的形式通常由4个要素组成:The general form of pixel sample storage space usually consists of four elements:
1)像素及其分量排列格式,如叠包格式和平面格式;1) pixels and their component arrangement formats, such as stack format and plane format;
2)像素的色彩格式,如GBR色彩格式、RGB色彩格式、YCbCr色彩格式、YUV色彩格式、CMYK色彩格式、YIQ色彩格式、HSV色彩格式、HSL色彩格式、索引色彩格式等等,不同的色彩格式之间通常可以互相转换;2) Pixel color format, such as GBR color format, RGB color format, YCbCr color format, YUV color format, CMYK color format, YIQ color format, HSV color format, HSL color format, index color format, etc., different color formats Usually can be converted to each other;
3)像素的聚集和排序格式。例如,像素按照其位置坐标聚集和排序:形状为2维区域的像素或其各分量的历史数据聚集放在一个2维数组空间中,或者聚集放在一个1维数组空间中。在1维的情形,还要确定所述历史数据在具有线性(1维)地址的存储空间中的线性放置方式;一种典型的线性放置方式是首先将所述2维区域划分成大小相等的块,每个块有WxH个像素(在叠包格式的情形)或其一个分量(在平面格式的情形),然后将这些块按照一种确定的线性顺序(例如:行顺序或列顺序或深度为D的4分树顺序)前后排列起来放置到线性地址存储空间中,而每个块内部的像素或其一个分量则按照一种确定的线性扫描(例如:行扫描或列扫描或zigzag扫描或Z扫描或弓形扫描或深度为D的4分树扫描)格式排列成1维数据后放置到线性地址存储空间中;再如,像素按照其颜色聚集和排序:产生调色板颜色,构造调色板,调色板中的像素按照其一种特性排序,组成一个具有线性地址的参考像素样值存储空间;所述特性的两个例:1)调色板颜色在一个CU中出现的顺序,2)调色板颜色在一个CU中出现的频度;3) Pixel aggregation and sorting format. For example, pixels are aggregated and ordered according to their position coordinates: the historical data of a pixel whose shape is a 2-dimensional area or its components is aggregated in a 2-dimensional array space, or aggregated in a 1-dimensional array space. In the case of 1 dimension, the linear placement of the historical data in a storage space having a linear (1 dimensional) address is also determined; a typical linear placement is to first divide the 2-dimensional region into equal sizes. Block, each block having WxH pixels (in the case of a stack format) or one component thereof (in the case of a planar format), and then placing the blocks in a determined linear order (eg row order or column order or depth) The 4-point tree order for D is placed in front of the linear address storage space, and the pixels inside each block or one of its components are scanned according to a certain linearity (for example: line scan or column scan or zigzag scan or Z-scan or bow scan or 4-point tree scan with depth D is arranged in 1D data and placed in linear address storage space; for example, pixels are clustered and sorted according to their colors: color palette color, texture color The pixels in the palette are sorted according to one of their characteristics to form a reference pixel sample storage space with a linear address; two examples of the characteristics: 1) the palette color appears in a CU Sequence, 2) the frequency of occurrence of colors in a color palette in the CU;
4)色度分量的下采样格式,如YUV4:4:4格式或YUV4:2:2格式或YUV4:2:0格式等。4) Downsampling format of chroma components, such as YUV4:4:4 format or YUV4:2:2 format or YUV4:2:0 format.
所述4要素决定了参考像素样值存储空间的形式。这4要素中有一点不同就是一种不同的参考像素样值存储空间的形式。 The 4 elements determine the form of the reference pixel sample storage space. One difference between these four elements is the form of a different reference pixel sample storage space.
本发明的编码方法和装置中,最基本的特有技术特征就是,确定A(2≤A≤5)种预测编码方式和匹配编码方式,确定历史数据的B(2≤B≤A≤5)个不同形式的参考像素样值存储空间,并且把A种预测编码方式和匹配编码方式归成B类,分别与B个参考像素样值存储空间一一对应。B个不同形式的参考像素样值存储空间可能有不同的空间大小来存储不同数量的历史数据,其中,存储历史数据最多的那一个称为主参考像素样值存储空间,而其他参考像素样值存储空间中的历史数据都是主参考像素样值存储空间的历史数据的子集,但有不同的表现形式并且可能处于不同程度的部分重构阶段(如已经经过颜色聚类或已加上匹配残差或尚未加上匹配残差)。在对当前子区域进行编码时,每种预测编码方式或匹配编码方式都根据其归类使用对应的那个参考像素样值存储空间进行预测编码或匹配编码,依据预定的评估准则,选择A种预测编码方式和匹配编码方式中的一种对当前子区域进行编码。不管选择哪种预测编码方式和匹配编码方式对当前子区域进行编码,所产生的新的历史数据,都要转换成主参考像素样值存储空间的形式并放入主参考像素样值存储空间,也可能要转换成其他参考像素样值存储空间的形式(可能处于另一程度的部分重构阶段)并放入其他参考像素样值存储空间。不同的参考像素样值存储空间内的历史数据需保持同步。In the coding method and apparatus of the present invention, the most basic characteristic feature is to determine A (2 ≤ A ≤ 5) kinds of predictive coding modes and matching coding modes, and determine B (2 ≤ B ≤ A ≤ 5) of historical data. Different forms of reference pixel sample storage space, and class A predictive coding mode and matching coding mode are classified into class B, and respectively correspond to B reference pixel sample storage spaces. B different forms of reference pixel sample storage space may have different spatial sizes to store different amounts of historical data, wherein the one storing the most historical data is called the primary reference pixel sample storage space, and the other reference pixel samples are The historical data in the storage space is a subset of the historical data of the primary reference pixel sample storage space, but has different representations and may be in different degrees of partial reconstruction (such as having been color clustered or matched) The residual or the matching residual has not been added). When encoding the current sub-region, each predictive coding mode or matching coding mode performs predictive coding or matching coding according to the corresponding reference pixel sample storage space according to its classification, and selects A prediction according to a predetermined evaluation criterion. One of the coding mode and the matching coding mode encodes the current sub-area. Regardless of which prediction encoding mode and matching encoding method are selected, the current sub-region is encoded, and the generated new historical data is converted into the main reference pixel sample storage space and placed in the main reference pixel sample storage space. It may also be converted to other reference pixel sample storage spaces (which may be in another level of partial reconstruction) and placed in other reference pixel sample storage spaces. Historical data in different reference pixel sample storage spaces needs to be synchronized.
本发明的解码方法和装置中,最基本的特有技术特征就是,确定A(2≤A≤5)种预测解码方式和复制解码方式,确定历史数据的B(2≤B≤A≤5)个不同形式的参考像素样值存储空间,并且把A种预测解码方式和匹配解码方式归成B类,分别与B个参考像素样值存储空间一一对应。B个不同形式的参考像素样值存储空间可能有不同的空间大小来存储不同数量的历史数据,其中,存储历史数据最多的那一个称为主参考像素样值存储空间,而其他参考像素样值存储空间中的历史数据都是主参考像素样值存储空间的历史数据的子集,但有不同的表现形式并且可能处于不同程度的部分重构阶段(如已经经过颜色聚类或已加上匹配残差或尚未加上匹配残差)。在对当前解码子区域的压缩后的视频码流数据进行解码时,每种预测解码方式或复制解码方式都根据其归类使用对应的那个参考像素样值存储空间进行预测解码或复制解码,依据从视频码流数据中读出的信息或者依据从视频码流数据中读出的信息再加上当前解码子区域以及邻近子区域的特征,选择A种预测解码方式和复制解码方式中的一种对当前子区域进行解码。不管选择哪种预测解码方式和复制解码方式对当前子区域进行解码,所产生的新的历史数据,都要转换成主参考像素样值存储空间的形式并放入主参考像素样值存储空间,也可能要转换成其他参考像素样值存储空间的形式(可能处于另一程度的部分重构阶段)并放入其他参考像素样值存储空间。不同的参考像素样值存储空间内的历史数据需保持同步。 In the decoding method and apparatus of the present invention, the most basic characteristic feature is to determine A (2 ≤ A ≤ 5) kinds of predictive decoding mode and copy decoding mode, and determine B (2 ≤ B ≤ A ≤ 5) of historical data. Different types of reference pixel sample storage spaces, and class A prediction decoding mode and matching decoding mode are classified into class B, and respectively correspond to B reference pixel sample storage spaces. B different forms of reference pixel sample storage space may have different spatial sizes to store different amounts of historical data, wherein the one storing the most historical data is called the primary reference pixel sample storage space, and the other reference pixel samples are The historical data in the storage space is a subset of the historical data of the primary reference pixel sample storage space, but has different representations and may be in different degrees of partial reconstruction (such as having been color clustered or matched) The residual or the matching residual has not been added). When decoding the compressed video code stream data of the current decoding sub-area, each of the prediction decoding mode or the copy decoding mode performs prediction decoding or copy decoding according to the corresponding reference pixel sample storage space according to the classification. The information read from the video stream data or the information read from the video stream data plus the characteristics of the current decoding sub-region and the neighboring sub-regions, one of the A prediction decoding modes and the copy decoding mode is selected. Decode the current subregion. Regardless of which prediction decoding mode and copy decoding mode are selected to decode the current sub-area, the generated new historical data is converted into the main reference pixel sample storage space and placed in the main reference pixel sample storage space. It may also be converted to other reference pixel sample storage spaces (which may be in another level of partial reconstruction) and placed in other reference pixel sample storage spaces. Historical data in different reference pixel sample storage spaces needs to be synchronized.
根据本发明的一个方面,提供了一种图像编码方法或装置,至少包括:完成下列功能和操作的步骤或模块的至少之一:According to an aspect of the invention, there is provided an image encoding method or apparatus comprising at least one of the steps or modules for performing the following functions and operations:
1)分析和评估编码子区域和/或邻近区域的特性(如像素的位置和/或颜色的特性),根据分析和评估的结果,依据预定的评估准则,选择和确定所述编码子区域的编码方式;1) analyzing and evaluating characteristics of the coding sub-region and/or adjacent regions (such as the position of the pixel and/or the characteristics of the color), selecting and determining the coding sub-region according to predetermined evaluation criteria based on the results of the analysis and evaluation Encoding;
2)使用所述编码方式对应的参考像素样值存储空间对所述编码子区域进行编码,并将编码结果写入视频码流;视频码流中至少包括在解码方法和装置中确定对应的解码方式与参考像素样值存储空间所需要的部分或全部信息。2) encoding the coding sub-area by using a reference pixel sample storage space corresponding to the coding mode, and writing the coding result to the video code stream; the video code stream includes at least decoding corresponding decoding in the decoding method and the device. Some or all of the information required by the way and reference pixel sample storage space.
根据本发明的另一个方面,还提供了一种图像解码方法或装置,至少包括:完成下列功能和操作的步骤或模块的至少之一:According to another aspect of the present invention, there is also provided an image decoding method or apparatus comprising at least one of the steps or modules for performing the following functions and operations:
1)解析视频码流和/或分析与评估解码子区域和/或邻近区域的特性(如像素的位置和/或颜色的特性),根据解析、分析和评估的结果,选择和确定所述解码子区域的解码方式;1) parsing the video stream and/or analyzing and evaluating the characteristics of the decoded sub-region and/or the neighboring region (such as the location of the pixel and/or the characteristics of the color), selecting and determining the decoding based on the results of the parsing, analysis, and evaluation. Sub-area decoding mode;
2)使用所述解码方式及其对应的参考像素样值存储空间对所述解码子区域进行解码,产生重构像素。2) Decoding the decoded sub-area using the decoding mode and its corresponding reference pixel sample storage space to generate a reconstructed pixel.
以上从几个方面阐述了本发明的主要技术特征。本领域技术人员可由本说明书所揭示的内容轻易地了解本发明的其他优点与功效。本发明还可以通过另外不同的具体实施方式加以实施或应用,本说明书中的各项细节也可以基于不同观点与应用,在不背离本发明的精神下进行各种修饰或改变。The main technical features of the present invention have been described above in several respects. Other advantages and effects of the present invention will be readily apparent to those skilled in the art from this disclosure. The present invention may be embodied or applied in various other specific embodiments, and various modifications and changes may be made without departing from the spirit and scope of the invention.
本发明的编码装置的一个实施例至少包括下列模块之一:An embodiment of the encoding device of the present invention includes at least one of the following modules:
预测和匹配编码模块,配置成为使用不同编码方式的多个编码处理单元,其中,所述编码处理单元配置成为使用帧内预测编码、帧间预测编码或多种不同匹配编码方式之一对数据进行处理;The prediction and matching coding module is configured to be a plurality of coding processing units using different coding modes, wherein the coding processing unit is configured to perform data using one of intra prediction coding, inter prediction coding, or a plurality of different matching coding modes. deal with;
编码存储模块,配置成为存储不同形式的重构像素样值数据的多个存储单元;An encoding storage module configured to store a plurality of storage units of different forms of reconstructed pixel sample data;
编码数据控制模块,配置成为控制所述预测和匹配编码模块读取预先设定的所述编码存储模块中对应的一个或多个存储单元的数据;根据所述读入数据,控制所述预测和匹配编码模块将待编码数据移交对应编码处理单元;控制所述预测和匹配编码模 块将所述编码处理单元的输出数据写入预先设定的所述编码存储模块中一个或多个存储单元。An encoding data control module configured to control the prediction and matching encoding module to read data of a corresponding one or more storage units in the code storage module that is preset; and to control the prediction according to the read data The matching coding module hands over the data to be encoded to the corresponding coding processing unit; and controls the prediction and matching coding mode The block writes output data of the encoding processing unit to one or more storage units of the code storage module that are preset.
本发明的解码装置的一个实施例至少包括下列模块之一:An embodiment of the decoding device of the present invention includes at least one of the following modules:
预测和复制解码模块,配置成为使用不同解码方式的多个解码处理单元,其中,所述解码处理单元配置成为使用帧内预测解码、帧间预测解码或多种不同复制解码方式之一对数据进行处理;The prediction and copy decoding module is configured to be a plurality of decoding processing units using different decoding modes, wherein the decoding processing unit is configured to perform data using one of intra prediction decoding, inter prediction decoding, or a plurality of different copy decoding modes. deal with;
解码存储模块,配置成为存储不同形式的重构像素样值数据的多个存储单元;Decoding the storage module, configured to store a plurality of storage units of different forms of reconstructed pixel sample data;
解码数据控制模块,配置成为控制所述预测和复制解码模块读取预先设定的所述解码存储模块中对应的一个或多个存储单元的数据;根据所述读入数据,控制所述预测和复制解码模块将待解码数据移交对应解码处理单元;控制所述预测和复制解码模块将所述解码处理单元的输出数据写入预先设定的所述解码存储模块中一个或多个存储单元。a decoding data control module configured to control the prediction and copy decoding module to read data of a corresponding one or more storage units in the preset decoding storage module; and to control the prediction according to the read data The copy decoding module hands over the data to be decoded to the corresponding decoding processing unit; and controls the prediction and copy decoding module to write the output data of the decoding processing unit to one or more storage units in the preset decoding storage module.
本发明的编码装置的一个实施例,其示意图如图1所示,由以下模块组成:An embodiment of the encoding apparatus of the present invention, the schematic diagram of which is shown in Figure 1, consists of the following modules:
1)预测编码方式模块、匹配编码方式1模块、匹配编码方式2模块、……、匹配编码方式A-1模块:A是一个满足2≤A≤5的正整数;这A个编码方式模块分别使用预测(帧内预测或帧间预测或两者)编码方式、匹配编码方式1、匹配编码方式2、……、匹配编码方式A-1这A种编码方式对输入视频图像的一个输入编码单元中的一个当前编码子区域施行预测或匹配编码运算;所述预测编码方式模块的输出是预测模式,帧间预测的运动矢量,预测残差即所述输入视频图像的原始输入像素样值与预测像素样值之差;各所述匹配编码方式模块的输出是匹配模式、匹配位置,未匹配样值,匹配残差;所述匹配位置是用来表示与所述当前编码子区域中当前编码像素样值相匹配的参考像素样值在参考像素样值存储空间中的什么位置的变量,所述与当前编码像素样值相匹配的参考像素样值称为匹配像素样值,所述匹配像素样值的位置并不一定在所述参考像素样值存储空间中形成连在一起的一个区域,也可能是所述参考像素样值存储空间中分离的几个区域;所述未匹配样值是依据预先确定的匹配准则在所述参考像素样值存储空间中未找到匹配的原始输入像素样值,如果一种匹配编码方式预先确定的匹配准则很宽松,允许任意大的匹配误差,因而总是能找到匹配,那么这种匹配编码方式就没有未匹配样值作为输出;所述匹配残差是原始输入像素样值与所述匹配像素 样值之差,如果一种匹配编码方式预先确定的匹配准则是绝对精确的无损匹配,则所述匹配残差为零,即这种匹配编码方式就没有匹配残差作为输出,如果一种匹配编码方式预先确定的匹配准则是近似的有损匹配,则所述匹配残差可能不为零,另一种有损匹配的情形是首先对原始输入像素样值进行样值量化、颜色量化或者基于颜色的像素聚类的前处理,然后再施行匹配编码运算,在这种情形,由于样值量化、颜色量化或者基于颜色的像素聚类是有损的,即使匹配编码运算本身是无损的,所述匹配残差(即原始输入像素样值与所述匹配像素样值之差)也可能不为零;1) Predictive coding mode module, matching coding mode 1 module, matching coding mode 2 module, ..., matching coding mode A-1 module: A is a positive integer satisfying 2 ≤ A ≤ 5; Using input prediction (intra prediction or inter prediction or both) coding mode, matching coding mode 1, matching coding mode 2, ..., matching coding mode A-1, an input coding unit of the input video image Performing a prediction or matching coding operation on a current coding sub-region; the output of the prediction coding mode module is a prediction mode, an inter-predicted motion vector, and a prediction residual, that is, an original input pixel sample and prediction of the input video image a difference between the pixel samples; the output of each of the matching coding mode modules is a matching mode, a matching position, an unmatched sample, and a matching residual; the matching position is used to represent the currently encoded pixel in the current coding sub-region a variable of a position of the matched reference pixel sample in the reference pixel sample storage space, the reference image matching the current encoded pixel sample The sample value is referred to as a matching pixel sample, and the position of the matched pixel sample does not necessarily form an area connected together in the reference pixel sample storage space, and may also be in the reference pixel sample storage space. Separating regions; the unmatched samples are found in the reference pixel sample storage space according to a predetermined matching criterion, if a matching matching criterion is determined Very loose, allowing arbitrarily large matching errors, so that a match can always be found, then there is no unmatched sample as an output in this matching coding mode; the matching residual is the original input pixel sample and the matching pixel The difference between the samples, if a matching matching criterion is an absolutely accurate lossless matching, the matching residual is zero, that is, the matching encoding method has no matching residual as an output, if a matching If the matching criterion determined by the coding mode is an approximate lossy match, the matching residual may not be zero, and another case of lossy matching is to first perform sample quantization, color quantization or based on the original input pixel sample. Pre-processing of pixel clustering of colors, and then performing matching encoding operations. In this case, since sample quantization, color quantization, or color-based pixel clustering is lossy, even if the matching encoding operation itself is lossless, The matching residual (ie, the difference between the original input pixel sample and the matched pixel sample) may also be non-zero;
2)参考像素样值存储空间1模块、参考像素样值存储空间2模块、……、参考像素样值存储空间B模块:B是一个满足2≤B≤A≤5的正整数;这B个参考像素样值存储空间用独特的彼此不同的形式存储在编码过程中产生的重构像素样值历史数据,用作后续的编码和重构各种运算时需要的参考像素样值;这B个不同形式的参考像素样值存储空间可能有不同的空间大小来存储不同数量的历史数据,其中,存储历史数据最多的那一个称为主参考像素样值存储空间,而其他参考像素样值存储空间中的历史数据都是主参考像素样值存储空间的历史数据的子集,但有不同的表现形式并且可能处于不同程度的部分重构阶段(如已经经过颜色聚类或已加上匹配残差或尚未加上匹配残差);对应于这B个参考像素样值存储空间,所述预测编码方式模块、匹配编码方式1模块、匹配编码方式2模块、……、匹配编码方式A-1模块的A种编码方式也相应地划分归并成B类,与B个参考像素样值存储空间一一对应;在对所述当前编码子区域进行编码时,每种预测编码方式或匹配编码方式都根据其归类使用对应的那个参考像素样值存储空间进行预测编码或匹配编码,依据预定的评估准则,选择A种预测编码方式和匹配编码方式中的一种对所述当前编码子区域进行编码;2) Reference pixel sample storage space 1 module, reference pixel sample storage space 2 module, ..., reference pixel sample storage space B module: B is a positive integer satisfying 2 ≤ B ≤ A ≤ 5; The reference pixel sample storage space stores the reconstructed pixel sample history data generated in the encoding process in a unique mutually different form, and is used as a reference pixel sample required for subsequent encoding and reconstruction of various operations; Different forms of reference pixel sample storage space may have different spatial sizes to store different amounts of historical data, wherein the one storing the most historical data is called the primary reference pixel sample storage space, and the other reference pixel sample storage spaces. The historical data in the data is a subset of the historical data of the primary reference pixel sample storage space, but has different representations and may be in different degrees of partial reconstruction (such as having been color clustered or added matching residuals) Or no matching residuals are added; corresponding to the B reference pixel sample storage spaces, the predictive coding mode module, the matching coding mode 1 module, and the matching code Mode 2 module, ..., matching coding mode A-1 module A coding mode is also divided into B class correspondingly, corresponding to B reference pixel sample storage space; in the current coding sub-area When encoding, each predictive coding mode or matching coding mode uses the corresponding reference pixel sample storage space for predictive coding or matching coding according to its classification, and selects A predictive coding mode and matching coding mode according to predetermined evaluation criteria. One of the encoding of the current coding sub-area;
3)其余的各种常用技术编码和重构模块:对输入的各种参数和变量施行各种常用技术,如变换、量化、逆变换、反量化、对应于预测残差和匹配残差的补偿(即取残差运算的逆运算)、预测并求残差、DPCM、一阶和高阶差分、映射、游程、索引、去块效应滤波、样值自适应补偿(Sample Adaptive Offset),的编码和重构运算以及熵编码运算;本模块的输入是模块1)所述各模块的输出和所述原始输入像素样值;本模块的输出是重构像素和视频码流;所述重构像素都要转换成主参考像素样值存储空间的形式并放入模块2)所述主参考像素样值存储空间,也可能要转换成其他参考像素样值存储空间的形式(可能处于另一程度的部分重构阶段)并放入模块2)所述其他参考像素样值存储空间,用作后续的编码和重构各种运算时需要的参考像素样值;所述 视频码流是本编码装置的最后输出,包含了对应的解码装置施行解码和重构运算所需要的全部语法元素,特别是预测模式、运动矢量、匹配模式、匹配位置、未匹配样值等语法元素;3) The remaining common techniques of coding and reconstruction: performing various common techniques on input parameters and variables, such as transform, quantization, inverse transform, inverse quantization, compensation corresponding to prediction residuals and matching residuals. (ie, taking the inverse of the residual operation), predicting and finding the residual, DPCM, first-order and high-order difference, mapping, run, index, deblocking filtering, sample adaptive offset (Sample Adaptive Offset), encoding And the reconstruction operation and the entropy coding operation; the input of the module is the output of each module of the module 1) and the original input pixel sample; the output of the module is a reconstructed pixel and a video code stream; the reconstructed pixel It is converted into the form of the main reference pixel sample storage space and placed in the module 2) the main reference pixel sample storage space, and may also be converted into other reference pixel sample storage space (may be at another level) Partial reconstruction stage) and put into the other reference pixel sample storage space of module 2) for use as a reference pixel sample required for subsequent encoding and reconstruction of various operations; The video stream is the final output of the encoding device, and includes all the syntax elements required for the decoding device to perform decoding and reconstruction operations, in particular, prediction mode, motion vector, matching mode, matching position, unmatched sample, and the like. element;
4)像素样值存储空间的形式转换模块:把B种参考像素样值存储空间的形式的一种形式转换成另一种形式;模块3)产生和输出的重构像素,都要经过本模块转换成主参考像素样值存储空间的形式并放入模块2)所述主参考像素样值存储空间,也可能要经过本模块转换成其他参考像素样值存储空间的形式(可能处于另一程度的部分重构阶段)并放入模块2)所述其他参考像素样值存储空间,用作后续的编码和重构各种运算时需要的参考像素样值;本模块使不同的参考像素样值存储空间内的历史数据互相之间保持同步。4) The form conversion module of the pixel sample storage space: converts one form of the form of the reference pixel sample storage space into another form; the reconstructed pixel generated and output by the module 3) passes through the module. Converted into the form of the main reference pixel sample storage space and placed in the module 2) the main reference pixel sample storage space, or may be converted into other reference pixel sample storage space by the module (may be at another level Partial reconstruction stage) and put into the other reference pixel sample storage space of module 2), used as reference pixel samples needed for subsequent encoding and reconstruction of various operations; this module makes different reference pixel samples Historical data in the storage space is synchronized with each other.
本发明的解码装置的一个实施例,其示意图如图2所示,由以下模块组成:An embodiment of the decoding apparatus of the present invention, the schematic diagram of which is shown in FIG. 2, is composed of the following modules:
1)码流数据解析与部分解码模块:对当前解码CU的含预测模式、运动矢量、匹配模式、匹配位置、未匹配样值的压缩数据以及所有其他语法元素压缩数据的视频码流施行熵解码,并解析出熵解码得到的各种数据的意义;把解析和施行部分解码(如变换解码、预测并做补偿即求残差运算的逆运算、DPCM解码、一阶和高阶差分解码、映射解码、游程解码、索引解码)运算后得到的预测模式、运动矢量、匹配模式、匹配位置、未匹配样值等参数和变量送往各预测解码方式模块和匹配解码方式模块;把解析得到的所有其他语法元素如预测残差和匹配残差的熵解码输出数据(即熵解码的结果)送往其余的各种常用技术解码和重构模块;特别是,依据从视频码流数据中解析得到的信息或者依据从视频码流数据中解析得到的信息再加上当前解码子区域以及邻近子区域的特征,选择一种对应的预测解码方式或匹配解码方式,把预测模式、运动矢量、匹配模式、匹配位置、未匹配样值等对应的几个参数和变量送往一个对应的预测解码方式模块或匹配解码方式模块,启动所述对应的预测解码方式模块或匹配解码方式模块对当前解码子区域进行解码;1) Code stream data parsing and partial decoding module: performing entropy decoding on the video stream of the currently decoded CU including the prediction mode, the motion vector, the matching mode, the matching position, the unmatched sample compressed data, and all other syntax element compressed data. And parsing the meaning of various data obtained by entropy decoding; parsing and performing partial decoding (such as transform decoding, prediction and compensation, ie inverse operation of residual operation, DPCM decoding, first-order and high-order differential decoding, mapping Parameters such as prediction mode, motion vector, matching mode, matching position, and unmatched samples obtained by decoding, run-length decoding, and index decoding are sent to each prediction decoding mode module and matching decoding mode module; Other syntax elements such as prediction residuals and matching residual entropy decoded output data (ie, the result of entropy decoding) are sent to the remaining common techniques of decoding and reconstruction modules; in particular, based on parsing from video stream data. The information is based on the information parsed from the video stream data plus the current decoding sub-region and the neighboring sub-region. Selecting a corresponding prediction decoding mode or matching decoding mode, and sending several parameters and variables corresponding to the prediction mode, the motion vector, the matching mode, the matching position, the unmatched sample, and the like to a corresponding prediction decoding mode module or matching Decoding mode module, starting the corresponding predictive decoding mode module or matching decoding mode module to decode the current decoding sub-region;
2)预测解码方式模块、匹配解码方式1模块、匹配解码方式2模块、……、匹配解码方式A-1模块:A是一个满足2≤A≤5的正整数;这A个解码方式模块分别使用预测(帧内预测或帧间预测或两者)解码方式、匹配解码方式1、匹配解码方式2、……、匹配解码方式A-1这A种解码方式对相对应的A种当前解码子区域施行预测或匹配解码运算;所述预测解码方式模块的输入是预测模式和帧间预测的运动矢量;所述匹配解码方式模块的输入是匹配模式、匹配位置,也可能还有未匹配样值;所述匹配位置是用来表示从参考 像素样值存储空间中的什么位置复制匹配的参考像素样值并将其粘贴到当前解码子区域的当前解码中像素样值(称为被匹配像素样值)的位置,所述匹配的参考像素样值称为匹配像素样值(显而易见,被匹配像素样值是匹配像素样值的复制品,两者在数值上是相等的),所述匹配像素样值的位置并不一定在所述参考像素样值存储空间中形成连在一起的一个区域,也可能是所述参考像素样值存储空间中分离的几个区域;所述未匹配样值是直接从视频码流数据中解析和解码得到的像素样值并将其粘贴到当前解码子区域的当前解码中像素样值的位置,所述未匹配样值通常不存在于所述参考像素样值存储空间中;所述A个解码方式模块的输出是预测像素样值或所述匹配像素样值(在数值上与被匹配像素样值相等)加上所述未匹配样值(在有些匹配解码方式中存在);所述被匹配像素样值和可能存在的所述未匹配样值全部合起来就构成所述当前解码CU的完整的匹配解码输出;2) Predictive decoding mode module, matching decoding mode 1 module, matching decoding mode 2 module, ..., matching decoding mode A-1 module: A is a positive integer satisfying 2 ≤ A ≤ 5; the A decoding mode modules respectively Using the prediction (intra prediction or inter prediction or both) decoding mode, matching decoding mode 1, matching decoding mode 2, ..., matching decoding mode A-1, the A decoding mode corresponds to the corresponding A current decoding The region performs prediction or matching decoding operation; the input of the prediction decoding mode module is a motion vector of a prediction mode and an inter prediction; the input of the matching decoding mode module is a matching mode, a matching position, and possibly an unmatched sample. ; the matching position is used to indicate from the reference Where in the pixel sample storage space, the matching reference pixel samples are copied and pasted to the position of the currently decoded pixel sample (referred to as the matched pixel sample) of the current decoded sub-region, the matched reference pixel The sample values are referred to as matching pixel samples (obviously, the matched pixel samples are replicas of matching pixel samples, both of which are numerically equal), and the positions of the matching pixel samples are not necessarily in the reference One area connected together in the pixel sample storage space may also be several areas separated in the reference pixel sample storage space; the unmatched samples are directly parsed and decoded from the video stream data. a pixel sample value and pasting it to the position of the currently decoded pixel sample in the current decoding sub-region, the unmatched sample is typically not present in the reference pixel sample storage space; the A decoding mode module The output is a predicted pixel sample or the matched pixel sample (which is numerically equal to the matched pixel sample) plus the unmatched sample (present in some matching decoding modes); Pixel sample values are matched and the match is not possible to sample all together constitute the complete data matching the decoded output of the current decoding CU;
3)参考像素样值存储空间1模块、参考像素样值存储空间2模块、……、参考像素样值存储空间B模块:B是一个满足2≤B≤A≤5的正整数;这B个参考像素样值存储空间用独特的彼此不同的形式存储在解码过程中产生的重构像素样值历史数据,用作后续的解码和重构各种运算时需要的参考像素样值;这B个不同形式的参考像素样值存储空间可能有不同的空间大小来存储不同数量的历史数据,其中,存储历史数据最多的那一个称为主参考像素样值存储空间,而其他参考像素样值存储空间中的历史数据都是主参考像素样值存储空间的历史数据的子集,但有不同的表现形式并且可能处于不同程度的部分重构阶段(如已加上匹配残差或尚未加上匹配残差);对应于这B个参考像素样值存储空间,所述预测解码方式模块、匹配解码方式1模块、匹配解码方式2模块、……、匹配解码方式A-1模块的A种解码方式也相应地划分归并成B类,与B个参考像素样值存储空间一一对应;在对所述当前解码子区域进行解码时,每种预测解码方式或匹配解码方式都根据其归类使用对应的那个参考像素样值存储空间进行预测解码或匹配解码,每个参考像素样值存储空间为相对应的那一类解码方式的所有解码方式(可能有多种)提供参考像素样值;3) Reference pixel sample storage space 1 module, reference pixel sample storage space 2 module, ..., reference pixel sample storage space B module: B is a positive integer satisfying 2 ≤ B ≤ A ≤ 5; The reference pixel sample storage space stores the reconstructed pixel sample history data generated in the decoding process in a unique mutually different form, and is used as a reference pixel sample required for subsequent decoding and reconstruction of various operations; Different forms of reference pixel sample storage space may have different spatial sizes to store different amounts of historical data, wherein the one storing the most historical data is called the primary reference pixel sample storage space, and the other reference pixel sample storage spaces. The historical data in the data is a subset of the historical data of the primary reference pixel sample storage space, but has different representations and may be in different stages of partial reconstruction (such as matching residuals or no matching residuals) Corresponding to the B reference pixel sample storage spaces, the prediction decoding mode module, the matching decoding mode 1 module, the matching decoding mode 2 module, ..., The A decoding modes of the decoding mode A-1 module are also divided into B classes correspondingly, corresponding to the B reference pixel sample storage spaces; when decoding the current decoding sub-region, each prediction decoding The mode or the matching decoding mode performs prediction decoding or matching decoding according to the corresponding reference pixel sample storage space according to its classification, and each reference pixel sample storage space is all decoding modes corresponding to the decoding mode (possibly There are a variety of) providing reference pixel samples;
4)其余的各种常用技术解码和重构模块:对所述当前解码子区域施行其余的各种常用技术,如逆变换、反量化、对应于预测残差和匹配残差的补偿(即取残差运算的逆运算)、预测并做补偿(即求残差运算的逆运算)、DPCM、一阶和高阶差分、映射、游程、索引、去块效应滤波、样值自适应补偿(Sample Adaptive Offset),的解码和重构运算;本模块的输入是模块1)输出的所有其他语法元素如预测残差和匹配残差的熵解码输出数据和模块2)所述各模 块的输出即所述预测像素样值或所述匹配像素样值加上可能存在的所述未匹配样值;本模块的输出是重构像素(包括完全重构像素和不同程度的部分重构像素);所述重构像素都要转换成主参考像素样值存储空间的形式并放入模块3)所述主参考像素样值存储空间,也可能要转换成其他参考像素样值存储空间的形式(可能处于另一程度的部分重构阶段)并放入模块2)所述其他参考像素样值存储空间,用作后续的解码和重构各种运算时需要的参考像素样值;所述完全重构像素也是本解码装置的最后输出;4) The remaining common techniques of decoding and reconstructing modules: performing the remaining common techniques on the current decoding sub-region, such as inverse transform, inverse quantization, compensation corresponding to prediction residuals and matching residuals (ie, taking Inverse operation of residual operation), prediction and compensation (ie inverse operation of residual operation), DPCM, first-order and high-order difference, mapping, run, index, deblocking filtering, sample adaptive compensation (Sample Adaptive Offset), decoding and reconstruction operations; the input to this module is all other syntax elements of module 1) output such as entropy decoded output data for prediction residuals and matching residuals and modules 2) The output of the block is the predicted pixel sample or the matched pixel sample plus the unmatched sample that may exist; the output of the module is a reconstructed pixel (including fully reconstructed pixels and varying degrees of partial reconstruction) Pixels); the reconstructed pixels are converted into a form of a primary reference pixel sample storage space and placed in the module 3) the primary reference pixel sample storage space, and may also be converted into other reference pixel sample storage spaces. Form (possibly in another degree of partial reconstruction phase) and put into the other reference pixel sample storage space of module 2) for use as a reference pixel sample for subsequent decoding and reconstruction of various operations; Fully reconstructed pixels are also the final output of the present decoding device;
5)像素样值存储空间的形式转换模块:把B种参考像素样值存储空间的形式的一种形式转换成另一种形式;模块4)产生和输出的重构像素,都要经过本模块转换成主参考像素样值存储空间的形式并放入模块3)所述主参考像素样值存储空间,也可能要经过本模块转换成其他参考像素样值存储空间的形式(可能处于另一程度的部分重构阶段)并放入模块3)所述其他参考像素样值存储空间,用作后续的解码和重构各种运算时需要的参考像素样值;本模块使不同的参考像素样值存储空间内的历史数据互相之间保持同步。5) Form conversion module of pixel sample storage space: convert one form of the form of B reference pixel sample storage space into another form; module 4) reconstructed pixels generated and output must pass through this module Converted into the form of the main reference pixel sample storage space and placed in the module 3) the main reference pixel sample storage space, may also be converted into other reference pixel sample storage space by the module (may be in another degree Partial reconstruction stage) and put into the other reference pixel sample storage space of module 3), used as reference pixel samples needed for subsequent decoding and reconstruction of various operations; this module makes different reference pixel samples Historical data in the storage space is synchronized with each other.
以上所提供的图示仅以示意方式说明本发明的基本构想,图示中仅显示与本发明直接有关的组件而非按照实际实施时的组件数目、形状及尺寸绘制,其实际实施时各组件的型态、数量及比例可为一种随意的改变,且其组件布局型态也可能更为复杂。The illustrations provided above merely illustrate the basic idea of the present invention in a schematic manner, and only the components directly related to the present invention are shown in the drawings, rather than the number, shape and size of components in actual implementation, and the components in actual implementation. The type, quantity, and proportion can be a random change, and the component layout can be more complicated.
以下是本发明的更多的实施细节和变体。The following are more implementation details and variations of the invention.
实施或变体例1 4种编码方式和2个不同形式的参考像素样值存储空间的实施例Implementation or variant example 1 embodiment of four coding modes and two different forms of reference pixel sample storage space
所述正整数A等于4,所述4个编码方式模块分别是预测编码方式模块,块匹配编码方式模块,串匹配编码方式模块,调色板匹配编码方式模块;所述正整数B等于2,所述2个参考像素样值存储空间分别是平面格式和2维数组空间之形式的参考像素样值存储空间(简称为平面2维参考空间)与叠包格式和1维数组空间之形式的参考像素样值存储空间(简称为叠包1维参考空间);所述主参考像素样值存储空间是所述平面2维参考空间,所述叠包1维参考空间中的历史数据都是所述平面2维参考空间的历史数据的子集,但有不同的表现形式并且可能处于不同程度的部分重构阶段(如已加上匹配残差或尚未加上匹配残差);所述4种编码方式也相应地划分归并成2类,预测编码方式和块匹配编码方式都是第1类编码方式,与所述平面2维参考空间相对应,而串匹配编码方式和调色板匹配编码方式都是第2类编码方式,与所述 叠包1维参考空间相对应;在对所述当前编码子区域进行编码时,预测编码方式使用所述平面2维参考空间进行预测编码,块匹配编码方式也使用所述平面2维参考空间进行块匹配编码,串匹配编码方式则使用所述叠包1维参考空间进行串匹配编码,调色板匹配编码方式也使用所述叠包1维参考空间进行调色板匹配编码;所述平面2维参考空间为预测编码和块匹配编码提供参考像素样值,而所述叠包1维参考空间则为串匹配编码和调色板匹配编码提供参考像素样值;The positive integer A is equal to 4, and the four coding mode modules are a prediction coding mode module, a block matching coding mode module, a string matching coding mode module, and a palette matching coding mode module; the positive integer B is equal to 2, The two reference pixel sample storage spaces are reference pixel storage spaces in the form of a planar format and a two-dimensional array space (referred to as a planar two-dimensional reference space) and a reference to a form of a stacked format and a one-dimensional array space. a pixel sample storage space (referred to as a stacked 1-dimensional reference space); the primary reference pixel sample storage space is the planar 2-dimensional reference space, and historical data in the stacked 1-dimensional reference space are all A subset of the historical data of a planar 2-dimensional reference space, but with different representations and possibly at different degrees of partial reconstruction (eg if a matching residual has been added or a matching residual has not been added); the 4 encodings The method is also divided into two categories correspondingly, and the prediction coding mode and the block matching coding mode are both the first type coding mode, corresponding to the planar two-dimensional reference space, and the string matching coding mode and the color palette. Encoding with a second coding method are based, and the The stacked packet corresponds to a 1-dimensional reference space; when encoding the current coding sub-region, the predictive coding mode uses the planar 2-dimensional reference space for predictive coding, and the block-matching coding mode also uses the planar 2-dimensional reference space. Block matching coding, the string matching coding method uses the overlapping packet 1D reference space for string matching coding, and the palette matching coding mode also uses the overlapping packet 1D reference space for palette matching coding; The dimension reference space provides reference pixel samples for predictive coding and block matching encoding, and the stacked 1-dimensional reference space provides reference pixel samples for string matching encoding and palette matching encoding;
块匹配编码方式以若干一定大小(如64x64样值、32x32样值、16x16样值、8x8样值、8x4样值、4x8样值、4x4样值等)的块(称为被匹配块,其在一帧图像内的位置可用一个2维坐标来表示)为单位进行匹配编码,所述匹配像素样值形成所述平面2维参考空间内的一个匹配块,其在一帧图像内的位置也可用一个2维坐标来表示,因而在块匹配编码方式中,所述匹配位置可用匹配块的2维坐标与被匹配块的2维坐标之差,称为位移矢量来表示;A block-matching coding scheme is a block of a certain size (such as 64x64 samples, 32x32 samples, 16x16 samples, 8x8 samples, 8x4 samples, 4x8 samples, 4x4 samples, etc.) (referred to as a matched block, which is Matching encoding is performed in units of a 2-dimensional coordinate, the matching pixel samples form a matching block in the planar 2-dimensional reference space, and the position within one frame of the image is also available. a two-dimensional coordinate representation, and thus in the block matching coding mode, the matching position can be represented by a difference between a 2-dimensional coordinate of the matching block and a 2-dimensional coordinate of the matched block, which is called a displacement vector;
串匹配编码方式将所述当前编码子区域的像素样值按照预先确定的线性扫描格式排列成叠包格式的1维的像素样值串,以可变长度的像素样值串(称为被匹配串,其位置既可用一个2维坐标也可用一个线性地址来表示)为单位进行匹配编码,所述匹配像素样值形成所述叠包1维参考空间内的一个匹配串,其位置也是既可用一个2维坐标也可用一个线性地址来表示,因而在串匹配编码方式中,所述匹配位置既可用匹配串的2维坐标与被匹配串的2维坐标之差也可用匹配串的线性地址与被匹配串的线性地址之差,通称为位移矢量来表示,由于匹配串的长度(等于被匹配串的长度)是可变的,所以还需要另一个称为匹配长度的变量与所述位移矢量一起,即(位移矢量,匹配长度),来完整地表示所述匹配位置;对所述当前编码CU进行串匹配编码的结果是M(M≥1)个匹配串和N(N≥0)个未匹配像素样值,输出M对(位移矢量,匹配长度)和N个未匹配像素样值;The string matching coding method arranges the pixel samples of the current coding sub-region into a 1-dimensional pixel sample string in a stack format according to a predetermined linear scan format, and uses a variable-length pixel sample string (referred to as being matched). The string, whose position can be represented by a 2D coordinate or a linear address, is matched and encoded. The matched pixel sample forms a matching string in the 1D-dimensional reference space of the stack, and the position is also available. A 2-dimensional coordinate can also be represented by a linear address. Therefore, in the string matching coding mode, the matching position can use the difference between the 2-dimensional coordinates of the matching string and the 2-dimensional coordinates of the matched string, and the linear address of the matching string can also be used. The difference between the linear addresses of the matched strings is generally referred to as the displacement vector. Since the length of the matching string (equal to the length of the matched string) is variable, another variable called the matching length and the displacement vector are needed. Together, that is, (displacement vector, matching length), the matching position is completely represented; the result of performing string matching encoding on the current coding CU is M (M ≥ 1) matching strings and N (N) ≥ 0) unmatched pixel samples, output M pairs (displacement vector, matching length) and N unmatched pixel samples;
调色板匹配编码仅使用所述叠包1维参考空间的一部分像素(通常含当前CU内的若干像素样值)作为参考像素,因而从所述叠包1维参考空间中按照预先确定的方法挑选出并适时更新一组K个像素(通常4≤K≤64),这K个像素组成一个调色板,调色板中的每个像素都用一个索引来表示,调色板匹配编码方式使用所述调色板的像素作为参考像素,而所述匹配像素样值的所述匹配位置就是所述匹配像素样值在调色板中的索引,所述当前编码CU的所有所述匹配像素样值的索引整体组成一个索引数组,称为索引映射;The palette matching encoding uses only a part of the pixels of the stacked 1-dimensional reference space (generally containing a number of pixel samples in the current CU) as reference pixels, and thus a predetermined method from the stacked 1-dimensional reference space Pick out and update a set of K pixels (usually 4≤K≤64). These K pixels form a palette. Each pixel in the palette is represented by an index. Using the pixels of the palette as reference pixels, and the matching position of the matching pixel samples is an index of the matching pixel samples in a palette, all of the matching pixels of the current encoding CU The index of the sample value constitutes an index array as an index map;
所述其余的各种常用技术编码和重构模块的功能之一是对匹配模式,位移矢量,匹配长度,索引映射,未匹配样值等参数和变量施行各种常用的可能需要的变换、预测并求残差、DPCM、一阶和高阶差分、映射、游程、索引编码; One of the functions of the remaining common techniques of coding and reconstruction modules is to perform various commonly used transformations and predictions on parameters and variables such as matching patterns, displacement vectors, matching lengths, index mappings, unmatched samples, and the like. And find the residual, DPCM, first-order and high-order difference, mapping, run, index coding;
所述像素样值存储空间的形式转换模块进行像素的下列两种表现形式之间的互相转换:1)平面格式和2维数组空间之形式,2)叠包格式和1维数组空间之形式;The form conversion module of the pixel sample storage space performs mutual conversion between the following two expression forms of the pixel: 1) a format of a planar format and a 2-dimensional array space, 2) a form of a stacked packet format and a 1-dimensional array space;
所述调色板匹配编码方式模块和所述调色板是可选的,可以省略,从而在所述的编码装置中,所述正整数A等于3,所述3个编码方式模块分别是预测编码方式模块,块匹配编码方式模块,串匹配编码方式模块;The palette matching encoding mode module and the color palette are optional and may be omitted, so that in the encoding device, the positive integer A is equal to 3, and the three encoding mode modules are predictions respectively. Encoding mode module, block matching coding mode module, and string matching coding mode module;
所述串匹配编码方式模块是可选的,可以省略,从而在所述的编码装置中,所述正整数A等于3,所述3个编码方式模块分别是预测编码方式模块,块匹配编码方式模块,调色板匹配编码方式模块。The string matching coding mode module is optional and may be omitted. Therefore, in the coding apparatus, the positive integer A is equal to 3, and the three coding mode modules are respectively a prediction coding mode module and a block matching coding mode. Module, palette matching encoding mode module.
实施或变体例2 4种解码方式和2个不同形式的参考像素样值存储空间的实施例Implementation or variant example 2 embodiment of four decoding modes and two different forms of reference pixel sample storage space
所述正整数A等于4,所述4个解码方式模块分别是预测解码方式模块,块匹配解码方式模块,串匹配解码方式模块,调色板匹配解码方式模块;所述正整数B等于2,所述2个参考像素样值存储空间分别是平面格式和2维数组空间之形式的参考像素样值存储空间(简称为平面2维参考空间)与叠包格式和1维数组空间之形式的参考像素样值存储空间(简称为叠包1维参考空间);所述主参考像素样值存储空间是所述平面2维参考空间,所述叠包1维参考空间中的历史数据都是所述平面2维参考空间的历史数据的子集,但有不同的表现形式并且可能处于不同程度的部分重构阶段(如已加上匹配残差或尚未加上匹配残差);所述4种解码方式也相应地划分归并成2类,预测解码方式和块匹配解码方式都是第1类解码方式,与所述平面2维参考空间相对应,而串匹配解码方式和调色板匹配解码方式都是第2类解码方式,与所述叠包1维参考空间相对应;在对所述当前解码CU进行解码时,预测解码方式使用所述平面2维参考空间进行预测解码,块匹配解码方式也使用所述平面2维参考空间进行块匹配解码,串匹配解码方式则使用所述叠包1维参考空间进行串匹配解码,调色板匹配解码方式也使用所述叠包1维参考空间进行调色板匹配解码;所述平面2维参考空间为预测解码和块匹配解码提供参考像素样值,而所述叠包1维参考空间则为串匹配解码和调色板匹配解码提供参考像素样值;The positive integer A is equal to 4, and the four decoding mode modules are a prediction decoding mode module, a block matching decoding mode module, a string matching decoding mode module, and a palette matching decoding mode module; the positive integer B is equal to 2, The two reference pixel sample storage spaces are reference pixel storage spaces in the form of a planar format and a two-dimensional array space (referred to as a planar two-dimensional reference space) and a reference to a form of a stacked format and a one-dimensional array space. a pixel sample storage space (referred to as a stacked 1-dimensional reference space); the primary reference pixel sample storage space is the planar 2-dimensional reference space, and historical data in the stacked 1-dimensional reference space are all A subset of the historical data of the planar 2-dimensional reference space, but with different representations and possibly at different degrees of partial reconstruction (eg if a matching residual has been added or a matching residual has not been added); the 4 decodings The mode is also divided into two categories correspondingly, and the prediction decoding mode and the block matching decoding mode are both the first type decoding mode, corresponding to the planar 2-dimensional reference space, and the string matching decoding mode and the color palette. The decoding mode is a type 2 decoding mode corresponding to the stacked packet 1-dimensional reference space; when decoding the current decoding CU, the prediction decoding mode uses the planar 2-dimensional reference space for prediction decoding, and the block The matching decoding method also uses the planar 2-dimensional reference space for block matching decoding, and the string matching decoding method uses the stacked packet 1-dimensional reference space for string matching decoding, and the palette matching decoding method also uses the stacked packet 1D. The reference space performs palette matching decoding; the planar 2-dimensional reference space provides reference pixel samples for predictive decoding and block matching decoding, and the stacked 1-dimensional reference space provides for string matching decoding and palette matching decoding. Reference pixel sample;
块匹配解码方式以若干一定大小(如64x64样值、32x32样值、16x16样值、8x8样值、8x4样值、4x8样值、4x4样值等)的块(称为被匹配块,其在一帧图像内的位置可用一个2维坐标来表示)为单位进行匹配解码,所述匹配像素样值形成所述平面2维参考空间内的一个匹配块,其在一帧图像内的位置也可用一个2维坐标来表示,因而在块匹配解码方式中,所述匹配位置可用匹配块的2维坐标与被匹配块的2维坐标之差,称为位移矢量来表示; A block-matching decoding method is a block of a certain size (such as 64x64 samples, 32x32 samples, 16x16 samples, 8x8 samples, 8x4 samples, 4x8 samples, 4x4 samples, etc.) (referred to as a matched block, which is Matching decoding is performed in units of a 2-dimensional coordinate, which forms a matching block in the planar 2-dimensional reference space, and the position within one frame of the image is also available. a two-dimensional coordinate representation, and thus in the block matching decoding mode, the matching position can be represented by a difference between a 2-dimensional coordinate of the matching block and a 2-dimensional coordinate of the matched block, which is called a displacement vector;
串匹配解码方式将所述当前解码CU的像素样值按照预先确定的线性扫描格式排列成叠包格式的1维的像素样值串,以可变长度的像素样值串(称为被匹配串,其位置既可用一个2维坐标也可用一个线性地址来表示)为单位进行匹配解码,所述匹配像素样值形成所述叠包1维参考空间内的一个匹配串,其位置也是既可用一个2维坐标也可用一个线性地址来表示,因而在串匹配解码方式中,所述匹配位置既可用匹配串的2维坐标与被匹配串的2维坐标之差也可用匹配串的线性地址与被匹配串的线性地址之差,通称为位移矢量来表示,由于匹配串的长度(等于被匹配串的长度)是可变的,所以还需要另一个称为匹配长度的变量与所述位移矢量一起,即(位移矢量,匹配长度),来完整地表示所述匹配位置;对所述当前解码CU进行串匹配解码时的输入是从视频码流数据中解析和解码得到的匹配模式,M(M≥1)对(位移矢量,匹配长度)和N(N≥0)个未匹配像素样值;The string matching decoding method arranges the pixel samples of the currently decoded CU into a 1-dimensional pixel sample string in a stack format according to a predetermined linear scan format, and uses a variable length pixel sample string (referred to as a matched string). , the position of which can be represented by a 2D coordinate or a linear address. The matching pixel sample forms a matching string in the 1st dimension reference space of the stack, and the position is also available. The 2-dimensional coordinates can also be represented by a linear address. Therefore, in the string matching decoding mode, the matching position can use both the difference between the 2-dimensional coordinates of the matching string and the 2-dimensional coordinates of the matched string, and the linear address of the matching string can also be used. The difference between the linear addresses of the matching strings is generally referred to as the displacement vector. Since the length of the matching string (equal to the length of the matched string) is variable, another variable called the matching length is required along with the displacement vector. , ie (displacement vector, matching length), to completely represent the matching position; the input when performing string matching decoding on the current decoding CU is parsed from the video stream data And the matching pattern obtained by decoding, M (M ≥ 1) pairs (displacement vector, matching length) and N (N ≥ 0) unmatched pixel samples;
调色板匹配解码仅使用所述叠包1维参考空间的一部分像素(通常含当前CU内的若干像素样值)作为参考像素,因而从所述叠包1维参考空间中按照预先确定的方法挑选出并适时更新一组K个像素(通常4≤K≤64),这K个像素组成一个调色板,调色板中的每个像素都用一个索引来表示,调色板匹配解码方式使用所述调色板的像素作为参考像素,而所述匹配像素样值的所述匹配位置就是所述匹配像素样值在调色板中的索引,所述当前解码CU的所有所述匹配像素样值的索引整体组成一个索引数组,称为索引映射;索引映射是从视频码流数据中解析和解码得到的,是调色板匹配解码的输入之一;Palette matching decoding uses only a portion of the pixels of the stacked 1-dimensional reference space (typically containing a number of pixel samples within the current CU) as reference pixels, thus following a predetermined method from the stacked 1-dimensional reference space Pick out and update a set of K pixels (usually 4≤K≤64). These K pixels form a palette. Each pixel in the palette is represented by an index. The palette matches the decoding method. Using the pixels of the palette as reference pixels, and the matching position of the matching pixel samples is an index of the matching pixel samples in a palette, all of the matching pixels of the currently decoded CU The index of the sample form an index array as an index map; the index map is parsed and decoded from the video stream data, and is one of the input of the palette matching decoding;
所述码流数据解析与部分解码模块的功能之一是对从所述视频码流中经熵解码得到的代表匹配模式,位移矢量,匹配长度,索引映射,未匹配样值等参数和变量的语法元素的部分解码数据施行各种常用的可能需要的变换解码、预测并做补偿即求残差运算的逆运算、DPCM解码、一阶和高阶差分解码、映射解码、游程解码、索引解码的运算,得到原始的匹配模式,位移矢量,匹配长度,索引映射,未匹配样值等参数和变量,用作块匹配解码方式模块,串匹配解码方式模块,调色板匹配解码方式模块的输入;One of the functions of the code stream data parsing and partial decoding module is to represent parameters such as a matching pattern, a displacement vector, a matching length, an index map, an unmatched sample, and the like obtained by entropy decoding from the video code stream. The partial decoded data of the syntax element performs various commonly used transform decoding, prediction and compensation, that is, inverse operation of residual operation, DPCM decoding, first-order and high-order differential decoding, mapping decoding, run-length decoding, and index decoding. The operation obtains the original matching mode, the displacement vector, the matching length, the index mapping, the unmatched sample and other parameters and variables, and is used as a block matching decoding mode module, a string matching decoding mode module, and a palette matching decoding mode module input;
所述像素样值存储空间的形式转换模块进行像素的下列两种表现形式之间的互相转换:1)平面格式和2维数组空间之形式,2)叠包格式和1维数组空间之形式;The form conversion module of the pixel sample storage space performs mutual conversion between the following two expression forms of the pixel: 1) a format of a planar format and a 2-dimensional array space, 2) a form of a stacked packet format and a 1-dimensional array space;
所述调色板匹配解码方式模块和所述调色板是可选的,可以省略,从而在所述的解码装置中,所述正整数A等于3,所述3个解码方式模块分别是预测解码方式模块,块匹配解码方式模块,串匹配解码方式模块;The palette matching decoding mode module and the color palette are optional and may be omitted, so that in the decoding device, the positive integer A is equal to 3, and the three decoding mode modules are predictions respectively. Decoding mode module, block matching decoding mode module, string matching decoding mode module;
所述串匹配解码方式模块是可选的,可以省略,从而在所述的解码装置中,所述正整数A等于3,所述3个解码方式模块分别是预测解码方式模块,块匹配解码方式 模块,调色板匹配解码方式模块。The string matching decoding mode module is optional and may be omitted, so that in the decoding device, the positive integer A is equal to 3, and the three decoding mode modules are respectively a prediction decoding mode module, and a block matching decoding mode. Module, palette matching decoding mode module.
实施或变体例3 含预测和匹配方式标识码和其他编码结果的视频码流以及预测和匹配方式归类的实施例Implementation or variant example 3 embodiment of a video code stream containing prediction and matching mode identification codes and other coding results and a classification of prediction and matching modes
所述视频码流中的编码单元即CU部分由载入了下列信息的语法元素构成:The coding unit in the video stream, ie the CU part, consists of syntax elements loaded with the following information:
CU头、预测和匹配方式标识码、预测模式或匹配模式、运动矢量1或匹配位置1、未匹配像素样值1、运动矢量2或匹配位置2、未匹配像素样值2、……………、更多运动矢量或匹配位置、更多未匹配像素样值、预测残差或匹配残差、其他编码结果;CU header, prediction and matching mode identification code, prediction mode or matching mode, motion vector 1 or matching position 1, unmatched pixel sample 1, motion vector 2 or matching position 2, unmatched pixel sample 2, ......... ..., more motion vectors or matching positions, more unmatched pixel samples, prediction residuals or matching residuals, other coding results;
除了所述CU头语法元素,所有其他所述语法元素在码流中的放置排列顺序并不是唯一的,可采用任意一种预先确定的合理的顺序;任何一个语法元素也可以被拆成几部分,所述几部分可以集中放置在码流中同一地方,也可以分别放置在码流中不同的地方;任何若干语法元素也可以合并成一个语法元素;除了所述CU头语法元素以及预测和匹配方式标识码语法元素,其他语法元素也可以不存在于某个CU的压缩码流数据中;In addition to the CU header syntax elements, the order in which all other of the syntax elements are placed in the code stream is not unique, and any predetermined predetermined order may be employed; any one of the syntax elements may also be split into several parts. The parts may be placed centrally in the same place in the code stream, or may be placed in different places in the code stream; any number of syntax elements may also be combined into one syntax element; in addition to the CU header syntax elements and prediction and matching The mode identifier code syntax element, and other syntax elements may not exist in the compressed code stream data of a certain CU;
所述预测和匹配方式标识码可以取以下几个码值并具有以下语义:The prediction and matching mode identification code may take the following code values and have the following semantics:
码值Code value 语义Semantics
00 当前编码或解码CU(简称为当前CU)采用预测编码或解码方式The current encoding or decoding CU (referred to as the current CU) adopts predictive coding or decoding
11 当前编码或解码CU(简称为当前CU)采用匹配编码或解码方式1The current encoding or decoding CU (referred to as the current CU) adopts matching encoding or decoding mode 1
22 当前编码或解码CU(简称为当前CU)采用匹配编码或解码方式2The current encoding or decoding CU (referred to as the current CU) adopts matching encoding or decoding mode 2
... ……………………………………..........................................
A-1A-1 当前编码或解码CU(简称为当前CU)采用匹配编码或解码方式A-1The current encoding or decoding CU (referred to as the current CU for short) adopts matching encoding or decoding mode A-1
所述A个编码方式或A个解码方式的划分归类由预先确定的一个A-元数组ClassOfCoding[A]来定义,每一个j=ClassOfCoding[i](其中i满足0≤i<A)的取值范围是1至B,分别与B个参考像素样值存储空间一一对应,由此,从当前CU的预测和匹配方式标识码的码值和A-元数组ClassOfCoding[A]就可以按照下列判断条件确定当前CU采用哪个参考像素样值存储空间来进行编码或解码:The divisional classification of the A coding mode or the A decoding mode is defined by a predetermined A-ary array ClassOfCoding[A], and each j=ClassOfCoding[i] (where i satisfies 0≤i<A) The value ranges from 1 to B, and corresponds to the B reference pixel sample storage spaces, respectively. Thus, the code value of the current CU prediction and matching mode identification code and the A-ary array ClassOfCoding[A] can be followed. The following judgment conditions determine which reference pixel sample storage space the current CU uses for encoding or decoding:
如果(预测和匹配方式标识码的码值==0)则采用参考像素样值存储空间j对当前CU进行编码或解码,其中j=ClassOfCoding[0];If (the code value of the prediction and matching mode identification code = 0), the current CU is encoded or decoded using the reference pixel sample storage space j, where j = ClassOfCoding[0];
如果(预测和匹配方式标识码的码值==1)则采用参考像素样值存储空间j对当 前CU进行编码或解码,其中j=ClassOfCoding[1];If (the code value of the prediction and matching mode identification code = =1), the reference pixel sample storage space j is used. The former CU encodes or decodes, where j=ClassOfCoding[1];
如果(预测和匹配方式标识码的码值==2)则采用参考像素样值存储空间j对当前CU进行编码或解码,其中j=ClassOfCoding[2];If (the code value of the prediction and matching mode identification code == 2), the current CU is encoded or decoded using the reference pixel sample storage space j, where j = ClassOfCoding [2];
……………………………………..........................................
如果(预测和匹配方式标识码的码值==i)则采用参考像素样值存储空间j对当前CU进行编码或解码,其中j=ClassOfCoding[i];If (the code value of the prediction and matching mode identification code == i), the current CU is encoded or decoded using the reference pixel sample storage space j, where j = ClassOfCoding[i];
……………………………………..........................................
如果(预测和匹配方式标识码的码值==A-1)则采用参考像素样值存储空间j对当前CU进行编码或解码,其中j=ClassOfCoding[A-1];If (the code value of the prediction and matching mode identification code == A-1), the current CU is encoded or decoded using the reference pixel sample storage space j, where j = ClassOfCoding [A-1];
以上符号“==”表示“相等于”。The above symbol "==" means "equal to".
实施或变体例4 含预测和匹配方式标识码和其他编码结果的视频码流以及2类编码或解码方式的实施例1Implementation or Variation 4 Embodiment 1 of a video code stream including a prediction and matching mode identification code and other coding results, and a class 2 coding or decoding mode
所述视频码流中的编码单元即CU部分由载入了下列信息的语法元素构成:The coding unit in the video stream, ie the CU part, consists of syntax elements loaded with the following information:
CU头、预测和匹配方式标识码、预测模式或匹配模式、运动矢量1或位移矢量1或(位移矢量1,匹配长度1)或索引映射1、未匹配像素样值1、运动矢量2或位移矢量2或(位移矢量2,匹配长度2)或索引映射2、未匹配像素样值2、……………、更多运动矢量或位移矢量或(位移矢量,匹配长度)或索引映射、更多未匹配像素样值、预测残差或匹配残差、其他编码结果;CU header, prediction and matching mode identification code, prediction mode or matching mode, motion vector 1 or displacement vector 1 or (displacement vector 1, matching length 1) or index map 1, unmatched pixel sample 1, motion vector 2 or displacement Vector 2 or (displacement vector 2, matching length 2) or index map 2, unmatched pixel samples 2, .........., more motion vectors or displacement vectors or (displacement vectors, matching lengths) or index mapping, more Multiple unmatched pixel samples, prediction residuals or matching residuals, other coding results;
除了所述CU头语法元素,所有其他所述语法元素在码流中的放置排列顺序并不是唯一的,可采用任意一种预先确定的合理的顺序;任何一个语法元素也可以被拆成几部分,所述几部分可以集中放置在码流中同一地方,也可以分别放置在码流中不同的地方;任何若干语法元素也可以合并成一个语法元素;除了所述CU头语法元素以及预测和匹配方式标识码语法元素,其他语法元素也可以不存在于某个CU的视频码流数据中;In addition to the CU header syntax elements, the order in which all other of the syntax elements are placed in the code stream is not unique, and any predetermined predetermined order may be employed; any one of the syntax elements may also be split into several parts. The parts may be placed centrally in the same place in the code stream, or may be placed in different places in the code stream; any number of syntax elements may also be combined into one syntax element; in addition to the CU header syntax elements and prediction and matching The mode identifier code syntax element, and other syntax elements may not exist in the video code stream data of a certain CU;
所述预测和匹配方式标识码可以取以下几个码值并具有以下语义:The prediction and matching mode identification code may take the following code values and have the following semantics:
码值Code value 语义Semantics
00 当前编码或解码CU(简称为当前CU)采用预测编码或解码方式The current encoding or decoding CU (referred to as the current CU) adopts predictive coding or decoding
11 当前编码或解码CU(简称为当前CU)采用块匹配编码或解码方式The current encoding or decoding CU (referred to as the current CU) adopts block matching encoding or decoding mode.
22 当前编码或解码CU(简称为当前CU)采用串匹配编码或解码方式The current encoding or decoding CU (referred to as the current CU) uses string matching encoding or decoding.
33 当前编码或解码CU(简称为当前CU)采用调色板匹配编码或解码方式The current encoding or decoding CU (referred to as the current CU) adopts palette matching encoding or decoding mode.
所述4个编码方式或4个解码方式的划分归类由预先确定的一个4-元数组ClassOfCoding[4]来定义,每一个ClassOfCoding[i](其中i满足0≤i<4)的取值是:The division of the four coding modes or the four decoding modes is defined by a predetermined 4-element array ClassOfCoding[4], and each ClassOfCoding[i] (where i satisfies 0≤i<4) Yes:
ClassOfCoding[0]=ClassOfCoding[1]=1,ClassOfCoding[0]=ClassOfCoding[1]=1,
ClassOfCoding[2]=ClassOfCoding[3]=2,ClassOfCoding[2]=ClassOfCoding[3]=2,
取值为1和2分别与参考像素样值存储空间1(即平面2维参考空间)和参考像素样值存储空间2(叠包1维参考空间)一一对应,由此,从当前CU的预测和匹配方式标识码的码值和4-元数组ClassOfCoding[4]就可以按照下列判断条件确定当前CU采用哪个参考像素样值存储空间来进行编码或解码:The values 1 and 2 correspond to the reference pixel sample storage space 1 (ie, the planar 2-dimensional reference space) and the reference pixel sample storage space 2 (the stacked 1-dimensional reference space), respectively, thereby, from the current CU The code value of the prediction and matching mode identification code and the 4-ary array ClassOfCoding[4] can determine which reference pixel sample storage space the current CU uses for encoding or decoding according to the following judgment conditions:
如果(预测和匹配方式标识码的码值==i)则采用参考像素样值存储空间j对当前CU进行编码或解码,其中0≤i<4,j=ClassOfCoding[i];If (the code value of the prediction and matching mode identification code == i), the current CU is encoded or decoded using the reference pixel sample storage space j, where 0 ≤ i < 4, j = ClassOfCoding [i];
此判断条件也可展开写为:This judgment condition can also be expanded and written as:
如果(预测和匹配方式标识码的码值==0)则采用平面2维参考空间对当前CU进行编码或解码;If (the code value of the prediction and matching mode identification code = 0), the current CU is encoded or decoded by using a planar 2-dimensional reference space;
如果(预测和匹配方式标识码的码值==1)则采用平面2维参考空间对当前CU进行编码或解码;If (the code value of the prediction and matching mode identification code ==1), the current CU is encoded or decoded by using the planar 2-dimensional reference space;
如果(预测和匹配方式标识码的码值==2)则采用叠包1维参考空间对当前CU进行编码或解码;If (the code value of the prediction and matching mode identification code == 2), the current CU is encoded or decoded by using the overlapping 1D reference space;
如果(预测和匹配方式标识码的码值==3)则采用叠包1维参考空间对当前CU进行编码或解码。If (the code value of the prediction and matching mode identification code == 3), the current CU is encoded or decoded using the superimposed 1-dimensional reference space.
实施或变体例5 含预测和匹配方式标识码和其他编码结果的视频码流以及2类编码或解码方式的实施例2Implementation or Variation 5 Embodiment 2 of a video code stream including a prediction and matching mode identification code and other coding results, and a class 2 coding or decoding mode
所述视频码流中的编码单元即CU部分由载入了下列信息的语法元素构成:The coding unit in the video stream, ie the CU part, consists of syntax elements loaded with the following information:
CU头、预测和匹配方式标识码、预测模式或匹配模式、运动矢量1或位移矢量1或(位移矢量1,匹配长度1)、未匹配像素样值1、运动矢量2或位移矢量2或(位移矢量2,匹配长度2)、未匹配像素样值2、……………、更多运动矢量或位移矢 量或(位移矢量,匹配长度)、更多未匹配像素样值、预测残差或匹配残差、其他编码结果;CU header, prediction and matching mode identification code, prediction mode or matching mode, motion vector 1 or displacement vector 1 or (displacement vector 1, matching length 1), unmatched pixel sample 1, motion vector 2 or displacement vector 2 or ( Displacement vector 2, matching length 2), unmatched pixel samples 2, .........., more motion vectors or displacement vectors Quantity or (displacement vector, matching length), more unmatched pixel samples, prediction residuals or matching residuals, other coding results;
除了所述CU头语法元素,所有其他所述语法元素在码流中的放置排列顺序并不是唯一的,可采用任意一种预先确定的合理的顺序;任何一个语法元素也可以被拆成几部分,所述几部分可以集中放置在码流中同一地方,也可以分别放置在码流中不同的地方;任何若干语法元素也可以合并成一个语法元素;除了所述CU头语法元素以及预测和匹配方式标识码语法元素,其他语法元素也可以不存在于某个CU的视频码流数据中;In addition to the CU header syntax elements, the order in which all other of the syntax elements are placed in the code stream is not unique, and any predetermined predetermined order may be employed; any one of the syntax elements may also be split into several parts. The parts may be placed centrally in the same place in the code stream, or may be placed in different places in the code stream; any number of syntax elements may also be combined into one syntax element; in addition to the CU header syntax elements and prediction and matching The mode identifier code syntax element, and other syntax elements may not exist in the video code stream data of a certain CU;
所述预测和匹配方式标识码可以取以下几个码值并具有以下语义:The prediction and matching mode identification code may take the following code values and have the following semantics:
码值Code value 语义Semantics
00 当前编码或解码CU(简称为当前CU)采用预测编码或解码方式The current encoding or decoding CU (referred to as the current CU) adopts predictive coding or decoding
11 当前编码或解码CU(简称为当前CU)采用块匹配编码或解码方式The current encoding or decoding CU (referred to as the current CU) adopts block matching encoding or decoding mode.
22 当前编码或解码CU(简称为当前CU)采用串匹配编码或解码方式The current encoding or decoding CU (referred to as the current CU) uses string matching encoding or decoding.
所述3个编码方式或3个解码方式的划分归类由预先确定的一个3-元数组ClassOfCoding[3]来定义,每一个ClassOfCoding[i](其中i满足0≤i<3)的取值是:The division of the three coding modes or the three decoding modes is defined by a predetermined 3-element array ClassOfCoding[3], and each ClassOfCoding[i] (where i satisfies 0≤i<3) Yes:
ClassOfCoding[0]=ClassOfCoding[1]=1,ClassOfCoding[0]=ClassOfCoding[1]=1,
ClassOfCoding[2]=2,ClassOfCoding[2]=2,
取值为1和2分别与参考像素样值存储空间1(即平面2维参考空间)和参考像素样值存储空间2(叠包1维参考空间)一一对应,由此,从当前CU的预测和匹配方式标识码的码值和3-元数组ClassOfCoding[3]就可以按照下列判断条件确定当前CU采用哪个参考像素样值存储空间来进行编码或解码:The values 1 and 2 correspond to the reference pixel sample storage space 1 (ie, the planar 2-dimensional reference space) and the reference pixel sample storage space 2 (the stacked 1-dimensional reference space), respectively, thereby, from the current CU The code value of the prediction and matching mode identification code and the 3-ary array ClassOfCoding[3] can determine which reference pixel sample storage space the current CU uses for encoding or decoding according to the following judgment conditions:
如果(预测和匹配方式标识码的码值==i)则采用参考像素样值存储空间j对当前CU进行编码或解码,其中0≤i<3,j=ClassOfCoding[i];If (the code value of the prediction and matching mode identification code == i), the current CU is encoded or decoded using the reference pixel sample storage space j, where 0 ≤ i < 3, j = ClassOfCoding [i];
此判断条件也可展开写为:This judgment condition can also be expanded and written as:
如果(预测和匹配方式标识码的码值==0)则采用平面2维参考空间对当前CU进行编码或解码;If (the code value of the prediction and matching mode identification code = 0), the current CU is encoded or decoded by using a planar 2-dimensional reference space;
如果(预测和匹配方式标识码的码值==1)则采用平面2维参考空间对当前CU进行编码或解码; If (the code value of the prediction and matching mode identification code ==1), the current CU is encoded or decoded by using the planar 2-dimensional reference space;
如果(预测和匹配方式标识码的码值==2)则采用叠包1维参考空间对当前CU进行编码或解码。If (the code value of the prediction and matching mode identification code == 2), the current CU is encoded or decoded using the superimposed 1-dimensional reference space.
实施或变体例6 含预测和匹配方式标识码和其他编码结果的视频码流以及2类编码或解码方式的实施例3Implementation or Variation Example 6 Video stream containing prediction and matching mode identification codes and other coding results, and Embodiment 3 of the class 2 coding or decoding mode
所述视频码流中的编码单元即CU部分由载入了下列信息的语法元素构成:The coding unit in the video stream, ie the CU part, consists of syntax elements loaded with the following information:
CU头、预测和匹配方式标识码、预测模式或匹配模式、运动矢量1或位移矢量1或索引映射1、未匹配像素样值1、运动矢量2或位移矢量2或索引映射2、未匹配像素样值2、……………、更多运动矢量或位移矢量或索引映射、更多未匹配像素样值、预测残差或匹配残差、其他编码结果;CU header, prediction and matching mode identification code, prediction mode or matching mode, motion vector 1 or displacement vector 1 or index map 1, unmatched pixel sample 1, motion vector 2 or displacement vector 2 or index map 2, unmatched pixel Sample 2, ........., more motion vectors or displacement vectors or index maps, more unmatched pixel samples, prediction residuals or matching residuals, other coding results;
除了所述CU头语法元素,所有其他所述语法元素在码流中的放置排列顺序并不是唯一的,可采用任意一种预先确定的合理的顺序;任何一个语法元素也可以被拆成几部分,所述几部分可以集中放置在码流中同一地方,也可以分别放置在码流中不同的地方;任何若干语法元素也可以合并成一个语法元素;除了所述CU头语法元素以及预测和匹配方式标识码语法元素,其他语法元素也可以不存在于某个CU的视频码流数据中;In addition to the CU header syntax elements, the order in which all other of the syntax elements are placed in the code stream is not unique, and any predetermined predetermined order may be employed; any one of the syntax elements may also be split into several parts. The parts may be placed centrally in the same place in the code stream, or may be placed in different places in the code stream; any number of syntax elements may also be combined into one syntax element; in addition to the CU header syntax elements and prediction and matching The mode identifier code syntax element, and other syntax elements may not exist in the video code stream data of a certain CU;
所述预测和匹配方式标识码可以取以下几个码值并具有以下语义:The prediction and matching mode identification code may take the following code values and have the following semantics:
码值Code value 语义Semantics
00 当前编码或解码CU(简称为当前CU)采用预测编码或解码方式The current encoding or decoding CU (referred to as the current CU) adopts predictive coding or decoding
11 当前编码或解码CU(简称为当前CU)采用块匹配编码或解码方式The current encoding or decoding CU (referred to as the current CU) adopts block matching encoding or decoding mode.
22 当前编码或解码CU(简称为当前CU)采用调色板匹配编码或解码方式The current encoding or decoding CU (referred to as the current CU) adopts palette matching encoding or decoding mode.
所述3个编码方式或3个解码方式的划分归类由预先确定的一个3-元数组ClassOfCoding[3]来定义,每一个ClassOfCoding[i](其中i满足0≤i<3)的取值是:The division of the three coding modes or the three decoding modes is defined by a predetermined 3-element array ClassOfCoding[3], and each ClassOfCoding[i] (where i satisfies 0≤i<3) Yes:
ClassOfCoding[0]=ClassOfCoding[1]=1,ClassOfCoding[0]=ClassOfCoding[1]=1,
ClassOfCoding[2]=2,ClassOfCoding[2]=2,
取值为1和2分别与参考像素样值存储空间1(即平面2维参考空间)和参考像素样值存储空间2(叠包1维参考空间)一一对应,由此,从当前CU的预测和匹配方式标识码的码值和3-元数组ClassOfCoding[3]就可以按照下列判断条件确定当前CU采用哪个参考像素样值存储空间来进行编码或解码: The values 1 and 2 correspond to the reference pixel sample storage space 1 (ie, the planar 2-dimensional reference space) and the reference pixel sample storage space 2 (the stacked 1-dimensional reference space), respectively, thereby, from the current CU The code value of the prediction and matching mode identification code and the 3-ary array ClassOfCoding[3] can determine which reference pixel sample storage space the current CU uses for encoding or decoding according to the following judgment conditions:
如果(预测和匹配方式标识码的码值==i)则采用参考像素样值存储空间j对当前CU进行编码或解码,其中0≤i<3,j=ClassOfCoding[i];If (the code value of the prediction and matching mode identification code == i), the current CU is encoded or decoded using the reference pixel sample storage space j, where 0 ≤ i < 3, j = ClassOfCoding [i];
此判断条件也可展开写为:This judgment condition can also be expanded and written as:
如果(预测和匹配方式标识码的码值==0)则采用平面2维参考空间对当前CU进行编码或解码;If (the code value of the prediction and matching mode identification code = 0), the current CU is encoded or decoded by using a planar 2-dimensional reference space;
如果(预测和匹配方式标识码的码值==1)则采用平面2维参考空间对当前CU进行编码或解码;If (the code value of the prediction and matching mode identification code ==1), the current CU is encoded or decoded by using the planar 2-dimensional reference space;
如果(预测和匹配方式标识码的码值==2)则采用叠包1维参考空间对当前CU进行编码或解码。If (the code value of the prediction and matching mode identification code == 2), the current CU is encoded or decoded using the superimposed 1-dimensional reference space.
实施或变体例7 平面格式和2维数组空间之形式的参考像素样值存储空间的实施例Implementation or Variation Example 7 Reference Pixel Sample Storage Space in the Form of a Planar Format and a 2D Array Space
所述平面格式和2维数组空间之形式的参考像素样值存储空间由按照下列顺序放置的两帧图像的像素样值构成;The reference pixel sample storage space in the form of the planar format and the 2-dimensional array space is composed of pixel samples of two frames of images placed in the following order;
第L-1帧图像的第一行像素的Y分量,按从左到右的扫描顺序放置The Y component of the first row of pixels of the L-1 frame image is placed in the scanning order from left to right.
第L-1帧图像的第二行像素的Y分量,按从左到右的扫描顺序放置The Y component of the second row of pixels of the L-1 frame image is placed in the scanning order from left to right.
……………………………………..........................................
第L-1帧图像的最后行像素的Y分量,按从左到右的扫描顺序放置The Y component of the last row of pixels of the L-1 frame image is placed in the scanning order from left to right.
第L-1帧图像的第一行像素的U分量,按从左到右的扫描顺序放置The U component of the first row of pixels of the L-1 frame image is placed in the scanning order from left to right.
第L-1帧图像的第二行像素的U分量,按从左到右的扫描顺序放置The U component of the second row of pixels of the L-1 frame image is placed in the scanning order from left to right.
……………………………………..........................................
第L-1帧图像的最后行像素的U分量,按从左到右的扫描顺序放置The U component of the last row of pixels of the L-1 frame image is placed in the scanning order from left to right.
第L-1帧图像的第一行像素的V分量,按从左到右的扫描顺序放置The V component of the first row of pixels of the L-1 frame image is placed in the scanning order from left to right.
第L-1帧图像的第二行像素的V分量,按从左到右的扫描顺序放置The V component of the second row of pixels of the L-1 frame image is placed in the scanning order from left to right.
……………………………………..........................................
第L-1帧图像的最后行像素的V分量,按从左到右的扫描顺序放置The V component of the last row of pixels of the L-1 frame image is placed in the scanning order from left to right.
第L帧图像的第一行像素的Y分量,按从左到右的扫描顺序放置The Y component of the first row of pixels of the Lth frame image, placed in the scan order from left to right
第L帧图像的第二行像素的Y分量,按从左到右的扫描顺序放置The Y component of the second row of pixels of the Lth frame image is placed in the scanning order from left to right.
…………………………………… ..........................................
第L帧图像的最后行像素的Y分量,按从左到右的扫描顺序放置The Y component of the last row of pixels of the Lth frame image, placed in the scan order from left to right
第L帧图像的第一行像素的U分量,按从左到右的扫描顺序放置The U component of the first row of pixels of the Lth frame image is placed in the scanning order from left to right.
第L帧图像的第二行像素的U分量,按从左到右的扫描顺序放置The U component of the second row of pixels of the Lth frame image is placed in the scanning order from left to right.
……………………………………..........................................
第L帧图像的最后行像素的U分量,按从左到右的扫描顺序放置The U component of the last row of pixels of the Lth frame image, placed in the scan order from left to right
第L帧图像的第一行像素的V分量,按从左到右的扫描顺序放置The V component of the first row of pixels of the Lth frame image is placed in the scanning order from left to right.
第L帧图像的第二行像素的V分量,按从左到右的扫描顺序放置The V component of the second row of pixels of the Lth frame image is placed in the scanning order from left to right.
……………………………………..........................................
第L帧图像的最后行像素的V分量,按从左到右的扫描顺序放置The V component of the last row of pixels of the Lth frame image is placed in the scanning order from left to right.
以上第L帧图像是当前编码或解码中的那帧图像,而第L-1帧图像是第L帧图像之前(按照编码或解码顺序)的那帧图像。The above Lth frame image is the frame image in the current encoding or decoding, and the L-1 frame image is the frame image before the Lth frame image (in the encoding or decoding order).
实施或变体例8 叠包格式和1维数组空间之形式的参考像素样值存储空间的实施例Implementation or Variation Example 8 Example of a reference pixel sample storage space in the form of a stacked packet format and a 1-dimensional array space
所述叠包格式和1维数组空间之形式的参考像素样值存储空间由1帧图像的像素样值组成,所述1帧图像首先被划分成64x64个像素(叠包格式,有64x64x3个像素样值)的块,按照块的光栅扫描顺序给每个块一个序号,即最左上角的块的序号为1,序号为1的块之右边的块的序号为2,序号为2的块之右边的块的序号为3,依此类推,如果序号为X的块是最右边的块,其右边已经没有块,那么序号为X的块之直接下方最左边的块的序号为X+1,序号为X+1的块之右边的块的序号为X+2,序号为X+2的块之右边的块的序号为X+3,依此类推,所述1帧图像的所有的块就都有一个序号;然后,按照下列顺序放置和排列所有像素构成一个1维数组空间:The reference pixel sample storage space in the form of the stack format and the 1-dimensional array space is composed of pixel samples of 1 frame image, and the 1 frame image is first divided into 64×64 pixels (overlapping format, 64×64×3 pixels) The block of the sample) gives each block a sequence number according to the raster scan order of the block, that is, the sequence number of the block in the upper left corner is 1, the block number on the right side of the block numbered 1 is 2, and the block number 2 is The sequence number of the block on the right is 3, and so on. If the block with the sequence number X is the rightmost block and there is no block on the right side, the sequence of the leftmost block directly below the block with the sequence number X is X+1. The block on the right side of the block with the sequence number X+1 has the sequence number X+2, the block number on the right side of the block with the sequence number X+2 is X+3, and so on, all the blocks of the image of one frame are There is a sequence number; then, all pixels are placed and arranged in the following order to form a 1-dimensional array space:
序号为1的块的第1列像素,1列内从上到下按像素排列,一个像素内按Y、U、V排列The first column of the block of sequence number 1 is arranged in pixels from top to bottom in one column, and arranged in Y, U, and V in one pixel.
序号为1的块的第2列像素,1列内从上到下按像素排列,一个像素内按Y、U、V排列The second column of the block of sequence number 1 is arranged in pixels from top to bottom in one column, and arranged in Y, U, and V in one pixel.
……………………………………..........................................
序号为1的块的第64列像素,1列内从上到下按像素排列,一个像素内按Y、U、V排列The 64th column of the block of sequence number 1 is arranged in pixels from top to bottom in one column, and arranged in Y, U, and V in one pixel.
序号为2的块的第1列像素,1列内从上到下按像素排列,一个像素内按Y、U、V排列 The first column of the block of the number 2 is arranged in pixels from top to bottom in one column, and arranged in Y, U, and V in one pixel.
序号为2的块的第2列像素,1列内从上到下按像素排列,一个像素内按Y、U、V排列The second column of the block with the number 2 is arranged in pixels from top to bottom in one column, and arranged in Y, U, and V in one pixel.
……………………………………..........................................
序号为2的块的第64列像素,1列内从上到下按像素排列,一个像素内按Y、U、V排列The 64th column of the block with the number 2 is arranged in pixels from top to bottom in one column, and arranged in Y, U, and V in one pixel.
……………………………………..........................................
……………………………………..........................................
……………………………………..........................................
序号最大的块的第1列像素,1列内从上到下按像素排列,一个像素内按Y、U、V排列The first column of pixels of the largest block, the columns are arranged in pixels from top to bottom, and the pixels are arranged in Y, U, and V.
序号最大的块的第2列像素,1列内从上到下按像素排列,一个像素内按Y、U、V排列The second column of pixels with the largest serial number, arranged in pixels from top to bottom in one column, and arranged in Y, U, and V in one pixel.
……………………………………..........................................
序号最大的块的第64列像素,1列内从上到下按像素排列,一个像素内按Y、U、V排列。The 64th column pixel of the largest block of the largest number is arranged in pixels from top to bottom in one column, and is arranged in Y, U, and V in one pixel.
以上这个实施例中,块以行顺序排列而块内像素则以列扫描格式排列。将这个实施例中的行顺序改成其他顺序(如列顺序或深度为D的4分树顺序)或者列扫描格式改成其他扫描格式(如行扫描或zigzag扫描或Z扫描或深度为D的4分树扫描等格式),就可以得到更多的实施例。In the above embodiment, the blocks are arranged in a row order and the pixels in the block are arranged in a column scan format. Change the row order in this embodiment to another order (such as column order or 4-point tree order with depth D) or change the column scan format to other scan formats (such as line scan or zigzag scan or Z scan or depth D). More examples can be obtained by 4-tree scanning and other formats.
以上这个实施例中,块的大小是64x64个像素。改变块的大小,如改成32x32或16x16或8x8或8x4或4x8或4x4个像素,就可以得到更多的实施例。In the above embodiment, the size of the block is 64 x 64 pixels. More embodiments can be obtained by changing the size of the block, such as 32x32 or 16x16 or 8x8 or 8x4 or 4x8 or 4x4 pixels.
实施或变体例9 块内的像素首先分割成以深度为D的4分树顺序排列的子块的实施例Implementation or Variation Example 9 Embodiment in which pixels in a block are first divided into sub-blocks arranged in a 4-branch tree order of depth D
所述叠包格式和1维数组空间之形式的参考像素样值存储空间由1帧图像的像素样值组成,所述1帧图像首先被划分成64x64个像素(叠包格式,有64x64x3个像素样值)的块(简称为64x64块),按照块的光栅扫描顺序给每个块一个序号,即最左上角的块的序号为1,序号为1的块之右边的块的序号为2,序号为2的块之右边的 块的序号为3,依此类推,如果序号为X的块是最右边的块,其右边已经没有块,那么序号为X的块之直接下方最左边的块的序号为X+1,序号为X+1的块之右边的块的序号为X+2,序号为X+2的块之右边的块的序号为X+3,依此类推,所述1帧图像的所有的块就都有一个序号;然后,把一个64x64块按照4分树方法划分成不同深度的子块并给每个子块一个序号;划分方法如下:The reference pixel sample storage space in the form of the stack format and the 1-dimensional array space is composed of pixel samples of 1 frame image, and the 1 frame image is first divided into 64×64 pixels (overlapping format, 64×64×3 pixels) The block of the sample (abbreviated as 64x64 block) gives each block a sequence number according to the raster scan order of the block, that is, the sequence number of the block in the upper left corner is 1, and the block number on the right side of the block numbered 1 is 2. On the right side of the block numbered 2 The serial number of the block is 3, and so on. If the block with the sequence number X is the rightmost block and there is no block on the right side, the sequence of the leftmost block directly below the block with the sequence number X is X+1, and the serial number is The block of the right side of the block of X+1 has the serial number X+2, the block of the right side of the block of the sequence number X+2 has the serial number of X+3, and so on, all the blocks of the image of one frame have A sequence number; then, divide a 64x64 block into sub-blocks of different depths according to the 4-point tree method and give each sub-block a sequence number; the division method is as follows:
深度为1的划分是把64x64块分割成上下左右4个深度为1的32x32子块,左上、右上、左下、右下4个深度为1的子块的序号(称为深度1序号)分别为1,2,3,4,如图5所示;The division with depth 1 is to divide 64x64 blocks into 32x32 sub-blocks with up to the left and right and 4 depths, and the numbers of the sub-blocks with depth 1 being upper left, upper right, lower left, and lower right are called the depth 1 serial number. 1, 2, 3, 4, as shown in Figure 5;
深度为2的划分是把4个深度为1的子块再分别分割成上下左右4个深度为2的16x16子块,深度1序号为1的子块分割出来的左上、右上、左下、右下4个深度为2的子块的序号(称为深度2序号)分别为1,2,3,4,深度1序号为2的子块分割出来的左上、右上、左下、右下4个深度为2的子块的序号(称为深度2序号)分别为5,6,7,8,深度1序号为3的子块分割出来的左上、右上、左下、右下4个深度为2的子块的序号(称为深度2序号)分别为9,10,11,12,深度1序号为4的子块分割出来的左上、右上、左下、右下4个深度为2的子块的序号(称为深度2序号)分别为13,14,15,16,这样,深度为2的子块共有16个,如图6所示;The subdivision with depth of 2 is divided into four sub-blocks with a depth of 1 and divided into four 16x16 sub-blocks with a depth of 2, and the sub-blocks with a depth of 1 are divided into upper left, upper right, lower left, and lower right. The sub-blocks of four sub-blocks of depth 2 (called depth 2 numbers) are 1, 2, 3, 4, and the sub-blocks of depth 1 and number 2 are divided into upper left, upper right, lower left, and lower right. The sub-blocks of 2 are called 5, 6, 7, 8, and the sub-blocks of depth 1 and 3 are divided into upper sub-tops, upper right, lower left, and lower right sub-blocks of depth 2 The serial number (called the depth 2 serial number) is 9, 10, 11, 12, and the sub-blocks with the depth 1 and the number 4 are divided into the upper left, upper right, lower left, and lower right sub-blocks with a depth of 2 (called The depth 2 serial number is 13, 14, 15, 16 respectively, so that there are 16 sub-blocks with a depth of 2, as shown in FIG. 6;
深度为3的划分是把16个深度为2的子块再分别分割成上下左右4个深度为3的8x8子块,深度2序号为k(1≤k≤16)的子块分割出来的左上、右上、左下、右下4个深度为3的子块的序号(称为深度3序号)分别为4x(k-1)+1,4x(k-1)+2,4x(k-1)+3,4x(k-1)+4,这样,深度为3的子块共有64个,如图7所示;The subdivision with a depth of 3 is divided into 16 sub-blocks of depth 2 and divided into 8 x 8 sub-blocks of 3 depths and 3 depths, and the sub-blocks whose depth 2 is k (1 ≤ k ≤ 16) are divided into upper left. The upper, lower left, and lower right sub-blocks of depth 3 are called 4x(k-1)+1, 4x(k-1)+2, 4x(k-1). +3,4x(k-1)+4, so that there are 64 sub-blocks with a depth of 3, as shown in Figure 7;
深度为4的划分是把64个深度为3的子块再分别分割成上下左右4个深度为4的4x4子块,深度3序号为k(1≤k≤64)的子块分割出来的左上、右上、左下、右下4个深度为4的子块的序号(称为深度4序号)分别为4x(k-1)+1,4x(k-1)+2,4x(k-1)+3,4x(k-1)+4,这样,深度为4的子块共有256个,如图8所示;The partition with a depth of 4 is divided into 64 sub-blocks with a depth of 3 and divided into 4 x 4 sub-blocks with 4 depths up and down, and a sub-block whose depth 3 is k (1 ≤ k ≤ 64). The upper, lower left, and lower right sub-blocks of depth 4 (called depth 4 numbers) are 4x(k-1)+1, 4x(k-1)+2, 4x(k-1), respectively. +3,4x(k-1)+4, so that there are 256 sub-blocks with a depth of 4, as shown in Figure 8;
最后,选定一个深度D(D=1或2或3或4),按照下列顺序放置和排列所有像素构成一个1维数组空间:Finally, select a depth D (D=1 or 2 or 3 or 4) and place and arrange all the pixels in the following order to form a 1-dimensional array space:
深度D序号为1的子块的第1列像素,1列内像素样值按一个预定顺序排列The first column of the sub-block of depth D is number 1, and the pixel values in one column are arranged in a predetermined order.
深度D序号为1的子块的第2列像素,1列内像素样值按一个预定顺序排列The second column of the sub-block of depth D is number 1, and the pixel values in one column are arranged in a predetermined order.
……………………………………..........................................
深度D序号为1的子块的最后列像素,1列内像素样值按一个预定顺序排列The last column of the sub-block with the depth D number is 1, and the pixel values in the 1 column are arranged in a predetermined order.
深度D序号为2的子块的第1列像素,1列内像素样值按一个预定顺序排列 The first column of the sub-block of depth D is number 2, and the pixel values in one column are arranged in a predetermined order.
深度D序号为2的子块的第2列像素,1列内像素样值按一个预定顺序排列The second column of the sub-block of depth D is number 2, and the pixel values in one column are arranged in a predetermined order.
……………………………………..........................................
深度D序号为2的子块的最后列像素,1列内像素样值按一个预定顺序排列The last column of the sub-block whose depth D is number 2, and the pixel values in the 1 column are arranged in a predetermined order.
……………………………………..........................................
……………………………………..........................................
……………………………………..........................................
深度D序号最大的子块的第1列像素,1列内像素样值按一个预定顺序排列The first column of pixels of the sub-block with the largest depth D number, and the pixel values in one column are arranged in a predetermined order
深度D序号最大的子块的第2列像素,1列内像素样值按一个预定顺序排列The second column of the sub-block with the largest depth D number, the pixel values in one column are arranged in a predetermined order
……………………………………..........................................
深度D序号最大的子块的最后列像素,1列内像素样值按一个预定顺序排列。The last column pixel of the sub-block with the largest depth D number, and the pixel values in one column are arranged in a predetermined order.
以上这个实施例中,块的大小是64x64个像素。改变块的大小,如改成32x32或16x16或8x8或8x4或4x8或4x4个像素,就可以得到更多的实施例。In the above embodiment, the size of the block is 64 x 64 pixels. More embodiments can be obtained by changing the size of the block, such as 32x32 or 16x16 or 8x8 or 8x4 or 4x8 or 4x4 pixels.
实施或变体例10Implementation or variant 10
所述编解码方法或装置中的所述分析与评估编解码子区域和/或邻近区域的的特性以选择和确定所述编解码子区域的编解码方式及其对应的参考像素样值存储空间的操作至少包括下列之一或其组合:The analyzing and evaluating the characteristics of the codec sub-region and/or the neighboring region in the codec method or device to select and determine a codec mode of the codec sub-region and a corresponding reference pixel sample storage space thereof The operation includes at least one of the following or a combination thereof:
1)根据编解码子区域的位置来选择和确定编解码方式及其对应的参考像素样值存储空间;1) selecting and determining a codec mode and a corresponding reference pixel sample storage space according to the location of the codec sub-region;
2)根据编解码子区域的参考像素的位置来选择和确定编解码方式及其对应的参考像素样值存储空间;2) selecting and determining a codec mode and a corresponding reference pixel sample storage space according to the position of the reference pixel of the codec sub-region;
3)根据编解码子区域和/或邻近区域的像素的颜色的特征量来选择和确定编解码方式及其对应的参考像素样值存储空间。3) Selecting and determining a codec mode and its corresponding reference pixel sample storage space according to the feature quantity of the color of the pixels of the codec sub-region and/or the neighboring region.
4)根据编解码子区域的像素和/或其参考像素的颜色的特征量来选择和确定编解码方式及其对应的参考像素样值存储空间。4) Selecting and determining the codec mode and its corresponding reference pixel sample storage space according to the feature quantity of the color of the coded sub-area and/or its reference pixel.
实施或变体例11 至少2种解码方式和至少2种参考像素样值存储空间的实施例1Implementation or Variation 11 Embodiment 1 of at least 2 decoding modes and at least 2 reference pixel sample storage spaces
所述解码方法或装置采用至少下列两种解码方式和分别对应的两种参考像素样 值存储空间:The decoding method or device adopts at least the following two decoding modes and two corresponding reference pixel samples respectively Value storage space:
1)像素串复制方式,对应的参考像素样值存储空间是当前解码CU外部但邻近的一部分的已重构像素样值组成的参考像素样值存储空间1;1) a pixel string copying mode, the corresponding reference pixel sample storage space is a reference pixel sample storage space 1 composed of reconstructed pixel samples of a part of the current decoding CU but adjacent to the CU;
2)索引复制方式,对应的参考像素样值存储空间是当前解码CU内部的部分或全部的已重构索引组成的参考像素样值存储空间2;2) index copy mode, the corresponding reference pixel sample storage space is the reference pixel sample storage space 2 composed of part or all of the reconstructed index of the current decoding CU;
解码一个子区域(像素串或索引串)时,如果当前解码像素的参考像素位于当前解码CU外部,则采用像素串复制方式,从参考像素样值存储空间1中复制参考像素的数值作为所述当前解码像素的预测值或重构值;如果当前解码像素的参考像素位于当前解码CU内部,则采用索引复制方式,从参考像素样值存储空间2中复制参考索引的数值作为所述当前解码像素的索引并从调色板中获取该索引对应的调色板颜色作为当前解码像素的预测值或重构值。When decoding a sub-area (a pixel string or an index string), if the reference pixel of the currently decoded pixel is located outside the current decoding CU, the value of the reference pixel is copied from the reference pixel sample storage space 1 by using the pixel string copying method. a predicted value or a reconstructed value of the currently decoded pixel; if the reference pixel of the currently decoded pixel is located inside the currently decoded CU, the value of the reference index is copied from the reference pixel sample storage space 2 as the current decoded pixel by using an index copy manner Index and get the palette color corresponding to the index from the palette as the predicted or reconstructed value of the currently decoded pixel.
实施或变体例12 至少2种解码方式和至少2种参考像素样值存储空间的实施例2Implementation or Variation Example 12 Embodiment 2 of at least 2 decoding modes and at least 2 reference pixel sample storage spaces
实施或变体例11中的参考像素样值存储空间1采用非索引色彩格式的像素色彩格式;实施或变体例11中的参考像素样值存储空间2采用索引色彩格式的像素色彩格式The reference pixel sample storage space 1 in the implementation or variant 11 adopts a pixel color format of a non-index color format; the reference pixel sample storage space 2 in the implementation or variant 11 adopts a pixel color format of an index color format.
实施或变体例13 至少2种解码方式和至少2种参考像素样值存储空间的实施例3Implementation or Variation Example 13 Embodiment 3 of at least 2 decoding modes and at least 2 reference pixel sample storage spaces
所述解码方法或装置采用至少下列两种解码方式和分别对应的两种参考像素样值存储空间:The decoding method or apparatus adopts at least the following two decoding modes and two corresponding reference pixel sample storage spaces:
1)像素串复制方式,对应的参考像素样值存储空间是当前解码CU外部但邻近的一部分的已重构像素样值组成的参考像素样值存储空间1;1) a pixel string copying mode, the corresponding reference pixel sample storage space is a reference pixel sample storage space 1 composed of reconstructed pixel samples of a part of the current decoding CU but adjacent to the CU;
2)索引复制方式,对应的参考像素样值存储空间是与当前解码CU关联的一个调色板,即当前解码CU的部分或全部像素可用所述调色板的索引来表示;2) an index copy mode, the corresponding reference pixel sample storage space is a palette associated with the currently decoded CU, that is, part or all of the pixels of the currently decoded CU may be represented by an index of the palette;
解码一个子区域(像素串或索引串)时,如果当前解码像素的参考像素的位置在当前解码CU之外,则采用像素串复制方式,从参考像素样值存储空间1中复制参考像素的数值作为所述当前解码像素的预测值或重构值;如果当前解码像素的参考像素的位置在当前解码CU之内,则采用索引复制方式,首先解码得到参考索引,然后从调色板中获取该索引对应的调色板颜色作为当前解码像素的预测值或重构值。 When decoding a sub-area (a pixel string or an index string), if the position of the reference pixel of the currently decoded pixel is outside the currently decoded CU, the value of the reference pixel is copied from the reference pixel sample storage space 1 by the pixel string copy method. As the predicted value or the reconstructed value of the current decoded pixel; if the position of the reference pixel of the currently decoded pixel is within the currently decoded CU, the index copy mode is adopted, the reference index is first decoded, and then the target is obtained from the palette. The palette color corresponding to the index is used as a predicted value or a reconstructed value of the currently decoded pixel.
实施或变体例14 至少2种解码方式和至少2种参考像素样值存储空间的实施例4Implementation or Variation Example 14 Embodiment 4 of at least 2 decoding modes and at least 2 reference pixel sample storage spaces
实施或变体例13中的参考像素样值存储空间1采用非索引色彩格式的像素色彩格式;实施或变体例13中的由调色板组成的参考像素样值存储空间采用索引色彩格式的像素色彩格式。The reference pixel sample storage space 1 in the implementation or variant example 13 adopts the pixel color format of the non-index color format; the reference pixel sample storage space composed of the palette in the implementation or variant example 13 adopts the pixel color of the index color format. format.
附图说明DRAWINGS
图1是本发明的编码装置的模块组成示意图1 is a block diagram showing the composition of an encoding apparatus of the present invention.
图2是本发明的解码装置的模块组成示意图2 is a block diagram showing the composition of a decoding apparatus of the present invention.
图3是4种编码方式和2个不同形式的参考像素样值存储空间的实施例3 is an embodiment of four coding modes and two different forms of reference pixel sample storage spaces
图4是4种解码方式和2个不同形式的参考像素样值存储空间的实施例4 is an embodiment of four decoding modes and two different forms of reference pixel sample storage spaces.
图5是深度为1的子块和各子块的深度1序号Figure 5 is a sub-block of depth 1 and a depth 1 number of each sub-block
图6是深度为2的子块和各子块的深度2序号Figure 6 is a sub-block of depth 2 and a depth 2 number of each sub-block
图7是深度为3的子块和各子块的深度3序号Figure 7 is a sub-block of depth 3 and a depth 3 number of each sub-block
图8是深度为4的子块和各子块的深度4序号 Figure 8 is a sub-block of depth 4 and a depth 4 number of each sub-block

Claims (10)

  1. 一种图像编码方法或装置,其特征在于,至少包括完成下列功能和操作的步骤或模块的至少之一:An image encoding method or apparatus, comprising at least one of the steps or modules that perform the following functions and operations:
    1)分析和评估编码子区域和/或邻近区域的特性,根据分析和评估的结果,依据预定的评估准则,选择和确定所述编码子区域的编码方式;1) analyzing and evaluating the characteristics of the coding sub-area and/or the adjacent area, and selecting and determining the coding mode of the coding sub-area according to a predetermined evaluation criterion according to the result of the analysis and evaluation;
    2)使用所述编码方式对应的参考像素样值存储空间对所述编码子区域进行编码,并将编码结果写入视频码流;视频码流中至少包括在解码方法和装置中确定对应的解码方式与参考像素样值存储空间所需要的部分或全部信息。2) encoding the coding sub-area by using a reference pixel sample storage space corresponding to the coding mode, and writing the coding result to the video code stream; the video code stream includes at least decoding corresponding decoding in the decoding method and the device. Some or all of the information required by the way and reference pixel sample storage space.
  2. 一种图像解码方法或装置,其特征在于,至少包括完成下列功能和操作的步骤或模块的至少之一:An image decoding method or apparatus, comprising at least one of the steps or modules for performing the following functions and operations:
    1)解析视频码流和/或分析与评估解码子区域和/或邻近区域的特性,根据解析、分析和评估的结果,选择和确定所述解码子区域的解码方式;1) parsing the video code stream and/or analyzing and evaluating the characteristics of the decoded sub-area and/or the neighboring area, and selecting and determining the decoding mode of the decoding sub-area according to the results of parsing, analyzing and evaluating;
    2)使用所述解码方式及其对应的参考像素样值存储空间对所述解码子区域进行解码,产生重构像素。2) Decoding the decoded sub-area using the decoding mode and its corresponding reference pixel sample storage space to generate a reconstructed pixel.
  3. 根据权利要求1所述的编码方法或装置或根据权利要求2所述的解码方法或装置,其特征在于:The encoding method or apparatus according to claim 1 or the decoding method or apparatus according to claim 2, characterized in that:
    所述编码子区域或解码子区域是图像的一个编码区域或一个解码区域,包括以下至少一种:最大编码单元LCU、编码树单元CTU、编码单元CU、CU的子区域、预测单元PU、变换单元TU、宏块、微块、矩形、线条、像素段、像素串、索引段、索引串。The coding sub-region or the decoding sub-region is one coding region or one decoding region of an image, and includes at least one of: a maximum coding unit LCU, a coding tree unit CTU, a coding unit CU, a sub-region of a CU, a prediction unit PU, a transform Unit TU, macroblock, microblock, rectangle, line, pixel segment, pixel string, index segment, index string.
  4. 根据权利要求1所述的编码装置,其特征在于至少包括下列模块之一:The encoding device according to claim 1, characterized in that it comprises at least one of the following modules:
    预测和匹配编码模块,配置成为使用不同编码方式的多个编码处理单元,其中,所述编码处理单元配置成为使用帧内预测编码、帧间预测编码或多种不同匹配编码方式之一对数据进行处理;The prediction and matching coding module is configured to be a plurality of coding processing units using different coding modes, wherein the coding processing unit is configured to perform data using one of intra prediction coding, inter prediction coding, or a plurality of different matching coding modes. deal with;
    编码存储模块,配置成为存储不同形式的重构像素样值数据的多个存储单元;An encoding storage module configured to store a plurality of storage units of different forms of reconstructed pixel sample data;
    编码数据控制模块,配置成为控制所述预测和匹配编码模块读取预先设定的所述编码存储模块中对应的一个或多个存储单元的数据;根据所述读入数据,控制所 述预测和匹配编码模块将待编码数据移交对应编码处理单元;控制所述预测和匹配编码模块将所述编码处理单元的输出数据写入预先设定的所述编码存储模块中一个或多个存储单元。The coded data control module is configured to control the prediction and matching coding module to read data of a corresponding one or more storage units in the code storage module that is preset; according to the read data, the control The prediction and matching encoding module hands over the data to be encoded to the corresponding encoding processing unit; and controls the prediction and matching encoding module to write the output data of the encoding processing unit to one or more of the preset encoding storage modules. unit.
  5. 根据权利要求1所述的编码装置,其特征在于至少由以下模块的部分或全部组成;The encoding device according to claim 1, characterized in that it is composed of at least part or all of the following modules;
    模块1)预测编码方式模块、匹配编码方式1模块、匹配编码方式2模块、……、匹配编码方式A-1模块:A是一个满足2≤A≤5的正整数;这A个编码方式模块分别使用预测(帧内预测或帧间预测或两者)编码方式、匹配编码方式1、匹配编码方式2、……、匹配编码方式A-1这A种编码方式对输入视频图像的一个输入编码单元中的一个当前编码子区域施行预测或匹配编码运算;Module 1) predictive coding mode module, matching coding mode 1 module, matching coding mode 2 module, ..., matching coding mode A-1 module: A is a positive integer satisfying 2 ≤ A ≤ 5; the A coding mode module One input coding of the input video image using the prediction (intra prediction or inter prediction or both) coding mode, the matching coding mode 1, the matching coding mode 2, ..., the matching coding mode A-1, respectively. Performing a prediction or matching encoding operation on a current coding sub-region in the cell;
    模块2)参考像素样值存储空间1模块、参考像素样值存储空间2模块、……、参考像素样值存储空间B模块:B是一个满足2≤B≤A≤5的正整数;这B个参考像素样值存储空间用独特的彼此不同的形式存储在编码过程中产生的重构像素样值历史数据,用作后续的编码和重构各种运算时需要的参考像素样值;这B个不同形式的参考像素样值存储空间可能有不同的空间大小来存储不同数量的历史数据,其中,存储历史数据最多的那一个称为主参考像素样值存储空间,而其他参考像素样值存储空间中的历史数据都是主参考像素样值存储空间的历史数据的子集,但有不同的表现形式并且可能处于不同程度的部分重构阶段;对应于这B个参考像素样值存储空间,所述预测编码方式模块、匹配编码方式1模块、匹配编码方式2模块、……、匹配编码方式A-1模块的A种编码方式也相应地划分归并成B类,与B个参考像素样值存储空间一一对应;在对所述当前编码子区域进行编码时,每种预测编码方式或匹配编码方式都根据其归类使用对应的那个参考像素样值存储空间进行预测编码或匹配编码;Module 2) reference pixel sample storage space 1 module, reference pixel sample storage space 2 module, ..., reference pixel sample storage space B module: B is a positive integer satisfying 2 ≤ B ≤ A ≤ 5; The reference pixel sample storage space stores the reconstructed pixel sample history data generated in the encoding process in a unique and different form, and is used as a reference pixel sample required for subsequent encoding and reconstruction of various operations; Different forms of reference pixel sample storage space may have different spatial sizes to store different amounts of historical data, wherein the one storing the most historical data is called the primary reference pixel sample storage space, and the other reference pixel sample storage is. The historical data in the space is a subset of the historical data of the primary reference pixel sample storage space, but has different representations and may be in different degrees of partial reconstruction; corresponding to the B reference pixel sample storage spaces, The prediction coding mode module, the matching coding mode 1 module, the matching coding mode 2 module, ..., the matching coding mode A-1 module A coding mode Correspondingly, the categorization is merged into the B class, and the B reference pixel sample storage spaces are in one-to-one correspondence; when the current coding sub-region is encoded, each of the prediction coding modes or the matching coding mode is used according to the classification. The reference pixel sample storage space is used for predictive coding or matching encoding;
    模块3)其余的各种常用技术编码和重构模块:对输入的各种参数和变量施行各种常用技术的编码和重构运算以及熵编码运算;Module 3) The remaining common techniques of coding and reconstruction modules: performing coding and reconstruction operations and entropy coding operations on various input parameters and variables;
    模块4)像素样值存储空间的形式转换模块:把B种参考像素样值存储空间的形式的一种形式转换成另一种形式。Module 4) Form Conversion Module for Pixel Sample Storage Space: Converts one form of the form of B reference pixel sample storage space into another form.
  6. 根据权利要求2所述的解码装置,其特征在于至少包括下列模块之一:A decoding apparatus according to claim 2, comprising at least one of the following modules:
    预测和复制解码模块,配置成为使用不同解码方式的多个解码处理单元,其中,所述解码处理单元配置成为使用帧内预测解码、帧间预测解码或多种不同复制 解码方式之一对数据进行处理;A prediction and copy decoding module configured to be a plurality of decoding processing units using different decoding modes, wherein the decoding processing unit is configured to use intra prediction decoding, inter prediction decoding, or multiple different replicas One of the decoding methods processes the data;
    解码存储模块,配置成为存储不同形式的重构像素样值数据的多个存储单元;Decoding the storage module, configured to store a plurality of storage units of different forms of reconstructed pixel sample data;
    解码数据控制模块,配置成为控制所述预测和复制解码模块读取预先设定的所述解码存储模块中对应的一个或多个存储单元的数据;根据所述读入数据,控制所述预测和复制解码模块将待解码数据移交对应解码处理单元;控制所述预测和复制解码模块将所述解码处理单元的输出数据写入预先设定的所述解码存储模块中一个或多个存储单元。a decoding data control module configured to control the prediction and copy decoding module to read data of a corresponding one or more storage units in the preset decoding storage module; and to control the prediction according to the read data The copy decoding module hands over the data to be decoded to the corresponding decoding processing unit; and controls the prediction and copy decoding module to write the output data of the decoding processing unit to one or more storage units in the preset decoding storage module.
  7. 根据权利要求2所述的解码装置,其特征在于至少包括下列模块之一:A decoding apparatus according to claim 2, comprising at least one of the following modules:
    模块1)码流数据解析与部分解码模块:对当前解码CU的含预测模式、运动矢量、匹配模式、匹配位置、未匹配样值的压缩数据以及所有其他语法元素压缩数据的视频码流施行熵解码,并解析出熵解码得到的各种数据的意义;Module 1) code stream data parsing and partial decoding module: entropy is performed on the video code stream of the currently decoded CU including the prediction mode, the motion vector, the matching mode, the matching position, the unmatched sample compressed data, and all other syntax element compressed data. Decoding, and parsing the meaning of various data obtained by entropy decoding;
    模块2)预测解码方式模块、匹配解码方式1模块、匹配解码方式2模块、……、匹配解码方式A-1模块:A是一个满足2≤A≤5的正整数;这A个解码方式模块分别使用预测(帧内预测或帧间预测或两者)解码方式、匹配解码方式1、匹配解码方式2、……、匹配解码方式A-1这A种解码方式对相对应的A种当前解码子区域施行预测或匹配解码运算;Module 2) prediction decoding mode module, matching decoding mode 1 module, matching decoding mode 2 module, ..., matching decoding mode A-1 module: A is a positive integer satisfying 2 ≤ A ≤ 5; the A decoding mode module Using the prediction (intra prediction or inter prediction or both) decoding mode, matching decoding mode 1, matching decoding mode 2, ..., matching decoding mode A-1, the A decoding mode respectively decodes the corresponding A type. The sub-area performs prediction or matching decoding operations;
    模块3)参考像素样值存储空间1模块、参考像素样值存储空间2模块、……、参考像素样值存储空间B模块:B是一个满足2≤B≤A≤5的正整数;这B个参考像素样值存储空间用独特的彼此不同的形式存储在解码过程中产生的重构像素样值历史数据;这B个不同形式的参考像素样值存储空间可能有不同的空间大小来存储不同数量的历史数据,其中,存储历史数据最多的那一个称为主参考像素样值存储空间,而其他参考像素样值存储空间中的历史数据都是主参考像素样值存储空间的历史数据的子集,但有不同的表现形式并且可能处于不同程度的部分重构阶段;对应于这B个参考像素样值存储空间,所述预测解码方式模块、匹配解码方式1模块、匹配解码方式2模块、……、匹配解码方式A-1模块的A种解码方式也相应地划分归并成B类,与B个参考像素样值存储空间一一对应;在对所述当前解码子区域进行解码时,每种预测解码方式或匹配解码方式都根据其归类使用对应的那个参考像素样值存储空间进行预测解码或匹配解码,每个参考像素样值存储空间为相对应的那一类解码方式的所有解码方式(可能有多种)提供参考像素样值量;Module 3) reference pixel sample storage space 1 module, reference pixel sample storage space 2 module, ..., reference pixel sample storage space B module: B is a positive integer satisfying 2 ≤ B ≤ A ≤ 5; The reference pixel sample storage spaces store the reconstructed pixel sample history data generated in the decoding process in unique mutually different forms; the B different forms of reference pixel sample storage spaces may have different space sizes to store different The historical data of the quantity, wherein the one storing the most historical data is referred to as the primary reference pixel sample storage space, and the historical data in the other reference pixel sample storage spaces is the child of the historical data of the primary reference pixel sample storage space Set, but different representations and may be in different degrees of partial reconstruction; corresponding to the B reference pixel sample storage spaces, the prediction decoding mode module, the matching decoding mode 1 module, the matching decoding mode 2 module, ..., the A decoding mode of the matching decoding mode A-1 module is also divided into B classes correspondingly, and the B reference pixel sample storage spaces are one by one. Should be; when decoding the current decoding sub-region, each prediction decoding mode or matching decoding mode performs prediction decoding or matching decoding according to the corresponding reference pixel sample storage space according to its classification, and each reference pixel sample The value storage space provides a reference pixel sample amount for all decoding modes (possibly multiple) of the corresponding decoding mode;
    模块4)其余的各种常用技术解码和重构模块:对所述当前解码子区域施行其余的 各种常用技术的解码和重构运算;Module 4) various other common techniques for decoding and reconstructing modules: performing the rest of the current decoding sub-region Decoding and reconstruction operations of various common techniques;
    模块5)像素样值存储空间的形式转换模块:把B种参考像素样值存储空间的形式的一种形式转换成另一种形式。Module 5) Form Conversion Module for Pixel Sample Storage Space: Converts one form of the form of B reference pixel sample storage space into another form.
  8. 根据权利要求1所述的编码方法或装置或权利要求2所述的解码方法或装置,其特征在于:The encoding method or apparatus according to claim 1 or the decoding method or apparatus according to claim 2, characterized in that:
    所述编解码方法或装置中的所述分析与评估编解码子区域和/或邻近区域的的特性以选择和确定所述编解码子区域的编解码方式及其对应的参考像素样值存储空间的操作至少包括下列之一或其组合:The analyzing and evaluating the characteristics of the codec sub-region and/or the neighboring region in the codec method or device to select and determine a codec mode of the codec sub-region and a corresponding reference pixel sample storage space thereof The operation includes at least one of the following or a combination thereof:
    1)根据编解码子区域的位置来选择和确定编解码方式及其对应的参考像素样值存储空间1) selecting and determining the codec mode and its corresponding reference pixel sample storage space according to the position of the codec sub-region
    2)根据编解码子区域的参考像素的位置来选择和确定编解码方式及其对应的参考像素样值存储空间;2) selecting and determining a codec mode and a corresponding reference pixel sample storage space according to the position of the reference pixel of the codec sub-region;
    3)根据编解码子区域和/或邻近区域的像素的颜色的特征量来选择和确定编解码方式及其对应的参考像素样值存储空间;3) selecting and determining a codec mode and a corresponding reference pixel sample storage space according to a feature quantity of a color of a pixel of the codec sub-region and/or the neighboring region;
    4)根据编解码子区域的像素和/或其参考像素的颜色的特征量来选择和确定编解码方式及其对应的参考像素样值存储空间。4) Selecting and determining the codec mode and its corresponding reference pixel sample storage space according to the feature quantity of the color of the coded sub-area and/or its reference pixel.
  9. 根据权利要求2所述的解码方法或装置,其特征在于:A decoding method or apparatus according to claim 2, wherein:
    所述解码方法或装置采用至少下列两种解码方式和分别对应的两种参考像素样值存储空间:The decoding method or apparatus adopts at least the following two decoding modes and two corresponding reference pixel sample storage spaces:
    1)像素串复制方式,对应的参考像素样值存储空间是当前解码CU外部但邻近的一部分的已重构像素样值组成的参考像素样值存储空间1;1) a pixel string copying mode, the corresponding reference pixel sample storage space is a reference pixel sample storage space 1 composed of reconstructed pixel samples of a part of the current decoding CU but adjacent to the CU;
    2)索引复制方式,对应的参考像素样值存储空间是当前解码CU内部的部分或全部的已重构索引组成的参考像素样值存储空间2;2) index copy mode, the corresponding reference pixel sample storage space is the reference pixel sample storage space 2 composed of part or all of the reconstructed index of the current decoding CU;
    解码一个子区域时,如果当前解码像素的参考像素位于当前解码CU外部,则采用像素串复制方式,从参考像素样值存储空间1中复制参考像素的数值作为所述当前解码像素的预测值或重构值;如果当前解码像素的参考像素位于当前解码CU内部,则采用索引复制方式,从参考像素样值存储空间2中复制参考索引的数值作为所述当前解码像素的索引并从调色板中获取该索引对应的调色板颜色作为当前解码像素的预测值或重构值。 When decoding a sub-area, if the reference pixel of the currently decoded pixel is located outside the current decoding CU, the value of the reference pixel is copied from the reference pixel sample storage space 1 as the predicted value of the currently decoded pixel or in a pixel string copy manner. Reconstructing the value; if the reference pixel of the currently decoded pixel is located inside the current decoding CU, copying the value of the reference index from the reference pixel sample storage space 2 as the index of the currently decoded pixel and from the palette The palette color corresponding to the index is obtained as a predicted value or a reconstructed value of the currently decoded pixel.
  10. 根据权利要求2所述的解码方法或装置,其特征在于:A decoding method or apparatus according to claim 2, wherein:
    所述解码方法或装置采用至少下列两种解码方式和分别对应的两种参考像素样值存储空间:The decoding method or apparatus adopts at least the following two decoding modes and two corresponding reference pixel sample storage spaces:
    1)像素串复制方式,对应的参考像素样值存储空间是当前解码CU外部但邻近的一部分的已重构像素样值组成的参考像素样值存储空间1;1) a pixel string copying mode, the corresponding reference pixel sample storage space is a reference pixel sample storage space 1 composed of reconstructed pixel samples of a part of the current decoding CU but adjacent to the CU;
    2)索引复制方式,对应的参考像素样值存储空间是与当前解码CU关联的一个调色板,即当前解码CU的部分或全部像素可用所述调色板的索引来表示;2) an index copy mode, the corresponding reference pixel sample storage space is a palette associated with the currently decoded CU, that is, part or all of the pixels of the currently decoded CU may be represented by an index of the palette;
    解码一个子区域时,如果当前解码像素的参考像素的位置在当前解码CU之外,则采用像素串复制方式,从参考像素样值存储空间1中复制参考像素的数值作为所述当前解码像素的预测值或重构值;如果当前解码像素的参考像素的位置在当前解码CU之内,则采用索引复制方式,首先解码得到参考索引,然后从调色板中获取该索引对应的调色板颜色作为当前解码像素的预测值或重构值。 When decoding a sub-area, if the position of the reference pixel of the currently decoded pixel is outside the currently decoded CU, the value of the reference pixel is copied from the reference pixel sample storage space 1 as the current decoded pixel by using a pixel string copy mode. Predicted value or reconstructed value; if the position of the reference pixel of the currently decoded pixel is within the currently decoded CU, the index copy mode is adopted, the reference index is first decoded, and then the palette color corresponding to the index is obtained from the palette. As the predicted or reconstructed value of the currently decoded pixel.
PCT/CN2015/073204 2014-02-16 2015-02-16 Image compression method and device using reference pixel storage space in multiple forms WO2015120823A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410051372.7 2014-02-16
CN201410051372 2014-02-16

Publications (1)

Publication Number Publication Date
WO2015120823A1 true WO2015120823A1 (en) 2015-08-20

Family

ID=53799612

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/073204 WO2015120823A1 (en) 2014-02-16 2015-02-16 Image compression method and device using reference pixel storage space in multiple forms

Country Status (2)

Country Link
CN (1) CN104853211A (en)
WO (1) WO2015120823A1 (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107483942A (en) * 2016-06-08 2017-12-15 同济大学 The decoding of video data compression code stream, the coding method of video data and device
CN107770553A (en) * 2016-08-21 2018-03-06 上海天荷电子信息有限公司 Using the data compression method and device of multiclass match parameter and parameter storage address
CN109995573A (en) * 2018-01-02 2019-07-09 中国移动通信有限公司研究院 Determine method, the computational resource allocation method and device for predicting the sample space of computing resource
CN110662029A (en) * 2018-06-30 2020-01-07 上海天荷电子信息有限公司 Data compression method and device for dynamically and adaptively limiting value range
CN110944178A (en) * 2018-09-22 2020-03-31 上海天荷电子信息有限公司 Data compression method and apparatus using multiple candidate sets associated with coding parameters
CN111034202A (en) * 2017-07-05 2020-04-17 奥兰治 Image encoding and decoding method, encoding and decoding device and corresponding computer program
CN111866512A (en) * 2020-07-29 2020-10-30 腾讯科技(深圳)有限公司 Video decoding method, video encoding method, video decoding apparatus, video encoding apparatus, and storage medium
CN112383781A (en) * 2013-08-16 2021-02-19 上海天荷电子信息有限公司 Block matching coding and decoding method and device for determining reconstruction stage of reference block according to position of reference block
CN115119046A (en) * 2022-06-02 2022-09-27 绍兴市北大信息技术科创中心 Image coding and decoding method, device and system with reference to pixel set

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107770543B (en) * 2016-08-21 2023-11-10 上海天荷电子信息有限公司 Data compression method and device for sequentially increasing cutoff values in multiple types of matching parameters
CN107770540B (en) * 2016-08-21 2024-01-09 上海天荷电子信息有限公司 Data compression method and device for fusing multiple primitives with different reference relations
CN114501020A (en) * 2016-08-21 2022-05-13 上海天荷电子信息有限公司 Image compression method and apparatus using nearest motion vector and neighboring motion vector
CN107770544B (en) * 2016-08-21 2023-12-08 上海天荷电子信息有限公司 Data compression method and device adopting multiple types of matching parameters and pre-parameter buffer areas
CN108235007B (en) * 2016-12-12 2023-06-27 上海天荷电子信息有限公司 Data compression method and device for each mode using different precision and same coding parameter
CN108184113B (en) * 2017-12-05 2021-12-03 上海大学 Image compression coding method and system based on inter-image reference
CN113678448A (en) * 2019-04-09 2021-11-19 北京字节跳动网络技术有限公司 Entry structure for palette mode encoding and decoding
JP7359936B2 (en) 2019-07-20 2023-10-11 北京字節跳動網絡技術有限公司 Conditional Encoding of Instructions for Use of Palette Mode
CN112532988B (en) * 2020-06-02 2022-05-06 腾讯科技(深圳)有限公司 Video encoding method, video decoding method and related equipment
CN114466186A (en) * 2020-06-02 2022-05-10 腾讯科技(深圳)有限公司 Video encoding method, video decoding method and related equipment
CN113395515B (en) * 2021-04-08 2022-06-14 同济大学 Coding and decoding method and device for point prediction of component down-sampling format data
CN113808225B (en) * 2021-09-27 2023-09-19 东华理工大学南昌校区 Lossless coding method for image

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009212790A (en) * 2008-03-04 2009-09-17 Mitsubishi Electric Corp Prediction mode selecting apparatus and image coder
US20110110424A1 (en) * 2009-11-12 2011-05-12 Hitachi Kokusai Electric Inc. Video Encoder and Data Processing Method
CN102497546A (en) * 2011-11-28 2012-06-13 同济大学 Screen image compression device and compression method thereof
CN102761738A (en) * 2011-12-05 2012-10-31 上海天荷电子信息有限公司 Image compression method and device on basis of mixed chromaticity sampling rate
CN104244007A (en) * 2013-06-13 2014-12-24 上海天荷电子信息有限公司 Image compression method and device based on arbitrary shape matching

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012142865A (en) * 2011-01-05 2012-07-26 Sony Corp Image processing apparatus and image processing method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009212790A (en) * 2008-03-04 2009-09-17 Mitsubishi Electric Corp Prediction mode selecting apparatus and image coder
US20110110424A1 (en) * 2009-11-12 2011-05-12 Hitachi Kokusai Electric Inc. Video Encoder and Data Processing Method
CN102497546A (en) * 2011-11-28 2012-06-13 同济大学 Screen image compression device and compression method thereof
CN102761738A (en) * 2011-12-05 2012-10-31 上海天荷电子信息有限公司 Image compression method and device on basis of mixed chromaticity sampling rate
CN104244007A (en) * 2013-06-13 2014-12-24 上海天荷电子信息有限公司 Image compression method and device based on arbitrary shape matching

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112383781B (en) * 2013-08-16 2023-05-02 上海天荷电子信息有限公司 Method and device for block matching coding and decoding in reconstruction stage by determining position of reference block
CN112383781A (en) * 2013-08-16 2021-02-19 上海天荷电子信息有限公司 Block matching coding and decoding method and device for determining reconstruction stage of reference block according to position of reference block
CN107483942A (en) * 2016-06-08 2017-12-15 同济大学 The decoding of video data compression code stream, the coding method of video data and device
CN107483942B (en) * 2016-06-08 2023-07-14 同济大学 Decoding method of video data compressed code stream, encoding method and device of video data
CN107770553A (en) * 2016-08-21 2018-03-06 上海天荷电子信息有限公司 Using the data compression method and device of multiclass match parameter and parameter storage address
CN107770553B (en) * 2016-08-21 2023-06-27 上海天荷电子信息有限公司 Data compression method and device adopting multiple types of matching parameters and parameter storage addresses
CN111034202B (en) * 2017-07-05 2023-08-22 奥兰治 Image encoding and decoding method, encoding and decoding device, and corresponding computer program
CN111034202A (en) * 2017-07-05 2020-04-17 奥兰治 Image encoding and decoding method, encoding and decoding device and corresponding computer program
CN109995573B (en) * 2018-01-02 2022-04-01 中国移动通信有限公司研究院 Method for determining sample space for predicting computing resource, computing resource allocation method and device
CN109995573A (en) * 2018-01-02 2019-07-09 中国移动通信有限公司研究院 Determine method, the computational resource allocation method and device for predicting the sample space of computing resource
CN110662029A (en) * 2018-06-30 2020-01-07 上海天荷电子信息有限公司 Data compression method and device for dynamically and adaptively limiting value range
CN110944178B (en) * 2018-09-22 2023-03-07 上海天荷电子信息有限公司 Data compression encoding method and device, and data compression decoding method and device
CN110944178A (en) * 2018-09-22 2020-03-31 上海天荷电子信息有限公司 Data compression method and apparatus using multiple candidate sets associated with coding parameters
CN111866512A (en) * 2020-07-29 2020-10-30 腾讯科技(深圳)有限公司 Video decoding method, video encoding method, video decoding apparatus, video encoding apparatus, and storage medium
CN115119046A (en) * 2022-06-02 2022-09-27 绍兴市北大信息技术科创中心 Image coding and decoding method, device and system with reference to pixel set
CN115119046B (en) * 2022-06-02 2024-04-16 绍兴市北大信息技术科创中心 Image coding and decoding method, device and system for reference pixel set

Also Published As

Publication number Publication date
CN104853211A (en) 2015-08-19

Similar Documents

Publication Publication Date Title
WO2015120823A1 (en) Image compression method and device using reference pixel storage space in multiple forms
CN104378644B (en) Image compression method and device for fixed-width variable-length pixel sample string matching enhancement
WO2015120818A1 (en) Picture coding and decoding methods and devices
US10341651B2 (en) Image coding method, decoding method, coding device and decoding device
US11451835B2 (en) Method and device for entropy coding and decoding using mapping of matching relationship parameters
CN105491376B (en) Image coding and decoding method and device
CN104754362B (en) Image compression method using fine-divided block matching
EP3310059B1 (en) Image encoding and decoding method, image processing device, and computer storage medium
US11653019B2 (en) Image coding and decoding methods, image processing device and computer storage medium
JP6794364B2 (en) Image coding method and device and image decoding method and device
CN105992003B (en) Image compression method and device for numbering palette colors according to ordering or frequency
WO2016124154A1 (en) Image coding method and apparatus, and image decoding method and apparatus
EP3893191A1 (en) Method and device for image processing
WO2016119667A1 (en) Image processing method and apparatus

Legal Events

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

Ref document number: 15748501

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 26/01/2017)

122 Ep: pct application non-entry in european phase

Ref document number: 15748501

Country of ref document: EP

Kind code of ref document: A1