WO2014106379A1 - 一种可伸缩视频码流的编码、解码方法及装置 - Google Patents

一种可伸缩视频码流的编码、解码方法及装置 Download PDF

Info

Publication number
WO2014106379A1
WO2014106379A1 PCT/CN2013/080299 CN2013080299W WO2014106379A1 WO 2014106379 A1 WO2014106379 A1 WO 2014106379A1 CN 2013080299 W CN2013080299 W CN 2013080299W WO 2014106379 A1 WO2014106379 A1 WO 2014106379A1
Authority
WO
WIPO (PCT)
Prior art keywords
frame
current
type
base layer
corresponding position
Prior art date
Application number
PCT/CN2013/080299
Other languages
English (en)
French (fr)
Inventor
姜东�
宋建斌
杨海涛
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2014106379A1 publication Critical patent/WO2014106379A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/30Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using hierarchical techniques, e.g. scalability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/50Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding
    • H04N19/503Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using predictive coding involving temporal prediction
    • H04N19/51Motion estimation or motion compensation
    • H04N19/57Motion estimation characterised by a search window with variable size or shape
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/70Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by syntax aspects related to video coding, e.g. related to compression standards
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/17Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object
    • H04N19/172Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being an image region, e.g. an object the region being a picture, frame or field

Definitions

  • the obtaining, according to the source of the reference frame of the current decoded frame of the P frame or the B frame, the current decoding is obtained.
  • the motion information of the frame specifically includes:
  • a first determining unit configured to determine, according to a frame type of the frame of the current encoded frame at a corresponding position of the base layer, a reference frame index REF_IDX written by the motion estimation unit, or It is not written into the code stream formed by encoding the current encoded frame.
  • the encoding end device further includes:
  • the motion estimation unit is specifically configured to perform motion estimation on the current coded frame set by the second setting unit as a P frame in the search range, and obtain a reference frame index REF_IDX.
  • the motion estimation unit is further configured to obtain, by using the motion estimation, a frame of the frame at a corresponding position in the base layer. Motion information of the current encoded frame of type I frame;
  • the motion estimation unit is further configured to obtain, by using the motion estimation, the frame of the frame at a corresponding position in the base layer Motion information of the current encoded frame of type P frame or B frame;
  • the first determining unit includes:
  • a second determining subunit configured to determine, according to the source determined by the first determining subunit, that a frame type of a frame at a corresponding position in the base layer is a P frame or a reference frame of the current encoded frame of the B frame.
  • the motion information of the current encoded frame in which the frame type of the frame at the corresponding position in the base layer is a P frame or a B frame is written in the code stream.
  • the second determining sub-unit is specifically configured to: when the frame type of the frame in the corresponding position in the base layer is a P frame Or determining, when the reference frame of the current coded frame of the B frame is derived from the non-base layer, determining to write motion information of the current coded frame of the frame type of the P frame or the B frame at the corresponding position in the base layer. Into the code stream.
  • the second determining unit is configured to: when the frame type of the current decoded frame acquired by the third acquiring unit is a P frame, and the frame type is a P frame, the current decoded frame is in a corresponding position of a base layer.
  • the frame type of the decoded frame is an I frame, the motion information of the reference frame index REF_IDX and the current decoded frame are respectively set to zero.
  • the second determining unit is configured to acquire, according to the source of the reference frame of the currently decoded frame of the P frame or the B frame, the motion information of the current decoded frame is determined according to the third determining unit.
  • the second determining unit is further configured to: when the frame type is a P frame or a B frame, reference to the current decoded frame When the frame is derived from the base layer, the motion information of the current decoded frame whose frame type is a P frame or a B frame is set to zero.
  • the motion information of the current decoded frame whose frame type is a P frame or a B frame is parsed from the code stream.
  • the encoding method of the scalable video code stream provided by the embodiment of the present invention may be based on the frame type of the current encoded frame in the code stream, as compared with the prior art, in which the redundant information is present in the code stream, resulting in inefficient coding and decoding. No redundant information is set in it, which improves coding efficiency.
  • FIG. 5 is a schematic diagram of another embodiment of an encoding method according to an embodiment of the present invention.
  • FIG. 14 is a schematic diagram of another embodiment of a decoding method according to an embodiment of the present invention.
  • Step 101 in FIG. 1 or Step 101-1 in FIG. 2 further includes: Step 100-2, Execute After step 100-2, step 101-6 or step 101-7 is performed, and then step 102 is performed separately.
  • the reference frame index REF_IDX is an identifier of the reference frame, and the corresponding reference frame can be found according to the index, thereby determining the residual of other current coded frames.
  • step 201 and step 202 in the embodiment corresponding to FIG. 10 are executed.
  • another embodiment of a method for decoding a scalable video code stream according to an embodiment of the present invention includes: Steps 201-2 are performed after step 200-2 is performed on the basis of the foregoing embodiment corresponding to FIG. -2; 201-2.
  • Steps 201-2 are performed after step 200-2 is performed on the basis of the foregoing embodiment corresponding to FIG. -2; 201-2.
  • an embodiment of an encoding end device includes:
  • a first setting unit 301 configured to set a search range of the motion estimation according to a source of the reference frame of the current encoded frame
  • the motion estimation unit 302 is configured to perform motion estimation on the current coded frame in the search range set by the first setting unit 301, and obtain a reference frame index REF_IDX of the current coded frame;
  • a first determining unit 303 configured to determine, according to a frame type of the frame of the current coded frame at a corresponding position of the base layer, whether the reference frame index REF_IDX of the current coded frame obtained by the motion estimation unit 302 is written or not written Encoding the code stream formed by the current encoded frame.
  • the first setting unit 301 sets a search range of the motion estimation according to the source of the reference frame of the current encoding frame; the current encoding frame in the search range set by the motion estimating unit 302 to the first setting unit 301.
  • the first determining unit 303 determines the current state obtained by the motion estimation unit 302 according to the frame type of the frame of the current coded frame at the corresponding position of the base layer.
  • Reference frame index of the encoded frame REF_IDX is written or not written into the code stream formed by encoding the current encoded frame.
  • the encoding device further includes:
  • a first acquiring unit 304 configured to acquire a frame type of a frame of the current encoded frame at a corresponding position in the base layer
  • a second setting unit 305 configured to: when the frame type of the frame of the current encoded frame acquired by the first acquiring unit 304 in the corresponding position in the base layer is an I frame, the type of the initial frame of the current encoded frame Set to set to P frame;
  • the motion estimation unit 302 is specifically configured to perform motion estimation on the current coded frame after the P2 frame is set by the second setting unit 305 in the search range, and obtain a reference frame index REF_IDX.
  • a second acquiring unit 306 configured to acquire a frame type of the frame of the current encoded frame at a corresponding position in the base layer
  • the first determining unit 303 is further configured to: when the second acquiring unit 306 acquires, the reference frame of the current encoded frame whose frame type is a P frame or a B frame at a corresponding position of the base layer is derived from a base layer. And determining, in the code stream, the reference frame index REF_IDX of the current encoded frame whose type of the initial frame is a P frame or a B frame.
  • the motion estimation unit 302 is further configured to: obtain, by using the motion estimation, motion information of the current encoded frame in which the frame type of the frame at the corresponding position in the base layer is a P frame or a B frame;
  • the first determining unit 303 includes:
  • a first determining subunit 3031 configured to determine a source of the reference frame of the current encoded frame of the P frame or the B frame of the frame at the corresponding position in the base layer;
  • a second determining subunit 3032 configured to determine, according to the source of the reference frame of the current encoded frame of the P frame or the B frame, where the frame type of the frame at the corresponding position in the base layer determined by the first determining subunit 3031 is The motion information of the current encoded frame whose frame type of the frame at the corresponding position in the base layer is a P frame or a B frame is written into the code stream.
  • the second determining subunit 3032 is specifically configured to: when the reference frame of the current encoded frame whose frame type is a P frame or a B frame at a corresponding position in the base layer is derived from a non-base layer, The motion information of the current encoded frame whose frame type is a P frame or a B frame at a corresponding position in the base layer is written into the code stream.
  • an embodiment of a decoding device includes:
  • a second determining unit 401 configured to determine, according to a frame type of the currently decoded frame, a reference frame index REF_IDX of the current decoded frame and motion information of the current decoded frame;
  • the motion compensation unit 403 is configured to perform motion compensation on the current decoded frame decoded by the decoding unit 402 according to the reference frame index REF_IDX determined by the second determining unit 401 and the motion information.
  • the second determining unit 401 determines the reference frame index REF_IDX of the current decoded frame and the motion information of the current decoded frame according to the frame type of the currently decoded frame; the decoding unit 402 decodes the current decoded frame.
  • the residual information, the motion compensation unit 403 performs motion compensation on the currently decoded frame decoded by the decoding unit 402 according to the reference frame index REF_IDX determined by the second determining unit 401 and the motion information.
  • the decoding device may determine the reference frame index REF_IDX of the current decoded frame and the motion information of the current decoded frame according to the frame type of the currently decoded frame, and do not need to be one by one. Parsing REF_IDX and motion information improves the efficiency of decoding.
  • the decoding device further includes:
  • the second determining unit 401 is configured to: when the frame type of the current decoded frame acquired by the third acquiring unit 404 is a P frame, and the current decoded frame of the frame type being a P frame is in a base layer Corresponding bit When the frame type of the decoded frame is an I frame, the motion information of the reference frame index REF_IDX and the current decoded frame are respectively set to 0.
  • the first processor 140 is further configured to: when the reference frame of the current encoded frame is derived from the base layer, set a search range of the motion estimation to [0, 0], and Performing motion estimation on the current coded frame in the search range [0, 0] and obtaining a reference frame index REFJDX of the current coded frame
  • the first processor 140 is further configured to acquire a frame type of a frame of the current encoded frame at a corresponding position in the base layer; when the current encoded frame is at a corresponding position in the base layer
  • the frame type is an I frame
  • set the type of the initial frame of the current encoded frame to be set to a P frame, and perform motion estimation on the current encoded frame after being set as a P frame in the search range.
  • Reference frame index REF_IDX is an I frame, set the type of the initial frame of the current encoded frame to be set to a P frame, and perform motion estimation on the current encoded frame after being set as a P frame in the search range.
  • the first processor 140 is further configured to determine, in the code stream, that the reference frame index REF_IDX of the current encoded frame whose frame type is an I frame of the frame at the corresponding position in the base layer is not written into the code stream. .
  • the first processor 140 is further configured to acquire the current encoded frame. a frame type of a frame at a corresponding position in the base layer, and when the frame type of the frame at the corresponding position of the base layer is a P frame or a reference frame of the current coded frame of the B frame is derived from the base layer, determining that the frame is The reference frame index REF_IDX of the current frame of the P frame or the B frame is written into the code stream.
  • the first processor 140 is further configured to: obtain, by using the motion estimation, that the frame type of the frame at a corresponding position in the base layer is a P frame or a B frame of the current encoded frame. Motion information, and determining a source of the reference frame of the current encoded frame of the P frame or the B frame of the frame at the corresponding position in the base layer; according to the frame type of the frame at the corresponding position in the base layer Determining, for the source of the reference frame of the current encoded frame of the P frame or the B frame, whether to write motion information of the current encoded frame of the frame type of the P frame or the B frame at the corresponding position in the base layer In the code stream.
  • the first processor 140 is further configured to: when the frame type of the frame at the corresponding position in the base layer is a frame frame of the P frame or the B frame, the reference frame of the current coded frame is derived from the base layer. When it is determined, motion information of the current encoded frame whose frame type of the frame at the corresponding position in the base layer is a P frame or a B frame is not written into the code stream.
  • an embodiment of a terminal provided by an embodiment of the present invention includes: a second receiver 150, a second transmitter 160, a second memory 170, and a second processor 180, the second receiver 150, and a second The transmitter 160, the second memory 170, and the second processor 180 are connected by a bus or other means.
  • the second processor 180 is configured to perform the following steps:
  • Decoding the residual information of the current decoded frame and performing motion compensation on the decoded current decoded frame according to the reference frame index REF_IDX and the motion information.
  • the second processor 180 is further configured to acquire a frame type of the current decoded frame; when the frame type of the current decoded frame is a P frame or a B frame, and the frame type is a P frame or a B frame.
  • the frame type of the decoded frame of the current decoded frame at the corresponding position of the base layer is also a P frame or a B frame
  • the reference frame index REF_IDX of the current decoded frame of the P frame or the B frame is parsed, and according to the Determining, by the reference frame index REF_IDX, the source of the reference frame of the current decoded frame of the P frame or the B frame; and the source of the reference frame of the current decoded frame according to the frame type being a P frame or a B frame Obtaining motion information of the current decoded frame.
  • another embodiment of the terminal 10 provided by the embodiment of the present invention includes: an encoding end device 30 and a decoding end device 40,
  • the storage medium may include: a ROM, a RAM, a magnetic disk or an optical disk, and the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

