WO2012094944A1 - 视频编码方法、解码方法及终端 - Google Patents

视频编码方法、解码方法及终端 Download PDF

Info

Publication number
WO2012094944A1
WO2012094944A1 PCT/CN2011/084817 CN2011084817W WO2012094944A1 WO 2012094944 A1 WO2012094944 A1 WO 2012094944A1 CN 2011084817 W CN2011084817 W CN 2011084817W WO 2012094944 A1 WO2012094944 A1 WO 2012094944A1
Authority
WO
WIPO (PCT)
Prior art keywords
motion vector
backward
reverse
candidate motion
initial candidate
Prior art date
Application number
PCT/CN2011/084817
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 WO2012094944A1 publication Critical patent/WO2012094944A1/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/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
    • 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/577Motion compensation with bidirectional frame interpolation, i.e. using B-pictures

Definitions

  • Video encoding method, decoding method and terminal The present application claims priority to Chinese Patent Application No. 201110004025.5, entitled “Video Encoding Method, Decoding Method and Terminal", which was submitted to the Chinese Patent Office on January 10, 2011, The entire contents are incorporated herein by reference.
  • the present application relates to the field of communications technologies, and in particular, to a video encoding method, a decoding method, and a terminal.
  • Motion prediction and motion compensation are important technologies in video compression. Some bits in the video compression code stream are used to transmit motion vector information, especially in the case of low bit rate, for high-definition video, it is used to transmit motion vector information. The bits typically exceed fifty percent of the total number of bits in the stream. Therefore, it is necessary to improve the coding efficiency by selecting the optimal motion vector.
  • Three types of B, I, for P frames the frame data is compressed according to the difference between the current frame and the adjacent previous frame (I frame or P frame); for the B frame, it is based on the adjacent The frame is compressed at different points of one frame, the current frame, and the next frame of data. For the difference between the P frame and the B frame, when the motion vector is selected, the P frame only needs to obtain the motion vector set according to the previous frame, and the B frame can obtain the motion vector set according to the previous frame and the subsequent frame.
  • a scheme for selecting a motion vector in the prior art is: including, in each frame, a plurality of code blocks to be coded, and for a code block to be coded, according to the code block of the code block to be coded (usually The motion vector of the left code block, the upper left code block, the upper code block, and the upper right code block of the code block to be coded obtains a spatial candidate motion vector, and a median motion vector calculated according to the spatial candidate motion vector; a code block at the same position in the previous frame of the code block to be coded, and motion vectors of the four neighboring and eight neighborhood code blocks, to obtain a time domain candidate motion vector; from the above spatial domain candidate motion vector, median motion vector and time domain An optimal motion vector is selected from the candidate motion vector set composed of the candidate motion vectors, and the motion vector to be encoded and the index information allocated thereto are encoded into the code stream.
  • each motion vector is a motion vector generated by considering an existing code block, and is difficult to select only from a motion vector obtained from an existing code block. Better motion vectors make it difficult to further improve coding performance.
  • the embodiment of the present application provides a video encoding method, a decoding method, and a terminal, so as to solve the problem that it is difficult to select a better motion vector from an existing motion vector set, which makes it difficult to improve encoding performance.
  • a video encoding method including:
  • a motion vector for encoding is selected from the new set of candidate motion vectors for encoding.
  • a video encoding terminal includes:
  • An acquiring unit configured to acquire an initial candidate motion vector set of the current coding block
  • Adding a unit configured to add a reverse motion vector to each motion vector in the initial candidate motion vector set
  • a generating unit configured to generate a new candidate motion vector set according to the motion vector in the reverse motion vector and the initial candidate motion vector set;
  • a coding unit configured to select a motion vector for encoding from the new candidate motion vector set for encoding.
  • a video decoding method includes:
  • a video decoding terminal includes:
  • An acquiring unit configured to acquire an initial candidate motion vector set of the current coding block
  • Adding a unit configured to add a reverse motion vector to each motion vector in the initial candidate motion vector set
  • a generating unit configured to generate a new candidate motion vector set according to the motion vector in the reverse motion vector and the initial candidate motion vector set;
  • a parsing unit configured to parse the received code stream, and obtain information about a motion vector selected by the video encoding terminal
  • a decoding unit configured to select, according to the information of the motion vector, a corresponding motion vector from the new candidate motion vector set for decoding.
  • the embodiment of the present application when constructing a video coding candidate motion vector set, obtains an initial candidate motion vector set of the current coding block, and adds a reverse direction for each motion vector in the initial candidate motion vector set.
  • the motion vector generates a new candidate motion vector set according to the motion vector in the inverse motion vector and the initial candidate motion vector set, and selects a motion vector for encoding from the new candidate motion vector set for encoding.
  • the candidate motion vector set generated by the embodiment of the present application includes an inverse motion vector generated for the motion vector, where the inverse motion vector is equivalent to the predicted motion vector, so that the candidate motion vector set is more complete, and the selected motion vector is used.
  • the encoded motion vector is better and the coding performance is improved.
  • FIG. 1A is a flowchart of a first embodiment of a video encoding method of the present application
  • 1B is a schematic diagram of motion vector selection of a coding block in a B frame according to an embodiment of the present application
  • 1C is a schematic diagram of a model for uniform linear motion of a B frame according to an embodiment of the present application
  • FIG. 2 is a flow chart of a second embodiment of a video encoding method of the present application.
  • FIG. 3 is a flowchart of a third embodiment of a video encoding method of the present application.
  • 4 is a flowchart of an embodiment of a video decoding method of the present application
  • 5A is a block diagram of an embodiment of a video encoding terminal of the present application
  • Figure 5B is a block diagram of an embodiment of an adding unit in Figure 5A;
  • Figure 5C is a block diagram of an embodiment of another adding unit in Figure 5A;
  • Figure 5D is a block diagram of an embodiment of the encoding unit of Figure 5A;
  • FIG. 6 is a block diagram of an embodiment of a video decoding terminal of the present application.
  • FIG. 1A a flowchart of a first embodiment of a video encoding method of the present application is as follows:
  • Step 101 Acquire an initial candidate motion vector set of the current coding block.
  • the spatial domain candidate motion vector is obtained according to the peripheral coding block of the current coding block
  • the time domain candidate motion vector of the current coding block is obtained according to the reference frame, where the reference frame may be the previous frame of the current frame where the current coding block is located, or after One frame, or the previous frame and the next frame, the spatial domain candidate motion vector and the time domain candidate motion vector are combined into an initial motion vector set.
  • FIG. 1B a motion vector selection diagram of a coded block in a B frame having a bidirectional motion compensation characteristic is shown.
  • the coding block mv in the current frame is supported as the current coding block, and the peripheral coding block of the current coding block mv generally refers to the left coding block mv a , the upper coding block mv b , and the upper right coding block of the mv shown in FIG. 1B.
  • Mv c , upper left coding block mv d obtain the spatial candidate motion vector of the current coding block mv according to the above coding blocks mv a , mv b , mv c , mv d ; assume that the reference frame is the previous frame in the current frame for example, the shellfish 1 J mv current coded block in the previous frame coding block at a position corresponding to mvcoi, mv ⁇ 1 corresponding domain of neighbors and eight neighboring blocks are coded mv.
  • the reference frame is the previous frame in the current frame for example, the shellfish 1 J mv current coded block in the previous frame coding block at a position corresponding to mvcoi, mv ⁇ 1 corresponding domain of neighbors and eight neighboring blocks are coded mv.
  • To mv 7 according to the above mv ⁇ p mv.
  • time domain candidate motion vector of mv to mv 7 similarly, according to the coding block mv ⁇ 1 at the corresponding position in the next frame of the current coding block mv, and its four neighborhood and eight neighborhood coded blocks mv. , to mv 7 , obtain the time domain candidate motion vector.
  • Step 102 Add a reverse motion vector for each motion vector in the initial candidate motion vector set.
  • a reverse motion vector may be added to each motion vector in the initial candidate motion vector set according to the preset motion model.
  • the preset motion model includes a uniform linear motion model or an accelerated motion model.
  • FIG. 1C is a schematic diagram of a uniform linear motion of a frame.
  • V fc is a backward motion vector, which is a forward motion vector
  • T f the distance between the B frame and the forward reference frame
  • T b the distance between the backward reference frame
  • each pair of forward motion vectors and backward motion vectors satisfies the following relationship:
  • V f /T f -V h /T h .
  • Step 103 Generate a new candidate motion vector set according to the motion vector in the inverse motion vector and the initial candidate motion vector set.
  • the forward motion vector and all the forward motion vectors in the motion vector in the original initial candidate motion vector set are combined into a forward candidate motion.
  • the vector set, as well as all backward motion vectors, compose the backward candidate motion vector set.
  • all forward motion vectors and backward motion vectors may also be included in a new candidate motion vector set, the new candidate motion vector.
  • the set contains several sets of motion vectors. Each set of motion vectors has corresponding forward motion vectors and backward motion vectors. Each group of corresponding forward motion vectors and backward motion vectors can be distinguished by identification information. .
  • Step 104 Select a motion vector for encoding from the new candidate motion vector set for encoding.
  • An index identifier can be assigned to each motion vector in the new candidate motion vector set
  • An RDO (Rate Distortion Optimization) mode selects a motion vector for encoding from a new set of candidate motion vectors, and identifies an index of the selected motion vector, and information obtained according to the selected motion vector Program the code stream.
  • the motion vector selected from the new candidate motion vector set is truly encoded with the encoding terminal
  • the closest predicted motion vector of the motion vector because the motion vector itself has a large amount of information, if the real encoded motion vector itself is directly transmitted in the code stream, the amount of data compressed by the encoding will be increased, and the efficiency of encoding compression and encoding transmission will be reduced. Therefore, after constructing the candidate motion vector set and selecting the predicted motion vector therefrom, the difference between the predicted motion vector and the real motion vector can be obtained according to the predicted motion vector, and the difference is very small compared to the real encoded motion vector itself. By programming the difference into the code stream, the coding compression and coding transmission efficiency can be effectively improved.
  • FIG. 2 it is a flowchart of a second embodiment of a video encoding method according to the present application.
  • the embodiment shows a process of uniformly determining a motion vector to generate a reverse motion vector:
  • Step 201 Acquire an initial candidate motion vector set of the current coding block.
  • Step 202 Determine whether there is only one direction of motion vector in the initial candidate motion vector set, and if yes, execute step 203; otherwise, perform step 204.
  • the initial motion vector set includes a motion vector obtained by each coding block in the reference frame according to the peripheral coding block of the current coding block, where it is determined whether there is only one direction of motion vector, whether the initial candidate motion vector set includes only the former To the motion vector, or only the backward motion vector.
  • Step 203 Add a reverse motion vector for the motion vectors in one direction, and perform step 205.
  • a backward motion vector is added for each forward motion vector, and if only the backward motion vector is included, a forward direction is added for each backward motion vector.
  • Step 204 Add a backward motion vector as its inverse motion vector for the forward motion vector and a forward motion vector as the backward motion vector for the backward motion vector, respectively.
  • Step 205 Generate a new candidate motion vector set according to the motion vector in the inverse motion vector and the initial candidate motion vector set.
  • Step 206 Assign an index identifier to each motion vector in the new candidate motion vector set.
  • Step 207 Select a motion vector for encoding from the new candidate motion vector set by using the RDO method.
  • Step 208 Encode the index of the selected motion vector and the information obtained according to the selected motion vector into the code stream.
  • the index information encoded in the code stream is equivalent to the selection information of the motion vector selected by the encoding terminal.
  • the decoding terminal is transmitted by the code stream, the corresponding motion vector can be found according to the selection information.
  • the motion vector is obtained by using the RDO mode shown in step 206 to step 208, and the motion vector may be obtained by deriving at the same time on the encoding end and the decoding end. No restrictions are imposed.
  • FIG. 3 it is a flowchart of a third embodiment of a video encoding method according to the present application. The embodiment shows a process of determining a motion vector to generate a reverse motion vector one by one:
  • Step 301 Acquire an initial candidate motion vector set of the current coding block.
  • Step 302 sequentially extract a motion vector from the initial candidate motion vector set.
  • Step 303 Add a reverse motion vector to the extracted motion vector.
  • the extracted motion vector is a forward motion vector
  • a backward motion vector is added as the inverse motion vector for the extracted motion vector
  • the extracted motion vector adds a forward motion vector as its inverse motion vector.
  • Step 304 Determine whether to add a reverse motion vector to all motion vectors in the initial candidate motion vector set, and if yes, perform step 305; otherwise, return to step 302.
  • Step 305 Generate a new candidate motion vector set according to the motion vector in the inverse motion vector and the initial candidate motion vector set.
  • Step 306 Select a motion vector for encoding from the new candidate motion vector set for encoding.
  • the selection of the motion vector may be specifically performed by using the RDO mode as shown in the embodiment of FIG. 2, and details are not described herein again.
  • the generated candidate motion vector set includes The motion law is added according to the mirroring principle.
  • the inverse motion vector is equivalent to the predicted motion vector, so that the candidate motion vector set is more complete, and the motion vector selected for encoding is better, and the coding performance is improved.
  • the present application also provides an embodiment of a video decoding method.
  • the method for generating the candidate motion vector set in the video decoding process of the present application is consistent with the video encoding process.
  • the video decoding process needs to analyze the video code stream to obtain the selection information of the motion end to the motion vector, so as to select and encode from the candidate motion vector set.
  • a consistent motion vector decodes the current code block.
  • FIG. 4 a flowchart of an embodiment of a video decoding method of the present application is as follows:
  • Step 401 Obtain an initial candidate motion vector set of the current coding block.
  • the spatial domain candidate motion vector is obtained according to the peripheral coding block of the current coding block
  • the time domain candidate motion vector of the current coding block is obtained according to the reference frame, where the reference frame may be the previous frame of the current frame where the current coding block is located, or after One frame, or the previous frame and the next frame, the spatial domain candidate motion vector and the time domain candidate motion vector are combined into an initial motion vector set.
  • Step 402 Add a reverse motion vector for each motion vector in the initial candidate motion vector set.
  • each motion in the initial candidate motion vector set may be used according to the preset motion model.
  • Vector adds a reverse motion vector.
  • the preset motion model includes a uniform linear motion model or an accelerated motion model.
  • a reverse motion vector may also be added to the extracted motion vector, wherein if the extracted motion vector is a forward motion vector, a backward motion vector is added as the reverse direction for the extracted motion vector.
  • a motion vector if the extracted motion vector is a backward motion vector, adding a forward motion vector to the extracted motion vector as its inverse motion vector; determining whether to complete all motions in the initial candidate motion vector set The vector adds the inverse motion vector, and if so, triggers the step of generating the new candidate motion vector set; otherwise, returns the step of sequentially extracting a motion vector from the initial candidate motion vector set.
  • Step 403 Generate a new candidate motion vector set according to the motion vector in the reverse motion vector and the initial candidate motion vector set.
  • the descriptions in the examples to the third embodiment are the same, and are not described herein again.
  • Step 404 Parse the received code stream to obtain information about a motion vector selected by the video encoding terminal.
  • the video encoding terminal may encode the assigned index of the motion vector into the code stream, and select the selected motion vector and the real motion.
  • the difference between the vectors is encoded into the code stream and transmitted to the video decoding terminal. Therefore, after analyzing the code stream, the video decoding terminal may obtain information about the motion vector selected by the encoding terminal, for example, an index identifier of the motion vector, and obtain a difference between the selected motion vector and the real motion vector, according to The index identifier may select a motion vector selected by the encoding terminal from the new candidate motion vector set generated in step 403, and add the selected motion vector and the difference value to obtain a coded terminal real encoded motion vector.
  • Step 405 Select a corresponding transport from the new candidate motion vector set according to the motion vector information.
  • the motion vector is decoded.
  • the present application further provides a block diagram of an embodiment of a video encoding terminal and a video decoding terminal.
  • FIG. 5A it is a block diagram of an embodiment of a video encoding terminal of the present application.
  • the video encoding terminal includes: an obtaining unit 510, an adding unit 520, a generating unit 530, and an encoding unit 540.
  • the obtaining unit 510 is configured to obtain an initial candidate motion vector set of the current coding block
  • the adding unit 520 is configured to add a reverse motion vector to each motion vector in the initial candidate motion vector set.
  • a generating unit 530 configured to generate a new candidate motion vector set according to the motion vector in the reverse motion vector and the initial candidate motion vector set;
  • the encoding unit 540 is configured to select a motion vector for encoding from the new candidate motion vector set for encoding.
  • FIG. 5B it is a block diagram of an embodiment of an adding unit in FIG. 5A:
  • the adding unit 520 can include:
  • the vector direction determining unit 521 is configured to determine whether there is only one direction motion vector in the initial candidate motion vector
  • the motion vector adding unit 522 is configured to add, according to the determination result of the vector direction determining unit, a motion vector of a single direction, and add a reverse motion vector to the motion vector in the single direction, where only one direction exists.
  • the motion vector includes only the forward motion vector, or only the backward motion vector; if both the forward motion vector and the backward motion vector exist, the backward motion vector is added as the reverse motion for the forward motion vector, respectively.
  • a motion vector, and a forward motion vector is added to the backward motion vector as its inverse motion vector, respectively.
  • the adding unit 520 can include:
  • a sequence extracting unit 523 configured to sequentially extract one transport from the initial candidate motion vector set Moving vector
  • a sequence adding unit 524 configured to add a reverse motion vector to the extracted motion vector, where if the extracted motion vector is a forward motion vector, add a backward motion vector to the extracted motion vector as a reverse motion vector, if the extracted motion vector is a backward motion vector, adding a forward motion vector to the extracted motion vector as its inverse motion vector;
  • Adding completion determining unit 525 configured to determine whether to add an inverse motion vector to all motion vectors in the initial candidate motion vector set
  • the triggering execution unit 526 is configured to trigger the generating unit to perform a corresponding function when the determination result of the adding completion determining unit is yes, and return to the sequential extracting unit when the determining result of the adding completion determining unit is negative.
  • FIG. 5D a block diagram of an embodiment of the coding unit of Figure 5A:
  • the coding unit 540 includes:
  • An index identifier assigning unit 541, configured to allocate an index identifier for each motion vector in the new candidate motion vector set
  • a motion vector selection unit 542 configured to adopt a rate-distortion optimization criterion, and select, from the new candidate motion vector set, a motion vector for encoding;
  • the encoding operation unit 543 is configured to encode an index of the selected motion vector and information obtained according to the selected motion vector into a code stream.
  • FIG. 6 a block diagram of an embodiment of a video decoding terminal of the present application is shown.
  • the video decoding terminal includes: an obtaining unit 610, an adding unit 620, a generating unit 639, an analyzing unit 640, and a decoding unit 650.
  • the obtaining unit 610 is configured to obtain an initial candidate motion vector set of the current coding block
  • the adding unit 620 is configured to add a reverse motion vector to each motion vector in the initial candidate motion vector set.
  • a generating unit 630 configured to generate a new candidate motion vector set according to the motion vector in the reverse motion vector and the initial candidate motion vector set;
  • the parsing unit 640 is configured to parse the received code stream to obtain a motion selected by the video encoding terminal Vector information
  • the decoding unit 650 is configured to select, according to the information of the motion vector, a corresponding motion vector from the new candidate motion vector set for decoding.
  • the adding unit 620 may include: a vector direction determining unit, configured to determine whether there is only one direction motion vector in the initial candidate motion vector set; and a motion vector adding unit, configured to determine, according to the vector direction determining unit As a result, if there is only one direction of the motion vector, the inverse motion vector is added to the motion vector of the single direction, and the motion vector having only one direction includes only the forward motion vector, or only the backward motion.
  • Vector if there is a forward motion vector and a backward motion vector, respectively, adding a backward motion vector as the inverse motion vector to the forward motion vector, and adding a forward motion vector to the backward motion vector respectively As its reverse motion vector.
  • the adding unit 620 may further include: a vector direction determining unit, configured to determine whether there is only one direction motion vector in the initial candidate motion vector set; and a motion vector adding unit, configured to determine, according to the vector direction, the unit As a result of the judgment, if there is only one direction of the motion vector, the inverse motion vector is added to the motion vector of the single direction, and the motion vector having only one direction includes only the forward motion vector, or only the backward direction exists.
  • a motion vector if both a forward motion vector and a backward motion vector exist, a backward motion vector is added as the inverse motion vector for the forward motion vector, and a forward motion is added to the backward motion vector, respectively.
  • Vector as its inverse motion vector.
  • the embodiment of the present application when constructing a video coding candidate motion vector set, obtains an initial candidate motion vector set of the current coding block, and adds an inverse to each motion vector in the initial candidate motion vector set. To the motion vector, a new candidate motion vector set is generated according to the motion vector in the inverse motion vector and the initial candidate motion vector set, and the motion vector for encoding is selected from the new candidate motion vector set for encoding.
  • the candidate motion vector set generated by the embodiment of the present application includes an inverse motion vector generated for the motion vector, where the inverse motion vector is equivalent to the predicted motion vector, so that the candidate motion vector set is more complete, and the selected motion vector is used. The encoded motion vector is better and the coding performance is improved.
  • the technology in the embodiments of the present invention can be implemented by using software. Add the necessary general hardware platform to achieve.
  • the technical solution in the embodiments of the present invention may be embodied in the form of a software product in essence or in the form of a software product, and the computer software product may be stored in a storage medium such as a ROM/RAM. , a diskette, an optical disk, etc., includes instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform the methods described in various embodiments of the present invention or in some portions of the embodiments.
  • a computer device which may be a personal computer, server, or network device, etc.

Landscapes

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

Description

视频编码方法、 解码方法及终端 本申请要求于 2011 年 1 月 10 日提交中国专利局、 申请号为 201110004025.5、 发明名称为"视频编码方法、 解码方法及终端"的中国专利申 请的优先权, 其全部内容通过引用结合在本申请中。
技术领域 本申请涉及通信技术领域,特别是涉及一种视频编码方法、解码方法及终 端。
背景技术
运动预测和运动补偿是视频压缩中的重要技术,视频压缩码流中的一部分 比特用于传输运动矢量信息, 特别在低码率情况下, 对于高清视频来说, 用于 传输运动矢量信息所耗费的比特通常超过码流总比特数的百分之五十。 因此, 需要通过选择最优的运动矢量, 来提高编码效率。 针对连续动态图像的视频 编码, 将连续若干幅图像分成?、 B、 I三种类型, 对于 P帧, 是根据本帧 与相邻的前一帧 (I帧或 P帧) 的不同点来压缩本帧数据; 对于 B帧, 则 是根据相邻的前一帧、 本帧以及后一帧数据的不同点来压缩本帧。 针对 P 帧和 B帧的不同, 其在选择运动矢量时, P帧仅需根据其前一帧获得运动 矢量集合, 而 B帧可以根据其前一帧和后一帧获得运动矢量集合。
以 P帧为例,现有技术中一种选择运动矢量的方案为: 在每帧图像中包含 了若干待编码码块, 对于一个待编码码块, 根据该待编码码块周边码块(通常 指该待编码码块左侧码块、 左上方码块、 上方码块及右上方码块)的运动矢量 得到空域候选运动矢量, 以及根据这些空域候选运动矢量计算的中值运动矢 量; 获取该待编码码块前一帧中相同位置上的码块, 及其四邻域、 八邻域码块 的运动矢量, 得到时域候选运动矢量; 从上述空域候选运动矢量、 中值运动矢 量和时域候选运动矢量组成的候选运动矢量集合中选择一个最优的运动矢量, 作为待编码的运动矢量,将该待编码的运动矢量及为其分配的索引信息编入码 流中。
现有技术中为视频编码所生成的运动矢量集合中,每个运动矢量均为考虑 已存在码块所生成的运动矢量,仅从由已存在码块得到的运动矢量中难以选择 更优的运动矢量, 因此难以进一步提高编码性能。
发明内容
本申请实施例提供了一种视频编码方法、解码方法及终端, 以解决从现有 运动矢量集合中难以选择到更优运动矢量, 导致难以提高编码性能的问题。
为了解决上述技术问题, 本申请实施例公开了如下技术方案:
一种视频编码方法, 包括:
获取当前编码块的初始候选运动矢量集合;
为所述初始候选运动矢量集合中的每一个运动矢量添加一个反向运动矢 量;
根据所述反向运动矢量和所述初始候选运动矢量集合中的运动矢量生成 新的候选运动矢量集合;
从所述新的候选运动矢量集合中选择用于编码的运动矢量进行编码。 一种视频编码终端, 包括:
获取单元, 用于获取当前编码块的初始候选运动矢量集合;
添加单元,用于为所述初始候选运动矢量集合中的每一个运动矢量添加一 个反向运动矢量;
生成单元,用于根据所述反向运动矢量和所述初始候选运动矢量集合中的 运动矢量生成新的候选运动矢量集合;
编码单元,用于从所述新的候选运动矢量集合中选择用于编码的运动矢量 进行编码。
一种视频解码方法, 包括:
获取当前编码块的初始候选运动矢量集合;
为所述初始候选运动矢量集合中的每一个运动矢量添加一个反向运动矢 量;
根据所述反向运动矢量和所述初始候选运动矢量集合中的运动矢量生成 新的候选运动矢量集合;
解析接收到的码流, 获得视频编码终端所选择的运动矢量的信息; 根据所述运动矢量的信息从所述新的候选运动矢量集合中选择相应的运 动矢量进行解码。 一种视频解码终端, 包括:
获取单元, 用于获取当前编码块的初始候选运动矢量集合;
添加单元,用于为所述初始候选运动矢量集合中的每一个运动矢量添加一 个反向运动矢量;
生成单元,用于根据所述反向运动矢量和所述初始候选运动矢量集合中的 运动矢量生成新的候选运动矢量集合;
解析单元, 用于解析接收到的码流, 获得视频编码终端所选择的运动矢量 的信息;
解码单元,用于根据所述运动矢量的信息从所述新的候选运动矢量集合中 选择相应的运动矢量进行解码。
由上述实施例可以看出,本申请实施例在构建视频编码的候选运动矢量集 合时, 获取当前编码块的初始候选运动矢量集合, 为初始候选运动矢量集合中 的每一个运动矢量添加一个反向运动矢量,根据反向运动矢量和初始候选运动 矢量集合中的运动矢量生成新的候选运动矢量集合,从新的候选运动矢量集合 中选择用于编码的运动矢量进行编码。应用本申请实施例生成的候选运动矢量 集合中, 包括了为运动矢量生成的反向运动矢量, 该反向运动矢量相当于预测 的运动矢量,从而使得候选运动矢量集合更加完备,从中选择的用于编码的运 动矢量更优, 提高了编码性能。
附图说明 为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施 例或现有技术描述中所需要使用的附图作筒单地介绍,显而易见地,对于本领 域普通技术人员而言,在不付出创造性劳动性的前提下,还可以根据这些附图 获得其他的附图。
图 1A为本申请视频编码方法的第一实施例流程图;
图 1B为本申请实施例 B帧中编码块的运动矢量选择示意图;
图 1C为本申请实施例 B帧匀速线性运动的模型示意图;
图 2为本申请视频编码方法的第二实施例流程图;
图 3为本申请视频编码方法的第三实施例流程图;
图 4为本申请视频解码方法的实施例流程图; 图 5A为本申请视频编码终端的实施例框图;
图 5B为图 5A中一种添加单元的实施例框图;
图 5C为图 5A中另一种添加单元的实施例框图;
图 5D为图 5A中编码单元的实施例框图;
图 6本申请视频解码终端的实施例框图。
具体实施方式 本发明如下实施例提供了一种视频编码方法及装置。
为了使本技术领域的人员更好地理解本发明实施例中的技术方案,并使本 发明实施例的上述目的、特征和优点能够更加明显易懂, 下面结合附图对本发 明实施例中技术方案作进一步详细的说明。 参见图 1A, 为本申请视频编码方法的第一实施例流程图:
步骤 101 : 获取当前编码块的初始候选运动矢量集合。
具体的,根据当前编码块的周边编码块得到空域候选运动矢量,根据参考 帧得到当前编码块的时域候选运动矢量,该参考帧可以为当前编码块所在的当 前帧的前一帧, 或后一帧, 或前一帧和后一帧, 将空域候选运动矢量和时域候 选运动矢量组成初始运动矢量集合。
参见图 1B, 为具有双向运动补偿特性的 B帧中编码块的运动矢量选择示 意图。 支设当前帧中的编码块 mv为当前编码块, 则当前编码块 mv的周边编 码块通常指图 1B中示出的 mv的左侧编码块 mva、上方编码块 mvb、右上方编 码块 mvc、 左上方编码块 mvd , 才艮据上述编码块 mva、 mvb、 mvc、 mvd获得当 前编码块 mv的空域候选运动矢量; 假设以参考帧为当前帧中的前一帧为例, 贝1 J当前编码块 mv在前一帧中对应位置处的编码块为 mvcoi, 相应的 mv∞1的四 邻域及八邻域编码块分别为 mv。至 mv7, 根据上述 mv p mv。至 mv7 获得 mv的时域候选运动矢量, 同理, 也可以根据当前编码块 mv在后一帧中对应 位置处的编码块 mv∞1,及其四邻域及八邻域编码块 mv。,至 mv7,获得时域候选 运动矢量。
步骤 102: 为初始候选运动矢量集合中的每一个运动矢量添加一个反向运 动矢量。 具体的,可以根据预设运动模型为初始候选运动矢量集合中的每一个运动 矢量添加一个反向运动矢量。预设运动模型包括匀速直线运动模型、或加速运 动模型。
以匀速直线运动模型为例, 参见图 1C, 为 Β帧匀速线性运动的模型示意 图。 假设 Vfc是后向运动矢量, 是前向运动矢量, B帧与前向参考帧之间的距 离为 Tf ,与后向参考帧之间的距离为 Tb,则对于图 1C中示出的匀速直线运动 模型来说, 每一对前向运动矢量和后向运动矢量当满足如下关系:
Vf /Tf = -Vh /Th 。 另外, 除了上述图 1C中示出的匀速直线运动模型外, 也可以采用加速运 动模型, 此时两个运动矢量 和^之间可以满足关系 = _ ( Vb + ), 其中 α为 速度差。
步骤 103: 根据反向运动矢量和初始候选运动矢量集合中的运动矢量生成 新的候选运动矢量集合。
在为初始候选运动矢量集合中的运动矢量添加完反向运动矢量后,将所添 加的反向运动矢量和原来初始候选运动矢量集合中的运动矢量中的所有前向 运动矢量组成前向候选运动矢量集合,以及所有后向运动矢量组成后向候选运 动矢量集合。
除了上述分别建立前向候选运动矢量集合和后向候选运动矢量集合的方 式外,也可以在一个新的候选运动矢量集合中包含所有前向运动矢量和后向运 动矢量, 该新的候选运动矢量集合中包含了若干组运动矢量,每一组运动矢量 中有相对应的前向运动矢量和后向运动矢量,每一组相对应的前向运动矢量和 后向运动矢量可以通过标识信息进行区别。
步骤 104: 从新的候选运动矢量集合中选择用于编码的运动矢量进行编 码。
可以为新的候选运动矢量集合中的每个运动矢量分配索引标识, 采用
RDO ( Rate Distortion Optimization , 率失真优化准则)方式从新的候选运动矢 量集合中选择用于编码的运动矢量, 并将所述选择的运动矢量的索引标识, 及 根据所述选择的运动矢量获得的信息编入码流。
其中,从新的候选运动矢量集合中选择的运动矢量为与编码终端真实编码 运动矢量最接近的预测运动矢量, 由于运动矢量本身的信息量较大, 因此如果 在码流中直接传输真实编码运动矢量本身, 则将增加编码压缩的数据量, 降低 编码压缩和编码传输的效率, 因此通过构建候选运动矢量集合, 并从中选择预 测运动矢量后, 可以根据该预测运动矢量获得其与真实运动矢量的差值, 该差 值相较于真实编码运动矢量本身数据量非常小,因此将该差值编入码流就能有 效提高编码压缩和编码传输效率。
另外, 编码终端也可以利用选择的运动矢量完成其它编码过程, 该过程与 现有技术一致, 在此不再赘述。 参见图 2, 为本申请视频编码方法的第二实施例流程图, 该实施例示出了 对运动矢量进行统一判断生成反向运动矢量的过程:
步骤 201 : 获取当前编码块的初始候选运动矢量集合。
根据当前编码块的周边编码块得到空域候选运动矢量,根据参考帧得到当 前编码块的时域候选运动矢量,该参考帧可以为当前编码块所在的当前帧的前 一帧, 或后一帧, 或前一帧和后一帧, 将空域候选运动矢量和时域候选运动矢 量组成初始运动矢量集合。
步骤 202: 判断初始候选运动矢量集合中是否只存在单方向的运动矢量, 若是, 则执行步骤 203 ; 否则, 执行步骤 204。
在初始运动矢量集合中, 包括根据当前编码块的周边编码块, 参考帧中各 个编码块得到的运动矢量,此处判断是否只存在单方向的运动矢量指初始候选 运动矢量集合中是否仅包含前向运动矢量, 或者仅包含后向运动矢量。
步骤 203: 为单方向的运动矢量分别添加反向运动矢量, 执行步骤 205。 在初始运动矢量集合中,如果仅包含前向运动矢量, 则为每个前向运动矢 量添加一个后向运动矢量,如果仅包含后向运动矢量, 则为每个后向运动矢量 添加一个前向运动矢量。 结合图 1C可知, 每一对前向运动矢量和后向运动矢 量, 当采用匀速直线运动模型时, 应当满足如下关系: Vf I Tf = -Vb I T
步骤 204: 分别为前向运动矢量添加后向运动矢量作为其反向运动矢量, 以及分别为后向运动矢量添加前向运动矢量作为其反向运动矢量。
在初始运动矢量集合中,如果即包含前向运动矢量,又包含后向运动矢量, 则分别为前向运动矢量添加后向运动矢量,以及分别为后向运动矢量添加前向 运动矢量。 结合图 1C可知, 每一对前向运动矢量和后向运动矢量, 当采用匀 速直线运动模型时, 应当满足如下关系: vf I Tf = 1 τ
步骤 205: 根据反向运动矢量和初始候选运动矢量集合中的运动矢量生成 新的候选运动矢量集合。
步骤 206: 为新的候选运动矢量集合中的每个运动矢量分配索引标识。 步骤 207: 采用 RDO方式从新的候选运动矢量集合中选择用于编码的运 动矢量。
步骤 208: 将所述选择的运动矢量的索引标识, 及根据所述选择的运动矢 量获得的信息编入码流。
编入码流中的索引信息相当于编码终端所选择的运动矢量的选择信息,当 码流发送的解码终端时, 可以根据选择信息找到对应的运动矢量。
需要说明的是, 上述实施例中除了采用步骤 206至步骤 208示出的 RDO 方式进行运动矢量的选择,也可以采用在编码端和解码端同时推导的方式获得 运动矢量, 对此本申请实施例不进行限制。 参见图 3 , 为本申请视频编码方法的第三实施例流程图, 该实施例示出了 对运动矢量进行逐一判断生成反向运动矢量的过程:
步骤 301 : 获取当前编码块的初始候选运动矢量集合。
根据当前编码块的周边编码块得到空域候选运动矢量,根据参考帧得到当 前编码块的时域候选运动矢量,该参考帧可以为当前编码块所在的当前帧的前 一帧, 或后一帧, 或前一帧和后一帧, 夺空 i或候选运动矢量和时 i或候选运动矢 量组成初始运动矢量集合。
步骤 302: 从初始候选运动矢量集合中顺序提取一个运动矢量。
步骤 303: 为提取的运动矢量添加一个反向运动矢量。
其中, 若所提取的运动矢量为前向运动矢量, 则为所述提取的运动矢量添 加一个后向运动矢量作为其反向运动矢量,若所提取的运动矢量为后向运动矢 量, 则为所述提取的运动矢量添加一个前向运动矢量作为其反向运动矢量。
结合图 1C, 添加反向运动矢量后的每一对前向运动矢量和后向运动矢量 当满足如下关系: Vf I Tf = -Vb I T b
步骤 304: 判断是否完成对初始候选运动矢量集合中所有运动矢量添加反 向运动矢量, 若是, 则执行步骤 305; 否则, 返回步骤 302。
步骤 305: 根据反向运动矢量和初始候选运动矢量集合中的运动矢量生成 新的候选运动矢量集合。
步骤 306: 从新的候选运动矢量集合中选择用于编码的运动矢量进行编 码。
本步骤 306中, 可以具体采用如图 2实施例中所示的 RDO方式进行运动 矢量的选择, 在此不再赘述。
由上述视频编码的方法实施例可见,在生成的候选运动矢量集合中, 除了 包含按照现有技术中的方式生成的空域候选运动矢量、中值运动矢量和时域候 选运动矢量外,还包括根据运动规律按照镜像原理添加的反向运动矢量, 该反 向运动矢量相当于预测的运动矢量,从而使得候选运动矢量集合更加完备,从 中选择的用于编码的运动矢量更优, 提高编码性能。 与前述本申请视频编码方法实施例相对应,本申请还提供了视频解码方法 的实施例。本申请视频解码过程中生成候选运动矢量集合的方式与视频编码过 程一致,视频解码过程需要对视频码流进行分析获得编码端对运动矢量的选择 信息,以便从候选运动矢量集合中选择与编码端一致的运动矢量对当前码块进 行解码。
参见图 4, 为本申请视频解码方法的实施例流程图:
步骤 401 : 获取当前编码块的初始候选运动矢量集合。
具体的,根据当前编码块的周边编码块得到空域候选运动矢量,根据参考 帧得到当前编码块的时域候选运动矢量,该参考帧可以为当前编码块所在的当 前帧的前一帧, 或后一帧, 或前一帧和后一帧, 将空域候选运动矢量和时域候 选运动矢量组成初始运动矢量集合。
步骤 402: 为初始候选运动矢量集合中的每一个运动矢量添加一个反向运 动矢量。
具体的,可以根据预设运动模型为初始候选运动矢量集合中的每一个运动 矢量添加一个反向运动矢量。预设运动模型包括匀速直线运动模型、或加速运 动模型。
其中, 可以判断所述初始候选运动矢量中是否只存在单方向的运动矢量; 若只存在单方向的运动矢量,则为所述单方向的运动矢量分别添加反向运动矢 量; 若同时存在前向运动矢量和后向运动矢量, 则分别为所述前向运动矢量添 加后向运动矢量作为其反向运动矢量,以及分别为所述后向运动矢量添加前向 运动矢量作为其反向运动矢量。
其中, 也可以为所述提取的运动矢量添加一个反向运动矢量, 其中, 若所 提取的运动矢量为前向运动矢量,则为所述提取的运动矢量添加一个后向运动 矢量作为其反向运动矢量, 若所提取的运动矢量为后向运动矢量, 则为所述提 取的运动矢量添加一个前向运动矢量作为其反向运动矢量;判断是否完成对所 述初始候选运动矢量集合中所有运动矢量添加反向运动矢量, 若是, 则触发执 行所述生成新的候选运动矢量集合的步骤; 否则,返回所述从所述初始候选运 动矢量集合中顺序提取一个运动矢量的步骤。
步骤 403: 根据反向运动矢量和初始候选运动矢量集合中的运动矢量生成 新的候选运动矢量集合。 例至第三实施例中的描述一致, 在此不再赘述。
步骤 404: 解析接收到的码流, 获得视频编码终端所选择的运动矢量的信 息。
在视频编码终端从新的候选运动矢量集合中选择出用于编码的运动矢量 后,视频编码终端可以将为该运动矢量的分配的索引标识编入码流, 以及将该 选择的运动矢量与真实运动矢量之间的差值编入码流,并将码流传输到视频解 码终端。 因此视频解码终端分析该码流后, 可以从中获取到编码终端所选择的 运动矢量的信息, 例如, 该运动矢量的索引标识, 以及获得选择的运动矢量与 真实运动矢量之间的差值,根据该索引标识可以从步骤 403中生成的新的候选 运动矢量集合中选择编码终端所选择的运动矢量,将选择的运动矢量与差值相 加即可得到编码终端真实编码运动矢量。
步骤 405: 根据运动矢量的信息从新的候选运动矢量集合中选择相应的运 动矢量进行解码。 与前述本申请视频编码方法和视频解码方法的实施例相对应,本申请还提 供了视频编码终端和视频解码终端的实施例框图。
参见图 5A, 为本申请视频编码终端的实施例框图。
该视频编码终端包括: 获取单元 510、 添加单元 520、 生成单元 530和编 码单元 540。
其中, 获取单元 510, 用于获取当前编码块的初始候选运动矢量集合; 添加单元 520, 用于为所述初始候选运动矢量集合中的每一个运动矢量添 加一个反向运动矢量;
生成单元 530, 用于根据所述反向运动矢量和所述初始候选运动矢量集合 中的运动矢量生成新的候选运动矢量集合;
编码单元 540, 用于从所述新的候选运动矢量集合中选择用于编码的运动 矢量进行编码。 参见图 5B , 为图 5A中一种添加单元的实施例框图:
该添加单元 520可以包括:
矢量方向判断单元 521 , 用于判断所述初始候选运动矢量中是否只存在单 方向的运动矢量;
运动矢量添加单元 522 , 用于根据所述矢量方向判断单元的判断结果, 若 只存在单方向的运动矢量, 则为所述单方向的运动矢量分别添加反向运动矢 量, 所述只存在单方向的运动矢量包括只存在前向运动矢量, 或者只存在后向 运动矢量; 若同时存在前向运动矢量和后向运动矢量, 则分别为所述前向运动 矢量添加后向运动矢量作为其反向运动矢量,以及分别为所述后向运动矢量添 加前向运动矢量作为其反向运动矢量。 参见图 5C, 为图 5A中另一种添加单元的实施例框图:
该添加单元 520可以包括:
顺序提取单元 523 , 用于从所述初始候选运动矢量集合中顺序提取一个运 动矢量;
顺序添加单元 524, 用于为所述提取的运动矢量添加一个反向运动矢量, 其中, 若所提取的运动矢量为前向运动矢量, 则为所述提取的运动矢量添加一 个后向运动矢量作为其反向运动矢量, 若所提取的运动矢量为后向运动矢量, 则为所述提取的运动矢量添加一个前向运动矢量作为其反向运动矢量;
添加完成判断单元 525 , 用于判断是否完成对所述初始候选运动矢量集合 中所有运动矢量添加反向运动矢量;
触发执行单元 526, 用于当所述添加完成判断单元的判断结果为是, 则触 发所述生成单元执行相应功能, 当所述添加完成判断单元的判断结果为否, 则 返回所述顺序提取单元。 参见图 5D, 为图 5A中编码单元的实施例框图:
该编码单元 540包括:
索引标识分配单元 541 , 用于为所述新的候选运动矢量集合中的每个运动 矢量分配索引标识;
运动矢量选择单元 542, 用于采用率失真优化准则 RDO从所述新的候选 运动矢量集合中选择用于编码的运动矢量;
编码操作单元 543 , 用于将所述选择的运动矢量的索引标识, 及根据所述 选择的运动矢量获得的信息编入码流。 参见图 6, 为本申请视频解码终端的实施例框图。
该视频解码终端包括: 获取单元 610、 添加单元 620、 生成单元 639、 解 析单元 640和解码单元 650。
其中, 获取单元 610, 用于获取当前编码块的初始候选运动矢量集合; 添加单元 620, 用于为所述初始候选运动矢量集合中的每一个运动矢量添 加一个反向运动矢量;
生成单元 630, 用于根据所述反向运动矢量和所述初始候选运动矢量集合 中的运动矢量生成新的候选运动矢量集合;
解析单元 640, 用于解析接收到的码流, 获得视频编码终端所选择的运动 矢量的信息;
解码单元 650, 用于根据所述运动矢量的信息从所述新的候选运动矢量集 合中选择相应的运动矢量进行解码。
具体的, 添加单元 620可以包括: 矢量方向判断单元, 用于判断所述初始 候选运动矢量集合中是否只存在单方向的运动矢量;运动矢量添加单元, 用于 根据所述矢量方向判断单元的判断结果, 若只存在单方向的运动矢量, 则为所 述单方向的运动矢量分别添加反向运动矢量,所述只存在单方向的运动矢量包 括只存在前向运动矢量, 或者只存在后向运动矢量; 若同时存在前向运动矢量 和后向运动矢量,则分别为所述前向运动矢量添加后向运动矢量作为其反向运 动矢量, 以及分别为所述后向运动矢量添加前向运动矢量作为其反向运动矢 量。
具体的, 添加单元 620也可以包括: 矢量方向判断单元, 用于判断所述初 始候选运动矢量集合中是否只存在单方向的运动矢量;运动矢量添加单元, 用 于根据所述矢量方向判断单元的判断结果, 若只存在单方向的运动矢量, 则为 所述单方向的运动矢量分别添加反向运动矢量,所述只存在单方向的运动矢量 包括只存在前向运动矢量, 或者只存在后向运动矢量; 若同时存在前向运动矢 量和后向运动矢量,则分别为所述前向运动矢量添加后向运动矢量作为其反向 运动矢量,以及分别为所述后向运动矢量添加前向运动矢量作为其反向运动矢 量。 通过对以上实施方式的描述可知,本申请实施例在构建视频编码的候选运 动矢量集合时, 获取当前编码块的初始候选运动矢量集合, 为初始候选运动矢 量集合中的每一个运动矢量添加一个反向运动矢量,根据反向运动矢量和初始 候选运动矢量集合中的运动矢量生成新的候选运动矢量集合,从新的候选运动 矢量集合中选择用于编码的运动矢量进行编码。应用本申请实施例生成的候选 运动矢量集合中, 包括了为运动矢量生成的反向运动矢量, 该反向运动矢量相 当于预测的运动矢量,从而使得候选运动矢量集合更加完备,从中选择的用于 编码的运动矢量更优, 提高了编码性能。
本领域的技术人员可以清楚地了解到本发明实施例中的技术可借助软件 加必需的通用硬件平台的方式来实现。基于这样的理解, 本发明实施例中的技 术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现 出来, 该计算机软件产品可以存储在存储介质中, 如 ROM/RAM、 磁碟、 光盘 等, 包括若干指令用以使得一台计算机设备(可以是个人计算机, 服务器, 或 者网络设备等)执行本发明各个实施例或者实施例的某些部分所述的方法。
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相 似的部分互相参见即可, 每个实施例重点说明的都是与其他实施例的不同之 处。 尤其, 对于系统实施例而言, 由于其基本相似于方法实施例, 所以描述的 比较筒单, 相关之处参见方法实施例的部分说明即可。
以上所述的本发明实施方式, 并不构成对本发明保护范围的限定。任何在 本发明的精神和原则之内所作的修改、等同替换和改进等, 均应包含在本发明 的保护范围之内。

Claims

权 利 要 求
1、 一种视频编码方法, 其特征在于, 包括:
获取当前编码块的初始候选运动矢量集合;
为所述初始候选运动矢量集合中的每一个运动矢量添加一个反向运动矢 量;
根据所述反向运动矢量和所述初始候选运动矢量集合中的运动矢量生成 新的候选运动矢量集合;
从所述新的候选运动矢量集合中选择用于编码的运动矢量进行编码。
2、 根据权利要求 1所述的方法, 其特征在于, 所述获取当前编码块的初 始候选运动矢量集合包括:
根据当前编码块的周边编码块得到空域候选运动矢量;
根据参考帧得到所述当前编码块的时域候选运动矢量,所述参考帧为所述 当前编码块所在的当前帧的前一帧, 或后一帧, 或前一帧和后一帧;
将所述空域候选运动矢量和时域候选运动矢量组成初始运动矢量集合。
3、 根据权利要求 1所述的方法, 其特征在于, 所述为初始候选运动矢量 集合中的每一个运动矢量添加一个反向运动矢量具体为:根据预设运动模型为 初始候选运动矢量集合中的每一个运动矢量添加一个反向运动矢量;
所述预设运动模型包括: 匀速直线运动模型、 或加速运动模型。
4、 根据权利要求 1至 3任意一项所述的方法, 其特征在于, 所述为初始 候选运动矢量集合中的每一个运动矢量添加一个反向运动矢量包括:
判断所述初始候选运动矢量集合中是否只存在单方向的运动矢量; 若只存在单方向的运动矢量,则为所述单方向的运动矢量分别添加反向运 动矢量, 所述只存在单方向的运动矢量包括只存在前向运动矢量, 或者只存在 后向运动矢量;
若同时存在前向运动矢量和后向运动矢量,则分别为所述前向运动矢量添 加后向运动矢量作为其反向运动矢量,以及分别为所述后向运动矢量添加前向 运动矢量作为其反向运动矢量。
5、 根据权利要求 1至 3任意一项所述的方法, 其特征在于, 所述为初始 候选运动矢量集合中的每一个运动矢量添加一个反向运动矢量包括: 从所述初始候选运动矢量集合中顺序提取一个运动矢量;
为所述提取的运动矢量添加一个反向运动矢量, 其中, 若所提取的运动矢 量为前向运动矢量,则为所述提取的运动矢量添加一个后向运动矢量作为其反 向运动矢量, 若所提取的运动矢量为后向运动矢量, 则为所述提取的运动矢量 添加一个前向运动矢量作为其反向运动矢量;
判断是否完成对所述初始候选运动矢量集合中所有运动矢量添加反向运 动矢量, 若是, 则触发执行所述生成新的候选运动矢量集合的步骤; 否则, 返 回所述从所述初始候选运动矢量集合中顺序提取一个运动矢量的步骤。
6、 根据权利要求 1所述的方法, 其特征在于, 所述新的运动矢量集合包 括: 由前向运动矢量组成的前向候选运动矢量集合, 以及由后向运动矢量组成 的后向候选运动矢量集合。
7、 根据权利要求 1所述的方法, 其特征在于, 所述从新的候选运动矢量 集合中选择用于编码的运动矢量进行编码包括:
为所述新的候选运动矢量集合中的每个运动矢量分配索引标识; 采用率失真优化准则 RDO从所述新的候选运动矢量集合中选择用于编码 的运动矢量;
将所述选择的运动矢量的索引标识,及根据所述选择的运动矢量获得的信 息编入码流。
8、 一种视频编码终端, 其特征在于, 包括:
获取单元, 用于获取当前编码块的初始候选运动矢量集合;
添加单元,用于为所述初始候选运动矢量集合中的每一个运动矢量添加一 个反向运动矢量;
生成单元,用于根据所述反向运动矢量和所述初始候选运动矢量集合中的 运动矢量生成新的候选运动矢量集合;
编码单元,用于从所述新的候选运动矢量集合中选择用于编码的运动矢量 进行编码。
9、 根据权利要求 8所述的视频编码终端, 其特征在于, 所述添加单元包 括: 矢量方向判断单元,用于判断所述初始候选运动矢量集合中是否只存在单 方向的运动矢量;
运动矢量添加单元, 用于根据所述矢量方向判断单元的判断结果, 若只存 在单方向的运动矢量, 则为所述单方向的运动矢量分别添加反向运动矢量, 所 述只存在单方向的运动矢量包括只存在前向运动矢量,或者只存在后向运动矢 量; 若同时存在前向运动矢量和后向运动矢量, 则分别为所述前向运动矢量添 加后向运动矢量作为其反向运动矢量,以及分别为所述后向运动矢量添加前向 运动矢量作为其反向运动矢量。
10、 根据权利要求 8所述的视频编码终端, 其特征在于, 所述添加单元包 括:
顺序提取单元,用于从所述初始候选运动矢量集合中顺序提取一个运动矢 量;
顺序添加单元,用于为所述提取的运动矢量添加一个反向运动矢量,其中, 若所提取的运动矢量为前向运动矢量,则为所述提取的运动矢量添加一个后向 运动矢量作为其反向运动矢量, 若所提取的运动矢量为后向运动矢量, 则为所 述提取的运动矢量添加一个前向运动矢量作为其反向运动矢量;
添加完成判断单元,用于判断是否完成对所述初始候选运动矢量集合中所 有运动矢量添加反向运动矢量;
触发执行单元, 用于当所述添加完成判断单元的判断结果为是, 则触发所 述生成单元执行相应功能, 当所述添加完成判断单元的判断结果为否, 则返回 所述顺序提取单元。
11、 根据权利要求 8所述的视频编码终端, 其特征在于, 所述编码单元包 括:
索引标识分配单元,用于为所述新的候选运动矢量集合中的每个运动矢量 分配索引标识;
运动矢量选择单元, 用于采用率失真优化准则 RDO从所述新的候选运动 矢量集合中选择用于编码的运动矢量;
编码操作单元, 用于将所述选择的运动矢量的索引标识,及根据所述选择 的运动矢量获得的信息编入码流。
12、 一种视频解码方法, 其特征在于, 包括:
获取当前编码块的初始候选运动矢量集合;
为所述初始候选运动矢量集合中的每一个运动矢量添加一个反向运动矢 量;
根据所述反向运动矢量和所述初始候选运动矢量集合中的运动矢量生成 新的候选运动矢量集合;
解析接收到的码流, 获得视频编码终端所选择的运动矢量的信息; 根据所述运动矢量的信息从所述新的候选运动矢量集合中选择相应的运 动矢量进行解码。
13、 根据权利要求 12所述的方法, 其特征在于, 所述获取当前编码块的 初始候选运动矢量集合包括:
根据当前编码块的周边编码块得到空域候选运动矢量;
根据参考帧得到所述当前编码块的时域候选运动矢量,所述参考帧为所述 当前编码块所在的当前帧的前一帧, 或后一帧, 或前一帧和后一帧;
将所述空域候选运动矢量和时域候选运动矢量组成初始运动矢量集合。
14、 根据权利要求 12所述的方法, 其特征在于, 所述为初始候选运动矢 量集合中的每一个运动矢量添加一个反向运动矢量具体为:根据预设运动模型 为初始候选运动矢量集合中的每一个运动矢量添加一个反向运动矢量;
所述预设运动模型包括: 勾速直线运动模型、 或加速运动模型。
15、 根据权利要求 12至 14任意一项所述的方法, 其特征在于, 所述为初 始候选运动矢量集合中的每一个运动矢量添加一个反向运动矢量包括:
判断所述初始候选运动矢量集合中是否只存在单方向的运动矢量; 若只存在单方向的运动矢量,则为所述单方向的运动矢量分别添加反向运 动矢量, 所述只存在单方向的运动矢量包括只存在前向运动矢量, 或者只存在 后向运动矢量;
若同时存在前向运动矢量和后向运动矢量,则分别为所述前向运动矢量添 加后向运动矢量作为其反向运动矢量,以及分别为所述后向运动矢量添加前向 运动矢量作为其反向运动矢量。
16、 根据权利要求 12至 14任意一项所述的方法, 其特征在于, 所述为所 述初始候选运动矢量集合中的每一个运动矢量添加一个反向运动矢量包括: 从所述初始候选运动矢量集合中顺序提取一个运动矢量;
为所述提取的运动矢量添加一个反向运动矢量, 其中, 若所提取的运动矢 量为前向运动矢量,则为所述提取的运动矢量添加一个后向运动矢量作为其反 向运动矢量, 若所提取的运动矢量为后向运动矢量, 则为所述提取的运动矢量 添加一个前向运动矢量作为其反向运动矢量;
判断是否完成对所述初始候选运动矢量集合中所有运动矢量添加反向运 动矢量, 若是, 则触发执行所述生成新的候选运动矢量集合的步骤; 否则, 返 回所述从所述初始候选运动矢量集合中顺序提取一个运动矢量的步骤。
17、 根据权利要求 12所述的方法, 其特征在于, 所述新的运动矢量集合 包括: 由前向运动矢量组成的前向候选运动矢量集合, 以及由后向运动矢量组 成的后向候选运动矢量集合。
18、 一种视频解码终端, 其特征在于, 包括:
获取单元, 用于获取当前编码块的初始候选运动矢量集合;
添加单元,用于为所述初始候选运动矢量集合中的每一个运动矢量添加一 个反向运动矢量;
生成单元,用于根据所述反向运动矢量和所述初始候选运动矢量集合中的 运动矢量生成新的候选运动矢量集合;
解析单元, 用于解析接收到的码流, 获得视频编码终端所选择的运动矢量 的信息;
解码单元,用于根据所述运动矢量的信息从所述新的候选运动矢量集合中 选择相应的运动矢量进行解码。
19、 根据权利要求 18所述的视频解码终端, 其特征在于, 所述添加单元 包括:
矢量方向判断单元,用于判断所述初始候选运动矢量集合中是否只存在单 方向的运动矢量;
运动矢量添加单元, 用于根据所述矢量方向判断单元的判断结果, 若只存 在单方向的运动矢量, 则为所述单方向的运动矢量分别添加反向运动矢量, 所 述只存在单方向的运动矢量包括只存在前向运动矢量,或者只存在后向运动矢 量; 若同时存在前向运动矢量和后向运动矢量, 则分别为所述前向运动矢量添 加后向运动矢量作为其反向运动矢量,以及分别为所述后向运动矢量添加前向 运动矢量作为其反向运动矢量。
20、 根据权利要求 18所述的视频解码终端, 其特征在于, 所述添加单元 包括:
矢量方向判断单元,用于判断所述初始候选运动矢量集合中是否只存在单 方向的运动矢量;
运动矢量添加单元, 用于根据所述矢量方向判断单元的判断结果, 若只存 在单方向的运动矢量, 则为所述单方向的运动矢量分别添加反向运动矢量, 所 述只存在单方向的运动矢量包括只存在前向运动矢量,或者只存在后向运动矢 量; 若同时存在前向运动矢量和后向运动矢量, 则分别为所述前向运动矢量添 加后向运动矢量作为其反向运动矢量,以及分别为所述后向运动矢量添加前向 运动矢量作为其反向运动矢量。
PCT/CN2011/084817 2011-01-10 2011-12-28 视频编码方法、解码方法及终端 WO2012094944A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201110004025.5A CN102595110B (zh) 2011-01-10 2011-01-10 视频编码方法、解码方法及终端
CN201110004025.5 2011-01-10

Publications (1)

Publication Number Publication Date
WO2012094944A1 true WO2012094944A1 (zh) 2012-07-19

Family

ID=46483267

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/084817 WO2012094944A1 (zh) 2011-01-10 2011-12-28 视频编码方法、解码方法及终端

Country Status (2)

Country Link
CN (1) CN102595110B (zh)
WO (1) WO2012094944A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105872545A (zh) * 2016-04-19 2016-08-17 电子科技大学 一种随机接入视频编码中层次化时域率失真优化方法

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107809642B (zh) 2015-02-16 2020-06-16 华为技术有限公司 用于视频图像编码和解码的方法、编码设备和解码设备
WO2019191867A1 (zh) * 2018-04-02 2019-10-10 华为技术有限公司 一种视频编解码方法和装置
CN110868602B (zh) * 2018-08-27 2024-04-12 华为技术有限公司 视频编码器、视频解码器及相应方法
CN111526369B (zh) * 2020-04-29 2022-09-09 Oppo广东移动通信有限公司 视频的运动估计方法、装置、电子设备和存储介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1615652A (zh) * 2002-01-17 2005-05-11 皇家飞利浦电子股份有限公司 用于估计当前运动矢量的单元和方法
CN1832575A (zh) * 2002-06-17 2006-09-13 株式会社东芝 视频编码/解码方法和设备
CN101841712A (zh) * 2010-04-28 2010-09-22 广西大学 面向全景视频编码的b帧扩展直接模式

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1615652A (zh) * 2002-01-17 2005-05-11 皇家飞利浦电子股份有限公司 用于估计当前运动矢量的单元和方法
CN1832575A (zh) * 2002-06-17 2006-09-13 株式会社东芝 视频编码/解码方法和设备
CN101841712A (zh) * 2010-04-28 2010-09-22 广西大学 面向全景视频编码的b帧扩展直接模式

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105872545A (zh) * 2016-04-19 2016-08-17 电子科技大学 一种随机接入视频编码中层次化时域率失真优化方法
CN105872545B (zh) * 2016-04-19 2019-03-29 电子科技大学 一种随机接入视频编码中层次化时域率失真优化方法

Also Published As

Publication number Publication date
CN102595110A (zh) 2012-07-18
CN102595110B (zh) 2015-04-29

Similar Documents

Publication Publication Date Title
JP5059433B2 (ja) 多視点動映像符号化装置及び方法
US9549181B2 (en) Method and apparatus for building motion vector list for motion vector prediction
JP5241500B2 (ja) カメラパラメータを利用した多視点動画符号化及び復号化装置並びに方法と、これを行うためのプログラムの記録された記録媒体
WO2012094944A1 (zh) 视频编码方法、解码方法及终端
JP2015165696A (ja) 映像復号化方法及び装置
JP2012165403A (ja) 多視点映像の符号化、復号化方法及び装置
US10165268B2 (en) Picture coding device, picture coding method and picture coding program as well as picture decoding device, picture decoding method, and picture decoding program
JP2009508388A (ja) 多視点動映像を符号化及び復号化する装置及び方法
CN113709458B (zh) 视频编解码中的位移矢量预测方法、装置及设备
US20230023369A1 (en) Video processing method, video processing apparatus, smart device, and storage medium
JP5586166B2 (ja) 階層的映像符号化のための参照フレーム管理装置および方法
CN112468816B (zh) 固定码率系数预测模型建立及视频编码的方法
JP5504363B2 (ja) 階層的映像符号化のための参照フレーム管理装置および方法
CN113676738B (zh) 一种三维点云的几何编解码方法及装置
KR102296987B1 (ko) 기계 학습 모델에 기초한 블록 체인을 이용한 hevc 분산형 복호화 방법, 장치 및 시스템
CN105323636A (zh) 一种视频处理方法及装置
US9491455B2 (en) Picture encoding method, picture decoding method, picture encoding apparatus, picture decoding apparatus, picture encoding program, and picture decoding program
CN103327340B (zh) 一种整数搜索方法及装置
WO2021093548A1 (zh) 视频解码及编码方法、装置、计算机可读介质及电子设备
CN111901591B (zh) 一种编码模式的确定方法、装置、服务器和存储介质
WO2012113276A1 (zh) 视频解码方法、编码方法及终端
WO2015188729A1 (zh) 视频编码方法和解码方法和相关装置
KR101756582B1 (ko) 병렬 프로세싱을 위한 적응적 타일 분할 방법 및 이를 이용한 비디오 부호화/복호화 방법
Cai et al. An efficient HEVC multi-rate encoding system based on× 265
CN115733988A (zh) 一种视频数据处理方法、装置、计算机设备以及存储介质

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

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

Country of ref document: EP

Kind code of ref document: A1