[go: up one dir, main page]

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

Decoding of video data compressed code stream, video data encoding method and device 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

本发明提供了一种视频数据压缩码流的解码、视频数据的编码方法及装置,其中,视频数据压缩码流的解码方法包括:解析视频数据压缩码流,获取采样格式信息和/或解码方式信息;根据采样格式信息和/或解码方式信息,在预定的多种采样格式和解码方式之中,选择第一采样格式和与第一采样格式相应的解码方式;采用第一采样格式和第一采样格式相应的解码方式对解码块进行解码。通过本发明,解决了相关技术中采用单一的采用格式和解码方式进行解码时效率过低的技术问题。

Figure 201710424248

The present invention provides a method and device for decoding video data compressed code streams and encoding video data, wherein the decoding method for video data compressed code streams includes: parsing video data compressed code streams, acquiring sampling format information and/or decoding methods information; according to the sampling format information and/or decoding method information, among the predetermined multiple sampling formats and decoding methods, select the first sampling format and the decoding method corresponding to the first sampling format; adopt the first sampling format and the first The decoding mode corresponding to the sampling format decodes the decoding block. The present invention solves the technical problem of low efficiency when decoding with a single format and decoding method in the related art.

Figure 201710424248

Description

视频数据压缩码流的解码、视频数据的编码方法及装置Decoding of video data compressed code stream, video data encoding method and device

技术领域technical field

本发明涉及数据处理领域,具体而言,涉及一种视频数据压缩码流的解码、视频数据的编码方法及装置。The present invention relates to the field of data processing, in particular to a method and device for decoding video data compression code streams and encoding video data.

背景技术Background technique

随着人类社会进入大数据、云计算、移动计算、云-移动计算、超高清(4K)和特超高清(8K)视频图像分辨率、4G/5G通讯、虚拟现实的时代,对各种数据,包括大数据、图像数据、视频数据,进行超高压缩比和极高质量的数据压缩成为必不可少的技术。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, and virtual reality, all kinds of data , including big data, image data, and video data, ultra-high compression ratio and extremely high-quality data compression has become an indispensable technology.

数据集是由数据元素(例如:字节、比特、像素)组成的集合。对一个排列成一定形状和具有一定元素数目(即具有一定采样格式)的数据集(例如:一个文件、一帧图像、一个视频序列)进行数据压缩的编码(以及相应的解码)时,通常把此数据集划分成若干具有预定形状和大小(即元素数目)的块的子集,称为编码块(从解码的角度也就是解码块,统称为编解码块),以编解码块为单位,一块一块进行编码或解码。在任一时刻,正在编码中的编码块称为当前编码块。在任一时刻,正在解码中的解码块称为当前解码块。当前编码块或当前解码块统称为当前编解码块或简称为当前块。正在编码或解码中的数据元素(简称为元素)称为当前编码数据元素或当前解码数据元素,统称为当前数据元素,简称为当前元素。元素由N个分量(通常1≤N≤5)组成,因此数据集和编解码块也都由N个分量组成。例如,一帧图像的元素即像素排列成矩形形状,具有1920(宽度)x 1080(高度)的大小(分辨率),由3个分量组成:G(绿色)分量,B(蓝色)分量,R(红色)分量或Y(亮度)分量,U(Cb色度)分量,V(Cr色度)分量。A dataset is a collection of data elements (eg, bytes, bits, pixels). When performing data compression encoding (and corresponding decoding) on a data set (for example: a file, a frame image, a video sequence) arranged in a certain shape and with a certain number of elements (that is, with a certain sampling format), usually the This data set is divided into several subsets of blocks with a predetermined shape and size (that is, the number of elements), called coding blocks (from the perspective of decoding, that is, decoding blocks, collectively referred to as codec blocks), with codec blocks as units, Encode or decode block by block. At any moment, the coding block being coded is called the current coding block. At any moment, the decoding block being decoded is called the current decoding block. The current coding block or the current decoding block is collectively referred to as the current codec block or the current block for short. A data element being encoded or decoded (referred to as an element for short) is referred to as a currently encoded data element or a currently decoded data element, collectively referred to as a current data element, or simply referred to as a current element. An element consists of N components (usually 1≤N≤5), so both the data set and the codec block also consist of N components. For example, the elements of a frame of image, i.e. pixels, are arranged in a rectangular shape with a size (resolution) of 1920 (width) x 1080 (height), consisting of 3 components: G (green) component, B (blue) component, R (red) component or Y (brightness) component, U (Cb chroma) component, V (Cr chroma) component.

