WO2016161678A1 - 一种视频编码和解码的方法、装置和处理系统 - Google Patents

一种视频编码和解码的方法、装置和处理系统 Download PDF

Info

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
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.)
Ceased
Application number
PCT/CN2015/077866
Other languages
English (en)
French (fr)
Inventor
武晓阳
浦世亮
沈林杰
俞海
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou Hikvision Digital Technology Co Ltd
Original Assignee
Hangzhou Hikvision Digital Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Hikvision Digital Technology Co Ltd filed Critical Hangzhou Hikvision Digital Technology Co Ltd
Publication of WO2016161678A1 publication Critical patent/WO2016161678A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals

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

一种视频编码和解码的方法、装置和处理系统。该方法,包括:为待编码视频序列生成背景帧;对待编码视频序列的图像帧和背景帧进行编码各自生成视频码流;在视频码流中插入各帧图像在解码时是否显示的标识。通过为待编码视频序列生成背景帧,将待编码视频编码为图像帧和背景帧两条视频码流,为视频码流添加标识确认对应的图像在解码时是否需要显示,在码流层支持非显示帧编码,以支持背景图像参考,提高编码效率,并可在显示时避免显示不必要显示的图像,提高显示效率。

Description

一种视频编码和解码的方法、装置和处理系统 技术领域
本发明涉及视频监控技术领域,尤其涉及一种视频编码和解码的方法、装置和处理系统。
背景技术
数字视频压缩标准开始于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大编码技术,对图像的等分块进行编码。
预测编码是视频压缩的重要编码技术,根据预测数据来源不同,可以把编码图像分成I帧(帧内预测帧、Intra)、P帧(帧间预测帧、Prediction)、B帧(双向预测帧、Bi-Prediction)。如图1所示,I帧进行预测编码时,只采用本帧的数据进行预测,解码的时候可以独立解码,不依赖其他帧。P帧进行预测编码时,采用前面一帧已编码图像的重建图像作为参考,P帧解码的时候,必须等参考帧的图像解码完成才能解码。B帧进行预测编码时,可以同时采用前面帧和后面帧做参考,成为双向参考帧,B帧解码是需要前面参考帧和后面参考帧都解码成功后才能解码。P帧、B帧在编码时除了用其他帧做参考,也可以像I帧样用本帧数据做参考,选择两者最优情况就行。
在监控视频中,大部分采集的画面是固定的场景,画面上静止的区域多,称为背景;运动的部分少,称为前景(或目标),通常为运动物体。另一方面,随着技术的进步和处理器性能的提升,目标提取精度越来越高。为了进一步提高监控视频的压缩效率,可以将目标提取和视频编码进行结合,将需要编码的画面分成背景部分和目标部分,目标部分也称为前景部分。对于背景部分的编码,采用背景图像做参考,可以很大提高编码效率。图2是基于背景帧参考的编码参考关系,原来的I帧改为R帧(刷新帧),不再是全部采用帧内预测技术,可以参考背景帧进行帧间编码,而且只能参考背景帧。其他P帧、B帧参考关系不变,另外也可以参考背景帧编码。通常情况下G帧(背景帧)间隔很大,理论上只要场景没有大的变化,比如光线骤变、云台转换,都可以采用该背景帧进行编码。通过这样的思路,可以进一步提高视频的压缩效率。
在背景帧参考编码的方案中,背景帧(G帧)与其他帧不同的地方就是它可能并不是视频序列中本来存在的,可以通过背景生成技术或者挑选静止帧等方式产生。这样的背景帧在随机接入时,其实并不需要显示,而只要显示随机接入的R帧即可,但现有技术中,参与编码的图像帧,都是需要显示的,无法实现支持非显示图像的编码。
发明内容
本发明的目的是提供一种视频编码和解码的方法、装置和处理系统,其通过为待编码视频序列生成背景帧,将待编码视频编码为图像帧和背景帧两条视频码流,为视频码流添加标识确认对应的图像在解码时是否需要显示,在码流层支持非显示帧编码,以支持背景图像参考,提高编码效率,并可在显示时避免显示不必要显示的图像。
为实现上述目的,具体采用以下技术方案:
第一方面采用一种视频编码方法,包括:
为待编码视频序列生成背景帧;
对待编码视频序列的图像帧和背景帧进行编码各自生成视频码流;
在视频码流中插入各帧图像在解码时是否显示的标识。
其中,所述在视频码流中插入各帧图像在解码时是否显示的标识,具体为:
在视频码流的NAL单元的头信息中用2个比特标识该NAL单元对应的帧的类型,其中标识显示该帧为背景帧则解码时不予显示。
其中,所述对待编码视频序列的图像帧和背景帧进行编码各自生成视频码流,具体为:
将待编码视频序列的图像帧和背景帧分成对应条带进行编码各自生成视频流;
所述在视频码流中插入各帧图像在解码时是否显示的标识,具体为:
在条带头信息中增加语法元素或修改原有语法元素的语义以标识该条带在解码时是否显示。
其中,所述在视频码流中插入各帧图像在解码时是否显示的标识,具体为:
在背景帧对应的视频码流前端插入携带背景帧头信息的Picture Header。
其中,所述图像帧参考所述背景帧进行编码。
其中,增加的所述语法元素包括is_output,类型为u(1),当u(1)的赋值为0时为不予显示,当u(1)的赋值为1时予以显示。
第二方面采用一种视频编码装置,包括:
背景帧生成单元,用于为待编码视频序列生成背景帧;
码流生成单元,用于对待编码视频序列的图像帧和背景帧进行编码各自生成视频码流;
标识插入单元,用于在视频码流中插入各帧图像在解码时是否显示的标识。
其中,所述标识插入单元,具体用于:
在视频码流的NAL单元的头信息中用2个比特标识该NAL单元对应的帧的类型,其中标识显示该帧为背景帧则解码时不予显示。
其中,所述码流生成单元,具体用于:
将待编码视频序列的图像帧和背景帧分成对应条带进行编码各自生成视频流;
所述标识插入单元,具体用于:
在条带头信息中增加语法元素或修改原有语法元素的语义以标识该条带在解码时是否显示。
其中,所述标识插入单元,具体为:
在背景帧对应的视频码流前端插入携带背景帧头信息的Picture Header。
其中,所述图像帧参考所述背景帧进行编码。
其中,增加的所述语法元素包括is_output,类型为u(1),当u(1)的赋值为0时为不予显示,当u(1)的赋值为1时予以显示。
第三方面采用一种视频解码方法,包括:
获取视频码流,所述视频码流由图像帧和背景帧编码而成,所述视频码流中插入有各帧图像在解码时是否显示的标识;
基于所述背景帧解码所述视频码流的图像帧;
基于所述标识显示相应帧的图像。
其中,所述标识设置于所述视频码流的NAL单元头信息、各帧对应条带的头信息或视频码流前端的Picture Header。
其中,所述背景帧对应的标识为不予显示,所述图像帧对应的标识为显示。
第四方面采用一种视频解码装置,包括:
视频码流获取单元,用于获取视频码流,所述视频码流由图像帧和背景帧编码而成,所述视频码流中插入有各帧图像在解码时是否显示的标识;
解码单元,用于基于所述背景帧解码所述视频码流的图像帧;
显示单元,用于基于所述标识显示相应帧的图像。
其中,所述标识设置于所述视频码流的NAL单元头信息、各帧对应条带的头信息或视频码流前端的Picture Header。
其中,所述背景帧对应的标识为不予显示,所述图像帧对应的标识为显示。
第五方面采用一种视频处理系统,包括上述任意一项所述的视频编码装置和上述任意一项所述的视频解码装置。
本发明的有益效果在于:通过为待编码视频序列生成背景帧,将待编码视频编码为图像帧和背景帧两条视频码流,为视频码流添加标识确认对应的图像在解码时是否需要显示,在码流层支持非显示帧编码,以支持背景图像参考,提高编码效率,并可在显示时避免显示不必要显示的图像。
附图说明
图1是现有技术中基于块的混合编码中帧间参考关系的示意图;
图2是背景帧参考关系的示意图;
图3是本发明具体实施方式中提供的一种视频编码的方法的第一实施例的方法流程图;
图4是本发明具体实施方式中提供的一种视频编码的方法的第二实施例的方法流程图;
图5是本发明具体实施方式中提供的一种视频编码的方法的第二实施例中NAL头信息的结构示意图;
图6是本发明具体实施方式中提供的一种视频编码的装置的第一实施例的结构方框图;
图7是本发明具体实施方式中提供的一种视频解码的方法的第一实施例的方法流程图;
图8是本发明具体实施方式中提供的一种视频解码的装置的第一实施例的结构方框图;
图9是本发明具体实施方式中提供的一种视频处理系统的第一实施例的结构方框图。
具体实施方式
为使本发明的目的、技术方案和优点更加清楚明了,下面结合具体实施方式并参照附图,对本发明进一步详细说明。应该理解,这些描述只是示例性的,而并非要限制本发明的范围。此外,在以下说明中,省略了对公知结构和技术的描述,以避免不必要地混淆本发明的概念。
请参考图3,其是本发明具体实施方式中提供的一种视频编码的方法的第一实施例的方法流程图。本实施例中的方法,主要用于各种视频存储,特别是视频图像中场景结构单一的监控视频的存储。如图所示,该方法,包括:
步骤S101:为待编码视频序列生成背景帧。
在视频编码的过程中,背景帧可以不存在于视频序列中,只是通过一定的技术手段从视频序列中生成出来的一种图像帧,并不在视频序列中独立存在,具体可以通过背景生成技术从视频序列中提取出背景帧;或者从视频序列中挑选静止帧作为背景帧。
步骤S102:对待编码视频序列的图像帧和背景帧进行编码各自生成视频码流。
对视频序列中的图像帧和背景帧分别进行编码,图像帧根据编码需要选择是否参考背景帧,同时背景帧也要进行编码,因为背景帧的每一帧都相同,所以背景帧的编码是比较容易。编码完成后各自生成视频码流。
步骤S103:在视频码流中插入各帧图像在解码时是否显示的标识。
按现有的技术方案,视频码流解码将会显示所有图像,但是在本方案中,针对图像帧的实际显示需求,对于其中无需显示的视频码流将会添加标识,用以说明对应的图像是否需要解码显示。
综上所述,通过为待编码视频序列生成背景帧,将待编码视频编码为图像帧和背景帧两条视频码流,为视频码流添加标识确认对应的图像在解码时是否需要显示,在码流层支持非显示帧编码,以支持背景图像参考,提高编码效率。
请参考图4,其是发明具体实施方式中提供的一种视频编码的方法的第二实施例的方法流程图,如图所示,该方法包括:
步骤S201:为待编码视频序列生成背景帧。
步骤S202:将待编码视频序列的图像帧和背景帧分成对应条带进行编码各自生成视频流。
H.264中将图像分成条带slice进行编码,每个slice包含Slice Header信息,也就是条带头信息,表1是条带头信息部分语法元素。
表1
Figure PCTCN2015077866-appb-000001
Figure PCTCN2015077866-appb-000002
步骤S203:在条带头信息中增加语法元素或修改原有语法元素的语义以标识该条带在解码时是否显示。
在这种方式中,可以在slice header中增加语法元素或者修改原有语法元素语义,以表达该slice是否需要显示,比如在if(IdrPicFlag)前增加is_ouput语法元素,类型为u(1),当u(1)的赋值为0时为不予显示,当u(1)的赋值为1时予以显示。
对于背景帧而言,其对应的图像是不需要显示的,所以背景帧对应的条带头信息中应添加不予显示的标识。
亦可根据编码方式,对应选择的合适操作的标识方式。例如,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,则代表该帧图像为背景帧,不用显示。
在预测编码中,编码图像分为I帧、B帧和P帧;在本方案中,除了上述的三种帧类型,还有背景帧存在,并且本方案中对应I帧并不是绝对意义上的I帧,I帧可以为P帧提供参考,但是I帧并不能实现帧内预测,也就是不能独立解码,必须参考背景帧,为体现区别,本方案中将对应I帧的功能帧称为R帧,意为刷新帧。
在AVS1-P2标准中,图像编码前都有头信息,I帧前面有i_picture_header,如表2所示。
表2
i_picture_header(){ 描述符
i_picture_start_code f(32)
bbv_delay u(16)
if(profile_id==0x40||profile_id==0x24)  
marker_bit f(1)
bbv_delay_extension u(7)
}  
if(profile_id==0x24){  
if(background_picture_disable==`0`)  
background_picture_flag u(1)
if(core_picture_disable==`0`)  
core_picrure_flag u(1)
}  
P、B帧前面有pb_picture_header如表3所示。可以相应增加G帧头信息g_picture_header,如有必要,可以同时将i_picture_header改为r_picture_header。根据头信息记录的帧类型确认是否需要显示,如果是g_picture_header则需要显示,否则不需要显示。
其中,所述图像帧参考所述背景帧进行编码。
表3
Figure PCTCN2015077866-appb-000003
Figure PCTCN2015077866-appb-000004
综上所述,通过为待编码视频序列生成背景帧,将待编码视频编码为图像帧和背景帧两条视频码流,为视频码流添加标识确认对应的图像在解码时是否需要显示,在码流层支持非显示帧编码,以支持背景图像参考,提高编码效率。并且针对可能采用的编码方式,设计了对应的标识方式。
以下是本发明具体实施方式中提供的一种视频编码的装置的实施例,视频编码的装置的实施例基于上述的视频编码的方法的实施例实现,在视频编码的装置的实施例中未尽的阐述,请参考上述的视频编码的方法的实施例。
请参考图6,其是本发明具体实施方式中提供的一种视频编码的装置的第一实施例的结构方框图,如图所示,该装置包括:
背景帧生成单元310,用于为待编码视频序列生成背景帧;
码流生成单元320,用于对待编码视频序列的图像帧和背景帧进行编码各自生成视频码流;
标识插入单元330,用于在视频码流中插入各帧图像在解码时是否显示的标识。
按现有的技术方案,视频码流解码将会显示所有图像,但是在本方案中,针对图像帧的实际显示需求,对于其中无需显示的视频码流将会添加标识,用以说明对应的图像是否需要解码显示。
优选地,所述标识插入单元330,具体用于:
在视频码流的NAL单元的头信息中用2个比特标识该NAL单元对应的帧的类型,其中标识显示该帧为背景帧则解码时不予显示。
另一种优选地实施方式,所述码流生成单元320,具体用于:
将待编码视频序列的图像帧和背景帧分成对应条带进行编码各自生成视频流;
所述标识插入单元330,具体用于:
在条带头信息中增加语法元素或修改原有语法元素的语义以标识该条带在解码时是否显示。
进一步地,增加的所述语法元素包括is_output,类型为u(1),当u(1)的赋值为0时为不予显示,当u(1)的赋值为1时予以显示。
又一种优选地实施方式,所述标识插入单元330,具体为:
在背景帧对应的视频码流前端插入携带背景帧头信息的Picture Header。
其中,所述图像帧参考所述背景帧进行编码。
综上所述,上述各单元的协同工作,通过为待编码视频序列生成背景帧,将待编码视频编码为图像帧和背景帧两条视频码流,为视频码流添加标识确认对应的图像在解码时是否需要显示,在码流层支持非显示帧编码,以支持背景图像参考,提高编码效率。
以下是本发明具体实施方式中提供的一种视频解码的方法的实施例,视频解码的方法的实施例主要是针对前述视频编码的方法实施例中得到的视频码流进行解码。如图7所以,该方法包括:
步骤S401:获取视频码流,所述视频码流由图像帧和背景帧编码而成,所述视频码流中插入有各帧图像在解码时是否显示的标识。
步骤S402:基于所述背景帧解码所述视频码流的图像帧;
步骤S403:基于所述标识显示相应帧的图像。
在本方案中,因为背景帧对应的码流添加了标识,在解码时,不再是直接根据参考关系解码和显示所有的帧,而是根据标识选择性地显示需要显示的图像,提高了显示效率。具体的解码过程在现有技术中多有阐述,在此不做进一步说明。
其中,所述标识设置于所述视频码流的NAL单元头信息、各帧对应条带的头信息或视频码流前端的Picture Header。
其中,所述背景帧对应的标识为不予显示,所述图像帧对应的标识为显示。
以下是本发明具体实施方式中提供的一种视频解码的装置的实施例,视频解码的装置的实施例基于上述的视频解码的方法的实施例实现,在视频解码的装置的实施例中未尽的阐述,请参考上述的视频解码的方法的实施例。
请参考图8,其是本发明具体实施方式中提供的一种视频解码的装置的实施例的结构方框图,如图所示,该装置,包括:
视频码流获取单元510,用于获取视频码流,所述视频码流由图像帧和背景帧编码而成,所述视频码流中插入有各帧图像在解码时是否显示的标识;
解码单元520,用于基于所述背景帧解码所述视频码流的图像帧;
显示单元530,用于基于所述标识显示相应帧的图像。
其中,所述标识设置于所述视频码流的NAL单元头信息、各帧对应条带的头信息或视频码流前端的Picture Header。
其中,所述背景帧对应的标识为不予显示,所述图像帧对应的标识为显示。
在本方案中,因为背景帧对应的码流添加了标识,在解码时,不再是直接根据参考关系解码和显示所有的帧,而是根据标识选择性地显示需要显示的图像,提高了显示效率。
本发明具体实施方式中最后提供了一种视频处理系统的实施例。如图9所示,该视频处理系统,包括视频编码装置30和视频解码装置50,其中,该视频编码装置30,包括:
背景帧生成单元310,用于为待编码视频序列生成背景帧;
码流生成单元320,用于对待编码视频序列的图像帧和背景帧进行编码各自生成视频码流;
标识插入单元330,用于在视频码流中插入各帧图像在解码时是否显示的标识。
该视频解码装置50,包括:
视频码流获取单元510,用于获取视频码流,所述视频码流由图像帧和背景帧编码而成,所述视频码流中插入有各帧图像在解码时是否显示的标识;
解码单元520,用于基于所述背景帧解码所述视频码流的图像帧;
显示单元530,用于基于所述标识显示相应帧的图像。
该视频处理系统,通过为待编码视频序列生成背景帧,将待编码视频编码为图像帧和背景帧两条视频码流,为视频码流添加标识确认对应的图像在解码时是否需要显示,在码流层支持非显示帧编码,以支持背景图像参考,提高编码效率。在解码时,不再是直接根据参考关系解码和显示所有的帧,而是根据标识选择性地显示需要显示的图像,提高了显示效率。
应当理解的是,本发明的上述具体实施方式仅仅用于示例性说明或解释本发明的原理,而不构成对本发明的限制。因此,在不偏离本发明的精神和范围的情况下所做的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。此外,本发明所附权利要求旨在涵盖落入所附权利要求范围和边界、或者这种范围和边界的等同形式内的全部变化和修改例。
尽管已经详细描述了本发明的实施方式,但是应该理解的是,在不偏离本发明的精神和范围的情况下,可以对本发明的实施方式做出各种改变、替换和变更。

