CN101540916B - A codec method and device - Google Patents

A codec method and device Download PDF

Info

Publication number
CN101540916B
CN101540916B CN 200810102347 CN200810102347A CN101540916B CN 101540916 B CN101540916 B CN 101540916B CN 200810102347 CN200810102347 CN 200810102347 CN 200810102347 A CN200810102347 A CN 200810102347A CN 101540916 B CN101540916 B CN 101540916B
Authority
CN
China
Prior art keywords
frame
error recovery
macro block
recovery frame
error
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN 200810102347
Other languages
Chinese (zh)
Other versions
CN101540916A (en
Inventor
赖昌材
郑萧桢
郑建铧
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN 200810102347 priority Critical patent/CN101540916B/en
Publication of CN101540916A publication Critical patent/CN101540916A/en
Application granted granted Critical
Publication of CN101540916B publication Critical patent/CN101540916B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

一种编解码方法及装置,其主要包括:在编码作为差错恢复帧的当前编码帧中的宏块时,识别该差错恢复帧的该宏块及该差错恢复帧之前的至少一个帧中对应位置的宏块的传输差错敏感性,所述的传输差错敏感性是指当该宏块发生传输差错时对解码图像质量的影响程度;若确定存在传输差错敏感性符合预定条件的宏块,则将所述差错恢复帧中的宏块采用帧内预测编码的方式进行编码操作。接收端接收相应的差错恢复帧对应的码流后,则可以终结可能出现的错误。本发明实施例的实现不仅可以有效终结编解码系统中产生的错误,同时,还可以有效降低差错恢复帧的插入对传输网络造成码流冲击,并可以降低差错恢复帧的插入对编解码系统的效率产生的影响。

Figure 200810102347

A codec method and device, which mainly includes: when encoding a macroblock in a current coded frame as an error recovery frame, identifying the macroblock in the error recovery frame and the corresponding position in at least one frame before the error recovery frame The transmission error sensitivity of the macroblock, the transmission error sensitivity refers to the degree of influence on the quality of the decoded image when a transmission error occurs in the macroblock; if it is determined that there is a macroblock whose transmission error sensitivity meets the predetermined condition, then the The macroblocks in the error recovery frame are coded in an intra-frame predictive coding manner. After receiving the code stream corresponding to the corresponding error recovery frame, the receiving end can terminate possible errors. The implementation of the embodiments of the present invention can not only effectively terminate the errors generated in the codec system, but also effectively reduce the impact of the insertion of the error recovery frame on the code stream of the transmission network, and can reduce the impact of the insertion of the error recovery frame on the codec system. impact on efficiency.

Figure 200810102347

Description

一种编解码方法及装置 A codec method and device

技术领域technical field

本发明涉及通信技术领域,尤其涉及一种编解码技术。The present invention relates to the field of communication technology, in particular to a codec technology.

背景技术Background technique

在视频通信系统中,误码或丢包现象通常是无法避免的,而且,在产生误码后,不仅影响当前数据的恢复,同时,由于视频数据的预测编码机制还会使得相应的误码在时间和空间域上继续扩散,进而使得某一帧的差错对后续帧有差错累积的效应。为此,需要采用相应的措施提高视频数据的抗误码能力,以使得系统中可以尽快地终结相应的错误。In a video communication system, bit errors or packet loss are usually unavoidable. Moreover, after bit errors occur, not only the recovery of current data is affected, but also due to the predictive coding mechanism of video data, the corresponding bit errors are The time and space domains continue to diffuse, so that the error of a certain frame has the effect of error accumulation on subsequent frames. Therefore, it is necessary to take corresponding measures to improve the anti-error capability of video data, so that the corresponding errors can be terminated as soon as possible in the system.

目前,通常采用的终结相应错误的方案为I帧(帧内预测编码帧)刷新机制,在该I帧刷新机制中,具体是每隔一段时间插入一个I帧,并规定该I帧后面的P帧不能参考I帧之前的图像帧进行预测。这样,在解码端接收到I帧后,之前出现的错误将不会影响到I帧及其I帧之后的帧。At present, the commonly used solution for terminating corresponding errors is the I-frame (intra-frame predictive coded frame) refresh mechanism. In the I-frame refresh mechanism, an I-frame is inserted at regular intervals, and the P frame behind the I-frame is specified. Frames cannot be predicted with reference to image frames preceding the I-frame. In this way, after the I frame is received at the decoding end, errors that occur before will not affect the I frame and the frames after the I frame.

在实现本发明过程中,发明人发现由于插入的I帧是采用帧内预测编码模式进行编码,导致上述现有技术中至少存在如下问题:In the process of realizing the present invention, the inventors found that because the inserted I frame is coded by using the intra-frame prediction coding mode, there are at least the following problems in the above-mentioned prior art:

(1)由于I帧的码率比较大,因此若频繁插入I帧将对传输网络产生比较大的码流冲击,进而影响相应的传输性能;(1) Since the code rate of the I frame is relatively large, frequent insertion of the I frame will have a relatively large code stream impact on the transmission network, thereby affecting the corresponding transmission performance;

(2)由于I帧编码效率较低,因此,若频繁插入I帧将影响到整个编解码系统的效率。(2) Since the encoding efficiency of the I frame is low, if the I frame is frequently inserted, the efficiency of the entire codec system will be affected.

发明内容Contents of the invention

本发明的实施例提供了一种编解码方法,可以在降低针对传输网络的码流冲击及保证编解码系统的效率的前提下实现错误的终结。The embodiment of the present invention provides an encoding and decoding method, which can realize error termination under the premise of reducing the impact of the code stream on the transmission network and ensuring the efficiency of the encoding and decoding system.

一种编码方法,包括:An encoding method comprising:

在编码作为差错恢复帧的当前编码帧中的宏块时,识别该差错恢复帧的该宏块及该差错恢复帧之前的至少一个帧中对应位置的宏块的传输差错敏感性,所述的传输差错敏感性是指当该宏块发生传输差错时对解码图像质量的影响程度;When encoding a macroblock in a currently coded frame serving as an error recovery frame, identifying the transmission error sensitivity of the macroblock in the error recovery frame and correspondingly positioned macroblocks in at least one frame preceding the error recovery frame, said Transmission error sensitivity refers to the degree of influence on the quality of the decoded image when a transmission error occurs in the macroblock;

若确定存在传输差错敏感性符合预定条件的宏块,则将所述差错恢复帧中的宏块采用帧内预测编码的方式进行编码操作。If it is determined that there is a macroblock whose transmission error sensitivity meets the predetermined condition, the macroblock in the error recovery frame is encoded by means of intra-frame prediction encoding.

一种编码装置,包括:An encoding device comprising:

差错敏感性识别单元,用于在编码作为差错恢复帧的当前编码帧中的宏块时,识别该差错恢复帧的该宏块及该差错恢复帧之前的至少一个帧中对应位置的宏块的传输差错敏感性,所述的传输差错敏感性是指当该宏块发生传输差错时对解码图像质量的影响程度;The error sensitivity identification unit is used to identify the macroblock in the error recovery frame and the macroblock in the corresponding position in at least one frame before the error recovery frame when encoding the macroblock in the current coded frame as the error recovery frame Transmission error sensitivity, where the transmission error sensitivity refers to the degree of influence on the decoded image quality when a transmission error occurs in the macroblock;

编码单元,用于在所述差错敏感性识别单元确定存在传输差错敏感性符合预定条件的宏块时,将所述差错恢复帧中的宏块采用帧内预测编码的方式进行编码操作。The encoding unit is configured to perform an encoding operation on the macroblocks in the error recovery frame by means of intra-frame predictive encoding when the error sensitivity identification unit determines that there are macroblocks whose transmission error sensitivity meets a predetermined condition.

一种解码方法,包括:A decoding method comprising:

根据接收到的码流确定当前解码帧为差错恢复帧;Determining that the current decoded frame is an error recovery frame according to the received code stream;

在当前解码帧中的帧内预测编码宏块进行解码过程中,查找与当前解码的所述宏块相邻且处于同一条带内的已经解码的帧内预测编码宏块;During the decoding process of the intra-frame predictive coded macroblock in the current decoding frame, search for the decoded intra-frame predictive coded macroblock adjacent to the currently decoded macroblock and in the same slice;

根据查找到的帧内预测编码宏块对当前解码的帧内预测编码宏块进行解码操作。A decoding operation is performed on the currently decoded intra-frame predictively coded macroblock according to the found intra-frame predictively coded macroblock.

一种解码装置,包括:A decoding device, comprising:

差错恢复帧识别单元,用于根据接收到的码流确定当前解码帧是否为差错恢复帧;An error recovery frame identification unit is used to determine whether the current decoded frame is an error recovery frame according to the received code stream;

帧内预测单元,用于在所述差错恢复帧识别单元识别确定当前解码帧是否为差错恢复帧时,查找与当前解码的帧内预测编码宏块相邻且处于同一条带内的已经解码的帧内预测编码宏块;An intra-frame prediction unit, configured to search for already-decoded intra-frame predictive coded macroblocks that are adjacent to the currently decoded intra-frame predictive coded macroblock and are in the same band when the error recovery frame identification unit identifies and determines whether the currently decoded frame is an error recovery frame Intra-prediction coded macroblocks;

解码单元,用于根据所述帧内预测单元查找到的帧内预测编码宏块对当前解码的帧内预测编码宏块进行解码操作。The decoding unit is configured to perform a decoding operation on the currently decoded intra-frame prediction-coded macroblock according to the intra-frame prediction-coded macroblock found by the intra-frame prediction unit.

一种解码方法,包括:A decoding method comprising:

在接收的码流中包含一个标志符号,用于指示当前帧为差错恢复帧,在当前解码帧中的帧内预测编码宏块进行解码过程中,查找与当前解码的所述宏块相邻且处于同一条带内的已经解码的帧内预测编码宏块;根据查找到的帧内预测编码宏块对当前解码的帧内预测编码宏块进行解码操作;A flag symbol is included in the received code stream, which is used to indicate that the current frame is an error recovery frame. During the decoding process of the intra-frame predictive coded macroblock in the current decoded frame, search for the macroblock adjacent to the currently decoded macroblock and Decoded intra-frame predictive coded macroblocks in the same slice; perform decoding operation on the currently decoded intra-frame predictively coded macroblocks according to the found intra-frame predictively coded macroblocks;

在对所述差错恢复帧之后的首个帧间预测解码帧进行解码的过程中,仅以所述差错恢复帧作为解码参考帧。In the process of decoding the first inter-frame predictive decoding frame after the error recovery frame, only the error recovery frame is used as a decoding reference frame.

由上述本发明的实施例提供的技术方案可以看出,其采用了差错恢复帧进行编解码系统中的错误的终结,由于差错恢复帧仅在必要时才进行相应的帧内预测编码模式的编码操作,因此,本发明实施例的实现不仅可以有效终结编解码系统中产生的错误,同时,还可以有效降低差错恢复帧的插入对传输网络造成码流冲击,并可以降低差错恢复帧的插入对编解码系统的效率产生的影响。It can be seen from the technical solutions provided by the above embodiments of the present invention that error recovery frames are used to terminate errors in the codec system, and the error recovery frames are only encoded in the corresponding intra-frame prediction coding mode when necessary Therefore, the implementation of the embodiment of the present invention can not only effectively terminate the errors generated in the codec system, but also effectively reduce the impact of the insertion of the error recovery frame on the code stream of the transmission network, and reduce the impact of the insertion of the error recovery frame on the transmission network. The impact on the efficiency of the codec system.

附图说明Description of drawings

图1为本发明实施例提供的编码过程示意图;FIG. 1 is a schematic diagram of an encoding process provided by an embodiment of the present invention;

图2为本发明实施例提供的解码过程示意图;FIG. 2 is a schematic diagram of a decoding process provided by an embodiment of the present invention;

图3为本发明实施例提供的编解码装置结构示意图。FIG. 3 is a schematic structural diagram of a codec device provided by an embodiment of the present invention.

具体实施方式Detailed ways

本发明实施例中,在编码端,可以在编码作为差错恢复帧的当前编码帧中的宏块(即当前编码宏块)时,识别该差错恢复帧的该宏块及该差错恢复帧之前的至少一个帧中对应位置的宏块的传输差错敏感性,所述的传输差错敏感性是指当该宏块发生传输差错时对解码图像质量的影响程度;并在确定存在传输差错敏感性符合预定条件的宏块时,将所述差错恢复帧中的宏块(即当前编码宏块)采用帧内预测编码的方式进行编码操作,以避免引入已经编码的某些宏块中可能出现的错误,相应的某些宏块可以为已经编码的传输差错敏感性符合预定条件的宏块。In the embodiment of the present invention, at the coding end, when coding a macroblock in the current coded frame (that is, the current coded macroblock) as an error recovery frame, the macroblock in the error recovery frame and the previous macroblock in the error recovery frame can be identified. The transmission error sensitivity of the macroblock at the corresponding position in at least one frame, the transmission error sensitivity refers to the degree of influence on the quality of the decoded image when a transmission error occurs in the macroblock; and when it is determined that there is a transmission error sensitivity that meets the predetermined conditional macroblock, the macroblock in the error recovery frame (that is, the currently coded macroblock) is coded in the manner of intra-frame predictive coding, so as to avoid introducing errors that may occur in some coded macroblocks, Corresponding certain macroblocks may be macroblocks whose coded transmission error sensitivity meets a predetermined condition.

在上述处理过程中,具体可以包括:若差错恢复帧的该宏块及差错恢复帧之前的至少一个帧中对应位置的宏块中的任一宏块为帧内编码宏块或为运动矢量大于预定阈值的帧间编码宏块,则确定该宏块为传输差错敏感性符合预定条件的宏块(可称其为差错敏感宏块),即确定存在传输差错敏感性符合预定条件的宏块。即本发明实施例可以采用多帧编码模式与运动宏块分析进行宏块的跟踪,进而确定差错恢复帧的编码模式,以终结编码过程中可能出现的错误。In the above process, it may specifically include: if any macroblock in the macroblock in the error recovery frame and the corresponding macroblock in at least one frame before the error recovery frame is an intra-coded macroblock or a motion vector greater than If there is an inter-coded macroblock with a predetermined threshold, it is determined that the macroblock is a macroblock whose transmission error sensitivity meets the predetermined condition (it can be called an error-sensitive macroblock), that is, it is determined that there is a macroblock whose transmission error sensitivity meets the predetermined condition. That is to say, the embodiment of the present invention can adopt multi-frame encoding mode and motion macroblock analysis to track the macroblock, and then determine the encoding mode of the error recovery frame, so as to end possible errors in the encoding process.

为便于对当前编码宏块进行编码操作,提高编码效率,则可以将针对差错恢复帧之前的至少一个帧中对应位置的宏块的传输差错敏感性判断结果预先保存,即保存预定数量编码帧的各个宏块各自对应的传输差错敏感性标志,用于作为确定所述各宏块的传输差错敏感性是否符合预定条件的依据;其中,若宏块对应的传输差错敏感性标志有效,则表示该宏块的传输差错敏感性符合预定条件;这样,可以有效提高编码效率。In order to facilitate the coding operation of the current coded macroblock and improve the coding efficiency, the transmission error sensitivity judgment result of the macroblock at the corresponding position in at least one frame before the error recovery frame can be saved in advance, that is, the predetermined number of coded frames can be saved The transmission error sensitivity flag corresponding to each macroblock is used as a basis for determining whether the transmission error sensitivity of each macroblock meets the predetermined condition; wherein, if the transmission error sensitivity flag corresponding to the macroblock is valid, it means that the The transmission error sensitivity of the macroblock meets the predetermined condition; in this way, the coding efficiency can be effectively improved.

本发明实施例中,可以在符合预定的差错恢复帧插入条件时,将当前编码帧作为差错恢复帧进行编码操作;其中,相应的差错恢复帧插入条件可以但不限于包括:与上一差错恢复帧之间的间隔帧数量,或者,与上一差错恢复帧之间的间隔时间,或者,该编码帧之前的至少一帧包含的宏块的差错敏感性,或者,接收到从控制器或解码器发送的插入差错恢复帧指令,等等。In the embodiment of the present invention, when the predetermined error recovery frame insertion condition is met, the current encoding frame can be used as an error recovery frame for encoding operation; wherein, the corresponding error recovery frame insertion condition can include, but is not limited to: Interval between frames The number of frames, or, the interval to the last error recovery frame, or, the error sensitivity of the macroblocks contained in at least one frame before this coded frame, or, the Insert error recovery frame command sent by the device, etc.

本发明实施例中,为便于解码端识别出相应的差错恢复帧,则还可以在所述差错恢复帧对应的码流中插入差错恢复帧标志(即插入用于指示当前帧为差错恢复帧的一个标志符号),通过该差错恢复帧标志指示当前编码帧为差错恢复帧。In the embodiment of the present invention, in order to facilitate the decoding end to identify the corresponding error recovery frame, an error recovery frame flag (that is, an error recovery frame flag for indicating that the current frame is an error recovery frame) may also be inserted into the code stream corresponding to the error recovery frame. A flag symbol), through which the error recovery frame flag indicates that the current coded frame is an error recovery frame.

