WO2016161678A1 - Method, device, and processing system for video encoding and decoding - Google Patents
Method, device, and processing system for video encoding and decoding Download PDFInfo
- Publication number
- WO2016161678A1 WO2016161678A1 PCT/CN2015/077866 CN2015077866W WO2016161678A1 WO 2016161678 A1 WO2016161678 A1 WO 2016161678A1 CN 2015077866 W CN2015077866 W CN 2015077866W WO 2016161678 A1 WO2016161678 A1 WO 2016161678A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- video
- frame
- displayed
- code stream
- image
- Prior art date
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
Definitions
- the present invention relates to the field of video surveillance technologies, and in particular, to a video encoding and decoding method, apparatus, and processing system.
- the digital video compression standard began in the 1980s. After more than 30 years of development, the existing standards include ITU-T series H.261, H.263, ISO MPEG-1, MPEG-4, and two organizations. Developed MPEG-2/H.262, H.264/AVC, HEVC (newest release in 2013). There are other standards of organizations, such as domestic AVS, Microsoft's VC-1, Google's VP8 and so on. Similarly, these standards use a block-based hybrid coding framework that combines predictive coding, transform coding, and entropy coding with three large coding techniques to encode equal-blocking of the image.
- Predictive coding is an important coding technique for video compression.
- the coded image can be divided into I frames (intra prediction frame, Intra), P frame (inter prediction frame, prediction), B frame (bidirectional prediction frame, Bi-Prediction).
- I frames intra prediction frame, Intra
- P frame inter prediction frame, prediction
- B frame bidirectional prediction frame, Bi-Prediction
- I frames intra prediction frame, Intra
- P frame inter prediction frame, prediction
- B frame bidirectional prediction frame, Bi-Prediction
- the previous frame and the subsequent frame can be used as reference at the same time to become a bidirectional reference frame.
- the B frame decoding needs to be decoded after both the previous reference frame and the subsequent reference frame are successfully decoded.
- P-frames and B-frames can be used as reference when using other frames instead of other frames.
- I frame the frame data can be used as a reference.
- the target extraction and the video coding may be combined, and the picture to be encoded is divided into a background part and a target part, and the target part is also called a foreground part.
- the background image is also called a reference.
- 2 is an encoding reference relationship based on a background frame reference.
- the original I frame is changed to an R frame (refresh frame), and no more intra prediction techniques are used.
- the background frame can be inter-coded with reference to the background frame, and only the background frame can be referred to. .
- Other P frame and B frame reference relationships are unchanged, and reference frame coding may also be referred to.
- G frames background frames
- the background frame can be used for encoding. Through such an idea, the compression efficiency of the video can be further improved.
- the background frame (G frame) is different from other frames in that it may not exist in the video sequence, and may be generated by a background generation technique or by selecting a still frame.
- Such a background frame does not need to be displayed when it is randomly accessed, but only a random access R frame can be displayed.
- the image frames participating in the encoding need to be displayed, and the support cannot be implemented. Displays the encoding of the image.
- the code stream adds an identifier to confirm whether the corresponding image needs to be displayed during decoding, and supports non-display frame coding at the code stream layer to support background image reference, improve coding efficiency, and avoid displaying unnecessary display images during display.
- the first aspect adopts a video encoding method, including:
- An identifier for displaying whether each frame image is displayed at the time of decoding is inserted in the video code stream.
- the identifier for inserting each frame image in the video code stream to be displayed during decoding is specifically:
- the type of the frame corresponding to the NAL unit is identified by 2 bits, wherein the identifier is not displayed when the frame is displayed as a background frame.
- the image frame and the background frame of the video sequence to be encoded are respectively encoded to generate a video code stream, specifically:
- the image frame and the background frame of the video sequence to be encoded are divided into corresponding strips to encode respective generated video streams;
- the identifier for inserting each frame image in the video code stream to be displayed during decoding is specifically:
- the identifier for inserting each frame image in the video code stream to be displayed during decoding is specifically:
- a Picture Header carrying background frame header information is inserted at the front end of the video stream corresponding to the background frame.
- the image frame is encoded with reference to the background frame.
- the added syntax element includes is_output, and the type is u(1). When u(1) is 0, it is not displayed, and when u(1) is set to 1, it is displayed.
- the second aspect adopts a video encoding device, including:
- a background frame generating unit configured to generate a background frame for the video sequence to be encoded
- a code stream generating unit configured to respectively encode an image frame and a background frame of the encoded video sequence to generate a video code stream
- An identifier insertion unit is configured to insert, in the video code stream, an identifier of whether each frame image is displayed at the time of decoding.
- the identifier insertion unit is specifically configured to:
- the type of the frame corresponding to the NAL unit is identified by 2 bits, wherein the identifier is not displayed when the frame is displayed as a background frame.
- the code stream generating unit is specifically configured to:
- the image frame and the background frame of the video sequence to be encoded are divided into corresponding strips to encode respective generated video streams;
- the identifier insertion unit is specifically configured to:
- the identifier insertion unit is specifically:
- a Picture Header carrying background frame header information is inserted at the front end of the video stream corresponding to the background frame.
- the image frame is encoded with reference to the background frame.
- the added syntax element includes is_output, and the type is u(1). When u(1) is 0, it is not displayed, and when u(1) is set to 1, it is displayed.
- the third aspect adopts a video decoding method, including:
- Obtaining a video code stream where the video code stream is encoded by an image frame and a background frame, and the video code stream is inserted with an identifier of whether each frame image is displayed at the time of decoding;
- An image of the corresponding frame is displayed based on the identification.
- the identifier is set in the NAL unit header information of the video code stream, the header information of the corresponding stripe of each frame, or the Picture Header of the video stream stream front end.
- the identifier corresponding to the background frame is not displayed, and the identifier corresponding to the image frame is displayed.
- the fourth aspect adopts a video decoding device, including:
- a video code stream acquiring unit configured to obtain a video code stream, where the video code stream is encoded by an image frame and a background frame, and the video code stream is inserted with an identifier of whether each frame image is displayed when decoding;
- a decoding unit configured to decode an image frame of the video code stream based on the background frame
- a display unit configured to display an image of the corresponding frame based on the identifier.
- the identifier is set in the NAL unit header information of the video code stream, the header information of the corresponding stripe of each frame, or the Picture Header of the video stream stream front end.
- the identifier corresponding to the background frame is not displayed, and the identifier corresponding to the image frame is displayed.
- a fifth aspect of the invention provides a video processing system, comprising the video encoding device according to any one of the preceding claims, and the video decoding device according to any one of the preceding claims.
- the invention has the beneficial effects that: by generating a background frame for the video sequence to be encoded, the video to be encoded is encoded into two video code streams of an image frame and a background frame, and an identifier is added to the video stream to confirm whether the corresponding image needs to be displayed during decoding.
- FIG. 1 is a schematic diagram of an inter-frame reference relationship in block-based hybrid coding in the prior art
- FIG. 2 is a schematic diagram of a background frame reference relationship
- FIG. 3 is a flowchart of a method of a first embodiment of a video encoding method provided in an embodiment of the present invention
- FIG. 4 is a flowchart of a method of a second embodiment of a video encoding method provided in an embodiment of the present invention
- FIG. 5 is a schematic structural diagram of NAL header information in a second embodiment of a video encoding method according to an embodiment of the present invention.
- FIG. 6 is a structural block diagram of a first embodiment of a video encoding apparatus provided in an embodiment of the present invention.
- FIG. 7 is a flowchart of a method of a first embodiment of a video decoding method according to an embodiment of the present invention.
- FIG. 8 is a structural block diagram of a first embodiment of a video decoding apparatus according to an embodiment of the present invention.
- FIG. 9 is a block diagram showing the structure of a first embodiment of a video processing system provided in an embodiment of the present invention.
- FIG. 3 is a flowchart of a method of a first embodiment of a method for video coding provided in an embodiment of the present invention.
- the method in this embodiment is mainly used for various video storage, in particular, storage of monitoring video with a single scene structure in a video image. As shown, the method includes:
- Step S101 Generate a background frame for the video sequence to be encoded.
- the background frame may not exist in the video sequence, but an image frame generated from the video sequence by a certain technical means does not exist independently in the video sequence, and may be generated by background generation technology.
- a background frame is extracted from the video sequence; or a still frame is selected from the video sequence as a background frame.
- Step S102 encoding the image frame and the background frame of the coded video sequence to generate a video code stream.
- the image frame and the background frame in the video sequence are separately encoded, and the image frame is selected according to the encoding requirement whether to refer to the background frame, and the background frame is also encoded, because each frame of the background frame is the same, so the encoding of the background frame is compared. easily.
- each of the video streams is generated.
- Step S103 insert an identifier of whether each frame image is displayed at the time of decoding in the video code stream.
- video stream decoding will display all images, but in this solution, for the actual display requirement of the image frame, a logo will be added to the video stream in which no display is required to indicate the corresponding image. Whether you need to decode the display.
- the video to be encoded is encoded into two video code streams of an image frame and a background frame, and an identifier is added to the video stream to confirm whether the corresponding image needs to be displayed during decoding.
- the code stream layer supports non-display frame coding to support background image reference and improve coding efficiency.
- FIG. 4 is a flowchart of a method for a second embodiment of a method for video coding provided in an embodiment of the present invention. As shown in the figure, the method includes:
- Step S201 Generate a background frame for the video sequence to be encoded.
- Step S202 Dividing the image frame and the background frame of the video sequence to be encoded into corresponding strips to encode respective generated video streams.
- each slice contains Slice Header information, that is, strip header information, and Table 1 is a strip header information part syntax element.
- Step S203 Add a syntax element in the strip header information or modify the semantics of the original syntax element to identify whether the stripe is displayed when decoding.
- the corresponding image does not need to be displayed, so the identifier of the strip header corresponding to the background frame should be added.
- the code stream organization in H.264 and H.265 is NAL, and each NAL unit contains one NAL header information.
- the header information is 1 byte; in H.265, the header information is 2 bytes.
- Figure 5 is a component of the H.264 NAL header, where R is 2 bits.
- the coded picture is divided into an I frame, a B frame, and a P frame; in this solution, in addition to the above three frame types, there is a background frame, and the corresponding I frame in this solution is not in an absolute sense.
- I frame, I frame can provide reference for P frame, but I frame can not achieve intra prediction, that is, can not be independently decoded, must refer to the background frame, in order to reflect the difference, in this scheme, the functional frame corresponding to the I frame is called R Frame, meaning to refresh the frame.
- i_picture_header is in front of the I frame, as shown in Table 2.
- P and B frames are preceded by pb_picture_header as shown in Table 3.
- the G frame header information g_picture_header can be increased accordingly, and i_picture_header can be changed to r_picture_header at the same time if necessary. It is confirmed whether it needs to be displayed according to the frame type of the header information record. If it is g_picture_header, it needs to be displayed, otherwise it does not need to be displayed.
- the image frame is encoded with reference to the background frame.
- the video to be encoded is encoded into two video code streams of an image frame and a background frame, and an identifier is added to the video stream to confirm whether the corresponding image needs to be displayed during decoding.
- the code stream layer supports non-display frame coding to support background image reference and improve coding efficiency.
- the corresponding identification method is designed.
- the following is an embodiment of a device for video coding provided in an embodiment of the present invention.
- the embodiment of the device for video coding is implemented based on the embodiment of the method for video coding described above, and is not implemented in the embodiment of the device for video coding.
- FIG. 6 is a structural block diagram of a first embodiment of a video encoding apparatus according to an embodiment of the present invention. As shown, the apparatus includes:
- a background frame generating unit 310 configured to generate a background frame for the video sequence to be encoded
- a code stream generating unit 320 configured to respectively encode an image frame and a background frame of the video sequence to be encoded to generate a video code stream;
- the identifier insertion unit 330 is configured to insert, in the video code stream, an identifier of whether each frame image is displayed at the time of decoding.
- video stream decoding will display all images, but in this solution, for the actual display requirement of the image frame, a logo will be added to the video stream in which no display is required to indicate the corresponding image. Whether you need to decode the display.
- the identifier insertion unit 330 is specifically configured to:
- the type of the frame corresponding to the NAL unit is identified by 2 bits, wherein the identifier is not displayed when the frame is displayed as a background frame.
- code stream generating unit 320 is specifically configured to:
- the image frame and the background frame of the video sequence to be encoded are divided into corresponding strips to encode respective generated video streams;
- the identifier insertion unit 330 is specifically configured to:
- the added syntax element includes is_output, the type is u(1), is not displayed when u(1) is assigned a value of 0, and is displayed when the value of u(1) is 1.
- the identifier insertion unit 330 is specifically:
- a Picture Header carrying background frame header information is inserted at the front end of the video stream corresponding to the background frame.
- the image frame is encoded with reference to the background frame.
- the cooperation of the above units works by generating a background frame for the video sequence to be encoded, encoding the video to be encoded into two video code streams of the image frame and the background frame, and adding an identifier to the video stream to confirm the corresponding image. Whether to display when decoding, non-display frame encoding is supported at the code stream layer to support background image reference and improve coding efficiency.
- the following is an embodiment of a video decoding method provided in the specific implementation manner of the present invention.
- the embodiment of the video decoding method is mainly used to decode the video code stream obtained in the foregoing video coding method embodiment. As shown in Figure 7, the method includes:
- Step S401 Acquire a video code stream, where the video code stream is encoded by an image frame and a background frame, and an identifier of whether each frame image is displayed at the time of decoding is inserted into the video code stream.
- Step S402 Decoding an image frame of the video code stream based on the background frame
- Step S403 Display an image of the corresponding frame based on the identifier.
- the identifier is set in the NAL unit header information of the video code stream, the header information of the corresponding stripe of each frame, or the Picture Header of the video stream stream front end.
- the identifier corresponding to the background frame is not displayed, and the identifier corresponding to the image frame is displayed.
- the following is an embodiment of a device for video decoding provided in an embodiment of the present invention.
- the embodiment of the device for video decoding is implemented based on the embodiment of the method for video decoding described above, and is not implemented in the embodiment of the device for decoding video.
- FIG. 8 is a structural block diagram of an embodiment of a video decoding apparatus according to an embodiment of the present invention. As shown in the figure, the apparatus includes:
- the video code stream obtaining unit 510 is configured to obtain a video code stream, where the video code stream is encoded by an image frame and a background frame, and the video code stream is inserted with an identifier of whether each frame image is displayed during decoding;
- Decoding unit 520 configured to decode an image frame of the video code stream based on the background frame
- the display unit 530 is configured to display an image of the corresponding frame based on the identifier.
- the identifier is set in the NAL unit header information of the video code stream, the header information of the corresponding stripe of each frame, or the Picture Header of the video stream stream front end.
- the identifier corresponding to the background frame is not displayed, and the identifier corresponding to the image frame is displayed.
- the video processing system includes a video encoding device 30 and a video decoding device 50, wherein the video encoding device 30 includes:
- a background frame generating unit 310 configured to generate a background frame for the video sequence to be encoded
- a code stream generating unit 320 configured to respectively encode an image frame and a background frame of the video sequence to be encoded to generate a video code stream;
- the identifier insertion unit 330 is configured to insert, in the video code stream, an identifier of whether each frame image is displayed at the time of decoding.
- the video decoding device 50 includes:
- the video code stream obtaining unit 510 is configured to obtain a video code stream, where the video code stream is encoded by an image frame and a background frame, and the video code stream is inserted with an identifier of whether each frame image is displayed during decoding;
- Decoding unit 520 configured to decode an image frame of the video code stream based on the background frame
- the display unit 530 is configured to display an image of the corresponding frame based on the identifier.
- the video processing system generates a background frame for the video sequence to be encoded, encodes the video to be encoded into two video code streams of an image frame and a background frame, and adds an identifier to the video stream to confirm whether the corresponding image needs to be displayed during decoding.
- the code stream layer supports non-display frame coding to support background image reference and improve coding efficiency. At the time of decoding, it is no longer directly decoding and displaying all the frames according to the reference relationship, but selectively displaying the image to be displayed according to the identification, thereby improving the display efficiency.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
A method, device, and processing system for video encoding and decoding. The method comprises: producing background frames for a video sequence to be encoded; encoding image frames and the background frames of the video sequence to be encoded to produce respective video streams; and, inserting into the video streams identifications of whether or not each frame of image is to be displayed when decoded. By producing the background frames for the video sequence to be encoded, encoding the video to be encoded into video streams of the image frames and of the background frames, and adding identifications to the video streams to determine whether or not corresponding images need to be displayed when decoded, non-display frame encoding is supported at a stream layer to support background image reference, encoding efficiency is increased, and display of images that do not need to be displayed is prevented during display, thus increasing display efficiency.
Description
本发明涉及视频监控技术领域,尤其涉及一种视频编码和解码的方法、装置和处理系统。The present invention relates to the field of video surveillance technologies, and in particular, to a video encoding and decoding method, apparatus, and processing system.
数字视频压缩标准开始于20世纪80年,经过30多年的发展,现有的标准有ITU-T系列的H.261、H.263,ISO的MPEG-1、MPEG-4,以及两个组织共同制定的MPEG-2/H.262、H.264/AVC,HEVC(2013年最新发布)。还有其他组织的标准,比如国内的AVS、微软的VC-1、谷歌的VP8等。相同的是,这些标准都采用基于块的混合编码框架,融合预测编码、变换编码、以及熵编码3大编码技术,对图像的等分块进行编码。The digital video compression standard began in the 1980s. After more than 30 years of development, the existing standards include ITU-T series H.261, H.263, ISO MPEG-1, MPEG-4, and two organizations. Developed MPEG-2/H.262, H.264/AVC, HEVC (newest release in 2013). There are other standards of organizations, such as domestic AVS, Microsoft's VC-1, Google's VP8 and so on. Similarly, these standards use a block-based hybrid coding framework that combines predictive coding, transform coding, and entropy coding with three large coding techniques to encode equal-blocking of the image.
预测编码是视频压缩的重要编码技术,根据预测数据来源不同,可以把编码图像分成I帧(帧内预测帧、Intra)、P帧(帧间预测帧、Prediction)、B帧(双向预测帧、Bi-Prediction)。如图1所示,I帧进行预测编码时,只采用本帧的数据进行预测,解码的时候可以独立解码,不依赖其他帧。P帧进行预测编码时,采用前面一帧已编码图像的重建图像作为参考,P帧解码的时候,必须等参考帧的图像解码完成才能解码。B帧进行预测编码时,可以同时采用前面帧和后面帧做参考,成为双向参考帧,B帧解码是需要前面参考帧和后面参考帧都解码成功后才能解码。P帧、B帧在编码时除了用其他帧做参考,也可以像I帧样用本帧数据做参考,选择两者最优情况就行。Predictive coding is an important coding technique for video compression. According to different sources of prediction data, the coded image can be divided into I frames (intra prediction frame, Intra), P frame (inter prediction frame, prediction), B frame (bidirectional prediction frame, Bi-Prediction). As shown in FIG. 1 , when the I frame is subjected to predictive coding, only the data of the current frame is used for prediction, and the decoding can be independently decoded without relying on other frames. When the P frame is used for predictive coding, the reconstructed image of the encoded image of the previous frame is used as a reference. When the P frame is decoded, the image of the reference frame must be decoded before decoding. When predictive coding is performed on a B frame, the previous frame and the subsequent frame can be used as reference at the same time to become a bidirectional reference frame. The B frame decoding needs to be decoded after both the previous reference frame and the subsequent reference frame are successfully decoded. P-frames and B-frames can be used as reference when using other frames instead of other frames. When I frame, the frame data can be used as a reference.
在监控视频中,大部分采集的画面是固定的场景,画面上静止的区域多,称为背景;运动的部分少,称为前景(或目标),通常为运动物体。另一方面,随着技术的进步和处理器性能的提升,目标提取精度越来越高。为了进一步提高监控视频的压缩效率,可以将目标提取和视频编码进行结合,将需要编码的画面分成背景部分和目标部分,目标部分也称为前景部分。对于背景部分的编码,采用背景图像做参考,可以很大提高编码效率。图2是基于背景帧参考的编码参考关系,原来的I帧改为R帧(刷新帧),不再是全部采用帧内预测技术,可以参考背景帧进行帧间编码,而且只能参考背景帧。其他P帧、B帧参考关系不变,另外也可以参考背景帧编码。通常情况下G帧(背景帧)间隔很大,理论上只要场景没有大的变化,比如光线骤变、云台转换,都可以采用该背景帧进行编码。通过这样的思路,可以进一步提高视频的压缩效率。
In surveillance video, most of the captured images are fixed scenes. There are many still areas on the screen, called the background; there are few moving parts, called foreground (or target), usually moving objects. On the other hand, with the advancement of technology and the improvement of processor performance, the accuracy of target extraction is getting higher and higher. In order to further improve the compression efficiency of the surveillance video, the target extraction and the video coding may be combined, and the picture to be encoded is divided into a background part and a target part, and the target part is also called a foreground part. For the encoding of the background part, using the background image as a reference can greatly improve the coding efficiency. 2 is an encoding reference relationship based on a background frame reference. The original I frame is changed to an R frame (refresh frame), and no more intra prediction techniques are used. The background frame can be inter-coded with reference to the background frame, and only the background frame can be referred to. . Other P frame and B frame reference relationships are unchanged, and reference frame coding may also be referred to. Generally, G frames (background frames) are widely spaced. In theory, as long as there is no large change in the scene, such as sudden changes in light and pan/tilt conversion, the background frame can be used for encoding. Through such an idea, the compression efficiency of the video can be further improved.
在背景帧参考编码的方案中,背景帧(G帧)与其他帧不同的地方就是它可能并不是视频序列中本来存在的,可以通过背景生成技术或者挑选静止帧等方式产生。这样的背景帧在随机接入时,其实并不需要显示,而只要显示随机接入的R帧即可,但现有技术中,参与编码的图像帧,都是需要显示的,无法实现支持非显示图像的编码。In the background frame reference coding scheme, the background frame (G frame) is different from other frames in that it may not exist in the video sequence, and may be generated by a background generation technique or by selecting a still frame. Such a background frame does not need to be displayed when it is randomly accessed, but only a random access R frame can be displayed. However, in the prior art, the image frames participating in the encoding need to be displayed, and the support cannot be implemented. Displays the encoding of the image.
发明内容Summary of the invention
本发明的目的是提供一种视频编码和解码的方法、装置和处理系统,其通过为待编码视频序列生成背景帧,将待编码视频编码为图像帧和背景帧两条视频码流,为视频码流添加标识确认对应的图像在解码时是否需要显示,在码流层支持非显示帧编码,以支持背景图像参考,提高编码效率,并可在显示时避免显示不必要显示的图像。It is an object of the present invention to provide a video encoding and decoding method, apparatus and processing system for encoding a video to be encoded into two video streams, an image frame and a background frame, by generating a background frame for the video sequence to be encoded. The code stream adds an identifier to confirm whether the corresponding image needs to be displayed during decoding, and supports non-display frame coding at the code stream layer to support background image reference, improve coding efficiency, and avoid displaying unnecessary display images during display.
为实现上述目的,具体采用以下技术方案:In order to achieve the above objectives, the following technical solutions are specifically adopted:
第一方面采用一种视频编码方法,包括:The first aspect adopts a video encoding method, including:
为待编码视频序列生成背景帧;Generating a background frame for the video sequence to be encoded;
对待编码视频序列的图像帧和背景帧进行编码各自生成视频码流;Encoding the image frame and the background frame of the encoded video sequence to generate a video code stream;
在视频码流中插入各帧图像在解码时是否显示的标识。An identifier for displaying whether each frame image is displayed at the time of decoding is inserted in the video code stream.
其中,所述在视频码流中插入各帧图像在解码时是否显示的标识,具体为:The identifier for inserting each frame image in the video code stream to be displayed during decoding is specifically:
在视频码流的NAL单元的头信息中用2个比特标识该NAL单元对应的帧的类型,其中标识显示该帧为背景帧则解码时不予显示。In the header information of the NAL unit of the video code stream, the type of the frame corresponding to the NAL unit is identified by 2 bits, wherein the identifier is not displayed when the frame is displayed as a background frame.
其中,所述对待编码视频序列的图像帧和背景帧进行编码各自生成视频码流,具体为:The image frame and the background frame of the video sequence to be encoded are respectively encoded to generate a video code stream, specifically:
将待编码视频序列的图像帧和背景帧分成对应条带进行编码各自生成视频流;The image frame and the background frame of the video sequence to be encoded are divided into corresponding strips to encode respective generated video streams;
所述在视频码流中插入各帧图像在解码时是否显示的标识,具体为:The identifier for inserting each frame image in the video code stream to be displayed during decoding is specifically:
在条带头信息中增加语法元素或修改原有语法元素的语义以标识该条带在解码时是否显示。Adding a syntax element to the strip header information or modifying the semantics of the original syntax element to identify whether the stripe is displayed when decoded.
其中,所述在视频码流中插入各帧图像在解码时是否显示的标识,具体为:The identifier for inserting each frame image in the video code stream to be displayed during decoding is specifically:
在背景帧对应的视频码流前端插入携带背景帧头信息的Picture Header。
A Picture Header carrying background frame header information is inserted at the front end of the video stream corresponding to the background frame.
其中,所述图像帧参考所述背景帧进行编码。The image frame is encoded with reference to the background frame.
其中,增加的所述语法元素包括is_output,类型为u(1),当u(1)的赋值为0时为不予显示,当u(1)的赋值为1时予以显示。The added syntax element includes is_output, and the type is u(1). When u(1) is 0, it is not displayed, and when u(1) is set to 1, it is displayed.
第二方面采用一种视频编码装置,包括:The second aspect adopts a video encoding device, including:
背景帧生成单元,用于为待编码视频序列生成背景帧;a background frame generating unit, configured to generate a background frame for the video sequence to be encoded;
码流生成单元,用于对待编码视频序列的图像帧和背景帧进行编码各自生成视频码流;a code stream generating unit, configured to respectively encode an image frame and a background frame of the encoded video sequence to generate a video code stream;
标识插入单元,用于在视频码流中插入各帧图像在解码时是否显示的标识。An identifier insertion unit is configured to insert, in the video code stream, an identifier of whether each frame image is displayed at the time of decoding.
其中,所述标识插入单元,具体用于:The identifier insertion unit is specifically configured to:
在视频码流的NAL单元的头信息中用2个比特标识该NAL单元对应的帧的类型,其中标识显示该帧为背景帧则解码时不予显示。In the header information of the NAL unit of the video code stream, the type of the frame corresponding to the NAL unit is identified by 2 bits, wherein the identifier is not displayed when the frame is displayed as a background frame.
其中,所述码流生成单元,具体用于:The code stream generating unit is specifically configured to:
将待编码视频序列的图像帧和背景帧分成对应条带进行编码各自生成视频流;The image frame and the background frame of the video sequence to be encoded are divided into corresponding strips to encode respective generated video streams;
所述标识插入单元,具体用于:The identifier insertion unit is specifically configured to:
在条带头信息中增加语法元素或修改原有语法元素的语义以标识该条带在解码时是否显示。Adding a syntax element to the strip header information or modifying the semantics of the original syntax element to identify whether the stripe is displayed when decoded.
其中,所述标识插入单元,具体为:The identifier insertion unit is specifically:
在背景帧对应的视频码流前端插入携带背景帧头信息的Picture Header。A Picture Header carrying background frame header information is inserted at the front end of the video stream corresponding to the background frame.
其中,所述图像帧参考所述背景帧进行编码。The image frame is encoded with reference to the background frame.
其中,增加的所述语法元素包括is_output,类型为u(1),当u(1)的赋值为0时为不予显示,当u(1)的赋值为1时予以显示。The added syntax element includes is_output, and the type is u(1). When u(1) is 0, it is not displayed, and when u(1) is set to 1, it is displayed.
第三方面采用一种视频解码方法,包括:The third aspect adopts a video decoding method, including:
获取视频码流,所述视频码流由图像帧和背景帧编码而成,所述视频码流中插入有各帧图像在解码时是否显示的标识;
Obtaining a video code stream, where the video code stream is encoded by an image frame and a background frame, and the video code stream is inserted with an identifier of whether each frame image is displayed at the time of decoding;
基于所述背景帧解码所述视频码流的图像帧;Decoding an image frame of the video code stream based on the background frame;
基于所述标识显示相应帧的图像。An image of the corresponding frame is displayed based on the identification.
其中,所述标识设置于所述视频码流的NAL单元头信息、各帧对应条带的头信息或视频码流前端的Picture Header。The identifier is set in the NAL unit header information of the video code stream, the header information of the corresponding stripe of each frame, or the Picture Header of the video stream stream front end.
其中,所述背景帧对应的标识为不予显示,所述图像帧对应的标识为显示。The identifier corresponding to the background frame is not displayed, and the identifier corresponding to the image frame is displayed.
第四方面采用一种视频解码装置,包括:The fourth aspect adopts a video decoding device, including:
视频码流获取单元,用于获取视频码流,所述视频码流由图像帧和背景帧编码而成,所述视频码流中插入有各帧图像在解码时是否显示的标识;a video code stream acquiring unit, configured to obtain a video code stream, where the video code stream is encoded by an image frame and a background frame, and the video code stream is inserted with an identifier of whether each frame image is displayed when decoding;
解码单元,用于基于所述背景帧解码所述视频码流的图像帧;a decoding unit, configured to decode an image frame of the video code stream based on the background frame;
显示单元,用于基于所述标识显示相应帧的图像。And a display unit, configured to display an image of the corresponding frame based on the identifier.
其中,所述标识设置于所述视频码流的NAL单元头信息、各帧对应条带的头信息或视频码流前端的Picture Header。The identifier is set in the NAL unit header information of the video code stream, the header information of the corresponding stripe of each frame, or the Picture Header of the video stream stream front end.
其中,所述背景帧对应的标识为不予显示,所述图像帧对应的标识为显示。The identifier corresponding to the background frame is not displayed, and the identifier corresponding to the image frame is displayed.
第五方面采用一种视频处理系统,包括上述任意一项所述的视频编码装置和上述任意一项所述的视频解码装置。A fifth aspect of the invention provides a video processing system, comprising the video encoding device according to any one of the preceding claims, and the video decoding device according to any one of the preceding claims.
本发明的有益效果在于:通过为待编码视频序列生成背景帧,将待编码视频编码为图像帧和背景帧两条视频码流,为视频码流添加标识确认对应的图像在解码时是否需要显示,在码流层支持非显示帧编码,以支持背景图像参考,提高编码效率,并可在显示时避免显示不必要显示的图像。The invention has the beneficial effects that: by generating a background frame for the video sequence to be encoded, the video to be encoded is encoded into two video code streams of an image frame and a background frame, and an identifier is added to the video stream to confirm whether the corresponding image needs to be displayed during decoding. Support non-display frame encoding at the code stream layer to support background image reference, improve coding efficiency, and avoid displaying unnecessary images during display.
图1是现有技术中基于块的混合编码中帧间参考关系的示意图;1 is a schematic diagram of an inter-frame reference relationship in block-based hybrid coding in the prior art;
图2是背景帧参考关系的示意图;2 is a schematic diagram of a background frame reference relationship;
图3是本发明具体实施方式中提供的一种视频编码的方法的第一实施例的方法流程图;
3 is a flowchart of a method of a first embodiment of a video encoding method provided in an embodiment of the present invention;
图4是本发明具体实施方式中提供的一种视频编码的方法的第二实施例的方法流程图;4 is a flowchart of a method of a second embodiment of a video encoding method provided in an embodiment of the present invention;
图5是本发明具体实施方式中提供的一种视频编码的方法的第二实施例中NAL头信息的结构示意图;FIG. 5 is a schematic structural diagram of NAL header information in a second embodiment of a video encoding method according to an embodiment of the present invention; FIG.
图6是本发明具体实施方式中提供的一种视频编码的装置的第一实施例的结构方框图;6 is a structural block diagram of a first embodiment of a video encoding apparatus provided in an embodiment of the present invention;
图7是本发明具体实施方式中提供的一种视频解码的方法的第一实施例的方法流程图;FIG. 7 is a flowchart of a method of a first embodiment of a video decoding method according to an embodiment of the present invention; FIG.
图8是本发明具体实施方式中提供的一种视频解码的装置的第一实施例的结构方框图;FIG. 8 is a structural block diagram of a first embodiment of a video decoding apparatus according to an embodiment of the present invention; FIG.
图9是本发明具体实施方式中提供的一种视频处理系统的第一实施例的结构方框图。9 is a block diagram showing the structure of a first embodiment of a video processing system provided in an embodiment of the present invention.
为使本发明的目的、技术方案和优点更加清楚明了,下面结合具体实施方式并参照附图,对本发明进一步详细说明。应该理解,这些描述只是示例性的,而并非要限制本发明的范围。此外,在以下说明中,省略了对公知结构和技术的描述,以避免不必要地混淆本发明的概念。The present invention will be further described in detail below with reference to the specific embodiments thereof and the accompanying drawings. It is to be understood that the description is not intended to limit the scope of the invention. In addition, descriptions of well-known structures and techniques are omitted in the following description in order to avoid unnecessarily obscuring the inventive concept.
请参考图3,其是本发明具体实施方式中提供的一种视频编码的方法的第一实施例的方法流程图。本实施例中的方法,主要用于各种视频存储,特别是视频图像中场景结构单一的监控视频的存储。如图所示,该方法,包括:Please refer to FIG. 3, which is a flowchart of a method of a first embodiment of a method for video coding provided in an embodiment of the present invention. The method in this embodiment is mainly used for various video storage, in particular, storage of monitoring video with a single scene structure in a video image. As shown, the method includes:
步骤S101:为待编码视频序列生成背景帧。Step S101: Generate a background frame for the video sequence to be encoded.
在视频编码的过程中,背景帧可以不存在于视频序列中,只是通过一定的技术手段从视频序列中生成出来的一种图像帧,并不在视频序列中独立存在,具体可以通过背景生成技术从视频序列中提取出背景帧;或者从视频序列中挑选静止帧作为背景帧。In the process of video coding, the background frame may not exist in the video sequence, but an image frame generated from the video sequence by a certain technical means does not exist independently in the video sequence, and may be generated by background generation technology. A background frame is extracted from the video sequence; or a still frame is selected from the video sequence as a background frame.
步骤S102:对待编码视频序列的图像帧和背景帧进行编码各自生成视频码流。
Step S102: encoding the image frame and the background frame of the coded video sequence to generate a video code stream.
对视频序列中的图像帧和背景帧分别进行编码,图像帧根据编码需要选择是否参考背景帧,同时背景帧也要进行编码,因为背景帧的每一帧都相同,所以背景帧的编码是比较容易。编码完成后各自生成视频码流。The image frame and the background frame in the video sequence are separately encoded, and the image frame is selected according to the encoding requirement whether to refer to the background frame, and the background frame is also encoded, because each frame of the background frame is the same, so the encoding of the background frame is compared. easily. After the encoding is completed, each of the video streams is generated.
步骤S103:在视频码流中插入各帧图像在解码时是否显示的标识。Step S103: insert an identifier of whether each frame image is displayed at the time of decoding in the video code stream.
按现有的技术方案,视频码流解码将会显示所有图像,但是在本方案中,针对图像帧的实际显示需求,对于其中无需显示的视频码流将会添加标识,用以说明对应的图像是否需要解码显示。According to the prior art solution, video stream decoding will display all images, but in this solution, for the actual display requirement of the image frame, a logo will be added to the video stream in which no display is required to indicate the corresponding image. Whether you need to decode the display.
综上所述,通过为待编码视频序列生成背景帧,将待编码视频编码为图像帧和背景帧两条视频码流,为视频码流添加标识确认对应的图像在解码时是否需要显示,在码流层支持非显示帧编码,以支持背景图像参考,提高编码效率。In summary, by generating a background frame for the video sequence to be encoded, the video to be encoded is encoded into two video code streams of an image frame and a background frame, and an identifier is added to the video stream to confirm whether the corresponding image needs to be displayed during decoding. The code stream layer supports non-display frame coding to support background image reference and improve coding efficiency.
请参考图4,其是发明具体实施方式中提供的一种视频编码的方法的第二实施例的方法流程图,如图所示,该方法包括:Please refer to FIG. 4 , which is a flowchart of a method for a second embodiment of a method for video coding provided in an embodiment of the present invention. As shown in the figure, the method includes:
步骤S201:为待编码视频序列生成背景帧。Step S201: Generate a background frame for the video sequence to be encoded.
步骤S202:将待编码视频序列的图像帧和背景帧分成对应条带进行编码各自生成视频流。Step S202: Dividing the image frame and the background frame of the video sequence to be encoded into corresponding strips to encode respective generated video streams.
H.264中将图像分成条带slice进行编码,每个slice包含Slice Header信息,也就是条带头信息,表1是条带头信息部分语法元素。In H.264, the image is divided into strip slices for encoding. Each slice contains Slice Header information, that is, strip header information, and Table 1 is a strip header information part syntax element.
表1Table 1
步骤S203:在条带头信息中增加语法元素或修改原有语法元素的语义以标识该条带在解码时是否显示。Step S203: Add a syntax element in the strip header information or modify the semantics of the original syntax element to identify whether the stripe is displayed when decoding.
在这种方式中,可以在slice header中增加语法元素或者修改原有语法元素语义,以表达该slice是否需要显示,比如在if(IdrPicFlag)前增加is_ouput语法元素,类型为u(1),当u(1)的赋值为0时为不予显示,当u(1)的赋值为1时予以显示。In this way, you can add syntax elements to the slice header or modify the semantics of the original syntax elements to express whether the slice needs to be displayed. For example, add the is_ouput syntax element before if(IdrPicFlag), the type is u(1). u(1) is not displayed when the value is 0, and is displayed when the value of u(1) is 1.
对于背景帧而言,其对应的图像是不需要显示的,所以背景帧对应的条带头信息中应添加不予显示的标识。For the background frame, the corresponding image does not need to be displayed, so the identifier of the strip header corresponding to the background frame should be added.
亦可根据编码方式,对应选择的合适操作的标识方式。例如,H.264和H.265中码流组织方式为NAL,每个NAL单元都包含一个NAL头信息。在H.264中,头信息为1个byte;在H.265中,头信息为2个byte。图5是H.264NAL头的组成部分,其中R为2个比特。这时,可以用R=11b表示G帧,R=10b表示R帧,R=01b表示其他P帧、B帧。这样,在解码时,如果遇到R=11b,则代表该帧图像为背景帧,不用显示。It can also be based on the coding method, corresponding to the identification method of the appropriate operation selected. For example, the code stream organization in H.264 and H.265 is NAL, and each NAL unit contains one NAL header information. In H.264, the header information is 1 byte; in H.265, the header information is 2 bytes. Figure 5 is a component of the H.264 NAL header, where R is 2 bits. At this time, a G frame can be represented by R=11b, R=10b represents an R frame, and R=01b represents another P frame and a B frame. Thus, when decoding, if R=11b is encountered, it means that the frame image is a background frame, and no display is needed.
在预测编码中,编码图像分为I帧、B帧和P帧;在本方案中,除了上述的三种帧类型,还有背景帧存在,并且本方案中对应I帧并不是绝对意义上的I帧,I帧可以为P帧提供参考,但是I帧并不能实现帧内预测,也就是不能独立解码,必须参考背景帧,为体现区别,本方案中将对应I帧的功能帧称为R帧,意为刷新帧。In predictive coding, the coded picture is divided into an I frame, a B frame, and a P frame; in this solution, in addition to the above three frame types, there is a background frame, and the corresponding I frame in this solution is not in an absolute sense. I frame, I frame can provide reference for P frame, but I frame can not achieve intra prediction, that is, can not be independently decoded, must refer to the background frame, in order to reflect the difference, in this scheme, the functional frame corresponding to the I frame is called R Frame, meaning to refresh the frame.
在AVS1-P2标准中,图像编码前都有头信息,I帧前面有i_picture_header,如表2所示。In the AVS1-P2 standard, there is header information before image encoding, and i_picture_header is in front of the I frame, as shown in Table 2.
表2Table 2
i_picture_header(){I_picture_header(){ | 描述符Descriptor |
i_picture_start_codeI_picture_start_code | f(32)f(32) |
bbv_delayBbv_delay | u(16)u(16) |
if(profile_id==0x40||profile_id==0x24)If(profile_id==0x40||profile_id==0x24) | |
marker_bitMarker_bit | f(1)f(1) |
bbv_delay_extensionBbv_delay_extension | u(7)u(7) |
}} | |
if(profile_id==0x24){If(profile_id==0x24){ | |
if(background_picture_disable==`0`)If(background_picture_disable==`0`) | |
background_picture_flagBackground_picture_flag | u(1)u(1) |
if(core_picture_disable==`0`)If(core_picture_disable==`0`) | |
core_picrure_flagCore_picrure_flag | u(1)u(1) |
}} |
P、B帧前面有pb_picture_header如表3所示。可以相应增加G帧头信息g_picture_header,如有必要,可以同时将i_picture_header改为r_picture_header。根据头信息记录的帧类型确认是否需要显示,如果是g_picture_header则需要显示,否则不需要显示。P and B frames are preceded by pb_picture_header as shown in Table 3. The G frame header information g_picture_header can be increased accordingly, and i_picture_header can be changed to r_picture_header at the same time if necessary. It is confirmed whether it needs to be displayed according to the frame type of the header information record. If it is g_picture_header, it needs to be displayed, otherwise it does not need to be displayed.
其中,所述图像帧参考所述背景帧进行编码。The image frame is encoded with reference to the background frame.
表3table 3
综上所述,通过为待编码视频序列生成背景帧,将待编码视频编码为图像帧和背景帧两条视频码流,为视频码流添加标识确认对应的图像在解码时是否需要显示,在码流层支持非显示帧编码,以支持背景图像参考,提高编码效率。并且针对可能采用的编码方式,设计了对应的标识方式。In summary, by generating a background frame for the video sequence to be encoded, the video to be encoded is encoded into two video code streams of an image frame and a background frame, and an identifier is added to the video stream to confirm whether the corresponding image needs to be displayed during decoding. The code stream layer supports non-display frame coding to support background image reference and improve coding efficiency. And corresponding to the coding method that may be adopted, the corresponding identification method is designed.
以下是本发明具体实施方式中提供的一种视频编码的装置的实施例,视频编码的装置的实施例基于上述的视频编码的方法的实施例实现,在视频编码的装置的实施例中未尽的阐述,请参考上述的视频编码的方法的实施例。The following is an embodiment of a device for video coding provided in an embodiment of the present invention. The embodiment of the device for video coding is implemented based on the embodiment of the method for video coding described above, and is not implemented in the embodiment of the device for video coding. For an explanation, please refer to the embodiment of the above video coding method.
请参考图6,其是本发明具体实施方式中提供的一种视频编码的装置的第一实施例的结构方框图,如图所示,该装置包括:Please refer to FIG. 6 , which is a structural block diagram of a first embodiment of a video encoding apparatus according to an embodiment of the present invention. As shown, the apparatus includes:
背景帧生成单元310,用于为待编码视频序列生成背景帧;a background frame generating unit 310, configured to generate a background frame for the video sequence to be encoded;
码流生成单元320,用于对待编码视频序列的图像帧和背景帧进行编码各自生成视频码流;a code stream generating unit 320, configured to respectively encode an image frame and a background frame of the video sequence to be encoded to generate a video code stream;
标识插入单元330,用于在视频码流中插入各帧图像在解码时是否显示的标识。The identifier insertion unit 330 is configured to insert, in the video code stream, an identifier of whether each frame image is displayed at the time of decoding.
按现有的技术方案,视频码流解码将会显示所有图像,但是在本方案中,针对图像帧的实际显示需求,对于其中无需显示的视频码流将会添加标识,用以说明对应的图像是否需要解码显示。According to the prior art solution, video stream decoding will display all images, but in this solution, for the actual display requirement of the image frame, a logo will be added to the video stream in which no display is required to indicate the corresponding image. Whether you need to decode the display.
优选地,所述标识插入单元330,具体用于:Preferably, the identifier insertion unit 330 is specifically configured to:
在视频码流的NAL单元的头信息中用2个比特标识该NAL单元对应的帧的类型,其中标识显示该帧为背景帧则解码时不予显示。In the header information of the NAL unit of the video code stream, the type of the frame corresponding to the NAL unit is identified by 2 bits, wherein the identifier is not displayed when the frame is displayed as a background frame.
另一种优选地实施方式,所述码流生成单元320,具体用于:Another preferred embodiment, the code stream generating unit 320 is specifically configured to:
将待编码视频序列的图像帧和背景帧分成对应条带进行编码各自生成视频流;
The image frame and the background frame of the video sequence to be encoded are divided into corresponding strips to encode respective generated video streams;
所述标识插入单元330,具体用于:The identifier insertion unit 330 is specifically configured to:
在条带头信息中增加语法元素或修改原有语法元素的语义以标识该条带在解码时是否显示。Adding a syntax element to the strip header information or modifying the semantics of the original syntax element to identify whether the stripe is displayed when decoded.
进一步地,增加的所述语法元素包括is_output,类型为u(1),当u(1)的赋值为0时为不予显示,当u(1)的赋值为1时予以显示。Further, the added syntax element includes is_output, the type is u(1), is not displayed when u(1) is assigned a value of 0, and is displayed when the value of u(1) is 1.
又一种优选地实施方式,所述标识插入单元330,具体为:In another preferred embodiment, the identifier insertion unit 330 is specifically:
在背景帧对应的视频码流前端插入携带背景帧头信息的Picture Header。A Picture Header carrying background frame header information is inserted at the front end of the video stream corresponding to the background frame.
其中,所述图像帧参考所述背景帧进行编码。The image frame is encoded with reference to the background frame.
综上所述,上述各单元的协同工作,通过为待编码视频序列生成背景帧,将待编码视频编码为图像帧和背景帧两条视频码流,为视频码流添加标识确认对应的图像在解码时是否需要显示,在码流层支持非显示帧编码,以支持背景图像参考,提高编码效率。In summary, the cooperation of the above units works by generating a background frame for the video sequence to be encoded, encoding the video to be encoded into two video code streams of the image frame and the background frame, and adding an identifier to the video stream to confirm the corresponding image. Whether to display when decoding, non-display frame encoding is supported at the code stream layer to support background image reference and improve coding efficiency.
以下是本发明具体实施方式中提供的一种视频解码的方法的实施例,视频解码的方法的实施例主要是针对前述视频编码的方法实施例中得到的视频码流进行解码。如图7所以,该方法包括:The following is an embodiment of a video decoding method provided in the specific implementation manner of the present invention. The embodiment of the video decoding method is mainly used to decode the video code stream obtained in the foregoing video coding method embodiment. As shown in Figure 7, the method includes:
步骤S401:获取视频码流,所述视频码流由图像帧和背景帧编码而成,所述视频码流中插入有各帧图像在解码时是否显示的标识。Step S401: Acquire a video code stream, where the video code stream is encoded by an image frame and a background frame, and an identifier of whether each frame image is displayed at the time of decoding is inserted into the video code stream.
步骤S402:基于所述背景帧解码所述视频码流的图像帧;Step S402: Decoding an image frame of the video code stream based on the background frame;
步骤S403:基于所述标识显示相应帧的图像。Step S403: Display an image of the corresponding frame based on the identifier.
在本方案中,因为背景帧对应的码流添加了标识,在解码时,不再是直接根据参考关系解码和显示所有的帧,而是根据标识选择性地显示需要显示的图像,提高了显示效率。具体的解码过程在现有技术中多有阐述,在此不做进一步说明。In this solution, since the code stream corresponding to the background frame is added with an identifier, when decoding, it is no longer directly decoding and displaying all the frames according to the reference relationship, but the image to be displayed is selectively displayed according to the identifier, and the display is improved. effectiveness. The specific decoding process is described in the prior art and will not be further described herein.
其中,所述标识设置于所述视频码流的NAL单元头信息、各帧对应条带的头信息或视频码流前端的Picture Header。The identifier is set in the NAL unit header information of the video code stream, the header information of the corresponding stripe of each frame, or the Picture Header of the video stream stream front end.
其中,所述背景帧对应的标识为不予显示,所述图像帧对应的标识为显示。
The identifier corresponding to the background frame is not displayed, and the identifier corresponding to the image frame is displayed.
以下是本发明具体实施方式中提供的一种视频解码的装置的实施例,视频解码的装置的实施例基于上述的视频解码的方法的实施例实现,在视频解码的装置的实施例中未尽的阐述,请参考上述的视频解码的方法的实施例。The following is an embodiment of a device for video decoding provided in an embodiment of the present invention. The embodiment of the device for video decoding is implemented based on the embodiment of the method for video decoding described above, and is not implemented in the embodiment of the device for decoding video. For an explanation, please refer to the above embodiment of the video decoding method.
请参考图8,其是本发明具体实施方式中提供的一种视频解码的装置的实施例的结构方框图,如图所示,该装置,包括:Please refer to FIG. 8 , which is a structural block diagram of an embodiment of a video decoding apparatus according to an embodiment of the present invention. As shown in the figure, the apparatus includes:
视频码流获取单元510,用于获取视频码流,所述视频码流由图像帧和背景帧编码而成,所述视频码流中插入有各帧图像在解码时是否显示的标识;The video code stream obtaining unit 510 is configured to obtain a video code stream, where the video code stream is encoded by an image frame and a background frame, and the video code stream is inserted with an identifier of whether each frame image is displayed during decoding;
解码单元520,用于基于所述背景帧解码所述视频码流的图像帧;Decoding unit 520, configured to decode an image frame of the video code stream based on the background frame;
显示单元530,用于基于所述标识显示相应帧的图像。The display unit 530 is configured to display an image of the corresponding frame based on the identifier.
其中,所述标识设置于所述视频码流的NAL单元头信息、各帧对应条带的头信息或视频码流前端的Picture Header。The identifier is set in the NAL unit header information of the video code stream, the header information of the corresponding stripe of each frame, or the Picture Header of the video stream stream front end.
其中,所述背景帧对应的标识为不予显示,所述图像帧对应的标识为显示。The identifier corresponding to the background frame is not displayed, and the identifier corresponding to the image frame is displayed.
在本方案中,因为背景帧对应的码流添加了标识,在解码时,不再是直接根据参考关系解码和显示所有的帧,而是根据标识选择性地显示需要显示的图像,提高了显示效率。In this solution, since the code stream corresponding to the background frame is added with an identifier, when decoding, it is no longer directly decoding and displaying all the frames according to the reference relationship, but the image to be displayed is selectively displayed according to the identifier, and the display is improved. effectiveness.
本发明具体实施方式中最后提供了一种视频处理系统的实施例。如图9所示,该视频处理系统,包括视频编码装置30和视频解码装置50,其中,该视频编码装置30,包括:Finally, an embodiment of a video processing system is provided in the detailed description of the present invention. As shown in FIG. 9, the video processing system includes a video encoding device 30 and a video decoding device 50, wherein the video encoding device 30 includes:
背景帧生成单元310,用于为待编码视频序列生成背景帧;a background frame generating unit 310, configured to generate a background frame for the video sequence to be encoded;
码流生成单元320,用于对待编码视频序列的图像帧和背景帧进行编码各自生成视频码流;a code stream generating unit 320, configured to respectively encode an image frame and a background frame of the video sequence to be encoded to generate a video code stream;
标识插入单元330,用于在视频码流中插入各帧图像在解码时是否显示的标识。The identifier insertion unit 330 is configured to insert, in the video code stream, an identifier of whether each frame image is displayed at the time of decoding.
该视频解码装置50,包括:The video decoding device 50 includes:
视频码流获取单元510,用于获取视频码流,所述视频码流由图像帧和背景帧编码而成,所述视频码流中插入有各帧图像在解码时是否显示的标识;The video code stream obtaining unit 510 is configured to obtain a video code stream, where the video code stream is encoded by an image frame and a background frame, and the video code stream is inserted with an identifier of whether each frame image is displayed during decoding;
解码单元520,用于基于所述背景帧解码所述视频码流的图像帧;
Decoding unit 520, configured to decode an image frame of the video code stream based on the background frame;
显示单元530,用于基于所述标识显示相应帧的图像。The display unit 530 is configured to display an image of the corresponding frame based on the identifier.
该视频处理系统,通过为待编码视频序列生成背景帧,将待编码视频编码为图像帧和背景帧两条视频码流,为视频码流添加标识确认对应的图像在解码时是否需要显示,在码流层支持非显示帧编码,以支持背景图像参考,提高编码效率。在解码时,不再是直接根据参考关系解码和显示所有的帧,而是根据标识选择性地显示需要显示的图像,提高了显示效率。The video processing system generates a background frame for the video sequence to be encoded, encodes the video to be encoded into two video code streams of an image frame and a background frame, and adds an identifier to the video stream to confirm whether the corresponding image needs to be displayed during decoding. The code stream layer supports non-display frame coding to support background image reference and improve coding efficiency. At the time of decoding, it is no longer directly decoding and displaying all the frames according to the reference relationship, but selectively displaying the image to be displayed according to the identification, thereby improving the display efficiency.
应当理解的是,本发明的上述具体实施方式仅仅用于示例性说明或解释本发明的原理,而不构成对本发明的限制。因此,在不偏离本发明的精神和范围的情况下所做的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。此外,本发明所附权利要求旨在涵盖落入所附权利要求范围和边界、或者这种范围和边界的等同形式内的全部变化和修改例。The above-described embodiments of the present invention are intended to be illustrative only and not to limit the invention. Therefore, any modifications, equivalent substitutions, improvements, etc., which are made without departing from the spirit and scope of the invention, are intended to be included within the scope of the invention. Rather, the scope of the appended claims is intended to cover all such modifications and modifications
尽管已经详细描述了本发明的实施方式,但是应该理解的是,在不偏离本发明的精神和范围的情况下,可以对本发明的实施方式做出各种改变、替换和变更。
Although the embodiments of the present invention have been described in detail, it is understood that various modifications, changes and changes may be made to the embodiments of the present invention without departing from the spirit and scope of the invention.
Claims (26)
- 一种视频编码方法,包括:A video encoding method comprising:为待编码视频序列生成背景帧;Generating a background frame for the video sequence to be encoded;对待编码视频序列的图像帧和背景帧进行编码各自生成视频码流;Encoding the image frame and the background frame of the encoded video sequence to generate a video code stream;在视频码流中插入各帧图像在解码时是否显示的标识。An identifier for displaying whether each frame image is displayed at the time of decoding is inserted in the video code stream.
- 根据权利要求1所述的一种视频编码方法,其中,所述在视频码流中插入各帧图像在解码时是否显示的标识,包括:The video encoding method according to claim 1, wherein the inserting, in the video code stream, whether the image of each frame is displayed during decoding comprises:在视频码流的NAL单元的头信息中用2个比特标识该NAL单元对应的帧的类型,其中标识显示该帧为背景帧则解码时不予显示。In the header information of the NAL unit of the video code stream, the type of the frame corresponding to the NAL unit is identified by 2 bits, wherein the identifier is not displayed when the frame is displayed as a background frame.
- 根据权利要求1所述的一种视频编码方法,其中,所述对待编码视频序列的图像帧和背景帧进行编码各自生成视频码流,包括:The video encoding method according to claim 1, wherein the encoding of the image frame and the background frame of the video sequence to be encoded respectively generates a video code stream, comprising:将待编码视频序列的图像帧和背景帧分成对应条带进行编码各自生成视频流;The image frame and the background frame of the video sequence to be encoded are divided into corresponding strips to encode respective generated video streams;所述在视频码流中插入各帧图像在解码时是否显示的标识,包括:The identifier for inserting each frame image in the video code stream to be displayed during decoding includes:在条带头信息中增加语法元素或修改原有语法元素的语义以标识该条带在解码时是否显示。Adding a syntax element to the strip header information or modifying the semantics of the original syntax element to identify whether the stripe is displayed when decoded.
- 根据权利要求1所述的一种视频编码方法,其中,所述在视频码流中插入各帧图像在解码时是否显示的标识,包括:The video encoding method according to claim 1, wherein the inserting, in the video code stream, whether the image of each frame is displayed during decoding comprises:在背景帧对应的视频码流前端插入携带背景帧头信息的Picture Header。A Picture Header carrying background frame header information is inserted at the front end of the video stream corresponding to the background frame.
- 根据权利要求1所述的一种视频编码方法,其中,所述图像帧参考所述背景帧进行编码。A video encoding method according to claim 1, wherein said image frame is encoded with reference to said background frame.
- 根据权利要求3所述的一种视频编码方法,其中,增加的所述语法元素包括is_output,类型为u(1),当u(1)的赋值为0时为不予显示,当u(1)的赋值为1时予以显示。A video encoding method according to claim 3, wherein the added syntax element comprises is_output, the type is u(1), and when u(1) is assigned a value of 0, it is not displayed, when u(1) When the assignment value is 1, it is displayed.
- 一种视频编码装置,包括:A video encoding device comprising:背景帧生成单元,用于为待编码视频序列生成背景帧; a background frame generating unit, configured to generate a background frame for the video sequence to be encoded;码流生成单元,用于对待编码视频序列的图像帧和背景帧进行编码各自生成视频码流;a code stream generating unit, configured to respectively encode an image frame and a background frame of the encoded video sequence to generate a video code stream;标识插入单元,用于在视频码流中插入各帧图像在解码时是否显示的标识。An identifier insertion unit is configured to insert, in the video code stream, an identifier of whether each frame image is displayed at the time of decoding.
- 根据权利要求7所述的一种视频编码装置,其中,所述标识插入单元用于:A video encoding apparatus according to claim 7, wherein said identification insertion unit is configured to:在视频码流的NAL单元的头信息中用2个比特标识该NAL单元对应的帧的类型,其中标识显示该帧为背景帧则解码时不予显示。In the header information of the NAL unit of the video code stream, the type of the frame corresponding to the NAL unit is identified by 2 bits, wherein the identifier is not displayed when the frame is displayed as a background frame.
- 根据权利要求7所述的一种视频编码装置,其中,所述码流生成单元用于:A video encoding apparatus according to claim 7, wherein said code stream generating unit is configured to:将待编码视频序列的图像帧和背景帧分成对应条带进行编码各自生成视频流;The image frame and the background frame of the video sequence to be encoded are divided into corresponding strips to encode respective generated video streams;所述标识插入单元用于:The identification insertion unit is used to:在条带头信息中增加语法元素或修改原有语法元素的语义以标识该条带在解码时是否显示。Adding a syntax element to the strip header information or modifying the semantics of the original syntax element to identify whether the stripe is displayed when decoded.
- 根据权利要求7所述的一种视频编码装置,其中,所述标识插入单元用于:A video encoding apparatus according to claim 7, wherein said identification insertion unit is configured to:在背景帧对应的视频码流前端插入携带背景帧头信息的Picture Header。A Picture Header carrying background frame header information is inserted at the front end of the video stream corresponding to the background frame.
- 根据权利要求7所述的一种视频编码装置,其中,所述图像帧参考所述背景帧进行编码。A video encoding apparatus according to claim 7, wherein said image frame is encoded with reference to said background frame.
- 根据权利要求9所述的一种视频编码装置,其中,增加的所述语法元素包括is_output,类型为u(1),当u(1)的赋值为0时为不予显示,当u(1)的赋值为1时予以显示。A video encoding apparatus according to claim 9, wherein said added syntax element comprises is_output of type u(1), and when u(1) is assigned a value of 0, it is not displayed, when u(1) When the assignment value is 1, it is displayed.
- 一种视频解码方法,包括:A video decoding method includes:获取视频码流,所述视频码流由图像帧和背景帧编码而成,所述视频码流中插入有各帧图像在解码时是否显示的标识;Obtaining a video code stream, where the video code stream is encoded by an image frame and a background frame, and the video code stream is inserted with an identifier of whether each frame image is displayed at the time of decoding;基于所述背景帧解码所述视频码流的图像帧;Decoding an image frame of the video code stream based on the background frame;基于所述标识显示相应帧的图像。An image of the corresponding frame is displayed based on the identification.
- 根据权利要求13所述的一种视频解码方法,其中,所述标识设置于所述视频码流的NAL单元头信息、各帧对应条带的头信息或视频码流前端的Picture Header。 The video decoding method according to claim 13, wherein the identifier is set to NAL unit header information of the video code stream, header information of a corresponding strip of each frame, or a Picture Header of a video stream stream front end.
- 根据权利要求13所述的一种视频解码方法,其中,所述背景帧对应的标识为不予显示,所述图像帧对应的标识为显示。The video decoding method according to claim 13, wherein the identifier corresponding to the background frame is not displayed, and the identifier corresponding to the image frame is displayed.
- 一种视频解码装置,包括:A video decoding device comprising:视频码流获取单元,用于获取视频码流,所述视频码流由图像帧和背景帧编码而成,所述视频码流中插入有各帧图像在解码时是否显示的标识;a video code stream acquiring unit, configured to obtain a video code stream, where the video code stream is encoded by an image frame and a background frame, and the video code stream is inserted with an identifier of whether each frame image is displayed when decoding;解码单元,用于基于所述背景帧解码所述视频码流的图像帧;a decoding unit, configured to decode an image frame of the video code stream based on the background frame;显示单元,用于基于所述标识显示相应帧的图像。And a display unit, configured to display an image of the corresponding frame based on the identifier.
- 根据权利要求16所述的一种视频解码装置,其中,所述标识设置于所述视频码流的NAL单元头信息、各帧对应条带的头信息或视频码流前端的Picture Header。A video decoding apparatus according to claim 16, wherein said identifier is set to NAL unit header information of said video code stream, header information of a stripe corresponding to each frame, or a Picture Header of a video stream stream front end.
- 根据权利要求16所述的一种视频解码装置,其中,所述背景帧对应的标识为不予显示,所述图像帧对应的标识为显示。The video decoding device according to claim 16, wherein the identifier corresponding to the background frame is not displayed, and the identifier corresponding to the image frame is displayed.
- 一种视频处理系统,包括视频编码装置和视频解码装置,A video processing system including a video encoding device and a video decoding device,所述视频编码装置包括:The video encoding device includes:背景帧生成单元,用于为待编码视频序列生成背景帧;a background frame generating unit, configured to generate a background frame for the video sequence to be encoded;码流生成单元,用于对待编码视频序列的图像帧和背景帧进行编码各自生成视频码流;a code stream generating unit, configured to respectively encode an image frame and a background frame of the encoded video sequence to generate a video code stream;标识插入单元,用于在视频码流中插入各帧图像在解码时是否显示的标识;An identifier insertion unit, configured to insert, in the video code stream, an identifier of whether each frame image is displayed at the time of decoding;所述视频解码装置包括:The video decoding device includes:视频码流获取单元,用于获取视频码流,所述视频码流由图像帧和背景帧编码而成,所述视频码流中插入有各帧图像在解码时是否显示的标识;a video code stream acquiring unit, configured to obtain a video code stream, where the video code stream is encoded by an image frame and a background frame, and the video code stream is inserted with an identifier of whether each frame image is displayed when decoding;解码单元,用于基于所述背景帧解码所述视频码流的图像帧;a decoding unit, configured to decode an image frame of the video code stream based on the background frame;显示单元,用于基于所述标识显示相应帧的图像。And a display unit, configured to display an image of the corresponding frame based on the identifier.
- 根据权利要求19所述的一种视频处理系统,其中,所述标识插入单元用于:A video processing system according to claim 19, wherein said identification insertion unit is for:在视频码流的NAL单元的头信息中用2个比特标识该NAL单元对应的帧的类型,其中标识显示该帧为背景帧则解码时不予显示。In the header information of the NAL unit of the video code stream, the type of the frame corresponding to the NAL unit is identified by 2 bits, wherein the identifier is not displayed when the frame is displayed as a background frame.
- 根据权利要求19所述的一种视频处理系统,其中,所述码流生成单元用于: A video processing system according to claim 19, wherein said code stream generating unit is configured to:将待编码视频序列的图像帧和背景帧分成对应条带进行编码各自生成视频流;The image frame and the background frame of the video sequence to be encoded are divided into corresponding strips to encode respective generated video streams;所述标识插入单元用于:The identification insertion unit is used to:在条带头信息中增加语法元素或修改原有语法元素的语义以标识该条带在解码时是否显示。Adding a syntax element to the strip header information or modifying the semantics of the original syntax element to identify whether the stripe is displayed when decoded.
- 根据权利要求19所述的一种视频处理系统,其中,所述标识插入单元用于:A video processing system according to claim 19, wherein said identification insertion unit is for:在背景帧对应的视频码流前端插入携带背景帧头信息的Picture Header。A Picture Header carrying background frame header information is inserted at the front end of the video stream corresponding to the background frame.
- 根据权利要求19所述的一种视频处理系统,其中,所述图像帧参考所述背景帧进行编码。A video processing system according to claim 19, wherein said image frame is encoded with reference to said background frame.
- 根据权利要求21所述的一种视频处理系统,其中,增加的所述语法元素包括is_output,类型为u(1),当u(1)的赋值为0时为不予显示,当u(1)的赋值为1时予以显示。A video processing system according to claim 21, wherein said added syntax element comprises is_output of type u(1), and when u(1) is assigned a value of 0, it is not displayed, when u(1) When the assignment value is 1, it is displayed.
- 根据权利要求19所述的一种视频处理系统,其中,所述标识设置于所述视频码流的NAL单元头信息、各帧对应条带的头信息或视频码流前端的Picture Header。A video processing system according to claim 19, wherein said identifier is set in NAL unit header information of said video code stream, header information of a stripe corresponding to each frame, or Picture Header of a video stream stream front end.
- 根据权利要求19所述的一种视频处理系统,其中,所述背景帧对应的标识为不予显示,所述图像帧对应的标识为显示。 The video processing system according to claim 19, wherein the identifier corresponding to the background frame is not displayed, and the identifier corresponding to the image frame is displayed.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510164858.6A CN106162194A (en) | 2015-04-08 | 2015-04-08 | A kind of Video coding and the method for decoding, device and processing system |
CN201510164858.6 | 2015-04-08 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2016161678A1 true WO2016161678A1 (en) | 2016-10-13 |
Family
ID=57071795
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2015/077866 WO2016161678A1 (en) | 2015-04-08 | 2015-04-29 | Method, device, and processing system for video encoding and decoding |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN106162194A (en) |
WO (1) | WO2016161678A1 (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109963176B (en) * | 2017-12-26 | 2021-12-07 | 中兴通讯股份有限公司 | Video code stream processing method and device, network equipment and readable storage medium |
US10484710B2 (en) | 2018-03-21 | 2019-11-19 | Novatek Microelectronics Corp. | Video encoding apparatus and method |
CN110858916B (en) * | 2018-08-24 | 2020-11-24 | 上海交通大学 | Identification method and system supporting large-span correlation information coding |
CN114245145A (en) * | 2021-12-18 | 2022-03-25 | 杭州视洞科技有限公司 | Monitoring equipment video compression method based on background frame |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2008019156A2 (en) * | 2006-08-08 | 2008-02-14 | Digital Media Cartridge, Ltd. | System and method for cartoon compression |
CN101969559A (en) * | 2010-10-22 | 2011-02-09 | 北京大学 | Transpression method of video code stream and system of same |
CN103152570A (en) * | 2013-03-01 | 2013-06-12 | 北京大学 | Method and device for decoding video bit stream |
CN103167283A (en) * | 2011-12-19 | 2013-06-19 | 华为技术有限公司 | Video coding method and device |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030067469A1 (en) * | 2001-10-09 | 2003-04-10 | Atousa Soroushi | Inklayer image with transparency |
JP2005260912A (en) * | 2004-02-10 | 2005-09-22 | Matsushita Electric Ind Co Ltd | Video image communication device and method |
US20080095228A1 (en) * | 2006-10-20 | 2008-04-24 | Nokia Corporation | System and method for providing picture output indications in video coding |
-
2015
- 2015-04-08 CN CN201510164858.6A patent/CN106162194A/en active Pending
- 2015-04-29 WO PCT/CN2015/077866 patent/WO2016161678A1/en active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2008019156A2 (en) * | 2006-08-08 | 2008-02-14 | Digital Media Cartridge, Ltd. | System and method for cartoon compression |
CN101969559A (en) * | 2010-10-22 | 2011-02-09 | 北京大学 | Transpression method of video code stream and system of same |
CN103167283A (en) * | 2011-12-19 | 2013-06-19 | 华为技术有限公司 | Video coding method and device |
CN103152570A (en) * | 2013-03-01 | 2013-06-12 | 北京大学 | Method and device for decoding video bit stream |
Also Published As
Publication number | Publication date |
---|---|
CN106162194A (en) | 2016-11-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20230171399A1 (en) | Intra prediction-based image coding method and apparatus using mpm list | |
US10021418B2 (en) | Method and apparatus of candidate generation for single sample mode in video coding | |
US20220182681A1 (en) | Image or video coding based on sub-picture handling structure | |
US9473790B2 (en) | Inter-prediction method and video encoding/decoding method using the inter-prediction method | |
US8923640B1 (en) | Coherence groups: region descriptors for low bit rate encoding | |
BR122021009784A2 (en) | IMAGE DECODING METHOD AND APPARATUS BASED ON AFIM MOVEMENT PREDICTION USING AFIM MVP CANDIDATES LIST IN THE IMAGE CODING SYSTEM | |
WO2016161678A1 (en) | Method, device, and processing system for video encoding and decoding | |
JP2015527806A (en) | Video signal processing method and apparatus | |
JP2013229674A (en) | Image coding device, image decoding device, image coding method, image decoding method, image coding program, and image decoding program | |
US20230370628A1 (en) | Image encoding/decoding method and device for signaling information related to sub picture and picture header, and method for transmitting bitstream | |
WO2016161674A1 (en) | Method, device, and system for video image compression and reading | |
EP3734974A1 (en) | Method and apparatus for processing video bitstream, network device, and readable storage medium | |
US11533476B2 (en) | Image encoding/decoding method and apparatus using IBC, and method for transmitting bitstream | |
CN118525518A (en) | Video processing method, device and medium | |
CA3134688A1 (en) | Image coding method using candidates from intra-prediction types to perform intra-prediction | |
CN113508583A (en) | Video or image coding based on intra block coding | |
US20150127846A1 (en) | Encoding System and Encoding Method for Video Signals | |
US9648336B2 (en) | Encoding apparatus and method | |
CN104980763B (en) | Video code stream, video coding and decoding method and device | |
CN111279694A (en) | GDR code stream encoding method, terminal device and machine readable storage medium | |
TWI384887B (en) | Multiview video encode/decode method | |
US9491483B2 (en) | Inter-prediction method and video encoding/decoding method using the inter-prediction method | |
JP7494315B2 (en) | Image encoding/decoding method and device based on available slice type information for GDR or IRPA pictures, and recording medium for storing bitstreams | |
RU2804481C2 (en) | Image decoding method and device and image coding method and device in image coding system | |
JP6268559B2 (en) | Method and apparatus for encoding and decoding video data |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 15888233 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205N DATED 29/03/2018) |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 15888233 Country of ref document: EP Kind code of ref document: A1 |