Claims (26)

  1. 一种视频编码方法,包括:
    为待编码视频序列生成背景帧;
    对待编码视频序列的图像帧和背景帧进行编码各自生成视频码流;
    在视频码流中插入各帧图像在解码时是否显示的标识。
  2. 根据权利要求1所述的一种视频编码方法,其中,所述在视频码流中插入各帧图像在解码时是否显示的标识,包括:
    在视频码流的NAL单元的头信息中用2个比特标识该NAL单元对应的帧的类型,其中标识显示该帧为背景帧则解码时不予显示。
  3. 根据权利要求1所述的一种视频编码方法,其中,所述对待编码视频序列的图像帧和背景帧进行编码各自生成视频码流,包括:
    将待编码视频序列的图像帧和背景帧分成对应条带进行编码各自生成视频流;
    所述在视频码流中插入各帧图像在解码时是否显示的标识,包括:
    在条带头信息中增加语法元素或修改原有语法元素的语义以标识该条带在解码时是否显示。
  4. 根据权利要求1所述的一种视频编码方法,其中,所述在视频码流中插入各帧图像在解码时是否显示的标识,包括:
    在背景帧对应的视频码流前端插入携带背景帧头信息的Picture Header。
  5. 根据权利要求1所述的一种视频编码方法,其中,所述图像帧参考所述背景帧进行编码。
  6. 根据权利要求3所述的一种视频编码方法,其中,增加的所述语法元素包括is_output,类型为u(1),当u(1)的赋值为0时为不予显示,当u(1)的赋值为1时予以显示。
  7. 一种视频编码装置,包括:
    背景帧生成单元,用于为待编码视频序列生成背景帧;
    码流生成单元,用于对待编码视频序列的图像帧和背景帧进行编码各自生成视频码流;
    标识插入单元,用于在视频码流中插入各帧图像在解码时是否显示的标识。
  8. 根据权利要求7所述的一种视频编码装置,其中,所述标识插入单元用于:
    在视频码流的NAL单元的头信息中用2个比特标识该NAL单元对应的帧的类型,其中标识显示该帧为背景帧则解码时不予显示。
  9. 根据权利要求7所述的一种视频编码装置,其中,所述码流生成单元用于:
    将待编码视频序列的图像帧和背景帧分成对应条带进行编码各自生成视频流;
    所述标识插入单元用于:
    在条带头信息中增加语法元素或修改原有语法元素的语义以标识该条带在解码时是否显示。
  10. 根据权利要求7所述的一种视频编码装置,其中,所述标识插入单元用于:
    在背景帧对应的视频码流前端插入携带背景帧头信息的Picture Header。
  11. 根据权利要求7所述的一种视频编码装置,其中,所述图像帧参考所述背景帧进行编码。
  12. 根据权利要求9所述的一种视频编码装置,其中,增加的所述语法元素包括is_output,类型为u(1),当u(1)的赋值为0时为不予显示,当u(1)的赋值为1时予以显示。
  13. 一种视频解码方法,包括:
    获取视频码流,所述视频码流由图像帧和背景帧编码而成,所述视频码流中插入有各帧图像在解码时是否显示的标识;
    基于所述背景帧解码所述视频码流的图像帧;
    基于所述标识显示相应帧的图像。
  14. 根据权利要求13所述的一种视频解码方法,其中,所述标识设置于所述视频码流的NAL单元头信息、各帧对应条带的头信息或视频码流前端的Picture Header。
  15. 根据权利要求13所述的一种视频解码方法,其中,所述背景帧对应的标识为不予显示,所述图像帧对应的标识为显示。
  16. 一种视频解码装置,包括:
    视频码流获取单元,用于获取视频码流,所述视频码流由图像帧和背景帧编码而成,所述视频码流中插入有各帧图像在解码时是否显示的标识;
    解码单元,用于基于所述背景帧解码所述视频码流的图像帧;
    显示单元,用于基于所述标识显示相应帧的图像。
  17. 根据权利要求16所述的一种视频解码装置,其中,所述标识设置于所述视频码流的NAL单元头信息、各帧对应条带的头信息或视频码流前端的Picture Header。
  18. 根据权利要求16所述的一种视频解码装置,其中,所述背景帧对应的标识为不予显示,所述图像帧对应的标识为显示。
  19. 一种视频处理系统,包括视频编码装置和视频解码装置,
    所述视频编码装置包括:
    背景帧生成单元,用于为待编码视频序列生成背景帧;
    码流生成单元,用于对待编码视频序列的图像帧和背景帧进行编码各自生成视频码流;
    标识插入单元,用于在视频码流中插入各帧图像在解码时是否显示的标识;
    所述视频解码装置包括:
    视频码流获取单元,用于获取视频码流,所述视频码流由图像帧和背景帧编码而成,所述视频码流中插入有各帧图像在解码时是否显示的标识;
    解码单元,用于基于所述背景帧解码所述视频码流的图像帧;
    显示单元,用于基于所述标识显示相应帧的图像。
  20. 根据权利要求19所述的一种视频处理系统,其中,所述标识插入单元用于:
    在视频码流的NAL单元的头信息中用2个比特标识该NAL单元对应的帧的类型,其中标识显示该帧为背景帧则解码时不予显示。
  21. 根据权利要求19所述的一种视频处理系统,其中,所述码流生成单元用于:
    将待编码视频序列的图像帧和背景帧分成对应条带进行编码各自生成视频流;
    所述标识插入单元用于:
    在条带头信息中增加语法元素或修改原有语法元素的语义以标识该条带在解码时是否显示。
  22. 根据权利要求19所述的一种视频处理系统,其中,所述标识插入单元用于:
    在背景帧对应的视频码流前端插入携带背景帧头信息的Picture Header。
  23. 根据权利要求19所述的一种视频处理系统,其中,所述图像帧参考所述背景帧进行编码。
  24. 根据权利要求21所述的一种视频处理系统,其中,增加的所述语法元素包括is_output,类型为u(1),当u(1)的赋值为0时为不予显示,当u(1)的赋值为1时予以显示。
  25. 根据权利要求19所述的一种视频处理系统,其中,所述标识设置于所述视频码流的NAL单元头信息、各帧对应条带的头信息或视频码流前端的Picture Header。
  26. 根据权利要求19所述的一种视频处理系统,其中,所述背景帧对应的标识为不予显示,所述图像帧对应的标识为显示。