在相关技术中,作为编码对象的数据集和编解码块都只有一种固定的采样格式和大小。例如,对于计算机产生的含图形和文字的图像,通常采用一种称为4:4:4的采样格式,就是数据集的3个分量都具有同样的采样率和大小(即分量样值的数目)。对于摄像机摄取的自然图像和视频,通常采用一种称为4:2:0的采样格式,就是具有矩形形状和3个分量的数据集(如图像或视频)的2个分量(D分量和E分量)的采样率和尺寸分别是另一个分量(F分量)的四分之一。在这种情形,一个D分量D[i][j]和一个E分量E[i][j]对应于四个(2×2个)F分量F[2i][2j],F[2i+1][2j],F[2i][2j+1],F[2i+1][2j+1]。如果F分量的分辨率是2M×2N,即数据集的F分量是F={F[i][j]:i=0~2M-1,j=0~2N-1},那么D分量和E分量的分辨率分别都是M×N,即数据集的D分量和E分量分别是D={D[i][j]:i=0~M-1,j=0~N-1}和E={E[i][j]:i=0~M-1,j=0~N-1}。还有一种称为4:2:2的采样格式,就是具有矩形形状和3个分量的数据集(如图像或视频)的2个分量(D分量和E分量)的采样率和尺寸分别是另一个分量(F分量)的二分之一。在这种情形,在数据集(如图像或视频)的水平方向,一个D分量D[i][j]和一个E分量E[i][j]对应于两个(2×1个)F分量F[2i][j]和F[2i+1][j]。如果F分量的分辨率是2M×N,,即数据集的F分量是F={F[i][j]:i=0~2M-1,j=0~N-1},那么D分量和E分量的分辨率分别都是M×N,即数据集的D分量和E分量分别是D={D[i][j]:i=0~M-1,j=0~N-1}和E={E[i][j]:i=0~M-1,j=0~N-1}。在采用YUV色彩格式的图像和视频中,以上所述F、D、E分量分别是Y、U、V分量。在采用RGB色彩格式的图像和视频中,以上所述F、D、E分量分别是G、B、R分量。在现有技术中,即使在某些情形,作为编码对象的数据集和编解码块有多种采样格式和大小,对这些不同采样格式和大小的编码对象进行编码时,采用的是同一种编码方式,或者不同的编码方式,总是对单一采样格式和大小的编码对象进行编码。这里,不同的采样格式是指数据集和/或编解码块的至少一个分量具有不同的采样率和大小(即分量样值的数目)。不同的采样率和大小通过上采样操作或下采样操作互相转换。上采样操作是增加样值的数目的操作。下采样操作是减少样值的数目的操作。因此,不同的采样格式也就是数据集和/或编解码块的至少一个分量具有不同的样值数目。In related technologies, both the data set and the codec block as the coding object have only one fixed sampling format and size. For example, for computer-generated images containing graphics and text, a sampling format called 4:4:4 is usually used, that is, the three components of the data set have the same sampling rate and size (that is, the number of component samples ). For natural images and videos ingested by cameras, a sampling format called 4:2:0 is usually used, which is 2 components (D component and E The sampling rate and size of the component) are respectively one quarter of the other component (the 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 2M×2N, that is, the F component of the data set is F={F[i][j]: i=0~2M-1, j=0~2N-1}, then the D component and The resolutions of the E components are M×N respectively, that is, the D and E components of the data set are D={D[i][j]: i=0~M-1, j=0~N-1} and E={E[i][j]: i=0~M-1, j=0~N-1}. There is also a sampling format called 4:2:2, which is a data set (such as an image or video) with a rectangular shape and 3 components. The sampling rate and size of the 2 components (D component and E component) are another One-half of a component (F component). In this case, in the horizontal direction of the data set (such as 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 2M×N, that is, the F component of the data set is F={F[i][j]: i=0~2M-1, j=0~N-1}, then the D component The resolutions of the D and E components are both M×N, that is, the D and E components of the data set are D={D[i][j]: i=0~M-1, j=0~N-1 } and E={E[i][j]: i=0~M-1, j=0~N-1}. In images and videos using the YUV color format, the above-mentioned F, D, and E components are Y, U, and V components, respectively. In images and videos using the RGB color format, the above-mentioned F, D, and E components are G, B, and R components, respectively. In the existing technology, even in some cases, the data sets and codec blocks used as encoding objects have multiple sampling formats and sizes, when encoding these encoding objects with different sampling formats and sizes, the same encoding is used way, or a different encoding way, always encodes an encoded object of a single sample format and size. Here, different sampling formats mean that at least one component of a data set and/or a codec block has a different sampling rate and size (ie, the number of component samples). Different sampling rates and sizes are converted to each other by upsampling operation or downsampling operation. The upsampling operation is an operation to increase the number of samples. The downsampling operation is an operation to reduce the number of samples. Therefore, different sampling formats, ie at least one component of a data set and/or a codec block, have a different number of samples.

对于由多种特性的内容混合而成的数据集,例如由计算机产生的图形和文字与摄像机摄取的自然图像和视频混合而成的屏幕内容图像和视频、虚拟现实的图像和视频,单一的采样格式和大小、本质上单一的编码方式,极大影响了数据压缩效率的提高。For data sets that are mixed with content of multiple characteristics, such as screen content images and videos mixed with computer-generated graphics and text and natural images and videos captured by cameras, images and videos of virtual reality, a single sampling Format and size, and essentially a single encoding method greatly affect the improvement of data compression efficiency.

针对相关技术中存在的上述问题,目前尚未发现有效的解决方案。Aiming at the above-mentioned problems existing in related technologies, no effective solution has been found yet.

发明内容Contents of the invention

本发明实施例提供了一种视频数据压缩码流的解码、视频数据的编码方法及装置,以至少解决相关技术中采用单一的采用格式和解码方式进行解码时效率过低的技术问题。Embodiments of the present invention provide a method and device for decoding compressed code streams of video data and encoding video data, so as to at least solve the technical problem of low efficiency when decoding with a single format and decoding method in the related art.

根据本发明的一个实施例,提供了一种视频数据压缩码流的解码方法,还包括:解析视频数据压缩码流,获取采样格式信息和/或解码方式信息;根据所述采样格式信息和/或解码方式信息,在预定的多种采样格式和解码方式之中,选择第一采样格式和与所述第一采样格式相应的解码方式;采用所述第一采样格式和所述第一采样格式相应的解码方式对解码块进行解码。According to an embodiment of the present invention, there is provided a decoding method of a video data compressed code stream, which further includes: parsing the video data compressed code stream to obtain sampling format information and/or decoding method information; according to the sampling format information and/or or decoding method information, among predetermined multiple sampling formats and decoding methods, select the first sampling format and the decoding method corresponding to the first sampling format; adopt the first sampling format and the first sampling format The corresponding decoding mode decodes the decoding block.

可选地,所述视频数据压缩码流包括以下至少之一信息的数据压缩码流:一维数据,二维数据,大于二维的多维数据,图像,图像的序列,视频,音频,文件,字节,比特,像素,由三个分量组成的数据,具有矩形形状的图像,具有矩形形状的图像的序列,由三个分量组成的图像,由三个分量组成的图像序列,由三个分量组成的视频,由R分量、G分量、B分量组成的图像,由R分量、G分量、B分量组成的图像序列,由R分量、G分量、B分量组成的视频,由一个亮度分量和两个色度分量组成的图像,由一个亮度分量两个色度分量组成的图像序列,由一个亮度分量两个色度分量组成的视频,数据的编码块。Optionally, the video data compression code stream includes a data compression code stream of at least one of the following information: one-dimensional data, two-dimensional data, multi-dimensional data larger than two-dimensional, image, image sequence, video, audio, file, byte, bit, pixel, data consisting of three components, image having a rectangular shape, sequence of images having a rectangular shape, image consisting of three components, sequence of images consisting of three components, Composed video, image composed of R component, G component, B component, image sequence composed of R component, G component, B component, video composed of R component, G component, B component, composed of a brightness component and two An image composed of one chrominance component, an image sequence composed of one luminance component and two chrominance components, a video composed of one luminance component and two chrominance components, and a coded block of data.

可选地,所述解码块是图像的解码区域,其中,所述解码区域包括以下至少之一:图像的子图像、宏块、最大编码单元LCU、编码树单元CTU、编码单元CU、CU的子区域、预测单元PU、变换单元TU。Optionally, the decoding block is a decoding area of an image, wherein the decoding area includes at least one of the following: a sub-image of an image, a macroblock, a largest coding unit LCU, a coding tree unit CTU, a coding unit CU, or a CU Sub-region, prediction unit PU, transform unit TU.

可选地,所述多种采样格式包括主采样格式和其他采样格式,其中,所述其他采样格式是所述主采样格式经过采样操作得到的采样格式。Optionally, the multiple sampling formats include a main sampling format and other sampling formats, wherein the other sampling formats are sampling formats obtained through a sampling operation on the main sampling format.

可选地,所述视频数据压缩码流具有矩形形状和三个分量的图像或图像的序列的数据压缩码流。Optionally, the video data compression code stream has a rectangular shape and a data compression code stream of images or sequences of images of three components.

可选地,所述多种采样格式是4:4:4采样格式和4:2:0采样格式;或者,所述多种采样格式是4:4:4采样格式和4:2:2采样格式;或者,所述多种采样格式是4:2:2采样格式和4:2:0采样格式。Optionally, the multiple sampling formats are 4:4:4 sampling format and 4:2:0 sampling format; or, the multiple sampling formats are 4:4:4 sampling format and 4:2:2 sampling format format; or, the multiple sampling formats are 4:2:2 sampling format and 4:2:0 sampling format.

可选地,与所述4:2:0采样格式相应的解码方式包括:产生4:2:0采样格式的数据版本,对所述4:2:0采样格式的数据版本经过上采样操作转换为4:4:4或4:2:2采样格式的数据版本,其中,产生所述4:2:0采样格式的数据版本方法包括:根据所述当解码块的邻近像素进行帧内预测的操作产生4:2:0采样格式的数据版本,和/或,根据解码图像的邻近图像进行帧间预测的操作产生4:2:0采样格式的数据版本;与所述4:4:4或4:2:2采样格式相应的解码方式包括:根据预测操作产生4:4:4或4:2:2采样格式的数据版本,对所述4:4:4或4:2:2采样格式的数据版本经过下采样操作转换为4:2:0采样格式的数据版本,其中,所述预测操作包括串预测操作。Optionally, the decoding method corresponding to the 4:2:0 sampling format includes: generating a data version of the 4:2:0 sampling format, and converting the data version of the 4:2:0 sampling format through an upsampling operation It is a data version in a 4:4:4 or 4:2:2 sampling format, wherein the method for generating the data version in the 4:2:0 sampling format includes: performing intra-frame prediction according to adjacent pixels of the decoding block operations that produce a version of the data in 4:2:0 sampling format, and/or operations that perform inter-prediction from adjacent pictures of the decoded picture produce a version of the data in 4:2:0 sampling format; and the 4:4:4 or The corresponding decoding method of the 4:2:2 sampling format includes: generating a data version of the 4:4:4 or 4:2:2 sampling format according to the prediction operation, and the 4:4:4 or 4:2:2 sampling format The data version of is converted into a data version in a 4:2:0 sampling format through a downsampling operation, wherein the prediction operation includes a string prediction operation.

可选地,所述解码方式包括以下至少之一:根据所述解码块的邻近像素进行帧内预测;根据所述解码图像的邻近图像进行帧间预测;根据所述解码图像的邻近图像进行帧间变换;缩放scaling;通用串预测;调色板解码;字典解码;熵解码。Optionally, the decoding method includes at least one of the following: perform intra-frame prediction according to adjacent pixels of the decoded block; perform inter-frame prediction according to adjacent images of the decoded image; perform frame prediction according to adjacent images of the decoded image Inter-transformation; scaling; general-purpose string prediction; palette decoding; dictionary decoding; entropy decoding.

可选地,还包括:解析所述视频数据压缩码流,从以下之一的位置获得第一标志位:序列参数集,图像参数集,序列头,条带头,图像头,CTU头,CU头,解码块头,其中,所述第一标志位用于指示允许采用多种采样格式和/或相应解码方式进行解码。Optionally, it also includes: parsing the video data compression code stream, and obtaining the first flag bit from one of the following positions: sequence parameter set, image parameter set, sequence header, slice header, image header, CTU header, CU header , decoding the block header, wherein the first flag bit is used to indicate that multiple sampling formats and/or corresponding decoding methods are allowed to be used for decoding.

可选地,还包括:解析所述视频数据压缩码流,从以下至少之一的位置获取第二标志位:序列参数集,图像参数集,序列头,条带头,图像头、解码块头,其中,所述第二标志位用于指示允许使用采用4:4:4采样格式和/或相应串预测解码方式的解码块。Optionally, it also includes: parsing the video data compression code stream, and obtaining the second flag bit from at least one of the following positions: sequence parameter set, image parameter set, sequence header, slice header, image header, decoding block header, wherein , the second flag bit is used to indicate that a decoding block using a 4:4:4 sampling format and/or a corresponding string prediction decoding mode is allowed to be used.

可选地,还包括:解析所述视频数据压缩码流,从以下至少之一的位置获取第三标志位:序列参数集,图像参数集,序列头,条带头,图像头、解码块头,其中,所述第三标志位用于指示允许使用采用4:2:2采样格式和/或相应串预测解码方式的解码块。Optionally, it also includes: parsing the video data compression code stream, and obtaining the third flag bit from at least one of the following positions: sequence parameter set, image parameter set, sequence header, slice header, image header, decoding block header, wherein , the third flag bit is used to indicate that the decoding block that adopts the 4:2:2 sampling format and/or the corresponding string prediction decoding mode is allowed to be used.

可选地,所述预定的多种采样格式和解码方式中的一种采样格式和解码方式对应于一个预定的值k,从所述视频数据压缩码流中,为所述解码块获取直接或间接或直接间接混合的采样格式和相应解码方式标识码。Optionally, one of the predetermined plurality of sampling formats and decoding methods corresponds to a predetermined value k, and from the video data compression code stream, directly or Indirect or direct-indirect mixed sampling format and corresponding decoding method identification code.

可选地,所述直接的采样格式和相应解码方式标识码由所述视频数据压缩码流中的一个或多个位串所组成;所述间接的采样格式和相应解码方式标识码是除所述解码方式参数之外的其他解码参数和/或所述视频数据压缩码流的除所述解码方式参数对应的语法元素之外的其他语法元素导出的采样格式和相应解码方式标识码;所述直接间接混合的采样格式和相应解码方式标识码是部分直接部分间接混合的采样格式和相应解码方式标识码。Optionally, the direct sampling format and corresponding decoding mode identification codes are composed of one or more bit strings in the video data compression stream; the indirect sampling format and corresponding decoding mode identification codes are The sampling format and the corresponding decoding mode identification code derived from other decoding parameters other than the decoding mode parameters and/or other syntax elements of the video data compressed 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 partly direct and partly indirect mixed sampling formats and corresponding decoding mode identification codes.

可选地,从所述视频数据压缩码流的以下位置获取所述采样格式和对应所述解码方式的标识码:所述解码块头信息语法元素、采样格式和相应解码方式标识码语法元素、额外的解码块头信息语法元素、解码块数据语法元素;或所述解码块头信息语法元素、部分采样格式和相应解码方式标识码语法元素、额外的解码块头信息语法元素、部分解码块数据语法元素、另一部分采样格式和相应解码方式标识码语法元素、另一部分解码块数据语法元素;其中,所述标识码语法元素的标识码的取值等于指定值时,表示采用与所述指定值对应的采样格式和相应解码方式对所述解码块进行解码。Optionally, the sampling format and the identification code corresponding to the decoding mode are obtained from the following positions of the video data compression code stream: the decoding block header information syntax element, sampling format and corresponding decoding mode identification code syntax element, additional The decoding block header information syntax elements, decoding block data syntax elements; or the decoding block header information syntax elements, partial sampling format and corresponding decoding mode identification code syntax elements, additional decoding block header information syntax elements, partial decoding block data syntax elements, and other Part of the sampling format and the corresponding decoding mode identification code syntax element, and another part of the decoding block data syntax element; wherein, when the value of the identification code of the identification code syntax element is equal to the specified value, it means that the sampling format corresponding to the specified value is adopted and the corresponding decoding mode to decode the decoding block.

根据本发明的另一个实施例,提供了一种视频数据的编码方法,包括:从预定的多种采样格式中选择第一采样格式,以及从预定的多种编码方式之中选择与所述第一采样格式对应的编码方式;使用选择的第一采样格式和选择的编码方式对视频数据的编码块进行编码产生视频数据压缩码流,其中,所述视频数据压缩码流包含:第一采样格式和/或编码方式,与第一采样格式和/或编码方式对应的语法元素。According to another embodiment of the present invention, a method for encoding video data is provided, including: selecting a first sampling format from a plurality of predetermined sampling formats, and selecting a first sampling format from among a plurality of predetermined encoding methods A coding method corresponding to a sampling format; using the selected first sampling format and the selected coding method to encode the coding block of the video data to generate a video data compression code stream, wherein the video data compression code stream includes: the first sampling format and/or encoding mode, a syntax element corresponding to the first sampling format and/or encoding mode.

可选地,所述视频数据包括以下至少之一:一维数据,二维数据,大于二维的多维数据,图像,图像的序列,视频,音频,文件,字节,比特,像素,由三个分量组成的数据,具有矩形形状的图像,具有矩形形状的图像的序列,由三个分量组成的图像,由三个分量组成的图像序列,由三个分量组成的视频,由R分量、G分量、B分量组成的图像,由R分量、G分量、B分量组成的图像序列,由R分量、G分量、B分量组成的视频,由一个亮度分量和两个色度分量组成的图像,由一个亮度分量两个色度分量组成的图像序列,由一个亮度分量两个色度分量组成的视频,数据的编码块。Optionally, the video data includes at least one of the following: one-dimensional data, two-dimensional data, multi-dimensional data larger than two-dimensional, image, image sequence, video, audio, file, byte, bit, pixel, composed of three data consisting of three components, an image having a rectangular shape, a sequence of images having a rectangular shape, an image consisting of three components, an image sequence consisting of three components, a video consisting of three components, consisting of R components, G An image composed of component and B component, an image sequence composed of R component, G component, and B component, a video composed of R component, G component, and B component, an image composed of a luminance component and two chrominance components, and an image composed of An image sequence composed of a luminance component and two chroma components, a video composed of a luminance component and two chroma components, and a coded block of data.

可选地,所述编码块是图像的编码区域,其中,所述编码区域包括以下至少之一:图像的子图像、宏块、最大编码单元LCU、编码树单元CTU、编码单元CU、CU的子区域、预测单元PU、变换单元TU。Optionally, the coding block is a coding area of an image, wherein the coding area includes at least one of the following: a sub-image of an image, a macroblock, a largest coding unit LCU, a coding tree unit CTU, a coding unit CU, or a CU Sub-region, prediction unit PU, transform unit TU.

可选地,所述多种采样格式包括主采样格式和其他采样格式,其中,所述其他采样格式是所述主采样格式经过采样操作得到的采样格式。Optionally, the multiple sampling formats include a main sampling format and other sampling formats, wherein the other sampling formats are sampling formats obtained through a sampling operation on the main sampling format.

可选地,所述视频数据是具有矩形形状和三个分量的图像或图像的序列。Optionally, said video data is an image or sequence of images having a rectangular shape and three components.

可选地,所述多种采样格式是4:4:4采样格式和4:2:0采样格式;或者,所述多种采样格式是4:4:4采样格式和4:2:2采样格式;或者,所述多种采样格式是4:2:2采样格式和4:2:0采样格式。Optionally, the multiple sampling formats are 4:4:4 sampling format and 4:2:0 sampling format; or, the multiple sampling formats are 4:4:4 sampling format and 4:2:2 sampling format format; or, the multiple sampling formats are 4:2:2 sampling format and 4:2:0 sampling format.

可选地,与所述4:2:0采样格式相应的编码方式包括:产生4:2:0采样格式的数据版本,对所述4:2:0采样格式的数据版本经过上采样操作转换为4:4:4或4:2:2采样格式的数据版本,其中,产生所述4:2:0采样格式的数据版本方法包括:根据所述当编码块的邻近像素进行帧内预测的操作产生4:2:0采样格式的数据版本,和/或,根据所述当编码图像的邻近图像进行帧间预测的操作产生4:2:0采样格式的数据版本;与所述4:4:4或4:2:2采样格式相应的编码方式包括:根据预测操作产生4:4:4或4:2:2采样格式的数据版本,对所述4:4:4或4:2:2采样格式的数据版本经过下采样操作转换为4:2:0采样格式的数据版本,其中,所述预测操作包括串预测操作。Optionally, the encoding method corresponding to the 4:2:0 sampling format includes: generating a data version of the 4:2:0 sampling format, and converting the data version of the 4:2:0 sampling format through an upsampling operation It is a data version in a 4:4:4 or 4:2:2 sampling format, wherein the method for generating the data version in the 4:2:0 sampling format includes: performing intra-frame prediction according to the adjacent pixels of the coding block The operation generates a data version in a 4:2:0 sampling format, and/or the operation of inter-predicting an adjacent image of the coded image generates a data version in a 4:2:0 sampling format; and the 4:4 :4 or 4:2:2 sampling format corresponding coding method includes: generating a data version of 4:4:4 or 4:2:2 sampling format according to the prediction operation, for the 4:4:4 or 4:2: The data version of the 2-sampling format is converted into a data version of the 4:2:0 sampling format through a down-sampling operation, wherein the prediction operation includes a string prediction operation.

可选地,所述编码方式包括以下至少之一:根据所述编码块的邻近像素进行帧内预测;根据所述编码图像的邻近图像进行帧间预测;根据所述编码图像的邻近图像进行帧间变换;量化;通用串预测;调色板编码;字典编码;混合编码Hybrid coding;熵编码。Optionally, the encoding method includes at least one of the following: performing intra-frame prediction according to adjacent pixels of the encoded block; performing inter-frame prediction based on adjacent images of the encoded image; performing frame prediction based on adjacent images of the encoded image Inter-transformation; quantization; general string prediction; palette coding; dictionary coding; hybrid coding Hybrid coding; entropy coding.

可选地,还包括:在所述视频数据压缩码流的以下之一部分包含第一标志位:序列参数集,图像参数集,序列头,条带头,图像头,CTU头,CU头,编码块头,其中,所述第一标志位用于指示允许采用多种采样格式和/或相应编码方式进行编码。Optionally, it also includes: including the first flag bit in one of the following parts of the video data compression code stream: sequence parameter set, image parameter set, sequence header, slice header, image header, CTU header, CU header, coded block header , wherein the first flag bit is used to indicate that multiple sampling formats and/or corresponding encoding methods are allowed to be used for encoding.

可选地,还包括:在所述视频数据压缩码流的以下至少之一部分包含第二标志位:序列参数集,图像参数集,序列头,条带头,图像头、编码块头,其中,所述第二标志位用于指示允许使用采用4:4:4采样格式和/或相应串预测编码方式的编码块。Optionally, it also includes: including a second flag bit in at least one of the following parts of the video data compression code stream: a sequence parameter set, an image parameter set, a sequence header, a slice header, an image header, and a coded block header, wherein the The second flag bit is used to indicate that a coding block using a 4:4:4 sampling format and/or corresponding string predictive coding mode is allowed to be used.

可选地,还包括:在所述视频数据压缩码流的以下至少之一部分包含第三标志位:序列参数集,图像参数集,序列头,条带头,图像头、编码块头,其中,所述第三标志位用于指示允许使用采用4:2:2采样格式和/或相应串预测编码方式的编码块。Optionally, it also includes: including a third flag in at least one of the following parts of the video data compression code stream: a sequence parameter set, an image parameter set, a sequence header, a slice header, an image header, and a coded block header, wherein the The third flag bit is used to indicate that a coding block that adopts the 4:2:2 sampling format and/or the corresponding string predictive coding method is allowed to be used.

可选地,所述预定的多种采样格式和编码方式中的一种采样格式和编码方式对应于一个预定的值k,为所述编码块设置直接或间接或直接间接混合的采样格式和相应编码方式标识码,将所述编码方式标识码包含在所述视频数据压缩码流中。Optionally, one of the predetermined plurality of sampling formats and coding methods corresponds to a predetermined value k, and a direct or indirect or direct-indirect mixed sampling format and corresponding An encoding mode identification code, including the encoding mode identification code in the video data compression code stream.

可选地,所述直接的采样格式和相应编码方式标识码由所述视频数据压缩码流中的一个或多个位串所组成;所述间接的采样格式和相应编码方式标识码是除所述选择的编码方式参数之外的其他编码参数和/或所述视频数据压缩码流的除所述语法元素之外的其他语法元素导出的采样格式和相应编码方式标识码;所述直接间接混合的采样格式和相应编码方式标识码是部分直接部分间接混合的采样格式和相应编码方式标识码。Optionally, the direct sampling format and corresponding encoding mode identification codes are composed of one or more bit strings in the video data compression code stream; the indirect sampling format and corresponding encoding mode identification codes are The sampling format and the corresponding encoding mode identification code derived from other encoding parameters other than the selected encoding mode parameters and/or other syntax elements of the video data compression stream except the syntax elements; the direct indirect mixing The sampling format and the corresponding coding mode identification code are partly direct and partly indirect mixed sampling format and corresponding coding mode identification code.

可选地,所述采样格式和对应所述编码方式的标识码使用下列方式存在于所述视频数据压缩码流中:所述编码块头信息语法元素、采样格式和相应编码方式标识码语法元素、额外的编码块头信息语法元素、编码块数据语法元素;或所述编码块头信息语法元素、部分采样格式和相应编码方式标识码语法元素、额外的编码块头信息语法元素、部分编码块数据语法元素、另一部分采样格式和相应编码方式标识码语法元素、另一部分编码块数据语法元素;其中,所述标识码语法元素的标识码的取值等于指定值时,表示采用与所述指定值对应的采样格式和相应编码方式对所述编码块进行编码。Optionally, the sampling format and the identification code corresponding to the encoding mode are present in the video data compression code stream in the following manner: the encoding block header information syntax element, the sampling format and the corresponding encoding mode identification code syntax element, Additional coded block header information syntax elements, coded block data syntax elements; or the coded block header information syntax elements, partial sampling formats and corresponding coding mode identification code syntax elements, additional coded block header information syntax elements, partial coded block data syntax elements, Another part of the sampling format and the corresponding encoding mode identification code syntax elements, and another part of the coding block data syntax elements; wherein, when the value of the identification code of the identification code syntax element is equal to the specified value, it means that the sampling corresponding to the specified value is adopted. The encoding block is encoded using a format and a corresponding encoding manner.

根据本发明的另一个实施例,提供了一种视频数据压缩码流的解码装置,包括:解析模块,用于解析视频数据压缩码流,获取采样格式信息和/或解码方式信息;选择模块,用于根据所述采样格式信息和/或解码方式信息,在预定的多种采样格式和解码方式之中,选择第一采样格式和与所述第一采样格式相应的解码方式;解码模块,用于采用所述第一采样格式和所述第一采样格式相应的解码方式对解码块进行解码。According to another embodiment of the present invention, a device for decoding video data compressed code streams is provided, including: an analysis module, configured to analyze video data compressed code streams, and obtain sampling format information and/or decoding method information; a selection module, It is used to select a first sampling format and a decoding method corresponding to the first sampling format among predetermined multiple sampling formats and decoding methods according to the sampling format information and/or decoding method information; the decoding module uses The decoded block is decoded by using the first sampling format and a decoding manner corresponding to the first sampling format.

根据本发明的另一个实施例,提供了一种视频数据的编码方法,包括:选择模块,用于从预定的多种采样格式中选择第一采样格式,以及从预定的多种编码方式之中选择与所述第一采样格式对应的编码方式;编码模块,用于使用选择的第一采样格式和选择的编码方式对视频数据的编码块进行编码产生视频数据压缩码流,其中,所述视频数据压缩码流包含:第一采样格式和/或编码方式,与第一采样格式和/或编码方式对应的语法元素。According to another embodiment of the present invention, a method for encoding video data is provided, including: a selection module for selecting a first sampling format from a plurality of predetermined sampling formats, and selecting a first sampling format from among a plurality of predetermined encoding methods Select the encoding method corresponding to the first sampling format; the encoding module is used to use the selected first sampling format and the selected encoding method to encode the encoding block of the video data to generate a video data compression code stream, wherein the video The data compression code stream includes: a first sampling format and/or coding mode, and syntax elements corresponding to the first sampling format and/or coding mode.

根据本发明的又一个实施例,还提供了一种存储介质。该存储介质设置为存储用于执行以下步骤的程序代码:According to still another embodiment of the present invention, a storage medium is also provided. The storage medium is configured to store program code for performing the following steps:

解析视频数据压缩码流,获取采样格式信息和/或解码方式信息;Parsing the video data compression code stream to obtain sampling format information and/or decoding method information;

根据所述采样格式信息和/或解码方式信息,在预定的多种采样格式和解码方式之中,选择第一采样格式和与所述第一采样格式相应的解码方式;According to the sampling format information and/or decoding mode information, among predetermined multiple sampling formats and decoding modes, select a first sampling format and a decoding mode corresponding to the first sampling format;

采用所述第一采样格式和所述第一采样格式相应的解码方式对解码块进行解码。The decoded block is decoded by using the first sampling format and a decoding manner corresponding to the first sampling format.

根据本发明的又一个实施例,还提供了一种存储介质。该存储介质设置为存储用于执行以下步骤的程序代码:According to still another embodiment of the present invention, a storage medium is also provided. The storage medium is configured to store program code for performing the following steps:

从预定的多种采样格式中选择第一采样格式,以及从预定的多种编码方式之中选择与所述第一采样格式对应的编码方式;Selecting a first sampling format from a plurality of predetermined sampling formats, and selecting an encoding method corresponding to the first sampling format from among a plurality of predetermined encoding methods;

使用选择的第一采样格式和选择的编码方式对视频数据的编码块进行编码产生视频数据压缩码流,其中,所述视频数据压缩码流包含:第一采样格式和/或编码方式,与第一采样格式和/或编码方式对应的语法元素。Use the selected first sampling format and the selected encoding method to encode the encoding block of the video data to generate a video data compression code stream, wherein the video data compression code stream includes: the first sampling format and/or the encoding method, and the second A syntax element corresponding to the sampling format and/or encoding method.

通过本发明,在预定的多种采样格式和解码方式之中选择采样格式和相应的解码方式,解决了相关技术中采用单一的采用格式和解码方式进行解码时效率过低的技术问题,提高了解码速率。Through the present invention, the sampling format and the corresponding decoding method are selected among a plurality of predetermined sampling formats and decoding methods, which solves the technical problem of low efficiency when decoding with a single format and decoding method in the related art, and improves the decoding rate.

附图说明Description of drawings

此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:The accompanying drawings described here are used to provide a further understanding of the present invention and constitute a part of the application. The schematic embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations to the present invention. In the attached picture:

图1是根据本发明实施例的视频数据压缩码流的解码方法的流程图;Fig. 1 is the flow chart of the decoding method of video data compression code stream according to the embodiment of the present invention;

图2是根据本发明实施例的视频数据的编码方法的流程图;Fig. 2 is the flowchart of the encoding method of video data according to the embodiment of the present invention;

图3是根据本发明实施例的视频数据压缩码流的解码装置的结构框图;3 is a structural block diagram of a decoding device for video data compression code stream according to an embodiment of the present invention;

图4是根据本发明实施例的视频数据的编码装置的结构框图;Fig. 4 is a structural block diagram of an encoding device for video data according to an embodiment of the present invention;

图5是本实施例的编码方法的一个示意图;Fig. 5 is a schematic diagram of the encoding method of this embodiment;

图6是本实施例的解码方法的一个示意图。Fig. 6 is a schematic diagram of the decoding method in this embodiment.

具体实施方式Detailed ways

下文中将参考附图并结合实施例来详细说明本发明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。Hereinafter, the present invention will be described in detail with reference to the drawings and examples. It should be noted that, in the case of no conflict, the embodiments in the present application and the features in the embodiments can be combined with each other.

需要说明的是,本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。It should be noted that the terms "first" and "second" in the description and claims of the present invention and the above drawings are used to distinguish similar objects, but not necessarily used to describe a specific sequence or sequence.

实施例1Example 1

在本实施例中提供了一种视频数据压缩码流的解码方法,图1是根据本发明实施例的视频数据压缩码流的解码方法的流程图,如图1所示,该流程包括如下步骤:In this embodiment, a method for decoding a video data compressed code stream is provided. FIG. 1 is a flowchart of a decoding method for a video data compressed code stream according to an embodiment of the present invention. As shown in FIG. 1 , the process includes the following steps :

步骤S102,解析视频数据压缩码流,获取采样格式信息和/或解码方式信息;Step S102, analyzing the compressed video data stream, and obtaining sampling format information and/or decoding method information;

步骤S104,根据采样格式信息和/或解码方式信息,在预定的多种采样格式和解码方式之中,选择第一采样格式和与第一采样格式相应的解码方式;Step S104, according to the sampling format information and/or decoding mode information, among predetermined multiple sampling formats and decoding modes, select a first sampling format and a decoding mode corresponding to the first sampling format;

步骤S106,采用第一采样格式和第一采样格式相应的解码方式对解码块进行解码。Step S106, using the first sampling format and the decoding method corresponding to the first sampling format to decode the decoded block.

通过上述步骤,在预定的多种采样格式和解码方式之中选择采样格式和相应的解码方式,解决了相关技术中采用单一的采用格式和解码方式进行解码时效率过低的技术问题,提高了解码速率。Through the above steps, the sampling format and the corresponding decoding method are selected among the predetermined multiple sampling formats and decoding methods, which solves the technical problem of low efficiency when decoding with a single format and decoding method in the related art, and improves the decoding rate.

可选地,上述步骤的执行主体可以为解码器,视频处理设备,如视频接收端,视频呈现设备等,但不限于此。Optionally, the execution subject of the above steps may be a decoder, a video processing device, such as a video receiving end, a video presentation device, etc., but is not limited thereto.

可选的,视频数据压缩码流包括以下至少之一信息的数据压缩码流:一维数据,二维数据,大于二维的多维数据,图像,图像的序列,视频,音频,文件,字节,比特,像素,由三个分量组成的数据,具有矩形形状的图像,具有矩形形状的图像的序列,由三个分量组成的图像,由三个分量组成的图像序列,由三个分量组成的视频,由R分量、G分量、B分量组成的图像,由R分量、G分量、B分量组成的图像序列,由R分量、G分量、B分量组成的视频,由一个亮度分量和两个色度分量组成的图像,由一个亮度分量两个色度分量组成的图像序列,由一个亮度分量两个色度分量组成的视频,数据的编码块。Optionally, the video data compression code stream includes a data compression code stream of at least one of the following information: one-dimensional data, two-dimensional data, multi-dimensional data larger than two-dimensional, image, image sequence, video, audio, file, byte , bit, pixel, data consisting of three components, image having a rectangular shape, sequence of images having a rectangular shape, image consisting of three components, sequence of images consisting of three components, image consisting of three components Video, an image composed of R component, G component, and B component, an image sequence composed of R component, G component, and B component, a video composed of R component, G component, and B component, and a brightness component and two color components. An image composed of a luminance component, an image sequence composed of a luminance component and two chrominance components, a video composed of a luminance component and two chrominance components, and a coded block of data.

可选的,解码块是图像的解码区域,其中,解码区域包括以下至少之一:图像的子图像、宏块、最大编码单元(The Largest Coding Unit,简称为LCU)、编码树单元(CodingTree Unit,简称为CTU)、编码单元(Coding Unit,简称为CU)、CU的子区域、预测单元PU(Prediction Unit,简称为PU)、变换单元(Transform Unit,简称为TU)。Optionally, the decoding block is a decoding area of an image, wherein the decoding area includes at least one of the following: a sub-image of an image, a macroblock, a largest coding unit (The Largest Coding Unit, referred to as LCU), a coding tree unit (CodingTree Unit , referred to as CTU for short), a coding unit (Coding Unit, referred to as CU for short), a sub-region of the CU, a prediction unit PU (Prediction Unit, referred to as PU for short), and a transformation unit (Transform Unit, referred to as TU for short).

可选的,多种采样格式包括主采样格式和其他采样格式,其中,其他采样格式是主采样格式经过采样操作得到的采样格式。Optionally, the multiple sampling formats include a main sampling format and other sampling formats, wherein the other sampling formats are sampling formats obtained by performing a sampling operation on the main sampling format.

可选的,视频数据压缩码流具有矩形形状和三个分量的图像或图像的序列的数据压缩码流。Optionally, the video data compression code stream has a rectangular shape and a data compression code stream of images or sequences of images with three components.

可选的,多种采样格式是4:4:4采样格式和4:2:0采样格式;或者,多种采样格式是4:4:4采样格式和4:2:2采样格式;或者,多种采样格式是4:2:2采样格式和4:2:0采样格式。对应的,与4:2:0采样格式相应的解码方式包括:产生4:2:0采样格式的数据版本,对4:2:0采样格式的数据版本经过上采样操作转换为4:4:4或4:2:2采样格式的数据版本,其中,产生4:2:0采样格式的数据版本方法包括:根据当解码块的邻近像素进行帧内预测的操作产生4:2:0采样格式的数据版本,和/或,根据当解码图像的邻近图像进行帧间预测的操作产生4:2:0采样格式的数据版本;与4:4:4或4:2:2采样格式相应的解码方式包括:根据预测操作产生4:4:4或4:2:2采样格式的数据版本,对4:4:4或4:2:2采样格式的数据版本经过下采样操作转换为4:2:0采样格式的数据版本,具体的,所述预测操作可以是串预测操作。Optionally, the multiple sampling formats are 4:4:4 sampling format and 4:2:0 sampling format; or, the multiple sampling formats are 4:4:4 sampling format and 4:2:2 sampling format; or, The multiple sampling formats are 4:2:2 sampling format and 4:2:0 sampling format. Correspondingly, the decoding method corresponding to the 4:2:0 sampling format includes: generating a data version of the 4:2:0 sampling format, and converting the data version of the 4:2:0 sampling format to 4:4 after an upsampling operation: 4 or a data version in a 4:2:2 sampling format, wherein the method for generating a data version in a 4:2:0 sampling format includes: generating a 4:2:0 sampling format according to an operation of intra-frame prediction performed on adjacent pixels of the decoded block The data version of the 4:2:0 sampling format is generated according to the operation of inter prediction when the adjacent image of the decoded image is decoded; the decoding corresponding to the 4:4:4 or 4:2:2 sampling format The method includes: generating a data version of the 4:4:4 or 4:2:2 sampling format according to the prediction operation, and converting the data version of the 4:4:4 or 4:2:2 sampling format to 4:2 after the downsampling operation :0 The data version of the sampling format, specifically, the prediction operation may be a string prediction operation.

可选的,解码方式包括以下至少之一:根据解码块的邻近像素进行帧内预测;根据解码图像的邻近图像进行帧间预测;根据解码图像的邻近图像进行帧间变换;缩放scaling;通用串预测;调色板解码;字典解码;熵解码。Optionally, the decoding method includes at least one of the following: performing intra-frame prediction according to adjacent pixels of the decoded block; performing inter-frame prediction according to adjacent images of the decoded image; performing inter-frame transformation according to adjacent images of the decoded image; scaling; Prediction; palette decoding; dictionary decoding; entropy decoding.

可选的,解析视频数据压缩码流还包括:,从以下之一的位置获得第一标志位:序列参数集,图像参数集,序列头,条带头,图像头,CTU头,CU头,解码块头,其中,第一标志位用于指示允许采用多种采样格式和/或相应解码方式进行解码。Optionally, parsing the compressed video data stream further includes: Obtaining the first flag bit from one of the following positions: sequence parameter set, image parameter set, sequence header, slice header, image header, CTU header, CU header, decoding The block header, wherein the first flag bit is used to indicate that multiple sampling formats and/or corresponding decoding methods are allowed to be used for decoding.

可选的,解析视频数据压缩码流还包括:,从以下至少之一的位置获取第二标志位:序列参数集,图像参数集,序列头,条带头,图像头、解码块头,其中,第二标志位用于指示允许使用采用4:4:4采样格式和/或相应串预测解码方式的解码块。Optionally, parsing the video data compression code stream further includes: obtaining the second flag bit from at least one of the following positions: sequence parameter set, image parameter set, sequence header, slice header, image header, decoding block header, wherein, the first The two flags are used to indicate that the decoded block using the 4:4:4 sampling format and/or the corresponding string predictive decoding method is allowed.

可选的,解析视频数据压缩码流还包括:,从以下至少之一的位置获取第三标志位:序列参数集,图像参数集,序列头,条带头,图像头、解码块头,其中,第三标志位用于指示允许使用采用4:2:2采样格式和/或相应串预测解码方式的解码块。Optionally, parsing the compressed video data stream further includes: obtaining the third flag bit from at least one of the following positions: sequence parameter set, image parameter set, sequence header, slice header, image header, decoding block header, wherein, the first The three flag bits are used to indicate that a decoding block using the 4:2:2 sampling format and/or the corresponding string predictive decoding method is allowed.

可选的,预定的多种采样格式和解码方式中的一种采样格式和解码方式对应于一个预定的值k,从视频数据压缩码流中,为解码块获取直接或间接或直接间接混合的采样格式和相应解码方式标识码。Optionally, one of the predetermined multiple sampling formats and decoding methods corresponds to a predetermined value k, and from the video data compression code stream, obtain direct or indirect or direct-indirect mixed Sampling format and corresponding decoding method identification code.

在本实施例中,直接的采样格式和相应解码方式标识码由视频数据压缩码流中的一个或多个位串所组成;间接的采样格式和相应解码方式标识码是除解码方式参数之外的其他解码参数和/或视频数据压缩码流的除解码方式参数对应的语法元素之外的其他语法元素导出的采样格式和相应解码方式标识码;直接间接混合的采样格式和相应解码方式标识码是部分直接部分间接混合的采样格式和相应解码方式标识码。In this embodiment, 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 sampling format and corresponding decoding mode identification code derived from other decoding parameters of the video data compression code stream except the syntax element corresponding to the decoding mode parameter; the direct and indirect mixed sampling format and corresponding decoding mode identification code It is the sampling format and the identification code of the corresponding decoding mode mixed with some direct and some indirect.

可选的,从视频数据压缩码流的以下位置获取采样格式和对应解码方式的标识码:Optionally, obtain the sampling format and the identification code of the corresponding decoding method from the following positions of the video data compression code stream:

解码块头信息语法元素、采样格式和相应解码方式标识码语法元素、额外的解码块头信息语法元素、解码块数据语法元素;或Decoding block header information syntax elements, sampling format and corresponding decoding method identification code syntax elements, additional decoding block header information syntax elements, decoding block data syntax elements; or

解码块头信息语法元素、部分采样格式和相应解码方式标识码语法元素、额外的解码块头信息语法元素、部分解码块数据语法元素、另一部分采样格式和相应解码方式标识码语法元素、另一部分解码块数据语法元素;Decoding block header information syntax elements, partial sampling format and corresponding decoding method identification code syntax elements, additional decoding block header information syntax elements, partial decoding block data syntax elements, another part of sampling format and corresponding decoding method identification code syntax elements, another part of decoding block data syntax elements;

其中,标识码语法元素的标识码的取值等于指定值时,表示采用与指定值对应的采样格式和相应解码方式对解码块进行解码。Wherein, when the value of the identification code of the identification code syntax element is equal to the specified value, it means that the decoding block is decoded using the sampling format and corresponding decoding method corresponding to the specified value.

在本实施例中提供了一种视频数据的编码方法,图2是根据本发明实施例的视频数据的编码方法的流程图,如图2所示,该流程包括如下步骤: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. As shown in FIG. 2 , the process includes the following steps:

步骤S202,从预定的多种采样格式中选择第一采样格式,以及从预定的多种编码方式之中选择与第一采样格式对应的编码方式;Step S202, selecting a first sampling format from a plurality of predetermined sampling formats, and selecting an encoding method corresponding to the first sampling format from among a plurality of predetermined encoding methods;

步骤S204,使用选择的第一采样格式和选择的编码方式对视频数据的编码块进行编码产生视频数据压缩码流,其中,视频数据压缩码流包含:第一采样格式和/或编码方式,与第一采样格式和/或编码方式对应的语法元素。Step S204, using the selected first sampling format and the selected encoding method to encode the encoding block of the video data to generate a video data compression code stream, wherein the video data compression code stream includes: the first sampling format and/or encoding method, and A syntax element corresponding to the first sampling format and/or coding mode.

可选地,上述步骤的执行主体可以为编码器,视频处理设备,如视频发送端,视频分发设备等,但不限于此。Optionally, the execution subject of the above steps may be an encoder, a video processing device, such as a video sending end, a video distribution device, etc., but is not limited thereto.

可选的,视频数据包括以下至少之一:一维数据,二维数据,大于二维的多维数据,图像,图像的序列,视频,音频,文件,字节,比特,像素,由三个分量组成的数据,具有矩形形状的图像,具有矩形形状的图像的序列,由三个分量组成的图像,由三个分量组成的图像序列,由三个分量组成的视频,由R分量、G分量、B分量组成的图像,由R分量、G分量、B分量组成的图像序列,由R分量、G分量、B分量组成的视频,由一个亮度分量和两个色度分量组成的图像,由一个亮度分量两个色度分量组成的图像序列,由一个亮度分量两个色度分量组成的视频,数据的编码块。Optionally, the video data includes at least one of the following: one-dimensional data, two-dimensional data, multidimensional data larger than two-dimensional, image, image sequence, video, audio, file, byte, bit, pixel, consisting of three components Composed data, an image with a rectangular shape, a sequence of images with a rectangular shape, an image consisting of three components, an image sequence consisting of three components, a video consisting of three components, consisting of R component, G component, An image composed of B components, an image sequence composed of R components, G components, and B components, a video composed of R components, G components, and B components, an image composed of one brightness component and two chrominance components, and a brightness Image sequence consisting of two chrominance components, video consisting of one luminance component and two chrominance components, coded block of data.

可选的,编码块是图像的编码区域,其中,编码区域包括以下至少之一:图像的子图像、宏块、最大编码单元LCU、编码树单元CTU、编码单元CU、CU的子区域、预测单元PU、变换单元TU。Optionally, the coding block is a coding area of an image, where the coding area includes at least one of the following: a sub-image of an image, a macroblock, a largest coding unit LCU, a coding tree unit CTU, a coding unit CU, a sub-area of a CU, a prediction Unit PU, transformation unit TU.

可选的,多种采样格式包括主采样格式和其他采样格式,其中,其他采样格式是主采样格式经过采样操作得到的采样格式。Optionally, the multiple sampling formats include a main sampling format and other sampling formats, wherein the other sampling formats are sampling formats obtained by performing a sampling operation on the main sampling format.

可选的,视频数据是具有矩形形状和三个分量的图像或图像的序列,Optionally, the video data is an image or sequence of images having a rectangular shape and three components,

可选的,多种采样格式是4:4:4采样格式和4:2:0采样格式;或者,多种采样格式是4:4:4采样格式和4:2:2采样格式;或者,多种采样格式是4:2:2采样格式和4:2:0采样格式。对应的,与4:2:0采样格式相应的编码方式包括:产生4:2:0采样格式的数据版本,对4:2:0采样格式的数据版本经过上采样操作转换为4:4:4或4:2:2采样格式的数据版本,其中,产生4:2:0采样格式的数据版本方法包括:根据当编码块的邻近像素进行帧内预测的操作产生4:2:0采样格式的数据版本,和/或,根据当编码图像的邻近图像进行帧间预测的操作产生4:2:0采样格式的数据版本;与4:4:4或4:2:2采样格式相应的编码方式包括:根据预测操作产生4:4:4或4:2:2采样格式的数据版本,对4:4:4或4:2:2采样格式的数据版本经过下采样操作转换为4:2:0采样格式的数据版本,具体的,所述预测操作可以是串预测操作。Optionally, the multiple sampling formats are 4:4:4 sampling format and 4:2:0 sampling format; or, the multiple sampling formats are 4:4:4 sampling format and 4:2:2 sampling format; or, The multiple sampling formats are 4:2:2 sampling format and 4:2:0 sampling format. Correspondingly, the encoding method corresponding to the 4:2:0 sampling format includes: generating a data version of the 4:2:0 sampling format, and converting the data version of the 4:2:0 sampling format to 4:4 after an upsampling operation: The data version of 4 or 4:2:2 sampling format, wherein, the method for generating the data version of 4:2:0 sampling format includes: generating the 4:2:0 sampling format according to the operation of performing intra prediction on adjacent pixels of the encoding block and/or, according to the operation of inter-prediction of adjacent images when encoding the image, the data version of the 4:2:0 sampling format is generated; the corresponding encoding of the 4:4:4 or 4:2:2 sampling format The method includes: generating a data version of the 4:4:4 or 4:2:2 sampling format according to the prediction operation, and converting the data version of the 4:4:4 or 4:2:2 sampling format to 4:2 after the downsampling operation :0 The data version of the sampling format, specifically, the prediction operation may be a string prediction operation.

可选的,编码方式包括以下至少之一:根据编码块的邻近像素进行帧内预测;根据编码图像的邻近图像进行帧间预测;根据编码图像的邻近图像进行帧间变换;量化;通用串预测;调色板编码;字典编码;混合编码Hybrid coding;熵编码。Optionally, the encoding method includes at least one of the following: performing intra-frame prediction according to adjacent pixels of the encoded block; performing inter-frame prediction based on adjacent images of the encoded image; performing inter-frame transformation according to adjacent images of the encoded image; quantization; general string prediction ; Palette coding; Dictionary coding; Hybrid coding Hybrid coding; Entropy coding.

可选的,本实施例还包括:在视频数据压缩码流的以下之一部分包含第一标志位:序列参数集,图像参数集,序列头,条带头,图像头,CTU头,CU头,编码块头,其中,第一标志位用于指示允许采用多种采样格式和/或相应编码方式进行编码。Optionally, this embodiment further includes: including the first flag bit in one of the following parts of the video data compression code stream: sequence parameter set, image parameter set, sequence header, slice header, image header, CTU header, CU header, encoding A block header, wherein the first flag bit is used to indicate that multiple sampling formats and/or corresponding coding methods are allowed to be used for coding.

可选的,本实施例还包括:在视频数据压缩码流的以下至少之一部分包含第二标志位:序列参数集,图像参数集,序列头,条带头,图像头、编码块头,其中,第二标志位用于指示允许使用采用4:4:4采样格式和/或相应串预测编码方式的编码块。Optionally, this embodiment further includes: including a second flag bit in at least one of the following parts of the video data compression code stream: a sequence parameter set, an image parameter set, a sequence header, a slice header, an image header, and a coded block header, wherein, the first The two flag bits are used to indicate that a coding block that adopts the 4:4:4 sampling format and/or the corresponding string predictive coding method is allowed to be used.

可选的,本实施例还包括:在视频数据压缩码流的以下至少之一部分包含第三标志位:序列参数集,图像参数集,序列头,条带头,图像头、编码块头,其中,第三标志位用于指示允许使用采用4:2:2采样格式和/或相应串预测编码方式的编码块。Optionally, this embodiment further includes: including a third flag in at least one of the following parts of the video data compression code stream: a sequence parameter set, an image parameter set, a sequence header, a slice header, an image header, and a coded block header, wherein, the first The three flags are used to indicate that a coding block using the 4:2:2 sampling format and/or the corresponding string predictive coding method is allowed.

可选的,预定的多种采样格式和编码方式中的一种采样格式和编码方式对应于一个预定的值k,为编码块设置直接或间接或直接间接混合的采样格式和相应编码方式标识码,将编码方式标识码包含在视频数据压缩码流中。Optionally, one of the predetermined multiple sampling formats and coding methods corresponds to a predetermined value k, and a direct or indirect or direct-indirect mixed sampling format and corresponding coding method identification code are set for the coding block , including the encoding mode identification code in the video data compression code stream.

可选的,直接的采样格式和相应编码方式标识码由视频数据压缩码流中的一个或多个位串所组成;间接的采样格式和相应编码方式标识码是除选择的编码方式参数之外的其他编码参数和/或视频数据压缩码流的除语法元素之外的其他语法元素导出的采样格式和相应编码方式标识码;直接间接混合的采样格式和相应编码方式标识码是部分直接部分间接混合的采样格式和相应编码方式标识码。Optionally, the direct sampling format and the corresponding encoding mode identification code are composed of one or more bit strings in the video data compression code stream; the indirect sampling format and corresponding encoding mode identification code are in addition to the selected encoding mode parameters other encoding parameters and/or the sampling format and corresponding encoding mode identification code derived from other syntax elements of the video data compression code stream except for the syntax element; the direct and indirect mixed sampling format and corresponding encoding mode identification code are partly direct and partly indirect Mixed sampling formats and corresponding encoding method identifiers.

可选的,采样格式和对应编码方式的标识码使用下列方式存在于视频数据压缩码流中:编码块头信息语法元素、采样格式和相应编码方式标识码语法元素、额外的编码块头信息语法元素、编码块数据语法元素;或编码块头信息语法元素、部分采样格式和相应编码方式标识码语法元素、额外的编码块头信息语法元素、部分编码块数据语法元素、另一部分采样格式和相应编码方式标识码语法元素、另一部分编码块数据语法元素;其中,标识码语法元素的标识码的取值等于指定值时,表示采用与指定值对应的采样格式和相应编码方式对编码块进行编码。Optionally, the identification code of the sampling format and the corresponding encoding mode exists in the video data compression code stream in the following ways: encoding block header information syntax element, sampling format and corresponding encoding mode identification code syntax element, additional encoding block header information syntax element, Coding block data syntax elements; or coding block header information syntax elements, part of the sampling format and corresponding coding method identification code syntax elements, additional coding block header information syntax elements, part of coding block data syntax elements, another part of sampling format and corresponding coding method identification code Syntax element, another part of coding block data syntax element; among them, when the value of the identification code of the identification code syntax element is equal to the specified value, it means that the coding block is encoded using the sampling format and corresponding coding method corresponding to the specified value.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本发明各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general-purpose hardware platform, and of course also by hardware, but in many cases the former is better implementation. Based on such an understanding, the essence of the technical solution of the present invention or the part that contributes to the prior art can be embodied in the form of software products, and the computer software products are stored in a storage medium (such as ROM/RAM, disk, CD) contains several instructions to enable a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in various embodiments of the present invention.

实施例2Example 2

在本实施例中还提供了一种视频数据压缩码流的解码装置,视频数据的编码装置,该装置用于实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。This embodiment also provides a video data compression decoding device and a video data encoding device, which are used to implement the above embodiments and preferred implementation modes, and those that have already been described will not be repeated. As used below, the term "module" may be a combination of software and/or hardware that realizes a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementations in hardware, or a combination of software and hardware are also possible and contemplated.

图3是根据本发明实施例的视频数据压缩码流的解码装置的结构框图,如图3所示,该装置包括:Fig. 3 is a structural block diagram of a decoding device for video data compression code stream according to an embodiment of the present invention. As shown in Fig. 3, the device includes:

解析模块30,用于解析视频数据压缩码流,获取采样格式信息和/或解码方式信息;An analysis module 30, configured to analyze the compressed video data stream, and obtain sampling format information and/or decoding method information;

选择模块32,用于根据采样格式信息和/或解码方式信息,在预定的多种采样格式和解码方式之中,选择第一采样格式和与第一采样格式相应的解码方式;A selection module 32, configured to select a first sampling format and a decoding method corresponding to the first sampling format among predetermined multiple sampling formats and decoding methods according to the sampling format information and/or decoding method information;

解码模块34,用于采用第一采样格式和第一采样格式相应的解码方式对解码块进行解码。The decoding module 34 is configured to decode the decoded block by using the first sampling format and the corresponding decoding manner of the first sampling format.

图4是根据本发明实施例的视频数据的编码装置的结构框图,如图4所示,该装置包括:Fig. 4 is a structural block diagram of a device for encoding video data according to an embodiment of the present invention. As shown in Fig. 4, the device includes:

选择模块40,用于从预定的多种采样格式中选择第一采样格式,以及从预定的多种编码方式之中选择与第一采样格式对应的编码方式;A selection module 40, configured to select a first sampling format from a plurality of predetermined sampling formats, and select an encoding method corresponding to the first sampling format from among a plurality of predetermined encoding methods;

编码模块42,用于使用选择的第一采样格式和选择的编码方式对视频数据的编码块进行编码产生视频数据压缩码流,其中,视频数据压缩码流包含:第一采样格式和/或编码方式,与第一采样格式和/或编码方式对应的语法元素。The encoding module 42 is configured to use the selected first sampling format and the selected encoding method to encode the encoding block of the video data to generate a video data compression code stream, wherein the video data compression code stream includes: the first sampling format and/or encoding mode, a syntax element corresponding to the first sampling format and/or encoding mode.

需要说明的是,上述各个模块是可以通过软件或硬件来实现的,对于后者,可以通过以下方式实现,但不限于此:上述模块均位于同一处理器中;或者,上述各个模块以任意组合的形式分别位于不同的处理器中。It should be noted that the above-mentioned modules can be realized by software or hardware. For the latter, it can be realized by the following methods, but not limited to this: the above-mentioned modules are all located in the same processor; or, the above-mentioned modules can be combined in any combination The forms of are located in different processors.

实施例3Example 3

本实施例是本发明的可选实施例,用于多本申请的方案进行补充和详细说明:This embodiment is an optional embodiment of the present invention, and is used to supplement and describe in detail the schemes of multiple applications:

为了解决对由多种特性的内容混合而成的数据集的压缩中的这一问题,本实施例提供了一种采用多种(即两种或以上)采样格式和相应编码方式的数据压缩方法和装置:数据集和编解码块有K(K>1)个分别具有K种不同采样格式的版本,相应地有K套编解码方式;在对一个编解码块进行编解码时,选择对所述K个版本之一使用相应的编解码方式进行编解码。In order to solve this problem in the compression of data sets mixed with contents of various characteristics, this embodiment provides a data compression method using multiple (i.e. two or more) sampling formats and corresponding encoding methods And device: there are K (K>1) versions of data sets and codec blocks with K different sampling formats, correspondingly there are K sets of codec methods; when encoding and decoding a codec block, select all One of the above K versions uses a corresponding codec method for codec.

本实施例的首要技术特征是采用多种采样格式(即多种具有不同采样格式的数据版本)和相应的编解码方式之一对一个编解码块进行编解码。The primary technical feature of this embodiment is to use one of multiple sampling formats (that is, multiple data versions with different sampling formats) and corresponding encoding and decoding methods to encode and decode a codec block.

优选地,采用两种采样格式和相应的编解码方式之一对一个编解码块进行编解码。Preferably, one codec block is coded by using one of two sampling formats and corresponding codec methods.

优选地,数据集及其元素由3个分量组成。Preferably, the dataset and its elements consist of 3 components.

优选地,数据集是具有矩形形状的图像。Preferably, the data set is an image with a rectangular shape.

优选地,数据集是具有矩形形状的图像的序列。Preferably, the data set is a sequence of images having a rectangular shape.

优选地,数据集是由3个分量组成的图像。Preferably, the data set is an image consisting of 3 components.

优选地,数据集是由3个分量组成的图像序列。Preferably, the data set is an image sequence consisting of 3 components.

优选地,数据集是由3个分量组成的视频。Preferably, the dataset is a video consisting of 3 components.

优选地,数据集是由R分量、G分量、B分量组成的图像。Preferably, the data set is an image composed of R component, G component and B component.

优选地,数据集是由R分量、G分量、B分量组成的视频。Preferably, the data set is a video composed of R component, G component and B component.

优选地,数据集是由Y亮度分量、U色度分量、V色度分量组成的图像。Preferably, the data set is an image composed of a Y luma component, a U chrominance component, and a V chrominance component.

本实施例中,优选地,数据集是由Y亮度分量、U色度分量、V色度分量组成的视频。In this embodiment, preferably, the data set is a video composed of a Y luminance component, a U chrominance component, and a V chrominance component.

本实施例中,优选地,两种采样格式是4:4:4采样格式和4:2:0采样格式。In this embodiment, preferably, the two sampling formats are 4:4:4 sampling format and 4:2:0 sampling format.

本实施例中,优选地,两种采样格式是4:4:4采样格式和4:2:2采样格式。In this embodiment, preferably, the two sampling formats are 4:4:4 sampling format and 4:2:2 sampling format.

本实施例中,优选地,两种采样格式是4:2:0采样格式和4:2:2采样格式。In this embodiment, preferably, the two sampling formats are 4:2:0 sampling format and 4:2:2 sampling format.

本实施例中,优选地,多种采样格式中的一种是主采样格式,而其他采样格式则是所述主采样格式经过下采样操作得到的采样格式。In this embodiment, preferably, one of the multiple sampling formats is a main sampling format, and the other sampling formats are sampling formats obtained through a downsampling operation on the main sampling format.

本实施例中,优选地,在编解码中产生的一种采样格式的数据版本,经过采样格式转换操作转换为其他采样格式的数据版本。In this embodiment, preferably, the data version of one sampling format generated during encoding and decoding is converted into a data version of another sampling format through a sampling format conversion operation.

本实施例中,优选地,采样格式转换操作包括重采样操作和/或上采样操作和/或下采样操作。In this embodiment, preferably, the sampling format conversion operation includes a resampling operation and/or an upsampling operation and/or a downsampling operation.

本实施例中,优选地,与一种采样格式相应的编解码方式包括块预测操作,和/或变换操作;与另一种采样格式相应的编解码方式包括串预测操作。In this embodiment, preferably, the codec mode corresponding to one sampling format includes a block prediction operation and/or transformation operation; the codec mode corresponding to another sampling format includes a string prediction operation.

本实施例中,优选地,数据集是具有矩形形状的图像,与一种采样格式相应的编解码方式包括从当前编解码块的邻近像素进行帧内预测的操作,和/或变换操作;与另一种采样格式相应的编解码方式可包括串预测操作。In this embodiment, preferably, the data set is an image with a rectangular shape, and the codec method corresponding to a sampling format includes an operation of intra-frame prediction from adjacent pixels of the current codec block, and/or a transformation operation; and Another codec method corresponding to the sampling format may include a string prediction operation.

本实施例中,优选地,数据集是具有矩形形状的图像的序列,与一种采样格式相应的编解码方式包括从当前编解码块的邻近像素进行帧内预测的操作,和/或从当前编解码图像的邻近图像进行帧间预测的操作,和/或变换操作;与另一种采样格式相应的编解码方式可包括串预测操作。In this embodiment, preferably, the data set is a sequence of images with a rectangular shape, and the codec method corresponding to a sampling format includes the operation of intra-frame prediction from adjacent pixels of the current codec block, and/or from the current Inter prediction operations and/or transformation operations are performed on adjacent images of codec images; codec methods corresponding to another sampling format may include string prediction operations.

本实施例中,优选地,数据集是具有矩形形状的图像的序列,与4:2:0采样格式相应的编解码方式包括从当前编解码块的邻近像素进行帧内预测的操作,和/或从当前编解码图像的邻近图像进行帧间预测的操作,和/或变换操作;与4:4:4采样格式相应的编解码方式可包括串预测操作。In this embodiment, preferably, the data set is a sequence of images with a rectangular shape, and the codec method corresponding to the 4:2:0 sampling format includes an operation of performing intra prediction from adjacent pixels of the current codec block, and/or Or perform an inter-frame prediction operation from adjacent images of the current codec image, and/or a transformation operation; the codec mode corresponding to the 4:4:4 sampling format may include a string prediction operation.

本实施例中,优选地,数据集是具有矩形形状的图像的序列,与4:2:0采样格式相应的编解码方式包括从当前编解码块的邻近像素进行帧内预测的操作,和/或从当前编解码图像的邻近图像进行帧间预测的操作,和/或变换操作,产生的4:2:0采样格式的数据版本经过上采样操作转换为4:4:4采样格式的数据版本;与4:4:4采样格式相应的编解码方式可包括串预测操作,产生的4:4:4采样格式的数据版本经过下采样操作转换为4:2:0采样格式的数据版本。In this embodiment, preferably, the data set is a sequence of images with a rectangular shape, and the codec method corresponding to the 4:2:0 sampling format includes an operation of performing intra prediction from adjacent pixels of the current codec block, and/or Or the operation of inter-frame prediction from the adjacent image of the current codec image, and/or the transformation operation, the data version of the 4:2:0 sampling format generated is converted to the data version of the 4:4:4 sampling format by upsampling operation ; The codec method corresponding to the 4:4:4 sampling format may include a string prediction operation, and the generated data version in the 4:4:4 sampling format is converted into a data version in the 4:2:0 sampling format through a downsampling operation.

本实施例的编码方法或装置的最基本的特有技术特征是根据一个当前编码块的特性自适应地采用预定的多种采样格式和相应编码方式之一对所述当前编码块进行编码,产生至少含采样格式,和/或与采样格式相应编码方式的标识码的信息及其对应的解码时需要的其他信息的压缩数据码流。The most basic unique technical feature of the encoding method or device in this embodiment is to adaptively adopt one of a plurality of predetermined sampling formats and corresponding encoding methods to encode the current encoding block according to the characteristics of the current encoding block, and generate at least A compressed data stream containing the sampling format and/or the identification code information corresponding to the encoding method of the sampling format and other corresponding information required for decoding.

图5是本实施例的编码方法的一个示意图。优选地,采用两种采样格式和相应的编码方式之一对一个编码块进行编码。优选地,数据集及其元素由3个分量组成。优选地,数据集是具有矩形形状的图像。优选地,数据集是具有矩形形状的图像的序列。优选地,数据集是由3个分量组成的图像。优选地,数据集是由3个分量组成的图像序列。优选地,数据集是由3个分量组成的视频。优选地,数据集是由R分量、G分量、B分量组成的图像。优选地,数据集是由R分量、G分量、B分量组成的视频。优选地,数据集是由Y亮度分量、U色度分量、V色度分量组成的图像。优选地,数据集是由Y亮度分量、U色度分量、V色度分量组成的视频。优选地,两种采样格式是4:4:4采样格式和4:2:0采样格式。优选地,两种采样格式是4:4:4采样格式和4:2:2采样格式。优选地,两种采样格式是4:2:0采样格式和4:2:2采样格式。优选地,多种采样格式中的一种是主采样格式,而其他采样格式则是所述主采样格式经过下采样操作得到的采样格式。优选地,在编码中产生的一种采样格式的数据版本,经过采样格式转换操作转换为其他采样格式的数据版本。优选地,采样格式转换操作包括重采样操作和/或上采样操作和/或下采样操作。优选地,与一种采样格式相应的编码方式包括块预测操作和/或变换操作;与另一种采样格式相应的编码方式包括串预测操作。优选地,数据集是具有矩形形状的图像,与一种采样格式相应的编码方式包括从当前编码块的邻近像素进行帧内预测的操作,和/或变换操作;与另一种采样格式相应的编码方式包括串预测操作。优选地,数据集是具有矩形形状的图像序列,与一种采样格式相应的编码方式包括从当前编码块的邻近像素进行帧内预测的操作,和/或从当前编码图像的邻近图像进行帧间预测的操作,和/或变换操作;与另一种采样格式相应的编码方式包括串预测操作。优选地,数据集是具有矩形形状的图像序列,与4:2:0采样格式相应的编码方式包括从当前编码块的邻近像素进行帧内预测的操作,和/或从当前编码图像的邻近图像进行帧间预测的操作,和/或变换操作;与4:4:4采样格式相应的编码方式包括串预测操作。优选地,数据集是具有矩形形状的图像序列,与4:2:0采样格式相应的编码方式包括从当前编码块的邻近像素进行帧内预测的操作,和/或从当前编码图像的邻近图像进行帧间预测的操作,和/或变换操作,产生的4:2:0采样格式的数据版本经过上采样操作转换为4:4:4采样格式的数据版本;与4:4:4采样格式相应的编码方式包括串预测操作,产生的4:4:4采样格式的数据版本经过下采样操作转换为4:2:0采样格式的数据版本。Fig. 5 is a schematic diagram of the encoding method of this embodiment. Preferably, one coding block is coded using one of two sampling formats and corresponding coding methods. Preferably, the dataset and its elements consist of 3 components. Preferably, the data set is an image with a rectangular shape. Preferably, the data set is a sequence of images having a rectangular shape. Preferably, the data set is an image consisting of 3 components. Preferably, the data set is an image sequence consisting of 3 components. Preferably, the dataset is a video consisting of 3 components. Preferably, the data set is an image composed of R component, G component and B component. Preferably, the data set is a video composed of R component, G component and B component. Preferably, the data set is an image composed of a Y luma component, a U chrominance component, and a V chrominance component. Preferably, the data set is a video composed of a Y luma component, a U chrominance component, and 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 multiple 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 during encoding is converted into a data version of another sampling format through a sampling format conversion operation. Preferably, the sampling format conversion operation includes a resampling operation and/or an upsampling operation and/or a downsampling operation. Preferably, the coding method corresponding to one sampling format includes block prediction operation and/or transformation operation; the coding method corresponding to another sampling format includes string prediction operation. Preferably, the data set is an image with a rectangular shape, and the encoding method corresponding to one sampling format includes the operation of intra-frame prediction from adjacent pixels of the current encoding block, and/or transformation operation; the encoding method corresponding to another sampling format The coding scheme includes a string prediction operation. Preferably, the data set is an image sequence with a rectangular shape, and the encoding method corresponding to a sampling format includes an operation of performing intra-frame prediction from adjacent pixels of the current encoding block, and/or performing inter-frame prediction from adjacent images of the current encoding image. The operation of prediction, and/or transformation operation; the encoding method corresponding to another sampling format includes a string prediction operation. Preferably, the data set is a sequence of images with a rectangular shape, and the encoding method corresponding to the 4:2:0 sampling format includes the operation of intra-frame prediction from adjacent pixels of the current encoding block, and/or from the adjacent images of the current encoding image An inter-frame prediction operation, and/or a transformation operation; the coding mode corresponding to the 4:4:4 sampling format includes a string prediction operation. Preferably, the data set is a sequence of images with a rectangular shape, and the encoding method corresponding to the 4:2:0 sampling format includes the operation of intra-frame prediction from adjacent pixels of the current encoding block, and/or from the adjacent images of the current encoding image The operation of inter-frame prediction, and/or transformation operation, the data version of the 4:2:0 sampling format generated by the upsampling operation is converted to the data version of the 4:4:4 sampling format; and the 4:4:4 sampling format The corresponding encoding method includes a string prediction operation, and the generated data version in the 4:4:4 sampling format is converted into a data version in the 4:2:0 sampling format through a downsampling operation.

本实施例的解码方法或装置的最基本的特有技术特征是解析压缩数据码流,获取采样格式和/或相应编码方式的信息,根据所述采样格式和/或相应编码方式的信息采用预定的多种采样格式和相应解码方式之一对一个当前解码块进行解码。The most basic unique technical feature of the decoding method or device of this embodiment is to analyze the compressed data stream, obtain the information of the sampling format and/or the corresponding encoding method, and use the predetermined information according to the sampling format and/or the corresponding encoding method One of multiple sampling formats and corresponding decoding methods decodes a current decoding block.

图6是本实施例的解码方法的一个示意图。优选地,采用两种采样格式和相应的解码方式之一对一个解码块进行解码。优选地,数据集及其元素由3个分量组成。优选地,数据集是具有矩形形状的图像。优选地,数据集是具有矩形形状的图像的序列。优选地,数据集是由3个分量组成的图像。优选地,数据集是由3个分量组成的图像序列。优选地,数据集是由3个分量组成的视频。优选地,数据集是由R分量、G分量、B分量组成的图像。优选地,数据集是由R分量、G分量、B分量组成的视频。优选地,数据集是由Y亮度分量、U色度分量、V色度分量组成的图像。优选地,数据集是由Y亮度分量、U色度分量、V色度分量组成的视频。优选地,两种采样格式是4:4:4采样格式和4:2:0采样格式。优选地,两种采样格式是4:4:4采样格式和4:2:2采样格式。优选地,两种采样格式是4:2:0采样格式和4:2:2采样格式。优选地,多种采样格式中的一种是主采样格式,而其他采样格式则是所述主采样格式经过下采样操作得到的采样格式。优选地,在解码中产生的一种采样格式的数据版本,经过采样格式转换操作转换为其他采样格式的数据版本。优选地,采样格式转换操作包括重采样操作和/或上采样操作和/或下采样操作。优选地,与一种采样格式相应的解码方式包括块预测操作和/或变换操作;与另一种采样格式相应的解码方式包括串预测操作。优选地,数据集是具有矩形形状的图像,与一种采样格式相应的解码方式包括从当前解码块的邻近像素进行帧内预测的操作,和/或变换操作;与另一种采样格式相应的解码方式包括串预测操作。优选地,数据集是具有矩形形状的图像序列,与一种采样格式相应的解码方式包括从当前解码块的邻近像素进行帧内预测的操作,和/或从当前解码图像的邻近图像进行帧间预测的操作,和/或变换操作;与另一种采样格式相应的解码方式包括串预测操作。优选地,数据集是具有矩形形状的图像序列,与4:2:0采样格式相应的解码方式包括从当前解码块的邻近像素进行帧内预测的操作,和/或从当前解码图像的邻近图像进行帧间预测的操作,和/或变换操作;与4:4:4采样格式相应的解码方式包括串预测操作。优选地,数据集是具有矩形形状的图像序列,与4:2:0采样格式相应的解码方式包括从当前解码块的邻近像素进行帧内预测的操作,和/或从当前解码图像的邻近图像进行帧间预测的操作,和/或变换操作,产生的4:2:0采样格式的数据版本经过上采样操作转换为4:4:4采样格式的数据版本;与4:4:4采样格式相应的解码方式包括串预测操作,产生的4:4:4采样格式的数据版本经过下采样操作转换为4:2:0采样格式的数据版本。Fig. 6 is a schematic diagram of the decoding method in this embodiment. Preferably, one decoding block is decoded using one of two sampling formats and corresponding decoding methods. Preferably, the dataset and its elements consist of 3 components. Preferably, the data set is an image with a rectangular shape. Preferably, the data set is a sequence of images having a rectangular shape. Preferably, the data set is an image consisting of 3 components. Preferably, the data set is an image sequence consisting of 3 components. Preferably, the dataset is a video consisting of 3 components. Preferably, the data set is an image composed of R component, G component and B component. Preferably, the data set is a video composed of R component, G component and B component. Preferably, the data set is an image composed of a Y luma component, a U chrominance component, and a V chrominance component. Preferably, the data set is a video composed of a Y luma component, a U chrominance component, and 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 multiple 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 in one sampling format generated during decoding is converted into a data version in another sampling format through a sampling format conversion operation. Preferably, the sampling format conversion operation includes a resampling operation and/or an upsampling operation and/or a downsampling operation. Preferably, the decoding method corresponding to one sampling format includes block prediction operation and/or transformation operation; the decoding method corresponding to another sampling format includes string prediction operation. Preferably, the data set is an image with a rectangular shape, and the decoding method corresponding to one sampling format includes the operation of intra-frame prediction from adjacent pixels of the current decoding block, and/or transformation operation; the decoding method corresponding to another sampling format The decoding method includes a string prediction operation. Preferably, the data set is an image sequence with a rectangular shape, and the decoding method corresponding to a sampling format includes an operation of intra-frame prediction from adjacent pixels of the currently decoded block, and/or inter-frame prediction from adjacent images of the currently decoded image Predictive operations, and/or transformation operations; decoding methods corresponding to another sampling format include string prediction operations. Preferably, the data set is a sequence of images with a rectangular shape, and the decoding method corresponding to the 4:2:0 sampling format includes an operation of intra-frame prediction from adjacent pixels of the currently decoded block, and/or from adjacent images of the currently decoded image Perform inter-frame prediction operations and/or transform operations; decoding methods corresponding to the 4:4:4 sampling format include string prediction operations. Preferably, the data set is a sequence of images with a rectangular shape, and the decoding method corresponding to the 4:2:0 sampling format includes an operation of intra-frame prediction from adjacent pixels of the currently decoded block, and/or from adjacent images of the currently decoded image The operation of inter-frame prediction, and/or transformation operation, the data version of the 4:2:0 sampling format generated by the upsampling operation is converted to the data version of the 4:4:4 sampling format; and the 4:4:4 sampling format The corresponding decoding method includes a string prediction operation, and the generated data version in the 4:4:4 sampling format is converted into a data version in the 4:2:0 sampling format through a downsampling operation.

根据本实施例的一个方面,提供了一种对数据进行压缩的编码方法或装置,至少包括完成下列功能和操作的步骤或模块:According to an aspect of this embodiment, there is provided a coding method or device for compressing data, at least including steps or modules for completing the following functions and operations:

自适应地选择预定的多种采样格式和相应编码方式之中的一种采样格式和相应编码方式对一个编码块进行编码,产生至少含采样格式和/或相应编码方式的信息及其语法元素的压缩数据码流。Adaptively select a sampling format and a corresponding coding method among a plurality of predetermined sampling formats and corresponding coding methods to encode a coding block, and generate at least information about the sampling format and/or corresponding coding methods and syntax elements thereof Compressed data stream.

本实施例还提供了一种对数据进行压缩的解码方法或装置,至少包括完成下列功能和操作的步骤或模块:解析压缩数据码流,获取采样格式和/或相应编码方式的信息,根据所述采样格式和/或相应编码方式的信息采用预定的多种采样格式和相应解码方式之中的一种采样格式和相应解码方式对一个解码块进行解码。This embodiment also provides a decoding method or device for compressing data, which at least includes steps or modules for completing the following functions and operations: parsing the compressed data stream, obtaining information about the sampling format and/or corresponding encoding methods, and according to the The information about the sampling format and/or the corresponding encoding method is used to decode a decoding block by using one sampling format and corresponding decoding method among the predetermined multiple sampling formats and corresponding decoding methods.

本实施例适用于对数据进行有损压缩的编码和解码,本实施例也同样适用于数据进行无损压缩的编码和解码。本实施例适用于一维数据如字符串数据或字节串数据的编码和解码,本实施例也同样适用于二维或以上数据如图像或视频数据的编码和解码。This embodiment is applicable to data encoding and decoding with lossy compression, and this embodiment is also applicable to data encoding and decoding with lossless compression. This embodiment is applicable to encoding and decoding of one-dimensional data such as character string data or byte string data, and this embodiment 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; multi-dimensional data; image; image sequence; video; audio; file; byte; bit; pixel.

本实施例中,在数据是图像、图像的序列、视频等的情形,编码块或解码块是图像的一个编码区域或一个解码区域,包括以下情形:图像的子图像、宏块、最大编码单元LCU、编码树单元CTU、编码单元CU、CU的子区域、预测单元PU、变换单元TU。In this embodiment, when the data is an image, a sequence of images, video, etc., the coding block or decoding block is a coding area or a decoding area of the image, including the following situations: sub-images, macroblocks, and largest coding units of the image LCU, coding tree unit CTU, coding unit CU, sub-region of CU, prediction unit PU, transformation unit TU.

本实施例中,所述采样格式是下列采样格式之一:In this embodiment, the sampling format is one of the following sampling formats:

4:4:4采样格式;4:4:4 sampling format;

或者or

4:2:2采样格式;4:2:2 sampling format;

或者or

4:2:0采样格式。4:2:0 sampling format.

本实施例中,所述编解码方式包括下列操作之一或其组合:In this embodiment, the codec method includes one or a combination of the following operations:

1)从当前编解码块的邻近像素进行帧内预测;1) Perform intra-frame prediction from adjacent pixels of the current codec block;

