CN112261409A - Residual encoding method, residual decoding method, residual encoding device, residual decoding device, storage medium and electronic device - Google Patents
Residual encoding method, residual decoding method, residual encoding device, residual decoding device, storage medium and electronic device Download PDFInfo
- Publication number
- CN112261409A CN112261409A CN201910663278.XA CN201910663278A CN112261409A CN 112261409 A CN112261409 A CN 112261409A CN 201910663278 A CN201910663278 A CN 201910663278A CN 112261409 A CN112261409 A CN 112261409A
- Authority
- CN
- China
- Prior art keywords
- block
- residual
- decoded
- coded
- prediction
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods 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/17—Methods 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/176—Methods 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/10—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
- H04N19/169—Methods 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/17—Methods 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/172—Methods 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 picture, frame or field
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/42—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/50—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/50—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
- H04N19/503—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
本发明提供了一种残差编码、解码方法及装置、存储介质及电子装置。在残差编码方法中,确定待编码块的参考块的残差;基于所述待编码块的所述参考块的残差,对所述待编码块的残差进行预测,得到所述待编码块的预测残差;将所述待编码块的所述预测残差和所述待编码块的实际残差之间的残差差值编码进码流。通过本发明,解决了相关技术中如何降低编码残差的比特率的问题,进而达到了节省码率的效果。
The present invention provides a residual coding and decoding method and device, a storage medium and an electronic device. In the residual coding method, the residual of the reference block of the block to be coded is determined; based on the residual of the reference block of the to-be-coded block, the residual of the to-be-coded block is predicted to obtain the to-be-coded block The prediction residual of the block; the residual difference value between the prediction residual of the to-be-coded block and the actual residual of the to-be-coded block is encoded into the code stream. The invention solves the problem of how to reduce the bit rate of the coding residual in the related art, thereby achieving the effect of saving the code rate.
Description
技术领域technical field
本发明涉及通信领域,具体而言,涉及一种残差编码、解码方法及装置、存储介质及电子装置。The present invention relates to the field of communications, and in particular, to a residual coding and decoding method and device, a storage medium and an electronic device.
背景技术Background technique
近些年,随着网络通信和多媒体技术的快速发展,视频内容开始以高分辨率和超高分辨率形式呈现给观众。与标准分辨率视频相比,视频的分辨率越高,人们观看视频内容的视觉效果体验越好。同时,高分辨率视频也给视频编码技术提出了更高的要求。为了应对这一挑战,国际联合视频编码小组(Joint Collaborative Team on Video Coding,简称为JCT-VC)开发了新一代高效视频编码标准(High Efficiency Video Coding,简称为HEVC)。与上一代视频编码标准H.264/MPEG-4 AVC相比,HEVC提升了50%的压缩效率,并保持了原来相同的视觉质量。2015年9月1日,谷歌宣布与亚马逊、思科、英特尔、微软、火狐、奈飞(Netflix)成立开放媒体联盟(Alliance of Open Media,简称为AOM),AOM开发了新一代视频编码格式AV1。2017年12月,中国数字音视频编解码技术标准(Audio Video CodingStandard,简称为AVS)提出新一代AVS3视频编码。联合视频探索团队(Joint VideoExploration Team,简称为JVET)于2018年4月10日美国圣地亚哥会议上确定最新一代视频编码标准的名称为通用视频编码(Versatile Video Coding,简称为VVC),主要目标是改进现有HEVC,提供更高的压缩性能,同时会针对新兴应用(360°全景视频和高动态范围成像(High Dynamic Range Imaging,简称为HDR或HDRI))进行优化。VVC预计在2020年之前完成标准化,目前提出的方案相对于HEVC提高已经达到40%以上。In recent years, with the rapid development of network communication and multimedia technologies, video content has begun to be presented to viewers in high-resolution and ultra-high-resolution formats. Compared to standard resolution videos, the higher the resolution of the video, the better the visual experience for people watching the video content. At the same time, high-resolution video also puts forward higher requirements for video coding technology. To address this challenge, the International Joint Collaborative Team on Video Coding (JCT-VC) developed a new generation of High Efficiency Video Coding (HEVC). Compared with the previous generation video coding standard H.264/MPEG-4 AVC, HEVC improves the compression efficiency by 50% and maintains the same visual quality. On September 1, 2015, Google announced the establishment of the Alliance of Open Media (AOM) with Amazon, Cisco, Intel, Microsoft, Firefox, and Netflix. AOM developed a new generation of video encoding format AV1. In December 2017, China's Audio Video Coding Standard (AVS for short) proposed a new generation of AVS3 video coding. The Joint Video Exploration Team (JVET for short) determined the name of the latest generation of video coding standards at the San Diego Conference on April 10, 2018 as Versatile Video Coding (VVC for short), and the main goal is to improve Existing HEVC, which provides higher compression performance, will be optimized for emerging applications (360° panoramic video and High Dynamic Range Imaging (HDR or HDRI) for short). VVC is expected to be standardized by 2020, and the current proposed solution has improved by more than 40% compared to HEVC.
帧间预测是视频编码标准HEVC/AV1/AVS中最核心的组成部分,它利用视频时间域的相关性,使用时域相邻已编码图像像素预测当前图像的像素,以达到有效去除视频时域冗余的目的。目前主流的视频编码标准都是采用基于块的运动补偿技术,原理是为当前图像的每个像素块在之前已编码图像中通过运动估计寻找一个最佳匹配块。用于预测的图像称为参考图像,参考块到当前像素块的位移称为运动矢量(motion vector,简称为MV),当前块原始像素值与参考块进行运动补偿后的预测块的像素值之间的差值称为残差(也可以称为残差、残差值、残差块)。帧间预测只需要将编码块的最优MV、参考帧索引和残差值经编码后写入码流传输给解码器端。解码器端根据最优MV和参考帧索引在参考帧找到对应的参考块,然后再加上解码后残差值,就可以恢复出该解码块的原始像素值。帧间预测主要需要消耗比特率的是残差块的编码,传统的帧间预测直接将预测后得到的实际残差进行编码。然而,针对大多数复杂运动情况下,残差块的值非常大,这会导致编码残差的比特率非常高。Inter-frame prediction is the core component of the video coding standard HEVC/AV1/AVS. It uses the correlation in the video time domain to predict the pixels of the current image using the adjacent encoded image pixels in the time domain to effectively remove the video time domain. redundant purpose. The current mainstream video coding standards all use block-based motion compensation technology. The principle is to find a best matching block for each pixel block of the current image through motion estimation in the previously coded image. The image used for prediction is called a reference image, and the displacement from the reference block to the current pixel block is called a motion vector (MV for short), and the difference between the original pixel value of the current block and the pixel value of the prediction block after motion compensation of the reference block is performed. The difference between them is called residual (also called residual, residual value, residual block). Inter-frame prediction only needs to write the optimal MV, reference frame index and residual value of the coding block into the code stream and transmit it to the decoder. The decoder side finds the corresponding reference block in the reference frame according to the optimal MV and the reference frame index, and then adds the decoded residual value to restore the original pixel value of the decoded block. Inter-frame prediction mainly consumes bit rate is the coding of residual blocks, and traditional inter-frame prediction directly encodes the actual residual obtained after prediction. However, for most complex motion cases, the value of the residual block is very large, which results in a very high bit rate of the encoded residual.
因此,针对如何降低编码残差的比特率以达到节省码率的效果,是目前亟待解决的问题。Therefore, how to reduce the bit rate of the coding residual to achieve the effect of saving the code rate is an urgent problem to be solved at present.
发明内容SUMMARY OF THE INVENTION
本发明实施例提供了一种残差编码、解码方法及装置、存储介质及电子装置,以至少解决相关技术中如何降低编码残差的比特率的问题。Embodiments of the present invention provide a residual coding and decoding method and device, a storage medium, and an electronic device, so as to at least solve the problem of how to reduce the bit rate of the coding residual in the related art.
根据本发明的一个实施例,提供了一种残差编码方法,包括:确定待编码块的参考块的残差,其中,所述待编码块的所述参考块包括:所述待编码块在时域上的至少两个第一参考块;或,所述待编码块在空域上的至少两个第二参考块;或,所述待编码块在时域上的至少一个第一参考块以及所述待编码块在空域上的至少一个第二参考块;基于所述待编码块的所述参考块的残差,对所述待编码块的残差进行预测,得到所述待编码块的预测残差;将所述待编码块的所述预测残差和所述待编码块的实际残差之间的残差差值编码进码流。According to an embodiment of the present invention, a residual coding method is provided, comprising: determining a residual of a reference block of a block to be coded, wherein the reference block of the block to be coded includes: the block to be coded is in at least two first reference blocks in the time domain; or, at least two second reference blocks in the spatial domain of the block to be encoded; or, at least one first reference block in the time domain of the block to be encoded, and At least one second reference block of the block to be coded in the spatial domain; based on the residual of the reference block of the block to be coded, predict the residual of the block to be coded to obtain the block to be coded. Prediction residual; encode the residual difference between the predicted residual of the block to be encoded and the actual residual of the block to be encoded into a code stream.
在至少一个示例性实施例中,在所述待编码块所在的图像帧为P帧的情况下,所述待编码块在所述时域上的第一参考块包括:所述待编码块在前向参考帧中的最优预测单元块PU,记为第一最优PU,和/或,所述待编码块在所述前向参考帧的前一帧中的最优PU,记为第二最优PU;或者,在所述待编码块所在的图像帧为B帧的情况下,所述待编码块在所述时域上的第一参考块包括:所述待编码块在前向参考帧中的最优PU,记为第三最优PU,和/或,所述待编码块在后向参考帧中的最优PU,记为第四最优PU。In at least one exemplary embodiment, when the image frame where the block to be encoded is located is a P frame, the first reference block of the block to be encoded in the time domain includes: the block to be encoded is in the The optimal prediction unit block PU in the forward reference frame, denoted as the first optimal PU, and/or the optimal PU of the block to be encoded in the frame preceding the forward reference frame, denoted as the first optimal PU Two optimal PUs; or, when the image frame where the block to be encoded is located is a B frame, the first reference block of the block to be encoded in the time domain includes: the block to be encoded is in the forward direction The optimal PU in the reference frame is recorded as the third optimal PU, and/or the optimal PU of the block to be encoded in the backward reference frame is recorded as the fourth optimal PU.
在至少一个示例性实施例中,在所述待编码块所在的图像帧为P帧的情况下,所述待编码块在所述时域上的第一参考块通过以下方式确定:通过运动估计在所述前向参考帧中确定所述待编码块的所述第一最优PU,并确定所述待编码块相对于所述第一最优PU的运动矢量MV;根据所述第一最优PU的位置和所述MV,通过运动估计在所述前向参考帧的前一帧中确定所述第二最优PU。In at least one exemplary embodiment, when the image frame in which the block to be encoded is located is a P frame, the first reference block of the block to be encoded in the time domain is determined in the following manner: through motion estimation Determine the first optimal PU of the block to be coded in the forward reference frame, and determine the motion vector MV of the block to be coded relative to the first optimal PU; according to the first optimal PU The position of the best PU and the MV, the second best PU is determined by motion estimation in the frame preceding the forward reference frame.
在至少一个示例性实施例中,所述待编码块在所述空域上的第二参考块位于所述待编码块所在的图像帧中,且与所述待编码块在所述空域上相邻。In at least one exemplary embodiment, the second reference block of the block to be encoded in the spatial domain is located in an image frame where the block to be encoded is located, and is adjacent to the block to be encoded in the spatial domain .
在至少一个示例性实施例中,所述待编码块在所述空域上的第二参考块包括:所述待编码块所在的图像帧中,与所述待编码块相邻的左边的块和/或上边的块。In at least one exemplary embodiment, the second reference block of the block to be encoded in the spatial domain includes: in the image frame where the block to be encoded is located, the left block adjacent to the block to be encoded and / or the block above.
在至少一个示例性实施例中,所述待编码块的所述参考块包括:In at least one exemplary embodiment, the reference block of the block to be encoded includes:
所述待编码块在所述时域上的对应的残差为非全零的两个第一参考块,和所述待编码块在所述空域上的对应的残差为非全零的两个第二参考块;或者,The corresponding residuals of the block to be encoded in the time domain are two first reference blocks that are not all zeros, and the corresponding residuals of the block to be encoded in the spatial domain are two non-all zeros. a second reference block; or,
所述待编码块在所述时域上的对应的残差为非全零的一个第一参考块,和所述待编码块在所述空域上的对应的残差为非全零的一个第二参考块;或者,The corresponding residual of the block to be encoded in the time domain is a first reference block that is not all zero, and the corresponding residual of the block to be encoded in the spatial domain is a first reference block that is not all zero. 2 reference blocks; or,
所述待编码块在所述时域上的对应的残差为非全零的两个第一参考块,和所述待编码块在所述空域上的对应的残差为非全零的一个第二参考块;或者,The corresponding residuals of the to-be-coded block in the time domain are two first reference blocks that are not all zeros, and the corresponding residuals of the to-be-coded block in the spatial domain are one of the non-all-zero residuals the second reference block; or,
所述待编码块在所述时域上的对应的残差为非全零的一个第一参考块,和所述待编码块在所述空域上的对应的残差为非全零的两个第二参考块;或者,The corresponding residual of the block to be coded in the time domain is a first reference block that is not all zero, and the corresponding residual of the block to be coded in the space domain is two non-all zeros. the second reference block; or,
所述待编码块在所述时域上的对应的残差为非全零的两个第一参考块;或者,The corresponding residuals of the block to be coded in the time domain are two first reference blocks that are not all zeros; or,
所述待编码块在所述空域上的对应的残差为非全零的两个第二参考块。The corresponding residuals of the block to be encoded in the spatial domain are two second reference blocks that are not all zeros.
在至少一个示例性实施例中,基于所述待编码块的所述参考块的残差,对所述待编码块的残差进行预测,得到所述待编码块的预测残差包括:将所述参考块的所述残差输入残差预测模型得到所述待编码块的预测残差,其中,所述残差预测模型是基于训练样本采用深度学习网络训练得到的,所述训练样本包括:具有已知残差的编码块的参考块的残差、以及所述具有已知残差的编码块的实际残差;或者,对所述参考块的所述残差进行线性加权,得到所述待编码块的预测残差,其中,所述线性加权包括单一权重的线性加权或多权重的线性加权。In at least one exemplary embodiment, predicting the residual of the block to be encoded based on the residual of the reference block of the block to be encoded, and obtaining the prediction residual of the block to be encoded includes: The residual of the reference block is input to the residual prediction model to obtain the prediction residual of the to-be-coded block, wherein the residual prediction model is obtained based on training samples using deep learning network training, and the training samples include: The residual of the reference block of the coding block with the known residual, and the actual residual of the coding block with the known residual; or, performing linear weighting on the residual of the reference block to obtain the The prediction residual of the block to be coded, wherein the linear weighting includes linear weighting of a single weight or linear weighting of multiple weights.
在至少一个示例性实施例中,所述待编码块的所述实际残差为所述待编码块的原始图像块的像素值与所述待编码块的预测块的像素值之间的差值,其中,所述待编码块的所述预测块是对所述编码块的所述参考块进行运动补偿之后得到的块。In at least one exemplary embodiment, the actual residual of the block to be encoded is a difference between a pixel value of an original image block of the block to be encoded and a pixel value of a predicted block of the block to be encoded , wherein the prediction block of the block to be coded is a block obtained after motion compensation is performed on the reference block of the coding block.
根据本发明的另一个实施例,提供了一种残差解码方法,包括:基于码流中解析出来的运动矢量MV确定待解码块的预测块,并获取所述待解码块的参考块的残差,其中,所述待解码块的所述参考块包括:所述待解码块在时域上的至少两个第一参考块;或,所述待解码块在空域上的至少两个第二参考块;或,所述待解码块在时域上的至少一个第一参考块以及所述待解码块在空域上的至少一个第二参考块;基于所述待解码块的所述参考块的残差,对所述待解码块的残差进行预测,得到所述待解码块的预测残差;根据所述待解码块的预测残差和从所述码流中解析出的所述待解码块的预测残差和所述待解码块的实际残差之间的残差差值,确定所述待解码块的实际残差。According to another embodiment of the present invention, a residual decoding method is provided. difference, wherein the reference blocks of the block to be decoded include: at least two first reference blocks of the block to be decoded in the time domain; or at least two second reference blocks of the block to be decoded in the spatial domain reference block; or, at least one first reference block in the time domain of the block to be decoded and at least one second reference block in the spatial domain of the block to be decoded; based on the residual, predict the residual of the block to be decoded to obtain the predicted residual of the to-be-decoded block; according to the predicted residual of the to-be-decoded block and the to-be-decoded The residual difference between the prediction residual of the block and the actual residual of the block to be decoded determines the actual residual of the block to be decoded.
在至少一个示例性实施例中,在所述待解码块所在的图像帧为P帧的情况下,所述待解码块在所述时域上的第一参考块包括:所述待解码块在前向参考帧中的最优预测单元块PU,记为第一最优PU,和/或,所述待解码块在所述前向参考帧的前一帧中的最优PU,记为第二最优PU;或者,在所述待解码块所在的图像帧为B帧的情况下,所述待解码块在所述时域上的第一参考块包括:所述待解码块在前向参考帧中的最优PU,记为第三最优PU,和/或,所述待解码块在后向参考帧中的最优PU,记为第四最优PU。In at least one exemplary embodiment, when the image frame in which the block to be decoded is located is a P frame, the first reference block of the block to be decoded in the time domain includes: the block to be decoded is in the The optimal prediction unit block PU in the forward reference frame is denoted as the first optimal PU, and/or the optimal PU of the block to be decoded in the frame before the forward reference frame is denoted as the first optimal PU Two optimal PUs; or, when the image frame where the block to be decoded is located is a B frame, the first reference block of the block to be decoded in the time domain includes: the block to be decoded is in the forward direction The optimal PU in the reference frame is recorded as the third optimal PU, and/or the optimal PU of the block to be decoded in the backward reference frame is recorded as the fourth optimal PU.
在至少一个示例性实施例中,在所述待解码块所在的图像帧为P帧的情况下,所述待解码块在所述时域上的第一参考块通过以下方式确定:根据所述码流中解析出来的所述MV,确定所述待解码块在所述前向参考帧中的所述第一最优PU;根据所述第一最优PU在所述前向参考帧的前一帧中的同位PU,通过运动估计在所述前向参考帧的前一帧中确定所述第二最优PU。In at least one exemplary embodiment, when the image frame where the block to be decoded is located is a P frame, the first reference block of the block to be decoded in the time domain is determined in the following manner: according to the The MV parsed from the code stream determines the first optimal PU of the block to be decoded in the forward reference frame; according to the first optimal PU in the forward reference frame For co-located PUs in a frame, the second optimal PU is determined in a frame preceding the forward reference frame by motion estimation.
在至少一个示例性实施例中,所述待解码块在所述空域上的第二参考块位于所述待解码块所在的图像帧中,且与所述待解码块在所述空域上相邻。In at least one exemplary embodiment, the second reference block of the block to be decoded in the spatial domain is located in an image frame where the block to be decoded is located, and is adjacent to the block to be decoded in the spatial domain .
在至少一个示例性实施例中,所述待解码块在所述空域上的第二参考块包括:所述待解码块所在的图像帧中,与所述待解码块相邻的左边的块和/或上边的块。In at least one exemplary embodiment, the second reference block of the block to be decoded in the spatial domain includes: in the image frame where the block to be decoded is located, the left block adjacent to the block to be decoded and / or the block above.
在至少一个示例性实施例中,基于所述待解码块的所述参考块的残差,对所述待解码块的残差进行预测,得到所述待解码块的预测残差包括:将所述参考块的所述残差输入残差预测模型得到所述待解码块的预测残差,其中,所述残差预测模型与编码器端的残差预测模型相同;或者,对所述参考块的所述残差进行线性加权,得到所述待解码块的预测残差,其中,所述线性加权与编码器端的线性加权相同。In at least one exemplary embodiment, predicting the residual of the block to be decoded based on the residual of the reference block of the block to be decoded, and obtaining the prediction residual of the block to be decoded includes: The residual prediction model of the reference block is input to the residual prediction model to obtain the prediction residual of the block to be decoded, wherein the residual prediction model is the same as the residual prediction model at the encoder end; Linear weighting is performed on the residual to obtain the prediction residual of the block to be decoded, wherein the linear weighting is the same as the linear weighting at the encoder side.
在至少一个示例性实施例中,在所述待解码块的预测残差和从所述码流中解析出的所述待解码块的预测残差和所述待解码块的实际残差之间的残差差值,确定所述待解码块的实际残差之后,还包括:在所述待解码块的所述预测块的基础上加上所述实际残差,恢复出所述待解码块的原始图像块。In at least one exemplary embodiment, between the prediction residual of the block to be decoded and the prediction residual of the block to be decoded parsed from the code stream and the actual residual of the block to be decoded After determining the actual residual difference of the block to be decoded, the method further includes: adding the actual residual difference on the basis of the predicted block of the block to be decoded, and recovering the block to be decoded the original image block.
根据本发明的又一个实施例,提供了一种残差编码装置,包括:编码器端参考残差确定模块,设置为确定待编码块的参考块的残差,其中,所述待编码块的所述参考块包括:所述待编码块在时域上的至少两个第一参考块;或,所述待编码块在空域上的至少两个第二参考块;或,所述待编码块在时域上的至少一个第一参考块以及所述待编码块在空域上的至少一个第二参考块;编码器端残差预测模块,设置为基于所述待编码块的所述参考块的残差,对所述待编码块的残差进行预测,得到所述待编码块的预测残差;残差编码模块,设置为将所述待编码块的所述预测残差和所述待编码块的实际残差之间的残差差值编码进码流。According to yet another embodiment of the present invention, a residual coding apparatus is provided, comprising: an encoder-side reference residual determination module, configured to determine a residual of a reference block of a block to be coded, wherein the The reference blocks include: at least two first reference blocks of the block to be encoded in the time domain; or, at least two second reference blocks of the block to be encoded in the spatial domain; or, the block to be encoded at least one first reference block in the time domain and at least one second reference block in the spatial domain of the block to be coded; a residual prediction module at the encoder end, set to be based on the reference block of the block to be coded residual, predicting the residual of the to-be-coded block to obtain the predicted residual of the to-be-coded block; a residual coding module, set to combine the predicted residual of the to-be-coded block with the to-be-coded block The residual difference between the actual residuals of the block is encoded into the code stream.
根据本发明的又一个实施例,提供了一种残差解码装置,包括:解码器端参考残差确定模块,设置为基于码流中解析出来的运动矢量MV确定待解码块的预测块,并获取所述待解码块的参考块的残差,其中,所述待解码块的所述参考块包括:所述待解码块在时域上的至少两个第一参考块;或,所述待解码块在空域上的至少两个第二参考块;或,所述待解码块在时域上的至少一个第一参考块以及所述待解码块在空域上的至少一个第二参考块;解码器端残差预测模块,设置为基于所述待解码块的所述参考块的残差,对所述待解码块的残差进行预测,得到所述待解码块的预测残差;残差解码模块,设置为根据所述待解码块的预测残差和从所述码流中解析出的所述待解码块的预测残差和所述待解码块的实际残差之间的残差差值,确定所述待解码块的实际残差。According to yet another embodiment of the present invention, a residual decoding apparatus is provided, comprising: a reference residual determination module at the decoder side, configured to determine a prediction block of a block to be decoded based on a motion vector MV parsed from a code stream, and Obtain the residual of the reference block of the block to be decoded, wherein the reference block of the block to be decoded includes: at least two first reference blocks of the block to be decoded in the time domain; or, the block to be decoded Decoding at least two second reference blocks of the block in the spatial domain; or, at least one first reference block of the block to be decoded in the time domain and at least one second reference block of the block to be decoded in the spatial domain; decoding The device-end residual prediction module is set to predict the residual of the to-be-decoded block based on the residual of the reference block of the to-be-decoded block to obtain the predicted residual of the to-be-decoded block; residual decoding module, set to be based on the prediction residual of the to-be-decoded block and the residual difference value between the prediction residual of the to-be-decoded block parsed from the code stream and the actual residual of the to-be-decoded block , to determine the actual residual of the block to be decoded.
根据本发明的又一个实施例,还提供了一种存储介质,所述存储介质中存储有计算机程序,其中,所述计算机程序被设置为运行时执行上述任一项方法实施例中的步骤。According to yet another embodiment of the present invention, a storage medium is also provided, wherein a computer program is stored in the storage medium, wherein the computer program is configured to execute the steps in any one of the above method embodiments when running.
根据本发明的又一个实施例,还提供了一种电子装置,包括存储器和处理器,所述存储器中存储有计算机程序,所述处理器被设置为运行所述计算机程序以执行上述任一项方法实施例中的步骤。According to yet another embodiment of the present invention, there is also provided an electronic device comprising a memory and a processor, wherein the memory stores a computer program, the processor is configured to run the computer program to execute any of the above Steps in Method Examples.
通过本发明,根据参考块的残差对待编码块的残差进行预测得到预测残差,并将预测残差和实际残差之间的残差差值编码进码流,因为编码器只需要传输当前待编码块的实际残差与预测残差之间的差值,而残差差值的大小远远低于实际残差,所以有效减少了编码残差所需的比特率,达到了节省码率的效果。在解码器端布局有编码器端相同的残差预测过程,解码器端基于待解码块的参考块的残差预测待解码块的残差,并根据预测残差和码流中携带的残差差值确定待解码块的实际残差,能够保证在解码器端,基于节省码率的码流仍然能够正确恢复得到待解码块的实际残差。According to the present invention, the residual error of the block to be coded is predicted according to the residual error of the reference block to obtain the prediction residual error, and the residual difference value between the predicted residual error and the actual residual error is encoded into the code stream, because the encoder only needs to transmit The difference between the actual residual and the predicted residual of the current block to be coded, and the residual difference is much smaller than the actual residual, so the bit rate required for the coding residual is effectively reduced, and the code saving is achieved. rate effect. On the decoder side, the same residual prediction process of the encoder side is arranged. The difference value determines the actual residual error of the block to be decoded, which can ensure that at the decoder side, the actual residual error of the block to be decoded can still be correctly recovered based on the rate-saving code stream.
附图说明Description of drawings
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:The accompanying drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the attached image:
图1是本发明实施例的一种设置有能够应用残差编码方法和残差解码方法的帧间预测模块的移动终端10的硬件结构框图;1 is a block diagram of the hardware structure of a mobile terminal 10 provided with an inter-frame prediction module capable of applying a residual coding method and a residual decoding method according to an embodiment of the present invention;
图2是根据本发明实施例1的残差编码方法的流程图;2 is a flowchart of a residual coding method according to Embodiment 1 of the present invention;
图3是根据本发明实施例1的残差编码装置的结构框图;3 is a structural block diagram of a residual coding apparatus according to Embodiment 1 of the present invention;
图4是根据本发明实施例2的残差解码方法的流程图;4 is a flowchart of a residual decoding method according to Embodiment 2 of the present invention;
图5是根据本发明实施例2的残差解码装置的结构框图;5 is a structural block diagram of a residual decoding apparatus according to Embodiment 2 of the present invention;
图6是根据本发明实施例3的一个用于生成残差预测模块的卷积神经网络的示意图;6 is a schematic diagram of a convolutional neural network for generating a residual prediction module according to Embodiment 3 of the present invention;
图7是根据本发明实施例3的P帧和B帧情况下时域参考残差块的选取示意图;7 is a schematic diagram of selection of a time-domain reference residual block in the case of a P frame and a B frame according to Embodiment 3 of the present invention;
图8是根据本发明实施例3的空域参考残差块的选取示意图;8 is a schematic diagram of selection of a spatial reference residual block according to Embodiment 3 of the present invention;
图9是本发明实施例3的一种利用时空相关性提升视频帧间编码性能的方法程示意图。FIG. 9 is a schematic process diagram of a method for improving video inter-frame coding performance by utilizing spatiotemporal correlation according to Embodiment 3 of the present invention.
具体实施方式Detailed ways
下文中将参考附图并结合实施例来详细说明本发明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。Hereinafter, the present invention will be described in detail with reference to the accompanying drawings and in conjunction with embodiments. It should be noted that the embodiments in the present application and the features of the embodiments may be combined with each other in the case of no conflict.
需要说明的是,本发明的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。It should be noted that the terms "first", "second" and the like in the description and claims of the present invention and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific sequence or sequence.
本发明实施例提供了一种利用时空相关性提升编码性能(例如,视频帧间编码性能)的方案,该方案在视频帧间预测中利用残差预测模块预测编码块的残差值,以减少编码残差的码率,用于提升视频编码中帧间预测编码效率。编解码器在帧间预测中加入残差预测模块,利用当前待编码块的空域和时域上参考块的残差,预测当前待编码块的残差值(以下称之为预测残差)。相比于直接将待编码块的残差块编码进码流的编码方案,编码器只需要传输当前块的实际残差与预测残差之间的差值,从而减少编码残差所需的比特率,以达到节省码率的效果。The embodiment of the present invention provides a scheme for improving coding performance (eg, video inter-frame coding performance) by utilizing spatiotemporal correlation. The code rate of the coding residual is used to improve the coding efficiency of inter-frame prediction in video coding. The codec adds a residual prediction module to the inter-frame prediction, and predicts the residual value of the current block to be encoded (hereinafter referred to as prediction residual) by using the residual of the reference block in the spatial domain and the time domain of the current block to be encoded. Compared with the coding scheme that directly encodes the residual block of the block to be encoded into the code stream, the encoder only needs to transmit the difference between the actual residual of the current block and the predicted residual, thereby reducing the bits required to encode the residual. rate, in order to achieve the effect of saving the code rate.
以下实施例1从编码器端描述了一种能够减少编码残差所需的比特率的残差编码方案,本申请实施例2从解码器端描述了与编码器端相对应的正确解析待解码块的残差块的残差解码方案。实施例1提供的编码器端的实施例以及实施例2所提供的解码器端的实施例可以分别应用在编解码器端的帧间预测模块中(例如,可应用于现有视频编码标准的帧间预测模块中),这些帧间预测模块可以设置在移动终端、计算机终端或者类似的运算装置中。以帧间预测模块设置在移动终端上为例,图1是本发明实施例的一种设置有能够应用残差编码方法和残差解码方法的帧间预测模块的移动终端10的硬件结构框图。如图1所示,移动终端10可以包括一个或多个(图1中仅示出一个)处理器102(处理器102可以包括但不限于微处理器MCU或可编程逻辑器件FPGA等的处理装置,其上可以运行相应的程序用于实现能够应用残差编码方法和残差解码方法的帧间预测模块的功能)和用于存储数据的存储器104,可选地,上述移动终端还可以包括用于通信功能的传输设备106以及输入输出设备108。本领域普通技术人员可以理解,图1所示的结构仅为示意,其并不对上述移动终端的结构造成限定。例如,移动终端10还可包括比图1中所示更多或者更少的组件,或者具有与图1所示不同的配置。The following embodiment 1 describes from the encoder side a residual coding scheme that can reduce the bit rate required for coding residuals, and the second embodiment of the present application describes from the decoder side the correct parsing to be decoded corresponding to the encoder side Residual decoding scheme for residual blocks of blocks. The encoder-side embodiments provided in Embodiment 1 and the decoder-side embodiments provided in Embodiment 2 can be respectively applied to the inter-frame prediction module of the codec-side (for example, can be applied to the inter-frame prediction of existing video coding standards. modules), these inter-frame prediction modules may be arranged in mobile terminals, computer terminals or similar computing devices. Taking the inter-frame prediction module provided on a mobile terminal as an example, FIG. 1 is a hardware structural block diagram of a mobile terminal 10 provided with an inter-frame prediction module capable of applying residual coding and residual decoding methods according to an embodiment of the present invention. As shown in FIG. 1 , the mobile terminal 10 may include one or more (only one is shown in FIG. 1 ) processors 102 (the processors 102 may include but are not limited to processing devices such as a microprocessor MCU or a programmable logic device FPGA, etc. , on which a corresponding program can be run for realizing the function of an inter-frame prediction module capable of applying the residual coding method and the residual decoding method) and a memory 104 for storing data, optionally, the above-mentioned mobile terminal may also include a
存储器104可用于存储计算机程序,例如,应用软件的软件程序以及模块,如本发明实施例1提供的编码器端的实施例以及实施例2所提供的解码器端的实施例对应的计算机程序,处理器102通过运行存储在存储器104内的计算机程序,从而执行各种功能应用以及数据处理,即实现上述的方法。存储器104可包括高速随机存储器,还可包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器104可进一步包括相对于处理器102远程设置的存储器,这些远程存储器可以通过网络连接至移动终端10。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer programs corresponding to the embodiments of the encoder end provided by Embodiment 1 of the present invention and the embodiments of the decoder end provided by Embodiment 2, and the processor. 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, the above-mentioned method is implemented. Memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory located remotely from the processor 102, and these remote memories may be connected to the mobile terminal 10 through a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
传输装置106用于经由一个网络接收或者发送数据。上述的网络具体实例可包括移动终端10的通信供应商提供的无线网络。在一个实例中,传输装置106包括一个网络适配器(Network Interface Controller,简称为NIC),其可通过基站与其他网络设备相连从而可与互联网进行通讯。在一个实例中,传输装置106可以为射频(Radio Frequency,简称为RF)模块,其用于通过无线方式与互联网进行通讯。Transmission means 106 are used to receive or transmit data via a network. The specific example of the above-mentioned network may include a wireless network provided by the communication provider of the mobile terminal 10 . In one example, the
以下分别通过实施例1和2从编码器端和解码器端描述残差编码方案。The residual coding scheme is described below from the encoder side and the decoder side through Embodiments 1 and 2, respectively.
实施例1Example 1
在本实施例中提供了一种残差编码方法,图2是根据本发明实施例1的残差编码方法的流程图,如图2所示,该流程包括如下步骤:A residual coding method is provided in this embodiment. FIG. 2 is a flowchart of the residual coding method according to Embodiment 1 of the present invention. As shown in FIG. 2 , the process includes the following steps:
步骤S202,确定待编码块的参考块的残差(在本发明实施例中,这一术语也被称为残差、残差块、参考残差、参考残差块),其中,所述待编码块的所述参考块包括:所述待编码块在时域上的至少两个第一参考块;或,所述待编码块在空域上的至少两个第二参考块;或,所述待编码块在时域上的至少一个第一参考块以及所述待编码块在空域上的至少一个第二参考块;Step S202: Determine the residual of the reference block of the block to be coded (in this embodiment of the present invention, this term is also referred to as residual, residual block, reference residual, and reference residual block), wherein the to-be-coded block The reference blocks of the coding block include: at least two first reference blocks of the block to be coded in the time domain; or, at least two second reference blocks of the block to be coded in the spatial domain; or, the at least one first reference block of the block to be encoded in the time domain and at least one second reference block of the block to be encoded in the spatial domain;
步骤S204,基于所述待编码块的所述参考块的残差,对所述待编码块的残差进行预测,得到所述待编码块的预测残差;Step S204, predicting the residual of the to-be-coded block based on the residual of the reference block of the to-be-coded block to obtain the predicted residual of the to-be-coded block;
步骤S206,将所述待编码块的所述预测残差和所述待编码块的实际残差之间的残差差值编码进码流(例如,视频帧间编码码流)。Step S206: Encode the residual difference between the prediction residual of the block to be encoded and the actual residual of the block to be encoded into a code stream (eg, a video inter-coded code stream).
在步骤S202中所提及的参考块的残差,指的是在编码过程中按照传统方法得到参考块本身的实际编码残差,因为参考块已经完成编码,所以参考块的残差是可以通过技术手段可以获得的。The residual of the reference block mentioned in step S202 refers to obtaining the actual coding residual of the reference block itself according to the traditional method in the coding process. Because the coding of the reference block has been completed, the residual of the reference block can be obtained by technical means are available.
在步骤S206中所提及的所述待编码块的所述实际残差为所述待编码块的原始图像块的像素值与所述待编码块的预测块的像素值之间的差值,其中,所述待编码块的所述预测块是对所述待编码块的所述参考块进行运动补偿之后得到的块。The actual residual of the block to be encoded mentioned in step S206 is the difference between the pixel value of the original image block of the block to be encoded and the pixel value of the predicted block of the block to be encoded, The prediction block of the block to be encoded is a block obtained after motion compensation is performed on the reference block of the block to be encoded.
通过上述步骤,根据参考块的残差对待编码块的残差进行预测得到预测残差,并将预测残差和实际残差之间的残差差值编码进码流,因为编码器只需要传输当前待编码块的实际残差与预测残差之间的差值,而残差差值的大小远远低于实际残差,所以有效减少了编码残差所需的比特率,达到了节省码率的效果。Through the above steps, predict the residual of the block to be coded according to the residual of the reference block to obtain the predicted residual, and encode the residual difference between the predicted residual and the actual residual into the code stream, because the encoder only needs to transmit The difference between the actual residual and the predicted residual of the current block to be coded, and the residual difference is much smaller than the actual residual, so the bit rate required for the coding residual is effectively reduced, and the code saving is achieved. rate effect.
关于待编码块的参考块的选取,鉴于视频图像的连续性,选择合适的参考块能够对待编码块的残差进行准确的预测。Regarding the selection of the reference block of the block to be coded, in view of the continuity of the video image, selecting an appropriate reference block can accurately predict the residual of the block to be coded.
在至少一个示例性实施例中,在所述待编码块所在的图像帧为P帧的情况下,所述待编码块在所述时域上的第一参考块可以包括:所述待编码块在前向参考帧中的最优预测单元块PU,记为第一最优PU,和/或,所述待编码块在所述前向参考帧的前一帧中的最优PU,记为第二最优PU。In at least one exemplary embodiment, when the image frame where the block to be encoded is located is a P frame, the first reference block of the block to be encoded in the time domain may include: the block to be encoded The optimal prediction unit block PU in the forward reference frame is denoted as the first optimal PU, and/or the optimal PU of the to-be-coded block in the frame preceding the forward reference frame is denoted as The second best PU.
在所述待编码块所在的图像帧为B帧的情况下,所述待编码块在所述时域上的第一参考块包括:所述待编码块在前向参考帧中的最优PU,记为第三最优PU,和/或,所述待编码块在后向参考帧中的最优PU,记为第四最优PU。When the image frame where the block to be encoded is located is a B frame, the first reference block of the block to be encoded in the time domain includes: the optimal PU of the block to be encoded in the forward reference frame , denoted as the third optimal PU, and/or, the optimal PU of the block to be encoded in the backward reference frame, denoted as the fourth optimal PU.
在至少一个示例性实施例中,在所述待编码块所在的图像帧为P帧的情况下,所述待编码块在所述时域上的第一参考块可以通过以下方式确定:通过运动估计在所述前向参考帧中确定所述待编码块的所述第一最优PU,并确定所述待编码块相对于所述第一最优PU的运动矢量MV;根据所述第一最优PU的位置和所述MV,通过运动估计在所述前向参考帧的前一帧中确定所述第二最优PU。In at least one exemplary embodiment, when the image frame in which the block to be encoded is located is a P frame, the first reference block of the block to be encoded in the time domain may be determined in the following manner: through motion estimating to determine the first optimal PU of the block to be coded in the forward reference frame, and to determine the motion vector MV of the block to be coded relative to the first optimal PU; according to the first The position of the optimal PU and the MV, the second optimal PU is determined by motion estimation in the frame preceding the forward reference frame.
在至少一个示例性实施例中,所述待编码块在所述空域上的第二参考块位于所述待编码块所在的图像帧中,且与所述待编码块在所述空域上相邻。In at least one exemplary embodiment, the second reference block of the block to be encoded in the spatial domain is located in an image frame where the block to be encoded is located, and is adjacent to the block to be encoded in the spatial domain .
在至少一个示例性实施例中,所述待编码块在所述空域上的第二参考块包括:所述待编码块所在的图像帧中,与所述待编码块相邻的左边的块和/或上边的块(优选可以是具有相同尺寸的空域上相邻的左边和/或上边的块)。In at least one exemplary embodiment, the second reference block of the block to be encoded in the spatial domain includes: in the image frame where the block to be encoded is located, the left block adjacent to the block to be encoded and /or upper block (preferably may be adjacent left and/or upper blocks in the airspace with the same size).
本领域技术人员应当理解,在实际应用中,可以通过上述方式确定待编码块在时域上的第一参考块,和/或,待编码块在空域上的第二参考块。时域上的第一参考块所对应的残差可以称为时域参考残差块,空域上的第二参考块所对应的残差可以称为空域参考残差块,基于至少一个时域参考残差块和/或至少一个空域参考残差块,可以预测出待编码块的残差信息。Those skilled in the art should understand that, in practical applications, the first reference block of the block to be encoded in the time domain and/or the second reference block of the block to be encoded in the spatial domain may be determined in the above manner. The residual corresponding to the first reference block in the time domain may be referred to as a time domain reference residual block, and the residual corresponding to the second reference block in the spatial domain may be referred to as a spatial reference residual block, based on at least one time domain reference The residual block and/or at least one spatial reference residual block can predict residual information of the block to be coded.
一种较优的实施方式中,为了数据能够对称考虑,可以选取两个时域参考残差块和两个空域参考残差块,并基于这四个参考残差块进行残差预测。此时,所述待编码块的所述参考块包括:所述待编码块在所述时域上的对应的残差为非全零的两个第一参考块,和所述待编码块在所述空域上的对应的残差为非全零的两个第二参考块。In a preferred embodiment, for the sake of data symmetry, two temporal reference residual blocks and two spatial reference residual blocks may be selected, and residual prediction is performed based on these four reference residual blocks. At this time, the reference blocks of the to-be-coded block include: two first reference blocks whose corresponding residuals of the to-be-coded block in the time domain are not all zeros, and the to-be-coded block in the The corresponding residuals on the spatial domain are two second reference blocks that are not all zeros.
在另一种较优的实施方式中,在仅有一个时域参考残差块和一个空域参考残差块为非全零块的时候,可以选取一个时域和一个空域参考残差块,并基于这两个参考残差块进行残差预测。此时,所述待编码块的所述参考块包括:所述待编码块在所述时域上的对应的残差为非全零的一个第一参考块,和所述待编码块在所述空域上的对应的残差为非全零的一个第二参考块。In another preferred embodiment, when only one time-domain reference residual block and one spatial-domain reference residual block are non-all-zero blocks, one time-domain and one spatial-domain reference residual block may be selected, and Residual prediction is performed based on these two reference residual blocks. In this case, the reference block of the block to be coded includes: a first reference block whose residual error corresponding to the block to be coded in the time domain is not all zeros, and the block to be coded in the The corresponding residual on the space domain is a second reference block that is not all zero.
在另一种较优的实施方式中,在仅有两个时域参考残差块和一个空域参考残差块为非全零块的时候,可以选取两个时域和一个空域参考残差块,并基于这三个参考残差块进行残差预测。此时,所述待编码块的所述参考块包括:所述待编码块在所述时域上的对应的残差为非全零的两个第一参考块,和所述待编码块在所述空域上的对应的残差为非全零的一个第二参考块。In another preferred embodiment, when only two time-domain reference residual blocks and one spatial-domain reference residual block are non-all-zero blocks, two time-domain and one spatial-domain reference residual blocks may be selected , and perform residual prediction based on these three reference residual blocks. At this time, the reference blocks of the to-be-coded block include: two first reference blocks whose corresponding residuals of the to-be-coded block in the time domain are not all zeros, and the to-be-coded block in the The corresponding residual on the spatial domain is a second reference block that is not all zero.
在另一种较优的实施方式中,在仅有一个时域参考残差块和两个空域参考残差块为非全零块的时候,可以选取一个时域和两个空域参考残差块,并基于这三个参考残差块进行残差预测。此时,所述待编码块的所述参考块包括:所述待编码块在所述时域上的对应的残差为非全零的一个第一参考块,和所述待编码块在所述空域上的对应的残差为非全零的两个第二参考块。In another preferred embodiment, when only one time-domain reference residual block and two spatial-domain reference residual blocks are non-all-zero blocks, one time-domain and two spatial-domain reference residual blocks can be selected , and perform residual prediction based on these three reference residual blocks. In this case, the reference block of the block to be coded includes: a first reference block whose residual error corresponding to the block to be coded in the time domain is not all zeros, and the block to be coded in the The corresponding residuals on the above-mentioned spatial domain are two second reference blocks that are not all zeros.
在另一种较优的实施方式中,在仅有时域上两个时域参考残差块是非全零块的时候,可以选取两个时域参考残差块,并基于这两个时域参考残差块进行残差预测。此时,所述待编码块的所述参考块包括:所述待编码块在所述时域上的对应的残差为非全零的两个第一参考块。In another preferred embodiment, when only two time-domain reference residual blocks in the time domain are non-all-zero blocks, two time-domain reference residual blocks may be selected, and based on the two time-domain reference residual blocks The residual block performs residual prediction. At this time, the reference blocks of the to-be-coded block include: two first reference blocks whose corresponding residuals of the to-be-coded block in the time domain are not all zeros.
在另一种较优的实施方式中,在仅有空域上两个参考残差块是非全零块的时候,可以选取两个空域参考残差块,并基于这两个空域参考残差块进行残差预测。此时,所述待编码块的所述参考块包括:所述待编码块在所述空域上的对应的残差为非全零的两个第二参考块。In another preferred embodiment, when only the two reference residual blocks in the spatial domain are non-all-zero blocks, two spatial reference residual blocks can be selected, and based on the two spatial reference residual blocks Residual prediction. At this time, the reference blocks of the to-be-coded block include: two second reference blocks whose corresponding residuals of the to-be-coded block in the spatial domain are not all zeros.
基于参考块的残差对待编码块的残差进行预测的过程,可以采用多种预测方式来实现。在至少一个示例性实施例中,基于所述待编码块的所述参考块的残差,对所述待编码块的残差进行预测,得到所述待编码块的预测残差可以包括以下之一:The process of predicting the residual of the to-be-coded block based on the residual of the reference block can be implemented by adopting various prediction methods. In at least one exemplary embodiment, the residual of the block to be encoded is predicted based on the residual of the reference block of the block to be encoded, and obtaining the prediction residual of the block to be encoded may include the following: one:
(1)将所述参考块的所述残差输入残差预测模型得到所述待编码块的预测残差,其中,所述残差预测模型是可以是用深度学习网络训练的一个残差预测模型,也就是说,其是基于训练样本采用深度学习网络训练得到的,所述训练样本包括:具有已知残差的编码块的参考块的残差、以及所述具有已知残差的编码块的实际残差;(1) Input the residual of the reference block into a residual prediction model to obtain the prediction residual of the to-be-coded block, wherein the residual prediction model may be a residual prediction trained by a deep learning network A model, that is, it is obtained by training a deep learning network based on training samples, the training samples including: the residuals of the reference blocks of the coding blocks with known residuals, and the codings with known residuals the actual residual of the block;
(2)对所述参考块的所述残差进行线性加权,得到所述待编码块的预测残差,其中,所述线性加权包括单一权重的线性加权或多权重的线性加权。(2) Perform linear weighting on the residual of the reference block to obtain the prediction residual of the to-be-coded block, where the linear weighting includes linear weighting of a single weight or linear weighting of multiple weights.
例如单一权重的线性加权和可以采用以下公式计算:For example, the linear weighted sum of a single weight can be calculated using the following formula:
ReiPred(i,j)=W1ResiA(i,j)+W2ResiB(i,j)ReiPred(i,j) = W1ResiA(i,j) + W2ResiB(i,j)
W1和W2为权重,ResiA(i,j),ResiB(i,j)是选取的参考残差块在像素点(i,j)处的像素值,ReiPred(i,j)是预测残差块在像素点(i,j)处的像素值。W1 and W2 are weights, ResiA(i, j), ResiB(i, j) are the pixel values of the selected reference residual block at pixel point (i, j), ReiPred(i, j) is the prediction residual block The pixel value at pixel point (i, j).
例如多权重的线性加权和可以采用以下公式计算:For example, the linear weighted sum of multiple weights can be calculated using the following formula:
W1ij和W2ij是参考残差块每一个像素点对应的权重值,它们可以通过训练获得。ResiA(i,j),ResiB(i,j)是选取的参考残差块在像素点(i,j)处的像素值,ReiPred(i,j)是预测残差块在像素点(i,j)处的像素值。W1 ij and W2 ij are the weight values corresponding to each pixel of the reference residual block, which can be obtained through training. ResiA(i, j), ResiB(i, j) are the pixel values of the selected reference residual block at pixel point (i, j), ReiPred(i, j) is the prediction residual block at pixel point (i, j) the pixel value at j).
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本发明各个实施例所述的方法。From the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is better implementation. Based on this understanding, the technical solutions of the present invention can be embodied in the form of software products in essence or the parts that make contributions to the prior art, and the computer software products are stored in a storage medium (such as ROM/RAM, magnetic disk, CD-ROM), including several instructions to make a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present invention.
在本实施例中,对应于上述残差编码方法提供了一种残差编码装置,用于实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。In this embodiment, a residual coding apparatus is provided corresponding to the above residual coding method, which is used to implement the above embodiments and preferred implementations, and what has been described will not be repeated. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, implementations in hardware, or a combination of software and hardware, are also possible and contemplated.
图3是根据本发明实施例1的残差编码装置的结构框图,如图3所示,该装置包括:FIG. 3 is a structural block diagram of a residual coding apparatus according to Embodiment 1 of the present invention. As shown in FIG. 3 , the apparatus includes:
编码器端参考残差确定模块32,设置为确定待编码块的参考块的残差,其中,所述待编码块的所述参考块包括:所述待编码块在时域上的至少两个第一参考块;或,所述待编码块在空域上的至少两个第二参考块;或,所述待编码块在时域上的至少一个第一参考块以及所述待编码块在空域上的至少一个第二参考块;The encoder-side reference residual determination module 32 is configured to determine the residual of the reference block of the block to be encoded, wherein the reference block of the block to be encoded includes: at least two of the blocks to be encoded in the time domain the first reference block; or, at least two second reference blocks of the block to be coded in the spatial domain; or, at least one first reference block of the block to be coded in the time domain and the block to be coded in the spatial domain at least one second reference block on;
编码器端残差预测模块34,设置为基于所述待编码块的所述参考块的残差,对所述待编码块的残差进行预测,得到所述待编码块的预测残差;The encoder-side
残差编码模块36,设置为将所述待编码块的所述预测残差和所述待编码块的实际残差之间的残差差值编码进码流。The residual coding module 36 is configured to encode the residual difference value between the predicted residual of the to-be-coded block and the actual residual of the to-be-coded block into the code stream.
需要说明的是,上述各个模块是可以通过软件或硬件来实现的,对于后者,可以通过以下方式实现,但不限于此:上述模块均位于同一处理器中;或者,上述各个模块以任意组合的形式分别位于不同的处理器中。It should be noted that the above modules can be implemented by software or hardware, and the latter can be implemented in the following ways, but not limited to this: the above modules are all located in the same processor; or, the above modules can be combined in any combination The forms are located in different processors.
本实施例还提供了一种存储介质,该存储介质中存储有计算机程序,其中,该计算机程序被设置为运行时执行本实施例中以上残差编码方法中的步骤。This embodiment also provides a storage medium, where a computer program is stored in the storage medium, wherein the computer program is configured to execute the steps in the above residual coding method in this embodiment when running.
可选地,在本实施例中,上述存储介质可以被设置为存储用于执行以下步骤的计算机程序:Optionally, in this embodiment, the above-mentioned storage medium may be configured to store a computer program for executing the following steps:
S1,确定待编码块的参考块的残差(在本发明实施例中,这一术语也被称为残差、残差块、参考残差、参考残差块),其中,所述待编码块的所述参考块包括:所述待编码块在时域上的至少两个第一参考块;或,所述待编码块在空域上的至少两个第二参考块;或,所述待编码块在时域上的至少一个第一参考块以及所述待编码块在空域上的至少一个第二参考块;S1, determine the residual of the reference block of the block to be encoded (in this embodiment of the present invention, this term is also referred to as residual, residual block, reference residual, and reference residual block), wherein the to-be-encoded block The reference blocks of the block include: at least two first reference blocks in the time domain of the block to be coded; or, at least two second reference blocks in the spatial domain of the block to be coded; or, the to-be-coded block at least one first reference block of the coding block in the time domain and at least one second reference block of the block to be coded in the spatial domain;
S2,基于所述待编码块的所述参考块的残差,对所述待编码块的残差进行预测,得到所述待编码块的预测残差;S2, based on the residual of the reference block of the to-be-coded block, predict the residual of the to-be-coded block to obtain a prediction residual of the to-be-coded block;
S3,将所述待编码块的所述预测残差和所述待编码块的实际残差之间的残差差值编码进码流(例如,视频帧间编码码流)。S3: Encode the residual difference value between the prediction residual of the block to be encoded and the actual residual of the block to be encoded into a code stream (for example, a video inter-coded code stream).
可选地,在本实施例中,上述存储介质可以包括但不限于:U盘、只读存储器(Read-Only Memory,简称为ROM)、随机存取存储器(Random Access Memory,简称为RAM)、移动硬盘、磁碟或者光盘等各种可以存储计算机程序的介质。Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (Read-Only Memory, referred to as ROM), a random access memory (Random Access Memory, referred to as RAM), Various media that can store computer programs, such as removable hard disks, magnetic disks, or optical disks.
本发明的实施例还提供了一种电子装置,包括存储器和处理器,该存储器中存储有计算机程序,该处理器被设置为运行计算机程序以执行本实施例中上述残差编码方法的步骤。An embodiment of the present invention further provides an electronic device including a memory and a processor, where a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps of the above residual coding method in this embodiment.
可选地,上述电子装置还可以包括传输设备以及输入输出设备,其中,该传输设备和上述处理器连接,该输入输出设备和上述处理器连接。Optionally, the above-mentioned electronic device may further include a transmission device and an input-output device, wherein the transmission device is connected to the above-mentioned processor, and the input-output device is connected to the above-mentioned processor.
可选地,在本实施例中,上述处理器可以被设置为通过计算机程序执行以下步骤:Optionally, in this embodiment, the above-mentioned processor may be configured to execute the following steps through a computer program:
S1,确定待编码块的参考块的残差(在本发明实施例中,这一术语也被称为残差、残差块、参考残差、参考残差块),其中,所述待编码块的所述参考块包括:所述待编码块在时域上的至少两个第一参考块;或,所述待编码块在空域上的至少两个第二参考块;或,所述待编码块在时域上的至少一个第一参考块以及所述待编码块在空域上的至少一个第二参考块;S1, determine the residual of the reference block of the block to be encoded (in this embodiment of the present invention, this term is also referred to as residual, residual block, reference residual, and reference residual block), wherein the to-be-encoded block The reference blocks of the block include: at least two first reference blocks in the time domain of the block to be coded; or at least two second reference blocks in the spatial domain of the block to be coded; or, the to-be-coded block at least one first reference block of the coding block in the time domain and at least one second reference block of the block to be coded in the spatial domain;
S2,基于所述待编码块的所述参考块的残差,对所述待编码块的残差进行预测,得到所述待编码块的预测残差;S2, based on the residual of the reference block of the to-be-coded block, predict the residual of the to-be-coded block to obtain a prediction residual of the to-be-coded block;
S3,将所述待编码块的所述预测残差和所述待编码块的实际残差之间的残差差值编码进码流(例如,视频帧间编码码流)。S3: Encode the residual difference value between the prediction residual of the block to be encoded and the actual residual of the block to be encoded into a code stream (for example, a video inter-coded code stream).
可选地,本实施例中的具体示例可以参考上述实施例及可选实施方式中所描述的示例,本实施例在此不再赘述。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 described herein again in this embodiment.
实施例2Example 2
在本实施例中提供了一种残差解码方法,图4是根据本发明实施例2的残差解码方法的流程图,如图4所示,该流程包括如下步骤:A residual decoding method is provided in this embodiment. FIG. 4 is a flowchart of the residual decoding method according to Embodiment 2 of the present invention. As shown in FIG. 4 , the process includes the following steps:
步骤S402,基于码流(例如,视频帧间编码码流)中的运动矢量MV确定待解码块的预测块,并获取所述待解码块的参考块的残差(在本发明实施例中,这一术语也被称为残差、残差块、参考残差、参考残差块),其中,所述待解码块的所述参考块包括:所述待解码块在时域上的至少两个第一参考块;或,所述待解码块在空域上的至少两个第二参考块;或,所述待解码块在时域上的至少一个第一参考块以及所述待解码块在空域上的至少一个第二参考块;Step S402: Determine the prediction block of the block to be decoded based on the motion vector MV in the code stream (for example, the video inter-coded code stream), and obtain the residual of the reference block of the block to be decoded (in this embodiment of the present invention, This term is also referred to as residual, residual block, reference residual, reference residual block), wherein the reference block of the block to be decoded includes: at least two of the block to be decoded in the time domain or, at least two second reference blocks in the spatial domain of the block to be decoded; or, at least one first reference block in the time domain of the block to be decoded and the block to be decoded in the at least one second reference block over the airspace;
步骤S404,基于所述待解码块的所述参考块的残差,对所述待解码块的残差进行预测,得到所述待解码块的预测残差;Step S404, predicting the residual of the to-be-decoded block based on the residual of the reference block of the to-be-decoded block to obtain the predicted residual of the to-be-decoded block;
步骤S406,根据所述待解码块的预测残差和从所述码流中解析出的所述待解码块的预测残差和所述待解码块的实际残差之间的残差差值,确定所述待解码块的实际残差。Step S406, according to the prediction residual of the to-be-decoded block and the residual difference value between the predicted residual of the to-be-decoded block parsed from the code stream and the actual residual of the to-be-decoded block, The actual residual of the block to be decoded is determined.
在步骤S402中所提及的参考块的残差,指的是在编码过程中按照传统方法得到的参考块本身的实际编码残差,因为参考块已经完成编码,所以参考块的残差是可以通过技术手段可以获得的。The residual of the reference block mentioned in step S402 refers to the actual coding residual of the reference block itself obtained according to the traditional method in the coding process. Because the coding of the reference block has been completed, the residual of the reference block can be available through technical means.
在步骤S402中,所述待解码块的所述预测块是对所述待解码块进行运动补偿之后得到的块。In step S402, the prediction block of the block to be decoded is a block obtained after motion compensation is performed on the block to be decoded.
在步骤S406中所提及的所述待解码块的所述实际残差为所述待解码块的原始图像块的像素值与所述待解码块的预测块的像素值之间的差值。The actual residual of the block to be decoded mentioned in step S406 is the difference between the pixel value of the original image block of the block to be decoded and the pixel value of the prediction block of the block to be decoded.
通过上述步骤,由于在解码器端布局有编码器端相同的残差预测过程,解码器端基于待解码块的参考块的残差预测待解码块的残差,并根据预测残差和码流中携带的残差差值确定待解码块的实际残差,能够保证在解码器端,基于节省码率的码流仍然能够正确恢复得到待解码块的实际残差。Through the above steps, since the same residual prediction process of the encoder is arranged at the decoder, the decoder predicts the residual of the block to be decoded based on the residual of the reference block of the block to be decoded, and predicts the residual of the block to be decoded based on the residual of the reference block of the block to be decoded. The residual difference value carried in determines the actual residual error of the block to be decoded, which can ensure that the actual residual error of the block to be decoded can still be correctly recovered based on the rate-saving code stream at the decoder side.
在至少一个示例性实施例中,在所述待解码块所在的图像帧为P帧的情况下,所述待解码块在所述时域上的第一参考块包括:所述待解码块在前向参考帧中的最优预测单元块PU,记为第一最优PU,和/或,所述待解码块在所述前向参考帧的前一帧中的最优PU,记为第二最优PU。In at least one exemplary embodiment, when the image frame in which the block to be decoded is located is a P frame, the first reference block of the block to be decoded in the time domain includes: the block to be decoded is in the The optimal prediction unit block PU in the forward reference frame is denoted as the first optimal PU, and/or the optimal PU of the block to be decoded in the frame before the forward reference frame is denoted as the first optimal PU The second optimal PU.
在至少一个示例性实施例中,在所述待解码块所在的图像帧为B帧的情况下,所述待解码块在所述时域上的第一参考块包括:所述待解码块在前向参考帧中的最优PU,记为第三最优PU,和/或,所述待解码块在后向参考帧中的最优PU,记为第四最优PU。In at least one exemplary embodiment, when the image frame where the block to be decoded is located is a B frame, the first reference block of the block to be decoded in the time domain includes: the block to be decoded is in the The optimal PU in the forward reference frame is recorded as the third optimal PU, and/or the optimal PU of the block to be decoded in the backward reference frame is recorded as the fourth optimal PU.
需要说明的是,为了保证残差预测的准确性,在解码器端采用和编码器端相同的参考块选取方式,以保证和编码器端通过残差预测所得到的预测残差相一致。It should be noted that, in order to ensure the accuracy of residual prediction, the decoder side adopts the same reference block selection method as the encoder side, so as to ensure the consistency with the prediction residual obtained by the encoder side through residual prediction.
在至少一个示例性实施例中,在所述待解码块所在的图像帧为P帧的情况下,所述待解码块在所述时域上的第一参考块通过以下方式确定:根据所述码流中解析出来的所述MV,确定所述待解码块在所述前向参考帧中的所述第一最优PU;根据所述第一最优PU在所述前向参考帧的前一帧中的同位PU,通过运动估计在所述前向参考帧的前一帧中确定所述第二最优PU。In at least one exemplary embodiment, when the image frame where the block to be decoded is located is a P frame, the first reference block of the block to be decoded in the time domain is determined in the following manner: according to the The MV parsed from the code stream determines the first optimal PU of the block to be decoded in the forward reference frame; according to the first optimal PU in the forward reference frame For co-located PUs in a frame, the second optimal PU is determined in a frame preceding the forward reference frame by motion estimation.
在至少一个示例性实施例中,所述待解码块在所述空域上的第二参考块位于所述待解码块所在的图像帧中,且与所述待解码块在所述空域上相邻。In at least one exemplary embodiment, the second reference block of the block to be decoded in the spatial domain is located in an image frame where the block to be decoded is located, and is adjacent to the block to be decoded in the spatial domain .
在至少一个示例性实施例中,所述待解码块在所述空域上的第二参考块包括:所述待解码块所在的图像帧中,与所述待解码块相邻的左边的块和/或上边的块(优选可以是具有相同尺寸的空域上相邻的左边和/或上边的块)。In at least one exemplary embodiment, the second reference block of the block to be decoded in the spatial domain includes: in the image frame where the block to be decoded is located, the left block adjacent to the block to be decoded and /or upper block (preferably may be adjacent left and/or upper blocks in the airspace with the same size).
本领域技术人员应当理解,在实际应用中,可以通过上述方式确定待解码块在时域上的第一参考块,和/或,待解码块在空域上的第二参考块。时域上的第一参考块所对应的残差可以称为时域参考残差块,空域上的第二参考块所对应的残差可以称为空域参考残差块,基于至少一个时域参考残差块和/或至少一个空域参考残差块,可以预测出待解码块的残差信息。Those skilled in the art should understand that, in practical applications, the first reference block of the block to be decoded in the time domain and/or the second reference block of the block to be decoded in the spatial domain may be determined in the above manner. The residual corresponding to the first reference block in the time domain may be referred to as a time domain reference residual block, and the residual corresponding to the second reference block in the spatial domain may be referred to as a spatial reference residual block, based on at least one time domain reference The residual block and/or at least one spatial reference residual block can predict residual information of the block to be decoded.
一种较优的实施方式中,为了数据能够对称考虑,可以选取两个时域参考残差块和两个空域参考残差块,并基于这四个参考残差块进行残差预测,此时,所述待解码块的所述参考块包括:所述待解码块在所述时域上的对应的残差为非全零的两个第一参考块,和所述待解码块在所述空域上的对应的残差为非全零的两个第二参考块。In a preferred embodiment, for the sake of data symmetry, two time-domain reference residual blocks and two spatial-domain reference residual blocks can be selected, and residual prediction is performed based on these four reference residual blocks. , the reference blocks of the to-be-decoded block include: two first reference blocks whose corresponding residuals of the to-be-decoded block in the time domain are not all zeros, and the to-be-decoded block in the The corresponding residuals in the spatial domain are two second reference blocks that are not all zeros.
在另一种较优的实施方式中,在仅有一个时域参考残差块和一个空域参考残差块为非全零块的时候,可以选取一个时域和一个空域参考残差块,并基于这两个参考残差块进行残差预测。此时,所述待解码块的所述参考块包括:所述待解码块在所述时域上的对应的残差为非全零的一个第一参考块,和所述待解码块在所述空域上的对应的残差为非全零的一个第二参考块。In another preferred embodiment, when only one time-domain reference residual block and one spatial-domain reference residual block are non-all-zero blocks, one time-domain and one spatial-domain reference residual block may be selected, and Residual prediction is performed based on these two reference residual blocks. At this time, the reference block of the block to be decoded includes: a first reference block in which the corresponding residual of the block to be decoded in the time domain is not all zeros, and the block to be decoded in the The corresponding residual on the above-mentioned spatial domain is a second reference block that is not all zero.
在另一种较优的实施方式中,在仅有两个时域参考残差块和一个空域参考残差块为非全零块的时候,可以选取两个时域和一个空域参考残差块,并基于这三个参考残差块进行残差预测。此时,所述待解码块的所述参考块包括:所述待解码块在所述时域上的对应的残差为非全零的两个第一参考块,和所述待解码块在所述空域上的对应的残差为非全零的一个第二参考块。In another preferred embodiment, when only two time-domain reference residual blocks and one spatial-domain reference residual block are non-all-zero blocks, two time-domain and one spatial-domain reference residual blocks may be selected , and perform residual prediction based on these three reference residual blocks. At this time, the reference blocks of the to-be-decoded block include: two first reference blocks whose corresponding residuals of the to-be-decoded block in the time domain are not all zeros, and the to-be-decoded block in the The corresponding residual on the spatial domain is a second reference block that is not all zero.
在另一种较优的实施方式中,在仅有一个时域参考残差块和两个空域参考残差块为非全零块的时候,可以选取一个时域和两个空域参考残差块,并基于这三个参考残差块进行残差预测。此时,所述待解码块的所述参考块包括:所述待解码块在所述时域上的对应的残差为非全零的一个第一参考块,和所述待解码块在所述空域上的对应的残差为非全零的两个第二参考块。In another preferred embodiment, when only one time-domain reference residual block and two spatial-domain reference residual blocks are non-all-zero blocks, one time-domain and two spatial-domain reference residual blocks can be selected , and perform residual prediction based on these three reference residual blocks. At this time, the reference block of the block to be decoded includes: a first reference block in which the corresponding residual error of the block to be decoded in the time domain is not all zeros, and the block to be decoded in the The corresponding residuals on the above-mentioned spatial domain are two second reference blocks that are not all zeros.
在另一种较优的实施方式中,在仅有时域上两个时域参考残差块是非全零块的时候,可以选取两个时域参考残差块,并基于这两个时域参考残差块进行残差预测。此时,所述待解码块的所述参考块包括:所述待解码块在所述时域上的对应的残差为非全零的两个第一参考块。In another preferred embodiment, when only two time-domain reference residual blocks in the time domain are non-all-zero blocks, two time-domain reference residual blocks may be selected, and based on the two time-domain reference residual blocks The residual block performs residual prediction. At this time, the reference blocks of the block to be decoded include: two first reference blocks whose corresponding residuals of the block to be decoded in the time domain are not all zeros.
在另一种较优的实施方式中,在仅有空域上两个参考残差块是非全零块的时候,可以选取两个空域参考残差块,并基于这两个空域参考残差块进行残差预测。此时,所述待解码块的所述参考块包括:所述待解码块在所述空域上的对应的残差为非全零的两个第二参考块。In another preferred embodiment, when only the two reference residual blocks in the spatial domain are non-all-zero blocks, two spatial reference residual blocks can be selected, and based on the two spatial reference residual blocks Residual prediction. At this time, the reference blocks of the block to be decoded include: two second reference blocks whose corresponding residuals of the block to be decoded in the spatial domain are not all zeros.
基于参考块的残差对待解码块的残差进行预测的过程,可以采用多种预测方式来实现。在至少一个示例性实施例中,基于所述待解码块的所述参考块的残差,对所述待解码块的残差进行预测,得到所述待解码块的预测残差可以包括以下之一:The process of predicting the residual of the block to be decoded based on the residual of the reference block can be implemented by using various prediction methods. In at least one exemplary embodiment, the residual of the block to be decoded is predicted based on the residual of the reference block of the block to be decoded, and obtaining the prediction residual of the block to be decoded may include the following: one:
(1)将所述参考块的所述残差输入残差预测模型得到所述待解码块的预测残差,其中,所述残差预测模型与编码器端的残差预测模型相同;(1) Inputting the residual of the reference block into a residual prediction model to obtain the prediction residual of the block to be decoded, wherein the residual prediction model is the same as the residual prediction model at the encoder end;
(2)对所述参考块的所述残差进行线性加权,得到所述待解码块的预测残差,其中,所述线性加权与编码器端的线性加权相同。(2) Perform linear weighting on the residual of the reference block to obtain the prediction residual of the block to be decoded, wherein the linear weighting is the same as the linear weighting at the encoder side.
例如单一权重的线性加权和可以采用以下公式计算:For example, the linear weighted sum of a single weight can be calculated using the following formula:
ReiPred(i,j)=W1ResiA(i,j)+W2ResiB(i,j)ReiPred(i,j) = W1ResiA(i,j) + W2ResiB(i,j)
W1和W2为权重,ResiA(i,j),ResiB(i,j)是选取的参考残差块在像素点(i,j)处的像素值,ReiPred(i,j)是预测残差块在像素点(i,j)处的像素值。W1 and W2 are weights, ResiA(i, j), ResiB(i, j) are the pixel values of the selected reference residual block at pixel point (i, j), ReiPred(i, j) is the prediction residual block The pixel value at pixel point (i, j).
例如多权重的线性加权和可以采用以下公式计算:For example, the linear weighted sum of multiple weights can be calculated using the following formula:
W1ij和W2ij是参考残差块每一个像素点对应的权重值,它们可以通过训练获得。ResiA(i,j),ResiB(i,j)是选取的参考残差块在像素点(i,j)处的像素值,ReiPred(i,j)是预测残差块在像素点(i,j)处的像素值。W1 ij and W2 ij are the weight values corresponding to each pixel of the reference residual block, which can be obtained through training. ResiA(i, j), ResiB(i, j) are the pixel values of the selected reference residual block at pixel point (i, j), ReiPred(i, j) is the prediction residual block at pixel point (i, j) the pixel value at j).
在至少一个示例性实施例中,在所述待解码块的预测残差和从所述码流中解析出的所述待解码块的预测残差和所述待解码块的实际残差之间的残差差值,确定所述待解码块的实际残差之后,还包括:在所述待解码块的所述预测块的基础上加上所述实际残差,恢复出所述待解码块的原始图像块。In at least one exemplary embodiment, between the prediction residual of the block to be decoded and the prediction residual of the block to be decoded parsed from the code stream and the actual residual of the block to be decoded After determining the actual residual difference of the block to be decoded, the method further includes: adding the actual residual difference on the basis of the predicted block of the block to be decoded, and recovering the block to be decoded the original image block.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本发明各个实施例所述的方法。From the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is better implementation. Based on this understanding, the technical solutions of the present invention can be embodied in the form of software products in essence or the parts that make contributions to the prior art, and the computer software products are stored in a storage medium (such as ROM/RAM, magnetic disk, CD-ROM), including several instructions to make a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present invention.
在本实施例中,对应于上述残差解码方法提供了一种残差解码装置,用于实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。In this embodiment, a residual decoding apparatus is provided corresponding to the above residual decoding method, which is used to implement the above embodiments and preferred implementations, and what has been described will not be repeated. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the apparatus described in the following embodiments is preferably implemented in software, implementations in hardware, or a combination of software and hardware, are also possible and contemplated.
图5是根据本发明实施例2的残差解码装置的结构框图,如图5所示,该装置包括:FIG. 5 is a structural block diagram of a residual decoding apparatus according to Embodiment 2 of the present invention. As shown in FIG. 5 , the apparatus includes:
解码器端参考残差确定模块52,设置为基于码流中解析出来的运动矢量MV确定待解码块的预测块,并获取所述待解码块的参考块的残差,其中,所述待解码块的所述参考块包括:所述待解码块在时域上的至少两个第一参考块;或,所述待解码块在空域上的至少两个第二参考块;或,所述待解码块在时域上的至少一个第一参考块以及所述待解码块在空域上的至少一个第二参考块;The decoder side refers to the residual error determination module 52, and is set to determine the prediction block of the block to be decoded based on the motion vector MV parsed in the code stream, and obtain the residual of the reference block of the block to be decoded, wherein the to-be-decoded block The reference blocks of the block include: at least two first reference blocks in the time domain of the block to be decoded; or at least two second reference blocks in the spatial domain of the block to be decoded; or, the to-be-decoded block at least one first reference block in the time domain of the decoding block and at least one second reference block in the spatial domain of the block to be decoded;
解码器端残差预测模块54,设置为基于所述待解码块的所述参考块的残差,对所述待解码块的残差进行预测,得到所述待解码块的预测残差;The decoder-side
残差解码模块56,设置为根据所述待解码块的预测残差和从所述码流中解析出的所述待解码块的预测残差和所述待解码块的实际残差之间的残差差值,确定所述待解码块的实际残差。The residual decoding module 56 is set to be based on the prediction residual of the to-be-decoded block and the prediction residual of the to-be-decoded block parsed from the code stream and the actual residual of the to-be-decoded block. The residual difference value determines the actual residual of the block to be decoded.
需要说明的是,上述各个模块是可以通过软件或硬件来实现的,对于后者,可以通过以下方式实现,但不限于此:上述模块均位于同一处理器中;或者,上述各个模块以任意组合的形式分别位于不同的处理器中。It should be noted that the above modules can be implemented by software or hardware, and the latter can be implemented in the following ways, but not limited to this: the above modules are all located in the same processor; or, the above modules can be combined in any combination The forms are located in different processors.
本实施例还提供了一种存储介质,该存储介质中存储有计算机程序,其中,该计算机程序被设置为运行时执行本实施例中上述残差解码方法中的步骤。This embodiment also provides a storage medium, where a computer program is stored in the storage medium, wherein the computer program is configured to execute the steps in the above residual decoding method in this embodiment when running.
可选地,在本实施例中,上述存储介质可以被设置为存储用于执行以下步骤的计算机程序:Optionally, in this embodiment, the above-mentioned storage medium may be configured to store a computer program for executing the following steps:
S1,基于码流(例如,视频帧间编码码流)中的运动矢量MV确定待解码块的预测块,并获取所述待解码块的参考块的残差(在本发明实施例中,这一术语也被称为残差、残差块、参考残差、参考残差块),其中,所述待解码块的所述参考块包括:所述待解码块在时域上的至少两个第一参考块;或,所述待解码块在空域上的至少两个第二参考块;或,所述待解码块在时域上的至少一个第一参考块以及所述待解码块在空域上的至少一个第二参考块;S1, determine the prediction block of the block to be decoded based on the motion vector MV in the code stream (for example, the video inter-coded code stream), and obtain the residual of the reference block of the block to be decoded (in this embodiment of the present invention, this A term also referred to as residual, residual block, reference residual, reference residual block), wherein the reference block of the block to be decoded includes: at least two of the blocks to be decoded in the time domain the first reference block; or, at least two second reference blocks in the spatial domain of the block to be decoded; or, at least one first reference block in the time domain of the block to be decoded and the block to be decoded in the spatial domain at least one second reference block on;
S2,基于所述待解码块的所述参考块的残差,对所述待解码块的残差进行预测,得到所述待解码块的预测残差;S2, based on the residual of the reference block of the to-be-decoded block, predict the residual of the to-be-decoded block to obtain the predicted residual of the to-be-decoded block;
S3,根据所述待解码块的预测残差和从所述码流中解析出的所述待解码块的预测残差和所述待解码块的实际残差之间的残差差值,确定所述待解码块的实际残差。S3, according to the prediction residual of the to-be-decoded block and the residual difference value between the prediction residual of the to-be-decoded block parsed from the code stream and the actual residual of the to-be-decoded block, determine The actual residual of the block to be decoded.
可选地,在本实施例中,上述存储介质可以包括但不限于:U盘、只读存储器(Read-Only Memory,简称为ROM)、随机存取存储器(Random Access Memory,简称为RAM)、移动硬盘、磁碟或者光盘等各种可以存储计算机程序的介质。Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (Read-Only Memory, referred to as ROM), a random access memory (Random Access Memory, referred to as RAM), Various media that can store computer programs, such as removable hard disks, magnetic disks, or optical disks.
本实施例还提供了一种电子装置,包括存储器和处理器,该存储器中存储有计算机程序,该处理器被设置为运行计算机程序以执行本实施例中上述残差解码方法的步骤。This embodiment also provides an electronic device, including a memory and a processor, where a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps of the above residual decoding method in this embodiment.
可选地,上述电子装置还可以包括传输设备以及输入输出设备,其中,该传输设备和上述处理器连接,该输入输出设备和上述处理器连接。Optionally, the above-mentioned electronic device may further include a transmission device and an input-output device, wherein the transmission device is connected to the above-mentioned processor, and the input-output device is connected to the above-mentioned processor.
可选地,在本实施例中,上述处理器可以被设置为通过计算机程序执行以下步骤:Optionally, in this embodiment, the above-mentioned processor may be configured to execute the following steps through a computer program:
S1,基于码流(例如,视频帧间编码码流)中的运动矢量MV确定待解码块的预测块,并获取所述待解码块的参考块的残差(在本发明实施例中,这一术语也被称为残差、残差块、参考残差、参考残差块),其中,所述待解码块的所述参考块包括:所述待解码块在时域上的至少两个第一参考块;或,所述待解码块在空域上的至少两个第二参考块;或,所述待解码块在时域上的至少一个第一参考块以及所述待解码块在空域上的至少一个第二参考块;S1, determine the prediction block of the block to be decoded based on the motion vector MV in the code stream (for example, the video inter-coded code stream), and obtain the residual of the reference block of the block to be decoded (in this embodiment of the present invention, this A term also referred to as residual, residual block, reference residual, reference residual block), wherein the reference block of the block to be decoded includes: at least two of the blocks to be decoded in the time domain the first reference block; or, at least two second reference blocks in the spatial domain of the block to be decoded; or, at least one first reference block in the time domain of the block to be decoded and the block to be decoded in the spatial domain at least one second reference block on;
S2,基于所述待解码块的所述参考块的残差,对所述待解码块的残差进行预测,得到所述待解码块的预测残差;S2, based on the residual of the reference block of the to-be-decoded block, predict the residual of the to-be-decoded block to obtain the predicted residual of the to-be-decoded block;
S3,根据所述待解码块的预测残差和从所述码流中解析出的所述待解码块的预测残差和所述待解码块的实际残差之间的残差差值,确定所述待解码块的实际残差。S3, according to the prediction residual of the to-be-decoded block and the residual difference value between the prediction residual of the to-be-decoded block parsed from the code stream and the actual residual of the to-be-decoded block, determine The actual residual of the block to be decoded.
可选地,本实施例中的具体示例可以参考上述实施例及可选实施方式中所描述的示例,本实施例在此不再赘述。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 described herein again in this embodiment.
以下实施例3以通过深度学习网络训练残差预测模型(也可以称为残差预测模块)为例,详细描述了残差编解码方案的具体实施方式。需要说明的是,针对采用线性加权和的方式来进行残差预测的方案,整体残差编解码的原理与以下实施例相类似,不再赘述。The following embodiment 3 takes the training of a residual prediction model (also referred to as a residual prediction module) by using a deep learning network as an example, and describes the specific implementation of the residual encoding and decoding scheme in detail. It should be noted that, for the scheme of using the linear weighted sum to perform residual prediction, the principle of the overall residual encoding and decoding is similar to the following embodiments, and will not be repeated here.
实施例3Example 3
本实施例针对视频编码的编码单元设计一种利用时空相关性提升视频帧间编码性能的方法,在实际使用中,编码器将调用该方法来完成帧间预测。以下对该方法中所涉及的内容进行详细的描述。In this embodiment, a method for improving the performance of video inter-frame coding by utilizing the spatiotemporal correlation is designed for the coding unit of video coding. In actual use, the encoder will call this method to complete the inter-frame prediction. The content involved in the method will be described in detail below.
(1)残差预测模块(1) Residual prediction module
残差预测模块可以通过卷积神经网络生成。图6是根据本发明实施例3的一个用于生成残差预测模块的卷积神经网络的示意图,如图6所示,该卷积神经网络以当前编码块相关的两个时域参考残差块和两个空域参考残差块作为输入(也可以是其他数量的时域和空域参考残差块,还可以只有时域参考残差块或只有空域参考残差块),经过卷积、池化提取残差图像的特征信息,再通过反卷积过程输出预测残差。The residual prediction module can be generated by a convolutional neural network. FIG. 6 is a schematic diagram of a convolutional neural network for generating a residual prediction module according to Embodiment 3 of the present invention. As shown in FIG. 6 , the convolutional neural network uses two time-domain reference residuals related to the current coding block block and two spatial reference residual blocks as input (it can also be other numbers of temporal and spatial reference residual blocks, or only temporal reference residual blocks or only spatial reference residual blocks), after convolution, pooling Extract the feature information of the residual image, and then output the prediction residual through the deconvolution process.
卷积神经网络的输入是四个参考残差块,时域参考帧中选取两个,相邻空域中选取两个。The input of the convolutional neural network is four reference residual blocks, two from the temporal reference frame and two from the adjacent spatial domain.
在时域上,根据P帧和B帧的预测方式的不同进行不同的操作。图7是根据本发明实施例3的P帧和B帧情况下时域参考残差块的选取示意图,如图7所示:In the time domain, different operations are performed according to the different prediction modes of the P frame and the B frame. 7 is a schematic diagram of selection of a time domain reference residual block in the case of a P frame and a B frame according to Embodiment 3 of the present invention, as shown in FIG. 7 :
对于P帧,由于它是单向预测,只有一个前向参考帧,首先通过运动估计在前向参考帧中找到最优的预测单元块(Prediction Unit,PU),生成当前编码块的运动矢量(motion vector,MV)。然后,基于当前编码块的最优参考PU的位置和当前编码块的MV,从前向参考帧的前一帧中通过运动估计又搜索到另一个最优参考PU,将这两个最优参考PU所对应的残差块作为P帧的两个时域参考残差块输入。For the P frame, since it is unidirectional prediction, there is only one forward reference frame. First, the optimal prediction unit block (PU) is found in the forward reference frame through motion estimation, and the motion vector of the current coding block is generated ( motion vector, MV). Then, based on the position of the optimal reference PU of the current coding block and the MV of the current coding block, another optimal reference PU is searched from the previous frame of the forward reference frame through motion estimation, and the two optimal reference PUs are The corresponding residual blocks are input as two temporal reference residual blocks of the P frame.
对于B帧,有一个前向参考帧和后向参考帧,在前向参考帧和后向参考帧通过运动估计各找到一个最优PU的残差块作为时域参考残差块输入。For the B frame, there is a forward reference frame and a backward reference frame. In the forward reference frame and the backward reference frame, an optimal PU residual block is found through motion estimation as the input of the temporal reference residual block.
在空域上,图8是根据本发明实施例3的空域参考残差块的选取示意图。如图8所示,选取与当前块相邻并同尺寸的左边、上边的块作为参考块,将参考块对应的残差块作为空域参考残差块的输入。In the spatial domain, FIG. 8 is a schematic diagram of selection of a spatial reference residual block according to Embodiment 3 of the present invention. As shown in FIG. 8 , the left and upper blocks adjacent to the current block and of the same size are selected as reference blocks, and the residual block corresponding to the reference block is used as the input of the spatial reference residual block.
残差预测模块的输出为当前块的预测残差块,在编码器端,预测残差块可以与实际残差块相减得到编码残差。在解码器端,预测残差块加上编码残差可以恢复出实际残差块。The output of the residual prediction module is the prediction residual block of the current block. On the encoder side, the prediction residual block can be subtracted from the actual residual block to obtain the coding residual. At the decoder side, the prediction residual block plus the coded residual can recover the actual residual block.
(2)基于时空相关性的帧间编码块残差预测方法(2) Inter-coding block residual prediction method based on spatiotemporal correlation
图9是本发明实施例3的一种利用时空相关性提升视频帧间编码性能的方法程示意图,在该图中,以残差预测模块通过神经网络实现为例,示出了编码器端和解码器端的的残差编码和解码操作,以下分别进行详细的描述。9 is a schematic diagram of a method for improving the performance of video inter-frame coding by utilizing spatiotemporal correlation according to Embodiment 3 of the present invention. The residual encoding and decoding operations at the decoder side are described in detail below.
编码器端的操作:Operation on the encoder side:
第一步,预编码通测标准提供的视频序列,提取四个参考块的残差数据和当前块的残差数据作为训练数据。用图6搭建的深度神经网络实施例进行网络训练,然后将训练好的深度神经网络嵌入编码器的帧间预测中。The first step is to pre-encode the video sequence provided by the standard, and extract the residual data of the four reference blocks and the residual data of the current block as training data. Use the deep neural network embodiment constructed in FIG. 6 to perform network training, and then embed the trained deep neural network into the inter-frame prediction of the encoder.
第二步,从输入的视频图像中读取需要编码的待编码块,通过运动估计预测得到待编码块的预测块,用原始图像像素值减去预测块像素值得到传统残差块。The second step is to read the to-be-coded block to be coded from the input video image, obtain the predicted block of the to-be-coded block through motion estimation prediction, and subtract the pixel value of the predicted block from the original image pixel value to obtain the traditional residual block.
第三步,根据P帧和B帧预测方式的不同,通过运动估计得到的运动矢量MV搜索到如图7所示的两个时域参考残差块,然后根据图8得到两个空域参考残差块,将得到的四个参考残差块输入残差预测模块中得到预测残差块。In the third step, according to the different prediction methods of the P frame and the B frame, the motion vector MV obtained by motion estimation is used to search for the two temporal reference residual blocks shown in Figure 7, and then two spatial reference residual blocks are obtained according to Figure 8. Difference block, input the obtained four reference residual blocks into the residual prediction module to obtain the prediction residual block.
第四步,将传统残差块和预测残差块之间的差值作为当前待编码块的编码残差,写入码流文件中。在本步骤中,传统残差块为当前编码块按传统帧间预测方法得到的待编码残差值,预测残差为通过残差预测模块预测得到的残差值。In the fourth step, the difference between the traditional residual block and the prediction residual block is used as the encoding residual of the current block to be encoded, and is written into the code stream file. In this step, the traditional residual block is the residual value to be coded obtained by the current coding block according to the traditional inter-frame prediction method, and the predicted residual is the residual value predicted by the residual prediction module.
综上,可以看到,在编码器端,利用运动估计在参考帧中找到参考块,进行运动补偿操作之后,得到了预测块,原始块与预测块的差值即为传统帧间预测模式下的实际残差块。在这一过程中建立残差预测模块来预测当前块的残差。残差预测模块的输入为当前编码块的参考块所对应的时域和空域上各两个参考残差块,残差预测模块的输出则为当前块的预测残差,实际残差块与预测残差块的差值作为编码残差,进行后续的变换、量化和熵编码。In summary, it can be seen that on the encoder side, motion estimation is used to find the reference block in the reference frame, and after the motion compensation operation, the predicted block is obtained, and the difference between the original block and the predicted block is the traditional inter prediction mode. the actual residual block. In this process, a residual prediction module is established to predict the residual of the current block. The input of the residual prediction module is two reference residual blocks in the time domain and the spatial domain corresponding to the reference block of the current coding block, and the output of the residual prediction module is the prediction residual of the current block. The actual residual block and the prediction The difference value of the residual block is used as the coding residual for subsequent transformation, quantization and entropy coding.
解码器端的操作:Operation on the decoder side:
第一步,将残差预测模块嵌入解码器帧间预测中。In the first step, the residual prediction module is embedded in the decoder inter prediction.
第二步,通过码流解析出来的运动矢量MV得到当前待解码块的预测块,然后找到如图7所示的两个时域参考残差块,以及得到如图8所示的两个空域参考残差块,将得到的四个参考残差块输入残差预测模块中得到预测残差块。在本步骤中,对应当前块的四个参考残差块的产生方式与编码器端的四个参考残差块一致。In the second step, the prediction block of the current block to be decoded is obtained through the motion vector MV parsed by the code stream, and then the two temporal reference residual blocks shown in Figure 7 are found, and the two spatial domains shown in Figure 8 are obtained. Referring to the residual block, input the obtained four reference residual blocks into the residual prediction module to obtain the prediction residual block. In this step, the four reference residual blocks corresponding to the current block are generated in the same manner as the four reference residual blocks on the encoder side.
第三步,从码流中读取待解码块的编码残差,然后编码残差加上预测残差块恢复待解码块的实际残差,最后再加上预测块恢复出原始图像块。The third step is to read the coding residual of the block to be decoded from the code stream, then add the predicted residual block to the encoded residual to restore the actual residual of the to-be-decoded block, and finally add the predicted block to restore the original image block.
综上,可以看到,在解码器端的帧间预测解码操作中,建立与编码器相同的残差预测模块来预测当前块的残差。残差预测模块的输入为当前解码块的参考块所对应的时域和空域上各两个参考残差块,参考块的寻找方式与编码器端相同,输出为当前解码块的预测残差,与解码后的残差和待解码块的预测块相加即可完成当前块的重建工作。To sum up, it can be seen that in the inter prediction decoding operation at the decoder side, the same residual prediction module as the encoder is established to predict the residual of the current block. The input of the residual prediction module is two reference residual blocks in the time domain and spatial domain corresponding to the reference block of the current decoding block. The search method of the reference block is the same as that of the encoder, and the output is the prediction residual of the current decoding block. The reconstruction of the current block can be completed by adding the decoded residual and the predicted block of the block to be decoded.
显然,本领域的技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。Obviously, those skilled in the art should understand that the above-mentioned modules or steps of the present invention can be implemented by a general-purpose computing device, which can be centralized on a single computing device, or distributed in a network composed of multiple computing devices Alternatively, they may be implemented in program code executable by a computing device, such that they may be stored in a storage device and executed by the computing device, and in some cases, in a different order than here The steps shown or described are performed either by fabricating them separately into individual integrated circuit modules, or by fabricating multiple modules or steps of them into a single integrated circuit module. As such, the present invention is not limited to any particular 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 modification, equivalent replacement, improvement, etc. made within the principles of the present invention shall be included within the protection scope of the present invention.
Claims (19)
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910663278.XA CN112261409B (en) | 2019-07-22 | 2019-07-22 | Residual encoding, decoding method and device, storage medium and electronic device |
PCT/CN2020/100558 WO2021012942A1 (en) | 2019-07-22 | 2020-07-07 | Residual coding method and device, residual decoding method and device, storage medium, and electronic device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910663278.XA CN112261409B (en) | 2019-07-22 | 2019-07-22 | Residual encoding, decoding method and device, storage medium and electronic device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112261409A true CN112261409A (en) | 2021-01-22 |
CN112261409B CN112261409B (en) | 2024-12-20 |
Family
ID=74193180
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910663278.XA Active CN112261409B (en) | 2019-07-22 | 2019-07-22 | Residual encoding, decoding method and device, storage medium and electronic device |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN112261409B (en) |
WO (1) | WO2021012942A1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2023005579A1 (en) * | 2021-07-30 | 2023-02-02 | 中兴通讯股份有限公司 | Video encoding method and apparatus, video decoding method and apparatus, and electronic device and storage medium |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115190306A (en) * | 2021-04-01 | 2022-10-14 | Oppo广东移动通信有限公司 | Image processing method, image processing device, storage medium and electronic equipment |
Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1917647A (en) * | 2005-04-19 | 2007-02-21 | 三星电子株式会社 | Method and apparatus for adaptively selecting context model for entropy coding |
CN101350927A (en) * | 2008-07-29 | 2009-01-21 | 北京中星微电子有限公司 | Method and apparatus for forecasting and selecting optimum estimation mode in a frame |
EP2343901A1 (en) * | 2010-01-08 | 2011-07-13 | Research In Motion Limited | Method and device for video encoding using predicted residuals |
CN102196256A (en) * | 2010-03-11 | 2011-09-21 | 中国科学院微电子研究所 | A video coding method and device |
GB201217454D0 (en) * | 2012-09-28 | 2012-11-14 | Canon Kk | Method and apparatus for encoding an image into a video bitstream and decoding corresponding video bitstream |
KR20140072939A (en) * | 2012-12-04 | 2014-06-16 | 광운대학교 산학협력단 | Method and apparatus for residual prediction for multi-view video coding |
US20140198842A1 (en) * | 2011-07-08 | 2014-07-17 | Dolby Laboratories Licensing Corporation | Hybrid Encoding and Decoding Methods for Single and Multiple Layered Video Coding Systems |
CN104244002A (en) * | 2013-06-14 | 2014-12-24 | 北京三星通信技术研究有限公司 | Method and device for obtaining motion information in video coding/decoding process |
CN104427345A (en) * | 2013-09-11 | 2015-03-18 | 华为技术有限公司 | Motion vector acquisition method, acquisition device, video codec and method thereof |
CN104702954A (en) * | 2013-12-05 | 2015-06-10 | 华为技术有限公司 | Video coding method and device |
CN106063272A (en) * | 2014-01-02 | 2016-10-26 | 世宗大学校产学协力团 | Method for encoding multi-view video and apparatus therefor and method for decoding multi-view video and apparatus therefor |
CN108848380A (en) * | 2018-06-20 | 2018-11-20 | 腾讯科技(深圳)有限公司 | Video coding and decoding method, apparatus, computer equipment and storage medium |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR100678911B1 (en) * | 2005-07-21 | 2007-02-05 | 삼성전자주식회사 | Method and apparatus for encoding and decoding video signals by extending the application of directional intra prediction |
WO2007024106A1 (en) * | 2005-08-24 | 2007-03-01 | Samsung Electronics Co., Ltd. | Method for enhancing performance of residual prediction and video encoder and decoder using the same |
CN103037220B (en) * | 2008-01-04 | 2016-01-13 | 华为技术有限公司 | Video coding, coding/decoding method and device and processing system for video |
CN102148989B (en) * | 2011-04-22 | 2012-07-25 | 西安交通大学 | Method for detecting all-zero blocks in H.264 |
CN103916672B (en) * | 2014-03-21 | 2018-03-13 | 华为技术有限公司 | A kind of data decoding method, relevant apparatus and system |
EP3453178A1 (en) * | 2016-05-06 | 2019-03-13 | VID SCALE, Inc. | Systems and methods for motion compensated residual prediction |
-
2019
- 2019-07-22 CN CN201910663278.XA patent/CN112261409B/en active Active
-
2020
- 2020-07-07 WO PCT/CN2020/100558 patent/WO2021012942A1/en active Application Filing
Patent Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1917647A (en) * | 2005-04-19 | 2007-02-21 | 三星电子株式会社 | Method and apparatus for adaptively selecting context model for entropy coding |
CN101350927A (en) * | 2008-07-29 | 2009-01-21 | 北京中星微电子有限公司 | Method and apparatus for forecasting and selecting optimum estimation mode in a frame |
EP2343901A1 (en) * | 2010-01-08 | 2011-07-13 | Research In Motion Limited | Method and device for video encoding using predicted residuals |
CN102196256A (en) * | 2010-03-11 | 2011-09-21 | 中国科学院微电子研究所 | A video coding method and device |
US20140198842A1 (en) * | 2011-07-08 | 2014-07-17 | Dolby Laboratories Licensing Corporation | Hybrid Encoding and Decoding Methods for Single and Multiple Layered Video Coding Systems |
GB201217454D0 (en) * | 2012-09-28 | 2012-11-14 | Canon Kk | Method and apparatus for encoding an image into a video bitstream and decoding corresponding video bitstream |
KR20140072939A (en) * | 2012-12-04 | 2014-06-16 | 광운대학교 산학협력단 | Method and apparatus for residual prediction for multi-view video coding |
CN104244002A (en) * | 2013-06-14 | 2014-12-24 | 北京三星通信技术研究有限公司 | Method and device for obtaining motion information in video coding/decoding process |
CN104427345A (en) * | 2013-09-11 | 2015-03-18 | 华为技术有限公司 | Motion vector acquisition method, acquisition device, video codec and method thereof |
CN104702954A (en) * | 2013-12-05 | 2015-06-10 | 华为技术有限公司 | Video coding method and device |
CN106063272A (en) * | 2014-01-02 | 2016-10-26 | 世宗大学校产学协力团 | Method for encoding multi-view video and apparatus therefor and method for decoding multi-view video and apparatus therefor |
CN108848380A (en) * | 2018-06-20 | 2018-11-20 | 腾讯科技(深圳)有限公司 | Video coding and decoding method, apparatus, computer equipment and storage medium |
Non-Patent Citations (1)
Title |
---|
范杰羚: "3D-HEVC深度视频编码算法研究", 《中国优秀硕士学位论文全文数据库 (信息科技辑)》, 15 April 2018 (2018-04-15) * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2023005579A1 (en) * | 2021-07-30 | 2023-02-02 | 中兴通讯股份有限公司 | Video encoding method and apparatus, video decoding method and apparatus, and electronic device and storage medium |
Also Published As
Publication number | Publication date |
---|---|
WO2021012942A1 (en) | 2021-01-28 |
CN112261409B (en) | 2024-12-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107809642B (en) | Method for encoding and decoding video image, encoding device and decoding device | |
TWI536811B (en) | Method and system for image processing, decoding method, encoder and decoder | |
CN107534770B (en) | Image prediction method and relevant device | |
RU2577181C2 (en) | Method and device for video signal encoding | |
US20120275522A1 (en) | Method and apparatus for motion vector encoding/decoding using spatial division, and method and apparatus for image encoding/decoding using same | |
CN105072451A (en) | video decoding device | |
CN101009835A (en) | Background-based motion estimation coding method | |
US20180270497A1 (en) | Segmentation-based parameterized motion models | |
Abou-Elailah et al. | Fusion of global and local motion estimation for distributed video coding | |
US12075046B2 (en) | Shape adaptive discrete cosine transform for geometric partitioning with an adaptive number of regions | |
Qi et al. | Motion information propagation for neural video compression | |
CN114449286A (en) | Video coding method, decoding method and device | |
Hu et al. | Complexity-guided slimmable decoder for efficient deep video compression | |
WO2021012942A1 (en) | Residual coding method and device, residual decoding method and device, storage medium, and electronic device | |
CN111264061A (en) | Method and apparatus for video encoding, and method and apparatus for video decoding | |
CN112601095A (en) | Method and system for creating fractional interpolation model of video brightness and chrominance | |
US8989270B2 (en) | Optimized search for reference frames in predictive video coding system | |
CN104104956B (en) | For layered video coding and the method for decoding, encoding apparatus and decoding apparatus | |
JP7437426B2 (en) | Inter prediction method and device, equipment, storage medium | |
WO2023225808A1 (en) | Learned image compress ion and decompression using long and short attention module | |
WO2023185305A1 (en) | Encoding method and apparatus, storage medium and computer program product | |
CN110876058A (en) | A method and device for updating a historical candidate list | |
CN117616751A (en) | Video encoding and decoding of moving image group | |
WO2024239250A1 (en) | System and method for hyperprior-based learned video compression with residual and channel attention network | |
WO2025051063A1 (en) | Face feature translator for generative face video compression |
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 |