本发明公开了一种可伸缩视频码流的编码方法,包括:根据当前编码帧的参考帧的来源设置运动估计的搜索范围,在所述搜索范围内对所述当前编码帧做运动估计并得到所述当前编码帧的参考帧索引REF_IDX;根据所述当前编码帧在基本层对应位置处帧的帧类型,确定所述当前编码帧的参考帧索引REF_IDX写入或者不写入编码所述当前编码帧所形成的码流中。本发明实施例还提供相应的解码方法、装置及终端。本发明提供的技术方案可以在码流中不写入冗余信息,提高了编解码效率。

Description

一种可伸缩视频码流的编码、 解码方法及装置
本申请要求于 2013 年 01 月 07 日提交中国专利局、 申请号为 201310005187.X,发明名称为 "一种可伸缩视频码流的编码、解码方法及装置" 的中国专利申请的优先权, 其全部内容通过引用结合在本申请中。
技术领域
本发明涉及视频处理技术领域, 具体涉及一种可伸缩视频码流的编码及、 解码方法及相应的装置。
背景技术
传统的单层编码使用前向或者后向参考帧进行运动估计和运动补偿,对于 存在分层结构的可伸缩编码架构而言, 其编码分为基本层 (base layer, BL ) 和增强层 (enhancement layer, EL), 首先是基本层编码, 该层编码与经典的编 码架构及参数完全相同。 这样, 无论增强层的帧类型如何, 它们至少都具备了 一个来自基本层的参考帧。
如此设置完毕后, 在编码增强层时, 除了来自于增强层的参考帧之外, 与 经典编码相比, 还多了来自基本层的重建帧。 将上采样后的该重建帧 (ILR, Inter-Layer Reference )放入增强层的参考帧列表中, 与增强层参考帧一起做运 动估计,此方法在 HEVC可伸缩编码( SHVC , Scalable HEVC Video Coding ) 的参考软件 SMUC0.1.1中被称为 REF_IDX_FRAMEWORK。其中 HEVC为高 效视频编码, 英文全称为: High Efficiency Video Coding„
基本层参考帧与增强层不存在相对运动, 本来不需做运动估计, 直接相减 并编码残差即可。 而现有的 REF_IDX_FRAMEWORK通过运动估计得到的结 果在编码时就需要编码参考帧索引 (REF_IDX ) 和运动信息 MVD(Motion Vector Difference),MVP(Motion Vector Prediction)„
本发明的发明人发现, 现有技术中的码流中存在冗余信息,导致编解码效 率低下。
发明内容
本发明实施例提供一种可伸缩视频码流的编码方法,可以在码流中不写入 冗余信息, 提高了编解码效率。 本发明实施例还提供了相应的装置。 本发明第一方面提供一种可伸缩视频码流的编码方法, 包括: 根据当前编码帧的参考帧的来源设置运动估计的搜索范围,在所述搜索范 围内对所述当前编码帧做运动估计并得到所述当前编码帧的参考帧索引
REFJDX;
根据所述当前编码帧在基本层对应位置处帧的帧类型,确定所述当前编码 帧的参考帧索引 REF_IDX写入或者不写入编码所述当前编码帧所形成的码流 中。
结合第一方面,在第一种可能的实现方式中, 所述根据当前编码帧的参考 帧的来源设置运动估计的搜索范围, 具体包括:
当所述当前编码帧的参考帧来源于基本层时,设置所述运动估计的搜索范 围为 [0, 0];
对应地,所述在所述搜索范围内对所述当前编码帧做运动估计并得到当前 编码帧的参考帧索引 REF_IDX的步骤, 具体包括:
在所述搜索范围 [0, 0]内对所述当前编码帧做运动估计并得到当前编码帧 的参考帧索引 REF_IDX。
结合第一方面、第一方面第一种可能的实现方式,在第二种可能的实现方 式中,所述对所述搜索范围内的所述当前编码帧做运动估计并得到所述参考帧 索 I REFJDX之前, 所述方法还包括:
获取所述当前编码帧在基本层中对应位置处帧的帧类型;
当所述当前编码帧在基本层中对应位置处帧的帧类型为 I帧时, 将所述当 前编码帧的初始帧的类型设置为置为 P帧;
对应的,所述在所述搜索范围内对所述当前编码帧做运动估计并得到参考 帧索引 REF_IDX, 具体包括:
在所述搜索范围内对被设置为 P帧后的所述当前编码帧做运动估计并得到 参考帧索引 REF_IDX。
结合第一方面第二种可能的实现方式, 在第三种可能的实现方式中, 所述 根据所述当前编码帧在基本层中对应位置处帧的帧类型,确定所述参考帧索引 REFJDX写入或者不写入编码所述当前编码帧所形成的码流中, 具体包括: 确定不将所述当前编码帧在基本层中对应位置处帧的帧类型为 I帧的所述 当前编码帧的参考帧索引 REF_IDX写入所述码流中。
结合第一方面第三种可能的实现方式, 在第四种可能的实现方式中, 所述 方法还包括:
通过所述运动估计, 得到所述在基本层中对应位置处帧的帧类型为 I帧的 所述当前编码帧的运动信息;
对应的, 所述方法还包括,确定不将所述在基本层中对应位置处帧的帧类 型为 I帧的所述当前编码帧的运动信息写入所述码流中。
结合第一方面、第一方面第一种可能的实现方式,在第五种可能的实现方 式中,所述在所述搜索范围内对所述当前编码帧做运动估计并得到所述参考帧 索 I REF_IDX之前, 所述方法还包括:
获取所述当前编码帧在基本层中对应位置处帧的帧类型;
对应, 所述根据所述当前编码帧在基本层对应位置处帧的帧类型,确定所 述当前编码帧的参考帧索引 REF_IDX写入或者不写入编码所述当前编码帧所 形成的码流中具体包括:
当所述在基本层对应位置处帧的帧类型为 P帧或 B帧的所述当前编码帧的 参考帧来源于基本层时, 确定将所述初始帧的类型为 P帧或 B帧的所述当前编 码帧的参考帧索引 REF_IDX写入所述码流中。
结合第一方面第五种可能的实现方式, 在第六种可能的实现方式中, 当所 述当前编码帧在基本层中对应位置处帧的帧类型为 P帧或者 B帧时, 所述方法 还包括:
通过所述运动估计, 得到所述在基本层中对应位置处帧的帧类型为 P帧或 者 B帧的所述当前编码帧的运动信息, 并确定所述在基本层中对应位置处帧的 帧类型为 P帧或者 B帧的所述当前编码帧的参考帧的来源;
根据所述在基本层中对应位置处帧的帧类型为 P帧或者 B帧的所述当前编 码帧的参考帧的来源确定是否将所述在基本层中对应位置处帧的帧类型为 P帧 或者 B帧的所述当前编码帧的运动信息写入所述码流中。
结合第一方面第六种可能的实现方式,在第七种可能的实现方式中, 所 述根据所述在基本层中对应位置处帧的帧类型为 P帧或者 B帧的所述当前编码 帧的参考帧的来源确定是否将所述在基本层中对应位置处帧的帧类型为 P帧或 者 B帧的所述当前编码帧的运动信息写入所述码流中, 具体包括:
当所述在基本层中对应位置处帧的帧类型为 P帧或 B帧的所述当前编码帧 的参考帧来源于基本层时, 确定不将在基本层中对应位置处帧的帧类型为 P帧 或 B帧的所述当前编码帧的运动信息写入所述码流中。
结合第一方面第六种可能的实现方式, 在第八种可能的实现方式中, 所述 根据所述在基本层中对应位置处帧的帧类型为 P帧或者 B帧的所述当前编码帧 的参考帧的来源确定是否将所述在基本层中对应位置处帧的帧类型为 P帧或者 B帧的所述当前编码帧的运动信息写入所述码流中, 具体包括:
当所述在基本层中对应位置处帧的帧类型为 P帧或 B帧的所述当前编码帧 的参考帧来源于非基本层时,确定将所述在基本层中对应位置处帧的帧类型为 P帧或 B帧的所述当前编码帧的运动信息写入所述码流中。
本发明第二方面提供一种可伸缩视频码流的解码方法, 包括:
根据当前解码帧的帧类型, 确定所述当前解码帧的参考帧索引 REF_IDX 和所述当前解码帧的运动信息;
解码所述当前解码帧的残差信息,并根据所述参考帧索引 REF_IDX和所述 运动信息对解码后的所述当前解码帧进行运动补偿。
结合第二方面,在第一种可能的实现方式中, 所述根据当前解码帧的帧类 型,确定所述当前解码帧的参考帧索引 REF_IDX和所述当前解码帧的运动信息 的步骤之前, 所述方法还包括:
获取所述当前解码帧的帧类型;
当所述当前解码帧的帧类型为 P帧,并且所述帧类型为 P帧的所述当前解码 帧在基本层对应位置的解码帧的帧类型为 I帧时;
所述确定所述当前解码帧的参考帧索引 REF_IDX和所述当前解码帧的运 动信息的步骤, 具体包括:
将所述参考帧索引 REF_IDX和所述当前解码帧的运动信息分別设置为 0。 结合第二方面,在第二种可能的实现方式中, 所述根据当前解码帧的帧类 型,确定所述当前解码帧的参考帧索引 REF_IDX和所述当前解码帧的运动信息 的步骤之前, 所述方法还包括:
获取所述当前解码帧的帧类型;
当所述当前解码帧的帧类型为 P帧或 B帧时, 并且所述帧类型为 P帧或 B帧 的所述当前解码帧在基本层对应位置的解码帧的帧类型也为 P帧或 B帧时, 所 述方法还包括:
解析出所述帧类型为 P帧或 B帧的当前解码帧的参考帧索引 REF_IDX, 并 根据所述参考帧索引 REF_IDX确定所述帧类型为 P帧或 B帧的所述当前解码帧 的参考帧的来源; 以及
根据所述帧类型为 P帧或 B帧的所述当前解码帧的参考帧的来源获取所述 当前解码帧的运动信息。
结合第二方面第二种可能的实现方式, 在第三种可能的实现方式中, 所述 根据所述帧类型为 P帧或 B帧的所述当前解码帧的参考帧的来源获取所述当前 解码帧的运动信息, 具体包括:
当所述帧类型为 P帧或 B帧的所述当前解码帧的参考帧来源于基本层时, 将所述帧类型为 P帧或 B帧的当前解码帧的运动信息设置为 0。
结合第二方面第二种可能的实现方式,在第四种可能的实现方式中所述根 据所述帧类型为 P帧或 B帧的所述当前解码帧的参考帧的来源获取所述当前解 码帧的运动信息, 具体包括:
当所述帧类型为 P帧或 B帧的所述当前解码帧的参考帧来源于非基本层 时, 从码流中解析出所述帧类型为 P帧或 B帧的当前解码帧的运动信息。
本发明第三方面提供一种编码端装置, 包括:
第一设置单元,用于根据当前编码帧的参考帧的来源设置运动估计的搜索 范围;
运动估计单元,用于在所述第一设置单元设置的搜索范围内对所述当前编 码帧做运动估计并得到所述当前编码帧的参考帧索引 REF_IDX;
第一确定单元, 用于根据所述当前编码帧在基本层对应位置处帧的帧类 型,确定所述运动估计单元得到的当前编码帧的参考帧索引 REF_IDX写入或者 不写入编码所述当前编码帧所形成的码流中。
结合第三方面, 在第一种可能的实现方式中,
所述第一设置单元, 具体用于当所述当前编码帧的参考帧来源于基本层 时, 设置所述运动估计的搜索范围为 [0, 0];
所述运动估计单元, 具体用于在所述第一设置单元设置的搜索范围 [0, 0] 内对所述当前编码帧做运动估计并得到当前编码帧的参考帧索引 REF_IDX。
结合第三方面、第三方面第一种可能的实现方式,在第二种可能的实现方 式中, 所述编码端装置还包括;
第一获取单元,用于获取所述当前编码帧在基本层中对应位置处帧的帧类 型;
第二设置单元,用于当所述第一获取单元获取的所述当前编码帧在基本层 中对应位置处帧的帧类型为 I帧时, 将所述当前编码帧的初始帧的类型设置为 置为 P帧;
所述运动估计单元,具体用于在所述搜索范围内对被所述第二设置单元设 置为 P帧后的所述当前编码帧做运动估计并得到参考帧索引 REF_IDX。
结合第三方面第二种可能的实现方式, 在第三种可能的实现方式中, 所述第一确定单元,具体用于确定不将所述当前编码帧在基本层中对应位 置处帧的帧类型为 I帧的所述当前编码帧的参考帧索引 REF_IDX写入所述码流 中。
结合第三方面第三种可能的实现方式, 在第四种可能的实现方式中, 所述运动估计单元,还用于通过所述运动估计,得到所述在基本层中对应 位置处帧的帧类型为 I帧的所述当前编码帧的运动信息;
所述第一确定单元,还用于确定不将所述运动估计单元得到的所述在基本 层中对应位置处帧的帧类型为 I帧的所述当前编码帧的运动信息写入所述码流 中。
结合第三方面、第三方面第一种可能的实现方式,在第五种可能的实现方 式中, 所述编码端装置还包括:
第二获取单元 ,用于获取所述当前编码帧在基本层中对应位置处帧的帧类 型;
所述第一确定单元,还用于当所述第二获取单元获取的在基本层对应位置 处帧的帧类型为 P帧或 B帧的所述当前编码帧的参考帧来源于基本层时, 确定 将所述初始帧的类型为 P帧或 B帧的所述当前编码帧的参考帧索引 REF_IDX写 入所述码流中。
结合第三方面第五种可能的实现方式, 在第六种可能的实现方式中, 所述运动估计单元,还用于通过所述运动估计,得到所述在基本层中对应 位置处帧的帧类型为 P帧或者 B帧的所述当前编码帧的运动信息;
所述第一确定单元包括:
第一确定子单元, 用于确定所述在基本层中对应位置处帧的帧类型为 P帧 或者 B帧的所述当前编码帧的参考帧的来源;
第二确定子单元,用于根据所述第一确定子单元确定的在基本层中对应位 置处帧的帧类型为 P帧或者 B帧的所述当前编码帧的参考帧的来源确定是否将 所述在基本层中对应位置处帧的帧类型为 P帧或者 B帧的所述当前编码帧的运 动信息写入所述码流中。
结合第三方面第六种可能的实现方式, 在第七种可能的实现方式中, 所述第二确定子单元,具体用于当所述在基本层中对应位置处帧的帧类型 为 P帧或 B帧的所述当前编码帧的参考帧来源于基本层时, 确定不将在基本层 中对应位置处帧的帧类型为 P帧或 B帧的所述当前编码帧的运动信息写入所述 码流中。
结合第三方面第六种可能的实现方式, 在第八种可能的实现方式中, 所述第二确定子单元,具体用于当所述在基本层中对应位置处帧的帧类型 为 P帧或 B帧的所述当前编码帧的参考帧来源于非基本层时, 确定将所述在基 本层中对应位置处帧的帧类型为 P帧或 B帧的所述当前编码帧的运动信息写入 所述码流中。
本发明第四方面提供一种解码端装置, 包括:
第二确定单元, 用于根据当前解码帧的帧类型,确定所述当前解码帧的参 考帧索引 REF_IDX和所述当前解码帧的运动信息; 解码单元, 用于解码所述当前解码帧的残差信息;
运动补偿单元, 用于根据所述第二确定单元确定的参考帧索引 REF_IDX 和所述运动信息对所述解码单元解码后的所述当前解码帧进行运动补偿。
结合第四方面, 在第一种可能的实现方式中, 所述解码端装置还包括: 第三获取单元, 用于获取所述当前解码帧的帧类型;
所述第二确定单元,用于当所述第三获取单元获取的所述当前解码帧的帧 类型为 P帧,并且所述帧类型为 P帧的的所述当前解码帧在基本层对应位置的解 码帧的帧类型为 I帧时, 将所述参考帧索引 REF_IDX和所述当前解码帧的运动 信息分別设置为 0。
结合第四方面, 在第二种可能的实现方式中, 所述解码端装置还包括: 第四获取单元, 用于获取所述当前解码帧的帧类型;
第一解析单元, 当所述第四获取单元获取的当前解码帧的帧类型为 P帧或 B帧时,并且所述帧类型为 P帧或 B帧的所述当前解码帧在基本层对应位置的解 码帧的帧类型也为 P帧或 B帧时, 解析出所述帧类型为 P帧或 B帧的当前解码帧 的参考帧索引 REF_IDX;
第三确定单元, 用于确定所述帧类型为 P帧或 B帧的所述当前解码帧的参 考帧的来源;
所述第二确定单元, 用于根据所述第三确定单元确定的帧类型为 P帧或 B 帧的所述当前解码帧的参考帧的来源获取所述当前解码帧的运动信息。
结合第四方面第二种可能的实现方式, 第二种可能的实现方式中, 所述第二确定单元, 还用于当所述帧类型为 P帧或 B帧的所述当前解码帧 的参考帧来源于基本层时, 将所述帧类型为 P帧或 B帧的当前解码帧的运动信 息设置为 0。
结合第四方面第二种可能的实现方式, 第三种可能的实现方式中, 所述第二确定单元, 用于当所述第三确定单元确定出所述帧类型为 P帧或
B帧的所述当前解码帧的参考帧来源于非基本层时, 从码流中解析出所述帧类 型为 P帧或 B帧的当前解码帧的运动信息。
本发明第五方面提供一种终端, 包括: 编码端装置和解码端装置, 所述编码端装置为上述技术方案任意一项所述的编码端装置; 所述解码端装置为上述技术方案任意一项所述的编码端装置。
本发明实施例采用根据当前编码帧的参考帧的来源设置运动估计的搜索 范围,在所述搜索范围内对所述当前编码帧做运动估计并得到所述当前编码帧 的参考帧索引 REF_IDX; 根据所述当前编码帧在基本层对应位置处帧的帧类 型,确定所述当前编码帧的参考帧索引 REF_IDX写入或者不写入编码所述当前 编码帧所形成的码流中。 与现有技术中码流中存在冗余信息,导致编解码效率 低下相比, 本发明实施例提供的可伸缩视频码流的编码方法, 可以根据所述当 前编码帧的帧类型, 在码流中不设置冗余信息, 从而提高了编码效率。
同样,在解码端也不需要逐个解析出每个冗余信息, 只要根据当前解码帧 的帧类型, 就可以完成解码, 从而提高了解码的效率。
附图说明
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所 需要使用的附图作筒单地介绍,显而易见地, 下面描述中的附图仅仅是本发明 的一些实施例, 对于本领域技术人员来讲, 在不付出创造性劳动的前提下, 还 可以根据这些附图获得其他的附图。
图 1是本发明实施例中编码方法的一实施例示意图;
图 2是本发明实施例中编码方法的另一实施例示意图;
图 3是本发明实施例中编码方法的另一实施例示意图;
图 4是本发明实施例中编码方法的另一实施例示意图;
图 5是本发明实施例中编码方法的另一实施例示意图;
图 6是本发明实施例中编码方法的另一实施例示意图;
图 7是本发明实施例中编码方法的另一实施例示意图;
图 8是本发明实施例中编码方法的另一实施例示意图;
图 9是本发明实施例中编码方法的另一实施例示意图;
图 10是本发明实施例中解码方法的一实施例示意图;
图 11是本发明实施例中解码方法的另一实施例示意图;
图 12是本发明实施例中解码方法的另一实施例示意图; 图 13是本发明实施例中解码方法的另一实施例示意图;
图 14是本发明实施例中解码方法的另一实施例示意图;
图 15是本发明实施例中编码端装置的一实施例示意图;
图 16是本发明实施例中编码端装置的另一实施例示意图;
图 17是本发明实施例中编码端装置的另一实施例示意图;
图 18是本发明实施例中编码端装置的另一实施例示意图;
图 19是本发明实施例中解码端装置的一实施例示意图;
图 20是本发明实施例中解码端装置的另一实施例示意图;
图 21是本发明实施例中解码端装置的另一实施例示意图;
图 22是本发明实施例中终端的一实施例示意图;
图 23是本发明实施例中终端的一实施例示意图;
图 24是本发明实施例中终端的一实施例示意图。
具体实施方式
本发明实施例提供一种可伸缩视频码流的编码方法,可以在码流中不写入 冗余信息, 提高了编解码效率。 本发明实施例还提供了相应的装置。 以下分別 进行详细说明。
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清 楚、 完整地描述, 显然, 所描述的实施例仅仅是本发明一部分实施例, 而不是 全部的实施例。基于本发明中的实施例, 本领域技术人员在没有做出创造性劳 动前提下所获得的所有其他实施例, 都属于本发明保护的范围。
参阅图 1 , 本发明实施例提供的可伸缩视频码流的编码方法的一实施例包 括:
101、 编码端装置根据当前编码帧的参考帧的来源设置运动估计的搜索范 围,在所述搜索范围内对所述当前编码帧做运动估计并得到所述当前编码帧的 参考帧索引 REF_IDX。
本发明实施例中参考帧的来源指的是参考帧来源于基本层或者来源于增 强层。
本发明实施例中, 可以根据参考帧的来源设置运动估计的搜索范围, 而不 是现有技术中只能按固定的范围搜索, 现有技术中的固定的搜索范围为 [64 , 64]。
参考帧索引 REF_IDX为参考帧的标识, 可以根据该索引找到对应的参考 帧, 从而确定该当前编码帧的残差。
102、 编码端装置根据所述当前编码帧在基本层对应位置处帧的帧类型, 确定所述当前编码帧的参考帧索引 REF_IDX写入或者不写入编码所述当前编 码帧所形成的码流中。
帧类型包括 I帧、 P帧和 B帧, 其中 I帧为关键帧, I帧包含一个完整的画面, 解码 I帧时不需要参考帧就可以完成解码。
P帧为预测编码帧, 表示的是本帧跟之前的一个关键帧 (或 P帧) 的差別, 解码时需要用之前的参考帧叠加上与本帧的差別, 才能解码出最终画面。
B帧是双向预测帧, 也就是 B帧记录的是本帧与前后帧的差別, 要解码 B 帧, 不仅要取得之前的参考帧, 还要解码之后的参考帧, 通过前后画面的与本 帧残差数据的叠加取得最终画面。
本发明实施例采用根据当前编码帧的参考帧的来源设置运动估计的搜索 范围,在所述搜索范围内对所述当前编码帧做运动估计并得到所述当前编码帧 的参考帧索引 REF_IDX; 根据所述当前编码帧在基本层对应位置处帧的帧类 型,确定所述当前编码帧的参考帧索引 REF_IDX写入或者不写入编码所述当前 编码帧所形成的码流中。 与现有技术中码流中存在冗余信息,导致编解码效率 低下相比, 本发明实施例提供的可伸缩视频码流的编码方法, 可以根据所述当 前编码帧的帧类型, 在码流中不设置冗余信息, 从而提高了编码的效率。
参阅图 2, 本发明实施例提供的可伸缩视频码流的编码方法的另一实施例 包括:
101-1、 当所述当前编码帧的参考帧来源于基本层时, 设置所述运动估计 的搜索范围为 [0, 0] , 在所述搜索范围 [0, 0]内对所述当前编码帧做运动估计 并得到当前编码帧的参考帧索引 REF_IDX。
当该当前编码帧的参考帧来源于基本层时,因为基本层参考帧与增强层不 存在相对运动, 所以在做运动估计时还是搜索 [-64, 64]的范围是没有意义的, 只会降低编码效率, 所以本发明实施例中, 当当前编码帧的参考帧来源于基本 层时, 设置所述运动估计的搜索范围为 [0, 0] , 即只做与参考帧对应位置一个 点的运动估计。
执行完上述 101-1后, 再执行步骤 102。
本发明实施例是对图 1对应的实施例中, 根据当前编码帧的参考帧的来源 设置运动估计的搜索范围的步骤的细化。 除步骤 101-1外, 其他步骤与图 1对应 的实施例的步骤相同。
参阅图 3 , 本发明实施例提供的可伸缩视频码流的编码方法的另一实施例 包括:
100-1、 编码端装置获取所述当前编码帧的帧类型, 当所述当前编码帧的 帧类型为 I帧时, 将所述当前编码帧的帧类型设置为置为 P帧。
因为经典 I帧没有参考帧, 只能利用帧内的相关信息, 编码效率较低, 对 于可伸缩编码的增强层 I帧而言, 由于存在重建后的基本层可以作为其参考帧, 因此可以将该 I帧设置为 P帧, 以大幅提高编码效率。
执行完步骤 100-1后, 可以执行步骤 101-2或者步骤 101-3。
101-2、 编码端装置根据当前编码帧的参考帧的来源设置运动估计的搜索 范围, 对所述搜索范围内的被设置为 P帧后的所述当前编码帧做运动估计并得 到参考帧索引 REF_IDX。
步骤 101-2是在步骤 100-1的基石出上, 结合图 1对应的实施例。
101-3、 编码端装置当所述当前编码帧的参考帧来源于基本层时, 设置所 述运动估计的搜索范围为 [0, 0] , 对搜索范围 [0, 0]内的被设置为 P帧后的所述 当前编码帧做运动估计并得到参考帧索引 REF_IDX。
步骤 101-3在步骤 100-1的基础上, 结合图 2对应的实施例, 如果已经参考 帧确定来源于基本层, 那么设置的运动估计的搜索范围为 [0, 0] , 那么只需要 在 [0, 0]的搜索范围内对被设置为 P帧的所述当前编码帧做运动估计。
执行完步骤 101 -2或者 101 -3后, 分別执行步骤 102。
参阅图 4, 本发明实施例提供的可伸缩视频码流的编码方法的另一实施例 包括: 图 3中的步骤 100-1、 101-2和 101-3, 执行完上述 100-1、 101-2和 101-3后, 执行步骤 102-1;
102-1、 编码端装置确定不将所述当前编码帧在基本层中对应位置处帧的 帧类型为 I帧的所述当前编码帧的参考帧索引 REF_IDX写入所述码流中。
本发明实施例中, 当前编码帧在基本层中对应位置处帧的帧类型为 I帧, 因为 I帧只有一个来自于其基本层对应位置的参考帧, 因此不需要标记参考帧 索引号, 当帧类型为 I帧时不需要将 I帧的参考帧索引 REF_IDX写入所述码流 中。
参阅图 5 , 本发明实施例提供的可伸缩视频码流的编码方法的另一实施例 包括: 上述图 4对应的实施例中的步骤 100-1、 执行完步骤 100-1后, 执行步骤 101-4或者 101-5 , 然后分別执行步骤 102-2;
101- 4、 编码端装置根据当前待编码帧的参考帧的来源设置运动估计的搜 索范围,对所述搜索范围内的被设置为 P帧后的所述当前待编码帧做运动估计, 得到帧类型为 I帧的参考帧索引 REF_IDX和帧类型为 I帧的当前待编码帧的运 动信息。
101-5、 编码端装置当所述当前待编码帧的参考帧来源于基本层时, 设置 所述运动估计的搜索范围为 [0, 0] , 对搜索范围 [0, 0]内的被设置为 P帧后的所 述当前待编码帧做运动估计, 得到帧类型为 I帧的参考帧索引 REF_IDX和帧类 型为 I帧的当前待编码帧的运动信息。
102- 2、 编码端装置确定不将所述帧类型为 I帧的所述当前待编码帧的参考 帧索引 REF_IDX和所述帧类型为 I帧的所述当前待编码帧的运动信息写入所述 码流中。
参阅图 6, 本发明实施例提供的可伸缩视频码流的编码方法的另一实施例 包括: 图 1中的步骤 101、 或图 2中的步骤 101-1还包括: 步骤 100-2, 执行完步 骤 100-2后分別执行步骤 101-6或者步骤 101-7, 然后再分別执行步骤 102。
100-2、 编码端装置获取所述当前编码帧在基本层中对应位置处帧的帧类 型。
102-3、 编码端装置当所述在基本层对应位置处帧的帧类型为 P帧或 B帧的 所述当前编码帧的参考帧来源于基本层时, 确定将所述初始帧的类型为 P帧或 B帧的所述当前编码帧的参考帧索引 REF_IDX写入所述码流中。
因为 P帧或者 B帧都是预测帧, 所以帧类型为 P帧或者 B帧的当前编码帧的 帧的参考帧索引 REF_IDX需要写入到码流中。
参阅图 7, 本发明实施例提供的可伸缩视频码流的编码方法的另一实施例 包括:在上述图 6对应的实施例中的步骤 100-2、 101-2和 101-3,执行完步骤 101-2 和 101-3后按顺序执行步骤 101-6和 102-3,
101- 6、 通过所述运动估计, 得到所述在基本层中对应位置处帧的帧类型 为 P帧或者 B帧的所述当前编码帧的运动信息, 并确定所述在基本层中对应位 置处帧的帧类型为 P帧或者 B帧的所述当前编码帧的参考帧的来源。
102-3、 根据所述在基本层中对应位置处帧的帧类型为 P帧或者 B帧的所述 当前编码帧的参考帧的来源确定是否将所述在基本层中对应位置处帧的帧类 型为 P帧或者 B帧的所述当前编码帧的运动信息写入所述码流中。
无论帧类型为 P帧或者 B帧的所述当前编码帧的参考帧的来源与基本层还 是增强层, 因为 P帧或者 B帧都是差別帧, 该帧类型为 P帧或者 B帧的当前编码 帧的帧的参考帧索引 REF_IDX都需要写入到码流中。
参阅图 8, 本发明实施例提供的可伸缩视频码流的编码方法的另一实施例 包括: 在上述图 7对应的实施例的中的步骤 100-2、 101-2、 101-3和 101-6, 执行 完步骤 101 -6后执行步骤 102-31;
102- 31、当所述在基本层中对应位置处帧的帧类型为 P帧或 B帧的所述当前 编码帧的参考帧来源于基本层时,确定不将在基本层中对应位置处帧的帧类型 为 P帧或 B帧的所述当前编码帧的运动信息写入所述码流中。
本发明实施例中, 当帧类型为 P帧或 B帧的所述当前编码帧的参考帧来源 于基本层时, 说明该当前带编码帧与增强层不存在相对运动, 所以, MVP和
MVD都为 0, 也就不需要将 MVP和 MVD写入到码流中。
参阅图 9, 本发明实施例提供的可伸缩视频码流的编码方法的另一实施例 包括: 在上述图 7对应的实施例的中的步骤 100-2、 101-2、 101-3和 101-6, 执行 完步骤 101-6后执行步骤 102-32;
102-32、当所述在基本层中对应位置处帧的帧类型为 P帧或 B帧的所述当前 编码帧的参考帧来源于非基本层时,确定将所述在基本层中对应位置处帧的帧 类型为 P帧或 B帧的所述当前编码帧的运动信息写入所述码流中。
本发明实施例中, 当帧类型为 P帧或 B帧的所述当前编码帧的参考帧来源 于非基本层,也可以理解为增强层时,说明该当前带编码帧与增强层存在相对 运动, 所以, MVP和 MVD都有值, 就需要将 MVP和 MVD写入到码流中。
参阅图 10,本发明实施例提供的一种可伸缩视频码流的解码方法的一实施 例包括:
201、 解码端装置根据当前解码帧的帧类型, 确定所述当前解码帧的参考 帧索引 REF_IDX和所述当前解码帧的运动信息。
帧类型包括 I帧、 P帧和 B帧, 其中 I帧为关键帧, I帧包含一个完整的画面, 解码 I帧时不需要参考帧就可以完成解码。
P帧为预测编码帧, 表示的是本帧跟之前的一个关键帧 (或 P帧) 的差別, 解码时需要用之前的参考帧叠加上与本帧的差別, 才能解码出最终画面。
B帧是双向预测帧, 也就是 B帧记录的是本帧与前后帧的差別, 要解码 B 帧, 不仅要取得之前的参考帧, 还要解码之后的参考帧, 通过前后画面的与本 帧残差数据的叠加取得最终画面。
参考帧索引 REF_IDX为参考帧的标识, 可以根据该索引找到对应的参考 帧, 从而确定其他当前编码帧的残差。
本发明实施例中运动信息包括: 运动矢量预测值 ( MVP, motion vector predictor ) 以及运动矢量差值 ( MVD, motion vector difference) » 本发明其他 实施例中的运动信息也都指的是 MVP和 MVD。
202、 解码端装置解码所述当前解码帧的残差信息, 并根据所述参考帧索 ? I REF_IDX和所述运动信息对解码后的所述当前解码帧进行运动补偿。
本发明实施例中,根据当前解码帧的帧类型,确定所述当前解码帧的参考 帧索引 REF_IDX和所述当前解码帧的运动信息;解码所述当前解码帧的残差信 息,并根据所述参考帧索引 REF_IDX和所述运动信息对解码后的所述当前解码 帧进行运动补偿。 与现有技术相比, 本发明实施例提供的方法, 可以根据当前 解码帧的帧类型,确定所述当前解码帧的参考帧索引 REF_IDX和所述当前解码 帧的运动信息,不需要逐个解析参考帧索引 REFJDX和运动信息,从而提高了 解码的效率。
参阅图 11 ,本发明实施例提供的一种可伸缩视频码流的解码方法的另一实 施例包括:
200、获取所述当前解码帧的帧类型,当所述当前解码帧的帧类型为 P帧时, 获取所述帧类型为 P帧的当前解码帧在基本层对应位置的帧类型为 I帧。
201-1、 将所述参考帧索引 REFJDX和所述当前解码帧的运动信息分別设 置为 0。
执行完步骤 201-1后, 执行图 10对应的实施例中的步骤 202。
本发明实施例中, 当获取到当前解码帧的帧类型为 P帧时, 获取该帧类型 为 P帧的所述当前解码帧在基本层对应位置的帧类型, 当在基本层对应位置的 帧类型为 I帧时, 说明该帧类型为 P帧的当前解码帧是在编码端被强制设置为 P 帧的, 它的本质还是 I帧, 与增强层不存在相对运动, 所以该帧类型为 I帧的当 前解码帧解码时直接将参考帧索引 REFJDX和所述当前解码帧的运动信息分 別设置为 0, 也就是将 REFJDX、 MVP和 MVD都设置为 0。
参阅图 12,本发明实施例提供的一种可伸缩视频码流的解码方法的另一实 施例包括:
200-1、 获取所述当前解码帧的帧类型, 当所述当前解码帧的帧类型为 P帧 或 B帧时,并且所述帧类型为 P帧或 B帧的所述当前解码帧在基本层对应位置的 解码帧的帧类型也为 P帧或 B帧时, 执行步骤 200-2。
200-2、 解析出所述帧类型为 P帧或 B帧的当前解码帧的参考帧索引 REFJDX, 并根据所述参考帧索引 REF_IDX确定所述帧类型为 P帧或 B帧的所 述当前解码帧的参考帧的来源; 以及根据所述帧类型为 P帧或 B帧的所述当前 解码帧的参考帧的来源获取所述当前解码帧的运动信息。
执行完步骤 200-2后, 执行图 10对应的实施例中的步骤 201和步骤 202。 参阅图 13,本发明实施例提供的一种可伸缩视频码流的解码方法的另一实 施例包括: 在上述图 12对应的实施例的基础上, 在执行步骤 200-2后, 执行步 骤 201-2; 201-2、 当所述帧类型为 P帧或 B帧的所述当前解码帧的参考帧来源于基本 层时, 将所述帧类型为 P帧或 B帧的当前解码帧的运动信息设置为 0。
本发明实施例中, 当所述帧类型为 P帧或 B帧的所述当前解码帧的参考帧 来源于基本层时, 说明之间不存在相对运动, 在编码端的 MVP和 MVD都为 0 , 所以可以直接将解码端 MVP和 MVD设置为 0。
参阅图 14,本发明实施例提供的一种可伸缩视频码流的解码方法的另一实 施例包括: 在上述图 12对应的实施例的基础上, 在执行步骤 200-2后, 执行步 骤 201-3;
201-3、 当所述帧类型为 P帧或 B帧的所述当前解码帧的参考帧来源于非基 本层时, 从码流中解析出所述帧类型为 P帧或 B帧的当前解码帧的运动信息。
当所述帧类型为 P帧或 B帧的所述当前解码帧的参考帧来源于非基本层 时, 说明该当前解码帧的运动信息 MVP和 MVD都有值, 需要从码流中解析出 该当前解码帧的 MVP和 MVD。
以上多个实施例从解码端详细描述了可伸缩视频码流的解码方法的过程, 与现有技术相比, 可以提高解码效率。
参阅图 15, 本发明实施例提供的编码端装置的一实施例包括:
第一设置单元 301 , 用于根据当前编码帧的参考帧的来源设置运动估计的 搜索范围;
运动估计单元 302,用于对所述第一设置单元 301设置的搜索范围内的所述 当前编码帧做运动估计并得到所述当前编码帧的参考帧索引 REF_IDX;
第一确定单元 303 , 用于根据所述当前编码帧在基本层对应位置处帧的帧 类型, 确定所述所述运动估计单元 302得到的当前编码帧的参考帧索引 REF_IDX写入或者不写入编码所述当前编码帧所形成的码流中。
本发明实施例中, 第一设置单元 301根据当前编码帧的参考帧的来源设置 运动估计的搜索范围;运动估计单元 302对所述第一设置单元 301设置的搜索范 围内的所述当前编码帧做运动估计并得到所述当前编码帧的参考帧索引 REFJDX; 第一确定单元 303根据所述当前编码帧在基本层对应位置处帧的帧 类型, 确定所述所述运动估计单元 302得到的当前编码帧的参考帧索引 REF_IDX写入或者不写入编码所述当前编码帧所形成的码流中。与现有技术相 比, 本发明实施例提供的编码端装置可以根据所述当前编码帧的帧类型,确定 所述运动估计单元得到的所述参考帧索引 REF_IDX写入或者不写入编码所述 当前编码帧所形成的码流中, 从而提高编码效率。
在上述图 15对应的实施例的基础上,本发明实施例提供的编码端装置的另 一实施例中,
所述第一设置单元 301 , 具体用于当所述当前编码帧的参考帧来源于基本 层时, 设置所述运动估计的搜索范围为 [0, 0];
所述运动估计单元 302,具体用于在所述第一设置单元 301设置的搜索范围 [0 , 0]内对所述当前编码帧做运动估计并得到当前编码帧的参考帧索引 REF_IDX„
在上一个实施例的基石出上, 参阅图 16, 本发明实施例提供的编码端装置的 另一实施例中, 所述编码端装置还包括;
第一获取单元 304, 用于获取所述当前编码帧在基本层中对应位置处帧的 帧类型;
第二设置单元 305,用于当所述第一获取单元 304获取的所述当前编码帧在 基本层中对应位置处帧的帧类型为 I帧时, 将所述当前编码帧的初始帧的类型 设置为置为 P帧;
所述运动估计单元 302, 具体用于对所述搜索范围内的被所述第二设置单 元 305设置为 P帧后的所述当前编码帧做运动估计并得到参考帧索引 REF_IDX„
在上述图 16对应的实施例的基础上,本发明实施例提供的编码端装置的另 一实施例中,
所述第一确定单元 303 , 具体用于确定不将所述当前编码帧在基本层中对 应位置处帧的帧类型为 I帧的所述当前编码帧的参考帧索引 REF_IDX写入所述 码流中。
在上述实施例的基础上, 本发明实施例提供的编码端装置的另一实施例 中, 所述运动估计单元 302, 还用于通过所述运动估计, 得到所述在基本层中 对应位置处帧的帧类型为 I帧的所述当前编码帧的运动信息;
所述第一确定单元 303 ,还用于不将所述运动估计单元 302得到的所述在基 本层中对应位置处帧的帧类型为 I帧的所述当前编码帧的运动信息写入所述码 流中。
在上述图 15对应的实施例的基础上, 参阅图 17, 本发明实施例提供的编码 端装置的另一实施例中, 所述编码端装置还包括:
第二获取单元 306, 用于获取所述当前编码帧在基本层中对应位置处帧的 帧类型;
所述第一确定单元 303,还用于当所述第二获取单元 306获取的在基本层对 应位置处帧的帧类型为 P帧或 B帧的所述当前编码帧的参考帧来源于基本层 时, 确定将所述初始帧的类型为 P帧或 B帧的所述当前编码帧的参考帧索引 REF_IDX写入所述码流中。
在上述图 17对应的实施例的基础上, 参阅图 18, 本发明实施例提供的编码 端装置的另一实施例中,
所述运动估计单元 302, 还用于通过所述运动估计, 得到所述在基本层中 对应位置处帧的帧类型为 P帧或者 B帧的所述当前编码帧的运动信息;
所述第一确定单元 303包括:
第一确定子单元 3031 ,用于确定所述在基本层中对应位置处帧的帧类型为 P帧或者 B帧的所述当前编码帧的参考帧的来源;
第二确定子单元 3032,用于根据所述第一确定子单元 3031确定的在基本层 中对应位置处帧的帧类型为 P帧或者 B帧的所述当前编码帧的参考帧的来源确 定是否将所述在基本层中对应位置处帧的帧类型为 P帧或者 B帧的所述当前编 码帧的运动信息写入所述码流中。
在上图 18对应的实施例的基石出上,本发明实施例提供的编码端装置的另一 实施例中,
所述第二确定子单元 3032 ,具体用于当所述在基本层中对应位置处帧的帧 类型为 P帧或 B帧的所述当前编码帧的参考帧来源于基本层时, 确定不将在基 本层中对应位置处帧的帧类型为 P帧或 B帧的所述当前编码帧的运动信息写入 所述码流中。
在上图 18对应的实施例的基石出上,本发明实施例提供的编码端装置的另一 实施例中,
所述第二确定子单元 3032,具体用于当所述在基本层中对应位置处帧的帧 类型为 P帧或 B帧的所述当前编码帧的参考帧来源于非基本层时, 确定将所述 在基本层中对应位置处帧的帧类型为 P帧或 B帧的所述当前编码帧的运动信息 写入所述码流中。
参阅图 19, 本发明实施例提供的解码端装置的一实施例包括:
第二确定单元 401 , 用于根据当前解码帧的帧类型, 确定所述当前解码帧 的参考帧索引 REF_IDX和所述当前解码帧的运动信息;
解码单元 402, 用于解码所述当前解码帧的残差信息;
运动补偿单元 403 , 用于根据所述第二确定单元 401确定的参考帧索引 REF_IDX和所述运动信息对所述解码单元 402解码后的所述当前解码帧进行运 动补偿。
本发明实施例中, 第二确定单元 401根据当前解码帧的帧类型, 确定所述 当前解码帧的参考帧索引 REF_IDX和所述当前解码帧的运动信息; 解码单元 402解码所述当前解码帧的残差信息,运动补偿单元 403根据所述第二确定单元 401确定的参考帧索引 REF_IDX和所述运动信息对所述解码单元 402解码后的 所述当前解码帧进行运动补偿。 与现有技术相比, 本发明实施例提供的解码端 装置, 可以根据当前解码帧的帧类型, 确定所述当前解码帧的参考帧索引 REF_IDX和所述当前解码帧的运动信息, 不需要逐个解析 REF_IDX和运动信 息, 从容提高了解码的效率。
在上述图 19对应的实施例的基础上, 参阅图 20, 本发明实施例提供的解码 端装置的另一实施例中, 所述解码端装置还包括:
第三获取单元 404, 用于获取所述当前解码帧的帧类型;
所述第二确定单元 401,用于当所述第三获取单元 404获取的所述当前解码 帧的帧类型为 P帧,并且所述帧类型为 P帧的的所述当前解码帧在基本层对应位 置的解码帧的帧类型为 I帧时, 将所述参考帧索引 REF_IDX和所述当前解码帧 的运动信息分別设置为 0。
在上述图 19对应的实施例的基础上, 参阅图 21 , 本发明实施例提供的解码 端装置的另一实施例中, 所述解码端装置还包括:
第四获取单元 405, 用于获取所述当前解码帧的帧类型;
第一解析单元 406,当所述第四获取单元 405获取的当前解码帧的帧类型为 P帧或 B帧时, 并且所述帧类型为 P帧或 B帧的所述当前解码帧在基本层对应位 置的解码帧的帧类型也为 P帧或 B帧时, 解析出所述帧类型为 P帧或 B帧的当前 解码帧的参考帧索引 REF_IDX;
第三确定单元 407, 用于确定所述帧类型为 P帧或 B帧的所述当前解码帧的 参考帧的来源;
所述第二确定单元 401 , 用于根据所述第三确定单元 404确定的帧类型为 P 帧或 B帧的所述当前解码帧的参考帧的来源获取所述当前解码帧的运动信息。
在上述图 21对应的实施例的基础上,本发明实施例提供的解码端装置的另 一实施例中,
所述第二确定单元 401 ,还用于当所述第三确定单元 404确定所述帧类型为 P帧或 B帧的所述当前解码帧的参考帧来源于基本层时, 将所述帧类型为 P帧或 B帧的当前解码帧的运动信息设置为 0。
在上述图 21对应的实施例的基础上,本发明实施例提供的解码端装置的另 一实施例中,
所述第二确定单元 401,用于当所述第三确定单元 404确定出所述帧类型为 P帧或 B帧的所述当前解码帧的参考帧来源于非基本层时, 从码流中解析出所 述帧类型为 P帧或 B帧的当前解码帧的运动信息。
本发明实施例还提供一种计算机存储介质, 该计算机存储介质存储有程 序,该程序执行时包括上述一种可伸缩视频码流的编码方法的部分或者全部步 骤。
本发明实施例还提供一种计算机存储介质, 该计算机存储介质存储有程 序,该程序执行时包括上述一种可伸缩视频码流的解码方法的部分或者全部步 骤。
参阅图 22, 本发明实施例提供的终端的一实施例包括: 第一接收器 110、 第一发送器 120、 第一存储器 130和第一处理器 140, 所述第一接收器 110、 第一 发送器 120、 第一存储器 130和第一处理器 140通过总线或者其他方式连接; 其中, 第一处理器 140用于执行如下步骤:
根据当前编码帧的参考帧的来源设置运动估计的搜索范围,在所述搜索范 围内对所述当前编码帧做运动估计并得到所述当前编码帧的参考帧索引 REFJDX;
根据所述当前编码帧在基本层对应位置处帧的帧类型,确定所述当前编码 帧的参考帧索引 REFJDX写入或者不写入编码所述当前编码帧所形成的码流 中。
本发明一些实施例中, 所述第一处理器 140还用于当所述当前编码帧的参 考帧来源于基本层时, 设置所述运动估计的搜索范围为 [0, 0] , 并在所述搜索 范围 [0, 0]内对所述当前编码帧做运动估计并得到当前编码帧的参考帧索引 REFJDX„
本发明一些实施例中, 所述第一处理器 140还用于获取所述当前编码帧在 基本层中对应位置处帧的帧类型;当所述当前编码帧在基本层中对应位置处帧 的帧类型为 I帧时, 将所述当前编码帧的初始帧的类型设置为置为 P帧, 并在所 述搜索范围内对被设置为 P帧后的所述当前编码帧做运动估计并得到参考帧索 引 REF_IDX。
所述第一处理器 140还用于确定不将所述当前编码帧在基本层中对应位置 处帧的帧类型为 I帧的所述当前编码帧的参考帧索引 REF_IDX写入所述码流 中。
本发明一些实施例中, 所述第一处理器 140还用于通过所述运动估计, 得 到所述在基本层中对应位置处帧的帧类型为 I帧的所述当前编码帧的运动信 息; 并确定不将所述在基本层中对应位置处帧的帧类型为 I帧的所述当前编码 帧的运动信息写入所述码流中。
本发明一些实施例中, 所述第一处理器 140还用于获取所述当前编码帧在 基本层中对应位置处帧的帧类型,并当所述在基本层对应位置处帧的帧类型为 P帧或 B帧的所述当前编码帧的参考帧来源于基本层时, 确定将所述初始帧的 类型为 P帧或 B帧的所述当前编码帧的参考帧索引 REF_IDX写入所述码流中。
本发明一些实施例中, 所述第一处理器 140还用于通过所述运动估计, 得 到所述在基本层中对应位置处帧的帧类型为 P帧或者 B帧的所述当前编码帧的 运动信息, 并确定所述在基本层中对应位置处帧的帧类型为 P帧或者 B帧的所 述当前编码帧的参考帧的来源;根据所述在基本层中对应位置处帧的帧类型为 P帧或者 B帧的所述当前编码帧的参考帧的来源确定是否将所述在基本层中对 应位置处帧的帧类型为 P帧或者 B帧的所述当前编码帧的运动信息写入所述码 流中。
本发明一些实施例中, 所述第一处理器 140还用于当所述在基本层中对应 位置处帧的帧类型为 P帧或 B帧的所述当前编码帧的参考帧来源于基本层时, 确定不将在基本层中对应位置处帧的帧类型为 P帧或 B帧的所述当前编码帧的 运动信息写入所述码流中。
本发明一些实施例中, 所述第一处理器 140还用于当所述在基本层中对应 位置处帧的帧类型为 P帧或 B帧的所述当前编码帧的参考帧来源于非基本层 时, 确定将所述在基本层中对应位置处帧的帧类型为 P帧或 B帧的所述当前编 码帧的运动信息写入所述码流中。
参阅图 23, 本发明实施例提供的终端的一实施例包括: 第二接收器 150、 第二发送器 160、 第二存储器 170和第二处理器 180, 所述第二接收器 150、 第二 发送器 160、 第二存储器 170和第二处理器 180, 通过总线或者其他方式连接; 其中, 第二处理器 180用于执行如下步骤:
根据当前解码帧的帧类型, 确定所述当前解码帧的参考帧索引 REF_IDX 和所述当前解码帧的运动信息;
解码所述当前解码帧的残差信息,并根据所述参考帧索引 REF_IDX和所述 运动信息对解码后的所述当前解码帧进行运动补偿。
本发明一些实施例中, 所述第二处理器 180还用于获取所述当前解码帧的 帧类型; 当所述当前解码帧的帧类型为 P帧,并且所述帧类型为 P帧的所述当前 解码帧在基本层对应位置的解码帧的帧类型为 I帧时, 将所述参考帧索引 REF_IDX和所述当前解码帧的运动信息分別设置为 0。
所述第二处理器 180还用于获取所述当前解码帧的帧类型; 当所述当前解 码帧的帧类型为 P帧或 B帧时, 并且所述帧类型为 P帧或 B帧的所述当前解码帧 在基本层对应位置的解码帧的帧类型也为 P帧或 B帧时, 解析出所述帧类型为 P 帧或 B帧的当前解码帧的参考帧索引 REF_IDX , 并根据所述参考帧索引 REF_IDX确定所述帧类型为 P帧或 B帧的所述当前解码帧的参考帧的来源; 以 及根据所述帧类型为 P帧或 B帧的所述当前解码帧的参考帧的来源获取所述当 前解码帧的运动信息。
本发明一些实施例中, 所述第二处理器 180还用于当所述帧类型为 P帧或 B 帧的所述当前解码帧的参考帧来源于基本层时, 将所述帧类型为 P帧或 B帧的 当前解码帧的运动信息设置为 0。
本发明一些实施例中, 所述第二处理器 180还用于当所述帧类型为 P帧或 B 帧的所述当前解码帧的参考帧来源于非基本层时,从码流中解析出所述帧类型 为 P帧或 B帧的当前解码帧的运动信息。
参阅图 24, 本发明实施例提供的终端 10的另一实施例包括: 编码端装置 30 和解码端装置 40,
编码端装置 30,用于根据当前编码帧的参考帧的来源设置运动估计的搜索 范围,在所述搜索范围内对所述当前编码帧做运动估计并得到所述当前编码帧 的参考帧索引 REF_IDX; 根据所述当前编码帧在基本层对应位置处帧的帧类 型,确定所述当前编码帧的参考帧索引 REF_IDX写入或者不写入编码所述当前 编码帧所形成的码流中。
解码端装置 40, 用于才艮据当前解码帧的帧类型, 确定所述当前解码帧的参 考帧索引 REF_IDX和所述当前解码帧的运动信息;解码所述当前解码帧的残差 信息,并根据所述参考帧索引 REF_IDX和所述运动信息对解码后的所述当前解 码帧进行运动补偿。
本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步 骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读 存储介质中, 存储介质可以包括: ROM、 RAM, 磁盘或光盘等。
以上对本发明实施例所提供的可伸缩视频码流的编码、解码方法以及装置 述, 以上实施例的说明只是用于帮助理解本发明的方法及其核心思想; 同时, 对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围 上均会有改变之处, 综上所述, 本说明书内容不应理解为对本发明的限制。