PCT/CN2015/077866 2015-04-08 2015-04-29 一种视频编码和解码的方法、装置和处理系统 Ceased WO2016161678A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510164858.6 2015-04-08
CN201510164858.6A CN106162194A (zh) 2015-04-08 2015-04-08 一种视频编码和解码的方法、装置和处理系统

Publications (1)

Publication Number Publication Date
WO2016161678A1 true WO2016161678A1 (zh) 2016-10-13

Family

ID=57071795

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/077866 Ceased WO2016161678A1 (zh) 2015-04-08 2015-04-29 一种视频编码和解码的方法、装置和处理系统

Country Status (2)

Country Link
CN (1) CN106162194A (zh)
WO (1) WO2016161678A1 (zh)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109963176B (zh) * 2017-12-26 2021-12-07 中兴通讯股份有限公司 视频码流处理方法、装置、网络设备和可读存储介质
US10484710B2 (en) 2018-03-21 2019-11-19 Novatek Microelectronics Corp. Video encoding apparatus and method
CN110858916B (zh) * 2018-08-24 2020-11-24 上海交通大学 支持大跨度相关性信息编码的标识方法及系统
CN114245145A (zh) * 2021-12-18 2022-03-25 杭州视洞科技有限公司 一种基于背景帧的监控设备视频压缩方法
CN119815026A (zh) * 2023-10-09 2025-04-11 浙江大学 基于插帧的视频编解码方法及装置

