WO2016119666A1 - Image coding/decoding method and apparatus - Google Patents

Image coding/decoding method and apparatus Download PDF

Info

Publication number
WO2016119666A1
WO2016119666A1 PCT/CN2016/072039 CN2016072039W WO2016119666A1 WO 2016119666 A1 WO2016119666 A1 WO 2016119666A1 CN 2016072039 W CN2016072039 W CN 2016072039W WO 2016119666 A1 WO2016119666 A1 WO 2016119666A1
Authority
WO
WIPO (PCT)
Prior art keywords
pixel
predicted value
value
block
representative
Prior art date
Application number
PCT/CN2016/072039
Other languages
French (fr)
Chinese (zh)
Inventor
林涛
李明
尚国强
吴钊
Original Assignee
同济大学
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from CN201610045722.8A external-priority patent/CN105828080B/en
Application filed by 同济大学, 中兴通讯股份有限公司 filed Critical 同济大学
Priority to EP16742728.5A priority Critical patent/EP3253055A4/en
Priority to US15/551,945 priority patent/US10666971B2/en
Publication of WO2016119666A1 publication Critical patent/WO2016119666A1/en
Priority to US16/853,895 priority patent/US11082718B2/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • 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/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/132Sampling, masking or truncation of coding units, e.g. adaptive resampling, frame skipping, frame interpolation or high-frequency transform coefficient masking
    • 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
    • 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/56Motion estimation with initialisation of the vector search, e.g. estimating a good candidate to initiate a search

Definitions

  • the present invention relates to the field of image processing, and in particular to an image encoding and decoding method and apparatus.
  • HEVC High Efficiency Video Coding
  • 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. At any one time, the image of the frame being encoded is referred to as the current encoded image.
  • decoding a compressed video stream of a digital video signal (referred to as a bitstream, also referred to as a bitstream) is decoding a stream of one frame by one image.
  • the image of the frame being decoded is referred to as the current decoded image.
  • the current encoded image or the currently decoded image is collectively referred to as the current image.
  • coding block from a decoding perspective, that is, a decoding block, collectively referred to as a codec block
  • CU Coding Unit
  • encoding a video image sequence is to encode one CU for each coding unit of each frame image, that is, CU.
  • the CU being coded is referred to as the current coded CU.
  • decoding the code stream of a video image sequence is also decoding one CU for each CU of each frame image, and finally reconstructing the entire video image sequence.
  • the CU being decoded is referred to as the currently decoded CU.
  • the current coding CU or the current decoding CU is collectively referred to as the current CU.
  • 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 Multiple CUs of a tree structure that are not necessarily the same size. Therefore, the LCU is also referred to as a "Coding Tree Unit (CTU)".
  • 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.
  • LCU is synonymous with CTU.
  • the CU can also be further divided into sub-areas.
  • the sub-area includes, but is not limited to, a prediction unit (Picture Unit, abbreviated as PU), a transform unit (Transform Unit, TU for short), and an asymmetric division (Asymmetric Multi-Processing, AMP for short).
  • PU Picture Unit
  • TU transform Unit
  • AMP asymmetric Multi-Processing
  • a color pixel usually 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 YUV color consisting of a luma component and two chromaticity components.
  • the format commonly known as the YUV color format, actually includes multiple color formats, such as the YCbCr color format. Therefore, when encoding a CU, a CU 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 component bundles of one pixel are combined into one 3-tuple, and the CUs 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 CU), and the arrangement of the latter pixel and its components is called the stacked format of the image (and its CU). Format).
  • the GBR color format and the YUV color format of the pixel are both 3-component representation formats of the pixel.
  • the value of a pixel can also be 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 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 format of a pixel is to represent this pixel with an index.
  • the index representation format of a pixel is also referred to as an indexed color or a pseudo color representation format of a pixel in the prior art, or is often referred to directly as an indexed pixel or a pseudo pixel (pseudo pixel). ) or pixel index or index. Indexes are sometimes referred to as indices.
  • the representation of a pixel in its index representation format is also referred to as indexing or indexing.
  • CMYK presentation formats Other commonly used prior art pixel representation formats include CMYK presentation formats and grayscale representation formats.
  • 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.
  • the most basic element when encoding or decoding can be one pixel, one pixel component, or one pixel index (ie, index pixel).
  • a pixel or a pixel component or an index pixel, which is the most basic element of encoding or decoding, is collectively referred to as a pixel sample, sometimes referred to as a pixel value, or simply as a sample.
  • pixel sample In the present patent application, "pixel sample”, “pixel value”, “sample value”, “index pixel”, “pixel index” are synonyms, depending on the context, whether it is clear whether “pixel” or “one pixel” The “component” still means “index pixel” or both. If it is not clear from the context, then it means either of the three.
  • a coded block or a decoded block is an area composed of a number of pixel values.
  • the shape of the codec block may be a rectangle, a square, a parallelogram, a trapezoid, a polygon, a circle, an ellipse, a string, and the like.
  • a rectangle also includes a rectangle whose width or height is one pixel value that degenerates into a line (ie, a line segment or a line shape).
  • each codec block may have a different shape and size.
  • some or all of the codec blocks may overlap each other, or all codec blocks may not overlap each other.
  • a codec block may be composed of "pixels”, or may be composed of “components of pixels”, or may be composed of "index pixels”, or may be composed of a mixture of the three, or any of the three. Mixed composition.
  • a codec block refers to an area in which encoding or decoding is performed in a frame image, including but not limited to at least one of the following: a maximum coding unit LCU, a coding tree unit CTU, and a coding unit CU. a sub-region of the CU, a prediction unit PU, a transform unit TU, a series of pixels, and a set of pixels.
  • Video image compression techniques in the related art include: prediction modes (including but not limited to intra prediction and inter prediction) and copying modes (including but not limited to block copying, index copying, microblock copying, strip copying, string copying, and rectangles). Copy, point copy).
  • prediction modes including but not limited to intra prediction and inter prediction
  • copying modes including but not limited to block copying, index copying, microblock copying, strip copying, string copying, and rectangles. Copy, point copy).
  • copy is the optimal matching pixel that the copy encoder searches for. Therefore, from the perspective of the encoder, the copy mode is also called the matching mode (including but not limited to block matching, index matching, microblock matching, bar matching, string matching, rectangle matching, point matching).
  • An important feature of the prediction mode and the copy mode is to copy reconstructed pixel samples (including fully reconstructed pixels) from image regions (including directly adjacent and indirectly adjacent) outside the current codec block (referred to as the current block).
  • Samples and/or different degrees of partially reconstructed pixel samples referred to as predicted values (also referred to as reference values) of pixel samples (referred to as current pixel samples) in the current encoding or decoding, which are to be predicted The value is assigned to the current pixel sample as the reconstructed pixel sample of the current pixel sample.
  • the predicted value is obtained from the reconstructed pixel samples of the image region outside the current block, and has no direct relationship with the pixel samples of the current block, and thus the positions of the reconstructed pixels exist.
  • the present invention provides an image encoding and decoding method and apparatus, to at least solve the problem that the positions of the reconstructed pixels obtained by obtaining the predicted values in the related art are far from the current block, and the correlation between each other is small, and the compression efficiency is small. Low problem.
  • an image encoding method including:
  • a predicted value of the pixel sample in the coding block where the predicted value is generated by: reconstructing a pixel sample value of the image region other than the coded block and a pixel value of the representative pixel set, The predicted value of the pixel sample;
  • the information required to construct the representative set of pixels and the information required to construct the predicted values are encoded and written to the video stream.
  • the coding block is an coding region of an image, including 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 transformation unit TU, pixel string, pixel group, pixel microblock, pixel strip;
  • the image area other than the coded block includes at least one of: an image area other than the variant of the coded block; an image area formed by the partially coded pixels.
  • the manner in which the predicted value is generated includes one of the following:
  • the predicted value is set to a pixel value of the representative pixel set or a pixel value variant of the representative pixel set.
  • the predictive value of the pixel samples in the encoded block is constructed using at least one of the following predefined encoding parameters, including:
  • a type of a pixel component of the coding block wherein one pixel component or two of the pixel components of the pixel component select a pixel value of the representative pixel set as a predicted value, the pixel component except the one pixel component Or other pixel components other than the two pixel components, and selecting a pixel value of the reconstructed pixel sample as a predicted value;
  • the manner in which the predicted value is generated includes:
  • the predicted value is set to a value of the optimal representative pixel sample, if The second predefined condition is not met, the pre- The measured value is set to the value of the reconstructed pixel sample.
  • the distance is an error between pixels
  • the first predefined condition is that the error is minimal
  • the second predefined condition is that the error is less than a first predetermined threshold
  • setting the predicted value to the optimal representative pixel sample or the reconstructed pixel sample further includes:
  • a condition parameter constructing the predicted value is written in the video code stream, wherein a pixel sample value satisfying the condition parameter is used as the predicted value.
  • writing a flag indicating the predicted value in the video code stream comprises at least one of the following:
  • a flag bit for identifying a prediction value selected for the entire sequence into a parameter set of at least one of: a video parameter set VPS, a sequence parameter set SPS, and an image parameter set PPS;
  • a flag bit for identifying a prediction value selected for the block layer is written to the maximum coding unit LCU and/or the coding unit CU.
  • condition parameter constructing the predicted value is written in the video code stream, including at least one of the following:
  • the predetermined condition parameters for the block layer are written to the maximum coding unit LCU layer and/or the coding unit CU layer.
  • the position of the reconstructed pixel sample outside the encoded block in the image is divided into rows and/or columns adjacent to the encoded block;
  • the predicted value is set to a value of the reconstructed pixel sample if the reconstructed pixel sample is located outside of a row and/or column adjacent to the encoded block.
  • the method includes:
  • the flag of the predicted value is directly obtainable from the video code stream or derived from existing parameters in the video code stream;
  • the flag of the predicted value is used to indicate that one of the values of the representative pixel samples of the representative pixel set and the reconstructed pixel samples of the coded block are selected as the current encoding in the encoding process.
  • the flag bit includes one of the following locations at the location of the video stream:
  • determining the predicted value according to the number of pixels of the representative pixel set includes:
  • the predicted value is set as a value of the reconstructed pixel sample as a predicted value.
  • an image decoding method including:
  • Parsing a code stream obtaining a decoding parameter of the decoding block, where the decoding parameter includes at least one of: a parameter required to construct a representative pixel set of the decoding block; and constructing a pixel sample value in the decoding block The parameters required to predict the value;
  • the representative pixel set is constructed to determine a predicted value, wherein the predicted value is generated by constructing the predicted value according to the reconstructed pixel sample and the pixel value of the representative pixel set.
  • the decoding block is 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, and a transformation unit.
  • TU pixel string, pixel group, pixel microblock, pixel strip;
  • the image area other than the decoded block includes at least one of: an image area other than the variant of the decoded block; an image area formed by the partially decoded pixel.
  • the manner in which the predicted value is generated includes one of the following:
  • the predicted value is set to a pixel value of the representative pixel set or a pixel value variant of the representative pixel set.
  • constructing a predicted value of a pixel sample in the decoded block using at least one of the following predefined decoding parameters includes:
  • a type of a pixel component of the decoding block wherein one pixel component or two of the pixel components of the pixel component select a pixel value of the representative pixel set as a predicted value, the pixel component except the one pixel component Or other pixel components other than the two pixel components, and selecting a pixel value of the reconstructed pixel sample as a predicted value;
  • the manner in which the predicted value is generated includes:
  • the predicted value is set to a value of the optimal representative pixel sample, if The second predefined condition is not met and the predicted value is set to the value of the reconstructed pixel sample.
  • the method includes: the distance is an error between pixels, the first predefined condition is that the error is the smallest, and the second predefined condition is that the error is less than a first predetermined threshold.
  • setting the predicted value to the optimal representative pixel sample or the reconstructed pixel sample includes:
  • a condition parameter in the code stream is parsed, and the predicted value is set to a pixel sample that satisfies the condition parameter.
  • parsing the flag bits in the code stream comprises at least one of the following:
  • the parameter set for parsing the flag bit used to identify the prediction value selected for the sequence includes at least one of the following: a video parameter set VPS, a sequence parameter set SPS, and an image parameter set PPS;
  • a maximum coding unit LCU layer and/or a coding unit CU layer in which the flag bits for identifying the prediction values selected for the block layer are located are parsed.
  • parsing the predetermined condition parameters in the code stream comprises at least one of the following:
  • Parsing a parameter set for the predetermined condition parameter of the sequence comprising at least one of the following: a video parameter set VPS, a sequence parameter set SPS, and an image parameter set PPS;
  • a maximum coding unit LCU layer and/or a coding unit CU layer in which the predetermined condition parameter for the block layer is located is parsed.
  • the method includes:
  • the position of the reconstructed pixel samples outside the decoded block in the image is divided into rows and/or columns adjacent to the decoded block:
  • the predicted value is set to a value of the reconstructed pixel sample if the reconstructed pixel sample is located outside of a row and/or column adjacent to the decoded block.
  • the method includes:
  • the flag of the predicted value is directly obtained from the code stream or obtained according to an existing parameter in the code stream; the flag bit of the predicted value indicates that the predicted value is set as the representative pixel.
  • the value of the set representative pixel sample is also the value of the reconstructed pixel sample outside the decoded block.
  • determining the predicted value according to the number of pixels of the representative pixel set comprises:
  • the predicted value is set to a value of the reconstructed pixel sample.
  • an image encoding apparatus including:
  • a first determining module configured to construct a representative pixel set of the encoded block, and determine information required to construct the representative pixel set
  • a second determining module configured to construct a predicted value of the pixel sample of the encoded block, where the predicted value is generated by: reconstructing a pixel sample according to an image region other than the encoded block and the representative pixel set a pixel value that constructs a predicted value of the pixel sample;
  • An encoding module is arranged to encode information required to construct the representative set of pixels and information required to construct the predicted value, and write the code stream.
  • an image decoding apparatus including:
  • a parsing module configured to parse the code stream, to obtain a decoding parameter of the decoding block, where the decoding parameter includes at least one of the following parameters: constructing a parameter required for the representative pixel set of the decoding block, and constructing a pixel in the decoding block The parameters required for the predicted value of the sample;
  • a third determining module configured to construct the representative pixel set, and determine a predicted value, where the predicted value is generated by: constructing the predicted value according to the reconstructed pixel sample and the pixel value of the representative pixel set .
  • the representative pixel set of the coding block is constructed, the information required to construct the representative pixel set is determined, and the predicted value of the pixel sample in the coding block is constructed, and the predicted value is generated according to the coding block.
  • Image area reconstruction Pixel samples and pixel values of the representative pixel set, constructing a predicted value of the pixel sample, encoding information required to construct the representative pixel set, and information required to construct the predicted value, and writing the video code stream to solve
  • the distance between the positions of the reconstructed pixels for obtaining the predicted values and the current block is long, the correlation between each other is small, and the compression efficiency is low, and the predicted values of the image regions from outside the current block are improved. When the pixel samples are correlated, the compression efficiency is effectively improved.
  • FIG. 1 is a flow chart of an image encoding method according to an embodiment of the present invention.
  • FIG. 2 is a flowchart of an image decoding method according to an embodiment of the present invention.
  • FIG. 3 is a block diagram 1 of an image encoding apparatus according to an embodiment of the present invention.
  • FIG. 4 is a block diagram 2 of an image decoding apparatus according to an embodiment of the present invention.
  • FIG. 5 is a schematic diagram of obtaining a current pixel prediction value according to a preferred embodiment of the present invention.
  • FIG. 6 is a schematic flow chart of an encoding method according to a preferred embodiment of the present invention.
  • FIG. 7 is a schematic flowchart diagram of a decoding method provided by a preferred embodiment of the present invention.
  • FIG. 1 is a flowchart of an image coding method according to an embodiment of the present invention. As shown in FIG. 1, the process includes the following steps:
  • Step S102 constructing a representative pixel set of the coding block, and determining information required to construct the representative pixel set;
  • Step S104 constructing a predicted value of the pixel sample in the coded block, where the predicted value is generated by: constructing the pixel according to the reconstructed pixel sample value of the image region other than the coded block and the pixel value of the representative pixel set The predicted value of the sample;
  • Step S106 encoding the information required to construct the representative pixel set and the information required to construct the predicted value, and writing the video code stream.
  • constructing a representative pixel set of the coding block determining information required for constructing the representative pixel set, and constructing a predicted value of the pixel sample value in the coding block, where the predicted value is generated according to the coding block Constructing a reconstructed pixel sample of the image region and a pixel value of the representative pixel set, constructing a predicted value of the pixel sample, and configuring the representative pixel set
  • the information and the information needed to construct the predicted value are encoded and written into the video bitstream, which solves the problem that the position of the reconstructed pixels obtaining the predicted value is far from the current block, and the correlation between the two is small.
  • the problem of low compression efficiency improves the correlation between the predicted value of the image region from outside the current block and the pixel sample value, and effectively improves the compression efficiency.
  • the coding block is an coding 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, and a pixel.
  • 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
  • a pixel String, pixel group, pixel microblock, pixel strip
  • the image area outside the coded block includes at least one of: an image area other than the variant of the coded block; an image area formed by the partially coded pixels.
  • the manner in which the predicted value is generated includes one of the following:
  • the predicted value is set to a pixel value of the representative pixel set or a pixel value variant of the representative pixel set.
  • constructing a predicted value of the pixel sample in the encoding block including:
  • a type of a pixel component of the coding block wherein one pixel component of the pixel component or two pixel components select a pixel value of the representative pixel set as a predicted value, the pixel component except the one pixel component or the two pixel components a pixel value other than the pixel component, the pixel value of the reconstructed pixel sample is selected as a predicted value;
  • the manner in which the predicted value is generated includes:
  • the predicted value is set to the value of the optimal representative pixel sample, if the second is not satisfied A predefined condition that sets the predicted value to the value of the reconstructed pixel sample.
  • the distance is an error between pixels
  • the first predefined condition is that the error is the smallest
  • the second predefined condition is that the error is less than the first predetermined threshold
  • setting the predicted value to the optimal representative pixel sample or the reconstructed pixel sample includes:
  • a condition parameter constructing the predicted value is written in the video code stream, wherein a pixel sample value satisfying the condition parameter is used as the predicted value.
  • writing a flag indicating the predicted value in the video code stream includes at least one of the following:
  • a flag bit for identifying a prediction value selected for the entire sequence into a parameter set of at least one of: a video parameter set VPS, a sequence parameter set SPS, and an image parameter set PPS;
  • a flag bit for identifying a prediction value selected for the block layer is written to the maximum coding unit LCU and/or the coding unit CU.
  • condition parameter for constructing the predicted value is written in the video code stream, including at least one of the following:
  • the predetermined condition parameter for the block layer is written to the maximum coding unit LCU layer and/or the coding unit CU layer.
  • the position of the reconstructed pixel sample outside the coded block in the image is divided into rows and/or columns adjacent to the coded block;
  • the predicted value is set to the value of the reconstructed pixel sample.
  • the flag of the predicted value is directly obtained from the video code stream or obtained according to an existing parameter in the video code stream;
  • the flag of the predicted value is used to indicate that one of the value of the representative pixel sample value of the representative pixel set and the reconstructed pixel sample value other than the coded block is selected as the current coded pixel sample value in the encoding process.
  • the flag bit includes one of the following locations in the video stream:
  • determining the predicted value according to the number of pixels of the representative pixel set includes:
  • the predicted value is set as the value of the reconstructed pixel sample as a predicted value.
  • FIG. 2 is a flowchart of an image decoding method according to an embodiment of the present invention. As shown in FIG. 2, the process includes the following steps:
  • Step S202 parsing the code stream, and acquiring a decoding parameter of the decoding block, where the decoding parameter includes at least one of the following parameters: a parameter required to construct a representative pixel set of the decoding block; and constructing a pixel sample value in the decoding block.
  • Step S204 constructing the representative pixel set to determine a predicted value, wherein the predicted value is generated by constructing the predicted value according to the reconstructed pixel sample value and the pixel value of the representative pixel set.
  • the code stream is parsed to obtain a decoding parameter of the decoding block, where the decoding parameter includes at least one of the following parameters: a parameter required to construct a representative pixel set of the decoding block; and a pixel sample in the decoding block is constructed.
  • the correlation of pixel samples effectively improves the compression efficiency.
  • the decoding block is a decoding region of an image, including 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, and a pixel.
  • 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
  • a pixel String, pixel group, pixel microblock, pixel strip
  • the image area outside the decoded block includes at least one of: an image area other than the variant of the decoded block; an image area formed by the partially decoded pixel.
  • the manner in which the predicted value is generated includes one of the following:
  • the predicted value is set to a pixel value of the representative pixel set or a pixel value variant of the representative pixel set.
  • constructing a predicted value of the pixel sample in the decoded block including:
  • the type of the pixel component of the decoded block wherein one pixel component of the pixel component or two of the pixel components are selected
  • the pixel value of the representative pixel set is used as a predicted value, and the pixel component selects a pixel value of the reconstructed pixel sample as a predicted value in addition to the one pixel component or other pixel components other than the two pixel components;
  • the generated manner of the predicted value includes:
  • the predicted value is set to the value of the optimal representative pixel sample, if the second is not satisfied A predefined condition that sets the predicted value to the value of the reconstructed pixel sample.
  • the distance is an error between pixels
  • the first predefined condition is that the error is the smallest
  • the second predefined condition is that the error is less than the first predetermined threshold
  • setting the predicted value to the optimal representative pixel sample or the reconstructed pixel sample includes:
  • condition parameter in the code stream is parsed, and the predicted value is set to a pixel sample that satisfies the condition parameter.
  • parsing the flag bit in the code stream includes at least one of the following:
  • the parameter set for parsing the flag bit used to identify the prediction value selected for the sequence includes at least one of the following: a video parameter set VPS, a sequence parameter set SPS, and an image parameter set PPS;
  • a maximum coding unit LCU layer and/or a coding unit CU layer in which the flag bits for identifying the prediction values selected for the block layer are located are parsed.
  • parsing the predetermined condition parameter in the code stream includes at least one of the following:
  • Parsing a parameter set for the predetermined condition parameter of the sequence comprising at least one of the following: a video parameter set VPS, a sequence parameter set SPS, and an image parameter set PPS;
  • a maximum coding unit LCU layer and/or a coding unit CU layer in which the predetermined condition parameter for the block layer is located is parsed.
  • the position of the reconstructed pixel sample outside the decoded block in the image is divided into rows and/or columns adjacent to the decoded block:
  • the reconstructed pixel sample is located within a row and/or column adjacent to the decoded block, setting the predicted value to a value of a representative pixel sample of the representative pixel set;
  • the predicted value is set to the value of the reconstructed pixel sample.
  • At least one of the data units in the code stream is parsed to obtain a flag bit of the predicted value, and the data unit includes at least one of the following:
  • the flag of the predicted value is directly obtained from the code stream or derived according to an existing parameter in the code stream; the flag bit of the predicted value indicates that the predicted value is set as a representative pixel sample of the representative pixel set The value is also the value of the reconstructed pixel sample outside of the decoded block.
  • determining the predicted value according to the number of pixels of the representative pixel set includes:
  • the predicted value is set to a value of the reconstructed pixel sample.
  • module may implement a combination of software and/or hardware of a predetermined function.
  • apparatus described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware, is also possible and contemplated.
  • FIG. 3 is a block diagram showing the structure of an image encoding apparatus according to an embodiment of the present invention. As shown in FIG. 3, the apparatus includes:
  • a first determining module 32 configured to construct a representative pixel set of the encoded block, and determine information required to construct the representative pixel set
  • the second determining module 34 is connected to the first determining module 32 and configured to construct a predicted value of the pixel sample of the encoded block, where the predicted value is generated by: reconstructing a pixel according to an image region other than the encoded block Constructing a predicted value of the pixel sample value and the pixel value of the representative pixel set;
  • the encoding module 36 is coupled to the second determining module 34 and configured to encode the information required to construct the representative set of pixels and the information required to construct the predicted value, and write the code stream.
  • the first determining module 32 constructs a representative pixel set of the coding block, determines information required to construct the representative pixel set
  • the second determining module 34 constructs a predicted value of the pixel sample of the encoded block, and the generation of the predicted value
  • the method includes: constructing a predicted value of the pixel sample according to the reconstructed pixel sample of the image region outside the coded block and the pixel value of the representative pixel set, and the encoding module 36 constructs the information required for the representative pixel set and
  • the information required to construct the predicted value is encoded and written into the code stream, which solves the problem that the positions of the reconstructed pixels for obtaining the predicted value are far from the current block, the correlation between the two is small, and the compression efficiency is low.
  • the problem is that the correlation between the predicted value of the image region from the current block and the pixel sample is improved, and the compression efficiency is effectively improved.
  • FIG. 4 is a second structural block diagram of an image decoding apparatus according to an embodiment of the present invention. As shown in FIG. 4, the apparatus includes:
  • the parsing module 42 is configured to parse the code stream, and obtain a decoding parameter of the decoding block, where the decoding parameter includes at least one of the following parameters: constructing a parameter required for the representative pixel set of the decoding block, and constructing a pixel sample in the decoding block The required parameters for the predicted value of the value;
  • the third determining module 44 is connected to the parsing module 42 and configured to construct the representative pixel set to determine a predicted value, where the predicted value is generated according to the reconstructed pixel sample value and the pixel value of the representative pixel set, The predicted value.
  • the parsing module 42 parses the code stream to obtain the decoding parameters of the decoding block, where the decoding parameter includes at least one of the following parameters: constructing parameters required for the representative pixel set of the decoding block, and constructing the pixels in the decoding block.
  • the third determining module 44 constructs the representative pixel set to determine a predicted value, wherein the predicted value is generated according to the reconstructed pixel sample and the pixel value of the representative pixel set. Constructing the predicted value solves the problem that the position of the reconstructed pixels obtained by obtaining the predicted value is far from the current block, the correlation between each other is small, and the compression efficiency is low, and the problem from the current block is improved.
  • the correlation between the predicted value of the image area and the pixel sample value effectively improves the compression efficiency.
  • each of the above modules may be implemented by software or hardware.
  • the foregoing may be implemented by, but not limited to, the foregoing modules are all located in the same processor; or, the modules are located in multiple In the processor.
  • the main technical feature of the preferred embodiment of the present invention is that when encoding or decoding a current block, constructing a representative pixel set of the current block, reconstructing pixel samples from the image region outside the current block and representative pixels of the current block.
  • the set of pixel values optionally in combination with other codec parameters, obtains predicted values for some or all of the current pixel samples according to predetermined rules.
  • FIG. 5 is a schematic diagram of obtaining a current pixel prediction value according to a preferred embodiment of the present invention, constructing a representative pixel set of 8 representative pixels from a current block. For some or all of the pixels of the current block, the predicted values of some or all of the pixels of the current block are obtained from the reconstructed pixels of the image region outside the current block and the representative pixels of the current block.
  • the pixel shown in FIG. 5 may be in a stacked format or a flat format. Therefore, the method of the preferred embodiment of the present invention can be applied to encoding or decoding pixels of a coded block or a decoded block of a stacked packet format, and can also be applied to a pixel sample of a plane of a coded block or a decoded block of a planar format. Encoding or decoding.
  • the most basic unique technical features are: counting and analyzing the characteristics of the current coding block, constructing a representative pixel set of the current coding block, also called a color palette; searching for the current coding block a predicted value of the pixel that best matches; the manner in which the predicted value is generated includes, but is not limited to, a reconstructed pixel sample from an image region other than the current encoded block and a pixel value of a representative pixel set of the current encoded block, optionally in combination with other
  • the encoding parameters are obtained according to a predetermined rule; the information required to construct the representative pixel set is written into the video compressed code stream, and the information required to obtain the predicted value is written into the video compressed code stream.
  • the most basic characteristic feature is that when the compressed code stream data of the current decoding block is decoded, the representative pixel set constructing the current decoding block is parsed from the code stream data, which is also called The information required by the palette is parsed to obtain the information required to obtain the predicted value of the pixel of the current decoded block; the calculation of the predicted value
  • the manner includes, but is not limited to, reconstructed pixel samples from image regions outside the current decoded block and pixel values of representative pixel sets of the current decoded block, optionally in combination with other decoding parameters, calculated according to predetermined rules.
  • FIG. 6 is a schematic flowchart of an encoding method according to a preferred embodiment of the present invention. As shown in FIG. 6, the encoding method of the present invention includes but is not limited to the following steps:
  • S602. Perform prediction or copy coding on the coding block, and generate at least a prediction value of a pixel sample of the coding block, where the prediction value is generated by, but not limited to, an image region other than the coding block.
  • FIG. 7 is a schematic flowchart of a decoding method according to a preferred embodiment of the present invention. As shown in FIG. 3, the decoding method of the present invention includes but is not limited to the following steps:
  • the predicted value is generated by, but not limited to, a reconstructed pixel sample from an image region other than the decoded block and a pixel value of the representative pixel set, optionally Combined with other decoding parameters, the calculation is obtained according to a predetermined rule.
  • the position of the reconstructed pixel sample in the image region is typically specified by a displacement vector (also referred to as a motion vector or copy position, etc.) between the reconstructed pixel sample and the currently decoded pixel sample.
  • a variant of the current coding block or current decoding block is a pixel group or pixel string or pixel micro-block and pixel strip to be encoded or to be decoded.
  • the image area outside the coding block or the decoding block is an image area composed of pixels that have completed at least partial encoding or pixels that have completed at least partial decoding.
  • the manner of generating the predicted value includes at least the following steps: selecting a reconstructed pixel sample or a variant thereof other than the codec block as a predicted value according to a predetermined rule, or selecting a pixel value of the representative pixel set or Its variant is used as a predictor.
  • a codec block some or all of the current pixel samples adopt reconstructed pixel samples or variants thereof outside the codec block as prediction values, and some or all of the current pixel samples adopt the representative pixel set
  • the pixel value or its variant is used as the predicted value.
  • Such variants include, but are not limited to, filtering and transforming.
  • Embodiment 2 of the manner in which the predicted value is generated in the preferred embodiment of the present invention
  • the manner in which the predicted value is generated includes at least determining the predicted value based on at least part or all or a combination of the following parameters:
  • a position of the reconstructed pixel sample outside the codec block in the current image is usually specified by a displacement vector (also called a motion vector or a copy position, etc.);
  • a value of the reconstructed pixel sample outside the codec block is usually specified by a displacement vector (also referred to as a motion vector or a copy position, etc.);
  • pixel component selecting according to the kind of the pixel component, one pixel component (such as Y component) or two pixel components (such as G component and R component) selecting a value representing the pixel sample as a predicted value, and other pixel components selecting the codec
  • a displacement vector also called a motion vector or a copy position, etc.
  • the manner in which the predicted value is generated includes at least the following steps:
  • the representative pixel sample is called the optimal representative pixel sample
  • the value of the optimal representative pixel sample is selected as a predicted value, otherwise, the reconstructed pixel is selected The value of the sample is used as the predicted value.
  • the distance in Embodiment 3 is an error between pixels, which is less than a predetermined threshold. That is, for a current pixel sample of the codec block, the manner in which the predicted value is generated includes at least the following steps:
  • the position of the reconstructed pixel sample outside the codec block in Embodiment 2 in the current image is divided into a number of rows and/or columns directly adjacent to the codec block (typically 1-5 lines and / or 1-5 columns) and the rest of the location:
  • the value of the reconstructed pixel samples is selected as the predicted value.
  • the flag bit described in Embodiment 2 appears directly or indirectly (implicitly derived form) in the following places in the code stream to determine that the current codec pixel value in the subsequent codec process is a value that selects a representative pixel value.
  • the predicted value the value of the reconstructed pixel sample other than the codec block is selected as the predicted value:
  • a video parameter set typically a grammatical element of a direct or implicit derivation of the video parameter set VPS;
  • sequence parameter set usually a grammatical element of a direct or implicit derivation of the sequence parameter set SPS;
  • a strip head usually a grammatical element of a direct or implicit derivation of a stripe header
  • CTU header usually a grammatical element of a direct or implicit derivation of the CTU header
  • CU header usually a grammatic element of a direct or implicit derivation of the CU header
  • codec block header usually a syntax element of a direct or implicit derivation of the codec block header
  • codec block before the codec block one or a group or a string of current codec pixel samples; usually one of the codec blocks or a set or a string of current codec pixel samples before the syntax element directly exists or hidden Contains derived syntax elements.
  • the predicted value is determined according to the number of pixels of the representative pixel set of the codec block described in Embodiment 2:
  • the encoder chooses to use one of the optimal representative pixel samples and the reconstructed pixel samples as the predicted value.
  • the encoder sets a flag bit for identifying the selected prediction value, and writing the flag bit to the code stream using at least one of the following methods: (Method 1) is used to identify the selected sequence for the entire sequence. The flag of the predicted value is written into one or more parameter sets of the video parameter set VPS, the sequence parameter set SPS, and the image parameter set PPS; (method 2) the flag bits for identifying the predicted value used for the image are written. At least one of image parameter set PPS, slice (also called stripe) header information; (method 3) writing a flag bit for identifying a prediction value selected for the block layer to a maximum coding unit (or coding tree unit CTU) At least one of a layer, a coding unit CU layer.
  • Method 1 is used to identify the selected sequence for the entire sequence.
  • the flag of the predicted value is written into one or more parameter sets of the video parameter set VPS, the sequence parameter set SPS, and the image parameter set PPS
  • method 2 the flag bits for identifying the predicted value used for the image are
  • the decoder obtains the value of the flag bit by parsing the code stream, and determines whether the optimal representative pixel sample value or the reconstructed pixel sample value is used as the predicted value in the decoding process according to the value of the flag bit.
  • the encoder does not write a flag bit for identifying the selected prediction value to the code stream, and the encoder defaults to using the prediction value candidate that satisfies the predetermined condition as the prediction value used in the encoding process.
  • the decoder selects the predicted value candidate satisfying the condition as the predicted value used in the decoding process using the same predetermined condition as the encoder.
  • the encoder does not write the flag bit for identifying the selected prediction value into the code stream, and the encoder uses the prediction value candidate that satisfies the predetermined condition as the prediction value used in the encoding process, and at the same time, the encoder will The parameter of the predetermined condition is written into the code stream, and the parameter of the predetermined condition is written into the code stream using at least one of the following methods: (Method 1) writing the parameter for the predetermined condition of the entire sequence to the video parameter set One or more parameter sets in the VPS, the sequence parameter set SPS, and the image parameter set PPS; (method 2) writing parameters for identifying the predetermined condition of the image to at least one of the image parameter set PPS and the slice header information (Method 3) The parameter for identifying the predetermined condition of the block layer is written into at least one of a maximum coding unit (or coding tree unit CTU) layer and a coding unit CU layer.
  • the decoder obtains the parameters of the predetermined condition by pars
  • the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware, but in many cases, the former is A better implementation.
  • the technical solution of the present invention which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk,
  • the optical disc includes a number of instructions for causing a terminal device (which may be a cell phone, a computer, a server, or a network device, etc.) to perform the methods described in various embodiments of the present invention.
  • Embodiments of the present invention also provide a storage medium.
  • the foregoing storage medium may be configured to store program code for performing the following steps:
  • the foregoing storage medium may include, but not limited to, a USB flash drive, a Read-Only Memory (ROM), a Random Access Memory (RAM), a mobile hard disk, and a magnetic memory.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • a mobile hard disk e.g., a hard disk
  • magnetic memory e.g., a hard disk
  • the processor performs the methods and steps of the foregoing embodiments according to the stored program code in the storage medium.
  • modules or steps of the present invention described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein.
  • the steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps thereof are fabricated as a single integrated circuit module.
  • the invention is not limited to any specific combination of hardware and software.
  • a representative pixel set of a coded block is constructed, and information required for constructing the representative pixel set is determined, and a predicted value of the pixel sample value in the coded block is constructed, where the predicted value is generated by: Constructing a predicted value of the pixel sample according to the reconstructed pixel sample of the image region outside the coded block and the pixel value of the representative pixel set, the information required to construct the representative pixel set and the need to construct the predicted value
  • the information is encoded and written into the video code stream, which solves the problem that the position of the reconstructed pixels obtaining the predicted value is far from the current block, the correlation between the two is small, and the compression efficiency is low, and the problem is improved.
  • the correlation between the predicted value of the image region from outside the current block and the pixel sample value effectively improves the compression efficiency.