Claims

权 利 要 求
1、 一种可伸缩视频码流的编码方法, 其特征在于, 包括:
根据当前编码帧的参考帧的来源设置运动估计的搜索范围,在所述搜索范 围内对所述当前编码帧做运动估计并得到所述当前编码帧的参考帧索引 REFJDX;
根据所述当前编码帧在基本层对应位置处帧的帧类型,确定所述当前编码 帧的参考帧索引 REF_IDX写入或者不写入编码所述当前编码帧所形成的码流 中。
2、根据权利要求 1所述的方法, 其特征在于, 所述根据当前编码帧的参考 帧的来源设置运动估计的搜索范围, 具体包括:
当所述当前编码帧的参考帧来源于基本层时,设置所述运动估计的搜索范 围为 [0, 0];
对应地,所述在所述搜索范围内对所述当前编码帧做运动估计并得到当前 编码帧的参考帧索引 REF_IDX的步骤, 具体包括:
在所述搜索范围 [0, 0]内对所述当前编码帧做运动估计并得到当前编码帧 的参考帧索引 REF_IDX。
3、 根据权利要求 1或 2所述的方法, 其特征在于, 所述对所述搜索范围内 的所述当前编码帧做运动估计并得到所述参考帧索引 REF_IDX之前,所述方法 还包括:
获取所述当前编码帧在基本层中对应位置处帧的帧类型;
当所述当前编码帧在基本层中对应位置处帧的帧类型为 I帧时, 将所述当 前编码帧的初始帧的类型设置为置为 P帧;
对应的,所述在所述搜索范围内对所述当前编码帧做运动估计并得到参考 帧索引 REF_IDX, 具体包括:
在所述搜索范围内对被设置为 P帧后的所述当前编码帧做运动估计并得到 参考帧索引 REF_IDX。
4、根据权利要求 3所述的方法, 其特征在于, 所述根据所述当前编码帧在 基本层中对应位置处帧的帧类型,确定所述参考帧索引 REFJDX写入或者不写 入编码所述当前编码帧所形成的码流中, 具体包括:
确定不将所述当前编码帧在基本层中对应位置处帧的帧类型为 I帧的所述 当前编码帧的参考帧索引 REF_IDX写入所述码流中。
5、 根据权利要求 4所述的方法, 其特征在于, 所述方法还包括: 通过所述运动估计, 得到所述在基本层中对应位置处帧的帧类型为 I帧的 所述当前编码帧的运动信息;
对应的, 所述方法还包括,确定不将所述在基本层中对应位置处帧的帧类 型为 I帧的所述当前编码帧的运动信息写入所述码流中。
6、 根据权利要求 1或 2所述的方法, 其特征在于, 所述在所述搜索范围内 对所述当前编码帧做运动估计并得到所述参考帧索引 REF_IDX之前,所述方法 还包括:
获取所述当前编码帧在基本层中对应位置处帧的帧类型;
对应, 所述根据所述当前编码帧在基本层对应位置处帧的帧类型,确定所 述当前编码帧的参考帧索引 REF_IDX写入或者不写入编码所述当前编码帧所 形成的码流中具体包括:
当所述在基本层对应位置处帧的帧类型为 P帧或 B帧的所述当前编码帧的 参考帧来源于基本层时, 确定将所述初始帧的类型为 P帧或 B帧的所述当前编 码帧的参考帧索引 REF_IDX写入所述码流中。
7、 根据权利要求 6所述的方法, 其特征在于, 当所述当前编码帧在基本层 中对应位置处帧的帧类型为 P帧或者 B帧时, 所述方法还包括:
通过所述运动估计, 得到所述在基本层中对应位置处帧的帧类型为 P帧或 者 B帧的所述当前编码帧的运动信息, 并确定所述在基本层中对应位置处帧的 帧类型为 P帧或者 B帧的所述当前编码帧的参考帧的来源;
根据所述在基本层中对应位置处帧的帧类型为 P帧或者 B帧的所述当前编 码帧的参考帧的来源确定是否将所述在基本层中对应位置处帧的帧类型为 P帧 或者 B帧的所述当前编码帧的运动信息写入所述码流中。
8、根据权利要求 7所述的方法, 其特征在于, 所述根据所述在基本层中对 应位置处帧的帧类型为 P帧或者 B帧的所述当前编码帧的参考帧的来源确定是 否将所述在基本层中对应位置处帧的帧类型为 P帧或者 B帧的所述当前编码帧 的运动信息写入所述码流中, 具体包括:
当所述在基本层中对应位置处帧的帧类型为 P帧或 B帧的所述当前编码帧 的参考帧来源于基本层时, 确定不将在基本层中对应位置处帧的帧类型为 P帧 或 B帧的所述当前编码帧的运动信息写入所述码流中。
9、根据权利要求 7所述的方法, 其特征在于, 所述根据所述在基本层中对 应位置处帧的帧类型为 P帧或者 B帧的所述当前编码帧的参考帧的来源确定是 否将所述在基本层中对应位置处帧的帧类型为 P帧或者 B帧的所述当前编码帧 的运动信息写入所述码流中, 具体包括:
当所述在基本层中对应位置处帧的帧类型为 P帧或 B帧的所述当前编码帧 的参考帧来源于非基本层时,确定将所述在基本层中对应位置处帧的帧类型为 P帧或 B帧的所述当前编码帧的运动信息写入所述码流中。
10、 一种可伸缩视频码流的解码方法, 其特征在于, 包括:
根据当前解码帧的帧类型, 确定所述当前解码帧的参考帧索引 REF_IDX 和所述当前解码帧的运动信息;
解码所述当前解码帧的残差信息,并根据所述参考帧索引 REF_IDX和所述 运动信息对解码后的所述当前解码帧进行运动补偿。
11、 根据权利要求 10所述的方法, 其特征在于, 所述根据当前解码帧的帧 类型,确定所述当前解码帧的参考帧索引 REF_IDX和所述当前解码帧的运动信 息的步骤之前, 所述方法还包括:
获取所述当前解码帧的帧类型;
当所述当前解码帧的帧类型为 P帧,并且所述帧类型为 P帧的所述当前解码 帧在基本层对应位置的解码帧的帧类型为 I帧时;
所述确定所述当前解码帧的参考帧索引 REF_IDX和所述当前解码帧的运 动信息的步骤, 具体包括:
将所述参考帧索引 REF_IDX和所述当前解码帧的运动信息分別设置为 0。
12、 根据权利要求 10所述的方法, 其特征在于, 所述根据当前解码帧的帧 类型,确定所述当前解码帧的参考帧索引 REF_IDX和所述当前解码帧的运动信 息的步骤之前, 所述方法还包括:
获取所述当前解码帧的帧类型;
当所述当前解码帧的帧类型为 P帧或 B帧时, 并且所述帧类型为 P帧或 B帧 的所述当前解码帧在基本层对应位置的解码帧的帧类型也为 P帧或 B帧时, 所 述方法还包括:
解析出所述帧类型为 P帧或 B帧的当前解码帧的参考帧索引 REF_IDX, 并 根据所述参考帧索引 REF_IDX确定所述帧类型为 P帧或 B帧的所述当前解码帧 的参考帧的来源; 以及
根据所述帧类型为 P帧或 B帧的所述当前解码帧的参考帧的来源获取所述 当前解码帧的运动信息。
13、 根据权利要求 12所述的方法, 其特征在于, 所述根据所述帧类型为 P 帧或 B帧的所述当前解码帧的参考帧的来源获取所述当前解码帧的运动信息, 具体包括:
当所述帧类型为 P帧或 B帧的所述当前解码帧的参考帧来源于基本层时, 将所述帧类型为 P帧或 B帧的当前解码帧的运动信息设置为 0。
14、 根据权利要求 12所述的方法, 其特征在于, 所述根据所述帧类型为 P 帧或 B帧的所述当前解码帧的参考帧的来源获取所述当前解码帧的运动信息, 具体包括:
当所述帧类型为 P帧或 B帧的所述当前解码帧的参考帧来源于非基本层 时, 从码流中解析出所述帧类型为 P帧或 B帧的当前解码帧的运动信息。
15、 一种编码端装置, 其特征在于, 包括:
第一设置单元,用于根据当前编码帧的参考帧的来源设置运动估计的搜索 范围;
运动估计单元,用于在所述第一设置单元设置的搜索范围内对所述当前编 码帧做运动估计并得到所述当前编码帧的参考帧索引 REF_IDX;
第一确定单元, 用于根据所述当前编码帧在基本层对应位置处帧的帧类 型,确定所述运动估计单元得到的当前编码帧的参考帧索引 REF_IDX写入或者 不写入编码所述当前编码帧所形成的码流中。
16、 根据权利要求 15所述的编码端装置, 其特征在于,
所述第一设置单元, 具体用于当所述当前编码帧的参考帧来源于基本层 时, 设置所述运动估计的搜索范围为 [0, 0];
所述运动估计单元, 具体用于在所述第一设置单元设置的搜索范围 [0, 0] 内对所述当前编码帧做运动估计并得到当前编码帧的参考帧索引 REF_IDX。
17、 根据权利要求 15或 16所述的编码端装置, 其特征在于, 所述编码端装 置还包括;
第一获取单元,用于获取所述当前编码帧在基本层中对应位置处帧的帧类 型;
第二设置单元,用于当所述第一获取单元获取的所述当前编码帧在基本层 中对应位置处帧的帧类型为 I帧时, 将所述当前编码帧的初始帧的类型设置为 置为 P帧;
所述运动估计单元,具体用于在所述搜索范围内对被所述第二设置单元设 置为 P帧后的所述当前编码帧做运动估计并得到参考帧索引 REF_IDX。
18、 根据权利要求 17所述的编码端装置, 其特征在于,
所述第一确定单元,具体用于确定不将所述当前编码帧在基本层中对应位 置处帧的帧类型为 I帧的所述当前编码帧的参考帧索引 REF_IDX写入所述码流 中。
19、 根据权利要求 18所述的编码端装置, 其特征在于,
所述运动估计单元,还用于通过所述运动估计,得到所述在基本层中对应 位置处帧的帧类型为 I帧的所述当前编码帧的运动信息;
所述第一确定单元,还用于确定不将所述运动估计单元得到的所述在基本 层中对应位置处帧的帧类型为 I帧的所述当前编码帧的运动信息写入所述码流 中。
20、 根据权利要求 15或 16所述的编码端装置, 其特征在于, 所述编码端装 置还包括:
第二获取单元,用于获取所述当前编码帧在基本层中对应位置处帧的帧类 型; 所述第一确定单元,还用于当所述第二获取单元获取的在基本层对应位置 处帧的帧类型为 P帧或 B帧的所述当前编码帧的参考帧来源于基本层时, 确定 将所述初始帧的类型为 P帧或 B帧的所述当前编码帧的参考帧索引 REF_IDX写 入所述码流中。
21、 根据权利要求 20所述的编码端装置, 其特征在于,
所述运动估计单元,还用于通过所述运动估计,得到所述在基本层中对应 位置处帧的帧类型为 P帧或者 B帧的所述当前编码帧的运动信息;
所述第一确定单元包括:
第一确定子单元, 用于确定所述在基本层中对应位置处帧的帧类型为 P帧 或者 B帧的所述当前编码帧的参考帧的来源;
第二确定子单元,用于根据所述第一确定子单元确定的在基本层中对应位 置处帧的帧类型为 P帧或者 B帧的所述当前编码帧的参考帧的来源确定是否将 所述在基本层中对应位置处帧的帧类型为 P帧或者 B帧的所述当前编码帧的运 动信息写入所述码流中。
22、 根据权利要求 21所述的编码端装置, 其特征在于,
所述第二确定子单元,具体用于当所述在基本层中对应位置处帧的帧类型 为 P帧或 B帧的所述当前编码帧的参考帧来源于基本层时, 确定不将在基本层 中对应位置处帧的帧类型为 P帧或 B帧的所述当前编码帧的运动信息写入所述 码流中。
23、 根据权利要求 21所述的编码端装置, 其特征在于,
所述第二确定子单元,具体用于当所述在基本层中对应位置处帧的帧类型 为 P帧或 B帧的所述当前编码帧的参考帧来源于非基本层时, 确定将所述在基 本层中对应位置处帧的帧类型为 P帧或 B帧的所述当前编码帧的运动信息写入 所述码流中。
24、 一种解码端装置, 其特征在于, 包括:
第二确定单元, 用于根据当前解码帧的帧类型,确定所述当前解码帧的参 考帧索引 REF_IDX和所述当前解码帧的运动信息;
解码单元, 用于解码所述当前解码帧的残差信息; 运动补偿单元, 用于根据所述第二确定单元确定的参考帧索引 REF_IDX 和所述运动信息对所述解码单元解码后的所述当前解码帧进行运动补偿。
25、 根据权利要求 24所述的解码端装置, 其特征在于, 所述解码端装置还 包括:
第三获取单元, 用于获取所述当前解码帧的帧类型;
所述第二确定单元,用于当所述第三获取单元获取的所述当前解码帧的帧 类型为 P帧,并且所述帧类型为 P帧的的所述当前解码帧在基本层对应位置的解 码帧的帧类型为 I帧时, 将所述参考帧索引 REF_IDX和所述当前解码帧的运动 信息分別设置为 0。
26、 根据权利要求 24所述的解码端装置, 其特征在于, 所述解码端装置还 包括:
第四获取单元, 用于获取所述当前解码帧的帧类型;
第一解析单元, 当所述第四获取单元获取的当前解码帧的帧类型为 P帧或 B帧时,并且所述帧类型为 P帧或 B帧的所述当前解码帧在基本层对应位置的解 码帧的帧类型也为 P帧或 B帧时, 解析出所述帧类型为 P帧或 B帧的当前解码帧 的参考帧索引 REF_IDX;
第三确定单元, 用于确定所述帧类型为 P帧或 B帧的所述当前解码帧的参 考帧的来源;
所述第二确定单元, 用于根据所述第三确定单元确定的帧类型为 P帧或 B 帧的所述当前解码帧的参考帧的来源获取所述当前解码帧的运动信息。
27、 根据权利要求 26所述的解码端装置, 其特征在于,
所述第二确定单元, 还用于当所述帧类型为 P帧或 B帧的所述当前解码帧 的参考帧来源于基本层时, 将所述帧类型为 P帧或 B帧的当前解码帧的运动信 息设置为 0。
28、 根据权利要求 26所述的解码端装置, 其特征在于,
所述第二确定单元, 用于当所述第三确定单元确定出所述帧类型为 P帧或 B帧的所述当前解码帧的参考帧来源于非基本层时, 从码流中解析出所述帧类 型为 P帧或 B帧的当前解码帧的运动信息。
29、 一种终端, 其特征在于, 包括: 编码端装置和解码端装置, 所述编码端装置为上述权利要求 15~23任意一项所述的编码端装置; 所述解码端装置为上述权利要求 24~28任意一项所述的编码端装置。
PCT/CN2013/080299 2013-01-07 2013-07-29 一种可伸缩视频码流的编码、解码方法及装置 WO2014106379A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310005187.X 2013-01-07
CN201310005187.XA CN103916667B (zh) 2013-01-07 2013-01-07 一种可伸缩视频码流的编码、解码方法及装置