Citations (4)

* Cited by examiner, † Cited by third party
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 (zh) * 2010-10-22 2011-02-09 北京大学 视频码流的转换压缩方法与系统
CN103152570A (zh) * 2013-03-01 2013-06-12 北京大学 一种视频位流解码方法和装置
CN103167283A (zh) * 2011-12-19 2013-06-19 华为技术有限公司 一种视频编码方法及设备

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030067469A1 (en) * 2001-10-09 2003-04-10 Atousa Soroushi Inklayer image with transparency
JP2005260912A (ja) * 2004-02-10 2005-09-22 Matsushita Electric Ind Co Ltd 映像通信装置および映像通信方法
US20080095228A1 (en) * 2006-10-20 2008-04-24 Nokia Corporation System and method for providing picture output indications in video coding

Patent Citations (4)

* Cited by examiner, † Cited by third party
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 (zh) * 2010-10-22 2011-02-09 北京大学 视频码流的转换压缩方法与系统
CN103167283A (zh) * 2011-12-19 2013-06-19 华为技术有限公司 一种视频编码方法及设备
CN103152570A (zh) * 2013-03-01 2013-06-12 北京大学 一种视频位流解码方法和装置

Also Published As

Publication number Publication date
CN106162194A (zh) 2016-11-23

Similar Documents

