CN106954082A - Video encoding and decoding method, encoding and decoding device and system - Google Patents
Video encoding and decoding method, encoding and decoding device and system Download PDFInfo
- Publication number
- CN106954082A CN106954082A CN201610013918.9A CN201610013918A CN106954082A CN 106954082 A CN106954082 A CN 106954082A CN 201610013918 A CN201610013918 A CN 201610013918A CN 106954082 A CN106954082 A CN 106954082A
- Authority
- CN
- China
- Prior art keywords
- image
- background
- subregion
- frame
- sub
- 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.)
- Withdrawn
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/44—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
- H04N21/44012—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving rendering scenes according to scene graphs, e.g. MPEG-4 scene graphs
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/23—Processing of content or additional data; Elementary server operations; Server middleware
- H04N21/234—Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
- H04N21/2343—Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
- H04N21/234345—Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements the reformatting operation being performed only on part of the stream, e.g. a region of the image or a time segment
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/40—Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
- H04N21/43—Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
- H04N21/44—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
- H04N21/4402—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display
- H04N21/440245—Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs involving reformatting operations of video signals for household redistribution, storage or real-time display the reformatting operation being performed only on part of the stream, e.g. a region of the image or a time segment
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
本发明公开了一种视频编码方法,该方法包括:当帧的子区域为背景区域时,从帧的参考帧中复制与该子区域对应位置的图像,将复制得到的图像作为子区域编码后的图像。本发明还公开了另一种视频编码方法,及一种视频解码方法、编码装置、解码装置及编解码系统。本发明不需要对背景区域按照传统的编解码方式进行编解码,有效减少编解码的复杂度,减少时间消耗,提升编解码效率。
The invention discloses a video coding method, which comprises: when a sub-region of a frame is a background region, copying an image corresponding to the sub-region from a reference frame of the frame, and encoding the copied image as a sub-region Image. The invention also discloses another video coding method, a video decoding method, a coding device, a decoding device and a codec system. The present invention does not need to encode and decode the background area according to the traditional encoding and decoding method, effectively reduces the complexity of encoding and decoding, reduces time consumption, and improves the efficiency of encoding and decoding.
Description
技术领域technical field
本发明涉视频编解码领域,尤其涉及一种视频编解码方法及编解码装置。The present invention relates to the field of video codec, in particular to a video codec method and a codec device.
背景技术Background technique
在视频会议、视频聊天和移动视频等低时延视频通讯应用中,用户体验的要求不断上升,分辨率也不断提高,分辨率从最初的720p到1080p甚至到4k。在有限的带宽条件限制下,分辨率越高对视频编解码技术的要求也越来越高,而现有视频编解码技术越来越难满足视频数据压缩的需求,编解码过程复杂,且消耗的时间越来越长,效率较低。In low-latency video communication applications such as video conferencing, video chat, and mobile video, the requirements for user experience are constantly increasing, and the resolution is also increasing, from the original 720p to 1080p and even 4k. Under the limitation of limited bandwidth, the higher the resolution, the higher the requirements for video codec technology, and the existing video codec technology is more and more difficult to meet the needs of video data compression, the codec process is complicated, and consumes The time is getting longer and longer, and the efficiency is lower.
发明内容Contents of the invention
本发明的主要目的在于提供一种视频编解码方法及编解码装置,旨在解决现有技术中视频编解码过程复杂及所消耗的时间越来越长导致的编解码效率低的技术问题。The main purpose of the present invention is to provide a video encoding and decoding method and encoding and decoding device, aiming to solve the technical problem of low encoding and decoding efficiency caused by the complicated video encoding and decoding process and the increasingly long time consumed in the prior art.
为实现上述目的,本发明提供的一种视频编码方法,包括:In order to achieve the above object, a video encoding method provided by the present invention includes:
当帧的子区域为背景区域时,从所述帧的参考帧中复制与所述子区域对应位置的图像,将复制得到的图像作为所述子区域编码后的图像。When the sub-area of the frame is the background area, the image corresponding to the sub-area is copied from the reference frame of the frame, and the copied image is used as the encoded image of the sub-area.
优选地,所述方法还包括:Preferably, the method also includes:
当所述子区域为背景区域时,为所述子区域设置第一背景标识符,所述第一背景标识符用于在解码过程中识别所述子区域为背景区域。When the sub-area is a background area, a first background identifier is set for the sub-area, and the first background identifier is used to identify the sub-area as a background area in a decoding process.
优选地,所述方法还包括:Preferably, the method also includes:
当所述子区域为非背景区域时,遍历所述子区域内的块单元,若遍历到的块单元为背景单元,则从所述帧的参考帧中复制与所述块单元对应位置的图像,将复制得到的图像作为所述块单元编码后的图像。When the sub-area is a non-background area, traverse the block unit in the sub-area, if the traversed block unit is a background unit, copy the image corresponding to the block unit from the reference frame of the frame , using the copied image as the block-unit encoded image.
优选地,所述方法还包括:Preferably, the method also includes:
若遍历到的块单元为背景单元,则为所述块单元设置第二背景标识符,所述第二背景标识符用于在解码过程中识别所述块单元为背景单元。If the traversed block unit is a background unit, a second background identifier is set for the block unit, and the second background identifier is used to identify the block unit as a background unit in a decoding process.
为实现上述目的,本发明还提供一种视频编码方法,所述方法包括:To achieve the above object, the present invention also provides a video coding method, the method comprising:
当帧的子区域为背景区域时,为所述子区域设置第一背景标识符,所述第一背景标识符用于在解码过程中识别所述子区域为背景区域,使得在对所述子区域进行解码时,解码装置从所述帧的解码参考帧中复制与所述子区域对应位置的图像,将复制得到的图像作为所述子区域解码后的图像;When the sub-area of the frame is a background area, a first background identifier is set for the sub-area, and the first background identifier is used to identify the sub-area as a background area in the decoding process, so that the When the region is decoded, the decoding device copies the image corresponding to the sub-region from the decoding reference frame of the frame, and uses the copied image as the decoded image of the sub-region;
获取所述子区域编码后的图像。Acquire the encoded image of the sub-region.
优选地,所述获取所述子区域编码后的图像,包括:Preferably, the acquisition of the encoded image of the sub-region includes:
从所述帧的编码参考帧中,复制与所述子区域对应位置的图像作为所述子区域编码后的图像。From the coded reference frame of the frame, the image corresponding to the sub-region is copied as the coded image of the sub-region.
优选地,所述方法还包括:Preferably, the method also includes:
当所述子区域为非背景区域时,遍历所述子区域内的块单元,若遍历到的块单元为背景单元,则为所述块单元设置第二背景标识符,所述第二背景标识符用于在解码过程中识别所述块单元为背景单元,使得在对所述块单元进行解码时,解码装置从所述帧的解码参考帧中复制与所述块单元对应位置的图像,将复制得到的图像作为所述块单元解码后的图像;When the sub-area is a non-background area, traverse the block units in the sub-area, if the traversed block unit is a background unit, set a second background identifier for the block unit, the second background identifier The symbol is used to identify the block unit as a background unit in the decoding process, so that when decoding the block unit, the decoding device copies the image corresponding to the block unit from the decoding reference frame of the frame, and The copied image is used as the decoded image of the block unit;
获取所述块单元编码后的图像。Acquire the encoded image of the block unit.
优选地,所述获取所述块单元编码后的图像包括:Preferably, the acquiring the encoded image of the block unit includes:
从所述帧的编码参考帧中,复制与所述块单元对应位置的图像作为所述块单元编码后的图像。From the coded reference frame of the frame, copy the image corresponding to the block unit as the coded image of the block unit.
为实现上述目的,本发明还提供一种视频解码方法,所述方法包括:To achieve the above object, the present invention also provides a video decoding method, the method comprising:
当帧的子区域包含第一背景标识符时,从所述帧的参考帧中复制与所述子区域对应位置的图像,将复制得到的图像作为所述子区域解码后的图像,所述第一背景标识符用于标识所述子区域为背景区域。When the sub-region of the frame contains the first background identifier, copy the image corresponding to the sub-region from the reference frame of the frame, and use the copied image as the decoded image of the sub-region, the second A background identifier is used to identify the sub-area as a background area.
优选地,所述方法还包括:Preferably, the method also includes:
当所述子区域未包含第一背景标识符时,若所述子区域中存在包含第二背景标识符的块单元,则从所述帧的参考帧中复制与所述块单元对应位置的图像,将复制得到的图像作为所述块单元解码后的图像,所述第二背景标识符用于标识所述块单元为背景单元。When the sub-region does not contain the first background identifier, if there is a block unit containing the second background identifier in the sub-region, copy the image corresponding to the block unit from the reference frame of the frame , using the copied image as the decoded image of the block unit, and the second background identifier is used to identify the block unit as a background unit.
为实现上述目的,本发明还提供一种编码装置,包括:To achieve the above object, the present invention also provides an encoding device, comprising:
复制模块,用于当所述帧的子区域为背景区域时,从所述帧的参考帧中复制与所述子区域对应位置的图像,将复制得到的图像作为所述子区域编码后的图像。Copying module, for when the sub-area of the frame is a background area, copy the image corresponding to the sub-area from the reference frame of the frame, and use the copied image as the encoded image of the sub-area .
优选地,所述装置还包括:Preferably, the device also includes:
第一设置模块,用于当所述子区域为背景区域时,为所述子区域设置第一背景标识符,所述第一背景标识符用于在解码过程中识别所述子区域为背景区域。A first setting module, configured to set a first background identifier for the sub-area when the sub-area is a background area, and the first background identifier is used to identify the sub-area as a background area during decoding .
优选地,所述装置还包括:Preferably, the device also includes:
遍历及复制模块,用于当所述子区域为非背景区域时,遍历所述子区域内的块单元,若遍历到的块单元为背景单元,则从所述帧的参考帧中复制与所述块单元对应位置的图像,将复制得到的图像作为所述块单元编码后的图像。The traversal and copying module is used to traverse the block units in the sub-area when the sub-area is a non-background area, and if the traversed block unit is a background unit, copy the reference frame of the frame with the The image corresponding to the block unit is selected, and the copied image is used as the encoded image of the block unit.
优选地,所述装置还包括:Preferably, the device also includes:
第二设置模块,用于若遍历到的块单元为背景单元,则为所述块单元设置第二背景标识符,所述第二背景标识符用于在解码过程中识别所述块单元为背景单元。The second setting module is used to set a second background identifier for the block unit if the traversed block unit is a background unit, and the second background identifier is used to identify the block unit as a background during the decoding process unit.
为实现上述目的,本发明还提供一种编码装置,所述装置包括:In order to achieve the above object, the present invention also provides an encoding device, which includes:
第三设置模块,用于当帧的子区域为背景区域时,为所述子区域设置第一背景标识符,所述第一背景标识符用于在解码过程中识别所述子区域为背景区域,使得在对所述子区域进行解码时,解码装置从所述帧的解码参考帧中复制与所述子区域对应位置的图像,将复制得到的图像作为所述子区域解码后的图像;The third setting module is used to set a first background identifier for the sub-area when the sub-area of the frame is a background area, and the first background identifier is used to identify the sub-area as a background area in the decoding process , so that when decoding the sub-region, the decoding device copies the image corresponding to the sub-region from the decoding reference frame of the frame, and uses the copied image as the decoded image of the sub-region;
第一获取模块,用于获取所述子区域编码后的图像。The first acquiring module is configured to acquire the coded image of the sub-region.
优选地,所述第一获取模块具体用于从所述帧的编码参考帧中,复制与所述子区域对应位置的图像作为所述子区域编码后的图像。Preferably, the first obtaining module is specifically configured to copy an image at a position corresponding to the sub-region from the coded reference frame of the frame as the coded image of the sub-region.
优选地,所述装置还包括:Preferably, the device also includes:
遍历及设置模块,用于当所述子区域为非背景区域时,遍历所述子区域内的块单元,若遍历到的块单元为背景单元,则为所述块单元设置第二背景标识符,所述第二背景标识符用于在解码过程中识别所述块单元为背景单元,使得在对所述块单元进行解码时,解码装置从所述帧的解码参考帧中复制与所述块单元对应位置的图像,将复制得到的图像作为所述块单元解码后的图像;The traversal and setting module is used to traverse the block units in the sub-area when the sub-area is a non-background area, and if the traversed block unit is a background unit, set a second background identifier for the block unit , the second context identifier is used to identify the block unit as a background unit during the decoding process, so that when decoding the block unit, the decoding device copies the block from the decoding reference frame of the frame The image corresponding to the position of the unit, and the copied image is used as the decoded image of the block unit;
第二获取模块,用于获取所述块单元编码后的图像。The second obtaining module is used to obtain the encoded image of the block unit.
优选地,所述第二获取模块具体用于:从所述帧的编码参考帧中,复制与所述块单元对应位置的图像作为所述块单元编码后的图像。Preferably, the second acquiring module is specifically configured to: copy an image corresponding to the block unit from the encoding reference frame of the frame as the encoded image of the block unit.
为实现上述目的,本发明还提供一种解码装置,所述装置包括:In order to achieve the above object, the present invention also provides a decoding device, which includes:
第一图像复制模块,用于当帧的子区域包含第一背景标识符时,从所述帧的参考帧中复制与所述子区域对应位置的图像,将复制得到的图像作为所述子区域解码后的图像,所述第一背景标识符用于标识所述子区域为背景区域。The first image copying module is used to copy the image corresponding to the sub-region from the reference frame of the frame when the sub-region of the frame contains the first background identifier, and use the copied image as the sub-region In the decoded image, the first background identifier is used to identify the sub-region as a background region.
优选地,所述装置还包括:Preferably, the device also includes:
第二图像复制模块,用于当所述子区域未包含第一背景标识符时,若所述子区域中存在包含第二背景标识符的块单元,则从所述帧的参考帧中复制与所述块单元对应位置的图像,将复制得到的图像作为所述块单元解码后的图像,所述第二背景标识符用于标识所述块单元为背景单元。The second image copying module is used for copying from the reference frame of the frame and For the image corresponding to the block unit, the copied image is used as the decoded image of the block unit, and the second background identifier is used to identify the block unit as a background unit.
为实现上述目的,本发明还提供一种编解码系统,包括:上述的编码装置及上述的解码装置。To achieve the above object, the present invention further provides a codec system, comprising: the above-mentioned encoding device and the above-mentioned decoding device.
本发明提供一种视频编解码方法及编解码装置,所能实现的有益效果为:The present invention provides a video encoding and decoding method and encoding and decoding device, and the beneficial effects that can be realized are:
在视频编码过程中,当帧的子区域为背景区域时,从该帧的参考帧中复制与该子区域对应位置的图像,将复制得到的图像作为该子区域编码后的图像,使得不需要按照现有编码方式对子区域进行编码,有效降低编码复杂度、减少编码所消耗的时间及提高编码效率。且在视频解码过程中,当帧的子区域中包含标识该子区域为背景区域的第一背景标识符时,从该帧的参考帧中复制与该子区域对应位置的图像,将复制得到的图像作为子区域解码后的图像,使得不需要按照现有解码方式对子区域进行解码,有效降低解码复杂度、减少解码过程所消耗的时间及提高解码效率。In the video coding process, when the sub-region of the frame is the background region, the image corresponding to the sub-region is copied from the reference frame of the frame, and the copied image is used as the encoded image of the sub-region, so that no need The sub-region is coded according to the existing coding method, which effectively reduces coding complexity, reduces coding time consumption and improves coding efficiency. And in the video decoding process, when the sub-area of the frame contains the first background identifier that identifies the sub-area as the background area, copy the image corresponding to the sub-area from the reference frame of the frame, and copy the obtained The image is decoded as the sub-region, so that the sub-region does not need to be decoded according to the existing decoding method, effectively reducing the decoding complexity, reducing the time consumed in the decoding process and improving the decoding efficiency.
附图说明Description of drawings
图1为本发明第一实施例中视频编码方法的流程示意图;FIG. 1 is a schematic flowchart of a video encoding method in a first embodiment of the present invention;
图2为图1所示第一实施例追加步骤的流程示意图;Fig. 2 is a schematic flow chart of the additional steps of the first embodiment shown in Fig. 1;
图3为图1所示第一实施例追加步骤的流程示意图;Fig. 3 is a schematic flow chart of the additional steps of the first embodiment shown in Fig. 1;
图4为图3所示实施例追加步骤的流程示意图;Fig. 4 is a schematic flow chart of the additional steps of the embodiment shown in Fig. 3;
图5为本发明第二实施例中视频编码方法的流程示意图;FIG. 5 is a schematic flowchart of a video encoding method in a second embodiment of the present invention;
图6为图5所示第二实施例追加步骤的流程示意图;Fig. 6 is a schematic flow chart of the additional steps of the second embodiment shown in Fig. 5;
图7为本发明第三实施例中的视频解码方法的流程示意图;FIG. 7 is a schematic flowchart of a video decoding method in a third embodiment of the present invention;
图8为本发明第三实施例的追加步骤的流程示意图;Fig. 8 is a schematic flow chart of the additional steps of the third embodiment of the present invention;
图9为本发明第四实施例中编码装置的功能模块的示意图;FIG. 9 is a schematic diagram of functional modules of an encoding device in a fourth embodiment of the present invention;
图10为图9所示第四实施例的追加功能模块的示意图;FIG. 10 is a schematic diagram of additional functional modules of the fourth embodiment shown in FIG. 9;
图11为图9所示第四实施例追加功能模块的示意图;FIG. 11 is a schematic diagram of additional functional modules of the fourth embodiment shown in FIG. 9;
图12为图11所示实施例追加功能模块的示意图;Fig. 12 is a schematic diagram of an additional functional module of the embodiment shown in Fig. 11;
图13为本发明第五实施例中编码装置的功能模块的示意图;FIG. 13 is a schematic diagram of functional modules of an encoding device in a fifth embodiment of the present invention;
图14为图13所示实施例追加功能模块的示意图;Fig. 14 is a schematic diagram of an additional functional module of the embodiment shown in Fig. 13;
图15为本发明第六实施例中解码装置的功能模块的示意图;FIG. 15 is a schematic diagram of functional modules of a decoding device in a sixth embodiment of the present invention;
图16为图15所示实施例追加功能模块的示意图;Fig. 16 is a schematic diagram of an additional functional module of the embodiment shown in Fig. 15;
图17为本发明第六实施例中编解码系统的功能模块示意图。Fig. 17 is a schematic diagram of functional modules of the codec system in the sixth embodiment of the present invention.
本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization of the purpose of the present invention, functional characteristics and advantages will be further described in conjunction with the embodiments and with reference to the accompanying drawings.
具体实施方式detailed description
应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。It should be understood that the specific embodiments described here are only used to explain the present invention, not to limit the present invention.
本发明提供一种视频编解码的方法,具体包括视频编码方法和视频解码方法,在视频编码方法中,当帧的子区域为背景区域时,从该帧的参考帧中复制与该子区域对应位置的图像,将复制得到的图像作为子区域编码后的图像,通过复制参考帧的图像的方式得到子区域编码后的图形,使得不需要通过现有编码方式得到子区域编码后的图像,能够有效的缩短编码时间,降低编码复杂度,提高编码效率。The present invention provides a method for video encoding and decoding, which specifically includes a video encoding method and a video decoding method. In the video encoding method, when a sub-area of a frame is a background area, the frame corresponding to the sub-area is copied from the reference frame of the frame. The image of the position, the copied image is used as the sub-region coded image, and the sub-region coded image is obtained by copying the image of the reference frame, so that it is not necessary to obtain the sub-region coded image through the existing coding method, and can Effectively shorten encoding time, reduce encoding complexity, and improve encoding efficiency.
在视频解码方法中,当帧的子区域包含标识该子区域为背景区域的第一背景标识符时,从该帧的参考帧中,复制与该子区域对应位置的图像,将复制得到的图像作为该子区域解码后的图像,而不需要采用现有解码方式对子区域进行解码,能有有效地节约解码所消耗的时间,降低解码的复杂度,提高解码效率。In the video decoding method, when a sub-region of a frame contains a first background identifier that identifies the sub-region as a background region, the image corresponding to the sub-region is copied from the reference frame of the frame, and the obtained image is copied As the decoded image of the sub-region, there is no need to use the existing decoding method to decode the sub-region, which can effectively save the time consumed by decoding, reduce the complexity of decoding, and improve the decoding efficiency.
其中,现有编码方式是指对帧进行预测、变换、量化、熵编码及重建,现有解码方式是指对帧进行熵译码、反量化、反变换、预测及重建。Among them, the existing coding method refers to performing prediction, transformation, quantization, entropy coding and reconstruction on the frame, and the existing decoding method refers to performing entropy decoding, inverse quantization, inverse transformation, prediction and reconstruction on the frame.
在本发明实施例中,能够使用上述的编解码方法的帧为P帧或者B帧。In the embodiment of the present invention, the frame that can use the above codec method is a P frame or a B frame.
其中,P帧是一种向前预测编码帧,也称为帧间编码帧,P帧需要参考前面的与其相邻的I帧或者P帧而生成,同时它可以是其他P帧或者B帧的参考帧。Among them, a P frame is a forward predictive coding frame, also known as an inter-frame coding frame. The P frame needs to be generated by referring to the previous I frame or P frame adjacent to it, and it can be another P frame or B frame. reference frame.
其中,B帧是一种双向预测编码帧,它也是一个帧间编码帧,B帧需要参考前面的I帧或P帧或后面的P帧生成,B帧不作为其他帧的参考帧。Among them, the B frame is a bidirectional predictive coding frame, which is also an inter-frame coding frame. The B frame needs to be generated by referring to the previous I frame or P frame or the subsequent P frame, and the B frame is not used as a reference frame for other frames.
其中,I帧是一种全帧压缩编码帧,也叫帧内编码帧,因此I帧的数据量一般比较大,I帧不需要参考其他帧而生成,它可以是P帧或者B帧的参考帧。Among them, I frame is a kind of full-frame compression coding frame, also called intra-frame coding frame, so the data volume of I frame is generally relatively large, and I frame does not need to refer to other frames to generate, it can be the reference of P frame or B frame frame.
在本发明实施例中,一个视频图像中的P帧和B帧都按照相同的大小划分子区域,例如可以划分为4个子区域,且每个子区域均为可进行独立编码的区域,其中,每个子区域都按照相同的大小划分为块单元,例如可以划分为大小相同的16个块单元,因此,对于P帧和B帧来说,它们拥有的子区域的个数相同,且在各个帧中,处于相同位置的子区域中包含的块单元的大小和个数也是相同的。In the embodiment of the present invention, the P frame and the B frame in a video image are divided into sub-regions according to the same size, for example, they can be divided into 4 sub-regions, and each sub-region is an area that can be independently coded, wherein each Each sub-area is divided into block units according to the same size, for example, it can be divided into 16 block units of the same size. Therefore, for P frame and B frame, they have the same number of sub-areas, and in each frame , the size and number of block units contained in sub-regions at the same position are also the same.
其中,块单元是为视频图像划分的编解码单元,在传统编解码过程中,是以块单元为单位进行编解码的过程的。例如,在高效视频编码(HighEfficiency Video Coding,HEVC)协议中,块单元可以LCU,在H.264协议中,块单元可以是宏块(Macro Block,MB)。Wherein, the block unit is a codec unit divided into video images, and in the traditional codec process, the process of codec is performed in units of block units. For example, in the High Efficiency Video Coding (High Efficiency Video Coding, HEVC) protocol, the block unit may be an LCU, and in the H.264 protocol, the block unit may be a Macro Block (Macro Block, MB).
其中,子区域内包含多个块单元,例如:子区域可以是H.264协议中的Slice,每个Slice可以单独解码,或者,子区域可以是HEVC协议中的tile。Wherein, a sub-area contains multiple block units. For example, a sub-area may be a Slice in the H.264 protocol, and each Slice may be decoded independently, or a sub-area may be a tile in the HEVC protocol.
为了更好的理解本发明实施例中的视频编解码的技术方案,下面将分别介绍本发明实施例中的视频编码方法和视频解码方法。In order to better understand the technical solutions of video encoding and decoding in the embodiments of the present invention, the video encoding method and the video decoding method in the embodiments of the present invention will be respectively introduced below.
请参阅图1,为本发明第一实施例中视频编码方法的流程示意图,该方法包括:Please refer to FIG. 1, which is a schematic flowchart of a video encoding method in the first embodiment of the present invention, the method includes:
步骤101、当帧的子区域为背景区域时,从帧的参考帧中复制与子区域对应位置的图像,将复制得到的图像作为子区域编码后的图像。Step 101. When the sub-area of the frame is the background area, copy the image corresponding to the sub-area from the reference frame of the frame, and use the copied image as the encoded image of the sub-area.
在本发明实施例中,视频编码方法是由编码装置执行的,编码装置将依次对视频图像中的帧进行编码过程。In the embodiment of the present invention, the video encoding method is executed by an encoding device, and the encoding device will sequentially encode frames in a video image.
其中,当帧的子区域为背景区域时,从帧的参考帧中复制与该子区域对应位置的图像,将复制得到的图像作为子区域编码后的图像。Wherein, when the sub-area of the frame is the background area, the image corresponding to the sub-area is copied from the reference frame of the frame, and the copied image is used as the encoded image of the sub-area.
在本发明实施例中,判断子区域是否为背景区域的方式有多种,例如:编码装置将确定子区域中的每一个像素点的像素值,并确定上一帧中与该子区域具有相同位置的辅助子区域中的每一个像素点的像素值,依次计算子区域中的像素点的像素值与该辅助子区域中对应位置处的像素点的像素值之间的差值,直至计算到所有差值,并将所有差值的绝对值求和,将该和值与预先设置的第一数值进行比较,若该和值小于该预先设置的第一数值,则确定该子区域为背景区域,若该和值大于或等于该预先设置的第一数值,则确定该子区域为非背景区域。即通过像素点的差值的绝对值的和判断子区域是否为背景区域。In the embodiment of the present invention, there are many ways to judge whether a sub-region is a background region. For example, the encoding device will determine the pixel value of each pixel in the sub-region, and determine that the sub-region has the same The pixel value of each pixel in the auxiliary sub-area of the position, and calculate the difference between the pixel value of the pixel in the sub-area and the pixel value of the corresponding pixel in the auxiliary sub-area until the calculated All the differences, and sum the absolute values of all the differences, compare the sum with the preset first value, if the sum is smaller than the preset first value, then determine the sub-region as the background region , if the sum value is greater than or equal to the preset first value, it is determined that the sub-area is a non-background area. That is, it is judged whether the sub-area is the background area or not by the sum of the absolute values of the difference values of the pixels.
或者,又例如:编码装置确定子区域中的每一个像素点的像素值,并确定上一帧中与该子区域具有相同位置的辅助子区域中的每一个像素点的像素值,依次计算子区域中的像素点的像素值与该复制子区域中对应位置处的像素点的像素值之间的差值,直至计算到所有差值,将该所有差值求和,并计算该和的绝对值,将该和的绝对值与预先设置的第二数值进行比较,若该和的绝对值小于该预先设置的第二数值,则确定该子区域为背景区域,若该和的绝对值大于或等于该预先设置的第一数值,则确定该子区域为非背景区域。即通过像素点的差值的和的绝对值判断子区域是否为背景区域。Or, for another example: the encoding device determines the pixel value of each pixel in the sub-region, and determines the pixel value of each pixel in the auxiliary sub-region having the same position as the sub-region in the previous frame, and calculates the sub-region in turn. The difference between the pixel value of the pixel point in the area and the pixel value of the pixel point at the corresponding position in the copied sub-region, until all the difference values are calculated, sum all the difference values, and calculate the absolute value of the sum Value, compare the absolute value of the sum with the preset second value, if the absolute value of the sum is smaller than the preset second value, then determine the sub-region as the background region, if the absolute value of the sum is greater than or If it is equal to the preset first value, then the sub-area is determined to be a non-background area. That is, it is judged whether the sub-area is the background area by the absolute value of the sum of the difference values of the pixels.
需要说明的是,在本发明实施例中,从帧的参考帧中复制与该子区域对应位置的图像的步骤是为了避免在后续的编码过程中,该“帧”成为其他的帧的参考帧时,无法通过复制的形式获取图像的问题。It should be noted that, in the embodiment of the present invention, the step of copying the image corresponding to the sub-region from the reference frame of the frame is to prevent the "frame" from becoming the reference frame of other frames in the subsequent encoding process , the problem that the image cannot be obtained in the form of copying.
在本发明实施例中的视频编码过程中,当帧的子区域为背景区域时,从该帧的参考帧中,复制与该子区域对应位置的图像,将复制得到的图像作为该子区域编码后的图像,使得不需要按照现有编码方式得到该子区域编码后的图形,有效降低编码过程的复杂度,节约编码时间,提高编码效率。In the video coding process in the embodiment of the present invention, when the sub-region of the frame is the background region, from the reference frame of the frame, copy the image corresponding to the sub-region, and use the copied image as the sub-region encoding The resulting image makes it unnecessary to obtain the encoded graphics of the sub-region according to the existing encoding method, which effectively reduces the complexity of the encoding process, saves encoding time, and improves encoding efficiency.
在本发明实施例中,为了在解码过程中也能够通过复制的方式得到该子区域解码后的图像,编码装置还可以该子区域设置第一背景标识符,为了便于理解,请参阅图2,为图1所示第一实施例追加步骤的流程示意图,包括:In the embodiment of the present invention, in order to obtain the decoded image of the sub-region by copying during the decoding process, the encoding device can also set the first background identifier for the sub-region. For ease of understanding, please refer to FIG. 2, It is a schematic flow chart of the additional steps of the first embodiment shown in Figure 1, including:
步骤201、当子区域为背景区域时,为子区域设置第一背景标识符,第一背景标识符用于在解码过程中识别子区域为背景区域。Step 201. When the sub-region is a background region, set a first background identifier for the sub-region, and the first background identifier is used to identify the sub-region as a background region during decoding.
在本发明实施例中,编码装置若确定该子区域为背景区域,则为该子区域设置第一背景标识符。其中,第一背景标识符用于标识该子区域为背景区域,且用于在解码过程中识别该子区域为背景区域,因此,在解码过程中,能够通过判断子区域是否包含该第一背景标识符确定子区域是否为背景区域。In the embodiment of the present invention, if the encoding device determines that the sub-area is a background area, it sets a first background identifier for the sub-area. Wherein, the first background identifier is used to identify the sub-area as the background area, and is used to identify the sub-area as the background area during the decoding process. Therefore, in the decoding process, it can be judged whether the sub-area contains the first background The identifier determines whether the subregion is a background region.
其中,每一个子区域都设置了一个用于标识该子区域是否为背景区域的标识位,且该标识位为0时,表明子区域为非背景区域,该标识位为1时,表明子区域为背景区域,且在未判断子区域是否为背景区域之前,该标识位的值为0。当编码装置确定子区域为背景区域时,可设置该标识位的值为1,即完成为该子区域设置第一背景标识符的操作。且当编码装置确定子区域不是背景区域时,将不对该标识位进行操作。例如,在HEVC协议中,上述标识位可以是tile_mv_0_flag,且该标识位可以设置在slice_segment_header()函数中。Wherein, each sub-area is provided with an identification bit for identifying whether the sub-area is a background area, and when the identification bit is 0, it indicates that the sub-area is a non-background area, and when the identification bit is 1, it indicates that the sub-area is the background area, and before judging whether the sub-area is the background area, the value of the flag is 0. When the encoding device determines that the sub-area is a background area, it can set the value of the identification bit to 1, that is, the operation of setting the first background identifier for the sub-area is completed. And when the encoding device determines that the sub-area is not a background area, it will not operate on the flag. For example, in the HEVC protocol, the above flag may be tile_mv_0_flag, and the flag may be set in the slice_segment_header() function.
其中,对确定为背景区域的子区域设置第一背景标识符是为了在解码过程中,直接通过判断子区域是否包含第一背景标识符的方式确定该子区域是否为背景区域。Wherein, setting the first background identifier on the sub-area determined as the background area is to determine whether the sub-area is the background area by directly judging whether the sub-area contains the first background identifier during the decoding process.
需要说明的是,在本发明实施例中,并不限定图2所示步骤201与图1所示实施例中的步骤101执行时间的先后顺序。It should be noted that, in the embodiment of the present invention, the execution time sequence of step 201 shown in FIG. 2 and step 101 in the embodiment shown in FIG. 1 is not limited.
在本发明实施例中,编码装置在确定子区域为背景区域时,将为该背景区域设置第一背景标识符,该第一背景标识符用于在解码过程中识别该子区域为背景区域,使得在解码时,可以通过复制该子区域所属帧的参考帧对应位置的图像的方式实现解码过程,使得不需要通过现有解码方式对子区域进行解码,有效降低解码过程的复杂度,节约解码时间,提高解码效率。In the embodiment of the present invention, when the encoding device determines that a sub-region is a background region, it will set a first background identifier for the background region, and the first background identifier is used to identify the sub-region as a background region during the decoding process, When decoding, the decoding process can be realized by copying the image corresponding to the reference frame of the frame to which the sub-region belongs, so that the sub-region does not need to be decoded by the existing decoding method, effectively reducing the complexity of the decoding process and saving decoding time and improve decoding efficiency.
在本发明实施例中,当子区域为非背景区域时,将进一步对该子区域内的块单元进行编码,为了更好的理解,请参阅图3,为本发明图1所示第一实施例追加步骤的流程示意图,该方法包括:In the embodiment of the present invention, when the sub-area is a non-background area, the block units in the sub-area will be further coded. For a better understanding, please refer to FIG. 3, which is the first implementation shown in FIG. 1 of the present invention A schematic flow chart of an example additional step, the method includes:
步骤301、当子区域为非背景区域时,则遍历子区域内的块单元,若遍历到的块单元为背景单元,则从帧的参考帧中复制与块单元对应位置的图像,将复制得到的图像作为块单元编码后的图像。Step 301, when the sub-area is a non-background area, then traverse the block unit in the sub-area, if the traversed block unit is a background unit, copy the image corresponding to the block unit from the reference frame of the frame, and copy the obtained The image is encoded as a block unit image.
在本发明实施例中,当编码装置确定子区域为非背景区域时,编码装置将遍历该子区域内的块单元,并确定遍历到的块单元是否为背景单元。In the embodiment of the present invention, when the encoding device determines that the sub-area is a non-background area, the encoding device will traverse the block units in the sub-region, and determine whether the traversed block units are background units.
在本发明实施例中,编码装置确定块单元是否为背景单元多很多种方式,例如:编码装置确定块单元中的每一个像素点的像素值,并确定在上一帧中与块单元所属的子区域具有相同位置的辅助子区域,编码装置将确定在该辅助子区域中与上述的块单元具有相同位置的辅助块单元中的每一个像素点的像素值,依次计算块单元中的像素点的像素值与其在辅助块单元中对应的像素值之间的差值,在计算得到所有的差值之后,将所有的差值的绝对值求和,将该和值与预先设置的第三数值进行比较,若该和值小于预先设置的第三数值,则确定该块单元为背景单元,若该和值大于或等于该预先设置的第一数值,则确定该块单元为非背景单元。In the embodiment of the present invention, the encoding device determines whether the block unit is a background unit in many ways, for example: the encoding device determines the pixel value of each pixel in the block unit, and determines the pixel value of the block unit in the previous frame. The sub-area has an auxiliary sub-area with the same position, and the encoding device will determine the pixel value of each pixel in the auxiliary block unit that has the same position as the above-mentioned block unit in the auxiliary sub-area, and calculate the pixel points in the block unit in turn The difference between the pixel value of and its corresponding pixel value in the auxiliary block unit, after calculating all the differences, sum the absolute values of all the differences, and compare the sum with the preset third value For comparison, if the sum value is less than the preset third value, then the block unit is determined to be a background unit, and if the sum value is greater than or equal to the preset first value, then the block unit is determined to be a non-background unit.
或者,又例如:编码装置确定块单元中的每一个像素点的像素值,并确定在上一帧中与块单元所属的子区域具有相同位置的辅助子区域,编码装置将确定在该辅助子区域中与上述的块单元具有相同位置的辅助块单元中的每一个像素点的像素值,依次计算块单元中的像素点的像素值与其在辅助块单元中对应的像素值之间的差值,在计算得到所有的差值之后,将所有的差值求和并计算绝对值,将该绝对值与预先设置的第四数值进行比较,若该绝对值小于预先设置的第四数值,则确定该块单元为背景单元,若该和值大于或等于该预先设置的第一数值,则确定该块单元为非背景单元。Or, another example: the coding device determines the pixel value of each pixel in the block unit, and determines the auxiliary sub-region that has the same position as the sub-region to which the block unit belongs in the previous frame, and the coding device will determine that the sub-region in the auxiliary sub-region The pixel value of each pixel point in the auxiliary block unit that has the same position as the above block unit in the area, and calculate the difference between the pixel value of the pixel point in the block unit and its corresponding pixel value in the auxiliary block unit in turn , after calculating all the differences, sum all the differences and calculate the absolute value, compare the absolute value with the preset fourth value, if the absolute value is less than the preset fourth value, then determine The block unit is a background unit, and if the sum value is greater than or equal to the preset first value, it is determined that the block unit is a non-background unit.
在本发明实施例中,若遍历到的块单元为背景单元,则编码装置将从帧的参考帧中,复制与块单元对应位置的图像,将复制得到的图像作为块单元编码后的图像。其中,从帧的参考帧中复制与块单元对应位置的图像具体包括:在帧的参考帧中,确定与该块单元所属的子区域具有对应位置的参考子区域;复制该参考子区域内与该块单元对应位置的图像。In the embodiment of the present invention, if the traversed block unit is a background unit, the encoding device will copy the image corresponding to the block unit from the reference frame of the frame, and use the copied image as the encoded image of the block unit. Wherein, copying the image corresponding to the block unit from the reference frame of the frame specifically includes: in the reference frame of the frame, determining a reference sub-region having a corresponding position with the sub-region to which the block unit belongs; copying the image in the reference sub-region and The block unit corresponds to the location of the image.
其中,若遍历到的块单元为非背景单元时,编码装置将按照已有的编码方式得到该块块单元编码后的图像。Wherein, if the traversed block unit is a non-background unit, the encoding device will obtain the encoded image of the block unit according to the existing encoding method.
在本发明实施例中,在子区域为非背景区域时,对该子区域内的块单元进行遍历,若遍历到的块单元为背景单元,则从帧的参考帧中,复制与块单元对应位置的图像将复制得到的图像作为块单元编码后的图像,使得在块单元为背景单元时,可通过复制的方式得到该块单元编码后的图像,而不需要通过现有编码方式对块单元进行编码,有效降低编码的复杂度及所需要的时间,提高编码效率。In the embodiment of the present invention, when the sub-area is a non-background area, the block unit in the sub-area is traversed, and if the traversed block unit is a background unit, copy the corresponding block unit from the reference frame of the frame The image of the position uses the copied image as the image encoded by the block unit, so that when the block unit is the background unit, the image encoded by the block unit can be obtained by copying, without using the existing encoding method to encode the block unit Encoding can effectively reduce the complexity and time required for encoding, and improve encoding efficiency.
在本发明实施例中,为了在解码过程中能够识别为背景单元的块单元,在编码过程中可以对确定为背景单元的块单元设置第二背景标识符,请参阅图4,为本发明图3所示实施例的追加步骤的流程示意图,包括:In the embodiment of the present invention, in order to be able to identify the block unit as the background unit in the decoding process, the second background identifier can be set for the block unit determined as the background unit in the encoding process, please refer to FIG. 4, which is a diagram of the present invention A schematic flow chart of the additional steps of the embodiment shown in 3, including:
步骤401、当遍历到的块单元为背景单元时,为块单元设置第二背景标识符,第二背景标识符用于在解码过程中识别块单元为背景单元。Step 401. When the traversed block unit is a background unit, set a second background identifier for the block unit, and the second background identifier is used to identify the block unit as a background unit during decoding.
在本发明实施例中,当编码装置确定块单元为背景单元时,为块单元设置第二背景标识符,该第二背景标识符用于在解码过程中识别块单元为背景单元,使得在解码过程中可以通过判断块单元是否包含第二背景标识符的方式确定该块单元是否为背景单元。In the embodiment of the present invention, when the encoding device determines that a block unit is a background unit, a second background identifier is set for the block unit, and the second background identifier is used to identify the block unit as a background unit during decoding, so that In the process, it may be determined whether the block unit is a background unit by judging whether the block unit contains the second context identifier.
其中,块单元中已设置标识位,该标识位用于表示该块单元是否为背景单元,当该标识位的值为1时说明该块单元为背景单元,当该标识位的值为0时说明该块单元为非背景单元。且在编码之前,块单元的标识位的值均为0,当编码装置确定该块单元为背景单元之后,将设置该标识位的值为1,即为块单元设置了第二背景标识符。在HEVC协议中,可以设置标识位为cu_mv_0_flag,且该标识位可以设置在prediction_uint()函数中。Wherein, an identification bit has been set in the block unit, and the identification bit is used to indicate whether the block unit is a background unit. When the value of the identification bit is 1, it indicates that the block unit is a background unit. When the value of the identification bit is 0 Indicates that the block unit is a non-background unit. And before encoding, the value of the identification bit of the block unit is 0, when the encoding device determines that the block unit is a background unit, the value of the identification bit will be set to 1, that is, the second background identifier is set for the block unit. In the HEVC protocol, the flag can be set to cu_mv_0_flag, and the flag can be set in the prediction_uint() function.
其中,为块单元设置第二背景标识符是为了在解码的过程中能够通过判断块单元是否包含第二背景标识符确定该块单元是否为背景单元。Wherein, setting the second background identifier for the block unit is to determine whether the block unit is a background unit by judging whether the block unit contains the second background identifier during the decoding process.
在本发明实施例中编码过程中,当遍历到的块单元为背景单元时,为块单元设置第二背景标识符,使得对该块单元进行解码的过程中,可通过复制的方式得到该块单元解码后的图像,而不需要通过现有解码方式对该块单元进行解码,有效降低解码的复杂度及所需要的时间,提高解码效率。In the encoding process in the embodiment of the present invention, when the traversed block unit is a background unit, a second background identifier is set for the block unit, so that the block can be obtained by copying in the process of decoding the block unit The image decoded by the unit does not need to be decoded by the existing decoding method, which effectively reduces the complexity and time required for decoding, and improves the decoding efficiency.
请参阅图5,为本发明第二实施例中视频编码方法的流程示意图,包括:Please refer to FIG. 5, which is a schematic flowchart of a video encoding method in the second embodiment of the present invention, including:
步骤501、当帧的子区域为背景区域时,为子区域设置第一背景标识符,第一背景标识符用于在解码过程中识别子区域为背景区域,使得在对子区域进行解码时,解码装置从帧的解码参考帧中复制与子区域对应位置的图像,将复制得到的图像作为子区域解码后的图像;Step 501, when the sub-region of the frame is a background region, set a first background identifier for the sub-region, and the first background identifier is used to identify the sub-region as a background region during the decoding process, so that when decoding the sub-region, The decoding device copies the image corresponding to the sub-region from the decoding reference frame of the frame, and uses the copied image as the decoded image of the sub-region;
步骤502、获取子区域编码后的图像。Step 502. Acquire the coded image of the sub-region.
在本发明实施例中,编码装置在对帧进行编码时,若确定该帧的子区域为背景区域,则为该子区域设置第一背景标识符,该第一背景标识符用于在解码过程中识别子区域为背景区域,使得解码装置在对该子区域进行解码时,可从该帧的解码参考帧中复制与该子区域对应位置的图像。In this embodiment of the present invention, when encoding a frame, if the encoding device determines that the sub-area of the frame is a background area, it sets a first background identifier for the sub-area, and the first background identifier is used in the decoding process. Identifying the sub-area as the background area, so that when the decoding device decodes the sub-area, it can copy the image corresponding to the sub-area from the decoding reference frame of the frame.
其中,解码参考帧是指帧在解码时的参考帧。Wherein, the decoding reference frame refers to a reference frame when the frame is decoded.
在本发明实施例中,编码装置在为属于背景区域的子区域设置第一背景标识符之后,还将获取该子区域编码后的图像。In the embodiment of the present invention, after the encoding device sets the first background identifier for the sub-area belonging to the background area, it will also acquire the encoded image of the sub-area.
在本发明实施例中,通过在编码过程中,为属于背景区域的子区域设置第一背景标识符,使得在解码过程中可以通过复制图像的方式得到该子区域解码后的图像,而不需要按照现有解码方式得到该子区域解码后的图形,有效降低解码的复杂度及所需要的时间,提高解码效率。In the embodiment of the present invention, by setting the first background identifier for the sub-region belonging to the background region during the encoding process, the decoded image of the sub-region can be obtained by copying the image during the decoding process without the need The decoded graphics of the sub-region are obtained according to the existing decoding method, which effectively reduces the decoding complexity and required time, and improves the decoding efficiency.
优选的,在本发明实施例中,编码装置在执行图5所示实施例中的步骤502时,可以按照如下的步骤执行,具体包括:Preferably, in the embodiment of the present invention, when the encoding device executes step 502 in the embodiment shown in FIG. 5 , it may execute according to the following steps, specifically including:
从帧的编码参考帧中,复制与子区域对应位置的图像作为子区域编码后的图像。From the coded reference frame of the frame, the image corresponding to the position of the sub-region is copied as the coded image of the sub-region.
其中,编码参考帧是指帧在编码过程中的参考帧。Wherein, the coding reference frame refers to a reference frame during the coding process of the frame.
在本发明实施例中,编码装置在确定帧的子区域为背景区域时,可从该帧的编码参考帧中,复制与子区域对应位置的图像作为该子区域编码后的图像,使得不需要通过现有编码方式对该子区域进行编码,有效降低编码的复杂度及所需要的时间,提高编码效率。In the embodiment of the present invention, when the encoding device determines that the sub-area of the frame is the background area, it can copy the image corresponding to the sub-area from the encoding reference frame of the frame as the encoded image of the sub-area, so that no Encoding the sub-region by means of an existing encoding method can effectively reduce encoding complexity and required time, and improve encoding efficiency.
请参阅图6,为本发明图5所示第二实施例追加步骤的流程示意图,包括:Please refer to FIG. 6, which is a schematic flow chart of the additional steps of the second embodiment shown in FIG. 5 of the present invention, including:
步骤601、当子区域为非背景区域时,遍历子区域内的块单元,若遍历到的块单元为背景单元,则为块单元设置第二背景标识符,第二背景标识符用于在解码过程中识别块单元为背景单元,使得在对块单元进行解码时,解码装置从帧的解码参考帧中复制与块单元对应位置的图像,将复制得到的图像作为块单元解码后的图像;Step 601. When the sub-area is a non-background area, traverse the block units in the sub-area. If the traversed block unit is a background unit, set a second background identifier for the block unit. The second background identifier is used in decoding In the process, the block unit is identified as the background unit, so that when the block unit is decoded, the decoding device copies the image corresponding to the block unit from the decoding reference frame of the frame, and uses the copied image as the decoded image of the block unit;
步骤603、获取块单元编码后的图像。Step 603, acquire the encoded image in block units.
在本发明实施例中,编码装置在确定子区域为非背景区域时,将进一步遍历该子区域内的块单元,且若遍历到的块单元为背景单元,则为该块单元设置第二背景标识符,该第二背景标识符用于在解码过程中识别块单元为背景单元,使得在对该属于背景单元的块单元进行解码时,解码装置可从该帧的解码参考帧中复制与该块单元对应位置的图像,将复制得到的图像作为块单元解码后的图像。In the embodiment of the present invention, when the encoding device determines that a sub-area is a non-background area, it will further traverse the block units in the sub-area, and if the traversed block unit is a background unit, set a second background for the block unit identifier, the second context identifier is used to identify the block unit as a background unit in the decoding process, so that when decoding the block unit belonging to the background unit, the decoding device can copy from the decoding reference frame of the frame and the For the image at the corresponding position of the block unit, the copied image is used as the decoded image of the block unit.
其中,编码装置在为块单元设置第二背景标识符之后,将获取该块单元编码后的图像。Wherein, after the encoding device sets the second background identifier for the block unit, it will acquire the encoded image of the block unit.
在本发明实施例中,通过在编码过程中,为属于背景单元的块单元设置第二背景标识符,使得在解码过程中可以通过复制图像的方式得到该子区域解码后的图像,而不需要按照现有解码方式得到该子区域解码后的图像,有效降低解码的复杂度及所需要的时间,提高解码效率。In the embodiment of the present invention, by setting the second background identifier for the block unit belonging to the background unit during the encoding process, the decoded image of the sub-region can be obtained by copying the image during the decoding process without the need for The decoded image of the sub-region is obtained according to the existing decoding method, which effectively reduces the decoding complexity and required time, and improves the decoding efficiency.
优选的,在本发明实施例中,编码装置在执行图6所示的步骤602时,具体可以按照如下内容执行,包括:Preferably, in the embodiment of the present invention, when the encoding device executes step 602 shown in FIG. 6 , it may specifically execute as follows, including:
从帧的编码参考帧中,复制与块单元对应位置的图像作为该块单元编码后的图像。From the coded reference frame of the frame, the image corresponding to the block unit is copied as the coded image of the block unit.
其中,编码参考帧是指帧在编码过程中的参考帧。Wherein, the coding reference frame refers to a reference frame during the coding process of the frame.
在本发明实施例中,编码装置在确定遍历到的块单元为背景单元时,可从该帧的编码参考帧中,复制与该块单元对应位置的图像作为该块单元编码后的图像,使得不需要通过现有编码方式对该块单元进行编码,有效降低编码的复杂度及所需要的时间,提高编码效率。In the embodiment of the present invention, when the encoding device determines that the traversed block unit is a background unit, it can copy the image corresponding to the block unit from the encoding reference frame of the frame as the encoded image of the block unit, so that The block unit does not need to be encoded in an existing encoding manner, effectively reducing encoding complexity and required time, and improving encoding efficiency.
图1至图6描述了视频编码方法的详细技术方案,下面将介绍本发明实施例中的视频解码方法的详细技术方案,请参阅图7,为本发明第三实施例中的视频解码方法的流程示意图,该方法包括:Figures 1 to 6 describe the detailed technical solutions of the video encoding method, and the detailed technical solutions of the video decoding method in the embodiment of the present invention will be introduced below, please refer to Figure 7, which is the detailed technical solution of the video decoding method in the third embodiment of the present invention Schematic diagram of the process, the method comprising:
步骤701、当帧的子区域包含第一背景标识符时,从帧的参考帧中复制与子区域对应位置的图像,将复制得到的图像作为子区域解码后的图像,第一背景标识符用于识别子区域为背景区域。Step 701, when the sub-region of the frame contains the first background identifier, copy the image corresponding to the sub-region from the reference frame of the frame, and use the copied image as the decoded image of the sub-region, and use the first background identifier To identify the sub-region as the background region.
在本发明实施例中,解码装置在对帧的子区域进行解码时,将确定该子区域是否包含第一背景标识符,当解码装置确定子区域包含第一背景标识符时,解码装置从帧的参考帧中,复制与该子区域对应位置的图像,将复制得到的图像作为子区域解码后的图像。In the embodiment of the present invention, when the decoding device decodes the sub-region of the frame, it will determine whether the sub-region contains the first background identifier, and when the decoding device determines that the sub-region contains the first background identifier, the decoding device will determine from the frame In the reference frame of , the image corresponding to the sub-region is copied, and the copied image is used as the decoded image of the sub-region.
在本发明实施例中的视频解码方法中,解码装置在确定子区域为背景区域的情况下,可通过复制参考帧中与该子区域对应位置的图像,将复制得到的图像作为该子区域解码后的图像,而不需要按照现有编码方式对子区域进行解码,有效降低解码复杂度及解码所需要的时间,提高解码效率。In the video decoding method in the embodiment of the present invention, when the decoding device determines that the sub-region is a background region, it can decode the copied image as the sub-region by copying the image corresponding to the sub-region in the reference frame The resulting image does not need to decode the sub-region according to the existing coding method, which effectively reduces the decoding complexity and the time required for decoding, and improves the decoding efficiency.
请参阅图8,为本发明图7所示第三实施例的追加步骤的流程示意图,包括:Please refer to FIG. 8, which is a schematic flow chart of the additional steps of the third embodiment shown in FIG. 7 of the present invention, including:
步骤801、当子区域未包含第一背景标识符时,若子区域中存在包含第二背景标识符的块单元,则从帧的参考帧中复制与块单元对应位置的图像,将复制得到的图像作为块单元解码后的图像,第二背景标识符用于识别块单元为背景单元。Step 801, when the sub-region does not contain the first background identifier, if there is a block unit containing the second background identifier in the sub-region, copy the image corresponding to the block unit from the reference frame of the frame, and copy the obtained image As the decoded image of the block unit, the second background identifier is used to identify the block unit as the background unit.
在本发明实施例中,解码装置在确定帧的子区域未包含第一背景标识符时,将确定该子区域内的块单元中是否存在包含第二背景标识符的块单元。若该子区域的中存在包含第二背景标识符的块单元,则从该子区域所属的帧的参考帧中复制与该子区域对应位置的图形,将复制得到的图像作为子区域解码后的图像,其中,该第二背景标识符用于标识块单元为背景单元。In the embodiment of the present invention, when the decoding device determines that the sub-region of the frame does not contain the first background identifier, it will determine whether there is a block unit containing the second background identifier among the block units in the sub-region. If there is a block unit containing the second background identifier in the sub-region, copy the graphics corresponding to the sub-region from the reference frame of the frame to which the sub-region belongs, and use the copied image as the decoded sub-region In the image, the second background identifier is used to identify the block unit as a background unit.
在本发明实施例中,在确定块单元未包含第二背景标识符的情况下,解码装置将按照现有解码方式进行解码,此处不做赘述。In the embodiment of the present invention, when it is determined that the block unit does not contain the second context identifier, the decoding device will perform decoding according to the existing decoding method, which will not be described in detail here.
在本发明实施例中的视频解码方法中,在确定子区域未包含第一背景标识符的情况下,若该子区域中存在包含第二背景标识符的块单元,不需要对该块单元按照现有解码方式进行解码,而通过复制图像的方式得到该块单元的解码后的图像,能够有效降低解码复杂度及解码所需要的时间,提高解码效率。In the video decoding method in the embodiment of the present invention, when it is determined that the sub-region does not contain the first context identifier, if there is a block unit containing the second context identifier in the sub-region, it is not necessary to follow the Decoding is performed in an existing decoding method, and the decoded image of the block unit is obtained by copying an image, which can effectively reduce decoding complexity and time required for decoding, and improve decoding efficiency.
需要说明的是,本发明实施例中描述的技术方案是基于低时延视频通讯场景的两个特征经过创造性的付出得到的,其中,一个特征为:在较大一部分时间内,画面运动量较小且静止,另一特征为:在一定时间内,有些画面只有前景对象发生左右或者上下运动,而背景部分没有发生变化。It should be noted that the technical solutions described in the embodiments of the present invention are obtained through creative efforts based on two features of the low-latency video communication scene, one of which is: in a relatively large part of the time, the picture motion is small And still, another feature is: in a certain period of time, in some pictures, only the foreground object moves left and right or up and down, while the background part does not change.
请参阅图9,为本发明第四实施例中编码装置的功能模块的示意图,该编码装置包括:Please refer to FIG. 9, which is a schematic diagram of the functional modules of the encoding device in the fourth embodiment of the present invention. The encoding device includes:
复制模块901,用于当所述帧的子区域为背景区域时,从所述帧的参考帧中复制与所述子区域对应位置的图像,将复制得到的图像作为所述子区域编码后的图像。Copy module 901, for when the sub-area of the frame is a background area, copy the image corresponding to the sub-area from the reference frame of the frame, and use the copied image as the encoded sub-area image.
在本发明实施例中,判断子区域是否为背景区域的方式有多种,例如:编码装置将确定子区域中的每一个像素点的像素值,并确定上一帧中与该子区域具有相同位置的辅助子区域中的每一个像素点的像素值,依次计算子区域中的像素点的像素值与该辅助子区域中对应位置处的像素点的像素值之间的差值,直至计算到所有差值,并将所有差值的绝对值求和,将该和值与预先设置的第一数值进行比较,若该和值小于该预先设置的第一数值,则确定该子区域为背景区域,若该和值大于或等于该预先设置的第一数值,则确定该子区域为非背景区域。即通过像素点的差值的绝对值的和判断子区域是否为背景区域。In the embodiment of the present invention, there are many ways to judge whether a sub-region is a background region. For example, the encoding device will determine the pixel value of each pixel in the sub-region, and determine that the sub-region has the same The pixel value of each pixel in the auxiliary sub-area of the position, and calculate the difference between the pixel value of the pixel in the sub-area and the pixel value of the corresponding pixel in the auxiliary sub-area until the calculated All the differences, and sum the absolute values of all the differences, compare the sum with the preset first value, if the sum is smaller than the preset first value, then determine the sub-region as the background region , if the sum value is greater than or equal to the preset first value, it is determined that the sub-area is a non-background area. That is, it is judged whether the sub-area is the background area or not by the sum of the absolute values of the difference values of the pixels.
或者,又例如:编码装置确定子区域中的每一个像素点的像素值,并确定上一帧中与该子区域具有相同位置的辅助子区域中的每一个像素点的像素值,依次计算子区域中的像素点的像素值与该复制子区域中对应位置处的像素点的像素值之间的差值,直至计算到所有差值,将该所有差值求和,并计算该和的绝对值,将该和的绝对值与预先设置的第二数值进行比较,若该和的绝对值小于该预先设置的第二数值,则确定该子区域为背景区域,若该和的绝对值大于或等于该预先设置的第一数值,则确定该子区域为非背景区域。即通过像素点的差值的和的绝对值判断子区域是否为背景区域。Or, for another example: the encoding device determines the pixel value of each pixel in the sub-region, and determines the pixel value of each pixel in the auxiliary sub-region having the same position as the sub-region in the previous frame, and calculates the sub-region in turn. The difference between the pixel value of the pixel point in the area and the pixel value of the pixel point at the corresponding position in the copied sub-region, until all the difference values are calculated, sum all the difference values, and calculate the absolute value of the sum Value, compare the absolute value of the sum with the preset second value, if the absolute value of the sum is smaller than the preset second value, then determine the sub-region as the background region, if the absolute value of the sum is greater than or If it is equal to the preset first value, then the sub-area is determined to be a non-background area. That is, it is judged whether the sub-area is the background area by the absolute value of the sum of the difference values of the pixels.
在本发明实施例中,在编码过程中,当该帧的子区域为背景区域时,复制模块901从该子区域所属的帧的参考帧中复制与该子区域对应位置的图像,将复制得到的图像作为该子区域编码后的图像,使得不需要按照现有编码方式对子区域进行编码,有效降低编码过程的复杂度,节约编码时间,提高编码效率。In the embodiment of the present invention, during the encoding process, when the sub-region of the frame is a background region, the copying module 901 copies the image corresponding to the sub-region from the reference frame of the frame to which the sub-region belongs, and obtains The image of the sub-region is used as the coded image of the sub-region, so that the sub-region does not need to be coded according to the existing coding method, the complexity of the coding process is effectively reduced, the coding time is saved, and the coding efficiency is improved.
请参阅图10,为本发明图9所示第四实施例的追加功能模块的示意图,包括:Please refer to FIG. 10, which is a schematic diagram of the additional functional modules of the fourth embodiment shown in FIG. 9 of the present invention, including:
第一设置模块1001,用于当所述子区域为背景区域时,为所述子区域设置第一背景标识符,所述第一背景标识符用于在解码过程中识别所述子区域为背景区域。A first setting module 1001, configured to set a first background identifier for the sub-region when the sub-region is a background region, and the first background identifier is used to identify the sub-region as a background during decoding area.
在本发明实施例中,每一个子区域都设置了一个用于标识该子区域是否为背景区域的标识位,且该标识位为0时,表明子区域为非背景区域,该标识位为1时,表明子区域为背景区域,且在未判断子区域是否为背景区域之前,该标识位的值为0。当编码装置确定子区域为背景区域时,可设置该标识位的值为1,即完成为该子区域设置第一背景标识符的操作。且当编码装置确定子区域不是背景区域时,将不对该标识位进行操作。In the embodiment of the present invention, each sub-area is provided with an identification bit for identifying whether the sub-area is a background area, and when the identification bit is 0, it indicates that the sub-area is a non-background area, and the identification bit is 1 When , it indicates that the sub-area is a background area, and the value of the identification bit is 0 before judging whether the sub-area is a background area. When the encoding device determines that the sub-area is a background area, it can set the value of the identification bit to 1, that is, the operation of setting the first background identifier for the sub-area is completed. And when the encoding device determines that the sub-area is not a background area, it will not operate on the flag.
在本发明实施例中,编码装置在确定子区域为背景区域时,第一设置模块1001将为该背景区域设置第一背景标识符,该第一背景标识符用于在解码过程中识别该子区域为背景区域,使得在解码时,可以通过复制该子区域所属帧的参考帧对应位置的图像的方式实现解码过程,使得不需要通过现有解码方式对子区域进行解码,有效降低解码过程的复杂度,节约解码时间,提高解码效率。In the embodiment of the present invention, when the encoding device determines that a sub-area is a background area, the first setting module 1001 will set a first background identifier for the background area, and the first background identifier is used to identify the sub-area in the decoding process. The area is the background area, so that when decoding, the decoding process can be realized by copying the image corresponding to the reference frame of the frame to which the sub-area belongs, so that the sub-area does not need to be decoded by the existing decoding method, effectively reducing the decoding process. complexity, saving decoding time and improving decoding efficiency.
请参阅图11,为图9所示第四实施例追加功能模块的示意图,包括:Please refer to FIG. 11, which is a schematic diagram of additional functional modules of the fourth embodiment shown in FIG. 9, including:
遍历及复制模块1101,用于当所述子区域为非背景区域时,遍历所述子区域内的块单元,若遍历到的块单元为背景单元,则从所述帧的参考帧中复制与所述块单元对应位置的图像,将复制得到的图像作为所述块单元编码后的图像。The traversal and copying module 1101 is used to traverse the block units in the sub-area when the sub-area is a non-background area, and if the traversed block unit is a background unit, then copy and For the image at the corresponding position of the block unit, the copied image is used as the encoded image of the block unit.
在本发明实施例中,编码装置确定块单元是否为背景单元多很多种方式,例如:编码装置确定块单元中的每一个像素点的像素值,并确定在上一帧中与块单元所属的子区域具有相同位置的辅助子区域,编码装置将确定在该辅助子区域中与上述的块单元具有相同位置的辅助块单元中的每一个像素点的像素值,依次计算块单元中的像素点的像素值与其在辅助块单元中对应的像素值之间的差值,在计算得到所有的差值之后,将所有的差值的绝对值求和,将该和值与预先设置的第三数值进行比较,若该和值小于预先设置的第三数值,则确定该块单元为背景单元,若该和值大于或等于该预先设置的第一数值,则确定该块单元为非背景单元。In the embodiment of the present invention, the encoding device determines whether the block unit is a background unit in many ways, for example: the encoding device determines the pixel value of each pixel in the block unit, and determines the pixel value of the block unit in the previous frame. The sub-area has an auxiliary sub-area with the same position, and the encoding device will determine the pixel value of each pixel in the auxiliary block unit that has the same position as the above-mentioned block unit in the auxiliary sub-area, and calculate the pixel points in the block unit in turn The difference between the pixel value of and its corresponding pixel value in the auxiliary block unit, after calculating all the differences, sum the absolute values of all the differences, and compare the sum with the preset third value For comparison, if the sum value is less than the preset third value, then the block unit is determined to be a background unit, and if the sum value is greater than or equal to the preset first value, then the block unit is determined to be a non-background unit.
或者,又例如:编码装置确定块单元中的每一个像素点的像素值,并确定在上一帧中与块单元所属的子区域具有相同位置的辅助子区域,编码装置将确定在该辅助子区域中与上述的块单元具有相同位置的辅助块单元中的每一个像素点的像素值,依次计算块单元中的像素点的像素值与其在辅助块单元中对应的像素值之间的差值,在计算得到所有的差值之后,将所有的差值求和并计算绝对值,将该绝对值与预先设置的第四数值进行比较,若该绝对值小于预先设置的第四数值,则确定该块单元为背景单元,若该和值大于或等于该预先设置的第一数值,则确定该块单元为非背景单元。Or, another example: the coding device determines the pixel value of each pixel in the block unit, and determines the auxiliary sub-region that has the same position as the sub-region to which the block unit belongs in the previous frame, and the coding device will determine that the sub-region in the auxiliary sub-region The pixel value of each pixel point in the auxiliary block unit that has the same position as the above block unit in the area, and calculate the difference between the pixel value of the pixel point in the block unit and its corresponding pixel value in the auxiliary block unit in turn , after calculating all the differences, sum all the differences and calculate the absolute value, compare the absolute value with the preset fourth value, if the absolute value is less than the preset fourth value, then determine The block unit is a background unit, and if the sum value is greater than or equal to the preset first value, it is determined that the block unit is a non-background unit.
在本发明实施例中,在子区域为非背景区域时,遍历及复制模块1101对该子区域内的块单元进行遍历,若遍历到的块单元为背景单元,则从帧的参考帧中,复制与块单元对应位置的图像将复制得到的图像作为块单元编码后的图像,使得在块单元为背景单元时,可通过复制的方式得到该块单元编码后的图像,而不需要通过现有编码方式对块单元进行编码,有效降低编码的复杂度及所需要的时间,提高编码效率。In the embodiment of the present invention, when the sub-area is a non-background area, the traversal and copy module 1101 traverses the block units in the sub-area, and if the traversed block unit is a background unit, from the reference frame of the frame, Copy the image corresponding to the block unit and use the copied image as the coded image of the block unit, so that when the block unit is the background unit, the coded image of the block unit can be obtained by copying without using the existing The encoding method encodes block units, which effectively reduces the complexity and time required for encoding, and improves encoding efficiency.
请参阅图12,为本发明图11所示实施例追加功能模块的示意图,包括:Please refer to FIG. 12 , which is a schematic diagram of adding functional modules to the embodiment shown in FIG. 11 of the present invention, including:
第二设置模块1201,用于若遍历到的块单元为背景单元,则为所述块单元设置第二背景标识符,所述第二背景标识符用于在解码过程中识别所述块单元为背景单元。The second setting module 1201 is configured to set a second background identifier for the block unit if the traversed block unit is a background unit, and the second background identifier is used to identify the block unit as background unit.
其中,块单元中已设置标识位,该标识位用于表示该块单元是否为背景单元,当该标识位的值为1时说明该块单元为背景单元,当该标识位的值为0时说明该块单元为非背景单元。且在编码之前,块单元的标识位的值均为0,当编码装置确定该块单元为背景单元之后,将设置该标识位的值为1,即为块单元设置了第二背景标识符。在HEVC协议中,可以设置标识位为cu_mv_0_flag,且该标识位可以设置在prediction_uint()函数中。Wherein, an identification bit has been set in the block unit, and the identification bit is used to indicate whether the block unit is a background unit. When the value of the identification bit is 1, it indicates that the block unit is a background unit. When the value of the identification bit is 0 Indicates that the block unit is a non-background unit. And before encoding, the value of the identification bit of the block unit is 0, when the encoding device determines that the block unit is a background unit, the value of the identification bit will be set to 1, that is, the second background identifier is set for the block unit. In the HEVC protocol, the flag can be set to cu_mv_0_flag, and the flag can be set in the prediction_uint() function.
其中,为块单元设置第二背景标识符是为了在解码的过程中能够通过判断块单元是否包含第二背景标识符确定该块单元是否为背景单元。Wherein, setting the second background identifier for the block unit is to determine whether the block unit is a background unit by judging whether the block unit contains the second background identifier during the decoding process.
在本发明实施例中编码过程中,当遍历到的块单元为背景单元时,第二设置模块1201为块单元设置第二背景标识符,使得对该块单元进行解码的过程中,可通过复制的方式得到该块单元解码后的图像,而不需要通过现有解码方式对该块单元进行解码,有效降低解码的复杂度及所需要的时间,提高解码效率。In the encoding process in the embodiment of the present invention, when the traversed block unit is a background unit, the second setting module 1201 sets the second background identifier for the block unit, so that in the process of decoding the block unit, copying The decoded image of the block unit is obtained in a manner without decoding the block unit through the existing decoding method, which effectively reduces decoding complexity and time required, and improves decoding efficiency.
请参阅图13,为本发明第五实施例中编码装置的功能模块的示意图,包括:Please refer to Figure 13, which is a schematic diagram of the functional modules of the encoding device in the fifth embodiment of the present invention, including:
第三设置模块1301,用于当帧的子区域为背景区域时,为所述子区域设置第一背景标识符,所述第一背景标识符用于在解码过程中识别所述子区域为背景区域,使得在对所述子区域进行解码时,解码装置从所述帧的解码参考帧中复制与所述子区域对应位置的图像,将复制得到的图像作为所述子区域解码后的图像;A third setting module 1301, configured to set a first background identifier for the sub-region when the sub-region of the frame is a background region, and the first background identifier is used to identify the sub-region as a background during the decoding process an area, such that when decoding the sub-area, the decoding device copies the image corresponding to the sub-area from the decoding reference frame of the frame, and uses the copied image as the decoded image of the sub-area;
第一获取模块1302,用于获取所述子区域编码后的图像。The first obtaining module 1302 is configured to obtain the coded image of the sub-region.
优选的,本发明实施例中的第一获取模块1302具体用于从所述帧的编码参考帧中,复制与所述子区域对应位置的图像作为所述子区域编码后的图像。Preferably, the first obtaining module 1302 in the embodiment of the present invention is specifically configured to copy an image at a position corresponding to the sub-region from the coding reference frame of the frame as the coded image of the sub-region.
在本发明实施例中,在对子区域进行编码时,若该子区域为背景区域,第三设置模块1301为该子区域设置第一背景标识符,使得在解码过程中可以通过复制图像的方式得到该子区域解码后的图像,而不需要按照现有解码方式得到该子区域解码后的图形,有效降低解码的复杂度及所需要的时间,提高解码效率。In the embodiment of the present invention, when encoding a sub-region, if the sub-region is a background region, the third setting module 1301 sets the first background identifier for the sub-region, so that the image can be copied during the decoding process. The decoded image of the sub-region is obtained without obtaining the decoded graphics of the sub-region according to the existing decoding method, which effectively reduces the complexity and time required for decoding, and improves decoding efficiency.
请参阅图14,为本发明图13所示实施例中追加功能模块的示意图,包括:Please refer to Figure 14, which is a schematic diagram of additional functional modules in the embodiment shown in Figure 13 of the present invention, including:
遍历及设置模块1401,用于当所述子区域为非背景区域时,遍历所述子区域内的块单元,若遍历到的块单元为背景单元,则为所述块单元设置第二背景标识符,所述第二背景标识符用于在解码过程中识别所述块单元为背景单元,使得在对所述块单元进行解码时,解码装置从所述帧的解码参考帧中复制与所述块单元对应位置的图像,将复制得到的图像作为所述块单元解码后的图像;The traversal and setting module 1401 is used for traversing the block units in the sub-area when the sub-area is a non-background area, and setting a second background identifier for the block unit if the block unit traversed is a background unit character, the second context identifier is used to identify the block unit as a background unit during the decoding process, so that when decoding the block unit, the decoding device copies from the decoding reference frame of the frame the same as the The image corresponding to the position of the block unit, and the copied image is used as the decoded image of the block unit;
第二获取模块1402,用于获取所述块单元编码后的图像。The second acquiring module 1402 is configured to acquire the encoded image of the block unit.
优选的,第二获取模块1402具体用于:从所述帧的编码参考帧中,复制与所述块单元对应位置的图像作为所述块单元编码后的图像。Preferably, the second obtaining module 1402 is specifically configured to: copy an image corresponding to the block unit from the encoding reference frame of the frame as the encoded image of the block unit.
在本发明实施例中,在子区域为非背景区域时,遍历及设置模块1401遍历该子区域内的块单元,且遍历到的块单元为背景单元时,为块单元设置第二背景标识符,使得在解码过程中可以通过复制图像的方式得到该子区域解码后的图像,而不需要按照现有解码方式得到该子区域解码后的图像,有效降低解码的复杂度及所需要的时间,提高解码效率。In the embodiment of the present invention, when the sub-area is a non-background area, the traversal and setting module 1401 traverses the block units in the sub-area, and when the traversed block unit is a background unit, sets the second background identifier for the block unit , so that the decoded image of the sub-region can be obtained by copying the image in the decoding process, without the need to obtain the decoded image of the sub-region according to the existing decoding method, effectively reducing the complexity of decoding and the time required, Improve decoding efficiency.
请参阅图15,为本发明第六实施例中解码装置的功能模块示意图,包括:Please refer to FIG. 15, which is a schematic diagram of the functional modules of the decoding device in the sixth embodiment of the present invention, including:
第一图像复制模块1501,用于当帧的子区域包含第一背景标识符时,从所述帧的参考帧中复制与所述子区域对应位置的图像,将复制得到的图像作为所述子区域解码后的图像,所述第一背景标识符用于标识所述子区域为背景区域。The first image copying module 1501 is configured to, when the sub-area of the frame contains the first background identifier, copy the image corresponding to the sub-area from the reference frame of the frame, and use the copied image as the sub-area In an image after region decoding, the first background identifier is used to identify the subregion as a background region.
在本发明实施例中,解码装置在确定子区域为背景区域的情况下,编码装置中的第一图像复制模块1501复制参考帧中与该子区域对应位置的图像,将复制得到的图像作为该子区域解码后的图像,而不需要按照现有编码方式对子区域进行解码,有效降低解码复杂度及解码所需要的时间,提高解码效率。In the embodiment of the present invention, when the decoding device determines that the sub-region is the background region, the first image copying module 1501 in the encoding device copies the image corresponding to the sub-region in the reference frame, and uses the copied image as the background region. The decoded image of the sub-region does not need to decode the sub-region according to the existing encoding method, which effectively reduces the decoding complexity and the time required for decoding, and improves the decoding efficiency.
请参阅图16,为本发明图15所示实施例的追加功能模块的示意图,包括:Please refer to Figure 16, which is a schematic diagram of the additional functional modules of the embodiment shown in Figure 15 of the present invention, including:
第二图像复制模块1601,用于当所述子区域未包含第一背景标识符时,若所述子区域中存在包含第二背景标识符的块单元,则从所述帧的参考帧中复制与所述块单元对应位置的图像,将复制得到的图像作为所述块单元解码后的图像,所述第二背景标识符用于标识所述块单元为背景单元。The second image copying module 1601 is used to copy from the reference frame of the frame if there is a block unit containing the second background identifier in the sub-region when the sub-region does not contain the first background identifier For the image corresponding to the block unit, the copied image is used as the decoded image of the block unit, and the second background identifier is used to identify the block unit as a background unit.
在本发明实施例中,解码装置在确定子区域未包含第一背景标识符的情况下,若该子区域中存在包含第二背景标识符的块单元,则第二图像复制模块1601从帧的参考帧中复制与该块单元对应位置的图像,将复制得到的图像作为该块单元解码后的图像,使得不需要对该块单元按照现有解码方式进行解码,能够有效降低解码复杂度及解码所需要的时间,提高解码效率。In the embodiment of the present invention, when the decoding device determines that the sub-area does not contain the first background identifier, if there is a block unit containing the second background identifier in the sub-area, the second image copying module 1601 starts from the frame Copy the image corresponding to the block unit in the reference frame, and use the copied image as the decoded image of the block unit, so that the block unit does not need to be decoded according to the existing decoding method, which can effectively reduce the decoding complexity and decoding The time required to improve decoding efficiency.
请参阅图17,为本发明第六实施例中的编解码系统的功能模块的示意图,包括:如图10至15任一项所示实施例中的编码装置1701,及如图15或16所示实施例中的解码装置1702。Please refer to Figure 17, which is a schematic diagram of the functional modules of the codec system in the sixth embodiment of the present invention, including: the encoding device 1701 in the embodiment shown in any one of Figures 10 to 15, and as shown in Figure 15 or 16 Decoding device 1702 in the illustrated embodiment.
在本发明实施例中,编码装置1701及解码装置1702都可以通过复制参考帧的方式得到编解码的图像,而不需要通过现有的编解码方式得到编解码的图像,有效降低编解码的复杂度及减少编解码时间,提高编解码效率。In the embodiment of the present invention, both the encoding device 1701 and the decoding device 1702 can obtain the encoded and decoded image by copying the reference frame, without the need to obtain the encoded and decoded image through the existing encoding and decoding method, effectively reducing the complexity of the encoding and decoding Speed and reduce codec time, improve codec efficiency.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本发明各个实施例的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus a necessary general-purpose hardware platform, and of course also by hardware, but in many cases the former is better implementation. Based on such an understanding, the essence of the technical solution of the present invention or the part that contributes to the prior art can be embodied in the form of software products, and the computer software products are stored in a storage medium (such as ROM/RAM, disk, CD) contains several instructions to make a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) execute the methods of various embodiments of the present invention.
以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the description of the present invention and the contents of the accompanying drawings, or directly or indirectly used in other related technical fields , are all included in the scope of patent protection of the present invention in the same way.
Claims (21)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610013918.9A CN106954082A (en) | 2016-01-07 | 2016-01-07 | Video encoding and decoding method, encoding and decoding device and system |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610013918.9A CN106954082A (en) | 2016-01-07 | 2016-01-07 | Video encoding and decoding method, encoding and decoding device and system |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN106954082A true CN106954082A (en) | 2017-07-14 |
Family
ID=59466224
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201610013918.9A Withdrawn CN106954082A (en) | 2016-01-07 | 2016-01-07 | Video encoding and decoding method, encoding and decoding device and system |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN106954082A (en) |
Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP4195969B2 (en) * | 2002-08-05 | 2008-12-17 | パナソニック株式会社 | Motion vector detection device |
| CN101742296A (en) * | 2008-11-14 | 2010-06-16 | 北京中星微电子有限公司 | Video encoding and decoding method and device capable of reducing stream data fluctuation |
| CN101742289A (en) * | 2008-11-14 | 2010-06-16 | 北京中星微电子有限公司 | Video code stream compression method, system and device |
| CN102150429A (en) * | 2008-09-11 | 2011-08-10 | 谷歌公司 | System and method for video encoding using constructed reference frame |
| CN103716641A (en) * | 2012-09-29 | 2014-04-09 | 浙江大学 | Predicted image generating method and predicted image generating device |
| CN103731669A (en) * | 2013-12-30 | 2014-04-16 | 广州华多网络科技有限公司 | Method and device for detecting SKIP macro block |
| CN104754333A (en) * | 2015-03-09 | 2015-07-01 | 湖南国科微电子有限公司 | Movement pre-estimation method used for monitoring scene |
-
2016
- 2016-01-07 CN CN201610013918.9A patent/CN106954082A/en not_active Withdrawn
Patent Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP4195969B2 (en) * | 2002-08-05 | 2008-12-17 | パナソニック株式会社 | Motion vector detection device |
| CN102150429A (en) * | 2008-09-11 | 2011-08-10 | 谷歌公司 | System and method for video encoding using constructed reference frame |
| CN101742296A (en) * | 2008-11-14 | 2010-06-16 | 北京中星微电子有限公司 | Video encoding and decoding method and device capable of reducing stream data fluctuation |
| CN101742289A (en) * | 2008-11-14 | 2010-06-16 | 北京中星微电子有限公司 | Video code stream compression method, system and device |
| CN103716641A (en) * | 2012-09-29 | 2014-04-09 | 浙江大学 | Predicted image generating method and predicted image generating device |
| CN103731669A (en) * | 2013-12-30 | 2014-04-16 | 广州华多网络科技有限公司 | Method and device for detecting SKIP macro block |
| CN104754333A (en) * | 2015-03-09 | 2015-07-01 | 湖南国科微电子有限公司 | Movement pre-estimation method used for monitoring scene |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| Li et al. | Hybrid spatial-temporal entropy modelling for neural video compression | |
| TW202218428A (en) | Image encoding method, image decoding method, and related apparatuses | |
| WO2021114846A1 (en) | Video noise cancellation processing method and apparatus, and storage medium | |
| CN107820095B (en) | Long-term reference image selection method and device | |
| CN102006473A (en) | Video encoder and encoding method, and video decoder and decoding method | |
| Qi et al. | Motion information propagation for neural video compression | |
| CN101009835A (en) | Background-based motion estimation coding method | |
| CN103338370B (en) | A kind of multi-view depth video fast encoding method | |
| CN114026868A (en) | Global motion constrained motion vector in inter-frame prediction | |
| CN115514960B (en) | Video encoding method, device, electronic device and storage medium | |
| CN113992635B (en) | Multimedia data processing method, device, equipment and storage medium | |
| WO2021004153A1 (en) | Image prediction method, coder, decoder, and storage medium | |
| CN101977322A (en) | Screen coding system based on universal video coding standard | |
| CN105578181A (en) | Rapid intra-frame mode decision and block matching method for screen content compression in HEVC (High Efficiency Video Coding) | |
| CN111901595A (en) | Video coding method, device and medium based on deep neural network | |
| CN110149515B (en) | Data transmission method and device | |
| CN115361582A (en) | A video real-time super-resolution processing method, device, terminal and storage medium | |
| CN110769255A (en) | Image coding method and device | |
| CN103747257B (en) | A kind of method of video data high efficient coding | |
| CN112004114A (en) | Video processing method, system, device, readable storage medium and electronic equipment | |
| CN111212288B (en) | Video data encoding and decoding method and device, computer equipment and storage medium | |
| CN117750020B (en) | Method, system, equipment and storage medium for learning video coding | |
| CN102300098A (en) | Video fault tolerance coding method based on reversible information hiding and redundancy technology | |
| CN106954082A (en) | Video encoding and decoding method, encoding and decoding device and system | |
| CN107087172B (en) | Quick code check code-transferring method based on HEVC-SCC and its system |
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 | ||
| WW01 | Invention patent application withdrawn after publication |
Application publication date: 20170714 |
|
| WW01 | Invention patent application withdrawn after publication |