Landscapes

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

Abstract

The present invention provides an image coding/decoding method and apparatus. The coding method comprises: constructing a representative pixel set of a coding block, and determining information needed to construct the representative pixel set; constructing a predicted value of a pixel sample value in the coding block, a generation mode of the predicted value comprising: constructing, according to a reconstructive pixel sample value of an image area outside the coding block and a pixel value of the representative pixel set, the predicted value of the pixel sample value; and coding the information needed to construct the representative pixel set and information needed to construct the predicted value, and writing a video code stream. By means of the technical solution, the problems of longer distance between positions of these reconstructive pixels obtaining the predicted value and a current block, low correlation and low compression efficiency are resolved, the correlation between a predicted value of an image area outside the current block and a current pixel sample value is improved, and the compression efficiency is effectively improved.

Description

图像编解码方法及装置Image coding and decoding method and device 技术领域Technical field
本发明涉及图像处理领域,具体而言,涉及一种图像编解码方法及装置。The present invention relates to the field of image processing, and in particular to an image encoding and decoding method and apparatus.
背景技术Background technique
相关技术中,随着电视机和显示器进入超高清(4K)和特超高清(8K)的分辨率,以及以远程桌面为典型表现形式的新一代云计算与信息处理模式及平台的发展和普及,对视频图像数据压缩的需求也走向更高分辨率和包含摄像机摄取图像和计算机屏幕图像的复合图像。对视频图像进行超高压缩比和极高质量的数据压缩成为必不可少的技术。Related technologies, with the development of televisions and monitors entering ultra-high definition (4K) and ultra-high definition (8K) resolutions, as well as the development and popularization of a new generation of cloud computing and information processing modes and platforms with remote desktops as a typical form of expression. The need for video image data compression is also moving toward higher resolution and composite images containing camera-captured images and computer screen images. Ultra-high compression ratio and extremely high-quality data compression of video images have become an indispensable technology.
充分利用4K/8K图像和计算机屏幕图像的特点,对视频图像进行超高效率的压缩,也是正在制定中的最新国际视频压缩标准(High Efficiency Video Coding,简称为HEVC)和其他若干国际标准、国内标准、行业标准的一个主要目标。Taking full advantage of the characteristics of 4K/8K images and computer screen images, the ultra-efficient compression of video images is also the latest international video compression standard (High Efficiency Video Coding, referred to as HEVC) and several other international standards. A major goal of standards and industry standards.
图像的数字视频信号的自然形式是图像的序列。一帧图像通常是由若干像素组成的矩形区域,而数字视频信号就是由几十帧至成千上万帧图像组成的视频图像序列,有时也简称为视频序列或序列。对数字视频信号进行编码就是对一帧一帧图像进行编码。在任一时刻,正在编码中的那一帧图像称为当前编码图像。同样,对数字视频信号的压缩后的视频码流(简称码流也称为比特流)进行解码就是对一帧一帧图像的码流进行解码。在任一时刻,正在解码中的那一帧图像称为当前解码图像。当前编码图像或当前解码图像都统称为当前图像。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. At any one time, the image of the frame being encoded is referred to as the current encoded image. Similarly, decoding a compressed video stream of a digital video signal (referred to as a bitstream, also referred to as a bitstream) is decoding a stream of one frame by one image. At any one time, the image of the frame being decoded is referred to as the current decoded image. The current encoded image or the currently decoded image is collectively referred to as the current image.
在几乎所有视频图像编码的国际标准如动态格式专家组(Moving Picture Experts Group,简称为MPEG-1/2/4),H.264/高级视频编码(Advanced Video Coding,简称为AVC)以及HEVC中,对一帧图像进行编码(以及相应的解码)时,把一帧图像划分成若干块MxM像素的子图像,称为编码块(从解码的角度也就是解码块,统称为编解码块)或“编码单元(Coding Unit,简称为CU)”,以CU为基本编码单位,对子图像一块一块的进行编码。常用的M的大小是4,8,16,32,64。因此,对一个视频图像序列进行编码就是对各帧图像的各个编码单元即CU依次一个一个CU进行编码。在任一时刻,正在编码中的CU称为当前编码CU。同样,对一个视频图像序列的码流进行解码也是对各帧图像的各个CU依次一个一个CU进行解码,最终重构出整个视频图像序列。在任一时刻,正在解码中的CU称为当前解码CU。当前编码CU或当前解码CU统称为当前CU。In almost all international standards for video image coding, such as Moving Picture Experts Group (MPEG-1/2/4), H.264/Advanced Video Coding (AVC) and HEVC When encoding one frame of image (and corresponding decoding), dividing one frame of image into sub-images of several blocks of MxM pixels, called a coding block (from a decoding perspective, that is, a decoding block, collectively referred to as a codec block) or "Coding Unit (CU for short)", which uses CU as the basic coding unit to encode sub-pictures one by one. The size of the commonly used M is 4, 8, 16, 32, 64. Therefore, encoding a video image sequence is to encode one CU for each coding unit of each frame image, that is, CU. At any one time, the CU being coded is referred to as the current coded CU. Similarly, decoding the code stream of a video image sequence is also decoding one CU for each CU of each frame image, and finally reconstructing the entire video image sequence. At any one time, the CU being decoded is referred to as the currently decoded CU. The current coding CU or the current decoding CU is collectively referred to as the current CU.
为适应一帧图像内各部分图像内容与性质的不同,有针对性地进行最有效的编码,一帧图像内各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进行编码。在HEVC国际标准中,LCU与CTU是同义词。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 Multiple CUs of a tree structure that are not necessarily the same size. Therefore, the LCU is also referred to as a "Coding Tree Unit (CTU)". E.g, One 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. In the HEVC international standard, LCU is synonymous with CTU.
CU也可以再进一步被划分成若干子区域。子区域包括但不限于预测单元(Prediction Unit,简称为PU),变换单元(Transform Unit,简称为TU),不对称划分(Asymmetric Multi-Processing,简称为AMP)的区域。The CU can also be further divided into sub-areas. The sub-area includes, but is not limited to, a prediction unit (Picture Unit, abbreviated as PU), a transform unit (Transform Unit, TU for short), and an asymmetric division (Asymmetric Multi-Processing, AMP for short).
一个彩色像素通常有3个分量(component)组成。最常用的两种像素色彩格式(pixel color format)是由绿色分量、蓝色分量、红色分量组成的GBR色彩格式和由一个亮度(luma)分量及两个色度(chromaticity)分量组成的YUV色彩格式,通称为YUV的色彩格式实际包括多种色彩格式,如YCbCr色彩格式。因此,对一个CU进行编码时,可以把一个CU分成3个分量平面(G平面、B平面、R平面或Y平面、U平面、V平面),对3个分量平面分别进行编码;也可以把一个像素的3个分量捆绑组合成一个3元组,对由这些3元组组成的CU整体进行编码。前一种像素及其分量的排列方式称为图像(及其CU)的平面格式(planar format),而后一种像素及其分量的排列方式称为图像(及其CU)的叠包格式(packed format)。像素的GBR色彩格式和YUV色彩格式都是像素的3分量表现格式。A color pixel usually 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 YUV color consisting of a luma component and two chromaticity components. The format, commonly known as the YUV color format, actually includes multiple color formats, such as the YCbCr color format. Therefore, when encoding a CU, a CU 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 component bundles of one pixel are combined into one 3-tuple, and the CUs 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 CU), and the arrangement of the latter pixel and its components is called the stacked format of the image (and its CU). Format). The GBR color format and the YUV color format of the pixel are both 3-component representation formats of the pixel.
除了像素的3分量表现格式,像素的另一种常用的现有技术的表现格式是调色板索引表现格式。在调色板索引表现格式中,一个像素的数值也可以用调色板的索引来表现。调色板空间中存储了需要被表现的像素的3个分量的数值或近似数值,调色板的地址被称为这个地址中存储的像素的索引。一个索引可以表现像素的一个分量,一个索引也可以表现像素的3个分量。调色板可以是一个,也可以是多个。在多个调色板的情形,一个完整的索引实际上由调色板编号和该编号的调色板的索引两部分组成。像素的索引表现格式就是用索引来表现这个像素。像素的索引表现格式在现有技术中也被称为像素的索引颜色(indexed color)或仿颜色(pseudo color)表现格式,或者常常被直接称为索引像素(indexed pixel)或仿像素(pseudo pixel)或像素索引或索引。索引有时也被称为指数。把像素用其索引表现格式来表现也称为索引化或指数化。In addition to the 3-component representation format of pixels, another common prior art representation format for pixels is the palette index representation format. In the palette index representation format, the value of a pixel can also be 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 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 format of a pixel is to represent this pixel with an index. The index representation format of a pixel is also referred to as an indexed color or a pseudo color representation format of a pixel in the prior art, or is often referred to directly as an indexed pixel or a pseudo pixel (pseudo pixel). ) or pixel index or index. Indexes are sometimes referred to as indices. The representation of a pixel in its index representation format is also referred to as indexing or indexing.
其他的常用的现有技术的像素表现格式包括CMYK表现格式和灰度表现格式。Other commonly used prior art pixel representation formats include CMYK presentation formats and grayscale representation formats.
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)。 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.
编码或解码时的最基本元素可以是一个像素,也可以是一个像素分量,也可以是一个像素索引(即索引像素)。作为编码或解码的最基本元素的一个像素或一个像素分量或一个索引像素统称为一个像素样值,有时也通称为一个像素值,或简单地称为一个样值。The most basic element when encoding or decoding can be one pixel, one pixel component, or one pixel index (ie, index pixel). A pixel or a pixel component or an index pixel, which is the most basic element of encoding or decoding, is collectively referred to as a pixel sample, sometimes referred to as a pixel value, or simply as a sample.
在本专利申请文件中,“像素样值”、“像素值”、“样值”、“索引像素”、“像素索引”是同义词,根据上下文,可以明确是表示“像素”还是表示“一个像素分量”还是表示“索引像素”或者同时表示三者之任一。如果从上下文不能明确,那么就是同时表示三者之任一。In the present patent application, "pixel sample", "pixel value", "sample value", "index pixel", "pixel index" are synonyms, depending on the context, whether it is clear whether "pixel" or "one pixel" The "component" still means "index pixel" or both. If it is not clear from the context, then it means either of the three.
在本专利申请文件中,编码块或解码块(统称为编解码块)是由若干像素值组成的一个区域。编解码块的形状可以是矩形、正方形、平行四边形、梯形、多边形、圆形、椭圆形、串形及其他各种形状。矩形也包括宽度或高度为一个像素值的退化为线(即线段或线形)的矩形。一帧图像中,各个编解码块可以具有各不相同的形状和大小。一帧图像中,某些或全部编解码块可以有互相重叠部分,也可以所有编解码块都互不重叠。一个编解码块,可以由“像素”组成,也可以由“像素的分量”组成,也可以由“索引像素”组成,也可以由这3者混合组成,也可以由这3者中之任意2种混合组成。从视频图像编码或解码的角度,编解码块是指一帧图像中对其施行编码或解码的一个区域,包括但不限于以下至少一种:最大编码单元LCU、编码树单元CTU、编码单元CU、CU的子区域、预测单元PU、变换单元TU、一串像素、一组像素。In this patent application, a coded block or a decoded block (collectively referred to as a codec block) is an area composed of a number of pixel values. The shape of the codec block may be a rectangle, a square, a parallelogram, a trapezoid, a polygon, a circle, an ellipse, a string, and the like. A rectangle also includes a rectangle whose width or height is one pixel value that degenerates into a line (ie, a line segment or a line shape). In one frame of image, each codec block may have a different shape and size. In one frame of image, some or all of the codec blocks may overlap each other, or all codec blocks may not overlap each other. A codec block may be composed of "pixels", or may be composed of "components of pixels", or may be composed of "index pixels", or may be composed of a mixture of the three, or any of the three. Mixed composition. From the perspective of video image encoding or decoding, a codec block refers to an area in which encoding or decoding is performed in a frame image, including but not limited to at least one of the following: a maximum coding unit LCU, a coding tree unit CTU, and a coding unit CU. a sub-region of the CU, a prediction unit PU, a transform unit TU, a series of pixels, and a set of pixels.
相关技术中的视频图像压缩技术包括:预测方式(包括但不限于帧内预测和帧间预测)和复制方式(包括但不限于块复制、索引复制、微块复制、条复制、串复制、矩形复制、点复制)。这里“复制”是复制编码器搜索到的最优匹配像素。因此,从编码器的角度,复制方式也称为匹配方式(包括但不限于块匹配、索引匹配、微块匹配、条匹配、串匹配、矩形匹配、点匹配)。Video image compression techniques in the related art include: prediction modes (including but not limited to intra prediction and inter prediction) and copying modes (including but not limited to block copying, index copying, microblock copying, strip copying, string copying, and rectangles). Copy, point copy). Here "copy" is the optimal matching pixel that the copy encoder searches for. Therefore, from the perspective of the encoder, the copy mode is also called the matching mode (including but not limited to block matching, index matching, microblock matching, bar matching, string matching, rectangle matching, point matching).
预测方式和复制方式的一个重要特征是从当前编解码块(简称为当前块)之外的图像区域(包括直接相邻和非直接相邻)内复制重构像素样值(包括完全重构像素样值和/或不同程度的部分重构像素样值),称之为当前编码或解码中像素样值(简称为当前像素样值)的预测值(也称为参考值),将所述预测值赋值予当前像素样值,作为当前像素样值的重构像素样值。An important feature of the prediction mode and the copy mode is to copy reconstructed pixel samples (including fully reconstructed pixels) from image regions (including directly adjacent and indirectly adjacent) outside the current codec block (referred to as the current block). Samples and/or different degrees of partially reconstructed pixel samples), referred to as predicted values (also referred to as reference values) of pixel samples (referred to as current pixel samples) in the current encoding or decoding, which are to be predicted The value is assigned to the current pixel sample as the reconstructed pixel sample of the current pixel sample.
相关技术中的预测方式和复制方式中,预测值从当前块之外的图像区域的重构像素样值获得,与当前块的像素样值没有任何直接联系,因而存在着这些重构像素的位置与当前块之间的距离越远,互相之间的相关性就越小,压缩效率较低的问题。In the prediction mode and the copy mode in the related art, the predicted value is obtained from the reconstructed pixel samples of the image region outside the current block, and has no direct relationship with the pixel samples of the current block, and thus the positions of the reconstructed pixels exist. The farther the distance from the current block is, the smaller the correlation between each other is and the lower the compression efficiency.
针对相关技术中,获得预测值的这些重构像素的位置与当前块之间的距离较远,互相之间的相关性就小,压缩效率低的问题,目前还没有有效地解决方案。In the related art, the problem that the positions of the reconstructed pixels that obtain the predicted values are far from the current block, the correlation between each other is small, and the compression efficiency is low, there is currently no effective solution.
发明内容Summary of the invention
本发明提供了一种图像编解码方法及装置,以至少解决相关技术中获得预测值的这些重构像素的位置与当前块之间的距离较远,互相之间的相关性就小,压缩效率低的问题。 The present invention provides an image encoding and decoding method and apparatus, to at least solve the problem that the positions of the reconstructed pixels obtained by obtaining the predicted values in the related art are far from the current block, and the correlation between each other is small, and the compression efficiency is small. Low problem.
根据本发明的一个实施例,提供了一种图像编码方法,包括:According to an embodiment of the present invention, an image encoding method is provided, including:
构造编码块的代表像素集,确定构造所述代表像素集所需的信息;Constructing a representative set of pixels of the encoded block, determining information required to construct the representative set of pixels;
构造所述编码块中像素样值的预测值,所述预测值的产生方式包括:依据所述编码块之外的图像区域的重构像素样值和所述代表像素集的像素值,构造所述像素样值的预测值;And constructing a predicted value of the pixel sample in the coding block, where the predicted value is generated by: reconstructing a pixel sample value of the image region other than the coded block and a pixel value of the representative pixel set, The predicted value of the pixel sample;
对构造所述代表像素集所需的信息和构造所述预测值所需的信息进行编码,写入视频码流。The information required to construct the representative set of pixels and the information required to construct the predicted values are encoded and written to the video stream.
在本发明的实施例中,所述编码块是图像的一个编码区域,包括以下至少之一:最大编码单元LCU、编码树单元CTU、编码单元CU、CU的子区域、预测单元PU、变换单元TU、像素串、像素组、像素微块、像素条;In an embodiment of the present invention, the coding block is an coding region of an image, including 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 transformation unit TU, pixel string, pixel group, pixel microblock, pixel strip;
所述编码块之外的图像区域包括以下至少之一:所述编码块的变体之外的图像区域;已完成部分编码的像素构成的图像区域。The image area other than the coded block includes at least one of: an image area other than the variant of the coded block; an image area formed by the partially coded pixels.
在本发明的实施例中,所述预测值的产生方式包括以下之一:In an embodiment of the invention, the manner in which the predicted value is generated includes one of the following:
将所述预测值设置为所述编码块之外的重构像素样值或所述重构像素样值变体;Setting the predicted value to a reconstructed pixel sample or the reconstructed pixel sample variant outside the encoded block;
将所述预测值设置为所述代表像素集的像素值或所述代表像素集的像素值变体。The predicted value is set to a pixel value of the representative pixel set or a pixel value variant of the representative pixel set.
在本发明的实施例中,使用如下预定义的编码参数的至少之一,构造所述编码块中像素样值的预测值,包括:In an embodiment of the invention, the predictive value of the pixel samples in the encoded block is constructed using at least one of the following predefined encoding parameters, including:
所述重构像素样值在图像中的位置;Reconstructing the position of the pixel sample in the image;
所述构造所述代表像素集所需的信息;Constructing the information required to represent the set of pixels;
所述代表像素集的像素数目;The number of pixels representing the set of pixels;
所述编码块中的当前编码像素样值的位置;a location of a current encoded pixel sample in the encoded block;
所述编码块的像素分量的种类,其中,所述像素分量的一个像素分量或两个所述像素分量选择所述代表像素集的像素值作为预测值,所述像素分量除了所述一个像素分量或者所述两个像素分量以外的其他像素分量,选择所述重构像素样值的像素数值作为预测值;a type of a pixel component of the coding block, wherein one pixel component or two of the pixel components of the pixel component select a pixel value of the representative pixel set as a predicted value, the pixel component except the one pixel component Or other pixel components other than the two pixel components, and selecting a pixel value of the reconstructed pixel sample as a predicted value;
所述预测值的标志位。The flag of the predicted value.
在本发明的实施例中,对于所述编码块中的像素样值,所述预测值的产生方式包括:In an embodiment of the present invention, for the pixel samples in the coding block, the manner in which the predicted value is generated includes:
对于所述编码块之外的重构像素样值,计算所述重构像素样值与所述代表像素集的部分或全部代表像素样值之间的距离,将最优代表像素样值设置为所述距离满足第一预定义条件的代表像素样值;Calculating a distance between the reconstructed pixel sample and a part or all of the representative pixel samples of the representative pixel set for the reconstructed pixel sample outside the coded block, and setting the optimal representative pixel sample value to The distance satisfies a representative pixel sample value of the first predefined condition;
在所述最优代表像素样值与所述重构像素样值之间的距离满足第二预定义条件的情况下,将所述预测值设置为所述最优代表像素样值的数值,若没有满足第二预定义条件,将所述预 测值设置为所述重构像素样值的数值。And if the distance between the optimal representative pixel sample and the reconstructed pixel sample satisfies a second predefined condition, the predicted value is set to a value of the optimal representative pixel sample, if The second predefined condition is not met, the pre- The measured value is set to the value of the reconstructed pixel sample.
在本发明的实施例中,所述距离是像素之间的误差,所述第一预定义条件为所述误差最小,所述第二预定义条件为所述误差小于第一预定阈值。In an embodiment of the invention, the distance is an error between pixels, the first predefined condition is that the error is minimal, and the second predefined condition is that the error is less than a first predetermined threshold.
在本发明的实施例中,将所述预测值设置为所述最优代表像素样值或所述重构像素样值,还包括:In an embodiment of the present invention, setting the predicted value to the optimal representative pixel sample or the reconstructed pixel sample further includes:
在所述视频码流中写入标识所述预测值的标志位;和/或,Writing a flag bit identifying the predicted value in the video bitstream; and/or,
在所述视频码流中写入构造所述预测值的条件参数,其中,满足所述条件参数的像素样值作为所述预测值。A condition parameter constructing the predicted value is written in the video code stream, wherein a pixel sample value satisfying the condition parameter is used as the predicted value.
在本发明的实施例中,在所述视频码流中写入标识所述预测值的标志位包括以下至少之一:In an embodiment of the invention, writing a flag indicating the predicted value in the video code stream comprises at least one of the following:
将用于标识为整个序列所选用的预测值的标志位写入以下至少之一的参数集:视频参数集VPS、序列参数集SPS和图像参数集PPS;Writing a flag bit for identifying a prediction value selected for the entire sequence into a parameter set of at least one of: a video parameter set VPS, a sequence parameter set SPS, and an image parameter set PPS;
将用于标识图像所选用的预测值的标志位写入图像参数集PPS和/或条带头信息;Writing a flag bit for identifying a predicted value selected for the image to the image parameter set PPS and/or the slice header information;
将用于标识块层所选用的预测值的标志位写入最大编码单元LCU和/或编码单元CU。A flag bit for identifying a prediction value selected for the block layer is written to the maximum coding unit LCU and/or the coding unit CU.
在本发明的实施例中,在所述视频码流中写入构造所述预测值的条件参数,包括以下至少之一:In an embodiment of the invention, the condition parameter constructing the predicted value is written in the video code stream, including at least one of the following:
将用于整个序列的所述预定的条件参数写入以下至少之一的参数集:视频参数集VPS、序列参数集SPS和图像参数集PPS;Writing the predetermined condition parameter for the entire sequence to a parameter set of at least one of: a video parameter set VPS, a sequence parameter set SPS, and an image parameter set PPS;
将用于图像的所述预定的条件参数写入图像参数集PPS和/或条带头信息;Writing the predetermined condition parameters for the image to the image parameter set PPS and/or the slice header information;
将用于块层的所述预定的条件参数写入最大编码单元LCU层和/或编码单元CU层。The predetermined condition parameters for the block layer are written to the maximum coding unit LCU layer and/or the coding unit CU layer.
在本发明的实施例中,In an embodiment of the invention,
所述编码块之外的重构像素样值在图像中的位置被划分成与所述编码块相邻的行和/或列;The position of the reconstructed pixel sample outside the encoded block in the image is divided into rows and/or columns adjacent to the encoded block;
若所述重构像素样值位于与所述编码块相邻的行和/或列之内,将所述预测值设置为所述代表像素集的代表像素样值的数值;And if the reconstructed pixel sample is located in a row and/or column adjacent to the coded block, setting the predicted value to a value of a representative pixel sample of the representative pixel set;
若所述重构像素样值位于与所述编码块相邻的行和/或列之外,将所述预测值设置为所述重构像素样值的数值。The predicted value is set to a value of the reconstructed pixel sample if the reconstructed pixel sample is located outside of a row and/or column adjacent to the encoded block.
在本发明的实施例中,包括:In an embodiment of the invention, the method includes:
所述预测值的标志位是从所述视频码流中可直接获得或根据所述视频码流中已有参数推导获得; The flag of the predicted value is directly obtainable from the video code stream or derived from existing parameters in the video code stream;
所述预测值的标志位用于指示从所述代表像素集的代表像素样值的数值和所述编码块之外的重构像素样值的数值中选择其中之一作为编码过程中的当前编码像素样值:The flag of the predicted value is used to indicate that one of the values of the representative pixel samples of the representative pixel set and the reconstructed pixel samples of the coded block are selected as the current encoding in the encoding process. Pixel sample:
所述标志位在所述视频码流的位置包括以下之一:The flag bit includes one of the following locations at the location of the video stream:
视频参数集,序列参数集,图像参数集,条带头,CTU头,CU头,编码块头,编码块中一个、一组或一串当前编码像素样值前。Video parameter set, sequence parameter set, image parameter set, slice header, CTU header, CU header, coding block header, one, a group or a string of current coding pixel samples in the coding block.
在本发明的实施例中,根据所述代表像素集的像素数目来确定预测值包括:In an embodiment of the present invention, determining the predicted value according to the number of pixels of the representative pixel set includes:
若所述像素数目小于第二预定阈值,将所述预测值设置为所述代表像素集的代表像素样值的数值;And if the number of pixels is less than a second predetermined threshold, setting the predicted value to a value of a representative pixel sample of the representative pixel set;
若所述像素数目不小于第二预定阈值,将所述预测值设置为所述重构像素样值的数值作为预测值。If the number of pixels is not less than a second predetermined threshold, the predicted value is set as a value of the reconstructed pixel sample as a predicted value.
根据本发明的一个实施例,提供了一种图像解码方法,包括:According to an embodiment of the present invention, an image decoding method is provided, including:
解析码流,获取解码块的解码参数,其中,所述解码参数至少包括如下参数的至少之一:构造所述解码块的代表像素集所需的参数;构造所述解码块中像素样值的预测值所需的参数;Parsing a code stream, obtaining a decoding parameter of the decoding block, where the decoding parameter includes at least one of: a parameter required to construct a representative pixel set of the decoding block; and constructing a pixel sample value in the decoding block The parameters required to predict the value;
构造所述代表像素集,确定预测值,其中,所述预测值的产生方式包括:依据重构像素样值和所述代表像素集的像素值,构造所述预测值。The representative pixel set is constructed to determine a predicted value, wherein the predicted value is generated by constructing the predicted value according to the reconstructed pixel sample and the pixel value of the representative pixel set.
在本发明的实施例中,所述解码块是图像的一个解码区域,包括以下至少之一:最大编码单元LCU、编码树单元CTU、编码单元CU、CU的子区域、预测单元PU、变换单元TU、像素串、像素组、像素微块、像素条;In an embodiment of the present invention, the decoding block is 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, and a transformation unit. TU, pixel string, pixel group, pixel microblock, pixel strip;
所述解码块之外的图像区域包括以下至少之一:所述解码块的变体之外的图像区域;已完成部分解码的像素构成的图像区域。The image area other than the decoded block includes at least one of: an image area other than the variant of the decoded block; an image area formed by the partially decoded pixel.
在本发明的实施例中,所述预测值的产生方式包括以下之一:In an embodiment of the invention, the manner in which the predicted value is generated includes one of the following:
将所述预测值设置为所述解码块之外的重构像素样值或所述重构像素样值变体;Setting the predicted value to a reconstructed pixel sample or the reconstructed pixel sample variant outside the decoded block;
将所述预测值设置为所述代表像素集的像素值或所述代表像素集的像素值变体。The predicted value is set to a pixel value of the representative pixel set or a pixel value variant of the representative pixel set.
在本发明的实施例中,使用如下预定义的解码参数的至少之一,构造所述解码块中像素样值的预测值,包括:In an embodiment of the present invention, constructing a predicted value of a pixel sample in the decoded block using at least one of the following predefined decoding parameters includes:
所述重构像素样值在图像中的位置;Reconstructing the position of the pixel sample in the image;
所述构造所述代表像素集所需的参数;Constructing the parameters required to represent the set of pixels;
所述代表像素集的像素数目;The number of pixels representing the set of pixels;
所述解码块中的当前解码像素样值的位置; a location of the currently decoded pixel sample in the decoded block;
所述解码块的像素分量的种类,其中,所述像素分量的一个像素分量或两个所述像素分量选择所述代表像素集的像素值作为预测值,所述像素分量除了所述一个像素分量或者所述两个像素分量以外的其他像素分量,选择所述重构像素样值的像素数值作为预测值;a type of a pixel component of the decoding block, wherein one pixel component or two of the pixel components of the pixel component select a pixel value of the representative pixel set as a predicted value, the pixel component except the one pixel component Or other pixel components other than the two pixel components, and selecting a pixel value of the reconstructed pixel sample as a predicted value;
所述预测值的标志位。The flag of the predicted value.
在本发明的实施例中,对于所述解码块中像素样值,所述预测值的产生方式包括:In an embodiment of the present invention, for the pixel samples in the decoding block, the manner in which the predicted value is generated includes:
对于所述解码块之外的重构像素样值,计算所述重构像素样值与所述代表像素集的部分或全部代表像素样值之间的距离,将最优代表像素样值设置为所述距离满足第一预定义条件的代表像素样值;Calculating a distance between the reconstructed pixel sample and a part or all of the representative pixel samples of the representative pixel set for the reconstructed pixel samples outside the decoded block, and setting the optimal representative pixel sample value to The distance satisfies a representative pixel sample value of the first predefined condition;
在所述最优代表像素样值与所述重构像素样值之间的距离满足第二预定义条件的情况下,将所述预测值设置为所述最优代表像素样值的数值,若没有满足第二预定义条件,将所述预测值设置为所述重构像素样值的数值。And if the distance between the optimal representative pixel sample and the reconstructed pixel sample satisfies a second predefined condition, the predicted value is set to a value of the optimal representative pixel sample, if The second predefined condition is not met and the predicted value is set to the value of the reconstructed pixel sample.
在本发明的实施例中,包括:所述距离是像素之间的误差,所述第一预定义条件为所述误差最小,所述第二预定义条件为所述误差小于第一预定阈值。In an embodiment of the invention, the method includes: the distance is an error between pixels, the first predefined condition is that the error is the smallest, and the second predefined condition is that the error is less than a first predetermined threshold.
在本发明的实施例中,将所述预测值设置为所述最优代表像素样值或所述重构像素样值,包括:In an embodiment of the present invention, setting the predicted value to the optimal representative pixel sample or the reconstructed pixel sample includes:
解析所述码流中的标志位,将所述预测值设置为所述标志位指示的值;和/或Parsing a flag bit in the code stream, setting the predicted value to a value indicated by the flag bit; and/or
解析所述码流中的条件参数,将所述预测值设置为满足所述条件参数的像素样值。A condition parameter in the code stream is parsed, and the predicted value is set to a pixel sample that satisfies the condition parameter.
在本发明的实施例中,解析所述码流中的标志位包括以下至少之一:In an embodiment of the invention, parsing the flag bits in the code stream comprises at least one of the following:
解析用于标识序列所选用的预测值的标志位所在的参数集包括以下至少之一:视频参数集VPS、序列参数集SPS、图像参数集PPS;The parameter set for parsing the flag bit used to identify the prediction value selected for the sequence includes at least one of the following: a video parameter set VPS, a sequence parameter set SPS, and an image parameter set PPS;
解析用于标识图像所选用的预测值的标志位所在的图像参数集PPS和/或条带头信息;Parsing an image parameter set PPS and/or strip header information of a flag bit for identifying a predicted value selected for the image;
解析用于标识块层所选用的预测值的标志位所在的最大编码单元LCU层和/或编码单元CU层。A maximum coding unit LCU layer and/or a coding unit CU layer in which the flag bits for identifying the prediction values selected for the block layer are located are parsed.
在本发明的实施例中,解析所述码流中预定的条件参数包括以下至少之一:In an embodiment of the invention, parsing the predetermined condition parameters in the code stream comprises at least one of the following:
解析用于序列的所述预定的条件参数所在的参数集,所述参数集包括以下至少之一:视频参数集VPS、序列参数集SPS和图像参数集PPS;Parsing a parameter set for the predetermined condition parameter of the sequence, the parameter set comprising at least one of the following: a video parameter set VPS, a sequence parameter set SPS, and an image parameter set PPS;
解析用于图像的所述预定的条件参数所在的图像参数集PPS和/或条带头信息;Parsing an image parameter set PPS and/or strip header information for the predetermined condition parameter of the image;
解析用于块层的所述预定的条件参数所在的最大编码单元LCU层和/或编码单元CU层。A maximum coding unit LCU layer and/or a coding unit CU layer in which the predetermined condition parameter for the block layer is located is parsed.
在本发明的实施例中,包括:In an embodiment of the invention, the method includes:
所述解码块之外的重构像素样值在图像中的位置被划分成与所述解码块相邻的行和/或列: The position of the reconstructed pixel samples outside the decoded block in the image is divided into rows and/or columns adjacent to the decoded block:
若所述重构像素样值位于与所述解码块相邻的行和/或列之内,将所述预测值设置为所述代表像素集的代表像素样值的数值;And if the reconstructed pixel sample is located in a row and/or column adjacent to the decoded block, setting the predicted value to a value of a representative pixel sample of the representative pixel set;
若所述重构像素样值位于与所述解码块相邻的行和/或列之外,将所述预测值设置为所述重构像素样值的数值。The predicted value is set to a value of the reconstructed pixel sample if the reconstructed pixel sample is located outside of a row and/or column adjacent to the decoded block.
在本发明的实施例中,包括:In an embodiment of the invention, the method includes:
解析以下所述码流中数据单元至少之一,获得所述预测值的标志位,所述数据单元包括以下至少之一:Parsing at least one of the data units in the code stream described below, obtaining a flag of the predicted value, the data unit comprising at least one of the following:
视频参数集,序列参数集,图像参数集,条带头,CTU头,CU头,编码块头,编码块中一个、一组或一串当前编码像素样值前;Video parameter set, sequence parameter set, image parameter set, slice header, CTU header, CU header, coding block header, one, a group or a string of current coding pixel samples before coding;
其中,所述预测值的标志位是从所述码流中可直接获得或根据所述码流中已有参数推导获得;所述预测值的标志位指示所述预测值设置为所述代表像素集的代表像素样值的数值还是所述解码块之外的重构像素样值的数值。Wherein the flag of the predicted value is directly obtained from the code stream or obtained according to an existing parameter in the code stream; the flag bit of the predicted value indicates that the predicted value is set as the representative pixel The value of the set representative pixel sample is also the value of the reconstructed pixel sample outside the decoded block.
在本发明的实施例中,根据所述代表像素集的像素数目来确定所述预测值包括:In an embodiment of the invention, determining the predicted value according to the number of pixels of the representative pixel set comprises:
若所述像素数目小于第二预定阈值,将所述预测值设置为所述代表像素集的代表像素样值的数值;And if the number of pixels is less than a second predetermined threshold, setting the predicted value to a value of a representative pixel sample of the representative pixel set;
若所述像素数目不小于第二预定阈值,将所述预测值设置为所述重构像素样值的数值。If the number of pixels is not less than a second predetermined threshold, the predicted value is set to a value of the reconstructed pixel sample.
根据本发明的另一实施例,提供了一种图像编码装置,包括:According to another embodiment of the present invention, an image encoding apparatus is provided, including:
第一确定模块,设置为构造编码块的代表像素集,确定构造所述代表像素集所需的信息;a first determining module, configured to construct a representative pixel set of the encoded block, and determine information required to construct the representative pixel set;
第二确定模块,构造所述编码块的像素样值的预测值,所述预测值的产生方式包括:依据所述编码块之外的图像区域的重构像素样值和所述代表像素集的像素值,构造所述像素样值的预测值;a second determining module, configured to construct a predicted value of the pixel sample of the encoded block, where the predicted value is generated by: reconstructing a pixel sample according to an image region other than the encoded block and the representative pixel set a pixel value that constructs a predicted value of the pixel sample;
编码模块,设置为对构造所述代表像素集所需的信息和构造所述预测值所需的信息进行编码,写入码流。An encoding module is arranged to encode information required to construct the representative set of pixels and information required to construct the predicted value, and write the code stream.
根据本发明的另一实施例,提供了一种图像解码装置,包括:According to another embodiment of the present invention, an image decoding apparatus is provided, including:
解析模块,设置为解析码流,获取解码块的解码参数,其中,所述解码参数至少包括如下参数的至少之一:构造解码块的代表像素集所需的参数,构造所述解码块中像素样值的预测值所需的参数;a parsing module, configured to parse the code stream, to obtain a decoding parameter of the decoding block, where the decoding parameter includes at least one of the following parameters: constructing a parameter required for the representative pixel set of the decoding block, and constructing a pixel in the decoding block The parameters required for the predicted value of the sample;
第三确定模块,设置为构造所述代表像素集,确定预测值,其中,所述预测值的产生方式包括:依据重构像素样值和所述代表像素集的像素值,构造所述预测值。a third determining module, configured to construct the representative pixel set, and determine a predicted value, where the predicted value is generated by: constructing the predicted value according to the reconstructed pixel sample and the pixel value of the representative pixel set .
通过本发明,构造编码块的代表像素集,确定构造该代表像素集所需的信息,构造该编码块中像素样值的预测值,该预测值的产生方式包括:依据该编码块之外的图像区域的重构 像素样值和该代表像素集的像素值,构造该像素样值的预测值,对构造该代表像素集所需的信息和构造该预测值所需的信息进行编码,写入视频码流,解决了获得预测值的这些重构像素的位置与当前块之间的距离较远,互相之间的相关性就小,压缩效率低的问题,提高了来自当前块之外的图像区域的预测值与当像素样值的相关性,有效提高了压缩效率。According to the present invention, the representative pixel set of the coding block is constructed, the information required to construct the representative pixel set is determined, and the predicted value of the pixel sample in the coding block is constructed, and the predicted value is generated according to the coding block. Image area reconstruction Pixel samples and pixel values of the representative pixel set, constructing a predicted value of the pixel sample, encoding information required to construct the representative pixel set, and information required to construct the predicted value, and writing the video code stream to solve The distance between the positions of the reconstructed pixels for obtaining the predicted values and the current block is long, the correlation between each other is small, and the compression efficiency is low, and the predicted values of the image regions from outside the current block are improved. When the pixel samples are correlated, the compression efficiency is effectively improved.
附图说明DRAWINGS
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:The drawings described herein are intended to provide a further understanding of the invention, and are intended to be a part of the invention. In the drawing:
图1是根据本发明实施例的一种图像编码方法的流程图;1 is a flow chart of an image encoding method according to an embodiment of the present invention;
图2是根据本发明实施例的一种图像解码方法的流程图;2 is a flowchart of an image decoding method according to an embodiment of the present invention;
图3是根据本发明实施例的一种图像编码装置的结构框图一;3 is a block diagram 1 of an image encoding apparatus according to an embodiment of the present invention;
图4是根据本发明实施例的一种图像解码装置的结构框图二;4 is a block diagram 2 of an image decoding apparatus according to an embodiment of the present invention;
图5是本发明优选实施例提供的获得当前像素预测值的示意图;FIG. 5 is a schematic diagram of obtaining a current pixel prediction value according to a preferred embodiment of the present invention; FIG.
图6是本发明优选实施例的编码方法的流程示意图;6 is a schematic flow chart of an encoding method according to a preferred embodiment of the present invention;
图7是本发明优选实施例提供的解码方法的流程示意图。FIG. 7 is a schematic flowchart diagram of a decoding method provided by a preferred embodiment of the present invention.
具体实施方式detailed description
下文中将参考附图并结合实施例来详细说明本发明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。The invention will be described in detail below with reference to the drawings in conjunction with the embodiments. It should be noted that the embodiments in the present application and the features in the embodiments may be combined with each other without conflict.
需要说明的是,本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。It is to be understood that the terms "first", "second" and the like in the specification and claims of the present invention are used to distinguish similar objects, and are not necessarily used to describe a particular order or order.
在本实施例中提供了一种图像编码方法,图1是根据本发明实施例的一种图像编码方法的流程图,如图1所示,该流程包括如下步骤:An image coding method is provided in this embodiment. FIG. 1 is a flowchart of an image coding method according to an embodiment of the present invention. As shown in FIG. 1, the process includes the following steps:
步骤S102,构造编码块的代表像素集,确定构造该代表像素集所需的信息;Step S102, constructing a representative pixel set of the coding block, and determining information required to construct the representative pixel set;
步骤S104,构造该编码块中像素样值的预测值,该预测值的产生方式包括:依据该编码块之外的图像区域的重构像素样值和该代表像素集的像素值,构造该像素样值的预测值;Step S104, constructing a predicted value of the pixel sample in the coded block, where the predicted value is generated by: constructing the pixel according to the reconstructed pixel sample value of the image region other than the coded block and the pixel value of the representative pixel set The predicted value of the sample;
步骤S106,对构造该代表像素集所需的信息和构造该预测值所需的信息进行编码,写入视频码流。Step S106, encoding the information required to construct the representative pixel set and the information required to construct the predicted value, and writing the video code stream.
通过上述步骤,构造编码块的代表像素集,确定构造该代表像素集所需的信息,构造该编码块中像素样值的预测值,该预测值的产生方式包括:依据该编码块之外的图像区域的重构像素样值和该代表像素集的像素值,构造该像素样值的预测值,对构造该代表像素集所需 的信息和构造该预测值所需的信息进行编码,写入视频码流,解决了获得预测值的这些重构像素的位置与当前块之间的距离较远,互相之间的相关性就小,压缩效率低的问题,提高了来自当前块之外的图像区域的预测值与当像素样值的相关性,有效提高了压缩效率。Through the above steps, constructing a representative pixel set of the coding block, determining information required for constructing the representative pixel set, and constructing a predicted value of the pixel sample value in the coding block, where the predicted value is generated according to the coding block Constructing a reconstructed pixel sample of the image region and a pixel value of the representative pixel set, constructing a predicted value of the pixel sample, and configuring the representative pixel set The information and the information needed to construct the predicted value are encoded and written into the video bitstream, which solves the problem that the position of the reconstructed pixels obtaining the predicted value is far from the current block, and the correlation between the two is small. The problem of low compression efficiency improves the correlation between the predicted value of the image region from outside the current block and the pixel sample value, and effectively improves the compression efficiency.
在本实施例中,该编码块是图像的一个编码区域,包括以下至少之一:最大编码单元LCU、编码树单元CTU、编码单元CU、CU的子区域、预测单元PU、变换单元TU、像素串、像素组、像素微块、像素条;In this embodiment, the coding block is an coding 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, and a pixel. String, pixel group, pixel microblock, pixel strip;
该编码块之外的图像区域包括以下至少之一:该编码块的变体之外的图像区域;已完成部分编码的像素构成的图像区域。The image area outside the coded block includes at least one of: an image area other than the variant of the coded block; an image area formed by the partially coded pixels.
在本实施例中,该预测值的产生方式包括以下之一:In this embodiment, the manner in which the predicted value is generated includes one of the following:
将该预测值设置为该编码块之外的重构像素样值或该重构像素样值变体;Setting the predicted value to a reconstructed pixel sample outside the encoded block or the reconstructed pixel sample variant;
将该预测值设置为该代表像素集的像素值或该代表像素集的像素值变体。The predicted value is set to a pixel value of the representative pixel set or a pixel value variant of the representative pixel set.
在本实施例中,使用如下预定义的编码参数的至少之一,构造该编码块中像素样值的预测值,包括:In this embodiment, using at least one of the following predefined encoding parameters, constructing a predicted value of the pixel sample in the encoding block, including:
该重构像素样值在图像中的位置;The position of the reconstructed pixel sample in the image;
该构造该代表像素集所需的信息;Constructing the information required to represent the set of pixels;
该代表像素集的像素数目;The number of pixels representing the set of pixels;
该编码块中的当前编码像素样值的位置;The position of the currently encoded pixel sample in the encoded block;
该编码块的像素分量的种类,其中,该像素分量的一个像素分量或两个该像素分量选择该代表像素集的像素值作为预测值,该像素分量除了该一个像素分量或者该两个像素分量以外的其他像素分量,选择该重构像素样值的像素数值作为预测值;a type of a pixel component of the coding block, wherein one pixel component of the pixel component or two pixel components select a pixel value of the representative pixel set as a predicted value, the pixel component except the one pixel component or the two pixel components a pixel value other than the pixel component, the pixel value of the reconstructed pixel sample is selected as a predicted value;
该预测值的标志位。The flag of the predicted value.
在本实施例中,对于该编码块中的像素样值,该预测值的产生方式包括:In this embodiment, for the pixel samples in the coding block, the manner in which the predicted value is generated includes:
对于该编码块之外的重构像素样值,计算该重构像素样值与该代表像素集的部分或全部代表像素样值之间的距离,将最优代表像素样值设置为该距离满足第一预定义条件的代表像素样值;Calculating a distance between the reconstructed pixel sample and a part or all of the representative pixel samples of the representative pixel set for the reconstructed pixel sample outside the coded block, and setting the optimal representative pixel sample value to satisfy the distance a representative pixel sample of the first predefined condition;
在该最优代表像素样值与该重构像素样值之间的距离满足第二预定义条件的情况下,将该预测值设置为该最优代表像素样值的数值,若没有满足第二预定义条件,将该预测值设置为该重构像素样值的数值。If the distance between the optimal representative pixel sample and the reconstructed pixel sample satisfies the second predefined condition, the predicted value is set to the value of the optimal representative pixel sample, if the second is not satisfied A predefined condition that sets the predicted value to the value of the reconstructed pixel sample.
在本实施例中,该距离是像素之间的误差,该第一预定义条件为该误差最小,该第二预定义条件为该误差小于第一预定阈值。 In this embodiment, the distance is an error between pixels, the first predefined condition is that the error is the smallest, and the second predefined condition is that the error is less than the first predetermined threshold.
在本实施例中,将该预测值设置为该最优代表像素样值或该重构像素样值包括:In this embodiment, setting the predicted value to the optimal representative pixel sample or the reconstructed pixel sample includes:
在该视频码流中写入标识该预测值的标志位;和/或,Writing a flag identifying the predicted value in the video stream; and/or,
在该视频码流中写入构造该预测值的条件参数,其中,满足该条件参数的像素样值作为该预测值。A condition parameter constructing the predicted value is written in the video code stream, wherein a pixel sample value satisfying the condition parameter is used as the predicted value.
在本实施例中,在该视频码流中写入标识该预测值的标志位包括以下至少之一:In this embodiment, writing a flag indicating the predicted value in the video code stream includes at least one of the following:
将用于标识为整个序列所选用的预测值的标志位写入以下至少之一的参数集:视频参数集VPS、序列参数集SPS和图像参数集PPS;Writing a flag bit for identifying a prediction value selected for the entire sequence into a parameter set of at least one of: a video parameter set VPS, a sequence parameter set SPS, and an image parameter set PPS;
将用于标识图像所选用的预测值的标志位写入图像参数集PPS和/或条带头信息;Writing a flag bit for identifying a predicted value selected for the image to the image parameter set PPS and/or the slice header information;
将用于标识块层所选用的预测值的标志位写入最大编码单元LCU和/或编码单元CU。A flag bit for identifying a prediction value selected for the block layer is written to the maximum coding unit LCU and/or the coding unit CU.
在本实施例中,在该视频码流中写入构造该预测值的条件参数,包括以下至少之一:In this embodiment, the condition parameter for constructing the predicted value is written in the video code stream, including at least one of the following:
将用于整个序列的该预定的条件参数写入以下至少之一的参数集:视频参数集VPS、序列参数集SPS和图像参数集PPS;Writing the predetermined condition parameter for the entire sequence to a parameter set of at least one of: a video parameter set VPS, a sequence parameter set SPS, and an image parameter set PPS;
将用于图像的该预定的条件参数写入图像参数集PPS和/或条带头信息;Writing the predetermined condition parameter for the image to the image parameter set PPS and/or the strip header information;
将用于块层的该预定的条件参数写入最大编码单元LCU层和/或编码单元CU层。The predetermined condition parameter for the block layer is written to the maximum coding unit LCU layer and/or the coding unit CU layer.
在本实施例中,该编码块之外的重构像素样值在图像中的位置被划分成与该编码块相邻的行和/或列;In this embodiment, the position of the reconstructed pixel sample outside the coded block in the image is divided into rows and/or columns adjacent to the coded block;
若该重构像素样值位于与该编码块相邻的行和/或列之内,将该预测值设置为该代表像素集的代表像素样值的数值;And if the reconstructed pixel sample is located in a row and/or column adjacent to the coded block, setting the predicted value to a value of a representative pixel sample of the representative pixel set;
若该重构像素样值位于与该编码块相邻的行和/或列之外,将该预测值设置为该重构像素样值的数值。If the reconstructed pixel sample is located outside of the row and/or column adjacent to the coded block, the predicted value is set to the value of the reconstructed pixel sample.
在本实施例中,该预测值的标志位是从该视频码流中可直接获得或根据该视频码流中已有参数推导获得;In this embodiment, the flag of the predicted value is directly obtained from the video code stream or obtained according to an existing parameter in the video code stream;
该预测值的标志位用于指示从该代表像素集的代表像素样值的数值和该编码块之外的重构像素样值的数值中选择其中之一作为编码过程中的当前编码像素样值:The flag of the predicted value is used to indicate that one of the value of the representative pixel sample value of the representative pixel set and the reconstructed pixel sample value other than the coded block is selected as the current coded pixel sample value in the encoding process. :
该标志位在该视频码流的位置包括以下之一:The flag bit includes one of the following locations in the video stream:
视频参数集,序列参数集,图像参数集,条带头,CTU头,CU头,编码块头,编码块中一个、一组或一串当前编码像素样值前。Video parameter set, sequence parameter set, image parameter set, slice header, CTU header, CU header, coding block header, one, a group or a string of current coding pixel samples in the coding block.
在本实施例中,根据该代表像素集的像素数目来确定预测值包括:In this embodiment, determining the predicted value according to the number of pixels of the representative pixel set includes:
若该像素数目小于第二预定阈值,将该预测值设置为该代表像素集的代表像素样值的数 值;If the number of pixels is less than a second predetermined threshold, setting the predicted value to the number of representative pixel samples of the representative pixel set value;
若该像素数目不小于第二预定阈值,将该预测值设置为该重构像素样值的数值作为预测值。If the number of pixels is not less than the second predetermined threshold, the predicted value is set as the value of the reconstructed pixel sample as a predicted value.
在本实施例中提供了一种图像解码方法,图2是根据本发明实施例的一种图像解码方法的流程图,如图2所示,该流程包括如下步骤:An image decoding method is provided in this embodiment. FIG. 2 is a flowchart of an image decoding method according to an embodiment of the present invention. As shown in FIG. 2, the process includes the following steps:
步骤S202,解析码流,获取解码块的解码参数,其中,该解码参数至少包括如下参数的至少之一:构造该解码块的代表像素集所需的参数;构造该解码块中像素样值的预测值所需的参数;Step S202, parsing the code stream, and acquiring a decoding parameter of the decoding block, where the decoding parameter includes at least one of the following parameters: a parameter required to construct a representative pixel set of the decoding block; and constructing a pixel sample value in the decoding block. The parameters required to predict the value;
步骤S204,构造该代表像素集,确定预测值,其中,该预测值的产生方式包括:依据重构像素样值和该代表像素集的像素值,构造该预测值。Step S204, constructing the representative pixel set to determine a predicted value, wherein the predicted value is generated by constructing the predicted value according to the reconstructed pixel sample value and the pixel value of the representative pixel set.
通过上述步骤,解析码流,获取解码块的解码参数,其中,该解码参数至少包括如下参数的至少之一:构造该解码块的代表像素集所需的参数;构造该解码块中像素样值的预测值所需的参数,构造该代表像素集,确定预测值,其中,该预测值的产生方式包括:依据重构像素样值和该代表像素集的像素值,构造该预测值,解决了获得预测值的这些重构像素的位置与当前块之间的距离较远,互相之间的相关性就小,压缩效率低的问题,提高了来自当前块之外的图像区域的预测值与当像素样值的相关性,有效提高了压缩效率。Through the above steps, the code stream is parsed to obtain a decoding parameter of the decoding block, where the decoding parameter includes at least one of the following parameters: a parameter required to construct a representative pixel set of the decoding block; and a pixel sample in the decoding block is constructed. a parameter required for predicting a value, constructing the representative pixel set, and determining a predicted value, wherein the predicted value is generated by: constructing the predicted value according to the reconstructed pixel sample and the pixel value of the representative pixel set, and solving The position of the reconstructed pixels that obtain the predicted value is far from the distance between the current blocks, the correlation between each other is small, and the compression efficiency is low, and the predicted value of the image region from outside the current block is improved. The correlation of pixel samples effectively improves the compression efficiency.
在本实施例中,该解码块是图像的一个解码区域,包括以下至少之一:最大编码单元LCU、编码树单元CTU、编码单元CU、CU的子区域、预测单元PU、变换单元TU、像素串、像素组、像素微块、像素条;In this embodiment, the decoding block is a decoding region of an image, including 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, and a pixel. String, pixel group, pixel microblock, pixel strip;
该解码块之外的图像区域包括以下至少之一:该解码块的变体之外的图像区域;已完成部分解码的像素构成的图像区域。The image area outside the decoded block includes at least one of: an image area other than the variant of the decoded block; an image area formed by the partially decoded pixel.
在本实施例中,该预测值的产生方式包括以下之一:In this embodiment, the manner in which the predicted value is generated includes one of the following:
将该预测值设置为该解码块之外的重构像素样值或该重构像素样值变体;Setting the predicted value to a reconstructed pixel sample outside the decoded block or the reconstructed pixel sample variant;
将该预测值设置为该代表像素集的像素值或该代表像素集的像素值变体。The predicted value is set to a pixel value of the representative pixel set or a pixel value variant of the representative pixel set.
在本实施例中,使用如下预定义的解码参数的至少之一,构造该解码块中像素样值的预测值,包括:In this embodiment, using at least one of the following predefined decoding parameters, constructing a predicted value of the pixel sample in the decoded block, including:
该重构像素样值在图像中的位置;The position of the reconstructed pixel sample in the image;
该构造该代表像素集所需的参数;Constructing the parameters required to represent the set of pixels;
该代表像素集的像素数目;The number of pixels representing the set of pixels;
该解码块中的当前解码像素样值的位置;The location of the currently decoded pixel sample in the decoded block;
该解码块的像素分量的种类,其中,该像素分量的一个像素分量或两个该像素分量选择 该代表像素集的像素值作为预测值,该像素分量除了该一个像素分量或者该两个像素分量以外的其他像素分量,选择该重构像素样值的像素数值作为预测值;The type of the pixel component of the decoded block, wherein one pixel component of the pixel component or two of the pixel components are selected The pixel value of the representative pixel set is used as a predicted value, and the pixel component selects a pixel value of the reconstructed pixel sample as a predicted value in addition to the one pixel component or other pixel components other than the two pixel components;
该预测值的标志位。The flag of the predicted value.
在本实施例中,对于该解码块中像素样值,该预测值的产生方式包括:In this embodiment, for the pixel samples in the decoded block, the generated manner of the predicted value includes:
对于该解码块之外的重构像素样值,计算该重构像素样值与该代表像素集的部分或全部代表像素样值之间的距离,将最优代表像素样值设置为该距离满足第一预定义条件的代表像素样值;Calculating a distance between the reconstructed pixel sample and a part or all of the representative pixel samples of the representative pixel set for the reconstructed pixel sample outside the decoded block, and setting the optimal representative pixel sample value to satisfy the distance a representative pixel sample of the first predefined condition;
在该最优代表像素样值与该重构像素样值之间的距离满足第二预定义条件的情况下,将该预测值设置为该最优代表像素样值的数值,若没有满足第二预定义条件,将该预测值设置为该重构像素样值的数值。If the distance between the optimal representative pixel sample and the reconstructed pixel sample satisfies the second predefined condition, the predicted value is set to the value of the optimal representative pixel sample, if the second is not satisfied A predefined condition that sets the predicted value to the value of the reconstructed pixel sample.
在本实施例中,该距离是像素之间的误差,该第一预定义条件为该误差最小,该第二预定义条件为该误差小于第一预定阈值。In this embodiment, the distance is an error between pixels, the first predefined condition is that the error is the smallest, and the second predefined condition is that the error is less than the first predetermined threshold.
在本实施例中,将该预测值设置为该最优代表像素样值或该重构像素样值包括:In this embodiment, setting the predicted value to the optimal representative pixel sample or the reconstructed pixel sample includes:
解析该码流中的标志位,将该预测值设置为该标志位指示的值;和/或Parsing a flag bit in the code stream, setting the predicted value to a value indicated by the flag bit; and/or
解析该码流中的条件参数,将该预测值设置为满足该条件参数的像素样值。The condition parameter in the code stream is parsed, and the predicted value is set to a pixel sample that satisfies the condition parameter.
在本实施例中,解析该码流中的标志位包括以下至少之一:In this embodiment, parsing the flag bit in the code stream includes at least one of the following:
解析用于标识序列所选用的预测值的标志位所在的参数集包括以下至少之一:视频参数集VPS、序列参数集SPS、图像参数集PPS;The parameter set for parsing the flag bit used to identify the prediction value selected for the sequence includes at least one of the following: a video parameter set VPS, a sequence parameter set SPS, and an image parameter set PPS;
解析用于标识图像所选用的预测值的标志位所在的图像参数集PPS和/或条带头信息;Parsing an image parameter set PPS and/or strip header information of a flag bit for identifying a predicted value selected for the image;
解析用于标识块层所选用的预测值的标志位所在的最大编码单元LCU层和/或编码单元CU层。A maximum coding unit LCU layer and/or a coding unit CU layer in which the flag bits for identifying the prediction values selected for the block layer are located are parsed.
在本实施例中,解析该码流中预定的条件参数包括以下至少之一:In this embodiment, parsing the predetermined condition parameter in the code stream includes at least one of the following:
解析用于序列的该预定的条件参数所在的参数集,该参数集包括以下至少之一:视频参数集VPS、序列参数集SPS和图像参数集PPS;Parsing a parameter set for the predetermined condition parameter of the sequence, the parameter set comprising at least one of the following: a video parameter set VPS, a sequence parameter set SPS, and an image parameter set PPS;
解析用于图像的该预定的条件参数所在的图像参数集PPS和/或条带头信息;Parsing an image parameter set PPS and/or strip header information for the predetermined condition parameter of the image;
解析用于块层的该预定的条件参数所在的最大编码单元LCU层和/或编码单元CU层。A maximum coding unit LCU layer and/or a coding unit CU layer in which the predetermined condition parameter for the block layer is located is parsed.
在本实施例中,该解码块之外的重构像素样值在图像中的位置被划分成与该解码块相邻的行和/或列:In this embodiment, the position of the reconstructed pixel sample outside the decoded block in the image is divided into rows and/or columns adjacent to the decoded block:
若该重构像素样值位于与该解码块相邻的行和/或列之内,将该预测值设置为该代表像素集的代表像素样值的数值; If the reconstructed pixel sample is located within a row and/or column adjacent to the decoded block, setting the predicted value to a value of a representative pixel sample of the representative pixel set;
若该重构像素样值位于与该解码块相邻的行和/或列之外,将该预测值设置为该重构像素样值的数值。If the reconstructed pixel sample is located outside of the row and/or column adjacent to the decoded block, the predicted value is set to the value of the reconstructed pixel sample.
在本实施例中,解析以下该码流中数据单元至少之一,获得该预测值的标志位,该数据单元包括以下至少之一:In this embodiment, at least one of the data units in the code stream is parsed to obtain a flag bit of the predicted value, and the data unit includes at least one of the following:
视频参数集,序列参数集,图像参数集,条带头,CTU头,CU头,编码块头,编码块中一个、一组或一串当前编码像素样值前;Video parameter set, sequence parameter set, image parameter set, slice header, CTU header, CU header, coding block header, one, a group or a string of current coding pixel samples before coding;
其中,该预测值的标志位是从该码流中可直接获得或根据该码流中已有参数推导获得;该预测值的标志位指示该预测值设置为该代表像素集的代表像素样值的数值还是该解码块之外的重构像素样值的数值。Wherein, the flag of the predicted value is directly obtained from the code stream or derived according to an existing parameter in the code stream; the flag bit of the predicted value indicates that the predicted value is set as a representative pixel sample of the representative pixel set The value is also the value of the reconstructed pixel sample outside of the decoded block.
在本实施例中,根据该代表像素集的像素数目来确定该预测值包括:In this embodiment, determining the predicted value according to the number of pixels of the representative pixel set includes:
若该像素数目小于第二预定阈值,将该预测值设置为该代表像素集的代表像素样值的数值;If the number of pixels is less than a second predetermined threshold, setting the predicted value to a value of a representative pixel sample of the representative pixel set;
若该像素数目不小于第二预定阈值,将该预测值设置为该重构像素样值的数值。If the number of pixels is not less than a second predetermined threshold, the predicted value is set to a value of the reconstructed pixel sample.
在本实施例中还提供了一种图像编码装置,该装置用于实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。An image coding device is also provided in the embodiment, which is used to implement the above-mentioned embodiments and preferred embodiments, and will not be described again. As used below, the term "module" may implement a combination of software and/or hardware of a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, hardware, or a combination of software and hardware, is also possible and contemplated.
图3是根据本发明实施例的一种图像编码装置的结构框图一,如图3所示,该装置包括:FIG. 3 is a block diagram showing the structure of an image encoding apparatus according to an embodiment of the present invention. As shown in FIG. 3, the apparatus includes:
第一确定模块32,设置为构造编码块的代表像素集,确定构造该代表像素集所需的信息;a first determining module 32, configured to construct a representative pixel set of the encoded block, and determine information required to construct the representative pixel set;
第二确定模块34,与第一确定模块32连接,设置为构造该编码块的像素样值的预测值,该预测值的产生方式包括:依据该编码块之外的图像区域的重构像素样值和该代表像素集的像素值,构造该像素样值的预测值;The second determining module 34 is connected to the first determining module 32 and configured to construct a predicted value of the pixel sample of the encoded block, where the predicted value is generated by: reconstructing a pixel according to an image region other than the encoded block Constructing a predicted value of the pixel sample value and the pixel value of the representative pixel set;
编码模块36,与第二确定模块34连接,设置为对构造该代表像素集所需的信息和构造该预测值所需的信息进行编码,写入码流。The encoding module 36 is coupled to the second determining module 34 and configured to encode the information required to construct the representative set of pixels and the information required to construct the predicted value, and write the code stream.
通过上述步骤,第一确定模块32构造编码块的代表像素集,确定构造该代表像素集所需的信息,第二确定模块34构造该编码块的像素样值的预测值,该预测值的产生方式包括:依据该编码块之外的图像区域的重构像素样值和该代表像素集的像素值,构造该像素样值的预测值,编码模块36对构造该代表像素集所需的信息和构造该预测值所需的信息进行编码,写入码流,解决了获得预测值的这些重构像素的位置与当前块之间的距离较远,互相之间的相关性就小,压缩效率低的问题,提高了来自当前块之外的图像区域的预测值与当像素样值的相关性,有效提高了压缩效率。Through the above steps, the first determining module 32 constructs a representative pixel set of the coding block, determines information required to construct the representative pixel set, and the second determining module 34 constructs a predicted value of the pixel sample of the encoded block, and the generation of the predicted value The method includes: constructing a predicted value of the pixel sample according to the reconstructed pixel sample of the image region outside the coded block and the pixel value of the representative pixel set, and the encoding module 36 constructs the information required for the representative pixel set and The information required to construct the predicted value is encoded and written into the code stream, which solves the problem that the positions of the reconstructed pixels for obtaining the predicted value are far from the current block, the correlation between the two is small, and the compression efficiency is low. The problem is that the correlation between the predicted value of the image region from the current block and the pixel sample is improved, and the compression efficiency is effectively improved.
图4是根据本发明实施例的一种图像解码装置的结构框图二,如图4所示,该装置包括: FIG. 4 is a second structural block diagram of an image decoding apparatus according to an embodiment of the present invention. As shown in FIG. 4, the apparatus includes:
解析模块42,设置为解析码流,获取解码块的解码参数,其中,该解码参数至少包括如下参数的至少之一:构造解码块的代表像素集所需的参数,构造该解码块中像素样值的预测值所需的参数;The parsing module 42 is configured to parse the code stream, and obtain a decoding parameter of the decoding block, where the decoding parameter includes at least one of the following parameters: constructing a parameter required for the representative pixel set of the decoding block, and constructing a pixel sample in the decoding block The required parameters for the predicted value of the value;
第三确定模块44,与解析模块42连接,设置为构造该代表像素集,确定预测值,其中,该预测值的产生方式包括:依据重构像素样值和该代表像素集的像素值,构造该预测值。The third determining module 44 is connected to the parsing module 42 and configured to construct the representative pixel set to determine a predicted value, where the predicted value is generated according to the reconstructed pixel sample value and the pixel value of the representative pixel set, The predicted value.
通过上述步骤,解析模块42解析码流,获取解码块的解码参数,其中,该解码参数至少包括如下参数的至少之一:构造解码块的代表像素集所需的参数,构造该解码块中像素样值的预测值所需的参数,第三确定模块44构造该代表像素集,确定预测值,其中,该预测值的产生方式包括:依据重构像素样值和该代表像素集的像素值,构造该预测值,解决了获得预测值的这些重构像素的位置与当前块之间的距离较远,互相之间的相关性就小,压缩效率低的问题,提高了来自当前块之外的图像区域的预测值与当像素样值的相关性,有效提高了压缩效率。Through the above steps, the parsing module 42 parses the code stream to obtain the decoding parameters of the decoding block, where the decoding parameter includes at least one of the following parameters: constructing parameters required for the representative pixel set of the decoding block, and constructing the pixels in the decoding block. The third determining module 44 constructs the representative pixel set to determine a predicted value, wherein the predicted value is generated according to the reconstructed pixel sample and the pixel value of the representative pixel set. Constructing the predicted value solves the problem that the position of the reconstructed pixels obtained by obtaining the predicted value is far from the current block, the correlation between each other is small, and the compression efficiency is low, and the problem from the current block is improved. The correlation between the predicted value of the image area and the pixel sample value effectively improves the compression efficiency.
需要说明的是,上述各个模块是可以通过软件或硬件来实现的,对于后者,可以通过以下方式实现,但不限于此:上述模块均位于同一处理器中;或者,上述模块分别位于多个处理器中。It should be noted that each of the above modules may be implemented by software or hardware. For the latter, the foregoing may be implemented by, but not limited to, the foregoing modules are all located in the same processor; or, the modules are located in multiple In the processor.
下面结合本发明优选实施例进行详细说明。The following is a detailed description in conjunction with the preferred embodiments of the invention.
本发明优选实施例的主要技术特征是在对一个当前块进行编码或解码时,构造一个当前块的代表像素集,从当前块之外的图像区域的重构像素样值和当前块的代表像素集的像素数值,可选地结合其他编解码参数,根据预定的规则获得部分或全部当前像素样值的预测值。The main technical feature of the preferred embodiment of the present invention is that when encoding or decoding a current block, constructing a representative pixel set of the current block, reconstructing pixel samples from the image region outside the current block and representative pixels of the current block The set of pixel values, optionally in combination with other codec parameters, obtains predicted values for some or all of the current pixel samples according to predetermined rules.
图5是本发明优选实施例提供的获得当前像素预测值的示意图,从当前块构造一个含8个代表像素的代表像素集。对当前块的部分或全部像素,从当前块之外的图像区域的重构像素和当前块的代表像素,获得当前块的部分或全部像素的预测值。FIG. 5 is a schematic diagram of obtaining a current pixel prediction value according to a preferred embodiment of the present invention, constructing a representative pixel set of 8 representative pixels from a current block. For some or all of the pixels of the current block, the predicted values of some or all of the pixels of the current block are obtained from the reconstructed pixels of the image region outside the current block and the representative pixels of the current block.
图5中表示的像素可以是叠包格式,也可以是平面格式。因而本发明优选实施例的方法,既可以适用于对叠包格式的编码块或解码块的像素的编码或解码,也可以适用于对平面格式的编码块或解码块的一个平面的像素样值的编码或解码。The pixel shown in FIG. 5 may be in a stacked format or a flat format. Therefore, the method of the preferred embodiment of the present invention can be applied to encoding or decoding pixels of a coded block or a decoded block of a stacked packet format, and can also be applied to a pixel sample of a plane of a coded block or a decoded block of a planar format. Encoding or decoding.
本发明优选实施例的编码方法中,最基本的特有技术特征是:统计和分析当前编码块的特性,构造一个当前编码块的代表像素集,也称调色板;搜索得到与当前编码块的像素最匹配的预测值;所述预测值的产生方式包括但不限于从当前编码块之外的图像区域的重构像素样值和当前编码块的代表像素集的像素数值,可选地结合其他编码参数,根据预定的规则计算获得;把构造所述代表像素集所需要的信息写入视频压缩码流,把获得预测值所需要的信息写入视频压缩码流。In the encoding method of the preferred embodiment of the present invention, the most basic unique technical features are: counting and analyzing the characteristics of the current coding block, constructing a representative pixel set of the current coding block, also called a color palette; searching for the current coding block a predicted value of the pixel that best matches; the manner in which the predicted value is generated includes, but is not limited to, a reconstructed pixel sample from an image region other than the current encoded block and a pixel value of a representative pixel set of the current encoded block, optionally in combination with other The encoding parameters are obtained according to a predetermined rule; the information required to construct the representative pixel set is written into the video compressed code stream, and the information required to obtain the predicted value is written into the video compressed code stream.
本发明优选实施例的解码方法中,最基本的特有技术特征是,在对当前解码块的压缩码流数据进行解码时,从码流数据中解析得到构造当前解码块的代表像素集,也称调色板所需要的信息,解析得到计算获得当前解码块的像素的预测值所需要的信息;所述预测值的计算 方式包括但不限于从当前解码块之外的图像区域的重构像素样值和当前解码块的代表像素集的像素数值,可选地结合其他解码参数,根据预定的规则计算获得。In the decoding method of the preferred embodiment of the present invention, the most basic characteristic feature is that when the compressed code stream data of the current decoding block is decoded, the representative pixel set constructing the current decoding block is parsed from the code stream data, which is also called The information required by the palette is parsed to obtain the information required to obtain the predicted value of the pixel of the current decoded block; the calculation of the predicted value The manner includes, but is not limited to, reconstructed pixel samples from image regions outside the current decoded block and pixel values of representative pixel sets of the current decoded block, optionally in combination with other decoding parameters, calculated according to predetermined rules.
以上通过若干特定的具体实例说明本发明的技术特征。本领域技术人员可由本说明书所揭示的内容轻易地了解本发明的其他优点与功效。本发明还可以通过另外不同的具体实施方式加以实施或应用,本说明书中的各项细节也可以基于不同观点与应用,在不背离本发明的精神下进行各种修饰或改变。The technical features of the present invention have been described above by way of a number of specific specific examples. 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.
图6是本发明优选实施例的编码方法的流程示意图,如图6所示,本发明的编码方法包括但不限于如下步骤:FIG. 6 is a schematic flowchart of an encoding method according to a preferred embodiment of the present invention. As shown in FIG. 6, the encoding method of the present invention includes but is not limited to the following steps:
S601,构造编码块的代表像素集,至少产生出构造所述代表像素集所需的信息;S601. Construct a representative pixel set of the coding block, at least generating information required to construct the representative pixel set;
S602,对所述编码块进行预测或复制编码,至少产生出所述编码块的像素样值的预测值,所述预测值的产生方式包括但不限于从所述编码块之外的图像区域的重构像素样值和所述代表像素集的像素数值,可选地结合其他编码参数,根据预定的规则计算获得;所述重构像素样值在图像区域中的位置通常由所述重构像素样值与当前编码像素样值之间的位移矢量(也称移动矢量或复制位置等)来指定;S602. Perform prediction or copy coding on the coding block, and generate at least a prediction value of a pixel sample of the coding block, where the prediction value is generated by, but not limited to, an image region other than the coding block. Reconstructing pixel values and pixel values of the representative set of pixels, optionally in combination with other encoding parameters, calculated according to predetermined rules; the position of the reconstructed pixel samples in the image region is typically determined by the reconstructed pixels Specify the displacement vector (also called the motion vector or copy position, etc.) between the sample and the current encoded pixel sample;
S603,至少对构造所述代表像素集所需的信息和获得预测值所需的信息进行编码并写入视频压缩码流。S603, encoding at least information required to construct the representative pixel set and information required to obtain a predicted value, and writing the video compressed code stream.
图7是本发明优选实施例提供的解码方法的流程示意图,如图3所示,本发明的解码方法包括但不限于如下步骤:FIG. 7 is a schematic flowchart of a decoding method according to a preferred embodiment of the present invention. As shown in FIG. 3, the decoding method of the present invention includes but is not limited to the following steps:
S701,解析视频码流,至少获得构造解码块的代表像素集所需的信息和获得所述解码块的像素样值的预测值所需的信息;S701. Analyze a video code stream, and obtain at least information required to construct a representative pixel set of the decoded block and information required to obtain a predicted value of the pixel sample value of the decoded block;
S702,构造所述代表像素集;S702. Construct the representative pixel set.
S703,至少产生出所述预测值,所述预测值的产生方式包括但不限于从所述解码块之外的图像区域的重构像素样值和所述代表像素集的像素数值,可选地结合其他解码参数,根据预定的规则计算获得。所述重构像素样值在图像区域中的位置通常由所述重构像素样值与当前解码像素样值之间的位移矢量(也称移动矢量或复制位置等)来指定。S703, generating at least the predicted value, where the predicted value is generated by, but not limited to, a reconstructed pixel sample from an image region other than the decoded block and a pixel value of the representative pixel set, optionally Combined with other decoding parameters, the calculation is obtained according to a predetermined rule. The position of the reconstructed pixel sample in the image region is typically specified by a displacement vector (also referred to as a motion vector or copy position, etc.) between the reconstructed pixel sample and the currently decoded pixel sample.
以上所提供的图示仅以示意方式说明本发明的基本构想,图示中仅显示与本发明直接有关的组件而非按照实际实施时的组件数目、形状及尺寸绘制,其实际实施时各组件的型态、数量及比例可为一种随意的改变,且其组件布局型态也可能更为复杂。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.
当前编码块或当前解码块的变体,当前编码块或当前解码块的一种变体是待编码或待解码的像素组或像素串或像素微块和像素条。相应地,所述编码块或所述解码块之外的图像区域是已完成至少部分编码的像素或已完成至少部分解码的像素构成的图像区域。 A variant of the current coding block or current decoding block, a variant of the current coding block or the current decoding block is a pixel group or pixel string or pixel micro-block and pixel strip to be encoded or to be decoded. Correspondingly, the image area outside the coding block or the decoding block is an image area composed of pixels that have completed at least partial encoding or pixels that have completed at least partial decoding.
本发明优选实施例中预测值的产生方式的实施例1Embodiment 1 of the manner in which the predicted value is generated in the preferred embodiment of the present invention
所述预测值的产生方式至少包括下列步骤:根据预定的规则,选择所述编解码块之外的重构像素样值或其变体作为预测值,或者选择所述代表像素集的像素数值或其变体作为预测值。在一个编解码块中,部分或全部当前像素样值采用所述编解码块之外的重构像素样值或其变体作为预测值,部分或全部当前像素样值采用所述代表像素集的像素数值或其变体作为预测值。所述变体包括但不限于滤波和变换。The manner of generating the predicted value includes at least the following steps: selecting a reconstructed pixel sample or a variant thereof other than the codec block as a predicted value according to a predetermined rule, or selecting a pixel value of the representative pixel set or Its variant is used as a predictor. In a codec block, some or all of the current pixel samples adopt reconstructed pixel samples or variants thereof outside the codec block as prediction values, and some or all of the current pixel samples adopt the representative pixel set The pixel value or its variant is used as the predicted value. Such variants include, but are not limited to, filtering and transforming.
本发明优选实施例中预测值的产生方式的实施例2Embodiment 2 of the manner in which the predicted value is generated in the preferred embodiment of the present invention
所述预测值的产生方式中至少包括至少根据下列参数的部分或全部或组合来确定所述预测值:The manner in which the predicted value is generated includes at least determining the predicted value based on at least part or all or a combination of the following parameters:
1)所述编解码块之外的重构像素样值在当前图像中的位置;所述位置通常由位移矢量(也称移动矢量或复制位置等)来指定;1) a position of the reconstructed pixel sample outside the codec block in the current image; the position is usually specified by a displacement vector (also called a motion vector or a copy position, etc.);
2)所述编解码块之外的重构像素样值的数值;所述重构像素样值通常由位移矢量(也称移动矢量或复制位置等)来指定其位置;2) a value of the reconstructed pixel sample outside the codec block; the reconstructed pixel sample is usually specified by a displacement vector (also referred to as a motion vector or a copy position, etc.);
3)所述编解码块的代表像素样值的数值;3) a value of a representative pixel sample value of the codec block;
4)所述编解码块的代表像素集的构造;4) a construction of a representative pixel set of the codec block;
5)所述编解码块的代表像素集的像素数目;5) the number of pixels of the representative pixel set of the codec block;
6)所述编解码块中的当前编解码像素样值的位置;6) a location of a current codec pixel sample value in the codec block;
7)根据像素分量的种类来选择,一个像素分量(如Y分量)或两个像素分量(如G分量和R分量)选择代表像素样值的数值作为预测值,其他像素分量选择所述编解码块之外的重构像素样值的数值作为预测值;所述重构像素样值通常由位移矢量(也称移动矢量或复制位置等)来指定其位置;7) selecting according to the kind of the pixel component, one pixel component (such as Y component) or two pixel components (such as G component and R component) selecting a value representing the pixel sample as a predicted value, and other pixel components selecting the codec The value of the reconstructed pixel sample outside the block is used as a predicted value; the reconstructed pixel sample is usually specified by a displacement vector (also called a motion vector or a copy position, etc.);
8)码流中直接获取或隐含推导的标志位。8) A flag bit that is directly or implicitly derived in the code stream.
本发明优选实施例中预测值的产生方式的实施例3Embodiment 3 of the manner in which the predicted value is generated in the preferred embodiment of the present invention
对于所述编解码块的一个当前像素样值,所述预测值的产生方式至少包括下列步骤:For a current pixel sample of the codec block, the manner in which the predicted value is generated includes at least the following steps:
对于所述编解码块之外的一个重构像素样值,计算所述重构像素样值与所述代表像素集的部分或全部代表像素样值之间的距离,确定一个所述距离最优的代表像素样值,称之为最优代表像素样值;Determining a distance between the reconstructed pixel sample and a portion or all of the representative pixel samples of the representative pixel set for a reconstructed pixel sample other than the codec block The representative pixel sample is called the optimal representative pixel sample;
如果所述最优代表像素样值与所述重构像素样值之间的距离满足预定的条件,则选择所述最优代表像素样值的数值作为预测值,否则,选择所述重构像素样值的数值作为预测值。If the distance between the optimal representative pixel sample and the reconstructed pixel sample satisfies a predetermined condition, the value of the optimal representative pixel sample is selected as a predicted value, otherwise, the reconstructed pixel is selected The value of the sample is used as the predicted value.
本发明优选实施例中预测值的产生方式的实施例4 Embodiment 4 of the manner in which the predicted value is generated in the preferred embodiment of the present invention
实施例3中的所述距离是像素之间的误差,所述预定的条件是小于预定的阈值。即,对于所述编解码块的一个当前像素样值,所述预测值的产生方式至少包括下列步骤:The distance in Embodiment 3 is an error between pixels, which is less than a predetermined threshold. That is, for a current pixel sample of the codec block, the manner in which the predicted value is generated includes at least the following steps:
1)对于所述编解码块之外的一个重构像素样值,计算所述重构像素样值与所述代表像素集的部分或全部代表像素样值之间的误差,确定一个所述误差小的代表像素样值,称之为最优代表像素样值;1) calculating, for a reconstructed pixel sample other than the codec block, an error between the reconstructed pixel sample and a part or all of the representative pixel sample of the representative pixel set, determining one of the errors Small representative pixel samples, called optimal representative pixel samples;
2)如果所述最优代表像素样值与所述重构像素样值之间的误差小于预定的阈值,则选择所述最优代表像素样值的数值作为预测值,否则,选择所述重构像素样值的数值作为预测值。2) if the error between the optimal representative pixel sample and the reconstructed pixel sample is less than a predetermined threshold, selecting a value of the optimal representative pixel sample as a predicted value; otherwise, selecting the weight Construct the value of the pixel sample as the predicted value.
本发明优选实施例中预测值的产生方式的实施例5Embodiment 5 of the manner in which the predicted value is generated in the preferred embodiment of the present invention
实施例2中的所述编解码块之外的重构像素样值在当前图像中的位置被划分成与所述编解码块直接相邻的若干行和/或列(通常1-5行和/或1-5列)以及其余的位置:The position of the reconstructed pixel sample outside the codec block in Embodiment 2 in the current image is divided into a number of rows and/or columns directly adjacent to the codec block (typically 1-5 lines and / or 1-5 columns) and the rest of the location:
1)如果所述重构像素样值位于与所述编解码块直接相邻的若干行和/或列之内,则选择代表像素样值的数值作为预测值;1) if the reconstructed pixel sample is located within a number of rows and/or columns directly adjacent to the codec block, selecting a value representative of the pixel sample as the predicted value;
2)否则,即所述重构像素样值位于与所述编解码块直接相邻的若干行和/或列之外,则选择所述重构像素样值的数值作为预测值。2) Otherwise, that is, the reconstructed pixel samples are located outside of a number of rows and/or columns directly adjacent to the codec block, the value of the reconstructed pixel samples is selected as the predicted value.
本发明优选实施例中预测值的产生方式的实施例6Embodiment 6 of the manner in which the predicted value is generated in the preferred embodiment of the present invention
实施例2中所述标志位在码流中下列地方直接或间接(隐含推导的形式)出现,以确定其后的编解码过程中的当前编解码像素样值是选择代表像素样值的数值作为预测值还是选择所述编解码块之外的重构像素样值的数值作为预测值:The flag bit described in Embodiment 2 appears directly or indirectly (implicitly derived form) in the following places in the code stream to determine that the current codec pixel value in the subsequent codec process is a value that selects a representative pixel value. As the predicted value, the value of the reconstructed pixel sample other than the codec block is selected as the predicted value:
1)视频参数集;通常是是视频参数集VPS的一个直接存在或隐含推导的语法元素;1) a video parameter set; typically a grammatical element of a direct or implicit derivation of the video parameter set VPS;
2)序列参数集;通常是是序列参数集SPS的一个直接存在或隐含推导的语法元素;2) a sequence parameter set; usually a grammatical element of a direct or implicit derivation of the sequence parameter set SPS;
3)图像参数集;通常是图像参数集PPS的一个直接存在或隐含推导的语法元素;3) an image parameter set; usually a grammatical element of the direct or implicit derivation of the image parameter set PPS;
4)条带头;通常是条带slice头的一个直接存在或隐含推导的语法元素;4) a strip head; usually a grammatical element of a direct or implicit derivation of a stripe header;
5)CTU头;通常是CTU头的一个直接存在或隐含推导的语法元素;5) CTU header; usually a grammatical element of a direct or implicit derivation of the CTU header;
6)CU头;通常是CU头的一个直接存在或隐含推导的语法元素;6) CU header; usually a grammatic element of a direct or implicit derivation of the CU header;
7)编解码块头;通常是编解码块头的一个直接存在或隐含推导的语法元素;7) a codec block header; usually a syntax element of a direct or implicit derivation of the codec block header;
8)编解码块中一个或一组或一串当前编解码像素样值前;通常是编解码块中一个或一组或一串当前编解码像素样值的语法元素前的一个直接存在或隐含推导的语法元素。8) before the codec block one or a group or a string of current codec pixel samples; usually one of the codec blocks or a set or a string of current codec pixel samples before the syntax element directly exists or hidden Contains derived syntax elements.
本发明优选实施例中预测值的产生方式的实施例7Embodiment 7 of the manner in which the predicted value is generated in the preferred embodiment of the present invention
根据实施例2中所述编解码块的代表像素集的像素数目来确定预测值: The predicted value is determined according to the number of pixels of the representative pixel set of the codec block described in Embodiment 2:
1)如果所述像素数目小于一个阈值,则选择代表像素样值的数值作为预测值;1) if the number of pixels is less than a threshold, selecting a value representing a pixel sample as a predicted value;
2)否则,则选择所述重构像素样值的数值作为预测值。2) Otherwise, the value of the reconstructed pixel sample is selected as the predicted value.
本发明优选实施例中预测值的产生方式的实施例8Embodiment 8 of the manner in which the predicted value is generated in the preferred embodiment of the present invention
对于实施例3或实施例4所述方法中,编码器选择使用所述最优代表像素样值与所述重构像素样值之一作为预测值。For the method of embodiment 3 or embodiment 4, the encoder chooses to use one of the optimal representative pixel samples and the reconstructed pixel samples as the predicted value.
可选地,编码器设置标志位,用于标识所选用的预测值,使用下述方法的至少之一将所述标志位写入码流:(方法一)将用于标识为整个序列所选用的预测值的标志位写入视频参数集VPS、序列参数集SPS、图像参数集PPS中的一个或多个参数集;(方法二)将用于标识图像所选用的预测值的标志位写入图像参数集PPS、分片(又称条带)头信息中的至少之一;(方法三)将用于标识块层所选用的预测值的标志位写入最大编码单元(或编码树单元CTU)层、编码单元CU层中的至少之一。对应地,解码器通过解析码流,获得所述标志位的取值,根据标志位的取值确定解码过程中选用所述最优代表像素样值还是所述重构像素样值作为预测值。Optionally, the encoder sets a flag bit for identifying the selected prediction value, and writing the flag bit to the code stream using at least one of the following methods: (Method 1) is used to identify the selected sequence for the entire sequence. The flag of the predicted value is written into one or more parameter sets of the video parameter set VPS, the sequence parameter set SPS, and the image parameter set PPS; (method 2) the flag bits for identifying the predicted value used for the image are written. At least one of image parameter set PPS, slice (also called stripe) header information; (method 3) writing a flag bit for identifying a prediction value selected for the block layer to a maximum coding unit (or coding tree unit CTU) At least one of a layer, a coding unit CU layer. Correspondingly, the decoder obtains the value of the flag bit by parsing the code stream, and determines whether the optimal representative pixel sample value or the reconstructed pixel sample value is used as the predicted value in the decoding process according to the value of the flag bit.
可选地,编码器不将用于标识所选用的预测值的标志位写入码流,编码器默认使用满足预定的条件的预测值候选作为编码过程中使用的预测值。对应地,解码器使用与编码器相同的预定条件,选择满足该条件的预测值候选作为解码过程中使用的预测值。Alternatively, the encoder does not write a flag bit for identifying the selected prediction value to the code stream, and the encoder defaults to using the prediction value candidate that satisfies the predetermined condition as the prediction value used in the encoding process. Correspondingly, the decoder selects the predicted value candidate satisfying the condition as the predicted value used in the decoding process using the same predetermined condition as the encoder.
可选地,编码器不将用于标识所选用的预测值的标志位写入码流,编码器使用满足预定条件的预测值候选作为编码过程中使用的预测值,同时,编码器将所述预定条件的参数写入码流,使用下述方法的至少之一将所述预定条件的参数写入码流:(方法一)将用于整个序列的所述预定条件的参数写入视频参数集VPS、序列参数集SPS、图像参数集PPS中的一个或多个参数集;(方法二)将用于标识图像的所述预定条件的参数写入图像参数集PPS、分片头信息中的至少之一;(方法三)将用于标识块层的所述预定条件的参数写入最大编码单元(或编码树单元CTU)层、编码单元CU层中的至少之一。对应地,解码器通过解析码流,获得所述预定条件的参数,根据所述参数和预定条件,选择满足所述预定条件的预测值候选作为解码过程中使用的预测值。Optionally, the encoder does not write the flag bit for identifying the selected prediction value into the code stream, and the encoder uses the prediction value candidate that satisfies the predetermined condition as the prediction value used in the encoding process, and at the same time, the encoder will The parameter of the predetermined condition is written into the code stream, and the parameter of the predetermined condition is written into the code stream using at least one of the following methods: (Method 1) writing the parameter for the predetermined condition of the entire sequence to the video parameter set One or more parameter sets in the VPS, the sequence parameter set SPS, and the image parameter set PPS; (method 2) writing parameters for identifying the predetermined condition of the image to at least one of the image parameter set PPS and the slice header information (Method 3) The parameter for identifying the predetermined condition of the block layer is written into at least one of a maximum coding unit (or coding tree unit CTU) layer and a coding unit CU layer. Correspondingly, the decoder obtains the parameters of the predetermined condition by parsing the code stream, and selects the predicted value candidate satisfying the predetermined condition as the predicted value used in the decoding process according to the parameter and the predetermined condition.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本发明各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware, but in many cases, the former is A better implementation. Based on such understanding, the technical solution of the present invention, which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk, The optical disc includes a number of instructions for causing a terminal device (which may be a cell phone, a computer, a server, or a network device, etc.) to perform the methods described in various embodiments of the present invention.
本发明的实施例还提供了一种存储介质。可选地,在本实施例中,上述存储介质可以被设置为存储用于执行以下步骤的程序代码:Embodiments of the present invention also provide a storage medium. Optionally, in the embodiment, the foregoing storage medium may be configured to store program code for performing the following steps:
S1,构造编码块的代表像素集,获取构造所述代表像素集所需的信息; S1, constructing a representative pixel set of the coded block, and acquiring information required to construct the representative pixel set;
S2,对所述编码块进行预测编码或复制编码,获取所述编码块的像素样值的预测值,所述预测值的产生方式包括:依据所述编码块之外的图像区域的重构像素样值和所述代表像素集的像素数值,并结合预定义的编码参数,根据预定的规则计算获得所述预测值;S2, performing prediction coding or copy coding on the coding block, and acquiring a prediction value of a pixel sample of the coding block, where the prediction value is generated by: reconstructing a pixel according to an image region other than the coding block And a pixel value of the representative pixel set, and combined with a predefined encoding parameter, the predicted value is obtained according to a predetermined rule;
S3,对构造所述代表像素集所需的信息和获取所述预测值所需的信息进行编码,写入视频码流。S3, encoding information required to construct the representative pixel set and information required to acquire the predicted value, and writing the video code stream.
可选地,在本实施例中,上述存储介质可以包括但不限于:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。Optionally, in this embodiment, the foregoing storage medium may include, but not limited to, a USB flash drive, a Read-Only Memory (ROM), a Random Access Memory (RAM), a mobile hard disk, and a magnetic memory. A variety of media that can store program code, such as a disc or a disc.
可选地,在本实施例中,处理器根据存储介质中已存储的程序代码执行上述实施例的方法和步骤。Optionally, in this embodiment, the processor performs the methods and steps of the foregoing embodiments according to the stored program code in the storage medium.
可选地,本实施例中的具体示例可以参考上述实施例及可选实施方式中所描述的示例,本实施例在此不再赘述。For example, the specific examples in this embodiment may refer to the examples described in the foregoing embodiments and the optional embodiments, and details are not described herein again.
显然,本领域的技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。It will be apparent to those skilled in the art that the various modules or steps of the present invention described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may be different from the order herein. The steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps thereof are fabricated as a single integrated circuit module. Thus, the invention is not limited to any specific combination of hardware and software.
以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above description is only the preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes can be made to the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and scope of the present invention are intended to be included within the scope of the present invention.
工业实用性Industrial applicability
基于本发明实施例提供的上述技术方案,构造编码块的代表像素集,确定构造该代表像素集所需的信息,构造该编码块中像素样值的预测值,该预测值的产生方式包括:依据该编码块之外的图像区域的重构像素样值和该代表像素集的像素值,构造该像素样值的预测值,对构造该代表像素集所需的信息和构造该预测值所需的信息进行编码,写入视频码流,解决了获得预测值的这些重构像素的位置与当前块之间的距离较远,互相之间的相关性就小,压缩效率低的问题,提高了来自当前块之外的图像区域的预测值与当像素样值的相关性,有效提高了压缩效率。 Based on the foregoing technical solution provided by the embodiment of the present invention, a representative pixel set of a coded block is constructed, and information required for constructing the representative pixel set is determined, and a predicted value of the pixel sample value in the coded block is constructed, where the predicted value is generated by: Constructing a predicted value of the pixel sample according to the reconstructed pixel sample of the image region outside the coded block and the pixel value of the representative pixel set, the information required to construct the representative pixel set and the need to construct the predicted value The information is encoded and written into the video code stream, which solves the problem that the position of the reconstructed pixels obtaining the predicted value is far from the current block, the correlation between the two is small, and the compression efficiency is low, and the problem is improved. The correlation between the predicted value of the image region from outside the current block and the pixel sample value effectively improves the compression efficiency.

