[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN107483942B - Decoding method of video data compressed code stream, encoding method and device of video data - Google Patents

Decoding method of video data compressed code stream, encoding method and device of video data Download PDF

Info

Publication number
CN107483942B
CN107483942B CN201710424248.4A CN201710424248A CN107483942B CN 107483942 B CN107483942 B CN 107483942B CN 201710424248 A CN201710424248 A CN 201710424248A CN 107483942 B CN107483942 B CN 107483942B
Authority
CN
China
Prior art keywords
sampling format
sampling
decoding
coding
format
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710424248.4A
Other languages
Chinese (zh)
Other versions
CN107483942A (en
Inventor
林涛
李明
吴钊
吴平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tongji University
ZTE Corp
Original Assignee
Tongji University
ZTE Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tongji University, ZTE Corp filed Critical Tongji University
Publication of CN107483942A publication Critical patent/CN107483942A/en
Application granted granted Critical
Publication of CN107483942B publication Critical patent/CN107483942B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/186Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a colour or a chrominance component
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/176Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a block, e.g. a macroblock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/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/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/184Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being bits, e.g. of the compressed video stream
    • 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
    • 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/593Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving spatial prediction techniques
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards

Landscapes

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

Abstract

The invention provides a decoding method and a device of a video data compressed code stream, and a video data encoding method and a device, wherein the decoding method of the video data compressed code stream comprises the following steps: analyzing the compressed code stream of the video data to obtain sampling format information and/or decoding mode information; selecting a first sampling format and a decoding mode corresponding to the first sampling format from a plurality of preset sampling formats and decoding modes according to the sampling format information and/or the decoding mode information; and decoding the decoding block by adopting the first sampling format and a decoding mode corresponding to the first sampling format. The invention solves the technical problem that the efficiency is low when the decoding is carried out by adopting a single format and a decoding mode in the related technology.

Description

Decoding method of video data compressed code stream, encoding method and device of video data
Technical Field
The invention relates to the field of data processing, in particular to a method and a device for decoding compressed code streams of video data and encoding the video data.
Background
As human society enters the era of big data, cloud computing, mobile computing, cloud-mobile computing, ultra-high definition (4K) and ultra-high definition (8K) video image resolution, 4G/5G communication, virtual reality, ultra-high compression ratio and ultra-high quality data compression are indispensable for various data including big data, image data, video data.
A data set is a set of data elements (e.g., bytes, bits, pixels). When a data set (e.g., a file, a frame of image, a video sequence) arranged in a certain shape and having a certain number of elements (i.e., in a certain sampling format) is encoded (and correspondingly decoded), the data set is typically divided into a plurality of subsets of blocks having a predetermined shape and size (i.e., number of elements), referred to as encoding blocks (from a decoding perspective, i.e., decoding blocks, encoding and decoding blocks), and a block is encoded or decoded in units of encoding and decoding blocks. At any one time, the coding block being coded is referred to as the current coding block. At any one time, the decoding block being decoded is referred to as the current decoding block. The current encoded block or current decoded block is collectively referred to as a current encoded block or simply a current block. The data element being encoded or decoded (simply referred to as an element) is referred to as the current encoded data element or the current decoded data element, collectively referred to as the current data element, simply referred to as the current element. The element consists of N components (typically 1. Ltoreq.N.ltoreq.5), so both the dataset and the codec block consist of N components. For example, elements, i.e., pixels, of one frame image are arranged in a rectangular shape, have a size (resolution) of 1920 (width) x 1080 (height), and are composed of 3 components: g (green) component, B (blue) component, R (red) component or Y (luminance) component, U (Cb chrominance) component, V (Cr chrominance) component.
In the related art, both the data set and the codec block, which are the encoding targets, have only one fixed sampling format and size. For example, for computer-generated graphics and text-containing images, a sampling format called 4:4:4 is typically used, i.e., 3 components of the data set all have the same sampling rate and size (i.e., number of component samples). For natural images and video captured by a camera, a sampling format called 4:2:0 is typically used, i.e. the sampling rate and size of 2 components (D and E components), respectively, of a data set (e.g. image or video) having a rectangular shape and 3 components is one quarter of the other component (F component). In this case, one D component D [ i ] [ j ] and one E component E [ i ] [ j ] correspond to four (2×2) F components F [2i ] [2j ], F [2i+1] [2j ], F [2i ] [2j+1], F [2i+1] [2j+1]. If the resolution of the F component is 2mx2n, i.e., the F component of the dataset is f= { F [ i ] [ j ]: i=0-2M-1, j=0-2N-1, then the resolution of the D and E components are m×n, respectively, i.e., the D and E components of the dataset are d= { D [ i ] [ j ]: i=0 to M-1, j=0 to N-1} and e= { E [ i ] [ j ]: i=0 to M-1, j=0 to N-1}. Yet another sampling format, known as 4:2:2, is that the sampling rate and size of 2 components (D and E components), respectively, of a data set (e.g., image or video) having a rectangular shape and 3 components is one-half of the other component (F component). In this case, in the horizontal direction of a data set (e.g., image or video), one D component D [ i ] [ j ] and one E component E [ i ] [ j ] correspond to two (2×1) F components F [2i ] [ j ] and F [2i+1] [ j ]. If the resolution of the F component is 2 mxn, i.e., the F component of the dataset is f= { F [ i ] [ j ]: i=0-2M-1, j=0-N-1, then the resolution of the D and E components are m×n, respectively, i.e., the D and E components of the dataset are d= { D [ i ] [ j ]: i=0 to M-1, j=0 to N-1} and e= { E [ i ] [ j ]: i=0 to M-1, j=0 to N-1}. In images and video in YUV color format, the F, D, E components described above are Y, U, V components, respectively. In images and video in RGB color format, the F, D, E components described above are G, B, R components, respectively. In the prior art, even in some cases, the data set and the codec block as the encoding objects have multiple sampling formats and sizes, and when encoding the encoding objects with different sampling formats and sizes, the same encoding mode or different encoding modes are adopted, so that the encoding object with a single sampling format and size is always encoded. Here, different sampling formats refer to different sampling rates and sizes (i.e., numbers of component samples) for at least one component of the data set and/or the codec block. The different sample rates and sizes are converted to each other by either an upsampling operation or a downsampling operation. The upsampling operation is an operation of increasing the number of samples. The downsampling operation is an operation that reduces the number of samples. Thus, different sampling formats, i.e. data sets and/or at least one component of a codec block, have different numbers of samples.
For a data set formed by mixing contents with various characteristics, for example, screen content images and videos formed by mixing graphics and characters generated by a computer with natural images and videos shot by a camera and virtual reality images and videos, a single sampling format and size and a single coding mode in nature greatly influence the improvement of data compression efficiency.
In view of the above problems in the related art, no effective solution has been found yet.
Disclosure of Invention
The embodiment of the invention provides a method and a device for decoding compressed code streams of video data and encoding the video data, which at least solve the technical problem that the efficiency is low when a single format and decoding mode are adopted for decoding in the related technology.
According to an embodiment of the present invention, there is provided a decoding method of a compressed bitstream of video data, further including: analyzing the compressed code stream of the video data to obtain sampling format information and/or decoding mode information; selecting a first sampling format and a decoding mode corresponding to the first sampling format from a plurality of preset sampling formats and decoding modes according to the sampling format information and/or the decoding mode information; and decoding the decoding block by adopting the first sampling format and a decoding mode corresponding to the first sampling format.
Optionally, the video data compression bitstream includes a data compression bitstream of at least one of the following information: one-dimensional data, two-dimensional data, a sequence of images, video, audio, files, bytes, bits, pixels, data composed of three components, an image having a rectangular shape, a sequence of images having a rectangular shape, an image composed of three components, an image sequence composed of three components, a video composed of three components, an image sequence composed of R components, G components, B components, a video composed of R components, G components, B components, an image composed of one luminance component and two chrominance components, an image sequence composed of one luminance component and two chrominance components, a video composed of one luminance component and two chrominance components, and encoded blocks of data.
Optionally, the decoding block is a decoding area of an image, wherein the decoding area comprises at least one of: sub-pictures of a picture, macro-blocks, largest coding units LCU, coding tree units CTU, coding units CU, sub-regions of a CU, prediction units PU, transform units TU.
Optionally, the plurality of sampling formats includes a main sampling format and other sampling formats, wherein the other sampling formats are sampling formats obtained by sampling operation of the main sampling format.
Optionally, the video data compression stream has a rectangular shape and a data compression stream of images or sequences of images of three components.
Optionally, the plurality of sampling formats are a 4:4:4 sampling format and a 4:2:0 sampling format; alternatively, the plurality of sampling formats are a 4:4:4 sampling format and a 4:2:2 sampling format; alternatively, the plurality of sampling formats are a 4:2:2 sampling format and a 4:2:0 sampling format.
Optionally, the decoding manner corresponding to the 4:2:0 sampling format includes: generating a data version in a 4:2:0 sampling format, and converting the data version in the 4:2:0 sampling format into the data version in the 4:4:4 or 4:2:2 sampling format through an up-sampling operation, wherein the method for generating the data version in the 4:2:0 sampling format comprises the following steps: generating a data version in a 4:2:0 sampling format according to the operation of intra-frame prediction when adjacent pixels of the decoding block are used, and/or generating a data version in a 4:2:0 sampling format according to the operation of inter-frame prediction when adjacent images of the decoding image are used; the decoding mode corresponding to the 4:4:4 or 4:2:2 sampling format comprises the following steps: generating a data version in a 4:4:4 or 4:2:2 sampling format according to a prediction operation, and converting the data version in the 4:4:4 or 4:2:2 sampling format into the data version in a 4:2:0 sampling format through a downsampling operation, wherein the prediction operation comprises a string prediction operation.
Optionally, the decoding mode includes at least one of: performing intra prediction according to adjacent pixels of the decoding block; inter-prediction from neighboring pictures of the decoded picture; performing inter-frame transformation according to adjacent images of the decoded image; scaling; universal string prediction; decoding a palette; dictionary decoding; and (5) entropy decoding.
Optionally, the method further comprises: analyzing the compressed code stream of the video data, and obtaining a first zone bit from one of the following positions: the video decoder comprises a sequence parameter set, a picture parameter set, a sequence header, a strip header, a picture header, a CTU header, a CU header and a decoding block header, wherein the first flag bit is used for indicating that decoding is allowed to be performed by adopting a plurality of sampling formats and/or corresponding decoding modes.
Optionally, the method further comprises: analyzing the video data compressed code stream, and acquiring a second zone bit from at least one of the following positions: a sequence parameter set, an image parameter set, a sequence header, a stripe header, an image header, and a decoding block header, wherein the second flag bit is used for indicating that the decoding block adopting a 4:4:4 sampling format and/or a corresponding string prediction decoding mode is allowed to be used.
Optionally, the method further comprises: analyzing the video data compressed code stream, and acquiring a third zone bit from at least one of the following positions: a sequence parameter set, an image parameter set, a sequence header, a stripe header, an image header, and a decoding block header, wherein the third flag bit is used for indicating that the decoding block adopting the 4:2:2 sampling format and/or the corresponding string prediction decoding mode is allowed to be used.
Optionally, one of the predetermined plurality of sampling formats and decoding modes corresponds to a predetermined value k, and a sampling format and a corresponding decoding mode identification code of direct or indirect or direct-indirect mixture are obtained for the decoding block from the compressed video data code stream.
Optionally, the direct sampling format and corresponding decoding mode identification code are composed of one or more bit strings in the video data compressed code stream; the indirect sampling format and the corresponding decoding mode identification code are sampling formats and corresponding decoding mode identification codes derived from other decoding parameters except the decoding mode parameters and/or other syntax elements of the video data compression code stream except the syntax elements corresponding to the decoding mode parameters; the direct-indirect mixed sampling format and the corresponding decoding mode identification code are partial direct-partial indirect mixed sampling format and the corresponding decoding mode identification code.
Optionally, the sampling format and the identification code corresponding to the decoding mode are acquired from the following positions of the compressed code stream of the video data: the decoding block header information syntax element, the sampling format, the corresponding decoding mode identification code syntax element, the additional decoding block header information syntax element and the decoding block data syntax element; or the decoding block header information syntax element, the partial sampling format and corresponding decoding mode identification code syntax element, the additional decoding block header information syntax element, the partial decoding block data syntax element, the other partial sampling format and corresponding decoding mode identification code syntax element, the other partial decoding block data syntax element; and when the value of the identification code syntax element is equal to a specified value, decoding the decoding block by adopting a sampling format corresponding to the specified value and a corresponding decoding mode.
According to another embodiment of the present invention, there is provided a video data encoding method including: selecting a first sampling format from a predetermined plurality of sampling formats, and selecting a coding mode corresponding to the first sampling format from a predetermined plurality of coding modes; encoding the encoded blocks of video data using the selected first sampling format and the selected encoding scheme to produce a compressed video data stream, wherein the compressed video data stream comprises: and the first sampling format and/or the coding mode, and syntax elements corresponding to the first sampling format and/or the coding mode.
Optionally, the video data includes at least one of: one-dimensional data, two-dimensional data, a sequence of images, video, audio, files, bytes, bits, pixels, data composed of three components, an image having a rectangular shape, a sequence of images having a rectangular shape, an image composed of three components, an image sequence composed of three components, a video composed of three components, an image sequence composed of R components, G components, B components, a video composed of R components, G components, B components, an image composed of one luminance component and two chrominance components, an image sequence composed of one luminance component and two chrominance components, a video composed of one luminance component and two chrominance components, and encoded blocks of data.
Optionally, the coding block is a coding region of an image, wherein the coding region comprises at least one of: sub-pictures of a picture, macro-blocks, largest coding units LCU, coding tree units CTU, coding units CU, sub-regions of a CU, prediction units PU, transform units TU.
Optionally, the plurality of sampling formats includes a main sampling format and other sampling formats, wherein the other sampling formats are sampling formats obtained by sampling operation of the main sampling format.
Alternatively, the video data is an image or sequence of images having a rectangular shape and three components.
Optionally, the plurality of sampling formats are a 4:4:4 sampling format and a 4:2:0 sampling format; alternatively, the plurality of sampling formats are a 4:4:4 sampling format and a 4:2:2 sampling format; alternatively, the plurality of sampling formats are a 4:2:2 sampling format and a 4:2:0 sampling format.
Optionally, the encoding mode corresponding to the 4:2:0 sampling format includes: generating a data version in a 4:2:0 sampling format, and converting the data version in the 4:2:0 sampling format into the data version in the 4:4:4 or 4:2:2 sampling format through an up-sampling operation, wherein the method for generating the data version in the 4:2:0 sampling format comprises the following steps: generating a data version in a 4:2:0 sampling format according to the operation of intra-frame prediction of the adjacent pixels of the current coding block, and/or generating a data version in a 4:2:0 sampling format according to the operation of inter-frame prediction of the adjacent images of the current coding image; the coding modes corresponding to the 4:4:4 or 4:2:2 sampling formats comprise: generating a data version in a 4:4:4 or 4:2:2 sampling format according to a prediction operation, and converting the data version in the 4:4:4 or 4:2:2 sampling format into the data version in a 4:2:0 sampling format through a downsampling operation, wherein the prediction operation comprises a string prediction operation.
Optionally, the coding mode includes at least one of the following: performing intra prediction according to adjacent pixels of the coding block; inter-prediction from neighboring pictures of the encoded picture; performing inter-frame transformation according to adjacent images of the coded image; quantifying; universal string prediction; palette coding; dictionary coding; hybrid coding; entropy coding.
Optionally, the method further comprises: the video data compression code stream comprises a first flag bit in one of the following parts: the coding method comprises the steps of a sequence parameter set, an image parameter set, a sequence header, a strip header, an image header, a CTU header, a CU header and a coding block header, wherein the first flag bit is used for indicating that coding is allowed to be performed by adopting a plurality of sampling formats and/or corresponding coding modes.
Optionally, the method further comprises: at least one of the following parts of the compressed code stream of the video data comprises a second flag bit: a sequence parameter set, an image parameter set, a sequence header, a stripe header, an image header and a coding block header, wherein the second flag bit is used for indicating that the coding block adopting a 4:4:4 sampling format and/or a corresponding string prediction coding mode is allowed to be used.
Optionally, the method further comprises: the video data compression code stream comprises a third flag bit in at least one of the following parts: a sequence parameter set, an image parameter set, a sequence header, a stripe header, an image header and a coding block header, wherein the third flag bit is used for indicating that the coding block adopting a 4:2:2 sampling format and/or a corresponding string prediction coding mode is allowed to be used.
Optionally, one of the predetermined multiple sampling formats and coding modes corresponds to a predetermined value k, and a sampling format and a corresponding coding mode identification code of direct or indirect or direct-indirect mixture are set for the coding block, and the coding mode identification code is contained in the video data compressed code stream.
Optionally, the direct sampling format and the corresponding coding mode identification code are composed of one or more bit strings in the video data compression code stream; the indirect sampling format and the corresponding coding mode identification code are sampling formats and corresponding coding mode identification codes derived from other coding parameters except the selected coding mode parameters and/or other syntax elements except the syntax elements of the video data compression code stream; the direct-indirect mixed sampling format and the corresponding coding mode identification code are part of the direct-indirect mixed sampling format and the corresponding coding mode identification code.
Optionally, the sampling format and the identification code corresponding to the coding mode are present in the compressed stream of video data using the following modes: the coding block header information syntax element, the sampling format, the corresponding coding mode identification code syntax element, the additional coding block header information syntax element and the coding block data syntax element; or the coded block header information syntax element, the partial sampling format and corresponding coding mode identification code syntax element, the additional coded block header information syntax element, the partial coded block data syntax element, the other partial sampling format and corresponding coding mode identification code syntax element, the other partial coded block data syntax element; and when the value of the identification code syntax element is equal to a specified value, encoding the encoding block by adopting a sampling format corresponding to the specified value and a corresponding encoding mode.
According to another embodiment of the present invention, there is provided a decoding apparatus of a compressed bitstream of video data, including: the analysis module is used for analyzing the compressed code stream of the video data and acquiring sampling format information and/or decoding mode information; the selection module is used for selecting a first sampling format and a decoding mode corresponding to the first sampling format from a plurality of preset sampling formats and decoding modes according to the sampling format information and/or the decoding mode information; and the decoding module is used for decoding the decoding block by adopting the first sampling format and a decoding mode corresponding to the first sampling format.
According to another embodiment of the present invention, there is provided a video data encoding method including: a selection module, configured to select a first sampling format from a predetermined plurality of sampling formats, and select a coding mode corresponding to the first sampling format from a predetermined plurality of coding modes; the encoding module is configured to encode an encoded block of video data using the selected first sampling format and the selected encoding mode to generate a compressed video data stream, where the compressed video data stream includes: and the first sampling format and/or the coding mode, and syntax elements corresponding to the first sampling format and/or the coding mode.
According to still another embodiment of the present invention, there is also provided a storage medium. The storage medium is arranged to store program code for performing the steps of:
analyzing the compressed code stream of the video data to obtain sampling format information and/or decoding mode information;
selecting a first sampling format and a decoding mode corresponding to the first sampling format from a plurality of preset sampling formats and decoding modes according to the sampling format information and/or the decoding mode information;
and decoding the decoding block by adopting the first sampling format and a decoding mode corresponding to the first sampling format.
According to still another embodiment of the present invention, there is also provided a storage medium. The storage medium is arranged to store program code for performing the steps of:
selecting a first sampling format from a predetermined plurality of sampling formats, and selecting a coding mode corresponding to the first sampling format from a predetermined plurality of coding modes;
encoding the encoded blocks of video data using the selected first sampling format and the selected encoding scheme to produce a compressed video data stream, wherein the compressed video data stream comprises: and the first sampling format and/or the coding mode, and syntax elements corresponding to the first sampling format and/or the coding mode.
The invention selects the sampling format and the corresponding decoding mode among the preset multiple sampling formats and decoding modes, solves the technical problem of low efficiency when the single sampling format and decoding mode are adopted for decoding in the related technology, and improves the decoding rate.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiments of the invention and together with the description serve to explain the invention and do not constitute a limitation on the invention. In the drawings:
fig. 1 is a flowchart of a decoding method of a video data compression bitstream according to an embodiment of the present invention;
fig. 2 is a flowchart of a method of encoding video data according to an embodiment of the present invention;
fig. 3 is a block diagram of a decoding apparatus of a video data compression bitstream according to an embodiment of the present invention;
fig. 4 is a block diagram of a structure of an encoding apparatus of video data according to an embodiment of the present invention;
fig. 5 is a schematic diagram of the encoding method of the present embodiment;
fig. 6 is a schematic diagram of the decoding method of the present embodiment.
Detailed Description
The invention will be described in detail hereinafter with reference to the drawings in conjunction with embodiments. It should be noted that, in the case of no conflict, the embodiments and features in the embodiments may be combined with each other.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order.
Example 1
In this embodiment, a method for decoding a compressed video data stream is provided, fig. 1 is a flowchart of a method for decoding a compressed video data stream according to an embodiment of the present invention, and as shown in fig. 1, the flowchart includes the following steps:
step S102, analyzing a compressed code stream of video data to obtain sampling format information and/or decoding mode information;
step S104, selecting a first sampling format and a decoding mode corresponding to the first sampling format from a plurality of preset sampling formats and decoding modes according to the sampling format information and/or the decoding mode information;
and S106, decoding the decoding block by adopting the first sampling format and a decoding mode corresponding to the first sampling format.
Through the steps, the sampling format and the corresponding decoding mode are selected from the preset multiple sampling formats and decoding modes, the technical problem that the efficiency is low when the single sampling format and decoding mode are adopted for decoding in the related technology is solved, and the decoding rate is improved.
Alternatively, the main body of execution of the above steps may be a decoder, a video processing device, such as a video receiving end, a video presenting device, or the like, but is not limited thereto.
Optionally, the video data compression stream comprises a data compression stream of at least one of the following information: one-dimensional data, two-dimensional data, a sequence of images, video, audio, files, bytes, bits, pixels, data composed of three components, an image having a rectangular shape, a sequence of images having a rectangular shape, an image composed of three components, an image sequence composed of three components, a video composed of three components, an image sequence composed of R components, G components, B components, a video composed of R components, G components, B components, an image composed of one luminance component and two chrominance components, an image sequence composed of one luminance component and two chrominance components, a video composed of one luminance component and two chrominance components, and encoded blocks of data.
Optionally, the decoded block is a decoded region of the image, wherein the decoded region comprises at least one of: a sub-picture of a picture, a macroblock, a maximum Coding Unit (The Largest Coding Unit, abbreviated LCU), a Coding Tree Unit (CTU), a Coding Unit (Coding Unit, abbreviated CU), a sub-region of a CU, a Prediction Unit PU (Prediction Unit, abbreviated PU), a Transform Unit (Transform Unit, abbreviated TU).
Optionally, the plurality of sampling formats includes a main sampling format and other sampling formats, wherein the other sampling formats are sampling formats obtained by sampling operation of the main sampling format.
Alternatively, the video data compression stream has a rectangular shape and a data compression stream of images or sequences of images of three components.
Optionally, the plurality of sampling formats are a 4:4:4 sampling format and a 4:2:0 sampling format; alternatively, the plurality of sampling formats are a 4:4:4 sampling format and a 4:2:2 sampling format; alternatively, the plurality of sampling formats are a 4:2:2 sampling format and a 4:2:0 sampling format. Correspondingly, the decoding mode corresponding to the 4:2:0 sampling format comprises the following steps: generating a data version in a 4:2:0 sampling format, and converting the data version in the 4:2:0 sampling format into the data version in the 4:4:4 or 4:2:2 sampling format through an up-sampling operation, wherein the method for generating the data version in the 4:2:0 sampling format comprises the following steps: generating a data version in a 4:2:0 sampling format according to an operation of intra-prediction when adjacent pixels of the decoded block and/or generating a data version in a 4:2:0 sampling format according to an operation of inter-prediction when adjacent images of the decoded image; the decoding modes corresponding to the 4:4:4 or 4:2:2 sampling format comprise: the data version in the 4:4:4 or 4:2:2 sampling format is generated according to a prediction operation, and the data version in the 4:4:4 or 4:2:2 sampling format is converted into the data version in the 4:2:0 sampling format through a downsampling operation, and specifically, the prediction operation can be a string prediction operation.
Optionally, the decoding mode includes at least one of: performing intra prediction according to adjacent pixels of the decoded block; inter prediction is performed according to neighboring images of the decoded image; performing inter-frame transformation according to neighboring images of the decoded image; scaling; universal string prediction; decoding a palette; dictionary decoding; and (5) entropy decoding.
Optionally, parsing the compressed bitstream of video data further includes: obtaining a first flag bit from a position of one of: a sequence parameter set, a picture parameter set, a sequence header, a slice header, a picture header, a CTU header, a CU header, and a decoding block header, wherein a first flag bit is used to indicate that decoding is allowed to be performed in a plurality of sampling formats and/or corresponding decoding modes.
Optionally, parsing the compressed bitstream of video data further includes: acquiring a second flag bit from a position of at least one of: a sequence parameter set, an image parameter set, a sequence header, a stripe header, an image header, a decoding block header, wherein a second flag bit is used to indicate that a decoding block adopting a 4:4:4 sampling format and/or a corresponding string prediction decoding mode is allowed to be used.
Optionally, parsing the compressed bitstream of video data further includes: acquiring a third flag bit from a position of at least one of: a sequence parameter set, an image parameter set, a sequence header, a stripe header, an image header, a decoding block header, wherein a third flag bit is used to indicate that a decoding block adopting a 4:2:2 sampling format and/or a corresponding string prediction decoding mode is allowed to be used.
Optionally, one of a predetermined plurality of sampling formats and decoding modes corresponds to a predetermined value k, and a direct or indirect or direct-indirect mixed sampling format and a corresponding decoding mode identification code are obtained for the decoding block from the video data compressed code stream.
In this embodiment, the direct sampling format and the corresponding decoding mode identification code are composed of one or more bit strings in the compressed video data stream; the indirect sampling format and the corresponding decoding mode identification code are sampling formats and corresponding decoding mode identification codes derived from other decoding parameters except the decoding mode parameters and/or other syntax elements of the video data compression code stream except the syntax elements corresponding to the decoding mode parameters; the direct-indirect mixed sampling format and the corresponding decoding mode identification code are partial direct-partial indirect mixed sampling format and the corresponding decoding mode identification code.
Optionally, the sampling format and the identification code of the corresponding decoding mode are acquired from the following positions of the compressed code stream of the video data:
a decoding block header information syntax element, a sampling format and corresponding decoding mode identification code syntax element, an additional decoding block header information syntax element, a decoding block data syntax element; or (b)
A decoding block header information syntax element, a partial sampling format and corresponding decoding mode identification code syntax element, an additional decoding block header information syntax element, a partial decoding block data syntax element, another partial sampling format and corresponding decoding mode identification code syntax element, another partial decoding block data syntax element;
when the value of the identification code syntax element is equal to the appointed value, the decoding block is decoded by adopting a sampling format corresponding to the appointed value and a corresponding decoding mode.
In this embodiment, a method for encoding video data is provided, fig. 2 is a flowchart of a method for encoding video data according to an embodiment of the present invention, and as shown in fig. 2, the flowchart includes the following steps:
step S202, selecting a first sampling format from a plurality of predetermined sampling formats, and selecting a coding mode corresponding to the first sampling format from a plurality of predetermined coding modes;
step S204, encoding the encoded block of the video data using the selected first sampling format and the selected encoding mode to generate a video data compressed code stream, wherein the video data compressed code stream comprises: and the first sampling format and/or the coding mode, and syntax elements corresponding to the first sampling format and/or the coding mode.
Alternatively, the main body of execution of the above steps may be an encoder, a video processing apparatus such as a video transmitting end, a video distributing apparatus, or the like, but is not limited thereto.
Optionally, the video data includes at least one of: one-dimensional data, two-dimensional data, a sequence of images, video, audio, files, bytes, bits, pixels, data composed of three components, an image having a rectangular shape, a sequence of images having a rectangular shape, an image composed of three components, an image sequence composed of three components, a video composed of three components, an image sequence composed of R components, G components, B components, a video composed of R components, G components, B components, an image composed of one luminance component and two chrominance components, an image sequence composed of one luminance component and two chrominance components, a video composed of one luminance component and two chrominance components, and encoded blocks of data.
Optionally, the encoded block is an encoded region of the image, wherein the encoded region comprises at least one of: sub-pictures of a picture, macro-blocks, largest coding units LCU, coding tree units CTU, coding units CU, sub-regions of a CU, prediction units PU, transform units TU.
Optionally, the plurality of sampling formats includes a main sampling format and other sampling formats, wherein the other sampling formats are sampling formats obtained by sampling operation of the main sampling format.
Alternatively, the video data is an image or sequence of images having a rectangular shape and three components,
optionally, the plurality of sampling formats are a 4:4:4 sampling format and a 4:2:0 sampling format; alternatively, the plurality of sampling formats are a 4:4:4 sampling format and a 4:2:2 sampling format; alternatively, the plurality of sampling formats are a 4:2:2 sampling format and a 4:2:0 sampling format. Correspondingly, the coding modes corresponding to the 4:2:0 sampling format comprise: generating a data version in a 4:2:0 sampling format, and converting the data version in the 4:2:0 sampling format into the data version in the 4:4:4 or 4:2:2 sampling format through an up-sampling operation, wherein the method for generating the data version in the 4:2:0 sampling format comprises the following steps: generating a data version in a 4:2:0 sampling format according to an operation of intra-prediction when neighboring pixels of the encoded block and/or generating a data version in a 4:2:0 sampling format according to an operation of inter-prediction when neighboring images of the encoded image; the coding modes corresponding to the 4:4:4 or 4:2:2 sampling formats comprise: the data version in the 4:4:4 or 4:2:2 sampling format is generated according to a prediction operation, and the data version in the 4:4:4 or 4:2:2 sampling format is converted into the data version in the 4:2:0 sampling format through a downsampling operation, and specifically, the prediction operation can be a string prediction operation.
Optionally, the encoding mode includes at least one of: intra-prediction is performed according to neighboring pixels of the encoded block; inter-prediction from neighboring pictures of the encoded picture; performing inter-frame transformation according to neighboring images of the encoded image; quantifying; universal string prediction; palette coding; dictionary coding; hybrid coding; entropy coding.
Optionally, the present embodiment further includes: the first flag bit is included in one of the following portions of the video data compression stream: sequence parameter set, image parameter set, sequence header, stripe header, image header, CTU header, CU header, coding block header, wherein the first flag bit is used to indicate that coding is allowed to be performed using multiple sampling formats and/or corresponding coding modes.
Optionally, the present embodiment further includes: at least one of the following parts of the compressed code stream of video data comprises a second flag bit: a sequence parameter set, an image parameter set, a sequence header, a stripe header, an image header, and a coding block header, wherein a second flag bit is used for indicating that the coding block adopting a 4:4:4 sampling format and/or a corresponding string prediction coding mode is allowed to be used.
Optionally, the present embodiment further includes: the third flag bit is included in at least one of the following portions of the video data compression stream: a sequence parameter set, an image parameter set, a sequence header, a stripe header, an image header, and a coding block header, wherein a third flag bit is used to indicate that a coding block adopting a 4:2:2 sampling format and/or a corresponding string prediction coding mode is allowed to be used.
Optionally, one of a predetermined plurality of sampling formats and coding modes corresponds to a predetermined value k, and a sampling format and a corresponding coding mode identification code, which are directly or indirectly mixed, are set for the coding block, and the coding mode identification code is contained in the compressed code stream of the video data.
Optionally, the direct sampling format and the corresponding coding mode identification code are composed of one or more bit strings in the compressed code stream of the video data; the indirect sampling format and the corresponding coding mode identification code are sampling formats and corresponding coding mode identification codes derived from other coding parameters except the selected coding mode parameters and/or other syntax elements except the syntax elements of the video data compression code stream; the direct-indirect mixed sampling format and the corresponding coding mode identification code are the partial direct-partial indirect mixed sampling format and the corresponding coding mode identification code.
Optionally, the sampling format and the identification code of the corresponding coding mode are present in the compressed stream of video data using the following modes: coding block header information syntax elements, sampling formats, corresponding coding mode identification code syntax elements, additional coding block header information syntax elements and coding block data syntax elements; or a coded block header information syntax element, a partial sampling format and corresponding coding mode identification code syntax element, an additional coded block header information syntax element, a partial coded block data syntax element, another partial sampling format and corresponding coding mode identification code syntax element, another partial coded block data syntax element; when the value of the identification code syntax element is equal to the appointed value, the coding block is coded by adopting a sampling format corresponding to the appointed value and a corresponding coding mode.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present invention.
Example 2
The embodiment also provides a decoding device for compressing a code stream of video data, and an encoding device for video data, which are used for implementing the foregoing embodiments and preferred embodiments, and are not described in detail. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
Fig. 3 is a block diagram of a decoding apparatus for a compressed bitstream of video data according to an embodiment of the present invention, as shown in fig. 3, the apparatus comprising:
the parsing module 30 is configured to parse the compressed video data stream to obtain sampling format information and/or decoding mode information;
a selection module 32, configured to select a first sampling format and a decoding mode corresponding to the first sampling format from a predetermined plurality of sampling formats and decoding modes according to the sampling format information and/or the decoding mode information;
the decoding module 34 is configured to decode the decoding block in a decoding manner corresponding to the first sampling format.
Fig. 4 is a block diagram of a video data encoding apparatus according to an embodiment of the present invention, as shown in fig. 4, including:
a selection module 40, configured to select a first sampling format from a predetermined plurality of sampling formats, and select an encoding mode corresponding to the first sampling format from a predetermined plurality of encoding modes;
an encoding module 42, configured to encode the encoded block of video data using the selected first sampling format and the selected encoding mode to generate a compressed video data stream, where the compressed video data stream includes: and the first sampling format and/or the coding mode, and syntax elements corresponding to the first sampling format and/or the coding mode.
It should be noted that each of the above modules may be implemented by software or hardware, and for the latter, it may be implemented by, but not limited to: the modules are all located in the same processor; alternatively, the above modules may be located in different processors in any combination.
Example 3
This embodiment is an optional embodiment of the present invention, and is used for supplementing and detailing the scheme of the present application:
to solve this problem in compression of a data set formed by mixing contents of various characteristics, the present embodiment provides a data compression method and apparatus employing a plurality of (i.e., two or more) sampling formats and respective encoding modes: the data set and the encoding and decoding block have K (K > 1) versions respectively with K different sampling formats, and correspondingly have K sets of encoding and decoding modes; when one coding and decoding block is coded and decoded, one of the K versions is selected to be coded and decoded by using a corresponding coding and decoding mode.
The primary technical feature of this embodiment is to perform encoding and decoding by using a pair of one codec blocks of multiple sampling formats (i.e., multiple data versions with different sampling formats) and corresponding encoding and decoding modes.
Preferably, the encoding and decoding is performed using a one-to-one codec block of the two sampling formats and corresponding codec schemes.
Preferably, the dataset and its elements consist of 3 components.
Preferably, the dataset is an image having a rectangular shape.
Preferably, the dataset is a sequence of images having a rectangular shape.
Preferably, the dataset is an image consisting of 3 components.
Preferably, the dataset is a sequence of images consisting of 3 components.
Preferably, the dataset is a video consisting of 3 components.
Preferably, the dataset is an image consisting of an R component, a G component, a B component.
Preferably, the dataset is a video consisting of an R component, a G component, a B component.
Preferably, the data set is an image consisting of a Y luminance component, a U chrominance component, a V chrominance component.
In this embodiment, the data set is preferably a video composed of a Y luminance component, a U chrominance component, and a V chrominance component.
In this embodiment, the two sampling formats are preferably a 4:4:4 sampling format and a 4:2:0 sampling format.
In this embodiment, the two sampling formats are preferably a 4:4:4 sampling format and a 4:2:2 sampling format.
In this embodiment, the two sampling formats are preferably a 4:2:0 sampling format and a 4:2:2 sampling format.
In this embodiment, preferably, one of the plurality of sampling formats is a main sampling format, and the other sampling formats are sampling formats obtained by performing a downsampling operation on the main sampling format.
In this embodiment, the data version of one sampling format generated in the codec is preferably converted into the data version of the other sampling format through the sampling format conversion operation.
In this embodiment, the sampling format conversion operation preferably includes a resampling operation and/or an upsampling operation and/or a downsampling operation.
In this embodiment, preferably, the coding and decoding modes corresponding to one sampling format include a block prediction operation, and/or a transform operation; the codec corresponding to the other sampling format includes a string prediction operation.
In this embodiment, preferably, the data set is an image having a rectangular shape, and the coding and decoding manner corresponding to one sampling format includes an operation of intra-prediction from neighboring pixels of the current coding and decoding block, and/or a transformation operation; the codec corresponding to the other sampling format may include a string prediction operation.
In this embodiment, preferably, the data set is a sequence of images having a rectangular shape, and the coding and decoding manner corresponding to one sampling format includes an operation of intra-prediction from neighboring pixels of the current coding and decoding block, and/or an operation of inter-prediction from neighboring images of the current coding and decoding image, and/or a transformation operation; the codec corresponding to the other sampling format may include a string prediction operation.
In this embodiment, preferably, the data set is a sequence of images having a rectangular shape, and the coding and decoding manner corresponding to the 4:2:0 sampling format includes an operation of intra-frame prediction from neighboring pixels of the current coding and decoding block, and/or an operation of inter-frame prediction from neighboring images of the current coding and decoding image, and/or a transformation operation; the codec corresponding to the 4:4:4 sampling format may include a string prediction operation.
In this embodiment, preferably, the data set is a sequence of images having a rectangular shape, and the coding and decoding manner corresponding to the 4:2:0 sampling format includes an operation of intra-frame prediction from neighboring pixels of the current coding and decoding block, and/or an operation of inter-frame prediction from neighboring images of the current coding and decoding image, and/or a transformation operation, and the generated data version in the 4:2:0 sampling format is converted into the data version in the 4:4:4 sampling format through the upsampling operation; the encoding and decoding methods corresponding to the 4:4:4 sampling format may include a string prediction operation, and the generated data version of the 4:4:4 sampling format is converted into the data version of the 4:2:0 sampling format through a downsampling operation.
The most basic characteristic technical feature of the encoding method or apparatus of this embodiment is to adaptively encode a current encoding block according to the characteristics of the current encoding block by using one of a plurality of predetermined sampling formats and corresponding encoding modes, so as to generate a compressed data code stream containing at least the information of the sampling format and/or the identification code of the encoding mode corresponding to the sampling format and other information required during decoding corresponding to the sampling format.
Fig. 5 is a schematic diagram of the encoding method of the present embodiment. Preferably, the encoding is performed using a one-to-one encoding block of both sampling formats and corresponding encoding schemes. Preferably, the dataset and its elements consist of 3 components. Preferably, the dataset is an image having a rectangular shape. Preferably, the dataset is a sequence of images having a rectangular shape. Preferably, the dataset is an image consisting of 3 components. Preferably, the dataset is a sequence of images consisting of 3 components. Preferably, the dataset is a video consisting of 3 components. Preferably, the dataset is an image consisting of an R component, a G component, a B component. Preferably, the dataset is a video consisting of an R component, a G component, a B component. Preferably, the data set is an image consisting of a Y luminance component, a U chrominance component, a V chrominance component. Preferably, the data set is a video consisting of a Y luminance component, a U chrominance component, a V chrominance component. Preferably, the two sampling formats are a 4:4:4 sampling format and a 4:2:0 sampling format. Preferably, the two sampling formats are a 4:4:4 sampling format and a 4:2:2 sampling format. Preferably, the two sampling formats are a 4:2:0 sampling format and a 4:2:2 sampling format. Preferably, one of the plurality of sampling formats is a main sampling format, and the other sampling formats are sampling formats obtained by downsampling the main sampling format. Preferably, the data version of one sampling format generated in the encoding is converted to the data version of the other sampling format by a sampling format conversion operation. Preferably, the sampling format conversion operation comprises a resampling operation and/or an upsampling operation and/or a downsampling operation. Preferably, the coding mode corresponding to one sampling format includes a block prediction operation and/or a transform operation; the encoding mode corresponding to the other sampling format includes a string prediction operation. Preferably, the data set is an image having a rectangular shape, and the encoding means corresponding to one sampling format includes an operation of intra-prediction from neighboring pixels of the current encoded block, and/or a transformation operation; the encoding mode corresponding to the other sampling format includes a string prediction operation. Preferably, the data set is a sequence of images having a rectangular shape, the coding corresponding to one sampling format comprising an operation of intra-prediction from neighboring pixels of the current coded block and/or an operation of inter-prediction from neighboring images of the current coded image, and/or a transformation operation; the encoding mode corresponding to the other sampling format includes a string prediction operation. Preferably, the data set is a sequence of images having a rectangular shape, the encoding means corresponding to the 4:2:0 sampling format comprising an operation of intra-prediction from neighboring pixels of the current encoded block and/or an operation of inter-prediction from neighboring images of the current encoded image, and/or a transformation operation; the encoding scheme corresponding to the 4:4:4 sampling format includes a string prediction operation. Preferably, the data set is a sequence of images having a rectangular shape, the encoding means corresponding to the 4:2:0 sampling format comprises an operation of intra-prediction from neighboring pixels of the current encoded block and/or an operation of inter-prediction from neighboring images of the current encoded image, and/or a transformation operation, the resulting data version of the 4:2:0 sampling format being converted into a data version of the 4:4:4 sampling format by an upsampling operation; the encoding mode corresponding to the 4:4:4 sampling format comprises a string prediction operation, and the generated data version of the 4:4:4 sampling format is converted into the data version of the 4:2:0 sampling format through a downsampling operation.
The most basic characteristic technical feature of the decoding method or apparatus of this embodiment is to parse the compressed data code stream, obtain the information of sampling format and/or corresponding coding mode, and adopt a pair of preset multiple sampling formats and corresponding decoding modes to decode according to the information of sampling format and/or corresponding coding mode.
Fig. 6 is a schematic diagram of the decoding method of the present embodiment. Preferably, the decoding is performed using a one-to-one decoding block of both sampling formats and corresponding decoding schemes. Preferably, the dataset and its elements consist of 3 components. Preferably, the dataset is an image having a rectangular shape. Preferably, the dataset is a sequence of images having a rectangular shape. Preferably, the dataset is an image consisting of 3 components. Preferably, the dataset is a sequence of images consisting of 3 components. Preferably, the dataset is a video consisting of 3 components. Preferably, the dataset is an image consisting of an R component, a G component, a B component. Preferably, the dataset is a video consisting of an R component, a G component, a B component. Preferably, the data set is an image consisting of a Y luminance component, a U chrominance component, a V chrominance component. Preferably, the data set is a video consisting of a Y luminance component, a U chrominance component, a V chrominance component. Preferably, the two sampling formats are a 4:4:4 sampling format and a 4:2:0 sampling format. Preferably, the two sampling formats are a 4:4:4 sampling format and a 4:2:2 sampling format. Preferably, the two sampling formats are a 4:2:0 sampling format and a 4:2:2 sampling format. Preferably, one of the plurality of sampling formats is a main sampling format, and the other sampling formats are sampling formats obtained by downsampling the main sampling format. Preferably, the data version of one sampling format generated in the decoding is converted to the data version of the other sampling format by the sampling format conversion operation. Preferably, the sampling format conversion operation comprises a resampling operation and/or an upsampling operation and/or a downsampling operation. Preferably, the decoding means corresponding to one sampling format includes a block prediction operation and/or a transform operation; the decoding mode corresponding to the other sampling format includes a string prediction operation. Preferably, the data set is an image having a rectangular shape, and the decoding means corresponding to one sampling format includes an operation of intra-prediction from neighboring pixels of the current decoding block, and/or a transformation operation; the decoding mode corresponding to the other sampling format includes a string prediction operation. Preferably, the data set is a sequence of images having a rectangular shape, the decoding means corresponding to one sampling format comprising an operation of intra-prediction from neighboring pixels of the current decoded block and/or an operation of inter-prediction from neighboring images of the current decoded image, and/or a transformation operation; the decoding mode corresponding to the other sampling format includes a string prediction operation. Preferably, the data set is a sequence of images having a rectangular shape, the decoding means corresponding to the 4:2:0 sampling format comprising an operation of intra-prediction from neighboring pixels of the current decoded block and/or an operation of inter-prediction from neighboring images of the current decoded image, and/or a transformation operation; the decoding scheme corresponding to the 4:4:4 sampling format includes a string prediction operation. Preferably, the data set is a sequence of images having a rectangular shape, the decoding means corresponding to the 4:2:0 sampling format comprising an operation of intra-prediction from neighboring pixels of the current decoded block and/or an operation of inter-prediction from neighboring images of the current decoded image, and/or a transformation operation, the resulting data version of the 4:2:0 sampling format being converted into a data version of the 4:4:4 sampling format by an upsampling operation; the decoding mode corresponding to the 4:4:4 sampling format comprises a string prediction operation, and the generated data version of the 4:4:4 sampling format is converted into the data version of the 4:2:0 sampling format through a downsampling operation.
According to one aspect of the present embodiment, there is provided an encoding method or apparatus for compressing data, including at least steps or modules for performing the following functions and operations:
one of a plurality of predetermined sampling formats and corresponding encoding modes is adaptively selected to encode one encoding block, and a compressed data code stream containing at least information of the sampling format and/or the corresponding encoding mode and syntax elements thereof is generated.
The embodiment also provides a decoding method or device for compressing data, which at least comprises the following steps or modules for completing the following functions and operations: analyzing the compressed data code stream, acquiring information of sampling formats and/or corresponding coding modes, and decoding a decoding block by adopting one sampling format and corresponding decoding mode among a plurality of preset sampling formats and corresponding decoding modes according to the information of the sampling formats and/or the corresponding coding modes.
The embodiment is suitable for encoding and decoding the data in a lossy compression mode, and is also suitable for encoding and decoding the data in a lossless compression mode. The present embodiment is applicable to encoding and decoding of one-dimensional data such as character string data or byte string data, and is also applicable to encoding and decoding of two-dimensional or more data such as image or video data.
In this embodiment, the data includes one or a combination of the following types of data: one-dimensional data; two-dimensional data; multidimensional data; an image; a sequence of images; video; audio frequency; a file; bytes; bits; a pixel.
In the present embodiment, in the case where the data is an image, a sequence of images, a video, or the like, the encoded block or the decoded block is one encoded region or one decoded region of an image, including the following cases: sub-pictures of a picture, macro-blocks, largest coding units LCU, coding tree units CTU, coding units CU, sub-regions of a CU, prediction units PU, transform units TU.
In this embodiment, the sampling format is one of the following sampling formats:
4:4:4 sampling format;
or alternatively
4:2:2 sampling format;
or alternatively
4:2:0 sampling format.
In this embodiment, the encoding and decoding methods include one or a combination of the following operations:
1) Intra-prediction from neighboring pixels of the current codec block;
2) Inter prediction from neighboring pictures of the current codec picture;
3) A transformation and a corresponding inverse transformation;
4) Quantization and corresponding inverse quantization;
5) Universal string prediction;
6) Palette coding and corresponding decoding;
7) Dictionary coding and corresponding decoding;
8)Hybrid coding;
9) Entropy encoding and corresponding entropy decoding.
Further implementation details or variations of the present embodiment, including examples, follow.
Example 1
In the encoding method or apparatus or the decoding method or apparatus, the plurality of sampling formats are one of the following cases:
two sampling formats;
or alternatively
Three sampling formats;
or alternatively
Four sampling formats.
Example 2
In the encoding method or apparatus or the decoding method or apparatus, the data is one of the following types of data.
Data consisting of 3 components;
or alternatively
An image having a rectangular shape;
or alternatively
A sequence of images having a rectangular shape;
or alternatively
An image consisting of 3 components;
or alternatively
An image sequence consisting of 3 components;
or alternatively
A video consisting of 3 components;
or alternatively
An image composed of an R component, a G component, and a B component;
or alternatively
An image sequence consisting of an R component, a G component, and a B component;
or alternatively
Video composed of R, G, B components;
or alternatively
An image composed of a Y luminance component, a U chrominance component, and a V chrominance component;
or alternatively
An image sequence consisting of a Y luminance component, a U chrominance component, and a V chrominance component;
or alternatively
Video composed of Y luminance component, U chrominance component, V chrominance component;
Or alternatively
A codec block of the above various data;
or alternatively
Variants of the above data, including variant data subjected to one or a combination of the following operations: predicted residual, transformed transform domain data, differential data through differential operation, quantized data, dequantized data, deblocking filtered data, sample offset compensated data, adaptive correction filtered data.
Example 3
In the encoding method or apparatus or the decoding method or apparatus, the data is an image composed of 3 components, the plurality of sampling formats are two sampling formats, and the two sampling formats are one of the following cases:
a 4:4:4 sampling format and a 4:2:0 sampling format;
or alternatively
A 4:4:4 sampling format and a 4:2:2 sampling format;
or alternatively
A 4:2:0 sampling format and a 4:2:2 sampling format.
Example 4
In the encoding method or apparatus or the decoding method or apparatus, one of the plurality of sampling formats is a main sampling format, and the other sampling formats are sampling formats obtained by downsampling the main sampling format.
Example 5
In the encoding method or device or the decoding method or device, the data version of one sampling format generated in the encoding and decoding is converted into the data version of other sampling formats through the sampling format conversion operation.
Example 6
In the encoding method or apparatus or the decoding method or apparatus of example 5, the sampling format conversion operation includes a resampling operation and/or an upsampling operation and/or a downsampling operation.
Example 7
In the encoding method or device or the decoding method or device, the encoding and decoding modes corresponding to one sampling format comprise block prediction operation and/or transformation operation; the codec corresponding to the other sampling format includes a string prediction operation.
Example 8
In the encoding method or apparatus or decoding method or apparatus, the data is an image having a rectangular shape, and the encoding/decoding method corresponding to one sampling format includes an operation of intra-prediction from neighboring pixels of a current encoding/decoding block, and/or a transformation operation; the codec corresponding to the other sampling format includes a string prediction operation.
Example 9
In the encoding method or apparatus or decoding method or apparatus, the data is a sequence of images having a rectangular shape, and the encoding/decoding method corresponding to one sampling format includes an operation of intra-prediction from neighboring pixels of a current encoding/decoding block, and/or an operation of inter-prediction from neighboring images of the current encoding/decoding image, and/or a transformation operation; the codec corresponding to the other sampling format includes a string prediction operation.
Example 10
In the encoding method or apparatus or decoding method or apparatus, the data is a sequence of images having a rectangular shape and 3 components, the plurality of sampling formats are two sampling formats, the two sampling formats are a 4:4:4 sampling format and a 4:2:0 sampling format, and a coding manner corresponding to the 4:2:0 sampling format includes an operation of intra-prediction from neighboring pixels of a current coding block and/or an operation of inter-prediction from neighboring images of the current coding image, and/or a transformation operation; the encoding and decoding modes corresponding to the 4:4:4 sampling format comprise string prediction operation.
Example 11
In the encoding method or apparatus or decoding method or apparatus, the data is an image or a sequence of images having a rectangular shape and 3 components, the plurality of sampling formats are two sampling formats, the two sampling formats are a 4:4:4 sampling format and a 4:2:0 sampling format, a coding and decoding mode corresponding to the 4:2:0 sampling format includes an operation of intra-prediction from adjacent pixels of a current coding and decoding block, and/or an operation of inter-prediction from adjacent images of the current coding and decoding image, and/or a transformation operation, and a data version of the generated 4:2:0 sampling format is converted into a data version of the 4:4:4 sampling format through an up-sampling operation; the encoding and decoding modes corresponding to the 4:4:4 sampling format comprise a string prediction operation, and the generated data version of the 4:4:4 sampling format is converted into the data version of the 4:2:0 sampling format through a downsampling operation.
Example 12
In the encoding method or apparatus or decoding method or apparatus, the data is an image or sequence of images having a rectangular shape and 3 components, the plurality of sampling formats are two sampling formats, the two sampling formats are a 4:4:4 sampling format and a 4:2:0 sampling format, a coding manner corresponding to the 4:2:0 sampling format includes an operation of intra prediction from neighboring pixels of a current coding block and/or an operation of inter prediction from neighboring images of the current coding image, and/or a transformation operation, resulting in a dcomponent d420= { d420[ i ] [ j ] of a data version of the 4:2:0 sampling format: i=0 to M-1, j=0 to N-1} and the E component e420= { e420[ i ] [ j ]: i=0 to M-1, j=0 to N-1}, and converted into D component d444= { D444[ i ] [ j ] of the data version in 4:4:4 sampling format through the down-sampling operation, respectively: i=0 to 2M-1, j=0 to 2N-1} and E component E444= { E444[ i ] [ j ]: i=0 to 2M-1, j=0 to 2N-1}:
D444[2i][2j]=D420[i][j]
D444[2i+1][2j]=D420[i][j]
D444[2i][2j+1]=D420[i][j]
D444[2i+1][2j+1]=D420[i][j]
E444[2i][2j]=E420[i][j]
E444[2i+1][2j]=E420[i][j]
E444[2i][2j+1]=E420[i][j]
E444[2i+1][2j+1]=E420[i][j]
wherein i=0 to M-1, j=0 to N-1; the coding and decoding modes corresponding to the 4:4:4 sampling format comprise a string prediction operation, and D components D444= { D444[ i ] [ j ] of the data version of the 4:4:4 sampling format are generated: i=0 to 2M-1, j=0 to 2N-1} and E component E444= { E444[ i ] [ j ]: i=0 to 2M-1, j=0 to 2N-1, respectively, into a data version of the 4:2:0 sampling format by the following downsampling operations d420= { d420[ i ] [ j ]: i=0 to M-1, j=0 to N-1} and the E component e420= { e420[ i ] [ j ]: i=0 to M-1, j=0 to N-1}:
D420[i][j]=(D444[2i][2j]+D444[2i+1][2j]+D444[2i][2j+1]+D444[2i+1][2j+1]+R)>>2
E420[i][j]=(E444[2i][2j]+E444[2i+1][2j]+E444[2i][2j+1]+E444[2i+1][2j+1]+R)>>2
Where i=0 to M-1, j=0 to N-1, and r is equal to 0 (truncation) or 2 (rounding).
Example 13
In the encoding method or apparatus or decoding method or apparatus, there are flag bits indicating that encoding and decoding are allowed to be performed in a plurality of sampling formats and/or corresponding encoding and decoding modes at one or several of the following places of the compressed stream of video data:
1) A sequence parameter set; typically a directly existing or implicitly derived syntax element of the sequence parameter set;
2) An image parameter set; typically a directly existing or implicitly derived syntax element of the picture parameter set;
3) A sequence header; typically a directly existing or implicitly derived syntax element of the sequence header;
4) A tape head; typically a directly existing or implicitly derived syntax element of the slice header;
5) An image head; typically a syntax element of the picture header that is directly present or implicitly derived;
6) CTU header; typically a directly existing or implicitly derived syntax element of the CTU header;
7) A CU header; typically a syntax element of the CU header that is directly present or implicitly derived;
8) Encoding and decoding a block header; typically a directly existing or implicitly derived syntax element of the codec block header.
Example 14
In the encoding method or apparatus or decoding method or apparatus, there are flag bits representing a codec block that allows using a 4:4:4 sampling format and/or a corresponding string prediction codec manner at one or several of the following places of the compressed stream of video data:
1) A sequence parameter set; typically a directly existing or implicitly derived syntax element of the sequence parameter set;
2) An image parameter set; typically a directly existing or implicitly derived syntax element of the picture parameter set;
3) A sequence header; typically a directly existing or implicitly derived syntax element of the sequence header;
3) A tape head; typically a directly existing or implicitly derived syntax element of the slice header;
3) An image head; typically a syntax element of the picture header that is directly present or implicitly derived.
Example 15
In the encoding method or apparatus or decoding method or apparatus, the predetermined plurality of sampling formats and corresponding codec modes are represented by a plurality of predetermined values, respectively, one sampling format and corresponding codec mode corresponds to one predetermined value k, each of the codec blocks has a sampling format and corresponding codec mode identification code directly or indirectly mixed in the video data compression code stream,
If the sampling format and corresponding coding mode identification code are equal to k, then
{
Coding and decoding the coding and decoding block by adopting a sampling format corresponding to k and a corresponding coding and decoding mode
}
The direct sampling format and corresponding codec mode identification code consists of one or more bit strings (binary symbol strings) in a compressed stream of video data. The indirect sampling format and corresponding codec mode identification code are sampling formats and corresponding codec mode identification codes derived from other codec parameters and/or other syntax elements of the compressed bitstream of video data. The directly-indirectly-mixed sampling format and corresponding codec mode identification code is a partially-directly (i.e., composed of one or more bit strings in the video data compression stream) partially-indirectly (i.e., derived from other codec parameters and/or other syntax elements of the video data compression stream) mixed sampling format and corresponding codec mode identification code.
Example 16
In the encoding method or apparatus or decoding method or apparatus, the sampling format for representing the coding and decoding modes and the sampling format for representing the corresponding coding and decoding modes and the corresponding coding and decoding mode identification code syntax elements exist in the compressed code stream of the video data of the coding and decoding blocks in the following form:
The coding and decoding block header information syntax elements, sampling formats, corresponding coding and decoding mode identification code syntax elements, more coding and decoding block header information syntax elements and coding and decoding block data syntax elements;
or (b)
The coding and decoding block header information syntax element, the partial sampling format and the corresponding coding and decoding mode identification code syntax element, more coding and decoding block header information syntax elements, the partial coding and decoding block data syntax element, the other partial sampling format and the corresponding coding and decoding mode identification code syntax element and the other partial coding and decoding block data syntax element;
when the sampling format and the corresponding coding and decoding mode identification code take a value, the coding and decoding block is coded and decoded by adopting the sampling format and the corresponding coding and decoding mode corresponding to the value.
Example 17
In the encoding method or device or decoding method or device, the encoding and decoding modes corresponding to one sampling format comprise prediction operation, and/or prediction compensation operation, and/or deblocking filtering operation, and/or sample offset compensation operation, and/or adaptive correction filtering operation; the codec corresponding to the other sampling format includes a transform operation, and/or a quantization operation, and/or an inverse quantization operation (scaling operation), and/or an inverse transform operation.
Example 18
In the encoding method or device or decoding method or device, the encoding and decoding modes corresponding to one sampling format comprise block prediction operation, and/or string prediction operation, and/or prediction compensation operation; the coding and decoding modes corresponding to the other sampling format comprise transformation operation, quantization operation, inverse quantization operation and/or inverse transformation operation.
Example 4
The embodiment of the invention also provides a storage medium. Alternatively, in the present embodiment, the above-described storage medium may be configured to store program code for performing the steps of:
s1, analyzing a compressed code stream of video data to obtain sampling format information and/or decoding mode information;
s2, selecting a first sampling format and a decoding mode corresponding to the first sampling format from a plurality of preset sampling formats and decoding modes according to the sampling format information and/or the decoding mode information;
and S3, decoding the decoding block by adopting the first sampling format and a decoding mode corresponding to the first sampling format.
Alternatively, in the present embodiment, the storage medium may include, but is not limited to: a U-disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Optionally, in this embodiment, the processor performs parsing of the compressed code stream of the video data according to the program code stored in the storage medium, to obtain sampling format information and/or decoding mode information;
optionally, in this embodiment, the processor performs, according to the program code stored in the storage medium, selecting a first sampling format and a decoding mode corresponding to the first sampling format from a predetermined plurality of sampling formats and decoding modes according to the sampling format information and/or decoding mode information;
optionally, in this embodiment, the processor performs decoding of the decoding block in the first sampling format and a decoding manner corresponding to the first sampling format according to the program code stored in the storage medium.
Alternatively, specific examples in this embodiment may refer to examples described in the foregoing embodiments and optional implementations, and this embodiment is not described herein.
It will be appreciated by those skilled in the art that the modules or steps of the invention described above may be implemented in a general purpose computing device, they may be concentrated on a single computing device, or distributed across a network of computing devices, they may alternatively be implemented in program code executable by computing devices, so that they may be stored in a memory device for execution by computing devices, and in some cases, the steps shown or described may be performed in a different order than that shown or described, or they may be separately fabricated into individual integrated circuit modules, or multiple modules or steps within them may be fabricated into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the present invention, but various modifications and variations can be made to the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (30)