Publications (1)

Publication Number Publication Date
WO2014106379A1 true WO2014106379A1 (zh) 2014-07-10

Family

ID=51042011

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/080299 WO2014106379A1 (zh) 2013-01-07 2013-07-29 一种可伸缩视频码流的编码、解码方法及装置

Country Status (2)

Country Link
CN (1) CN103916667B (zh)
WO (1) WO2014106379A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105898307A (zh) * 2015-12-22 2016-08-24 乐视云计算有限公司 一种b帧位置决策方法及装置
CN106534871B (zh) * 2016-12-06 2019-06-07 北京大学 视频编解码器的编码方法和解码方法

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060153300A1 (en) * 2005-01-12 2006-07-13 Nokia Corporation Method and system for motion vector prediction in scalable video coding
CN101031087A (zh) * 2003-12-31 2007-09-05 中国科学院计算技术研究所 解码获取图像的方法
CN101461244A (zh) * 2006-04-04 2009-06-17 三星电子株式会社 使用扩展宏块跳过模式进行编码/解码的方法和装置

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6289053B1 (en) * 1997-07-31 2001-09-11 Lsi Logic Corporation Architecture for decoding MPEG compliant video bitstreams meeting 2-frame and letterboxing requirements
WO2000067486A1 (en) * 1999-04-30 2000-11-09 Koninklijke Philips Electronics N.V. Video encoding method with selection of b-frame encoding mode

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101031087A (zh) * 2003-12-31 2007-09-05 中国科学院计算技术研究所 解码获取图像的方法
US20060153300A1 (en) * 2005-01-12 2006-07-13 Nokia Corporation Method and system for motion vector prediction in scalable video coding
CN101461244A (zh) * 2006-04-04 2009-06-17 三星电子株式会社 使用扩展宏块跳过模式进行编码/解码的方法和装置