Publication Publication Date Title
ES3025197T3 (en) Inter prediction method based on history-based motion vector, and device therefor
US10021418B2 (en) Method and apparatus of candidate generation for single sample mode in video coding
CN111448800B (zh) 在图像编码系统中使用仿射mvp候选列表的基于仿射运动预测的图像解码方法及设备
US9473790B2 (en) Inter-prediction method and video encoding/decoding method using the inter-prediction method
CN101682778A (zh) 使用基于对象边缘的分区进行编码和解码的方法和设备
EP4712484A2 (en) Image decoding apparatus and image encoding apparatus
CN118200541A (zh) 图像编码/解码设备、数据的发送设备以及存储介质
EP3734974A1 (en) Method and apparatus for processing video bitstream, network device, and readable storage medium
CN105850138A (zh) 在多层译码中译码恢复点补充增强信息(sei)消息和区刷新信息sei消息的方法
US20220394286A1 (en) Image encoding/decoding method and device for signaling information related to sub picture and picture header, and method for transmitting bitstream
WO2016161678A1 (zh) 一种视频编码和解码的方法、装置和处理系统
CN115443660A (zh) 用于解码与符号数据隐藏相关的成像的方法和设备
JP2015527806A (ja) ビデオ信号処理方法及び装置
JP2013229674A (ja) 画像符号化装置、画像復号装置、画像符号化方法、画像復号方法、画像符号化プログラム、及び画像復号プログラム
JP2014239428A (ja) デジタルビデオデータを符号化するための方法
JP2025502160A (ja) ビデオ処理の方法、装置及び媒体
WO2016161674A1 (zh) 一种视频图像压缩和读取的方法、装置及系统
US9648336B2 (en) Encoding apparatus and method
JP5685682B2 (ja) 映像信号の符号化システム及び符号化方法
JP7665834B2 (ja) Gdr又はirpaピクチャに対する利用可能スライスタイプ情報に基づく画像符号化/復号化方法及び装置、並びにビットストリームを保存する記録媒体
CN101682755B (zh) 通过对图像进行分区来对图像编码/解码的方法和设备
TWI384887B (zh) 多視點影像編解碼方法
US9491483B2 (en) Inter-prediction method and video encoding/decoding method using the inter-prediction method
CN113273210A (zh) 用于编译关于合并数据的信息的方法和装置
JP6268559B2 (ja) 映像データの符号化および復号方法ならびに装置

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