与上述编码端采用的处理过程对应,本发明实施例中,在解码端根据接收到的码流确定当前解码帧为差错恢复帧后,对当前解码帧中的帧内预测编码宏块(如预测模式为DC模式的宏块)进行解码过程中,查找与当前解码的宏块处于同一条带内的已经解码的帧内预测宏块,并根据查找到的帧内预测宏块对当前解码的宏块进行解码操作,以终结系统中可能出现的错误。Corresponding to the processing procedure adopted by the encoding end above, in the embodiment of the present invention, after the decoding end determines that the current decoded frame is an error recovery frame according to the received code stream, the intra-frame predictive coding macroblock (such as predicted In the decoding process of the macroblock whose mode is DC mode), the decoded intra-predicted macroblock in the same slice as the currently decoded macroblock is searched, and the currently decoded macroblock is determined according to the found intra-predicted macroblock. Blocks are decoded to terminate possible errors in the system.

其中,在解码端确定当前解码帧为差错恢复帧的方式可以但不限于包括:若当前解码帧对应的码流中存在差错恢复帧标志,则确定当前解码帧为差错恢复帧。Wherein, the manner of determining that the current decoded frame is an error recovery frame at the decoding end may include but not limited to include: if there is an error recovery frame flag in the code stream corresponding to the current decoded frame, then determining that the current decoded frame is an error recovery frame.