Claims (26)

  1. 一种图像编码方法,包括:An image encoding method comprising:
    构造编码块的代表像素集,确定构造所述代表像素集所需的信息;Constructing a representative set of pixels of the encoded block, determining information required to construct the representative set of pixels;
    构造所述编码块中像素样值的预测值,所述预测值的产生方式包括:依据所述编码块之外的图像区域的重构像素样值和所述代表像素集的像素值,构造所述像素样值的预测值;And constructing a predicted value of the pixel sample in the coding block, where the predicted value is generated by: reconstructing a pixel sample value of the image region other than the coded block and a pixel value of the representative pixel set, The predicted value of the pixel sample;
    对构造所述代表像素集所需的信息和构造所述预测值所需的信息进行编码,写入视频码流。The information required to construct the representative set of pixels and the information required to construct the predicted values are encoded and written to the video stream.
  2. 根据权利要求1所述的方法,其中,The method of claim 1 wherein
    所述编码块是图像的一个编码区域,包括以下至少之一:最大编码单元LCU、编码树单元CTU、编码单元CU、CU的子区域、预测单元PU、变换单元TU、像素串、像素组、像素微块、像素条;The coding block is an coding region of an image, including 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, a pixel string, a pixel group, Pixel microblocks, pixel strips;
    所述编码块之外的图像区域包括以下至少之一:所述编码块的变体之外的图像区域;已完成部分编码的像素构成的图像区域。The image area other than the coded block includes at least one of: an image area other than the variant of the coded block; an image area formed by the partially coded pixels.
  3. 根据权利要求1所述的方法,其中,所述预测值的产生方式包括以下之一:The method of claim 1, wherein the manner in which the predicted value is generated comprises one of the following:
    将所述预测值设置为所述编码块之外的重构像素样值或所述重构像素样值变体;Setting the predicted value to a reconstructed pixel sample or the reconstructed pixel sample variant outside the encoded block;
    将所述预测值设置为所述代表像素集的像素值或所述代表像素集的像素值变体。The predicted value is set to a pixel value of the representative pixel set or a pixel value variant of the representative pixel set.
  4. 根据权利要求1所述的方法,其中,使用如下预定义的编码参数的至少之一,构造所述编码块中像素样值的预测值,包括:The method of claim 1 wherein constructing a predicted value of a pixel sample in the encoded block using at least one of the following predefined encoding parameters comprises:
    所述重构像素样值在图像中的位置;Reconstructing the position of the pixel sample in the image;
    所述构造所述代表像素集所需的信息;Constructing the information required to represent the set of pixels;
    所述代表像素集的像素数目;The number of pixels representing the set of pixels;
    所述编码块中的当前编码像素样值的位置;a location of a current encoded pixel sample in the encoded block;
    所述编码块的像素分量的种类,其中,所述像素分量的一个像素分量或两个所述像素分量选择所述代表像素集的像素值作为预测值,所述像素分量除了所述一个像素分量或者所述两个像素分量以外的其他像素分量,选择所述重构像素样值的像素数值作为预测值;a type of a pixel component of the coding block, wherein one pixel component or two of the pixel components of the pixel component select a pixel value of the representative pixel set as a predicted value, the pixel component except the one pixel component Or other pixel components other than the two pixel components, and selecting a pixel value of the reconstructed pixel sample as a predicted value;
    所述预测值的标志位。The flag of the predicted value.
  5. 根据权利要求1所述的方法,其中,对于所述编码块中的像素样值,所述预测值的产生方式包括: The method of claim 1, wherein for the pixel samples in the encoded block, the manner in which the predicted values are generated comprises:
    对于所述编码块之外的重构像素样值,计算所述重构像素样值与所述代表像素集的部分或全部代表像素样值之间的距离,将最优代表像素样值设置为所述距离满足第一预定义条件的代表像素样值;Calculating a distance between the reconstructed pixel sample and a part or all of the representative pixel samples of the representative pixel set for the reconstructed pixel sample outside the coded block, and setting the optimal representative pixel sample value to The distance satisfies a representative pixel sample value of the first predefined condition;
    在所述最优代表像素样值与所述重构像素样值之间的距离满足第二预定义条件的情况下,将所述预测值设置为所述最优代表像素样值的数值,若没有满足第二预定义条件,将所述预测值设置为所述重构像素样值的数值。And if the distance between the optimal representative pixel sample and the reconstructed pixel sample satisfies a second predefined condition, the predicted value is set to a value of the optimal representative pixel sample, if The second predefined condition is not met and the predicted value is set to the value of the reconstructed pixel sample.
  6. 根据权利要求5所述的方法,其中,The method of claim 5, wherein
    所述距离是像素之间的误差,所述第一预定义条件为所述误差最小,所述第二预定义条件为所述误差小于第一预定阈值。The distance is an error between pixels, the first predefined condition is that the error is minimal, and the second predefined condition is that the error is less than a first predetermined threshold.
  7. 根据权利要求5或6所述的方法,其中,将所述预测值设置为所述最优代表像素样值或所述重构像素样值,还包括:The method according to claim 5 or 6, wherein setting the predicted value to the optimal representative pixel sample or the reconstructed pixel sample further comprises:
    在所述视频码流中写入标识所述预测值的标志位;和/或,Writing a flag bit identifying the predicted value in the video bitstream; and/or,
    在所述视频码流中写入构造所述预测值的条件参数,其中,满足所述条件参数的像素样值作为所述预测值。A condition parameter constructing the predicted value is written in the video code stream, wherein a pixel sample value satisfying the condition parameter is used as the predicted value.
  8. 根据权利要求7所述的方法,其中,在所述视频码流中写入标识所述预测值的标志位包括以下至少之一:The method of claim 7 wherein writing a flag identifying the predicted value in the video bitstream comprises at least one of:
    将用于标识为整个序列所选用的预测值的标志位写入以下至少之一的参数集:视频参数集VPS、序列参数集SPS和图像参数集PPS;Writing a flag bit for identifying a prediction value selected for the entire sequence into a parameter set of at least one of: a video parameter set VPS, a sequence parameter set SPS, and an image parameter set PPS;
    将用于标识图像所选用的预测值的标志位写入图像参数集PPS和/或条带头信息;Writing a flag bit for identifying a predicted value selected for the image to the image parameter set PPS and/or the slice header information;
    将用于标识块层所选用的预测值的标志位写入最大编码单元LCU和/或编码单元CU。A flag bit for identifying a prediction value selected for the block layer is written to the maximum coding unit LCU and/or the coding unit CU.
  9. 根据权利要求7所述的方法,其中,在所述视频码流中写入构造所述预测值的条件参数,包括以下至少之一:The method of claim 7, wherein the condition parameter constructing the predicted value is written in the video code stream, including at least one of the following:
    将用于整个序列的所述预定的条件参数写入以下至少之一的参数集:视频参数集VPS、序列参数集SPS和图像参数集PPS;Writing the predetermined condition parameter for the entire sequence to a parameter set of at least one of: a video parameter set VPS, a sequence parameter set SPS, and an image parameter set PPS;
    将用于图像的所述预定的条件参数写入图像参数集PPS和/或条带头信息;Writing the predetermined condition parameters for the image to the image parameter set PPS and/or the slice header information;
    将用于块层的所述预定的条件参数写入最大编码单元LCU层和/或编码单元CU层。The predetermined condition parameters for the block layer are written to the maximum coding unit LCU layer and/or the coding unit CU layer.
  10. 根据权利要求4所述的方法,其中,The method of claim 4, wherein
    所述编码块之外的重构像素样值在图像中的位置被划分成与所述编码块相邻的行和/或列;The position of the reconstructed pixel sample outside the encoded block in the image is divided into rows and/or columns adjacent to the encoded block;
    若所述重构像素样值位于与所述编码块相邻的行和/或列之内,将所述预测值设置为 所述代表像素集的代表像素样值的数值;If the reconstructed pixel sample is located within a row and/or column adjacent to the encoded block, setting the predicted value to a value representative of a pixel sample of the set of pixels;
    若所述重构像素样值位于与所述编码块相邻的行和/或列之外,将所述预测值设置为所述重构像素样值的数值。The predicted value is set to a value of the reconstructed pixel sample if the reconstructed pixel sample is located outside of a row and/or column adjacent to the encoded block.
  11. 根据权利要求4所述的方法,其中,包括:The method of claim 4, comprising:
    所述预测值的标志位是从所述视频码流中可直接获得或根据所述视频码流中已有参数推导获得;The flag of the predicted value is directly obtainable from the video code stream or derived from existing parameters in the video code stream;
    所述预测值的标志位用于指示从所述代表像素集的代表像素样值的数值和所述编码块之外的重构像素样值的数值中选择其中之一作为编码过程中的当前编码像素样值:The flag of the predicted value is used to indicate that one of the values of the representative pixel samples of the representative pixel set and the reconstructed pixel samples of the coded block are selected as the current encoding in the encoding process. Pixel sample:
    所述标志位在所述视频码流的位置包括以下之一:The flag bit includes one of the following locations at the location of the video stream:
    视频参数集,序列参数集,图像参数集,条带头,CTU头,CU头,编码块头,编码块中一个、一组或一串当前编码像素样值前。Video parameter set, sequence parameter set, image parameter set, slice header, CTU header, CU header, coding block header, one, a group or a string of current coding pixel samples in the coding block.
  12. 根据权利要求4所述的方法,其中,根据所述代表像素集的像素数目来确定预测值包括:The method of claim 4, wherein determining the predicted value based on the number of pixels of the representative set of pixels comprises:
    若所述像素数目小于第二预定阈值,将所述预测值设置为所述代表像素集的代表像素样值的数值;And if the number of pixels is less than a second predetermined threshold, setting the predicted value to a value of a representative pixel sample of the representative pixel set;
    若所述像素数目不小于第二预定阈值,将所述预测值设置为所述重构像素样值的数值作为预测值。If the number of pixels is not less than a second predetermined threshold, the predicted value is set as a value of the reconstructed pixel sample as a predicted value.
  13. 一种图像解码方法,包括:An image decoding method includes:
    解析码流,获取解码块的解码参数,其中,所述解码参数至少包括如下参数的至少之一:构造所述解码块的代表像素集所需的参数;构造所述解码块中像素样值的预测值所需的参数;Parsing a code stream, obtaining a decoding parameter of the decoding block, where the decoding parameter includes at least one of: a parameter required to construct a representative pixel set of the decoding block; and constructing a pixel sample value in the decoding block The parameters required to predict the value;
    构造所述代表像素集,确定预测值,其中,所述预测值的产生方式包括:依据重构像素样值和所述代表像素集的像素值,构造所述预测值。The representative pixel set is constructed to determine a predicted value, wherein the predicted value is generated by constructing the predicted value according to the reconstructed pixel sample and the pixel value of the representative pixel set.
  14. 根据权利要求13所述的方法,其中,The method of claim 13 wherein
    所述解码块是图像的一个解码区域,包括以下至少之一:最大编码单元LCU、编码树单元CTU、编码单元CU、CU的子区域、预测单元PU、变换单元TU、像素串、像素组、像素微块、像素条;The decoding block is a decoding region of an image, including 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, a pixel string, a pixel group, Pixel microblocks, pixel strips;
    所述解码块之外的图像区域包括以下至少之一:所述解码块的变体之外的图像区域;已完成部分解码的像素构成的图像区域。The image area other than the decoded block includes at least one of: an image area other than the variant of the decoded block; an image area formed by the partially decoded pixel.
  15. 根据权利要求13所述的方法,其中,所述预测值的产生方式包括以下之一:The method of claim 13, wherein the manner in which the predicted value is generated comprises one of the following:
    将所述预测值设置为所述解码块之外的重构像素样值或所述重构像素样值变体; Setting the predicted value to a reconstructed pixel sample or the reconstructed pixel sample variant outside the decoded block;
    将所述预测值设置为所述代表像素集的像素值或所述代表像素集的像素值变体。The predicted value is set to a pixel value of the representative pixel set or a pixel value variant of the representative pixel set.
  16. 根据权利要求13所述的方法,其中,使用如下预定义的解码参数的至少之一,构造所述解码块中像素样值的预测值,包括:The method of claim 13 wherein constructing a predicted value of a pixel sample in the decoded block using at least one of the predefined decoding parameters comprises:
    所述重构像素样值在图像中的位置;Reconstructing the position of the pixel sample in the image;
    所述构造所述代表像素集所需的参数;Constructing the parameters required to represent the set of pixels;
    所述代表像素集的像素数目;The number of pixels representing the set of pixels;
    所述解码块中的当前解码像素样值的位置;a location of the currently decoded pixel sample in the decoded block;
    所述解码块的像素分量的种类,其中,所述像素分量的一个像素分量或两个所述像素分量选择所述代表像素集的像素值作为预测值,所述像素分量除了所述一个像素分量或者所述两个像素分量以外的其他像素分量,选择所述重构像素样值的像素数值作为预测值;a type of a pixel component of the decoding block, wherein one pixel component or two of the pixel components of the pixel component select a pixel value of the representative pixel set as a predicted value, the pixel component except the one pixel component Or other pixel components other than the two pixel components, and selecting a pixel value of the reconstructed pixel sample as a predicted value;
    所述预测值的标志位。The flag of the predicted value.
  17. 根据权利要求13所述的方法,其中,对于所述解码块中像素样值,所述预测值的产生方式包括:The method of claim 13 wherein, for the pixel samples in the decoded block, the manner in which the predicted values are generated comprises:
    对于所述解码块之外的重构像素样值,计算所述重构像素样值与所述代表像素集的部分或全部代表像素样值之间的距离,将最优代表像素样值设置为所述距离满足第一预定义条件的代表像素样值;Calculating a distance between the reconstructed pixel sample and a part or all of the representative pixel samples of the representative pixel set for the reconstructed pixel samples outside the decoded block, and setting the optimal representative pixel sample value to The distance satisfies a representative pixel sample value of the first predefined condition;
    在所述最优代表像素样值与所述重构像素样值之间的距离满足第二预定义条件的情况下,将所述预测值设置为所述最优代表像素样值的数值,若没有满足第二预定义条件,将所述预测值设置为所述重构像素样值的数值。And if the distance between the optimal representative pixel sample and the reconstructed pixel sample satisfies a second predefined condition, the predicted value is set to a value of the optimal representative pixel sample, if The second predefined condition is not met and the predicted value is set to the value of the reconstructed pixel sample.
  18. 根据权利要求17所述的方法,其中,包括:The method of claim 17 comprising:
    所述距离是像素之间的误差,所述第一预定义条件为所述误差最小,所述第二预定义条件为所述误差小于第一预定阈值。The distance is an error between pixels, the first predefined condition is that the error is minimal, and the second predefined condition is that the error is less than a first predetermined threshold.
  19. 根据权利要求17或18所述的方法,其中,将所述预测值设置为所述最优代表像素样值或所述重构像素样值,包括:The method according to claim 17 or 18, wherein setting the predicted value to the optimal representative pixel sample or the reconstructed pixel sample comprises:
    解析所述码流中的标志位,将所述预测值设置为所述标志位指示的值;和/或Parsing a flag bit in the code stream, setting the predicted value to a value indicated by the flag bit; and/or
    解析所述码流中的条件参数,将所述预测值设置为满足所述条件参数的像素样值。A condition parameter in the code stream is parsed, and the predicted value is set to a pixel sample that satisfies the condition parameter.
  20. 根据权利要求19所述的方法,其中,解析所述码流中的标志位包括以下至少之一:The method of claim 19 wherein parsing the flag bits in the code stream comprises at least one of:
    解析用于标识序列所选用的预测值的标志位所在的参数集包括以下至少之一:视频参数集VPS、序列参数集SPS、图像参数集PPS; The parameter set for parsing the flag bit used to identify the prediction value selected for the sequence includes at least one of the following: a video parameter set VPS, a sequence parameter set SPS, and an image parameter set PPS;
    解析用于标识图像所选用的预测值的标志位所在的图像参数集PPS和/或条带头信息;Parsing an image parameter set PPS and/or strip header information of a flag bit for identifying a predicted value selected for the image;
    解析用于标识块层所选用的预测值的标志位所在的最大编码单元LCU层和/或编码单元CU层。A maximum coding unit LCU layer and/or a coding unit CU layer in which the flag bits for identifying the prediction values selected for the block layer are located are parsed.
  21. 根据权利要求19所述方法,其中,解析所述码流中预定的条件参数包括以下至少之一:The method of claim 19 wherein parsing the predetermined condition parameters in the code stream comprises at least one of:
    解析用于序列的所述预定的条件参数所在的参数集,所述参数集包括以下至少之一:视频参数集VPS、序列参数集SPS和图像参数集PPS;Parsing a parameter set for the predetermined condition parameter of the sequence, the parameter set comprising at least one of the following: a video parameter set VPS, a sequence parameter set SPS, and an image parameter set PPS;
    解析用于图像的所述预定的条件参数所在的图像参数集PPS和/或条带头信息;Parsing an image parameter set PPS and/or strip header information for the predetermined condition parameter of the image;
    解析用于块层的所述预定的条件参数所在的最大编码单元LCU层和/或编码单元CU层。A maximum coding unit LCU layer and/or a coding unit CU layer in which the predetermined condition parameter for the block layer is located is parsed.
  22. 根据权利要求16所述的方法,其中,包括:The method of claim 16 comprising:
    所述解码块之外的重构像素样值在图像中的位置被划分成与所述解码块相邻的行和/或列:The position of the reconstructed pixel samples outside the decoded block in the image is divided into rows and/or columns adjacent to the decoded block:
    若所述重构像素样值位于与所述解码块相邻的行和/或列之内,将所述预测值设置为所述代表像素集的代表像素样值的数值;And if the reconstructed pixel sample is located in a row and/or column adjacent to the decoded block, setting the predicted value to a value of a representative pixel sample of the representative pixel set;
    若所述重构像素样值位于与所述解码块相邻的行和/或列之外,将所述预测值设置为所述重构像素样值的数值。The predicted value is set to a value of the reconstructed pixel sample if the reconstructed pixel sample is located outside of a row and/or column adjacent to the decoded block.
  23. 根据权利要求16所述的方法,其中,包括:The method of claim 16 comprising:
    解析以下所述码流中数据单元至少之一,获得所述预测值的标志位,所述数据单元包括以下至少之一:Parsing at least one of the data units in the code stream described below, obtaining a flag of the predicted value, the data unit comprising at least one of the following:
    视频参数集,序列参数集,图像参数集,条带头,CTU头,CU头,编码块头,编码块中一个、一组或一串当前编码像素样值前;Video parameter set, sequence parameter set, image parameter set, slice header, CTU header, CU header, coding block header, one, a group or a string of current coding pixel samples before coding;
    其中,所述预测值的标志位是从所述码流中可直接获得或根据所述码流中已有参数推导获得;所述预测值的标志位指示所述预测值设置为所述代表像素集的代表像素样值的数值还是所述解码块之外的重构像素样值的数值。Wherein the flag of the predicted value is directly obtained from the code stream or obtained according to an existing parameter in the code stream; the flag bit of the predicted value indicates that the predicted value is set as the representative pixel The value of the set representative pixel sample is also the value of the reconstructed pixel sample outside the decoded block.
  24. 根据权利要求16所述的方法,其中,根据所述代表像素集的像素数目来确定所述预测值包括:The method of claim 16 wherein determining the predicted value based on the number of pixels of the representative set of pixels comprises:
    若所述像素数目小于第二预定阈值,将所述预测值设置为所述代表像素集的代表像素样值的数值;And if the number of pixels is less than a second predetermined threshold, setting the predicted value to a value of a representative pixel sample of the representative pixel set;
    若所述像素数目不小于第二预定阈值,将所述预测值设置为所述重构像素样值的数值。 If the number of pixels is not less than a second predetermined threshold, the predicted value is set to a value of the reconstructed pixel sample.
  25. 一种图像编码装置,包括:An image encoding device comprising:
    第一确定模块,设置为构造编码块的代表像素集,确定构造所述代表像素集所需的信息;a first determining module, configured to construct a representative pixel set of the encoded block, and determine information required to construct the representative pixel set;
    第二确定模块,构造所述编码块的像素样值的预测值,所述预测值的产生方式包括:依据所述编码块之外的图像区域的重构像素样值和所述代表像素集的像素值,构造所述像素样值的预测值;a second determining module, configured to construct a predicted value of the pixel sample of the encoded block, where the predicted value is generated by: reconstructing a pixel sample according to an image region other than the encoded block and the representative pixel set a pixel value that constructs a predicted value of the pixel sample;
    编码模块,设置为对构造所述代表像素集所需的信息和构造所述预测值所需的信息进行编码,写入码流。An encoding module is arranged to encode information required to construct the representative set of pixels and information required to construct the predicted value, and write the code stream.
  26. 一种图像解码装置,包括:An image decoding device comprising:
    解析模块,设置为解析码流,获取解码块的解码参数,其中,所述解码参数至少包括如下参数的至少之一:构造解码块的代表像素集所需的参数,构造所述解码块中像素样值的预测值所需的参数;a parsing module, configured to parse the code stream, to obtain a decoding parameter of the decoding block, where the decoding parameter includes at least one of the following parameters: constructing a parameter required for the representative pixel set of the decoding block, and constructing a pixel in the decoding block The parameters required for the predicted value of the sample;
    第三确定模块,设置为构造所述代表像素集,确定预测值,其中,所述预测值的产生方式包括:依据重构像素样值和所述代表像素集的像素值,构造所述预测值。 a third determining module, configured to construct the representative pixel set, and determine a predicted value, where the predicted value is generated by: constructing the predicted value according to the reconstructed pixel sample and the pixel value of the representative pixel set .