1. A method for decoding a compressed bitstream of video data, comprising:
analyzing the compressed code stream of the video data to obtain sampling format information and/or decoding mode information;
selecting a first sampling format and a decoding mode corresponding to the first sampling format from a plurality of preset sampling formats and decoding modes according to the sampling format information and/or the decoding mode information;
decoding the decoding block by adopting the first sampling format and a decoding mode corresponding to the first sampling format;
wherein, one sampling format and decoding mode of the preset multiple sampling formats and decoding modes corresponds to a preset value k, and a sampling format and a corresponding decoding mode identification code which are directly or indirectly or directly and indirectly mixed are obtained for the decoding block from the video data compressed code stream;
Wherein the direct sampling format and the corresponding decoding mode identification code are composed of one or more bit strings in the video data compression code stream; the indirect sampling format and the corresponding decoding mode identification code are sampling formats and corresponding decoding mode identification codes derived from other decoding parameters except the decoding mode parameters and/or other syntax elements of the video data compression code stream except the syntax elements corresponding to the decoding mode parameters; the direct-indirect mixed sampling format and the corresponding decoding mode identification code are partial direct-partial indirect mixed sampling format and the corresponding decoding mode identification code.
2. The method of claim 1, wherein the video data compression stream comprises a data compression stream of information of at least one of:
one-dimensional data, two-dimensional data, a sequence of images, video, audio, files, bytes, bits, pixels, data composed of three components, an image having a rectangular shape, a sequence of images having a rectangular shape, an image composed of three components, an image sequence composed of three components, a video composed of three components, an image sequence composed of R components, G components, B components, a video composed of R components, G components, B components, an image composed of one luminance component and two chrominance components, an image sequence composed of one luminance component and two chrominance components, a video composed of one luminance component and two chrominance components, and encoded blocks of data.
3. The method of claim 1, wherein the decoded block is a decoded region of an image, wherein the decoded region comprises at least one of: sub-pictures of a picture, macro-blocks, largest coding units LCU, coding tree units CTU, coding units CU, sub-regions of a CU, prediction units PU, transform units TU.
4. The method of claim 1, wherein the plurality of sampling formats includes a main sampling format and other sampling formats, wherein the other sampling formats are sampling formats obtained by sampling operations of the main sampling format.
5. The method according to claim 1, wherein the video data compression stream has a rectangular shape and a data compression stream of three component images or sequences of images.
6. The method of claim 1, wherein the plurality of sampling formats are a 4:4:4 sampling format and a 4:2:0 sampling format; alternatively, the plurality of sampling formats are a 4:4:4 sampling format and a 4:2:2 sampling format; alternatively, the plurality of sampling formats are a 4:2:2 sampling format and a 4:2:0 sampling format.
7. The method of claim 6, wherein the step of providing the first layer comprises,
The decoding mode corresponding to the 4:2:0 sampling format comprises the following steps: generating a data version in a 4:2:0 sampling format, and converting the data version in the 4:2:0 sampling format into the data version in the 4:4:4 or 4:2:2 sampling format through an up-sampling operation, wherein the method for generating the data version in the 4:2:0 sampling format comprises the following steps: generating a data version in a 4:2:0 sampling format according to an operation of intra-predicting neighboring pixels of the decoding block, and/or generating a data version in a 4:2:0 sampling format according to an operation of inter-predicting neighboring images of the decoding image;
the decoding mode corresponding to the 4:4:4 or 4:2:2 sampling format comprises the following steps: generating a data version in a 4:4:4 or 4:2:2 sampling format according to a prediction operation, and converting the data version in the 4:4:4 or 4:2:2 sampling format into the data version in a 4:2:0 sampling format through a downsampling operation.
8. The method of claim 7, wherein the decoding means comprises at least one of: performing intra prediction according to adjacent pixels of the decoding block; inter-prediction from neighboring pictures of the decoded picture; transforming; scaling; universal string prediction; decoding a palette; dictionary decoding; and (5) entropy decoding.
9. The method as recited in claim 1, further comprising: analyzing the compressed code stream of the video data, and obtaining a first zone bit from one of the following positions: the video decoder comprises a sequence parameter set, a picture parameter set, a sequence header, a strip header, a picture header, a CTU header, a CU header and a decoding block header, wherein the first flag bit is used for indicating that decoding is allowed to be performed by adopting a plurality of sampling formats and/or corresponding decoding modes.
10. The method as recited in claim 1, further comprising: analyzing the video data compressed code stream, and acquiring a second zone bit from at least one of the following positions: a sequence parameter set, an image parameter set, a sequence header, a stripe header, an image header, and a decoding block header, wherein the second flag bit is used for indicating that the decoding block adopting a 4:4:4 sampling format and/or a corresponding string prediction decoding mode is allowed to be used.
11. The method as recited in claim 1, further comprising: analyzing the video data compressed code stream, and acquiring a third zone bit from at least one of the following positions: a sequence parameter set, an image parameter set, a sequence header, a stripe header, an image header, and a decoding block header, wherein the third flag bit is used for indicating that the decoding block adopting the 4:2:2 sampling format and/or the corresponding string prediction decoding mode is allowed to be used.
12. The method of claim 1, wherein the sampling format and the identification code corresponding to the decoding mode are obtained from the following positions of the compressed stream of video data:
the decoding block header information syntax element, the sampling format, the corresponding decoding mode identification code syntax element, the additional decoding block header information syntax element and the decoding block data syntax element; or (b)
The decoding block header information syntax element, the partial sampling format and corresponding decoding mode identification code syntax element, the additional decoding block header information syntax element, the partial decoding block data syntax element, the other partial sampling format and corresponding decoding mode identification code syntax element, the other partial decoding block data syntax element;
and when the value of the identification code syntax element is equal to a specified value, decoding the decoding block by adopting a sampling format corresponding to the specified value and a corresponding decoding mode.
13. The method of claim 7, wherein the prediction operation comprises a string prediction operation.
14. A method of encoding video data, comprising:
selecting a first sampling format from a predetermined plurality of sampling formats, and selecting a coding mode corresponding to the first sampling format from a predetermined plurality of coding modes;
Encoding the encoded blocks of video data using the selected first sampling format and the selected encoding scheme to produce a compressed video data stream, wherein the compressed video data stream comprises: a first sampling format and/or coding mode, syntax elements corresponding to the first sampling format and/or coding mode;
wherein, one sampling format and coding mode of the preset multiple sampling formats and coding modes corresponds to a preset value k, a sampling format and a corresponding coding mode identification code which are directly or indirectly or directly and indirectly mixed are set for the coding block, and the coding mode identification code is contained in the video data compression code stream;
wherein the direct sampling format and the corresponding coding mode identification code are composed of one or more bit strings in the video data compression code stream; the indirect sampling format and the corresponding coding mode identification code are sampling formats and corresponding coding mode identification codes derived from other coding parameters except the selected coding mode parameters and/or other syntax elements except the syntax elements of the video data compression code stream; the direct-indirect mixed sampling format and the corresponding coding mode identification code are part of the direct-indirect mixed sampling format and the corresponding coding mode identification code.
15. The method of claim 14, wherein the video data comprises at least one of:
one-dimensional data, two-dimensional data, a sequence of images, video, audio, files, bytes, bits, pixels, data composed of three components, an image having a rectangular shape, a sequence of images having a rectangular shape, an image composed of three components, an image sequence composed of three components, a video composed of three components, an image sequence composed of R components, G components, B components, a video composed of R components, G components, B components, an image composed of one luminance component and two chrominance components, an image sequence composed of one luminance component and two chrominance components, a video composed of one luminance component and two chrominance components, and encoded blocks of data.
16. The method of claim 14, wherein the encoded block is an encoded region of an image, wherein the encoded region comprises at least one of: sub-pictures of a picture, macro-blocks, largest coding units LCU, coding tree units CTU, coding units CU, sub-regions of a CU, prediction units PU, transform units TU.
17. The method of claim 14, wherein the plurality of sampling formats includes a main sampling format and other sampling formats, wherein the other sampling formats are sampling formats obtained by sampling operations of the main sampling format.
18. The method of claim 14, wherein the video data is an image or sequence of images having a rectangular shape and three components.
19. The method of claim 14, wherein the plurality of sampling formats are a 4:4:4 sampling format and a 4:2:0 sampling format; alternatively, the plurality of sampling formats are a 4:4:4 sampling format and a 4:2:2 sampling format; alternatively, the plurality of sampling formats are a 4:2:2 sampling format and a 4:2:0 sampling format.
20. The method of claim 19, wherein the step of determining the position of the probe comprises,
the coding modes corresponding to the 4:2:0 sampling format comprise: generating a data version in a 4:2:0 sampling format, and converting the data version in the 4:2:0 sampling format into the data version in the 4:4:4 or 4:2:2 sampling format through an up-sampling operation, wherein the method for generating the data version in the 4:2:0 sampling format comprises the following steps: generating a data version in a 4:2:0 sampling format according to an operation of intra-predicting neighboring pixels of the encoded block, and/or generating a data version in a 4:2:0 sampling format according to an operation of inter-predicting neighboring images of the encoded image;
The coding modes corresponding to the 4:4:4 or 4:2:2 sampling formats comprise: generating a data version in a 4:4:4 or 4:2:2 sampling format according to a prediction operation, and converting the data version in the 4:4:4 or 4:2:2 sampling format into the data version in a 4:2:0 sampling format through a downsampling operation.
21. The method of claim 20, wherein the encoding means comprises at least one of: performing intra prediction according to adjacent pixels of the coding block; inter-prediction from neighboring pictures of the encoded picture; transforming; quantifying; universal string prediction; palette coding; dictionary coding; hybrid coding; entropy coding.
22. The method as recited in claim 14, further comprising: the video data compression code stream comprises a first flag bit in one of the following parts: the coding method comprises the steps of a sequence parameter set, an image parameter set, a sequence header, a strip header, an image header, a CTU header, a CU header and a coding block header, wherein the first flag bit is used for indicating that coding is allowed to be performed by adopting a plurality of sampling formats and/or corresponding coding modes.
23. The method as recited in claim 14, further comprising: at least one of the following parts of the compressed code stream of the video data comprises a second flag bit: the second flag bit is used for indicating that the coding block adopting a 4:4:4 sampling format and/or a corresponding coding mode is allowed to be used.
24. The method as recited in claim 14, further comprising: the video data compression code stream comprises a third flag bit in at least one of the following parts: the third flag bit is used for indicating that the coding block adopting a 4:2:2 sampling format and/or a corresponding coding mode is allowed to be used.
25. The method of claim 14, wherein the sampling format and the identification code corresponding to the encoding mode are present in the compressed stream of video data using the following modes:
the coding block header information syntax element, the sampling format, the corresponding coding mode identification code syntax element, the additional coding block header information syntax element and the coding block data syntax element; or (b)
The coding block header information syntax element, the partial sampling format and corresponding coding mode identification code syntax element, the additional coding block header information syntax element, the partial coding block data syntax element, the other partial sampling format and corresponding coding mode identification code syntax element and the other partial coding block data syntax element;
and when the value of the identification code syntax element is equal to a specified value, encoding the encoding block by adopting a sampling format corresponding to the specified value and a corresponding encoding mode.
26. The method of claim 22, wherein the prediction operation comprises a string prediction operation.
27. A decoding apparatus for a compressed bitstream of video data, comprising:
the analysis module is used for analyzing the compressed code stream of the video data and acquiring sampling format information and/or decoding mode information;
the selection module is used for selecting a first sampling format and a decoding mode corresponding to the first sampling format from a plurality of preset sampling formats and decoding modes according to the sampling format information and/or the decoding mode information;
the decoding module is used for decoding the decoding block by adopting the first sampling format and a decoding mode corresponding to the first sampling format;
the parsing module is further configured to obtain, from the compressed video data stream, a sampling format and a corresponding decoding mode identification code of direct or indirect or direct-indirect mixture for the decoding block, where one sampling format and decoding mode of the predetermined multiple sampling formats and decoding modes corresponds to a predetermined value k;
the analysis module is further used for directly analyzing the video data compressed code stream according to the sampling format and the corresponding decoding mode identification code, wherein the analysis module is also used for directly analyzing the video data compressed code stream according to the sampling format and the corresponding decoding mode identification code; the indirect sampling format and the corresponding decoding mode identification code are sampling formats and corresponding decoding mode identification codes derived from other decoding parameters except the decoding mode parameters and/or other syntax elements of the video data compression code stream except the syntax elements corresponding to the decoding mode parameters; the direct-indirect mixed sampling format and the corresponding decoding mode identification code are partial direct-partial indirect mixed sampling format and the corresponding decoding mode identification code.
28. An apparatus for encoding video data, comprising:
a selection module, configured to select a first sampling format from a predetermined plurality of sampling formats, and select a coding mode corresponding to the first sampling format from a predetermined plurality of coding modes;
the encoding module is configured to encode an encoded block of video data using the selected first sampling format and the selected encoding mode to generate a compressed video data stream, where the compressed video data stream includes: a first sampling format and/or coding mode, syntax elements corresponding to the first sampling format and/or coding mode;
the selection module is further configured to set a sampling format and a corresponding coding mode identification code of direct or indirect or direct-indirect mixing for the coding block, where one sampling format and coding mode of the predetermined multiple sampling formats and coding modes corresponds to a predetermined value k, and the coding mode identification code is included in the video data compressed code stream;
wherein, the selection module is also used for the direct sampling format and the corresponding coding mode identification code to be composed of one or more bit strings in the video data compression code stream; the indirect sampling format and the corresponding coding mode identification code are sampling formats and corresponding coding mode identification codes derived from other coding parameters except the selected coding mode parameters and/or other syntax elements except the syntax elements of the video data compression code stream; the direct-indirect mixed sampling format and the corresponding coding mode identification code are part of the direct-indirect mixed sampling format and the corresponding coding mode identification code.
29. A computer storage medium having a program recorded thereon, wherein the program is executable by a processor to implement the method of any one of claims 1 to 26.
30. A processor for running a program, wherein the program when run performs the method of any one of claims 1 to 26.
CN201710424248.4A 2016-06-08 2017-06-07 Decoding method of video data compressed code stream, encoding method and device of video data Active CN107483942B (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN201610401154 2016-06-08
CN2016104011540 2016-06-08
CN2017101438731 2017-03-12
CN201710143873 2017-03-12

Publications (2)

Publication Number Publication Date
CN107483942A CN107483942A (en) 2017-12-15
CN107483942B true CN107483942B (en) 2023-07-14

Family

ID=60578383

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710424248.4A Active CN107483942B (en) 2016-06-08 2017-06-07 Decoding method of video data compressed code stream, encoding method and device of video data

Country Status (2)

Country Link
CN (1) CN107483942B (en)
WO (1) WO2017211306A1 (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109063091B (en) * 2018-07-26 2021-06-15 成都大学 Data migration method and device for hybrid coding and storage medium
CN109379630B (en) * 2018-11-27 2021-03-12 Oppo广东移动通信有限公司 Video processing method and device, electronic equipment and storage medium
CN113163212B (en) * 2020-01-07 2024-08-13 腾讯科技(深圳)有限公司 Video decoding method and device, video encoding method and device, medium and equipment
CN111314778B (en) * 2020-03-02 2021-09-07 北京小鸟科技股份有限公司 Coding and decoding fusion processing method, system and device based on multiple compression modes
CN112929624B (en) * 2021-01-21 2023-02-17 杭州雾联科技有限公司 Encoding method, encoding device, electronic equipment and computer readable storage medium
CN113395515B (en) * 2021-04-08 2022-06-14 同济大学 Coding and decoding method and device for point prediction of component down-sampling format data
CN115037927B (en) * 2022-05-07 2024-10-01 同济大学 Image coding and decoding method and device integrating full chromaticity and mixed chromaticity

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104853209A (en) * 2014-02-16 2015-08-19 同济大学 Image coding and decoding method and device
WO2015120823A1 (en) * 2014-02-16 2015-08-20 同济大学 Image compression method and device using reference pixel storage space in multiple forms

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050129130A1 (en) * 2003-12-10 2005-06-16 Microsoft Corporation Color space coding framework
CN101420614B (en) * 2008-11-28 2010-08-18 同济大学 Image compression method and device integrating hybrid coding and wordbook coding
WO2013102293A1 (en) * 2012-01-04 2013-07-11 Mediatek Singapore Pte. Ltd. Improvements of luma-based chroma intra prediction
CN103918269B (en) * 2012-01-04 2017-08-01 联发科技(新加坡)私人有限公司 Chroma intra prediction method and device
US9979960B2 (en) * 2012-10-01 2018-05-22 Microsoft Technology Licensing, Llc Frame packing and unpacking between frames of chroma sampling formats with different chroma resolutions
JP6126234B2 (en) * 2012-11-12 2017-05-10 エルジー エレクトロニクス インコーポレイティド Signal transmitting / receiving apparatus and signal transmitting / receiving method
US8817179B2 (en) * 2013-01-08 2014-08-26 Microsoft Corporation Chroma frame conversion for the video codec
US10397607B2 (en) * 2013-11-01 2019-08-27 Qualcomm Incorporated Color residual prediction for video coding
EP3114835B1 (en) * 2014-03-04 2020-04-22 Microsoft Technology Licensing, LLC Encoding strategies for adaptive switching of color spaces

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104853209A (en) * 2014-02-16 2015-08-19 同济大学 Image coding and decoding method and device
WO2015120823A1 (en) * 2014-02-16 2015-08-20 同济大学 Image compression method and device using reference pixel storage space in multiple forms

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
H.264/AVC在数字安防监控系统中的应用;张勇;耿欣;;控制工程(S3);全文 *

Also Published As

Publication number Publication date
WO2017211306A1 (en) 2017-12-14
CN107483942A (en) 2017-12-15

Similar Documents

Publication Publication Date Title
CN107483942B (en) Decoding method of video data compressed code stream, encoding method and device of video data
EP3334153B1 (en) Reference frame decoding method
CA2614016C (en) Moving image encoding device, moving image decoding device, moving image encoding method, and moving image decoding method
US10038908B2 (en) Palette mode in high efficiency video coding (HEVC) screen content coding (SCC)
US8977048B2 (en) Method medium system encoding and/or decoding an image using image slices
CN107547907B (en) Method and device for coding and decoding
US8873625B2 (en) Enhanced compression in representing non-frame-edge blocks of image frames
US20150010068A1 (en) Method, device, and computer program for pre-encoding and post-decoding high bit-depth content in video encoder and decoder
JP2017538381A (en) Inter-component prediction in video coding.
CN104853211A (en) Image compression method and apparatus employing various forms of reference pixel storage spaces
KR20180069818A (en) Entropy Coding Techniques for Display Stream Compression (DSC) of Non-4: 4: 4 Chroma Sub-Sampling
KR20070009486A (en) Method and apparatus for encoding and decoding image
CN105847842B (en) Image encoding method and device, and image decoding method and device
AU2003291058B2 (en) Apparatus and method for multiple description encoding
KR20220035154A (en) Image encoding/decoding method, apparatus and method of transmitting bitstream for signaling chroma component prediction information according to whether or not the palette mode is applied
JP2024506156A (en) Coding residuals and coefficients for video coding
KR20160091392A (en) Method for encoding and decoding images, device for encoding and decoding images and corresponding computer programs
CN108574845B (en) Data compression method and device dynamically adopting multiple sampling formats
CN114762339B (en) Image or video coding based on transform skip and palette coding related high level syntax elements
TW202141979A (en) Methods for quantization parameter control for video coding with joined pixel/transform based quantization
CN108989820B (en) Data compression method and device adopting respective corresponding chroma sampling formats at all stages
EP3253055B1 (en) Image coding/decoding method and apparatus
CN114762335B (en) Image or video coding based on transform skip and palette coding related data
CN115037927A (en) Image coding and decoding method fusing full chroma and mixed chroma and application thereof
CN114979628A (en) Image block prediction sample determining method and coding and decoding equipment

Legal Events

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