本发明实施例具体可以应用视频监控系统中,或者,也可以应用于其他类似的编解码系统中,在该类似的编解码系统中能够区分出相应的错误敏感区域和非错误敏感区域。The embodiments of the present invention can be specifically applied to a video surveillance system, or can also be applied to other similar codec systems, where corresponding error-sensitive areas and non-error-sensitive areas can be distinguished.

以视频监控系统为例,相应的监控视频序列中由于摄像头移动或切换比较少,即在某时间段内的视频序列中的较大一部分的背景区域一直静止或运动很小。对于视频序列中的背景区域的编码信息,即使在传输过程中丢失,对后续帧的恢复质量影响也不大。因此,针对相应的视频监控系统,则可以采用本发明实施例提供的技术方案进行错误终结处理。Taking the video surveillance system as an example, in the corresponding surveillance video sequence, due to less movement or switching of the camera, that is, a large part of the background area in the video sequence within a certain period of time has been static or has little movement. For the coding information of the background area in the video sequence, even if it is lost during transmission, it has little influence on the restoration quality of subsequent frames. Therefore, for the corresponding video surveillance system, the technical solutions provided by the embodiments of the present invention can be used to perform error termination processing.

为便于对本发明实施例的理解,下面将对本发明实施例中编码端和解码端采用的处理过程进行详细说明。In order to facilitate the understanding of the embodiments of the present invention, the processing procedures adopted by the encoding end and the decoding end in the embodiments of the present invention will be described in detail below.

(一)编码端(1) Coding end

在编码端具体可以设置具有阻止差错累积作用的视频编码帧,即为差错恢复帧(简称为RE帧),对该帧中差错敏感的宏块或者某位置宏块在RE帧之前的若干帧中属于差错敏感宏块,则对该宏块使用帧内预测编码的方式进行编码,以便于通过该RE帧能够阻止错误累积。Specifically, at the encoding end, a video encoding frame that prevents error accumulation can be set, that is, an error recovery frame (referred to as a RE frame), and the error-sensitive macroblock in the frame or a macroblock at a certain position is in several frames before the RE frame If it belongs to an error-sensitive macroblock, the macroblock is coded using intra-frame predictive coding, so that the RE frame can prevent error accumulation.

在编码端具体可以采用的处理方式如图1所示,可以包括:The specific processing methods that can be adopted at the encoding end are shown in Figure 1, and may include:

步骤101,建立M(M为大于或等于1的自然数)个存储空间,且每个存储空间具有最少与一帧视频中宏块个数一样的基本存储单元;Step 101, set up M (M is a natural number greater than or equal to 1) storage spaces, and each storage space has at least the same basic storage unit as the number of macroblocks in a frame of video;

步骤102,对于RE帧之前的M个预测帧,将每帧中的每一个宏块按照宏块顺序分析其运动矢量或编码模式等信息,以分析确定该宏块对传输差错的敏感性(宏块的传输差错敏感性),进而获知该宏块是否为差错敏感宏块;Step 102, for the M predicted frames before the RE frame, analyze information such as its motion vector or coding mode for each macroblock in each frame according to the order of the macroblocks, so as to analyze and determine the sensitivity of the macroblock to transmission errors (macro Block transmission error sensitivity), and then know whether the macroblock is an error-sensitive macroblock;

具体地,相应的宏块差错敏感性的分析即为分析在该宏块发生传输差错的情况下,对解码图像质量的影响程度;其具体可以根据宏块编码模式或运动大小中的至少一项进行宏块的传输差错敏感性的判定,例如,宏块为帧内编码宏块,或者,宏块为帧间编码宏块且该宏块的运动矢量大于某个阈值,则可以认为该宏块为差错敏感宏块;Specifically, the analysis of the corresponding macroblock error sensitivity is to analyze the degree of influence on the quality of the decoded image when a transmission error occurs in the macroblock; specifically, it can be based on at least one of the macroblock coding mode or the motion size Determine the transmission error sensitivity of the macroblock. For example, if the macroblock is an intra-coded macroblock, or if the macroblock is an inter-coded macroblock and the motion vector of the macroblock is greater than a certain threshold, then the macroblock can be considered is an error-sensitive macroblock;