PCT/CN2016/072039 2015-01-26 2016-01-25 Image coding/decoding method and apparatus WO2016119666A1 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
EP16742728.5A EP3253055A4 (en) 2015-01-26 2016-01-25 Image coding/decoding method and apparatus
US15/551,945 US10666971B2 (en) 2015-01-26 2016-01-25 Method and device for image coding and method and device for image decoding
US16/853,895 US11082718B2 (en) 2015-01-26 2020-04-21 Method and device for coding image and method and device for decoding image

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN201510037769.5 2015-01-26
CN201510037769 2015-01-26
CN201610045722.8A CN105828080B (en) 2015-01-26 2016-01-22 Image coding and decoding method and device
CN201610045722.8 2016-01-22

Related Child Applications (2)

Application Number Title Priority Date Filing Date
US15/551,945 A-371-Of-International US10666971B2 (en) 2015-01-26 2016-01-25 Method and device for image coding and method and device for image decoding
US16/853,895 Continuation US11082718B2 (en) 2015-01-26 2020-04-21 Method and device for coding image and method and device for decoding image

Publications (1)

Publication Number Publication Date
WO2016119666A1 true WO2016119666A1 (en) 2016-08-04

Family

ID=56542419

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/072039 WO2016119666A1 (en) 2015-01-26 2016-01-25 Image coding/decoding method and apparatus