2)从当前编解码图像的邻近图像进行帧间预测;2) Perform inter-frame prediction from adjacent images of the current codec image;

3)变换和对应的逆变换;3) Transformation and corresponding inverse transformation;

4)量化和对应的反量化;4) Quantization and corresponding dequantization;

5)通用串预测;5) Universal string prediction;

6)调色板编码和对应的解码;6) palette encoding and corresponding decoding;

7)字典编码和对应的解码;7) Dictionary encoding and corresponding decoding;

8)Hybrid coding;8) Hybrid coding;

9)熵编码和对应的熵解码。9) Entropy coding and corresponding entropy decoding.

以下是本实施例的更多的实施细节或变体,包括多个实例。The following are more implementation details or variants of this embodiment, including multiple examples.

实例1Example 1

所述编码方法或装置或解码方法或装置中,所述多种采样格式是下列情形之一:In the encoding method or device or decoding method or device, the multiple sampling formats are one of the following situations:

两种采样格式;Two sampling formats;

或者or

三种采样格式;Three sampling formats;

或者or

四种采样格式。Four sampling formats.

实例2Example 2

所述编码方法或装置或解码方法或装置中,所述数据是下列类型的数据之一。In the encoding method or device or decoding method or device, the data is one of the following types of data.

由3个分量组成的数据;Data consisting of 3 components;