步骤103,将相应宏块的传输差错敏感性标志写入步骤101建立的所述存储空间中的对应位置,以表明该宏块是否为差错敏感宏块;Step 103, writing the transmission error sensitivity flag of the corresponding macroblock into the corresponding position in the storage space established in step 101, to indicate whether the macroblock is an error-sensitive macroblock;

步骤104,根据存储空间中的信息对当前的RE帧中的各宏块进行相应的编码操作;Step 104, perform a corresponding encoding operation on each macroblock in the current RE frame according to the information in the storage space;

具体的编码操作可以包括以下几种情况:Specific encoding operations may include the following situations:

(1)在编码RE帧的某个位置的宏块时,则检查RE帧及其之前的M个帧中对应位置宏块的传输差错敏感性标志,如果在上述帧中的任意一帧的对应位置的宏块的传输差错敏感性标志为差错敏感(即标志有效),则对该位置的宏块进行帧内预测编码,否则,进行正常的帧内或帧间自适应编码;其中,在对RE帧中的帧内预测宏块进行预测编码时,该宏块的参考数据来源于可用的相邻宏块,该可用的相邻宏块为:已编码的、与当前宏块处于同一条带内的且采用帧内预测编码的相邻宏块;(1) When encoding a macroblock at a certain position in the RE frame, check the transmission error sensitivity flag of the macroblock at the corresponding position in the RE frame and the M frames before it, if any of the above frames correspond to If the transmission error sensitivity flag of the macroblock at the position is error sensitive (that is, the flag is valid), then intra-frame predictive coding is performed on the macroblock at this position, otherwise, normal intra-frame or inter-frame adaptive coding is performed; When the intra-predicted macroblock in the RE frame is predictively encoded, the reference data of the macroblock comes from the available adjacent macroblocks. The available adjacent macroblocks are: coded and in the same band as the current macroblock Neighboring macroblocks within and encoded with intra-frame prediction;

(2)在编码RE帧时可以在该帧图像头码流中,写入标志该帧类型为RE帧的RE帧标志。(2) When encoding an RE frame, an RE frame flag indicating that the frame type is an RE frame may be written in the image header stream of the frame.

步骤105,继续针对RE帧后面的其他帧的编码操作获得相应的编码码流;Step 105, continue to obtain the corresponding coded code stream for the coding operation of other frames following the RE frame;

其中,对所述差错恢复帧之后的帧间预测编码帧的编码操作过程中禁止以该差错恢复帧之前的已编码帧作为参考帧,例如,对于采用两个参考帧的情况,则RE帧后面的首个帧间预测帧(即P帧),在编码该帧时仅采用一个参考帧且该参考帧为RE帧,以使得在编码RE帧后面的帧不能参考RE帧之前的帧进行预测。Wherein, it is forbidden to use the coded frame before the error recovery frame as a reference frame during the encoding operation of the interframe predictive coded frame after the error recovery frame, for example, for the case of using two reference frames, the RE frame follows For the first inter-frame prediction frame (that is, P frame), only one reference frame is used when encoding this frame and the reference frame is an RE frame, so that the frame after the encoded RE frame cannot refer to the frame before the RE frame for prediction.

在上述编码端执行编码操作过程中,具体可以在针对各帧的编码码流中均设置相应的RE帧标志,以用于标志当前编码帧是否为RE帧,便于解码端识别出相应的RE帧,并对RE帧进行相应的解码处理,例如,可以采用一个标志位,若当前编码帧不是RE帧,则将该标志位设置为0,若当前编码帧为RE帧,则将该标志位设置为1。In the process of performing the encoding operation at the encoding end, specifically, a corresponding RE frame flag can be set in the encoding code stream for each frame to indicate whether the current encoding frame is an RE frame, so that the decoding end can identify the corresponding RE frame , and perform corresponding decoding processing on the RE frame. For example, a flag bit can be used. If the current coded frame is not an RE frame, the flag bit is set to 0. If the current coded frame is an RE frame, the flag bit is set to is 1.

(二)解码端(2) Decoder

如图2所示,在解码端,相应的解码处理过程可以包括:As shown in Figure 2, at the decoding end, the corresponding decoding process may include:

步骤201,接收一段视频码流;Step 201, receiving a section of video code stream;

步骤202,解码码流的图像头;Step 202, decoding the image header of the code stream;

步骤203,根据解码获得的图像头确定该帧类型为RE帧;Step 203, determining that the frame type is an RE frame according to the image header obtained through decoding;

例如,可以根据图像头中的差错恢复帧标志确定该帧为RE帧;For example, the frame can be determined to be an RE frame according to the error recovery frame flag in the image header;

步骤204,对该RE帧进行解码操作;Step 204, decoding the RE frame;

具体地,针对RE帧中的当前帧内预测编码宏块(如DC预测模式的宏块)进行解码,判断相邻宏块的可用性,即判断相邻宏块是否已解码、与当前宏块处于同一条带内且为帧内预测宏块,若是,相邻宏块可用,否则,相邻宏块不可用;在确定相邻宏块可用时,根据相应的已经解码的相邻宏块对当前解码宏块进行解码操作;Specifically, decoding is performed on the current intra-frame predictive coded macroblock (such as a macroblock in DC prediction mode) in the RE frame, and the availability of adjacent macroblocks is judged, that is, whether the adjacent macroblocks have been decoded and are in the same position as the current macroblock In the same band and is an intra-predicted macroblock, if so, the adjacent macroblock is available, otherwise, the adjacent macroblock is not available; when it is determined that the adjacent macroblock is available, the current Decode macroblocks for decoding operations;

完成对RE帧的解码操作后,还对所述差错恢复帧之后的帧进行解码,在对该差错恢复帧之后的帧间预测解码帧进行解码的过程中,禁止以该差错恢复帧之前的已解码帧作为解码参考帧,例如,对于采用两个解码帧的情况,则在对该差错恢复帧之后的首个帧间预测解码帧进行解码的过程中,仅以该差错恢复帧作为解码参考帧进行解码操作。After the decoding operation of the RE frame is completed, the frame after the error recovery frame is also decoded, and in the process of decoding the inter-frame predictive decoding frame after the error recovery frame, it is forbidden to use the existing frame before the error recovery frame The decoded frame is used as the decoding reference frame. For example, in the case of using two decoding frames, only the error recovery frame is used as the decoding reference frame in the process of decoding the first inter-frame prediction decoding frame after the error recovery frame Perform decoding operation.

通过上述解码过程,则可以有效避免编解码系统中已经出现的错误,如帧丢失等。Through the above decoding process, errors that have occurred in the codec system, such as frame loss, can be effectively avoided.

下面将对本发明实施例的具体应用方式进行说明。The specific application manner of the embodiment of the present invention will be described below.

本发明实施例中,在对RE帧进行编码后获得的码流中,相应的图像头信息具体可以包括的语法元素如表1所示:In the embodiment of the present invention, in the code stream obtained after encoding the RE frame, the specific syntax elements that can be included in the corresponding image header information are shown in Table 1:

表1Table 1