Country Status (1)

Country Link
WO (1) WO2016119666A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0790742A2 (en) * 1996-02-19 1997-08-20 Fuji Xerox Co., Ltd. Predictive image coding and decoding system
CN102984523A (en) * 2012-12-14 2013-03-20 北京大学 Multi-directional intra-frame forecast encoding and decoding method and device
CN104244007A (en) * 2013-06-13 2014-12-24 上海天荷电子信息有限公司 Image compression method and device based on arbitrary shape matching

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0790742A2 (en) * 1996-02-19 1997-08-20 Fuji Xerox Co., Ltd. Predictive image coding and decoding system
CN102984523A (en) * 2012-12-14 2013-03-20 北京大学 Multi-directional intra-frame forecast encoding and decoding method and device
CN104244007A (en) * 2013-06-13 2014-12-24 上海天荷电子信息有限公司 Image compression method and device based on arbitrary shape matching

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3253055A4 *

Similar Documents

Publication Publication Date Title
US20230362374A1 (en) Encoding and decoding methods and apparatuses with multiple image block division manners
JP6523324B2 (en) Image encoding / decoding method and apparatus
WO2015120818A1 (en) Picture coding and decoding methods and devices
CN105491376B (en) Image coding and decoding method and device
US20190246106A1 (en) Method and device for encoding or decoding encoding unit of picture outline
CN104754362B (en) Image compression method using fine-divided block matching
US11917168B2 (en) Image encoding and decoding methods, image processing device, and computer storage medium
US10575022B2 (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
KR102532391B1 (en) Video encoding method and apparatus and video decoding method and apparatus
WO2016202189A1 (en) Image coding and decoding methods, image processing device, and computer storage medium
CN105992003B (en) Image compression method and device for numbering palette colors according to ordering or frequency
CN106303534B (en) Image compression method and device for multiple index string and pixel string fusion copy modes
CN106303535B (en) Image compression method and device with reference pixels taken from different-degree reconstruction pixels
US11082718B2 (en) Method and device for coding image and method and device for decoding image
JP2022546898A (en) Video image processing method, apparatus and storage medium
WO2016197893A1 (en) Image encoding and decoding method, image processing device, and computer storage medium
WO2016119666A1 (en) Image coding/decoding method and apparatus
WO2016124154A1 (en) Image coding method and apparatus, and image decoding method and apparatus
CN105828079B (en) Image processing method and device
WO2016119667A1 (en) Image processing method and apparatus
TW202029754A (en) Scans and last coefficient position coding for zero-out transforms

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

REEP Request for entry into the european phase

Ref document number: 2016742728

Country of ref document: EP