Also Published As

Publication number Publication date
CN103916667B (zh) 2017-08-29
CN103916667A (zh) 2014-07-09

Similar Documents

Publication Publication Date Title
JP6087940B2 (ja) 復号化ピクチャ・バッファおよび参照ピクチャ・リストのための状態情報のシグナリング
TWI455596B (zh) 使用多視界視頻編碼及解碼之高階語法之改良式發信的方法與裝置
US9532067B2 (en) Decoding of inter-layer reference picture set and reference picture list construction
US20120287999A1 (en) Syntax element prediction in error correction
US10104390B2 (en) Marking pictures for inter-layer prediction
JP2015501098A5 (zh)
KR102000868B1 (ko) 인코딩 장치, 방법 및 컴퓨터 판독가능 매체
WO2014005426A1 (zh) 帧间预测编码运动信息的处理方法、装置和编解码系统
WO2015102042A1 (en) Parameter set signaling
WO2014106388A1 (zh) 确定时域运动矢量预测值的方法和装置
US20170063958A1 (en) Systems and methods for constraining a bitstream
JP2016519853A (ja) レイヤ間参照ピクチャセットの復号および参照ピクチャリスト構築
WO2012122836A1 (zh) 视频编解码处理方法和装置
WO2014106379A1 (zh) 一种可伸缩视频码流的编码、解码方法及装置
TWI621350B (zh) 包括第一層和第二層的多層串流之圖像區塊解碼方法和解碼裝置以及編碼方法和編碼裝置
US20160255353A1 (en) Highest temporal sub-layer list
US20170064301A1 (en) Methods and Apparatus for Use of Reference Block in Video Coding
WO2021012942A1 (zh) 残差编码、解码方法及装置、存储介质及电子装置
US10397609B2 (en) Method and apparatus for predicting residual
WO2023056392A1 (en) Method, apparatus, and medium for video processing
WO2023081826A1 (en) Method, apparatus, and medium for media processing
WO2023056360A1 (en) Method, apparatus and medium for video processing
WO2023137477A2 (en) Method, apparatus, and medium for video processing
KR20210141655A (ko) 멀티 채널 오디오 프레임에서 예측적인 코딩에서 에러 복구를 위한 방법 및 장치
WO2015136945A1 (en) Systems and methods for constraining a bitstream

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: 13869908

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 13869908

Country of ref document: EP

Kind code of ref document: A1