pb_picture_header(){pb_picture_header(){  描述符 Descriptor pb_picture_start_codepb_picture_start_code  f(32)f(32) bbv_delaybbv_delay  u(16)u(16) picture_coding_typepicture_coding_type  u(2)u(2) picture_distancepicture_distance  u(8)u(8) if(low_delay==’1’)if(low_delay=='1') bbv_check_timesbbv_check_times  ue(v)ue(v) progressive_frameprogressive_frame  u(1)u(1) if(progressive_frame==’0’){if(progressive_frame=='0'){ picture_structurepicture_structure  u(1)u(1) if(picture_structure==’0’)if(picture_structure=='0') advanced_Pred_mode_disableadvanced_Pred_mode_disable  u(1)u(1) }}

top_field_firsttop_field_first  u(1)u(1) repeat_first_fieldrepeat_first_field  u(1)u(1) fixed_picture_qpfixed_picture_qp  u(1)u(1) picture_qppicture_qp  u(6)u(6) if(!(picture_coding_type==’10’&&PictureStructure==1))if(!(picture_coding_type=='10'&&PictureStructure==1)) picture_reference_flagpicture_reference_flag  u(1)u(1) no_forward_reference_flagno_forward_reference_flag  u(1)u(1) reserved_bitsreserved_bits  r(3)r(3) skip_mode_flagskip_mode_flag  u(1)u(1)

loop_filter_disableloop_filter_disable  u(1)u(1) if(!loop_filter_disable){if (! loop_filter_disable) { loop_filter_parameter_flagloop_filter_parameter_flag  u(1)u(1) if(loop_filter_parameter_flag){if(loop_filter_parameter_flag){ alpha_c_offsetalpha_c_offset  se(v)se(v) beta_offsetbeta_offset  se(v)se(v) }} }} next_start_code()next_start_code() }}

在上述表1所示的图像头信息中,相应的图像编码方式picture_coding_type为本发明实施例增加的信息,其具体可以为2位无符号整数,可以用于承载差错恢复帧标志,以指示当前帧为差错恢复帧,该picture_coding_type对应的图像的编码方式(即图像编码类型)具体可以参见表2所示:In the image header information shown in Table 1 above, the corresponding image coding mode picture_coding_type is information added by the embodiment of the present invention, which can be specifically a 2-bit unsigned integer, which can be used to carry an error recovery frame flag to indicate the current frame It is an error recovery frame, and the encoding mode of the image corresponding to the picture_coding_type (that is, the image encoding type) can be referred to in Table 2 for details:

表2Table 2

picture_coding_typepicture_coding_type 编码方式Encoding 0000 差错恢复帧error recovery frame 0101 前向预测编码(P)Forward predictive coding (P) 1010 双向预测编码(B)Bidirectional predictive coding (B) 1111 保留reserve

本发明实施例中,对于采用两个参考帧的情况,相应的RE帧后面的首个预测帧P帧的语法元素具体可以如表3所示:In the embodiment of the present invention, for the case where two reference frames are used, the syntax elements of the first predicted frame P frame after the corresponding RE frame can be specifically shown in Table 3:

表3table 3

pb_picture_header(){pb_picture_header(){ 描述符Descriptor pb_picture_start_codepb_picture_start_code  f(32)f(32)

bbv_delaybbv_delay  u(16)u(16) picture_coding_typepicture_coding_type  u(2)u(2) picture_distancepicture_distance  u(8)u(8) if(low_delay==’1’)if(low_delay=='1') bbv_check_timesbbv_check_times  ue(v)ue(v) progressive_frameprogressive_frame  u(1)u(1) if(progressive_frame==’0’){if(progressive_frame=='0'){ picture_structurepicture_structure  u(1)u(1) if(picture_structure==’0’)if(picture_structure=='0') advanced_pred_mode_disableadvanced_pred_mode_disable  u(1)u(1) }}

top_field_firsttop_field_first  u(1)u(1) repeat_first_fieldrepeat_first_field  u(1)u(1) fixed_picture_qpfixed_picture_qp  u(1)u(1) picture_qppicture_qp  u(6)u(6) if(!(picture_coding_type==’10’&&PictureStructure==1))if(!(picture_coding_type=='10'&&PictureStructure==1)) picture_reference_flagpicture_reference_flag  u(1)u(1) no_forward_reference_flagno_forward_reference_flag  u(1)u(1) reserved_bitsreserved_bits  r(3)r(3) skip_mode_flagskip_mode_flag  u(1)u(1) loop_filter_disableloop_filter_disable  u(1)u(1) if(!loop_filter_disable){if (! loop_filter_disable) { loop_filter_parameter_flagloop_filter_parameter_flag  u(1)u(1)

if(loop_filter_parameter_flag){if(loop_filter_parameter_flag){ alpha_c_offsetalpha_c_offset  se(v)se(v) beta_offsetbeta_offset  se(v)se(v) }} }} next_start_code()next_start_code() }}

在表3所示的信息中,相应的图像参考标志picture_reference_flag标志用于指示其前面的帧为RE帧。具体可以为:picture_reference_flag标志值为‘1’时,表示所有宏块都使用缺省参考图像(即所述RE帧为该帧后的首个P帧的参考图像),picture_reference_flag标志值为‘0’表示由每个宏块在宏块层自行确定相应的参考图像。In the information shown in Table 3, the corresponding picture reference flag picture_reference_flag is used to indicate that the preceding frame is an RE frame. Specifically, when the picture_reference_flag flag value is '1', it means that all macroblocks use the default reference image (that is, the RE frame is the reference image of the first P frame after this frame), and the picture_reference_flag flag value is '0' Indicates that each macroblock determines the corresponding reference image by itself at the macroblock layer.

基于上述表1至表3描述的信息,如果当前帧的前一个参考帧的picture_coding_type为‘00’且当前帧的picture_coding_type为‘01’,则当前帧的picture_reference_flag为1,以指示当前帧仅采用RE帧作为参考帧。Based on the information described in Table 1 to Table 3 above, if the picture_coding_type of the previous reference frame of the current frame is '00' and the picture_coding_type of the current frame is '01', then the picture_reference_flag of the current frame is 1 to indicate that the current frame only uses RE frame as a reference frame.

仍基于上述表1至表3描述的信息,在解码端接收一段视频码流,并从解码码流中获取相应的图像头信息中的picture_coding_type参数后,则:Still based on the information described in Table 1 to Table 3 above, after receiving a piece of video code stream at the decoding end, and obtaining the picture_coding_type parameter in the corresponding image header information from the decoded code stream, then:

(1)若picture_coding_type等于’00’,则表明当前解码帧为RE帧,并对该RE帧中的宏块进行解码,其中,如果该宏块为帧内编码模式(如DC预测模式等)时,判断相邻宏块的可用性,可用性是指相邻宏块已解码且与当前宏块处于同一条带内的帧内预测宏块,如果该宏块为其他编码模式则可以但不限于采用现有技术中相应的解码方式进行正常解码;(1) If picture_coding_type is equal to '00', it indicates that the current decoding frame is an RE frame, and the macroblock in the RE frame is decoded, wherein, if the macroblock is in an intra-frame coding mode (such as DC prediction mode, etc.) , to determine the availability of adjacent macroblocks. Availability refers to intra-frame predicted macroblocks that have been decoded and are in the same band as the current macroblock. If the macroblock is in other coding modes, the current There is a corresponding decoding method in the technology for normal decoding;

(2)若picture_coding_type不等于’00’,则可以但不限于采用现有技术中相应的解码方式对该帧进行正常解码。(2) If the picture_coding_type is not equal to '00', the frame can be decoded normally by using the corresponding decoding method in the prior art, but not limited to.

本发明实施例还提供了一种编码装置,其具体实现结构如图3所示,具体可以包括以下处理单元:An embodiment of the present invention also provides an encoding device, the specific implementation structure of which is shown in Figure 3, and may specifically include the following processing units:

(1)差错敏感性识别单元,用于在编码作为差错恢复帧的当前编码帧中的宏块时,识别该差错恢复帧的该宏块及该差错恢复帧之前的至少一个帧中对应位置的宏块的传输差错敏感性,所述的传输差错敏感性是指当该宏块发生传输差错时对解码图像质量的影响程度;(1) An error sensitivity identification unit, used to identify the macroblock in the error recovery frame and the corresponding position in at least one frame before the error recovery frame when encoding the macroblock in the current coded frame as the error recovery frame The transmission error sensitivity of the macroblock, the transmission error sensitivity refers to the degree of influence on the quality of the decoded image when a transmission error occurs in the macroblock;

其中,相应的差错敏感性识别单元具体可以包括以下至少一个单元:Wherein, the corresponding error sensitivity identification unit may specifically include at least one of the following units:

编码模式识别单元,用于在识别确定差错恢复帧的该宏块及差错恢复帧之前的至少一个帧中对应位置的宏块中的任一宏块为帧内编码宏块时,则确定存在传输差错敏感性符合预定条件的宏块;A coding mode identification unit, configured to determine that any macroblock in the macroblock of the error recovery frame and the macroblock at the corresponding position in at least one frame before the error recovery frame is an intra-coded macroblock, then determine that there is transmission Macroblocks whose error sensitivity meets predetermined conditions;

运动矢量识别单元,用于在识别确定差错恢复帧的该宏块及差错恢复帧之前的至少一个帧中对应位置的宏块中的任一宏块为运动矢量大于预定阈值的帧间编码宏块,则确定存在传输差错敏感性符合预定条件的宏块。A motion vector identifying unit, configured to identify any macroblock in the macroblock of the error recovery frame and the macroblock at the corresponding position in at least one frame before the error recovery frame as an interframe coded macroblock with a motion vector greater than a predetermined threshold , it is determined that there is a macroblock whose transmission error sensitivity meets the predetermined condition.

(2)编码单元,用于在所述差错敏感性识别单元确定存在传输差错敏感性符合预定条件的宏块时,将所述差错恢复帧中的宏块采用帧内预测编码的方式进行编码操作;(2) An encoding unit, configured to encode the macroblocks in the error recovery frame using intra-frame predictive encoding when the error sensitivity identification unit determines that there are macroblocks whose transmission error sensitivity meets the predetermined conditions. ;

该编码单元还可以用于对所述差错恢复帧之后的帧进行编码,且在对所述差错恢复帧之后的帧间预测编码帧的编码操作过程中,禁止以该差错恢复帧之前的已编码帧作为参考帧,例如,对于采用两个参考帧的情况,则对差错恢复帧之后的首个帧间预测编码帧的进行编码操作过程中,仅参考该差错恢复帧,即仅以该差错恢复帧作为编码参考帧。The encoding unit can also be used to encode the frames after the error recovery frame, and during the encoding operation of the interframe predictive coded frame after the error recovery frame, it is forbidden to use the coded frame before the error recovery frame frame as a reference frame, for example, in the case of using two reference frames, during the encoding operation of the first interframe predictive coded frame after the error recovery frame, only the error recovery frame is referred to, that is, only the error recovery frame is used frame as a coding reference frame.

可选地,为进一步提高编码效率,在该装置中还可以包括存储单元,用于保存预定的数量的编码帧的各宏块分别对应的传输差错敏感性标志,并将保存的各宏块分别对应的传输差错敏感性标志作为确定所述各宏块的传输差错敏感性是否符合预定条件的依据;其中,若宏块对应的传输差错敏感性标志有效,则表示该宏块的传输差错敏感性符合预定条件,即该宏块为差错敏感宏块。Optionally, in order to further improve the coding efficiency, the device may also include a storage unit for saving a predetermined number of transmission error sensitivity flags corresponding to each macroblock of the coded frame, and storing the stored macroblocks respectively The corresponding transmission error sensitivity flag is used as the basis for determining whether the transmission error sensitivity of each macroblock meets the predetermined condition; wherein, if the transmission error sensitivity flag corresponding to the macroblock is valid, it indicates that the transmission error sensitivity of the macroblock is The predetermined condition is met, that is, the macroblock is an error-sensitive macroblock.

可选地,在该装置中还可以包括差错恢复帧插入控制单元,用于当符合预定的差错恢复帧插入条件时,通知所述差错敏感性识别单元将当前编码帧作为差错恢复帧进行处理;其中,所述的差错恢复帧插入控制单元应用的差错恢复帧插入条件可以但不限于包括:与上一差错恢复帧之间的间隔帧数量,或者,与上一差错恢复帧之间的间隔时间,或者,该编码帧之前的至少一帧包含的宏块的差错敏感性,或者,接收到从控制器或解码器发送的插入差错恢复帧指令,等等。Optionally, the device may also include an error recovery frame insertion control unit, configured to notify the error sensitivity identification unit to process the current coded frame as an error recovery frame when a predetermined error recovery frame insertion condition is met; Wherein, the error recovery frame insertion condition applied by the error recovery frame insertion control unit may include, but not limited to: the number of interval frames from the last error recovery frame, or the interval time from the last error recovery frame , or, the error sensitivity of the macroblock contained in at least one frame preceding the coded frame, or receiving an instruction to insert an error recovery frame sent from a controller or a decoder, and so on.

可选地,在该装置中还可以包括相邻宏块确定单元,用于为所述差错恢复帧中的宏块确定可用的相邻宏块,并提供给所述编码单元,以便于根据可用的相邻宏块对所述差错恢复帧中的宏块进行编码,该可用的相邻宏块为已编码的、与当前宏块处于同一条带内的且采用帧内预测编码的相邻宏块。Optionally, the apparatus may further include a neighboring macroblock determining unit, configured to determine available neighboring macroblocks for the macroblocks in the error recovery frame, and provide them to the coding unit, so that according to the available Encode the macroblocks in the error recovery frame, the available adjacent macroblocks are coded adjacent macroblocks that are in the same slice as the current macroblock and are encoded by intra-frame prediction piece.

可选地,为便于解码端识别相应的差错恢复帧,则在该装置中还可以包括相应的差错恢复帧标志插入单元,用于在所述编码单元编码获得的差错恢复帧对应的码流中插入差错恢复帧标志,通过该差错恢复帧标志指示当前编码帧为差错恢复帧。Optionally, in order to facilitate the identification of the corresponding error recovery frame by the decoding end, the device may further include a corresponding error recovery frame flag insertion unit, which is used to encode the code stream corresponding to the error recovery frame obtained by the coding unit An error recovery frame flag is inserted, and the error recovery frame flag indicates that the current coded frame is an error recovery frame.

本发明实施例还提供了一种解码装置,其具体实现结构仍如图3所示,具体可以包括以下单元:The embodiment of the present invention also provides a decoding device, whose specific implementation structure is still shown in Figure 3, and may specifically include the following units:

(1)差错恢复帧识别单元,用于根据接收到的码流确定当前解码帧是否为差错恢复帧;该差错恢复帧识别单元具体可以包括:(1) error recovery frame identification unit, used to determine whether the current decoded frame is an error recovery frame according to the received code stream; the error recovery frame identification unit may specifically include:

识别单元,用于在当前解码帧对应的码流中存在差错恢复帧标志时,确定当前解码帧为差错恢复帧。The identification unit is configured to determine that the current decoding frame is an error recovery frame when there is an error recovery frame flag in the code stream corresponding to the current decoding frame.

(2)帧内预测单元,用于在所述差错恢复帧识别单元识别确定当前解码帧是否为差错恢复帧时,查找与当前解码的帧内预测编码宏块相邻且处于同一条带内的已经解码的帧内预测编码宏块;(2) An intra-frame prediction unit, configured to search for an intra-frame prediction encoded macroblock adjacent to the currently decoded macroblock and within the same band when the error recovery frame identification unit identifies and determines whether the currently decoded frame is an error recovery frame Intra-prediction coded macroblocks that have been decoded;