或者or

具有矩形形状的图像;an image with a rectangular shape;

或者or

具有矩形形状的图像的序列;a sequence of images with a rectangular shape;

或者or

由3个分量组成的图像;An image consisting of 3 components;

或者or

由3个分量组成的图像序列;An image sequence consisting of 3 components;

或者or

由3个分量组成的视频;A video consisting of 3 components;

或者or

由R分量、G分量、B分量组成的图像;An image composed of R component, G component, and B component;

或者or

由R分量、G分量、B分量组成的图像序列;An image sequence composed of R component, G component, and B component;

或者or

由R分量、G分量、B分量组成的视频;A video composed of R component, G component, and B component;

或者or

由Y亮度分量、U色度分量、V色度分量组成的图像;Image composed of Y luma component, U chroma component, V chroma component;

或者or

由Y亮度分量、U色度分量、V色度分量组成的图像序列;An image sequence composed of Y luma component, U chrominance component, and V chrominance component;

或者or

由Y亮度分量、U色度分量、V色度分量组成的视频;Video composed of Y luma component, U chroma component, V chroma component;

或者or

以上各种数据的一个编解码块;A codec block of the above various data;

或者or

以上各种数据的变体,包括经过下列操作之一或其组合的变体数据:经过预测的预测残差、经过变换的变换域数据、经过差分运算的差分数据、经过量化的量化数据、经过反量化的数据、经过反变换的数据、经过去块效应滤波的数据、经过样值偏移补偿的数据、经过自适应修正滤波的数据。Variants of the above various data, including variant data that have undergone one or a combination of the following operations: predicted prediction residuals, transformed transform domain data, difference data after difference operations, quantized quantized data, Inversely quantized data, inversely transformed data, deblocking filtered data, sample offset compensated data, and adaptive correction filtered data.