(3)解码单元,用于根据所述帧内预测单元查找到的帧内预测编码宏块对当前解码的帧内预测编码宏块进行解码操作,例如,可以用于对预测模式为DC模式的宏块进行解码操作;(3) A decoding unit, configured to perform decoding operations on the currently decoded intra-frame predictively coded macroblock according to the intra-frame predictively coded macroblock found by the intra-frame prediction unit, for example, it can be used to perform a decoding operation on a prediction mode that is a DC mode Macroblocks are decoded;

该解码单元还可以用于对所述差错恢复帧之后的帧进行解码,且在对该差错恢复帧之后的帧间预测解码帧进行解码的过程中,禁止以该差错恢复帧之前的已解码帧作为解码参考帧,例如,对于采用两个解码帧的情况,则在对该差错恢复帧之后的首个帧间预测解码帧进行解码的过程中,仅以该差错恢复帧作为解码参考帧进行解码操作。The decoding unit can also be used to decode the frame after the error recovery frame, and in the process of decoding the inter-frame prediction decoding frame after the error recovery frame, it is forbidden to use the decoded frame before the error recovery frame As a decoding reference frame, for example, in the case of using two decoding frames, only the error recovery frame is used as a decoding reference frame for decoding in the process of decoding the first inter-frame prediction decoding frame after the error recovery frame operate.

综上所述,本发明实施例具体可以通过对一段视频序列的运动情况进行分析,从而确定一段视频中对传输差错比较敏感的区域,并对敏感区域使用帧内编码方式进行编码。因此,本发明实施例可以在保证编码性能的基础上,保证该帧的防差错扩散功能,从而提高视频经过压缩传输后,在解码端的显示视频的主客观质量。To sum up, the embodiment of the present invention can specifically analyze the motion of a video sequence to determine the areas that are sensitive to transmission errors in a video, and encode the sensitive areas using intra-frame coding. Therefore, the embodiment of the present invention can ensure the anti-error diffusion function of the frame on the basis of ensuring the coding performance, thereby improving the subjective and objective quality of the displayed video at the decoding end after the video is compressed and transmitted.

通过以上的实施方式的描述,本领域的普通技术人员可以清楚地了解到本发明可以通过硬件实现,也可以借助软件加必需的通用硬件平台的方式来实现。基于这样的理解,本发明的技术方案可以编写成计算机可执行程序,计算机设备通过执行该程序可以实现本发明提供的方法。该计算机可执行程序可以存储在非易失性存储介质中(包括CD-ROM、U盘、移动硬盘等)。Through the above description of the embodiments, those skilled in the art can clearly understand that the present invention can be realized by hardware, or by software plus a necessary general hardware platform. Based on this understanding, the technical solution of the present invention can be written into a computer executable program, and the computer device can realize the method provided by the present invention by executing the program. The computer executable program can be stored in a non-volatile storage medium (including CD-ROM, U disk, mobile hard disk, etc.).

以上所述,仅为本发明较佳的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到的变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应该以权利要求的保护范围为准。The above is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed in the present invention can easily think of changes or Replacement should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be determined by the protection scope of the claims.

Claims (21)

1. a coding method is characterized in that, comprising:
When encoding as the macro block in the current encoded frame of error recovery frame, discern the transmission error sensitiveness of the macro block of correspondence position at least one frame before this macro block of this error recovery frame and this error recovery frame, described transmission error sensitiveness is meant when the macro block generation transmission error of correspondence position in described at least one frame the influence degree to decoded image quality;
As if the macro block of determining to exist transmission error sensitiveness to conform to a predetermined condition, then adopt the mode of intraframe predictive coding to carry out encoding operation the macro block in the described error recovery frame.
2. method according to claim 1 is characterized in that, describedly determines that the macro block that exists transmission error sensitiveness to conform to a predetermined condition comprises:
If the arbitrary macro block at least one frame before this macro block of error recovery frame and the error recovery frame in the macro block of correspondence position is inter-coded macroblocks or is the inter-coded macroblocks of motion vector greater than predetermined threshold, then determines the macro block that exists transmission error sensitiveness to conform to a predetermined condition.
3. method according to claim 1 and 2 is characterized in that, this method also comprises:
Preserve the corresponding respectively transmission error sensitivity label of each macro block of the coded frame of predetermined quantity, be used for the foundation that whether conforms to a predetermined condition as the transmission error sensitiveness of determining described each macro block; Wherein, if the transmission error sensitivity label of macro block correspondence is effective, represent that then the transmission error sensitiveness of this macro block conforms to a predetermined condition.
4. method according to claim 1 and 2 is characterized in that, this method also comprises:
When meeting predetermined error recovery frame insertion condition, then current encoded frame is carried out encoding operation as error recovery frame; Wherein, described error recovery frame insertion condition comprises: and the interval number of frames between the last error recovery frame, perhaps, and the blanking time between the last error recovery frame, perhaps, the mistake sensitiveness of the macro block that at least one frame before this coded frame comprises perhaps, receives the insertion error recovery frame instruction that slave controller or decoder send.
5. method according to claim 1 and 2 is characterized in that, the step that the mode of described employing intraframe predictive coding is carried out encoding operation comprises:
According to available adjacent macroblocks the macro block in the described error recovery frame is carried out intraframe predictive coding, described available adjacent macroblocks is: encoded, be in the same band and adjacent macroblocks that adopt intraframe predictive coding with current macro.
6. method according to claim 1 and 2 is characterized in that, this method also comprises:
Inserting the error recovery frame sign in the code stream of described error recovery frame correspondence, is error recovery frame by this error recovery frame sign indication current encoded frame.
7. method according to claim 1 and 2 is characterized in that, this method also comprises:
Forbid with the coded frame before this error recovery frame as the reference frame in the encoding operation process to the inter prediction encoding frame after the described error recovery frame.
8. a code device is characterized in that, comprising:
Mistake sensitiveness recognition unit, be used at coding during as the macro block of the current encoded frame of error recovery frame, discern the transmission error sensitiveness of the macro block of correspondence position at least one frame before this macro block of this error recovery frame and this error recovery frame, described transmission error sensitiveness is meant when the macro block generation transmission error of correspondence position in described at least one frame the influence degree to decoded image quality;
Coding unit is used for adopting the mode of intraframe predictive coding to carry out encoding operation the macro block in the described error recovery frame when described mistake sensitiveness recognition unit determines to exist the macro block that transmission error sensitiveness conforms to a predetermined condition.
9. device according to claim 8 is characterized in that, described mistake sensitiveness recognition unit specifically comprises following at least one unit:
The coding mode recognition unit, be used for when identification determines that arbitrary macro block in the macro block of this macro block of error recovery frame and at least one the frame correspondence position before the error recovery frame is inter-coded macroblocks, then determining the macro block that exists transmission error sensitiveness to conform to a predetermined condition;
The motion vector recognition unit, the arbitrary macro block that is used in the macro block of this macro block of discerning definite error recovery frame and at least one the frame correspondence position before the error recovery frame is the inter-coded macroblocks of motion vector greater than predetermined threshold, then determines the macro block that exists transmission error sensitiveness to conform to a predetermined condition.
10. according to Claim 8 or 9 described devices, it is characterized in that this device also comprises:
Memory cell is used to preserve the corresponding respectively transmission error sensitivity label of each macro block of the coded frame of predetermined quantity, is used for the foundation that whether conforms to a predetermined condition as the transmission error sensitiveness of determining described each macro block; Wherein, if the transmission error sensitivity label of macro block correspondence is effective, represent that then the transmission error sensitiveness of this macro block conforms to a predetermined condition.
11. according to Claim 8 or 9 described devices, it is characterized in that this device also comprises:
Error recovery frame is inserted control unit, be used for when meeting predetermined error recovery frame insertion condition, notify described mistake sensitiveness recognition unit that current encoded frame is handled as error recovery frame, the error recovery frame insertion condition that described error recovery frame is inserted the control unit application comprises: and the interval number of frames between the last error recovery frame, perhaps, and the blanking time between the last error recovery frame, perhaps, the mistake sensitiveness of the macro block that at least one frame before this coded frame comprises, perhaps, receive the insertion error recovery frame instruction that slave controller or decoder send.
12. device according to claim 11 is characterized in that, this device also comprises:
The adjacent macroblocks determining unit, be used to the macro block in the described error recovery frame to determine available adjacent macroblocks, and offer described coding unit, so that according to available adjacent macroblocks the macro block in the described error recovery frame is encoded, described available adjacent macroblocks is: encoded, be in the same band and adjacent macroblocks that adopt intraframe predictive coding with current macro.
13. according to Claim 8 or 9 described devices, it is characterized in that this device also comprises:
The error recovery frame sign inserts the unit, is used for the code stream insertion error recovery frame sign in the error recovery frame correspondence of described coding unit coding acquisition, is error recovery frame by this error recovery frame sign indication current encoded frame.
14. according to Claim 8 or 9 described devices, it is characterized in that, described coding unit also is used for the frame after the described error recovery frame is encoded, and in encoding operation process, forbid with the coded frame before this error recovery frame as the reference frame to the inter prediction encoding frame after the described error recovery frame.
15. a coding/decoding method is characterized in that, comprising:
Determine that according to the code stream that receives current decoded frame is an error recovery frame;
Intraframe predictive coding macro block in current decoded frame carries out in the decode procedure, and it is adjacent and be in the intraframe predictive coding macro block of having decoded in the same band to search described macro block with current decoding;
According to the intraframe predictive coding macro block that finds the intraframe predictive coding macro block of current decoding is carried out decode operation.
16. method according to claim 15 is characterized in that, the process that described definite current decoded frame is an error recovery frame comprises:
If have the error recovery frame sign in the code stream of current decoded frame correspondence, determine that then current decoded frame is an error recovery frame.
17., it is characterized in that this method also comprises according to claim 15 or 16 described methods:
In the process that the interframe prediction decoding frame after the described error recovery frame is decoded, forbid with the decoded frame before the described error recovery frame as the decoding reference frame.
18. a decoding device is characterized in that, comprising:
The error recovery frame recognition unit is used for determining according to the code stream that receives whether current decoded frame is error recovery frame;
Intraprediction unit, be used for when the identification of described error recovery frame recognition unit determines whether current decoded frame is error recovery frame, it is adjacent and be in the intraframe predictive coding macro block of having decoded in the same band to search intraframe predictive coding macro block with current decoding;
Decoding unit is used for the intraframe predictive coding macro block that finds according to described intraprediction unit the intraframe predictive coding macro block of current decoding is carried out decode operation.
19. device according to claim 18 is characterized in that, described error recovery frame recognition unit specifically comprises:
Recognition unit is used for when there is the error recovery frame sign in the code stream of current decoded frame correspondence, determines that current decoded frame is an error recovery frame.
20. according to claim 18 or 19 described devices, it is characterized in that, described decoding unit also is used for the frame after the described error recovery frame is decoded, and in the process that the interframe prediction decoding frame after this error recovery frame is decoded, forbid with the decoded frame before this error recovery frame as the decoding reference frame.
21. a coding/decoding method is characterized in that, comprising:
In the code stream that receives, comprise a tag mark, being used to indicate present frame is error recovery frame, intraframe predictive coding macro block in current decoded frame carries out in the decode procedure, and it is adjacent and be in the intraframe predictive coding macro block of having decoded in the same band to search described macro block with current decoding; According to the intraframe predictive coding macro block that finds the intraframe predictive coding macro block of current decoding is carried out decode operation;
In the process that the first interframe prediction decoding frame after the described error recovery frame is decoded, only with described error recovery frame as the decoding reference frame.
CN 200810102347 2008-03-20 2008-03-20 A codec method and device Active CN101540916B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200810102347 CN101540916B (en) 2008-03-20 2008-03-20 A codec method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200810102347 CN101540916B (en) 2008-03-20 2008-03-20 A codec method and device

Publications (2)

Publication Number Publication Date
CN101540916A CN101540916A (en) 2009-09-23
CN101540916B true CN101540916B (en) 2010-12-08

Family

ID=41123859

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200810102347 Active CN101540916B (en) 2008-03-20 2008-03-20 A codec method and device

Country Status (1)

Country Link
CN (1) CN101540916B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106060539B (en) * 2016-06-16 2019-04-09 深圳风景网络科技有限公司 A Video Coding Method with Low Transmission Bandwidth
CN112422969A (en) * 2020-10-20 2021-02-26 西安万像电子科技有限公司 Image coding and decoding method and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1275871A (en) * 2000-07-21 2000-12-06 清华大学 Multi-camera video object took video-image communication system and realizing method thereof
CN1732370A (en) * 2002-12-27 2006-02-08 有泽博 Multiview Video Capture System

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1275871A (en) * 2000-07-21 2000-12-06 清华大学 Multi-camera video object took video-image communication system and realizing method thereof
CN1732370A (en) * 2002-12-27 2006-02-08 有泽博 Multiview Video Capture System

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
JP平10-27264A 1998.01.27

Also Published As

Publication number Publication date
CN101540916A (en) 2009-09-23

Similar Documents

Publication Publication Date Title
CN101605255B (en) Method and device for encoding and decoding video
CN101677406B (en) Method and apparatus for video encoding and decoding
JP6207116B2 (en) Method and apparatus for encoding surveillance video
TWI581614B (en) Robust encoding and decoding of pictures in video
US9979965B2 (en) Image coding and decoding method, image data processing method, and devices thereof
CN101257624B (en) Method and decoder for realizing random access
US20170272760A1 (en) Encoding and decoding methods and apparatuses
US9332309B2 (en) Sync frame recovery in real time video transmission system
CN101232619A (en) Video Coding Method Embedding Intra-coded Blocks
CN113905235A (en) Video image processing method and device
US20130058409A1 (en) Moving picture coding apparatus and moving picture decoding apparatus
CN112291566B (en) H.264 video coding method, device and storage equipment
CN101505430B (en) Intra-frame updating method for head and shoulder video sequence
CN101540916B (en) A codec method and device
US20090097555A1 (en) Video encoding method and device
CN101453656B (en) Video encoding, decoding method and device, and video encoding and decoding system
US20130101030A1 (en) Transmission of video data
CN103024374A (en) Transmission of video data
CN101198052A (en) A video encoding method, decoding method and device thereof
JPH1093979A (en) Image communication system and method
US20080069202A1 (en) Video Encoding Method and Device
KR20090099545A (en) Method and apparatus for video error concealment in multi-view coded video using high-level syntax
CN105516729A (en) Video encoding and decoding method and apparatus, and generated video code stream
CN111357288B (en) Video image processing method and device
CN101742326A (en) Video coding method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20210422

Address after: Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040

Patentee after: Honor Device Co.,Ltd.

Address before: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Patentee before: HUAWEI TECHNOLOGIES Co.,Ltd.

TR01 Transfer of patent right
CP03 Change of name, title or address

Address after: Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040

Patentee after: Honor Terminal Co.,Ltd.

Country or region after: China

Address before: 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong

Patentee before: Honor Device Co.,Ltd.

Country or region before: China

CP03 Change of name, title or address