实例3Example 3

所述编码方法或装置或解码方法或装置中,所述数据是由3个分量组成的图像,所述多种采样格式是两种采样格式,所述两种采样格式是下列情形之一:In the encoding method or device or the decoding method or device, the data is an image composed of three components, the multiple sampling formats are two sampling formats, and the two sampling formats are one of the following situations:

4:4:4采样格式和4:2:0采样格式;4:4:4 sampling format and 4:2:0 sampling format;

或者or

4:4:4采样格式和4:2:2采样格式;4:4:4 sampling format and 4:2:2 sampling format;

或者or

4:2:0采样格式和4:2:2采样格式。4:2:0 sampling format and 4:2:2 sampling format.

实例4Example 4

所述编码方法或装置或解码方法或装置中,所述多种采样格式中的一种是主采样格式,而其他采样格式则是所述主采样格式经过下采样操作得到的采样格式。In the encoding method or device or decoding method or device, one of the multiple sampling formats is a main sampling format, and the other sampling formats are sampling formats obtained by downsampling the main sampling format.

实例5Example 5

所述编码方法或装置或解码方法或装置中,在编解码中产生的一种采样格式的数据版本,经过采样格式转换操作转换为其他采样格式的数据版本。In the encoding method or device or the decoding method or device, a data version of a sampling format generated during encoding and decoding is converted into a data version of another sampling format through a sampling format conversion operation.

实例6Example 6

实例5所述编码方法或装置或解码方法或装置中,所述采样格式转换操作包括重采样操作和/或上采样操作和/或下采样操作。In the encoding method or device or decoding method or device described in Example 5, the sampling format conversion operation includes a resampling operation and/or an upsampling operation and/or a downsampling operation.

实例7Example 7

所述编码方法或装置或解码方法或装置中,与一种采样格式相应的编解码方式包括块预测操作,和/或变换操作;与另一种采样格式相应的编解码方式包括串预测操作。In the encoding method or device or decoding method or device, the codec method corresponding to one sampling format includes block prediction operation and/or transformation operation; the codec method corresponding to another sampling format includes string prediction operation.

实例8Example 8

所述编码方法或装置或解码方法或装置中,所述数据是具有矩形形状的图像,与一种采样格式相应的编解码方式包括从当前编解码块的邻近像素进行帧内预测的操作,和/或变换操作;与另一种采样格式相应的编解码方式包括串预测操作。In the encoding method or device or the decoding method or device, the data is an image having a rectangular shape, and a codec method corresponding to a sampling format includes an operation of intra-frame prediction from adjacent pixels of the current codec block, and /or transform operation; the codec mode corresponding to another sampling format includes string prediction operation.

实例9Example 9

所述编码方法或装置或解码方法或装置中,所述数据是具有矩形形状的图像的序列,与一种采样格式相应的编解码方式包括从当前编解码块的邻近像素进行帧内预测的操作,和/或从当前编解码图像的邻近图像进行帧间预测的操作,和/或变换操作;与另一种采样格式相应的编解码方式包括串预测操作。In the encoding method or device or the decoding method or device, the data is a sequence of images having a rectangular shape, and a codec method corresponding to a sampling format includes intra-frame prediction from adjacent pixels of the current codec block , and/or the operation of performing inter-frame prediction from the neighboring images of the current codec image, and/or the transformation operation; the codec method corresponding to another sampling format includes the string prediction operation.

实例10Example 10

所述编码方法或装置或解码方法或装置中,所述数据是具有矩形形状和3个分量的图像的序列,所述多种采样格式是两种采样格式,所述两种采样格式是4:4:4采样格式和4:2:0采样格式,与所述4:2:0采样格式相应的编解码方式包括从当前编解码块的邻近像素进行帧内预测的操作,和/或从当前编解码图像的邻近图像进行帧间预测的操作,和/或变换操作;与所述4:4:4采样格式相应的编解码方式包括串预测操作。In the encoding method or device or the decoding method or device, the data is a sequence of images with a rectangular shape and 3 components, and the multiple sampling formats are two sampling formats, and the two sampling formats are 4: 4:4 sampling format and 4:2:0 sampling format, the codec method corresponding to the 4:2:0 sampling format includes the operation of performing intra prediction from the adjacent pixels of the current codec block, and/or from the current Inter-frame prediction and/or transform operations are performed on adjacent images of codec images; the codec modes corresponding to the 4:4:4 sampling format include string prediction operations.

实例11Example 11

所述编码方法或装置或解码方法或装置中,所述数据是具有矩形形状和3个分量的图像或图像的序列,所述多种采样格式是两种采样格式,所述两种采样格式是4:4:4采样格式和4:2:0采样格式,与所述4:2:0采样格式相应的编解码方式包括从当前编解码块的邻近像素进行帧内预测的操作,和/或从当前编解码图像的邻近图像进行帧间预测的操作,和/或变换操作,产生的4:2:0采样格式的数据版本经过上采样操作转换为4:4:4采样格式的数据版本;与所述4:4:4采样格式相应的编解码方式包括串预测操作,产生的4:4:4采样格式的数据版本经过下采样操作转换为4:2:0采样格式的数据版本。In the encoding method or device or decoding method or device, the data is an image or sequence of images having a rectangular shape and three components, and the multiple sampling formats are two sampling formats, and the two sampling formats are 4:4:4 sampling format and 4:2:0 sampling format, the codec method corresponding to the 4:2:0 sampling format includes the operation of performing intra prediction from adjacent pixels of the current codec block, and/or The inter-frame prediction operation and/or transformation operation is performed from the adjacent image of the current codec image, and the data version of the 4:2:0 sampling format generated is converted into a data version of the 4:4:4 sampling format through an upsampling operation; The codec method corresponding to the 4:4:4 sampling format includes a string prediction operation, and the generated data version in the 4:4:4 sampling format is converted into a data version in the 4:2:0 sampling format through a downsampling operation.

实例12Example 12

所述编码方法或装置或解码方法或装置中,所述数据是具有矩形形状和3个分量的图像或图像的序列,所述多种采样格式是两种采样格式,所述两种采样格式是4:4:4采样格式和4:2:0采样格式,与所述4:2:0采样格式相应的编解码方式包括从当前编解码块的邻近像素进行帧内预测的操作,和/或从当前编解码图像的邻近图像进行帧间预测的操作,和/或变换操作,产生的4:2:0采样格式的数据版本的D分量D420={D420[i][j]:i=0~M-1,j=0~N-1}和E分量E420={E420[i][j]:i=0~M-1,j=0~N-1},分别经过下列上采样操作转换为4:4:4采样格式的数据版本的D分量D444={D444[i][j]:i=0~2M-1,j=0~2N-1}和E分量E444={E444[i][j]:i=0~2M-1,j=0~2N-1}:In the encoding method or device or decoding method or device, the data is an image or sequence of images having a rectangular shape and three components, and the multiple sampling formats are two sampling formats, and the two sampling formats are 4:4:4 sampling format and 4:2:0 sampling format, the codec method corresponding to the 4:2:0 sampling format includes the operation of performing intra prediction from adjacent pixels of the current codec block, and/or The operation of performing inter-frame prediction from the adjacent image of the current codec image, and/or the transformation operation, the D component D420={D420[i][j]:i=0 of the data version of the 4:2:0 sampling format generated ~M-1, j=0~N-1} and E component E420={E420[i][j]: i=0~M-1, j=0~N-1}, respectively undergo the following upsampling operations D component D444 = {D444[i][j]: i = 0 ~ 2M-1, j = 0 ~ 2N-1} and E component E444 = {E444[ i][j]: i=0~2M-1, j=0~2N-1}:

D444[2i][2j]=D420[i][j]D444[2i][2j]=D420[i][j]

D444[2i+1][2j]=D420[i][j]D444[2i+1][2j]=D420[i][j]

D444[2i][2j+1]=D420[i][j]D444[2i][2j+1]=D420[i][j]

D444[2i+1][2j+1]=D420[i][j]D444[2i+1][2j+1]=D420[i][j]

E444[2i][2j]=E420[i][j]E444[2i][2j]=E420[i][j]

E444[2i+1][2j]=E420[i][j]E444[2i+1][2j]=E420[i][j]

E444[2i][2j+1]=E420[i][j]E444[2i][2j+1]=E420[i][j]

E444[2i+1][2j+1]=E420[i][j]E444[2i+1][2j+1]=E420[i][j]

其中,i=0~M-1,j=0~N-1;与所述4:4:4采样格式相应的编解码方式包括串预测操作,产生的4:4:4采样格式的数据版本的D分量D444={D444[i][j]:i=0~2M-1,j=0~2N-1}和E分量E444={E444[i][j]:i=0~2M-1,j=0~2N-1},分别经过下列下采样操作转换为4:2:0采样格式的数据版本的D分量D420={D420[i][j]:i=0~M-1,j=0~N-1}和E分量E420={E420[i][j]:i=0~M-1,j=0~N-1}:Wherein, i=0~M-1, j=0~N-1; the codec method corresponding to the 4:4:4 sampling format includes a string prediction operation, and the generated data version of the 4:4:4 sampling format D component D444={D444[i][j]: i=0~2M-1, j=0~2N-1} and E component E444={E444[i][j]: i=0~2M- 1, j=0~2N-1}, after the following down-sampling operations, the D components of the data version converted into 4:2:0 sampling format D420={D420[i][j]: i=0~M-1 , j=0~N-1} and E component E420={E420[i][j]: i=0~M-1, j=0~N-1}:

D420[i][j]=(D444[2i][2j]+D444[2i+1][2j]+D444[2i][2j+1]+D444[2i+1][2j+1]+R)>>2D420[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)>>2E420[i][j]=(E444[2i][2j]+E444[2i+1][2j]+E444[2i][2j+1]+E444[2i+1][2j+1]+R )>>2

其中,i=0~M-1,j=0~N-1,R等于0(截断法)或2(四舍五入法)。Wherein, i=0˜M−1, j=0˜N−1, R is equal to 0 (truncation method) or 2 (rounding method).

实例13Example 13

所述编码方法或装置或解码方法或装置中,在所述视频数据压缩码流的下列地方之一或若干处存在表示允许采用多种采样格式和/或相应编解码方式进行编解码的标志位:In the encoding method or device or decoding method or device, there is a flag bit indicating that multiple sampling formats and/or corresponding codec methods are allowed to be used for encoding and decoding in one or several of the following places of the video data compression code stream :

1)序列参数集;通常是是序列参数集的一个直接存在或隐含推导的语法元素;1) sequence parameter set; usually a syntax element that is directly present or implicitly derived from a sequence parameter set;

2)图像参数集;通常是图像参数集的一个直接存在或隐含推导的语法元素;2) Image parameter set; usually a directly existing or implicitly derived syntax element of the image parameter set;

3)序列头;通常是序列头的一个直接存在或隐含推导的语法元素;3) sequence header; usually a directly present or implicitly derived syntax element of the sequence header;

4)条带头;通常是条带头的一个直接存在或隐含推导的语法元素;4) Slice header; usually a directly present or implicitly derived syntax element of the slice header;

5)图像头;通常是图像头的一个直接存在或隐含推导的语法元素;5) Image header; usually a directly existing or implicitly derived syntax element of the image header;

6)CTU头;通常是CTU头的一个直接存在或隐含推导的语法元素;6) CTU header; usually a directly existing or implicitly derived syntax element of the CTU header;

7)CU头;通常是CU头的一个直接存在或隐含推导的语法元素;7) CU header; usually a directly existing or implicitly derived syntax element of the CU header;

8)编解码块头;通常是编解码块头的一个直接存在或隐含推导的语法元素。8) Codec block header; usually a directly existing or implicitly derived syntax element of the codec block header.

实例14Example 14

所述编码方法或装置或解码方法或装置中,在所述视频数据压缩码流的下列地方之一或若干处存在表示允许使用采用4:4:4采样格式和/或相应串预测编解码方式的编解码块的标志位:In the encoding method or device or decoding method or device, one or several of the following places in the video data compression code stream indicates that it is allowed to use the 4:4:4 sampling format and/or the corresponding string prediction codec method The flag bits of the codec block:

1)序列参数集;通常是是序列参数集的一个直接存在或隐含推导的语法元素;1) sequence parameter set; usually a syntax element that is directly present or implicitly derived from a sequence parameter set;

2)图像参数集;通常是图像参数集的一个直接存在或隐含推导的语法元素;2) Image parameter set; usually a directly existing or implicitly derived syntax element of the image parameter set;

3)序列头;通常是序列头的一个直接存在或隐含推导的语法元素;3) sequence header; usually a directly present or implicitly derived syntax element of the sequence header;

3)条带头;通常是条带头的一个直接存在或隐含推导的语法元素;3) Slice header; usually a directly present or implicitly derived syntax element of the slice header;

3)图像头;通常是图像头的一个直接存在或隐含推导的语法元素。3) Image header; usually a directly present or implicitly derived syntax element of the image header.

实例15Example 15

所述编码方法或装置或解码方法或装置中,所述预定的多种采样格式和相应编解码方式分别用多个预定的值来表示,一种采样格式和相应编解码方式对应于一个预定的值k,每个所述编解码块在所述视频数据压缩码流中都有一个直接或间接或直接间接混合的采样格式和相应编解码方式标识码,In the encoding method or device or the decoding method or device, the predetermined plurality of sampling formats and corresponding codec methods are respectively represented by a plurality of predetermined values, and one sampling format and corresponding codec methods correspond to a predetermined value k, each codec block has a direct or indirect or direct-indirect mixed sampling format and corresponding codec identification code in the video data compression code stream,

如果所述采样格式和相应编解码方式标识码等于k,则If the sampling format and the corresponding codec identification code are equal to k, then

{{

采用与k对应的一种采样格式和相应编解码方式对所述编解码块进行编解码Encode and decode the codec block by using a sampling format corresponding to k and a corresponding codec method

}}

所述直接的采样格式和相应编解码方式标识码由视频数据压缩码流中的一个或多个位串(二元符号串)所组成。所述间接的采样格式和相应编解码方式标识码是从其他编解码参数和/或视频数据压缩码流的其他语法元素导出的采样格式和相应编解码方式标识码。所述直接间接混合的采样格式和相应编解码方式标识码是部分直接(即由视频数据压缩码流中的一个或多个位串所组成)部分间接(即从其他编解码参数和/或视频数据压缩码流的其他语法元素导出)混合的采样格式和相应编解码方式标识码。The direct sampling format and the corresponding codec identification code are composed of one or more bit strings (binary symbol strings) in the video data compression code stream. The indirect sampling format and corresponding codec identification code are sampling formats and corresponding codec identification codes derived from other codec parameters and/or other syntax elements of the video data compression code stream. The direct-indirect mixed sampling format and the corresponding codec mode identification code are partly direct (that is, composed of one or more bit strings in the video data compression code stream) and partly indirect (that is, obtained from other codec parameters and/or video derived from other syntax elements of the data compression code stream) mixed sampling format and corresponding codec identification code.

实例16Example 16

所述编码方法或装置或解码方法或装置中,用来表示所述编解码块的采样格式和相应编解码方式的采样格式和相应编解码方式标识码语法元素以下列形式存在于所述编解码块的视频数据压缩码流中:In the encoding method or device or the decoding method or device, the sampling format used to represent the codec block and the corresponding codec mode and the corresponding codec mode identification code syntax elements exist in the codec in the following form In the video data compression code stream of the block:

编解码块头信息语法元素、采样格式和相应编解码方式标识码语法元素、更多的编解码块头信息语法元素、编解码块数据语法元素;Codec block header information syntax elements, sampling format and corresponding codec mode identification code syntax elements, more codec block header information syntax elements, codec block data syntax elements;

or

编解码块头信息语法元素、部分采样格式和相应编解码方式标识码语法元素、更多的编解码块头信息语法元素、部分编解码块数据语法元素、另一部分采样格式和相应编解码方式标识码语法元素、另一部分编解码块数据语法元素;Codec block header information syntax elements, some sampling formats and corresponding codec mode identifier syntax elements, more codec block header information syntax elements, part of codec block data syntax elements, another part of sampling format and corresponding codec mode identifier syntax elements element, another part of codec block data syntax element;

其中,采样格式和相应编解码方式标识码取一个值时,采用与所述值对应的那种采样格式和相应编解码方式对所述编解码块进行编解码。Wherein, when the sampling format and the corresponding encoding and decoding mode identification code take one value, the encoding and decoding block is encoded and decoded using the sampling format and corresponding encoding and decoding mode corresponding to the value.

实例17Example 17

所述编码方法或装置或解码方法或装置中,与一种采样格式相应的编解码方式包括预测操作,和/或预测补偿操作,和/或去块效应滤波操作,和/或样值偏移补偿操作,和/或自适应修正滤波操作;与另一种采样格式相应的编解码方式包括变换操作,和/或量化操作,和/或反量化操作(缩放scaling操作),和/或反变换操作。In the encoding method or device or the decoding method or device, the codec method corresponding to a sampling format includes a prediction operation, and/or a prediction compensation operation, and/or a deblocking filtering operation, and/or a sample offset Compensation operation, and/or adaptive correction filtering operation; codec method corresponding to another sampling format includes transformation operation, and/or quantization operation, and/or inverse quantization operation (scaling operation), and/or inverse transformation operate.

实例18Example 18

所述编码方法或装置或解码方法或装置中,与一种采样格式相应的编解码方式包括块预测操作,和/或串预测操作,和/或预测补偿操作;与另一种采样格式相应的编解码方式包括变换操作,和/或量化操作,和/或反量化操作,和/或反变换操作。In the encoding method or device or decoding method or device, the codec method corresponding to one sampling format includes block prediction operation, and/or string prediction operation, and/or prediction compensation operation; The codec mode includes transform operation, and/or quantization operation, and/or inverse quantization operation, and/or inverse transform operation.

实施例4Example 4

本发明的实施例还提供了一种存储介质。可选地,在本实施例中,上述存储介质可以被设置为存储用于执行以下步骤的程序代码:The embodiment of the invention also provides a storage medium. Optionally, in this embodiment, the above-mentioned storage medium may be configured to store program codes for performing the following steps:

S1,解析视频数据压缩码流,获取采样格式信息和/或解码方式信息;S1, analyzing the compressed code stream of the video data, obtaining sampling format information and/or decoding method information;

S2,根据所述采样格式信息和/或解码方式信息,在预定的多种采样格式和解码方式之中,选择第一采样格式和与所述第一采样格式相应的解码方式;S2. Select a first sampling format and a decoding mode corresponding to the first sampling format among predetermined multiple sampling formats and decoding modes according to the sampling format information and/or decoding mode information;

S3,采用所述第一采样格式和所述第一采样格式相应的解码方式对解码块进行解码。S3. Decode the decoded block by using the first sampling format and a decoding manner corresponding to the first sampling format.

可选地,在本实施例中,上述存储介质可以包括但不限于:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。Optionally, in this embodiment, the above-mentioned storage medium may include but not limited to: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk Various media that can store program codes such as discs or optical discs.

可选地,在本实施例中,处理器根据存储介质中已存储的程序代码执行解析视频数据压缩码流,获取采样格式信息和/或解码方式信息;Optionally, in this embodiment, the processor executes and parses the compressed video data stream according to the program code stored in the storage medium, and obtains sampling format information and/or decoding mode information;

可选地,在本实施例中,处理器根据存储介质中已存储的程序代码执行根据所述采样格式信息和/或解码方式信息,在预定的多种采样格式和解码方式之中,选择第一采样格式和与所述第一采样格式相应的解码方式;Optionally, in this embodiment, the processor executes according to the program code stored in the storage medium, and according to the sampling format information and/or decoding mode information, selects the second sampling format and decoding mode among predetermined multiple sampling formats and decoding modes. a sampling format and a decoding method corresponding to the first sampling format;

可选地,在本实施例中,处理器根据存储介质中已存储的程序代码执行采用所述第一采样格式和所述第一采样格式相应的解码方式对解码块进行解码。Optionally, in this embodiment, the processor executes, according to the program code stored in the storage medium, to decode the decoded block by using the first sampling format and a decoding manner corresponding to the first sampling format.

可选地,本实施例中的具体示例可以参考上述实施例及可选实施方式中所描述的示例,本实施例在此不再赘述。Optionally, for specific examples in this embodiment, reference may be made to the examples described in the foregoing embodiments and optional implementation manners, and details are not repeated in this embodiment.

显然,本领域的技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。Obviously, those skilled in the art should understand that each module or each step of the present invention described above can be realized by a general-purpose computing device, and they can be concentrated on a single computing device, or distributed in a network formed by multiple computing devices Alternatively, they may be implemented in program code executable by a computing device so that they may be stored in a storage device to be executed by a computing device, and in some cases in an order different from that shown here The steps shown or described are carried out, or they are separately fabricated into individual integrated circuit modules, or multiple modules or steps among them are fabricated into a single integrated circuit module for implementation. As such, the present invention is not limited to any specific combination of hardware and software.

以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and changes. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included within 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 of video data compressed code stream, video data encoding method and device 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 of video data compressed code stream, video data encoding method and device

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 成都大学 Hybrid coding data migration method, data migration device and storage medium
CN109379630B (en) * 2018-11-27 2021-03-12 Oppo广东移动通信有限公司 Video processing method, device, electronic device 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 同济大学 Encoding and decoding method and device for point prediction of component downsampling format data
CN115037927B (en) * 2022-05-07 2024-10-01 同济大学 Image encoding and decoding method and device integrating full chroma and mixed chroma

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
CN103918269B (en) * 2012-01-04 2017-08-01 联发科技(新加坡)私人有限公司 Chroma intra prediction method and device
WO2013102293A1 (en) * 2012-01-04 2013-07-11 Mediatek Singapore Pte. Ltd. Improvements of luma-based chroma intra prediction
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
CA2890508C (en) * 2012-11-12 2017-08-15 Lg Electronics Inc. Apparatus for transreceiving signals and method for transreceiving signals
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
US10182241B2 (en) * 2014-03-04 2019-01-15 Microsoft Technology Licensing, Llc Encoding strategies for adaptive switching of color spaces, color sampling rates and/or bit depths

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
CN107483942A (en) 2017-12-15
WO2017211306A1 (en) 2017-12-14

Similar Documents

Publication Publication Date Title
CN107483942B (en) Decoding of video data compressed code stream, video data encoding method and device
US10038908B2 (en) Palette mode in high efficiency video coding (HEVC) screen content coding (SCC)
CN110933437B (en) Hybrid backward compatible signal encoding and decoding method
US8977048B2 (en) Method medium system encoding and/or decoding an image using image slices
TW202046739A (en) Adaptation parameter sets (aps) for adaptive loop filter (alf) parameters
EP1950971A2 (en) Moving image encoding device, moving image decoding device, moving image encoding method, and moving image decoding method
TWI439138B (en) Enhanced compression in representing non-frame-edge blocks of image frames
JP2017538381A (en) Inter-component prediction in video coding.
TW202110189A (en) Wraparound motion compensation in video coding
CN104853209A (en) Image coding and decoding method and device
CN104853211A (en) Image compression method and apparatus employing various forms of reference pixel storage spaces
TW201725905A (en) Entropy coding techniques for display stream compression (DSC) of non-4:4:4 chroma sub-sampling
CN108271024A (en) Image coding, coding/decoding method and device
TW201735608A (en) Methods and systems for generating color remapping information supplemental enhancement information messages for video
TWI713354B (en) Color remapping information sei message signaling for display adaptation
CN110754085B (en) Color remapping for non-4:4:4 format video content
KR20190020083A (en) Encoding method and apparatus and decoding method and apparatus
TW202103496A (en) Simplification of clipping value calculation for adaptive loop filters
KR20210002674A (en) Multi-type tree depth extension for picture boundary processing
JP2022548354A (en) Video decoding method, video encoding method, apparatus, equipment and storage medium
WO2023020560A1 (en) Video coding and decoding method and apparatus, electronic device and storage medium
CN118714299A (en) Image decoding method
JP2024506156A (en) Coding residuals and coefficients for video coding
CN111385555B (en) Data compression method and device using inter-component prediction for original and residual data
CN105872539A (en) Image coding method and device, and image decoding method and device

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
TG01 Patent term adjustment
TG01 Patent term adjustment