WO2012113276A1 - Video decoding method and encoding method, and terminal - Google Patents

Video decoding method and encoding method, and terminal Download PDF

Info

Publication number
WO2012113276A1
WO2012113276A1 PCT/CN2012/070505 CN2012070505W WO2012113276A1 WO 2012113276 A1 WO2012113276 A1 WO 2012113276A1 CN 2012070505 W CN2012070505 W CN 2012070505W WO 2012113276 A1 WO2012113276 A1 WO 2012113276A1
Authority
WO
WIPO (PCT)
Prior art keywords
candidate motion
motion vector
reference point
unit
vectors
Prior art date
Application number
PCT/CN2012/070505
Other languages
French (fr)
Chinese (zh)
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 WO2012113276A1 publication Critical patent/WO2012113276A1/en

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
    • H04N19/513Processing of motion vectors
    • H04N19/517Processing of motion vectors by encoding
    • H04N19/52Processing of motion vectors by encoding by predictive encoding
    • 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/56Motion estimation with initialisation of the vector search, e.g. estimating a good candidate to initiate a search
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/60Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding
    • H04N19/61Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using transform coding in combination with predictive coding

Definitions

  • Video decoding method encoding method and terminal
  • the present application relates to the field of communications technologies, and in particular, to a video decoding method, an encoding 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.
  • Three types, B, and I taking B frame as an example, which compresses the frame according to different points of the adjacent previous frame, the current frame, and the subsequent frame data, that is, the B frame can be based on the previous frame. And the next frame gets the motion vector set.
  • motion vector information of some coding blocks or decoding blocks is not written in the coded stream that is encoded or decoded, but the motion vector information is recovered by a certain search/derivation method. .
  • a decoding motion vector search derivation scheme in the prior art is: assuming that the current B frame to be decoded is fh, the previous frame and the next frame of fh are used as their reference frames, respectively, fn-1 And fn+l.
  • the candidate motion vector with the smallest matching error is used as the motion vector of the current coding block, or as the predicted motion vector for the current coding block reference.
  • the embodiment of the present invention provides a video decoding method, an encoding method, and a terminal, so as to solve the problem that the number of candidate motion vectors is large, resulting in frequent reading of memory and reduced encoding and decoding performance.
  • a video decoding method includes:
  • Decoding is performed according to the new candidate motion vector set.
  • a video decoding terminal includes:
  • An obtaining unit configured to acquire an initial candidate motion vector set of the current decoded block
  • a screening unit configured to remove candidate motion vectors that do not meet preset conditions from the initial candidate motion vector set, and the remaining candidate motion vectors form a new candidate motion vector set;
  • a decoding unit configured to perform decoding according to the new candidate motion vector set.
  • a video encoding method including:
  • Encoding is performed according to the new candidate motion vector set.
  • a video encoding terminal includes:
  • An acquiring unit configured to acquire an initial candidate motion vector set of the current coding block
  • a screening unit configured to remove candidate motion vectors that do not meet preset conditions from the initial candidate motion vector set, and the remaining candidate motion vectors form a new candidate motion vector set;
  • a coding unit configured to perform coding according to the new candidate motion vector set.
  • an initial candidate motion vector set of a current coding block or a decoding block is obtained, and candidate motion vectors that do not meet the preset condition are removed from the initial candidate motion vector set.
  • the remaining candidate motion vectors form a new candidate motion vector set, and are encoded or decoded according to the new candidate motion vector set.
  • some motion vectors may be removed from the candidate motion vector set according to preset conditions, and the number of candidate motion vectors is reduced.
  • FIG. 1A is a flowchart of a first embodiment of a video decoding method according to the present application.
  • FIG. 1B is a schematic diagram of motion vector selection of a decoding block in a B frame having a bidirectional motion compensation characteristic
  • FIG. 2A is a flowchart of a second embodiment of a video decoding method according to the present application
  • 2B is a schematic diagram of determining a center point in an embodiment of the present application.
  • 2C is a schematic diagram of a candidate motion vector in the embodiment of the present application.
  • 2D is a schematic diagram of adding a filtering window in the embodiment of the present application.
  • FIG. 3 is a flowchart of a third embodiment of a video decoding method of the present application.
  • FIG. 4 is a flowchart of a fourth embodiment of a video decoding method according to the present application.
  • FIG. 5 is a flowchart of a fifth embodiment of a video decoding method according to the present application.
  • FIG. 6 is a flowchart of an embodiment of a video encoding method of the present application.
  • FIG. 7A is a block diagram of an embodiment of a video decoding terminal of the present application.
  • Figure 7B is a block diagram of an embodiment of a screening unit of Figure 7A;
  • Figure 7C is a block diagram of an embodiment of another screening unit of Figure 7A;
  • Figure 7D is a block diagram of an embodiment of another screening unit of Figure 7A;
  • Figure 7E is a block diagram of an embodiment of another screening unit of Figure 7A;
  • FIG. 8 is a block diagram of an embodiment of a video encoding terminal of the present application.
  • the following embodiments of the present invention provide a video decoding method, an encoding method, and a terminal.
  • FIG. 1A a flowchart of a first embodiment of a video decoding method of the present application is as follows:
  • Step 101 Acquire an initial candidate motion vector set of the current decoded block.
  • the spatial domain candidate motion vector may be obtained according to the peripheral decoding block of the current decoding block, and the time domain candidate motion vector of the current decoding block is obtained according to the reference frame, where the reference frame is the previous frame of the current frame where the current decoding block is located, or the latter one.
  • the frame, or the previous frame and the subsequent frame form a spatial candidate motion vector and a time domain candidate motion vector into a set of initial candidate motion vectors.
  • a motion vector selection scheme for a decoded block in a B frame having a bidirectional motion compensation characteristic is shown.
  • the decoding block mv in the current frame is the current decoding block
  • the peripheral decoding block of the current decoding block mv generally refers to the left decoding block mva, the upper decoding block mvb, the upper right decoding block mvc of the mv shown in FIG.
  • the upper left decoding block mvd obtains the spatial candidate motion vector of the current decoding block mv according to the above decoding blocks mva, mvb, mvc, mvd; assuming that the reference frame is the previous frame in the current frame as an example, the current decoding block
  • the decoding block at the corresponding position of mv in the previous frame is mvcol
  • the four-neighbor and eight-neighbor decoding blocks of the corresponding mvcol are mvO to mv7, respectively
  • the time domain candidate motion vector of mv is obtained according to the above mvcol and mvO to mv7
  • the time domain candidate motion vector may also be obtained according to the decoding block mvcol' at the corresponding position in the next frame of the current decoding block mv and its four neighborhoods and eight neighborhood decoding blocks mvO, to mv7.
  • Step 102 Remove candidate motion vectors that do not meet the preset condition from the initial candidate motion vector set, and the remaining candidate motion vectors form a new candidate motion vector set.
  • the method for removing the candidate motion vector according to the preset condition may be multiple, including: calculating a reference point according to the candidate motion vector in the initial candidate motion vector set, and setting a filtering for selecting the candidate motion vector with the reference point as a center A window that removes candidate motion vectors that are not included in the filter window.
  • the reference points are calculated according to the candidate motion vectors in the initial candidate motion vector set, the distance between each candidate motion vector and the reference point is compared, and the candidate motion vectors whose distance is greater than the preset threshold are removed.
  • obtain the starting point position of the current decoded block and use the starting point position as a reference point, compare each The distance between the candidate motion vectors and the reference point, and the candidate motion vectors whose distance is greater than the preset threshold are removed.
  • each component vector sum being the sum of the absolute values of the horizontal motion vector and the vertical motion vector for each candidate motion vector, starting from the largest component vector sum, according to the component vector
  • a preset number of component vector sums are extracted, and the extracted component vectors and the corresponding candidate motion vectors are removed.
  • Step 103 Perform decoding according to the new candidate motion vector set.
  • the existing decoding end derivation technique may be used, for example, using the candidate motion vector in the new candidate motion vector set, and the reference decoding block of the current decoding block is respectively obtained in the front and rear reference frames.
  • the matching error may be the absolute error sum of each corresponding pixel between the two reference decoding blocks, and the motion vector with the smallest matching error is used as the motion vector of the current decoding block.
  • the motion vector with the smallest matching error is used as the motion vector of the current decoding block.
  • a predicted motion vector for reference to the current decoded block Obtaining a reference decoding block of the current decoded block according to the obtained motion vector or the predicted motion vector, and performing motion compensation on the decoding end to obtain a reconstructed value of the current decoded block.
  • the video encoding terminal uses a process of generating a new candidate motion vector set consistent with the video decoding terminal and selecting a motion vector as the motion vector of the current coding block or as a prediction motion vector for the current coding block reference.
  • the video encoding terminal may encode the difference between the selected motion vector and the real motion vector into the code stream, and transmit the code stream to the video decoding terminal. Therefore, after analyzing the code stream, the video decoding terminal can obtain the difference between the selected motion vector and the real motion vector, and add the selected motion vector and the difference to obtain the coded terminal real coded motion vector.
  • FIG. 2A a flowchart of a second embodiment of a video decoding method of the present application, which illustrates a process of removing candidate motion vectors by setting a filtering window:
  • Step 201 Acquire an initial candidate motion vector set of the current decoded block.
  • the spatial domain candidate motion vector may be obtained according to the peripheral decoding block of the current decoding block, according to
  • the reference frame obtains the time domain candidate motion vector of the current decoded block, and the reference frame is the previous frame of the current frame in which the current decoded block is located, or the next frame, or the previous frame and the subsequent frame, and the spatial domain candidate motion vector and the time domain are obtained.
  • the candidate motion vectors constitute a set of initial candidate motion vectors.
  • Step 202 Calculate a reference point according to the candidate motion vector in the initial candidate motion vector set.
  • the reference point may be a center point of all candidate motion vectors in the candidate motion vector set, or a center of gravity point of all candidate motion vectors in the candidate motion vector set, or a median point of all candidate motion vectors in the candidate motion vector set. The following describes how each reference point is obtained:
  • the average value of the horizontal motion vectors of all candidate motion vectors and the average of the vertical motion vectors of all candidate motion vectors are calculated, and the average of the horizontal motion vectors and the average of the vertical motion vectors are composed.
  • the point represented by the motion vector is taken as the center.
  • the point in the upper left corner of the rectangle formed by the current decoding block may be used as the origin of the vector coordinate system.
  • 2B is a schematic diagram of determining a center point in the embodiment of the present application.
  • FIG. 2C it is a schematic diagram of candidate motion vectors in an embodiment of the present application, where MV1 to MV7 are seven candidate motion vectors in the candidate motion vector set.
  • all candidate motion vectors in the candidate motion vector are sorted in descending order, and then the candidate motion vector is accumulated in descending order with the largest candidate motion vector as a starting point. Starting from the smallest candidate motion vector, the candidate motion vectors are accumulated in order from small to large, and the accumulation in the two directions cannot have overlapping candidate motion vectors until the difference between the two directions is the smallest, and this is selected. In the case where the result value is larger in the two directions, the point corresponding to the last accumulated motion vector is taken as the center of gravity.
  • all candidate motion vectors in the candidate motion vector are sorted in descending order, and then the point corresponding to the candidate motion vector in the middle is selected as the median point.
  • the candidate motion vector in the above embodiment is usually a two-dimensional candidate motion vector, so the center, the center of gravity, or the median value can usually be acquired separately according to the two dimensions.
  • Step 203 Set a filter window for selecting a candidate motion vector centering on the reference point. Centering on the reference point determined in step 202, a filtering window is set, and the size of the filtering window can be adaptively adjusted according to the size of the current decoding block.
  • Step 204 Remove candidate motion vectors that are not included in the filtering window, and the remaining candidate motion vectors constitute a new candidate motion vector set.
  • Step 205 Perform decoding according to the new candidate motion vector set.
  • FIG. 3 it is a flowchart of a third embodiment of a video decoding method according to the present application.
  • the embodiment shows a process for removing a candidate motion vector by comparing a distance from a reference point:
  • Step 301 Acquire an initial candidate motion vector set of the current decoded block.
  • the spatial domain candidate motion vector may be obtained according to the peripheral decoding block of the current decoding block, and the time domain candidate motion vector of the current decoding block is obtained according to the reference frame, where the reference frame is the previous frame of the current frame where the current decoding block is located, or the latter one.
  • the frame, or the previous frame and the subsequent frame form a spatial candidate motion vector and a time domain candidate motion vector into a set of initial candidate motion vectors.
  • Step 302 Calculate a reference point according to the candidate motion vector in the initial candidate motion vector set.
  • the process of calculating the reference point in this step is the same as step 202, and will not be repeated here.
  • Step 303 Compare the distance between each candidate motion vector and the reference point.
  • the distance between each candidate motion vector and the center is calculated separately, and the calculated distances are arranged in descending order, and the candidate motion vectors whose distance is greater than the threshold may be selected subsequently.
  • Step 304 Remove candidate motion vectors whose distance is greater than a preset threshold, and the remaining candidate motion vectors constitute a new candidate motion vector set.
  • Step 305 Perform decoding according to the new candidate motion vector set.
  • FIG. 4 it is a flowchart of a fourth embodiment of a video decoding method of the present application, which shows Another process of removing candidate motion vectors by comparing the distance from the reference point:
  • Step 401 Acquire an initial candidate motion vector set of the current decoded block.
  • the spatial domain candidate motion vector may be obtained according to the peripheral decoding block of the current decoding block, and the time domain candidate motion vector of the current decoding block is obtained according to the reference frame, where the reference frame is the previous frame of the current frame where the current decoding block is located, or the latter one.
  • the frame, or the previous frame and the subsequent frame form a spatial candidate motion vector and a time domain candidate motion vector into a set of initial candidate motion vectors.
  • Step 402 Obtain a starting point position of the current decoding block, and use the starting point position as a reference point.
  • the starting point position of the current decoding block is used as a reference point, and the starting point position generally refers to the position of the point in the upper left corner of the current decoding block.
  • the way of directly determining the reference point avoids the calculation of the reference point, and the speed of screening the candidate motion vector can be correspondingly improved.
  • Step 403 Compare the distance between each candidate motion vector and the reference point.
  • each candidate motion vector and the starting point of the current decoding block is calculated separately, and the calculated distances are arranged in descending order, and the candidate motion vectors whose distance is greater than the threshold may be selected subsequently.
  • Step 404 Remove candidate motion vectors whose distance is greater than a preset threshold, and the remaining candidate motion vectors constitute a new candidate motion vector set.
  • Step 405 Perform decoding according to the new candidate motion vector set.
  • FIG. 5 it is a flowchart of a fifth embodiment of a video decoding method according to the present application.
  • the embodiment shows a process of calculating a component vector and removing a candidate motion vector by using:
  • Step 501 Acquire an initial candidate motion vector set of the current decoded block.
  • the spatial domain candidate motion vector may be obtained according to the peripheral decoding block of the current decoding block, and the time domain candidate motion vector of the current decoding block is obtained according to the reference frame, where the reference frame is the previous frame of the current frame where the current decoding block is located, or the latter one.
  • the frame, or the previous frame and the subsequent frame form a spatial candidate motion vector and a time domain candidate motion vector into a set of initial candidate motion vectors.
  • Step 502 Calculate component sums of each candidate motion vector separately, and each component vector sum is the sum of the absolute values of the horizontal motion vector and the vertical motion vector for each candidate motion vector.
  • each candidate motion vector is calculated according to the following formula.
  • the component vector of the motion vector and:
  • mv_sadi is the component vector sum of the i-th candidate motion vector
  • mvi_x is the horizontal motion vector of the i-th candidate motion vector
  • mvi_y is the vertical motion vector of the i-th candidate motion vector. It is then sorted according to the calculated mv-sadi, for example, sorted from large to small.
  • Step 503 Extract a preset number of component vector sums according to the component vectors and the order from the largest component vector sum.
  • Step 504 The extracted component vector and the corresponding candidate motion vector are removed, and the remaining candidate motion vectors constitute a new candidate motion vector set.
  • Step 505 Perform decoding according to the new candidate motion vector set.
  • some motion vectors may be removed from the candidate motion vector set according to a preset condition, and in the case that the number of candidate motion vectors is reduced, the reconstructed pixels in the reference frame are obtained according to each candidate motion vector.
  • the amount of information is also reduced accordingly, thus reducing the frequency of memory reads, simplifying hardware design, and improving decoding performance.
  • the present application also provides an embodiment of a video encoding method. The manner in which the candidate motion vector set is generated in the video encoding process of the present application is consistent with the video decoding process, except that the video encoding process completes the video encoding according to the generated new candidate motion vector set.
  • FIG. 6 a flowchart of an embodiment of a video encoding method of the present application is as follows:
  • Step 601 Acquire an initial candidate motion vector set of the current coding block.
  • the spatial candidate motion vector may be obtained according to the peripheral coding block of the current coding block, and the time domain candidate motion vector of the current coding block is obtained according to the reference frame, where the reference frame is the previous frame of the current frame where the current coding block is located, or the latter
  • the frame, or the previous frame and the subsequent frame form a spatial candidate motion vector and a time domain candidate motion vector into a set of initial candidate motion vectors.
  • the method for removing the candidate motion vector according to the preset condition may be multiple, including: calculating a reference point according to the candidate motion vector in the initial candidate motion vector set, and setting a filtering for selecting the candidate motion vector with the reference point as a center A window that removes candidate motion vectors that are not included in the filter window.
  • the reference points are calculated according to the candidate motion vectors in the initial candidate motion vector set, the distance between each candidate motion vector and the reference point is compared, and the candidate motion vectors whose distance is greater than the preset threshold are removed.
  • obtain a starting point position of the current coding block use a starting point position as a reference point, compare a distance between each candidate motion vector and a reference point, and remove a candidate motion vector whose distance is greater than a preset threshold.
  • each component vector sum being the sum of the absolute values of the horizontal motion vector and the vertical motion vector for each candidate motion vector, starting from the largest component vector sum, according to the component vector
  • a preset number of component vector sums are extracted, and the extracted component vectors and the corresponding candidate motion vectors are removed.
  • Step 603 Perform coding according to the new candidate motion vector set.
  • the existing decoding end derivation technique may be used, for example, using the candidate motion vector in the new candidate motion vector set, and the reference coding block of the current coding block is respectively obtained in the front and rear reference frames.
  • Calculating a matching error between the reference code blocks before and after, for example, the matching error may be the absolute error sum of each corresponding pixel between the two reference code blocks, and the motion vector with the smallest matching error is used as the motion vector of the current coded block, Or as a predicted motion vector for reference to the current coding block.
  • the residual value of the reference code block is subtracted from the original value of the current coded block to obtain a residual value, and the residual value is encoded and transmitted to the decoding end.
  • the present application further provides a block diagram of an embodiment of a video decoding terminal and a video encoding terminal.
  • FIG. 7A is a block diagram of an embodiment of a video decoding terminal of the present application:
  • the video decoding terminal includes: an obtaining unit 710, an array selecting unit 720, and a decoding unit 730.
  • the obtaining unit 710 is configured to obtain an initial candidate motion vector set of the current decoding block
  • the filtering unit 720 is configured to remove candidate motion vectors that do not meet the preset condition from the initial candidate motion vector set, and the remaining candidate motion vectors. Composing a new set of candidate motion vectors;
  • the decoding unit 730 is configured to perform decoding according to the new candidate motion vector set.
  • FIG 7B a block diagram of an embodiment of a screening unit in Figure 7A:
  • the screening unit 720 can include:
  • a first reference point calculation unit 7211 configured to calculate a reference point according to the candidate motion vector in the initial candidate motion vector set; wherein, the reference point may be specifically a center point of all candidate motion vectors in the candidate motion vector set; or a center of gravity point of all candidate motion vectors in the candidate motion vector set; or a median point of all candidate motion vectors in the candidate motion vector set;
  • a filter window setting unit 7212 configured to set, by the reference point, a filter window for selecting a candidate motion vector
  • the first motion vector removing unit 7213 is configured to remove candidate motion vectors that are not included in the filtering window.
  • FIG 7C a block diagram of an embodiment of another screening unit in Figure 7A:
  • the screening unit 720 can include: a second reference point calculation unit 7221, configured to calculate a reference point according to the candidate motion vector in the initial candidate motion vector set; wherein, the reference point may be specifically a center point of all candidate motion vectors in the candidate motion vector set; or a center of gravity point of all candidate motion vectors in the candidate motion vector set; or a median point of all candidate motion vectors in the candidate motion vector set;
  • the first distance comparing unit 7222 is configured to compare a large distance between each candidate motion vector and the reference point;
  • the second motion vector removing unit 7223 is configured to remove the candidate motion vector whose distance is greater than a preset threshold.
  • FIG 7D a block diagram of an embodiment of another screening unit in Figure 7A:
  • the screening unit 720 can include:
  • a reference point obtaining unit 7231 configured to acquire a starting point position of the current decoding block, and use the starting point position as a reference point;
  • a second distance comparing unit 7232 configured to compare a distance between each candidate motion vector and the reference point
  • the third motion vector removing unit 7233 is configured to remove the candidate motion vector whose distance is greater than a preset threshold.
  • FIG. 7E a block diagram of an embodiment of another screening unit in Figure 7A:
  • the screening unit 720 can include:
  • a component vector sum calculation unit 7241 configured to separately calculate a component vector sum of each candidate motion vector, and each component vector sum is a sum of absolute values of a horizontal motion vector and a vertical motion vector for each candidate motion vector;
  • a component vector sum extraction unit 7242 configured to extract a preset number of component vector sums according to the component vector and the order from the largest component vector sum;
  • the fourth motion vector removing unit 7243 is configured to remove the extracted component vector and the corresponding candidate motion vector.
  • a block diagram of an embodiment of a video encoding terminal of the present application is as follows:
  • the video encoding terminal includes: an obtaining unit 810, a filtering unit 820, and an encoding unit 830.
  • the obtaining unit 810 is configured to obtain an initial candidate motion vector set of the current coding block
  • the filtering unit 820 is configured to remove candidate motion vectors that do not meet the preset condition from the initial candidate motion vector set, and the remaining candidate motion vectors. Composing a new set of candidate motion vectors;
  • the coding unit 830 is configured to perform coding according to the new candidate motion vector set.
  • the screening unit 820 can include (not shown in FIG. 8):
  • a first reference point calculation unit configured to calculate a reference point according to the candidate motion vector in the initial candidate motion vector set; and a filter window setting unit, configured to set, according to the reference point, a candidate motion vector to be selected a filter window; a first motion vector removing unit, configured to remove a candidate motion vector that is not included in the filter window; wherein the reference point may be specifically a center point of all candidate motion vectors in the candidate motion vector set; or a center of gravity point of all candidate motion vectors in the candidate motion vector set; or a median point of all candidate motion vectors in the candidate motion vector set; or a second reference point calculation unit, configured to use the initial candidate motion vector a candidate motion vector in the set calculates a reference point; a first distance comparing unit, configured to compare a distance between each candidate motion vector and the reference point; and a second motion vector removing unit, configured to remove the distance greater than a preset a candidate motion vector of a threshold; wherein the reference point may be specifically the candidate motion vector Set a central point for all
  • a reference point obtaining unit configured to acquire a starting point position of the current coding block, using the starting point position as a reference point
  • a second distance comparing unit configured to compare each candidate motion vector with the reference point
  • a third motion vector removing unit configured to remove the candidate motion vector whose distance is greater than a preset threshold
  • a component vector sum calculation unit for respectively calculating a component vector sum of each candidate motion vector, each component vector sum being a sum of absolute values of a horizontal motion vector and a vertical motion vector for each candidate motion vector; a component vector and an extracting unit And for extracting, from the largest component vector sum, a preset number of component vectors according to the component vector and the order of the largest and smallest, and a fourth motion vector removing unit, configured to remove the extracted component vector sum The corresponding candidate motion vector.
  • an initial candidate motion vector set of a current coding block or a decoding block is obtained, from the initial candidate motion vector set.
  • the candidate motion vectors that do not meet the preset condition are removed, and the remaining candidate motion vectors form a new candidate motion vector set, and are encoded or decoded according to the new candidate motion vector set.
  • some motion vectors may be removed from the candidate motion vector set according to preset conditions.
  • the number of candidate motion vectors is reduced, the number of reconstructed pixel information in the reference frame obtained according to each candidate motion vector is also reduced accordingly.
  • the reference blocks taken overlap each other, so that the reference block can be reused, thereby reducing the frequency of memory reading, simplifying hardware design, and improving codec performance.
  • the method of the embodiment of the present application can limit the reading under the premise of ensuring the coding performance.
  • the size of the memory Since the candidate motion vectors are likely to be reduced, and most of the candidate motion vectors are closely spaced, the selected regions of the candidate motion vectors can be defined to read the defined regions. For example, if there are currently 8 candidate motion vectors, which are close to each other, the reconstructed pixels may be overlapped according to the reference frame obtained by motion compensation according to the motion vector, and the reference in the buffer is transferred from the memory according to the defined region.
  • the frame reconstruction pixels are reduced; and since the defined regions are connected together, it is convenient to perform one-time reading without step-by-step reading according to the number of candidate motion vectors, thereby further simplifying the hardware design. Improve codec performance.
  • the techniques in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on such understanding, 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, which 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.
  • Video encoders, decoders are widely used in a variety of communication equipment or electronic equipment, such as: digital TV, set-top box, media gateway, mobile phone, wireless device, personal data assistant (PDA), handheld or portable computer, GPS receiver / navigator, camera, video player, camcorder, video recorder, surveillance equipment, video conferencing and video telephony equipment, etc.
  • PDA personal data assistant
  • Such devices include processors, memory, and interfaces for transmitting data.
  • Video codecs can be directly digital circuits or chips such as DSP (Digital Signal Processor) implementation, or software code to drive a processor to execute the process in the software code.
  • DSP Digital Signal Processor

Landscapes

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

Abstract

A video decoding method and encoding method, and a terminal. The decoding method comprises: acquiring an initial candidate motion vector set of a current block under decoding; removing candidate motion vectors not complying with a preset condition from the initial candidate motion vector set, and forming a new candidate motion vector set by use of remaining candidate motion vectors in the initial candidate motion vector set; and performing decoding according to the new candidate motion vector set. In the embodiment of the present application, some motion vectors can be removed, according to the preset condition, from the candidate motion vector set. On the condition that the number of the candidate motion vectors is decreased, the amount of information of reconstructed pixels in a reference frame obtained according to each candidate motion vector is decreased accordingly. Meanwhile, these candidate motion vectors are adjacent to each other, and selected reference blocks overlap each other, so that the reference blocks can be reused. As a result, the frequency of memory reading is decreased, hardware design is simplified, and encoding/decoding performance is improved.

Description

视频解码方法、 编码方法及终端  Video decoding method, encoding method and terminal
本申请要求于 2011 年 2 月 25 日提交中国专利局、 申请号为 201110046270.2、 发明名称为"视频解码方法、 编码方法及终端"的中国专利申 请的优先权, 其全部内容通过引用结合在本申请中。  The present application claims priority to Chinese Patent Application No. 201110046270.2, entitled "Video Decoding Method, Coding Method, and Terminal", filed on Feb. 25, 2011, the entire contents of in.
技术领域 Technical field
本申请涉及通信技术领域, 特别是涉及一种视频解码方法、 编码方法及终 端。  The present application relates to the field of communications technologies, and in particular, to a video decoding method, an encoding method, and a terminal.
背景技术 Background technique
运动预测和运动补偿是视频压缩中的重要技术,视频压缩码流中的一部分 比特用于传输运动矢量信息, 特别在低码率情况下, 对于高清视频来说, 用于 传输运动矢量信息所耗费的比特通常超过码流总比特数的百分之五十。针对连 续动态图像的视频编码, 将连续若干幅图像分成?、 B、 I三种类型, 以 B帧 为例, 其是^ ^据相邻的前一帧、 本帧以及后一帧数据的不同点来压缩本帧, 即 B帧可以根据其前一帧和后一帧获得运动矢量集合。因此,为了提高编码效率, 现有技术中在编码或解码的码流中不写入某些编码块或解码块的运动矢量信 息, 而是通过一定的搜索 /推导方法将这些运动矢量信息恢复出来。  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. For video encoding of continuous motion pictures, how many consecutive images are divided? Three types, B, and I, taking B frame as an example, which compresses the frame according to different points of the adjacent previous frame, the current frame, and the subsequent frame data, that is, the B frame can be based on the previous frame. And the next frame gets the motion vector set. Therefore, in order to improve coding efficiency, in the prior art, motion vector information of some coding blocks or decoding blocks is not written in the coded stream that is encoded or decoded, but the motion vector information is recovered by a certain search/derivation method. .
仍然以 B 帧为例, 现有技术中一种解码端运动矢量搜索推导方案为: 假 设当前待解码 B帧为 fh, fh的前一帧和后一帧作为其参考帧, 分别为 fn-1和 fn+l。 对于 B帧中的当前编码块, 获得其候选运动矢量集合, 根据候选运动矢 量集合中的每个候选运动矢量得到参考帧中的重建像素信息,通过推导重建像 素信息获得当前编码块的若干参考块,然后根据前后参考块之间的匹配误差计 算,将匹配误差最小的候选运动矢量作为当前编码块的运动矢量, 或者作为供 当前编码块参考的预测运动矢量。  Still taking the B frame as an example, a decoding motion vector search derivation scheme in the prior art is: assuming that the current B frame to be decoded is fh, the previous frame and the next frame of fh are used as their reference frames, respectively, fn-1 And fn+l. Obtaining a candidate motion vector set for the current coding block in the B frame, obtaining reconstructed pixel information in the reference frame according to each candidate motion vector in the candidate motion vector set, and obtaining several reference blocks of the current coding block by deriving the reconstructed pixel information Then, based on the matching error calculation between the front and rear reference blocks, the candidate motion vector with the smallest matching error is used as the motion vector of the current coding block, or as the predicted motion vector for the current coding block reference.
现有技术中, 当候选运动矢量集合中的候选运动矢量数量较多时, 在根据 每个候选运动矢量得到参考帧中重建像素信息后,需要频繁读取内存得到重建 像素信息, 以便推导出相应的参考块,读取的次数与所包含的候选运动矢量数 量一致。 由此可知, 候选运动矢量集合中的候选运动矢量越多, 则对内存的读 取越频繁, 由此提高了硬件设计难度, 降低了编解码的性能。 发明内容 In the prior art, when the number of candidate motion vectors in the candidate motion vector set is large, after reconstructing the pixel information in the reference frame obtained from each candidate motion vector, it is necessary to frequently read the memory to obtain reconstructed pixel information, so as to derive corresponding The reference block, the number of reads is consistent with the number of candidate motion vectors included. It can be seen that the more candidate motion vectors in the candidate motion vector set, the more frequently the memory is read, thereby improving the hardware design difficulty and reducing the performance of the codec. Summary of the invention
本申请实施例提供了一种视频解码方法、编码方法及终端, 以解决现有候 选运动矢量数量较多, 导致对内存的读取频繁, 降低编解码性能的问题。  The embodiment of the present invention provides a video decoding method, an encoding method, and a terminal, so as to solve the problem that the number of candidate motion vectors is large, resulting in frequent reading of memory and reduced encoding and decoding performance.
本申请实施例公开了如下技术方案:  The embodiment of the present application discloses the following technical solutions:
一种视频解码方法, 包括:  A video decoding method includes:
获取当前解码块的初始候选运动矢量集合;  Obtaining an initial candidate motion vector set of the current decoded block;
从所述初始候选运动矢量集合中去除不符合预设条件的候选运动矢量,剩 余的候选运动矢量组成新的候选运动矢量集合;  Removing candidate motion vectors that do not meet the preset condition from the initial candidate motion vector set, and remaining candidate motion vectors composing a new candidate motion vector set;
根据所述新的候选运动矢量集合进行解码。  Decoding is performed according to the new candidate motion vector set.
一种视频解码终端, 包括:  A video decoding terminal includes:
获取单元, 用于获取当前解码块的初始候选运动矢量集合;  An obtaining unit, configured to acquire an initial candidate motion vector set of the current decoded block;
筛选单元,用于从所述初始候选运动矢量集合中去除不符合预设条件的候 选运动矢量, 剩余的候选运动矢量组成新的候选运动矢量集合;  a screening unit, configured to remove candidate motion vectors that do not meet preset conditions from the initial candidate motion vector set, and the remaining candidate motion vectors form a new candidate motion vector set;
解码单元, 用于根据所述新的候选运动矢量集合进行解码。  And a decoding unit, configured to perform decoding according to the new candidate motion vector set.
一种视频编码方法, 包括:  A video encoding method, including:
获取当前编码块的初始候选运动矢量集合;  Obtaining an initial candidate motion vector set of the current coding block;
从所述初始候选运动矢量集合中去除不符合预设条件的候选运动矢量,剩 余的候选运动矢量组成新的候选运动矢量集合;  Removing candidate motion vectors that do not meet the preset condition from the initial candidate motion vector set, and remaining candidate motion vectors composing a new candidate motion vector set;
根据所述新的候选运动矢量集合进行编码。  Encoding is performed according to the new candidate motion vector set.
一种视频编码终端, 包括:  A video encoding terminal includes:
获取单元, 用于获取当前编码块的初始候选运动矢量集合;  An acquiring unit, configured to acquire an initial candidate motion vector set of the current coding block;
筛选单元,用于从所述初始候选运动矢量集合中去除不符合预设条件的候 选运动矢量, 剩余的候选运动矢量组成新的候选运动矢量集合;  a screening unit, configured to remove candidate motion vectors that do not meet preset conditions from the initial candidate motion vector set, and the remaining candidate motion vectors form a new candidate motion vector set;
编码单元, 用于根据所述新的候选运动矢量集合进行编码。  And a coding unit, configured to perform coding according to the new candidate motion vector set.
由上述实施例可以看出, 本申请实施例中编码和解码过程中, 获取当前编 码块或解码块的初始候选运动矢量集合,从初始候选运动矢量集合中去除不符 合预设条件的候选运动矢量, 剩余的候选运动矢量组成新的候选运动矢量集 合, 根据新的候选运动矢量集合进行编码或解码。 应用本申请实施例, 可以根 据预设条件从候选运动矢量集合中去除一些运动矢量,在候选运动矢量数量减 少的情况下 ,根据每个候选运动矢量得到参考帧中重建像素信息的数量也相应 减少, 同时由于这些候选运动矢量比较靠近, 所取的参考块相互重叠, 使得参 考块可以重复使用, 因此降低了对内存读取的频繁程度, 简化了硬件设计, 同 时提高了编解码性能。 附图说明 It can be seen from the foregoing embodiment that, in the encoding and decoding process in the embodiment of the present application, an initial candidate motion vector set of a current coding block or a decoding block is obtained, and candidate motion vectors that do not meet the preset condition are removed from the initial candidate motion vector set. The remaining candidate motion vectors form a new candidate motion vector set, and are encoded or decoded according to the new candidate motion vector set. Applying the embodiment of the present application, some motion vectors may be removed from the candidate motion vector set according to preset conditions, and the number of candidate motion vectors is reduced. In the case of less, the number of reconstructed pixel information in the reference frame obtained according to each candidate motion vector is also correspondingly reduced, and since the candidate motion vectors are relatively close, the reference blocks taken overlap each other, so that the reference block can be reused, thus reducing The frequency of memory reads simplifies hardware design and improves codec performance. DRAWINGS
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施 例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,对于本领 域普通技术人员而言,在不付出创造性劳动性的前提下,还可以根据这些附图 获得其他的附图。  In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below, and it will be apparent to those skilled in the art that In other words, other drawings can be obtained based on these drawings without paying for creative labor.
图 1A为本申请视频解码方法的第一实施例流程图;  1A is a flowchart of a first embodiment of a video decoding method according to the present application;
图 1B为具有双向运动补偿特性的 B帧中解码块的运动矢量选择示意图; 图 2A为本申请视频解码方法的第二实施例流程图;  1B is a schematic diagram of motion vector selection of a decoding block in a B frame having a bidirectional motion compensation characteristic; FIG. 2A is a flowchart of a second embodiment of a video decoding method according to the present application;
图 2B为本申请实施例中确定中心点的示意图;  2B is a schematic diagram of determining a center point in an embodiment of the present application;
图 2C为本申请实施例中候选运动矢量的示意图;  2C is a schematic diagram of a candidate motion vector in the embodiment of the present application;
图 2D为本申请实施例中增加过滤窗的示意图;  2D is a schematic diagram of adding a filtering window in the embodiment of the present application;
图 3为本申请视频解码方法的第三实施例流程图;  3 is a flowchart of a third embodiment of a video decoding method of the present application;
图 4为本申请视频解码方法的第四实施例流程图;  4 is a flowchart of a fourth embodiment of a video decoding method according to the present application;
图 5为本申请视频解码方法的第五实施例流程图;  FIG. 5 is a flowchart of a fifth embodiment of a video decoding method according to the present application;
图 6为本申请视频编码方法的实施例流程图;  6 is a flowchart of an embodiment of a video encoding method of the present application;
图 7A本申请视频解码终端的实施例框图;  7A is a block diagram of an embodiment of a video decoding terminal of the present application;
图 7B为图 7A中一种筛选单元的实施例框图;  Figure 7B is a block diagram of an embodiment of a screening unit of Figure 7A;
图 7C为图 7A中另一种筛选单元的实施例框图;  Figure 7C is a block diagram of an embodiment of another screening unit of Figure 7A;
图 7D为图 7A中另一种筛选单元的实施例框图;  Figure 7D is a block diagram of an embodiment of another screening unit of Figure 7A;
图 7E为图 7A中另一种筛选单元的实施例框图;  Figure 7E is a block diagram of an embodiment of another screening unit of Figure 7A;
图 8为本申请视频编码终端的实施例框图。  FIG. 8 is a block diagram of an embodiment of a video encoding terminal of the present application.
具体实施方式 detailed description
本发明如下实施例提供了一种视频解码方法、 编码方法及终端。  The following embodiments of the present invention provide a video decoding method, an encoding method, and a terminal.
为了使本技术领域的人员更好地理解本发明实施例中的技术方案,并使本 发明实施例的上述目的、特征和优点能够更加明显易懂, 下面结合附图对本发 明实施例中技术方案作进一步详细的说明。 参见图 1A, 为本申请视频解码方法的第一实施例流程图: In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, and to enable The above described objects, features and advantages of the embodiments of the present invention will be more apparent and understood. Referring to FIG. 1A, a flowchart of a first embodiment of a video decoding method of the present application is as follows:
步骤 101 : 获取当前解码块的初始候选运动矢量集合。  Step 101: Acquire an initial candidate motion vector set of the current decoded block.
具体的, 可以根据当前解码块的周边解码块得到空域候选运动矢量,根据 参考帧得到当前解码块的时域候选运动矢量,参考帧为当前解码块所在的当前 帧的前一帧, 或后一帧, 或前一帧和后一帧, 将空域候选运动矢量和时域候选 运动矢量组成初始候选运动矢量集合。  Specifically, the spatial domain candidate motion vector may be obtained according to the peripheral decoding block of the current decoding block, and the time domain candidate motion vector of the current decoding block is obtained according to the reference frame, where the reference frame is the previous frame of the current frame where the current decoding block is located, or the latter one. The frame, or the previous frame and the subsequent frame, form a spatial candidate motion vector and a time domain candidate motion vector into a set of initial candidate motion vectors.
参见图 1B, 为具有双向运动补偿特性的 B帧中解码块的运动矢量选择示 意图。 叚设当前帧中的解码块 mv为当前解码块, 则当前解码块 mv的周边解 码块通常指图 1B中示出的 mv的左侧解码块 mva、 上方解码块 mvb、 右上方 解码块 mvc、 左上方解码块 mvd, 才艮据上述解码块 mva、 mvb、 mvc、 mvd菝 得当前解码块 mv的空域候选运动矢量; 假设以参考帧为当前帧中的前一帧为 例,则当前解码块 mv在前一帧中对应位置处的解码块为 mvcol,相应的 mvcol 的四邻域及八邻域解码块分别为 mvO至 mv7 ,根据上述 mvcol和 mvO至 mv7 获 得 mv的时域候选运动矢量, 同理, 也可以根据当前解码块 mv在后一帧中对 应位置处的解码块 mvcol'及其四邻域及八邻域解码块 mvO,至 mv7,获得时域候 选运动矢量。  Referring to Fig. 1B, a motion vector selection scheme for a decoded block in a B frame having a bidirectional motion compensation characteristic is shown. The decoding block mv in the current frame is the current decoding block, and the peripheral decoding block of the current decoding block mv generally refers to the left decoding block mva, the upper decoding block mvb, the upper right decoding block mvc of the mv shown in FIG. 1B, The upper left decoding block mvd obtains the spatial candidate motion vector of the current decoding block mv according to the above decoding blocks mva, mvb, mvc, mvd; assuming that the reference frame is the previous frame in the current frame as an example, the current decoding block The decoding block at the corresponding position of mv in the previous frame is mvcol, and the four-neighbor and eight-neighbor decoding blocks of the corresponding mvcol are mvO to mv7, respectively, and the time domain candidate motion vector of mv is obtained according to the above mvcol and mvO to mv7, For example, the time domain candidate motion vector may also be obtained according to the decoding block mvcol' at the corresponding position in the next frame of the current decoding block mv and its four neighborhoods and eight neighborhood decoding blocks mvO, to mv7.
步骤 102: 从初始候选运动矢量集合中去除不符合预设条件的候选运动矢 量, 剩余的候选运动矢量组成新的候选运动矢量集合。  Step 102: Remove candidate motion vectors that do not meet the preset condition from the initial candidate motion vector set, and the remaining candidate motion vectors form a new candidate motion vector set.
其中, 根据预设条件去除候选运动矢量的方式可以有多种, 包括: 根据初始候选运动矢量集合中的候选运动矢量计算参考点,以参考点为中 心设置用于对候选运动矢量进行选择的过滤窗,去除未包含在过滤窗内的候选 运动矢量。  The method for removing the candidate motion vector according to the preset condition may be multiple, including: calculating a reference point according to the candidate motion vector in the initial candidate motion vector set, and setting a filtering for selecting the candidate motion vector with the reference point as a center A window that removes candidate motion vectors that are not included in the filter window.
或者,根据初始候选运动矢量集合中的候选运动矢量计算参考点, 比较每 个候选运动矢量与参考点之间的距离, 去除距离大于预设阈值的候选运动矢 量。  Alternatively, the reference points are calculated according to the candidate motion vectors in the initial candidate motion vector set, the distance between each candidate motion vector and the reference point is compared, and the candidate motion vectors whose distance is greater than the preset threshold are removed.
或者, 获取当前解码块的起始点位置, 将起始点位置作为参考点, 比较每 个候选运动矢量与参考点之间的距离, 去除距离大于预设阈值的候选运动矢 量。 Or, obtain the starting point position of the current decoded block, and use the starting point position as a reference point, compare each The distance between the candidate motion vectors and the reference point, and the candidate motion vectors whose distance is greater than the preset threshold are removed.
或者, 分别计算每个候选运动矢量的分量矢量和,每个分量矢量和为每个 候选运动矢量的水平运动矢量与垂直运动矢量的绝对值的和,从最大的分量矢 量和开始, 按照分量矢量和从大到小的顺序, 提取预设数量的分量矢量和, 去 除提取的分量矢量和所对应的候选运动矢量。  Or, respectively calculating a component vector sum of each candidate motion vector, each component vector sum being the sum of the absolute values of the horizontal motion vector and the vertical motion vector for each candidate motion vector, starting from the largest component vector sum, according to the component vector And in descending order, a preset number of component vector sums are extracted, and the extracted component vectors and the corresponding candidate motion vectors are removed.
上述列举了本申请实施例中优选的几种去除候选运动矢量的方式,需要说 明的是, 本申请实施例不限于上述几种方式, 无论设置何种预设条件, 其目的 都在于从候选运动矢量集合中去除一定数量的候选运动矢量,以达到减小内存 读取的目的。  The foregoing describes the preferred methods for removing candidate motion vectors in the embodiments of the present application. It should be noted that the embodiments of the present application are not limited to the foregoing manners, and no matter what preset conditions are set, the purpose is to select candidate motions. A certain number of candidate motion vectors are removed from the vector set to achieve the purpose of reducing memory reading.
步骤 103: 根据新的候选运动矢量集合进行解码。  Step 103: Perform decoding according to the new candidate motion vector set.
在得到新的候选运动矢量集合后,可以釆用现有的解码端推导技术,例如, 利用新的候选运动矢量集合中的候选运动矢量,在前后参考帧中分别得到当前 解码块的参考解码块,计算前后参考解码块之间的匹配误差, 比如该匹配误差 可以为两个参考解码块之间每个对应象素的绝对误差和,把匹配误差最小的运 动矢量作为当前解码块的运动矢量,或者作为供当前解码块参考的预测运动矢 量。根据得到的运动矢量或者预测运动矢量得到当前解码块的参考解码块,在 解码端完成运动补偿, 得到当前解码块的重建值。  After obtaining the new candidate motion vector set, the existing decoding end derivation technique may be used, for example, using the candidate motion vector in the new candidate motion vector set, and the reference decoding block of the current decoding block is respectively obtained in the front and rear reference frames. Calculating the matching error between the reference decoding blocks before and after the calculation, for example, the matching error may be the absolute error sum of each corresponding pixel between the two reference decoding blocks, and the motion vector with the smallest matching error is used as the motion vector of the current decoding block. Or as a predicted motion vector for reference to the current decoded block. Obtaining a reference decoding block of the current decoded block according to the obtained motion vector or the predicted motion vector, and performing motion compensation on the decoding end to obtain a reconstructed value of the current decoded block.
相应的 ,在视频编码终端釆用与视频解码终端一致生成新的候选运动矢量 集合以及从中选择运动矢量作为当前编码块的运动矢量,或者作为供当前编码 块参考的预测运动矢量的过程。视频编码终端可以将该选择的运动矢量与真实 运动矢量之间的差值编入码流, 并将码流传输到视频解码终端。 因此视频解码 终端分析该码流后,可以从中获取到选择的运动矢量与真实运动矢量之间的差 值, 将选择的运动矢量与差值相加即可得到编码终端真实编码运动矢量。 参见图 2A, 为本申请视频解码方法的第二实施例流程图, 该实施例示出 了通过设置过滤窗去除候选运动矢量的过程:  Correspondingly, the video encoding terminal uses a process of generating a new candidate motion vector set consistent with the video decoding terminal and selecting a motion vector as the motion vector of the current coding block or as a prediction motion vector for the current coding block reference. The video encoding terminal may encode the difference between the selected motion vector and the real motion vector into the code stream, and transmit the code stream to the video decoding terminal. Therefore, after analyzing the code stream, the video decoding terminal can obtain the difference between the selected motion vector and the real motion vector, and add the selected motion vector and the difference to obtain the coded terminal real coded motion vector. Referring to FIG. 2A, a flowchart of a second embodiment of a video decoding method of the present application, which illustrates a process of removing candidate motion vectors by setting a filtering window:
步骤 201 : 获取当前解码块的初始候选运动矢量集合。  Step 201: Acquire an initial candidate motion vector set of the current decoded block.
具体的, 可以根据当前解码块的周边解码块得到空域候选运动矢量,根据 参考帧得到当前解码块的时域候选运动矢量,参考帧为当前解码块所在的当前 帧的前一帧, 或后一帧, 或前一帧和后一帧, 将空域候选运动矢量和时域候选 运动矢量组成初始候选运动矢量集合。 Specifically, the spatial domain candidate motion vector may be obtained according to the peripheral decoding block of the current decoding block, according to The reference frame obtains the time domain candidate motion vector of the current decoded block, and the reference frame is the previous frame of the current frame in which the current decoded block is located, or the next frame, or the previous frame and the subsequent frame, and the spatial domain candidate motion vector and the time domain are obtained. The candidate motion vectors constitute a set of initial candidate motion vectors.
步骤 202: 根据初始候选运动矢量集合中的候选运动矢量计算参考点。 其中, 参考点可以为候选运动矢量集合中所有候选运动矢量的中心点, 或 者候选运动矢量集合中所有候选运动矢量的重心点,或者候选运动矢量集合中 所有候选运动矢量的中值点。 下面分别介绍每种参考点的获得方式:  Step 202: Calculate a reference point according to the candidate motion vector in the initial candidate motion vector set. The reference point may be a center point of all candidate motion vectors in the candidate motion vector set, or a center of gravity point of all candidate motion vectors in the candidate motion vector set, or a median point of all candidate motion vectors in the candidate motion vector set. The following describes how each reference point is obtained:
以参考点是中心为例, 计算所有候选运动矢量的水平运动矢量的平均值, 以及所有候选运动矢量的垂直运动矢量的平均值,将上述水平运动矢量的平均 值和垂直运动矢量的平均值组成的运动矢量所表示的点作为中心。本申请实施 例中, 可以以当前解码块所组成矩形的左上角的点作为矢量坐标系的原点。参 见图 2B, 为本申请实施例中确定中心点的示意图, 参见图 2C, 为本申请实施 例中候选运动矢量的示意图, 其中 MV1至 MV7为候选运动矢量集合中的七 个候选运动矢量。  Taking the reference point as the center, the average value of the horizontal motion vectors of all candidate motion vectors and the average of the vertical motion vectors of all candidate motion vectors are calculated, and the average of the horizontal motion vectors and the average of the vertical motion vectors are composed. The point represented by the motion vector is taken as the center. In the embodiment of the present application, the point in the upper left corner of the rectangle formed by the current decoding block may be used as the origin of the vector coordinate system. 2B is a schematic diagram of determining a center point in the embodiment of the present application. Referring to FIG. 2C, it is a schematic diagram of candidate motion vectors in an embodiment of the present application, where MV1 to MV7 are seven candidate motion vectors in the candidate motion vector set.
以参考点为重心为例 ,将候选运动矢量中的所有候选运动矢量按照从大到 小的顺序排序, 然后以最大的候选运动矢量为起点,按照从大到小的顺序累加 候选运动矢量, 同时以最小的候选运动矢量为起点,按照从小到大的顺序累加 候选运动矢量, 两个方向上的累加不能有重叠的候选运动矢量, 直到根据两个 方向所累加出来的结果差值最小,选取此时两个方向上累加结果值较大的一方 中, 最后累加的运动矢量所对应的点作为重心。  Taking the reference point as the center of gravity as an example, all candidate motion vectors in the candidate motion vector are sorted in descending order, and then the candidate motion vector is accumulated in descending order with the largest candidate motion vector as a starting point. Starting from the smallest candidate motion vector, the candidate motion vectors are accumulated in order from small to large, and the accumulation in the two directions cannot have overlapping candidate motion vectors until the difference between the two directions is the smallest, and this is selected. In the case where the result value is larger in the two directions, the point corresponding to the last accumulated motion vector is taken as the center of gravity.
以参考点为中值点为例 ,将候选运动矢量中的所有候选运动矢量按照从大 到小的顺序排序,然后从中选取排在中间的候选运动矢量所对应的点作为中值 点。  Taking the reference point as the median point as an example, all candidate motion vectors in the candidate motion vector are sorted in descending order, and then the point corresponding to the candidate motion vector in the middle is selected as the median point.
上述本实施例中的候选运动矢量通常为二维候选运动矢量, 因此中心、重 心、 或者中值通常可以根据两个维度单独进行获取。  The candidate motion vector in the above embodiment is usually a two-dimensional candidate motion vector, so the center, the center of gravity, or the median value can usually be acquired separately according to the two dimensions.
步骤 203: 以参考点为中心设置用于对候选运动矢量进行选择的过滤窗。 以步骤 202中确定的参考点为中心,设置一个过滤窗, 该过滤窗的大小可 以根据当前解码块的大小进行自适应调整。  Step 203: Set a filter window for selecting a candidate motion vector centering on the reference point. Centering on the reference point determined in step 202, a filtering window is set, and the size of the filtering window can be adaptively adjusted according to the size of the current decoding block.
以参考点为中心为例,将该中心作为原点,设置一个与解码块的长和宽一 致的过滤窗。 参见图 2D, 为本申请实施例中增加过滤窗的示意图。 步骤 204: 去除未包含在过滤窗内的候选运动矢量, 剩余的候选运动矢量 组成新的候选运动矢量集合。 Taking the reference point as the center, take the center as the origin and set a length and width of the decoded block. The filter window. Referring to FIG. 2D, it is a schematic diagram of adding a filtering window in the embodiment of the present application. Step 204: Remove candidate motion vectors that are not included in the filtering window, and the remaining candidate motion vectors constitute a new candidate motion vector set.
仍然结合图 2D进行描述, 在设置了过滤窗后, 其中候选运动矢量 MV1 至 MV6仍然位于过滤窗内, 而 MV7则位于过滤窗外, 表示 MV7不属于所设 定的候选运动矢量的选择范围内, 因此将 MV7从候选运动矢量集合中去除。  Still described in conjunction with FIG. 2D, after the filter window is set, wherein the candidate motion vectors MV1 to MV6 are still located in the filter window, and the MV7 is located outside the filter window, indicating that the MV7 does not belong to the selected candidate motion vector selection range. Therefore, MV7 is removed from the candidate motion vector set.
步骤 205: 根据新的候选运动矢量集合进行解码。  Step 205: Perform decoding according to the new candidate motion vector set.
具体根据新的候选运动矢量集合进行解码的过程与现有技术一致,其一般 性描述可参见前述步骤 103 , 在此不再赘述。 参见图 3 , 为本申请视频解码方法的第三实施例流程图, 该实施例示出了 一种通过比较与参考点之间距离去除候选运动矢量的过程:  The process of decoding according to the new candidate motion vector set is consistent with the prior art. For a general description, refer to the foregoing step 103, and details are not described herein again. Referring to FIG. 3, it is a flowchart of a third embodiment of a video decoding method according to the present application. The embodiment shows a process for removing a candidate motion vector by comparing a distance from a reference point:
步骤 301 : 获取当前解码块的初始候选运动矢量集合。  Step 301: Acquire an initial candidate motion vector set of the current decoded block.
具体的, 可以根据当前解码块的周边解码块得到空域候选运动矢量,根据 参考帧得到当前解码块的时域候选运动矢量,参考帧为当前解码块所在的当前 帧的前一帧, 或后一帧, 或前一帧和后一帧, 将空域候选运动矢量和时域候选 运动矢量组成初始候选运动矢量集合。  Specifically, the spatial domain candidate motion vector may be obtained according to the peripheral decoding block of the current decoding block, and the time domain candidate motion vector of the current decoding block is obtained according to the reference frame, where the reference frame is the previous frame of the current frame where the current decoding block is located, or the latter one. The frame, or the previous frame and the subsequent frame, form a spatial candidate motion vector and a time domain candidate motion vector into a set of initial candidate motion vectors.
步骤 302: 根据初始候选运动矢量集合中的候选运动矢量计算参考点。 本步骤中计算参考点的过程与步骤 202—致, 在此不再赘述。  Step 302: Calculate a reference point according to the candidate motion vector in the initial candidate motion vector set. The process of calculating the reference point in this step is the same as step 202, and will not be repeated here.
步骤 303: 比较每个候选运动矢量与参考点之间的距离。  Step 303: Compare the distance between each candidate motion vector and the reference point.
以参考点为中心为例, 分别计算每个候选运动矢量到该中心之间的距离, 将计算出来的距离按照从大到小的顺序排列,后续可以选择去除距离大于阈值 的候选运动矢量。  Taking the reference point as the center, the distance between each candidate motion vector and the center is calculated separately, and the calculated distances are arranged in descending order, and the candidate motion vectors whose distance is greater than the threshold may be selected subsequently.
步骤 304: 去除距离大于预设阈值的候选运动矢量, 剩余的候选运动矢量 组成新的候选运动矢量集合。  Step 304: Remove candidate motion vectors whose distance is greater than a preset threshold, and the remaining candidate motion vectors constitute a new candidate motion vector set.
步骤 305: 根据新的候选运动矢量集合进行解码。  Step 305: Perform decoding according to the new candidate motion vector set.
具体根据新的候选运动矢量集合进行解码的过程与现有技术一致,其一般 性描述可参见前述步骤 103 , 在此不再赘述。  The process of decoding according to the new candidate motion vector set is consistent with the prior art. For a general description, refer to the foregoing step 103, and details are not described herein again.
参见图 4, 为本申请视频解码方法的第四实施例流程图, 该实施例示出了 另一种通过比较与参考点之间距离去除候选运动矢量的过程: Referring to FIG. 4, it is a flowchart of a fourth embodiment of a video decoding method of the present application, which shows Another process of removing candidate motion vectors by comparing the distance from the reference point:
步骤 401 : 获取当前解码块的初始候选运动矢量集合。  Step 401: Acquire an initial candidate motion vector set of the current decoded block.
具体的, 可以根据当前解码块的周边解码块得到空域候选运动矢量,根据 参考帧得到当前解码块的时域候选运动矢量,参考帧为当前解码块所在的当前 帧的前一帧, 或后一帧, 或前一帧和后一帧, 将空域候选运动矢量和时域候选 运动矢量组成初始候选运动矢量集合。  Specifically, the spatial domain candidate motion vector may be obtained according to the peripheral decoding block of the current decoding block, and the time domain candidate motion vector of the current decoding block is obtained according to the reference frame, where the reference frame is the previous frame of the current frame where the current decoding block is located, or the latter one. The frame, or the previous frame and the subsequent frame, form a spatial candidate motion vector and a time domain candidate motion vector into a set of initial candidate motion vectors.
步骤 402: 获取当前解码块的起始点位置, 将该起始点位置作为参考点。 本实施例以当前解码块的起始点位置作为参考点,起始点位置通常指当前 解码块左上角的点所在的位置。 与前述实施例相比, 直接确定参考点的方式避 免了对参考点的计算, 可以相应提高筛选候选运动矢量的速度。  Step 402: Obtain a starting point position of the current decoding block, and use the starting point position as a reference point. In this embodiment, the starting point position of the current decoding block is used as a reference point, and the starting point position generally refers to the position of the point in the upper left corner of the current decoding block. Compared with the foregoing embodiment, the way of directly determining the reference point avoids the calculation of the reference point, and the speed of screening the candidate motion vector can be correspondingly improved.
步骤 403: 比较每个候选运动矢量与参考点之间的距离。  Step 403: Compare the distance between each candidate motion vector and the reference point.
分别计算每个候选运动矢量到该当前解码块的起始点之间的距离,将计算 出来的距离按照从大到小的顺序排列,后续可以选择去除距离大于阈值的候选 运动矢量。  The distance between each candidate motion vector and the starting point of the current decoding block is calculated separately, and the calculated distances are arranged in descending order, and the candidate motion vectors whose distance is greater than the threshold may be selected subsequently.
步骤 404: 去除距离大于预设阈值的候选运动矢量, 剩余的候选运动矢量 组成新的候选运动矢量集合。  Step 404: Remove candidate motion vectors whose distance is greater than a preset threshold, and the remaining candidate motion vectors constitute a new candidate motion vector set.
步骤 405: 根据新的候选运动矢量集合进行解码。  Step 405: Perform decoding according to the new candidate motion vector set.
具体根据新的候选运动矢量集合进行解码的过程与现有技术一致,其一般 性描述可参见前述步骤 103 , 在此不再赘述。 参见图 5 , 为本申请视频解码方法的第五实施例流程图, 该实施例示出了 通过计算分量矢量和去除候选运动矢量的过程:  The process of decoding according to the new candidate motion vector set is consistent with the prior art. For a general description, refer to the foregoing step 103, and details are not described herein again. Referring to FIG. 5, it is a flowchart of a fifth embodiment of a video decoding method according to the present application. The embodiment shows a process of calculating a component vector and removing a candidate motion vector by using:
步骤 501 : 获取当前解码块的初始候选运动矢量集合。  Step 501: Acquire an initial candidate motion vector set of the current decoded block.
具体的, 可以根据当前解码块的周边解码块得到空域候选运动矢量,根据 参考帧得到当前解码块的时域候选运动矢量,参考帧为当前解码块所在的当前 帧的前一帧, 或后一帧, 或前一帧和后一帧, 将空域候选运动矢量和时域候选 运动矢量组成初始候选运动矢量集合。  Specifically, the spatial domain candidate motion vector may be obtained according to the peripheral decoding block of the current decoding block, and the time domain candidate motion vector of the current decoding block is obtained according to the reference frame, where the reference frame is the previous frame of the current frame where the current decoding block is located, or the latter one. The frame, or the previous frame and the subsequent frame, form a spatial candidate motion vector and a time domain candidate motion vector into a set of initial candidate motion vectors.
步骤 502: 分别计算每个候选运动矢量的分量矢量和, 每个分量矢量和为 每个候选运动矢量的水平运动矢量与垂直运动矢量的绝对值的和。 假设有两个候选运动矢量, 分别为 mvO和 mvl , 则它们的水平运动矢量 分别是 mvO— X和 mvl— X , 垂直运动矢量分别是 mvO— y和 mvl— y, 然后按照如 下公式计算各个候选运动矢量的分量矢量和: Step 502: Calculate component sums of each candidate motion vector separately, and each component vector sum is the sum of the absolute values of the horizontal motion vector and the vertical motion vector for each candidate motion vector. Suppose there are two candidate motion vectors, mvO and mvl respectively, then their horizontal motion vectors are mvO-X and mvl-X, respectively, and the vertical motion vectors are mvO-y and mvl-y, respectively, and then each candidate is calculated according to the following formula. The component vector of the motion vector and:
mv_sadi = |mvi_x| + ||mvi_y |  Mv_sadi = |mvi_x| + ||mvi_y |
上式中, mv— sadi为第 i个候选运动矢量的分量矢量和, mvi— x为第 i个候 选运动矢量的水平运动矢量, mvi— y为第 i个候选运动矢量的垂直运动矢量。 然后根据计算出的 mv— sadi进行排序, 例如, 从大到小进行排序。  In the above formula, mv_sadi is the component vector sum of the i-th candidate motion vector, mvi_x is the horizontal motion vector of the i-th candidate motion vector, and mvi_y is the vertical motion vector of the i-th candidate motion vector. It is then sorted according to the calculated mv-sadi, for example, sorted from large to small.
步骤 503: 从最大的分量矢量和开始, 按照分量矢量和从大到小的顺序, 提取预设数量的分量矢量和。  Step 503: Extract a preset number of component vector sums according to the component vectors and the order from the largest component vector sum.
步骤 504: 去除提取的分量矢量和所对应的候选运动矢量, 剩余的候选运 动矢量组成新的候选运动矢量集合。  Step 504: The extracted component vector and the corresponding candidate motion vector are removed, and the remaining candidate motion vectors constitute a new candidate motion vector set.
步骤 505: 根据新的候选运动矢量集合进行解码。  Step 505: Perform decoding according to the new candidate motion vector set.
具体根据新的候选运动矢量集合进行解码的过程与现有技术一致,其一般 性描述可参见前述步骤 103 , 在此不再赘述。  The process of decoding according to the new candidate motion vector set is consistent with the prior art. For a general description, refer to the foregoing step 103, and details are not described herein again.
釆用上述本申请实施例中的解码方法,可以根据预设条件从候选运动矢量 集合中去除一些运动矢量,在候选运动矢量数量减少的情况下,根据每个候选 运动矢量得到参考帧中重建像素信息的数量也相应减少,因此降低了对内存读 取的频繁程度, 简化了硬件设计, 同时提高了解码性能。 与前述本申请视频解码方法实施例相对应,本申请还提供了视频编码方法 的实施例。本申请视频编码过程中生成候选运动矢量集合的方式与视频解码过 程一致,不同在于视频编码过程根据所生成的新的候选运动矢量集合完成视频 编码。  With the decoding method in the foregoing embodiment of the present application, some motion vectors may be removed from the candidate motion vector set according to a preset condition, and in the case that the number of candidate motion vectors is reduced, the reconstructed pixels in the reference frame are obtained according to each candidate motion vector. The amount of information is also reduced accordingly, thus reducing the frequency of memory reads, simplifying hardware design, and improving decoding performance. Corresponding to the foregoing video decoding method embodiment of the present application, the present application also provides an embodiment of a video encoding method. The manner in which the candidate motion vector set is generated in the video encoding process of the present application is consistent with the video decoding process, except that the video encoding process completes the video encoding according to the generated new candidate motion vector set.
参见图 6, 为本申请视频编码方法的实施例流程图:  Referring to FIG. 6, a flowchart of an embodiment of a video encoding method of the present application is as follows:
步骤 601 : 获取当前编码块的初始候选运动矢量集合。  Step 601: Acquire an initial candidate motion vector set of the current coding block.
具体的, 可以根据当前编码块的周边编码块得到空域候选运动矢量,根据 参考帧得到当前编码块的时域候选运动矢量,参考帧为当前编码块所在的当前 帧的前一帧, 或后一帧, 或前一帧和后一帧, 将空域候选运动矢量和时域候选 运动矢量组成初始候选运动矢量集合。 步骤 602: 从初始候选运动矢量集合中去除不符合预设条件的候选运动矢 量, 剩余的候选运动矢量组成新的候选运动矢量集合。 Specifically, the spatial candidate motion vector may be obtained according to the peripheral coding block of the current coding block, and the time domain candidate motion vector of the current coding block is obtained according to the reference frame, where the reference frame is the previous frame of the current frame where the current coding block is located, or the latter The frame, or the previous frame and the subsequent frame, form a spatial candidate motion vector and a time domain candidate motion vector into a set of initial candidate motion vectors. Step 602: Remove candidate motion vectors that do not meet the preset condition from the initial candidate motion vector set, and the remaining candidate motion vectors form a new candidate motion vector set.
其中, 根据预设条件去除候选运动矢量的方式可以有多种, 包括: 根据初始候选运动矢量集合中的候选运动矢量计算参考点,以参考点为中 心设置用于对候选运动矢量进行选择的过滤窗,去除未包含在过滤窗内的候选 运动矢量。  The method for removing the candidate motion vector according to the preset condition may be multiple, including: calculating a reference point according to the candidate motion vector in the initial candidate motion vector set, and setting a filtering for selecting the candidate motion vector with the reference point as a center A window that removes candidate motion vectors that are not included in the filter window.
或者,根据初始候选运动矢量集合中的候选运动矢量计算参考点, 比较每 个候选运动矢量与参考点之间的距离, 去除距离大于预设阈值的候选运动矢 量。  Alternatively, the reference points are calculated according to the candidate motion vectors in the initial candidate motion vector set, the distance between each candidate motion vector and the reference point is compared, and the candidate motion vectors whose distance is greater than the preset threshold are removed.
或者, 获取当前编码块的起始点位置, 将起始点位置作为参考点, 比较每 个候选运动矢量与参考点之间的距离, 去除距离大于预设阈值的候选运动矢 量。  Or, obtain a starting point position of the current coding block, use a starting point position as a reference point, compare a distance between each candidate motion vector and a reference point, and remove a candidate motion vector whose distance is greater than a preset threshold.
或者, 分别计算每个候选运动矢量的分量矢量和,每个分量矢量和为每个 候选运动矢量的水平运动矢量与垂直运动矢量的绝对值的和,从最大的分量矢 量和开始, 按照分量矢量和从大到小的顺序, 提取预设数量的分量矢量和, 去 除提取的分量矢量和所对应的候选运动矢量。  Or, respectively calculating a component vector sum of each candidate motion vector, each component vector sum being the sum of the absolute values of the horizontal motion vector and the vertical motion vector for each candidate motion vector, starting from the largest component vector sum, according to the component vector And in descending order, a preset number of component vector sums are extracted, and the extracted component vectors and the corresponding candidate motion vectors are removed.
上述列举了本申请实施例中优选的几种去除候选运动矢量的方式,需要说 明的是, 本申请实施例不限于上述几种方式, 无论设置何种预设条件, 其目的 都在于从候选运动矢量集合中去除一定数量的候选运动矢量,以达到减小内存 读取的目的。  The foregoing describes the preferred methods for removing candidate motion vectors in the embodiments of the present application. It should be noted that the embodiments of the present application are not limited to the foregoing manners, and no matter what preset conditions are set, the purpose is to select candidate motions. A certain number of candidate motion vectors are removed from the vector set to achieve the purpose of reducing memory reading.
步骤 603: 根据新的候选运动矢量集合进行编码。  Step 603: Perform coding according to the new candidate motion vector set.
在得到新的候选运动矢量集合后,可以釆用现有的解码端推导技术,例如, 利用新的候选运动矢量集合中的候选运动矢量,在前后参考帧中分别得到当前 编码块的参考编码块,计算前后参考编码块之间的匹配误差, 比如该匹配误差 可以为两个参考编码块之间每个对应象素的绝对误差和,把匹配误差最小的运 动矢量作为当前编码块的运动矢量,或者作为供当前编码块参考的预测运动矢 量。将当前编码块的原始值减去参考编码块对应的预测值得到残差值,对残差 值进行编码, 并传输到解码端。  After obtaining the new candidate motion vector set, the existing decoding end derivation technique may be used, for example, using the candidate motion vector in the new candidate motion vector set, and the reference coding block of the current coding block is respectively obtained in the front and rear reference frames. Calculating a matching error between the reference code blocks before and after, for example, the matching error may be the absolute error sum of each corresponding pixel between the two reference code blocks, and the motion vector with the smallest matching error is used as the motion vector of the current coded block, Or as a predicted motion vector for reference to the current coding block. The residual value of the reference code block is subtracted from the original value of the current coded block to obtain a residual value, and the residual value is encoded and transmitted to the decoding end.
上述编码过程中构建新的候选运动矢量集合的过程与前述解码方法的第 二至第五实施例一致, 在此不再赘述。 釆用上述本申请实施例中的编码方法, 可以根据预设条件从候选运动矢量集合中去除一些运动矢量,在候选运动矢量 数量减少的情况下 ,根据每个候选运动矢量得到参考帧中重建像素信息的数量 也相应减少, 同时由于这些候选运动矢量比较靠近, 所取的参考块相互重叠, 使得参考块可以重复使用, 因此降低了对内存读取的频繁程度, 简化了硬件设 计, 同时提高了编码性能。 与前述本申请视频解码方法和视频编码方法的实施例相对应,本申请还提 供了视频解码终端和视频编码终端的实施例框图。 The process of constructing a new candidate motion vector set in the above encoding process and the foregoing decoding method The second to fifth embodiments are identical, and are not described herein again. With the above encoding method in the embodiment of the present application, some motion vectors may be removed from the candidate motion vector set according to a preset condition, and in the case that the number of candidate motion vectors is reduced, the reconstructed pixels in the reference frame are obtained according to each candidate motion vector. The number of information is correspondingly reduced, and since the candidate motion vectors are relatively close, the reference blocks taken overlap each other, so that the reference block can be reused, thereby reducing the frequency of memory reading, simplifying hardware design, and improving. Coding performance. Corresponding to the foregoing embodiments of the video decoding method and the video encoding method of the present application, the present application further provides a block diagram of an embodiment of a video decoding terminal and a video encoding terminal.
参见图 7A, 为本申请视频解码终端的实施例框图:  7A is a block diagram of an embodiment of a video decoding terminal of the present application:
该视频解码终端包括: 获取单元 710、 陣选单元 720和解码单元 730。 其中, 获取单元 710, 用于获取当前解码块的初始候选运动矢量集合; 筛选单元 720, 用于从所述初始候选运动矢量集合中去除不符合预设条件 的候选运动矢量, 剩余的候选运动矢量组成新的候选运动矢量集合;  The video decoding terminal includes: an obtaining unit 710, an array selecting unit 720, and a decoding unit 730. The obtaining unit 710 is configured to obtain an initial candidate motion vector set of the current decoding block, and the filtering unit 720 is configured to remove candidate motion vectors that do not meet the preset condition from the initial candidate motion vector set, and the remaining candidate motion vectors. Composing a new set of candidate motion vectors;
解码单元 730, 用于根据所述新的候选运动矢量集合进行解码。 参见图 7B, 为图 7A中一种筛选单元的实施例框图:  The decoding unit 730 is configured to perform decoding according to the new candidate motion vector set. Referring to Figure 7B, a block diagram of an embodiment of a screening unit in Figure 7A:
该筛选单元 720可以包括:  The screening unit 720 can include:
第一参考点计算单元 7211 , 用于根据所述初始候选运动矢量集合中的候 选运动矢量计算参考点; 其中, 参考点可以具体为所述候选运动矢量集合中所 有候选运动矢量的中心点;或者所述候选运动矢量集合中所有候选运动矢量的 重心点; 或者, 所述候选运动矢量集合中所有候选运动矢量的中值点;  a first reference point calculation unit 7211, configured to calculate a reference point according to the candidate motion vector in the initial candidate motion vector set; wherein, the reference point may be specifically a center point of all candidate motion vectors in the candidate motion vector set; or a center of gravity point of all candidate motion vectors in the candidate motion vector set; or a median point of all candidate motion vectors in the candidate motion vector set;
过滤窗设定单元 7212, 用于以所述参考点为中心设置用于对候选运动矢 量进行选择的过滤窗;  a filter window setting unit 7212, configured to set, by the reference point, a filter window for selecting a candidate motion vector;
第一运动矢量去除单元 7213 , 用于去除未包含在所述过滤窗内的候选运 动矢量。 参见图 7C, 为图 7A中另一种筛选单元的实施例框图:  The first motion vector removing unit 7213 is configured to remove candidate motion vectors that are not included in the filtering window. Referring to Figure 7C, a block diagram of an embodiment of another screening unit in Figure 7A:
该筛选单元 720可以包括: 第二参考点计算单元 7221 , 用于根据所述初始候选运动矢量集合中的候 选运动矢量计算参考点; 其中, 参考点可以具体为所述候选运动矢量集合中所 有候选运动矢量的中心点;或者所述候选运动矢量集合中所有候选运动矢量的 重心点; 或者, 所述候选运动矢量集合中所有候选运动矢量的中值点; The screening unit 720 can include: a second reference point calculation unit 7221, configured to calculate a reference point according to the candidate motion vector in the initial candidate motion vector set; wherein, the reference point may be specifically a center point of all candidate motion vectors in the candidate motion vector set; or a center of gravity point of all candidate motion vectors in the candidate motion vector set; or a median point of all candidate motion vectors in the candidate motion vector set;
第一距离比较单元 7222, 用于比较每个候选运动矢量与所述参考点之间 的 巨离;  The first distance comparing unit 7222 is configured to compare a large distance between each candidate motion vector and the reference point;
第二运动矢量去除单元 7223 , 用于去除所述距离大于预设阈值的候选运 动矢量。 参见图 7D, 为图 7A中另一种筛选单元的实施例框图:  The second motion vector removing unit 7223 is configured to remove the candidate motion vector whose distance is greater than a preset threshold. Referring to Figure 7D, a block diagram of an embodiment of another screening unit in Figure 7A:
该筛选单元 720可以包括:  The screening unit 720 can include:
参考点获取单元 7231 , 用于获取所述当前解码块的起始点位置, 将所述 起始点位置作为参考点;  a reference point obtaining unit 7231, configured to acquire a starting point position of the current decoding block, and use the starting point position as a reference point;
第二距离比较单元 7232, 用于比较每个候选运动矢量与所述参考点之间 的距离;  a second distance comparing unit 7232, configured to compare a distance between each candidate motion vector and the reference point;
第三运动矢量去除单元 7233 , 用于去除所述距离大于预设阈值的候选运 动矢量。 参见图 7E, 为图 7A中另一种筛选单元的实施例框图:  The third motion vector removing unit 7233 is configured to remove the candidate motion vector whose distance is greater than a preset threshold. Referring to Figure 7E, a block diagram of an embodiment of another screening unit in Figure 7A:
该筛选单元 720可以包括:  The screening unit 720 can include:
分量矢量和计算单元 7241 , 用于分别计算每个候选运动矢量的分量矢量 和,每个分量矢量和为每个候选运动矢量的水平运动矢量与垂直运动矢量的绝 对值的和;  a component vector sum calculation unit 7241, configured to separately calculate a component vector sum of each candidate motion vector, and each component vector sum is a sum of absolute values of a horizontal motion vector and a vertical motion vector for each candidate motion vector;
分量矢量和提取单元 7242, 用于从最大的分量矢量和开始, 按照所述分 量矢量和从大到小的顺序, 提取预设数量的分量矢量和;  a component vector sum extraction unit 7242, configured to extract a preset number of component vector sums according to the component vector and the order from the largest component vector sum;
第四运动矢量去除单元 7243 , 用于去除所述提取的分量矢量和所对应的 候选运动矢量。 参见图 8, 为本申请视频编码终端的实施例框图: 该视频编码终端包括: 获取单元 810、 筛选单元 820和编码单元 830。 其中, 获取单元 810, 用于获取当前编码块的初始候选运动矢量集合; 筛选单元 820, 用于从所述初始候选运动矢量集合中去除不符合预设条件 的候选运动矢量, 剩余的候选运动矢量组成新的候选运动矢量集合; The fourth motion vector removing unit 7243 is configured to remove the extracted component vector and the corresponding candidate motion vector. Referring to FIG. 8, a block diagram of an embodiment of a video encoding terminal of the present application is as follows: The video encoding terminal includes: an obtaining unit 810, a filtering unit 820, and an encoding unit 830. The obtaining unit 810 is configured to obtain an initial candidate motion vector set of the current coding block, and the filtering unit 820 is configured to remove candidate motion vectors that do not meet the preset condition from the initial candidate motion vector set, and the remaining candidate motion vectors. Composing a new set of candidate motion vectors;
编码单元 830, 用于根据所述新的候选运动矢量集合进行编码。  The coding unit 830 is configured to perform coding according to the new candidate motion vector set.
具体的, 筛选单元 820可以包括(图 8中未示出):  Specifically, the screening unit 820 can include (not shown in FIG. 8):
第一参考点计算单元,用于根据所述初始候选运动矢量集合中的候选运动 矢量计算参考点; 过滤窗设定单元, 用于以所述参考点为中心设置用于对候选 运动矢量进行选择的过滤窗; 第一运动矢量去除单元,用于去除未包含在所述 过滤窗内的候选运动矢量; 其中,参考点可以具体为所述候选运动矢量集合中 所有候选运动矢量的中心点;或者所述候选运动矢量集合中所有候选运动矢量 的重心点; 或者所述候选运动矢量集合中所有候选运动矢量的中值点; 或者, 第二参考点计算单元,用于根据所述初始候选运动矢量集合中的候选运动 矢量计算参考点; 第一距离比较单元, 用于比较每个候选运动矢量与所述参考 点之间的距离; 第二运动矢量去除单元, 用于去除所述距离大于预设阈值的候 选运动矢量; 其中,参考点可以具体为所述候选运动矢量集合中所有候选运动 矢量的中心点; 或者所述候选运动矢量集合中所有候选运动矢量的重心点; 或 者所述候选运动矢量集合中所有候选运动矢量的中值点; 或者,  a first reference point calculation unit, configured to calculate a reference point according to the candidate motion vector in the initial candidate motion vector set; and a filter window setting unit, configured to set, according to the reference point, a candidate motion vector to be selected a filter window; a first motion vector removing unit, configured to remove a candidate motion vector that is not included in the filter window; wherein the reference point may be specifically a center point of all candidate motion vectors in the candidate motion vector set; or a center of gravity point of all candidate motion vectors in the candidate motion vector set; or a median point of all candidate motion vectors in the candidate motion vector set; or a second reference point calculation unit, configured to use the initial candidate motion vector a candidate motion vector in the set calculates a reference point; a first distance comparing unit, configured to compare a distance between each candidate motion vector and the reference point; and a second motion vector removing unit, configured to remove the distance greater than a preset a candidate motion vector of a threshold; wherein the reference point may be specifically the candidate motion vector Set a central point for all candidate motion vectors; or the center of gravity of the set of candidate motion vectors for all candidate motion vectors; or value point of all the candidate motion vector set in the candidate motion vectors; or
参考点获取单元, 用于获取所述当前编码块的起始点位置,将所述起始点 位置作为参考点; 第二距离比较单元, 用于比较每个候选运动矢量与所述参考 点之间的距离; 第三运动矢量去除单元, 用于去除所述距离大于预设阈值的候 选运动矢量; 或者,  a reference point obtaining unit, configured to acquire a starting point position of the current coding block, using the starting point position as a reference point; and a second distance comparing unit, configured to compare each candidate motion vector with the reference point a third motion vector removing unit, configured to remove the candidate motion vector whose distance is greater than a preset threshold; or
分量矢量和计算单元, 用于分别计算每个候选运动矢量的分量矢量和,每 个分量矢量和为每个候选运动矢量的水平运动矢量与垂直运动矢量的绝对值 的和; 分量矢量和提取单元, 用于从最大的分量矢量和开始, 按照所述分量矢 量和从大到小的顺序, 提取预设数量的分量矢量和; 第四运动矢量去除单元, 用于去除所述提取的分量矢量和所对应的候选运动矢量。  a component vector sum calculation unit for respectively calculating a component vector sum of each candidate motion vector, each component vector sum being a sum of absolute values of a horizontal motion vector and a vertical motion vector for each candidate motion vector; a component vector and an extracting unit And for extracting, from the largest component vector sum, a preset number of component vectors according to the component vector and the order of the largest and smallest, and a fourth motion vector removing unit, configured to remove the extracted component vector sum The corresponding candidate motion vector.
通过对以上实施方式的描述可知, 本申请实施例中编码和解码过程中, 获 取当前编码块或解码块的初始候选运动矢量集合,从初始候选运动矢量集合中 去除不符合预设条件的候选运动矢量,剩余的候选运动矢量组成新的候选运动 矢量集合, 根据新的候选运动矢量集合进行编码或解码。 应用本申请实施例, 可以根据预设条件从候选运动矢量集合中去除一些运动矢量,在候选运动矢量 数量减少的情况下 ,根据每个候选运动矢量得到参考帧中重建像素信息的数量 也相应减少, 同时由于这些候选运动矢量比较靠近, 所取的参考块相互重叠, 使得参考块可以重复使用, 因此降低了对内存读取的频繁程度, 简化了硬件设 计, 同时提高了编解码性能。 The description of the foregoing embodiment shows that, in the encoding and decoding process in the embodiment of the present application, an initial candidate motion vector set of a current coding block or a decoding block is obtained, from the initial candidate motion vector set. The candidate motion vectors that do not meet the preset condition are removed, and the remaining candidate motion vectors form a new candidate motion vector set, and are encoded or decoded according to the new candidate motion vector set. Applying the embodiments of the present application, some motion vectors may be removed from the candidate motion vector set according to preset conditions. When the number of candidate motion vectors is reduced, the number of reconstructed pixel information in the reference frame obtained according to each candidate motion vector is also reduced accordingly. At the same time, since the candidate motion vectors are relatively close, the reference blocks taken overlap each other, so that the reference block can be reused, thereby reducing the frequency of memory reading, simplifying hardware design, and improving codec performance.
进一步, 由于物体的运动存在规律性和时空相关性, 因此相邻编码块的运 动矢量往往局限于一个较小的范围,所以通过本申请实施例的方法可以在保证 编码性能的前提下限定读取内存的大小。 由于候选运动矢量有可能减少,且大 部分候选运动矢量距离很近, 因此可以限定候选运动矢量的选择区域,从而对 限定区域进行读取。 例如, 现在有 8个候选运动矢量, 其相互之间距离很近, 则根据运动矢量通过运动补偿得到的参考帧重建像素就有可能发生重叠,根据 限定的区域从内存中调入緩存中的参考帧重建像素就会减少;并且由于所限定 的区域连在一起, 因此可以便于进行一次性读取, 而不需要根据候选运动矢量 的数量进行分次读取的, 从而可以进一步简化硬件的设计, 提高编解码性能。 本领域的技术人员可以清楚地了解到本发明实施例中的技术可借助软件 加必需的通用硬件平台的方式来实现。基于这样的理解,本发明实施例中的技 术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现 出来, 该计算机软件产品可以存储在存储介质中, 如 ROM/RAM、 磁碟、 光盘 等, 包括若干指令用以使得一台计算机设备(可以是个人计算机, 服务器, 或 者网络设备等)执行本发明各个实施例或者实施例的某些部分所述的方法。  Further, since the motion of the object has a regularity and a space-time correlation, the motion vector of the adjacent coded block is often limited to a small range. Therefore, the method of the embodiment of the present application can limit the reading under the premise of ensuring the coding performance. The size of the memory. Since the candidate motion vectors are likely to be reduced, and most of the candidate motion vectors are closely spaced, the selected regions of the candidate motion vectors can be defined to read the defined regions. For example, if there are currently 8 candidate motion vectors, which are close to each other, the reconstructed pixels may be overlapped according to the reference frame obtained by motion compensation according to the motion vector, and the reference in the buffer is transferred from the memory according to the defined region. The frame reconstruction pixels are reduced; and since the defined regions are connected together, it is convenient to perform one-time reading without step-by-step reading according to the number of candidate motion vectors, thereby further simplifying the hardware design. Improve codec performance. It will be apparent to those skilled in the art that the techniques in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on such understanding, 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, which 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.
本发明实施例提供的技术可以应用在数字信号处理领域中,通过视频编码 器,解码器实现。视频编码器,解码器广泛应用于各种通讯设备或电子设备中, 例如:数字电视、机顶盒、媒体网关,移动电话,无线装置,个人数据助理( PDA ), 手持式或便携式计算机, GPS接收机 /导航器, 照相机, 视频播放器, 摄像机, 录像机, 监控设备, 视频会议和可视电话设备等等。 这类设备中包括处理器, 存储器, 以及传输数据的接口。视频编解码器可以直接由数字电路或芯片例如 DSP ( Digital Signal Processor ) 实现, 或者由软件代码驱动一处理器执行软件 代码中的流程而实现。 The technology provided by the embodiments of the present invention can be applied in the field of digital signal processing, and is implemented by a video encoder and a decoder. Video encoders, decoders are widely used in a variety of communication equipment or electronic equipment, such as: digital TV, set-top box, media gateway, mobile phone, wireless device, personal data assistant (PDA), handheld or portable computer, GPS receiver / navigator, camera, video player, camcorder, video recorder, surveillance equipment, video conferencing and video telephony equipment, etc. Such devices include processors, memory, and interfaces for transmitting data. Video codecs can be directly digital circuits or chips such as DSP (Digital Signal Processor) implementation, or software code to drive a processor to execute the process in the software code.
本说明书中的各个实施例均釆用递进的方式描述,各个实施例之间相同相 似的部分互相参见即可, 每个实施例重点说明的都是与其他实施例的不同之 处。 尤其, 对于系统实施例而言, 由于其基本相似于方法实施例, 所以描述的 比较简单, 相关之处参见方法实施例的部分说明即可。  The various embodiments in the specification are described in a progressive manner, and the same parts of the various embodiments may be referred to each other, and each embodiment focuses on differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.
以上所述的本发明实施方式, 并不构成对本发明保护范围的限定。任何在 本发明的精神和原则之内所作的修改、等同替换和改进等, 均应包含在本发明 的保护范围之内。  The embodiments of the present invention described above are not intended to limit the scope of the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and scope of the invention are intended to be included within the scope of the invention.

Claims

权 利 要 求 Rights request
1、 一种视频解码方法, 其特征在于, 包括:  A video decoding method, comprising:
获取当前解码块的初始候选运动矢量集合;  Obtaining an initial candidate motion vector set of the current decoded block;
从所述初始候选运动矢量集合中去除不符合预设条件的候选运动矢量 ,并 将所述初始候选运动矢量集合中剩余的候选运动矢量组成新的候选运动矢量 根据所述新的候选运动矢量集合进行解码。  Removing candidate motion vectors that do not meet the preset condition from the initial candidate motion vector set, and composing the remaining candidate motion vectors in the initial candidate motion vector set to form a new candidate motion vector according to the new candidate motion vector set Decode.
2、 根据权利要求 1所述的方法, 其特征在于, 所述从初始候选运动矢量 集合中去除不符合预设条件的候选运动矢量包括:  2. The method according to claim 1, wherein the removing the candidate motion vector that does not meet the preset condition from the initial candidate motion vector set comprises:
根据所述初始候选运动矢量集合中的候选运动矢量计算参考点; 以所述参考点为中心设置用于对候选运动矢量进行选择的过滤窗; 去除未包含在所述过滤窗内的候选运动矢量。  Calculating a reference point according to the candidate motion vector in the initial candidate motion vector set; setting a filter window for selecting the candidate motion vector centering on the reference point; removing the candidate motion vector not included in the filter window .
3、 根据权利要求 1所述的方法, 其特征在于, 所述从初始候选运动矢量 集合中去除不符合预设条件的候选运动矢量包括:  The method according to claim 1, wherein the removing the candidate motion vector that does not meet the preset condition from the initial candidate motion vector set comprises:
根据所述初始候选运动矢量集合中的候选运动矢量计算参考点; 比较每个候选运动矢量与所述参考点之间的距离;  Calculating reference points according to candidate motion vectors in the initial candidate motion vector set; comparing distances between each candidate motion vector and the reference point;
去除所述距离大于预设阈值的候选运动矢量。  The candidate motion vector whose distance is greater than a preset threshold is removed.
4、 根据权利要求 2或 3所述的方法, 其特征在于, 所述参考点包括: 所述候选运动矢量集合中所有候选运动矢量的中心点; 或者  The method according to claim 2 or 3, wherein the reference point comprises: a center point of all candidate motion vectors in the candidate motion vector set; or
所述候选运动矢量集合中所有候选运动矢量的重心点; 或者,  a center of gravity of all candidate motion vectors in the candidate motion vector set; or
所述候选运动矢量集合中所有候选运动矢量的中值点。  a median point of all candidate motion vectors in the set of candidate motion vectors.
5、 根据权利要求 1所述的方法, 其特征在于, 所述从初始候选运动矢量 集合中去除不符合预设条件的候选运动矢量包括:  The method according to claim 1, wherein the removing the candidate motion vector that does not meet the preset condition from the initial candidate motion vector set comprises:
获取所述当前解码块的起始点位置, 将所述起始点位置作为参考点; 比较每个候选运动矢量与所述参考点之间的距离;  Obtaining a starting point position of the current decoding block, using the starting point position as a reference point; comparing a distance between each candidate motion vector and the reference point;
去除所述距离大于预设阈值的候选运动矢量。  The candidate motion vector whose distance is greater than a preset threshold is removed.
6、 根据权利要求 1所述的方法, 其特征在于, 所述从初始候选运动矢量 集合中去除不符合预设条件的候选运动矢量包括:  The method according to claim 1, wherein the removing the candidate motion vector that does not meet the preset condition from the initial candidate motion vector set comprises:
分别计算每个候选运动矢量的分量矢量和,每个分量矢量和为每个候选运 动矢量的水平运动矢量与垂直运动矢量的绝对值的和; Calculate the component vector sum of each candidate motion vector separately, and each component vector sum is for each candidate The sum of the horizontal motion vector of the motion vector and the absolute value of the vertical motion vector;
从最大的分量矢量和开始,按照所述分量矢量和从大到小的顺序,提取预 设数量的分量矢量和;  Extracting a predetermined number of component vector sums from the largest component vector sum, in order of the component vectors and from largest to smallest;
去除所述提取的分量矢量和所对应的候选运动矢量。  The extracted component vector and the corresponding candidate motion vector are removed.
7、 一种视频解码终端, 其特征在于, 包括: 7. A video decoding terminal, comprising:
获取单元, 用于获取当前解码块的初始候选运动矢量集合;  An obtaining unit, configured to acquire an initial candidate motion vector set of the current decoded block;
筛选单元,用于从所述初始候选运动矢量集合中去除不符合预设条件的候 选运动矢量;  a filtering unit, configured to remove, from the initial candidate motion vector set, a candidate motion vector that does not meet a preset condition;
合并单元,用于将所述初始候选运动矢量集合中剩余的候选运动矢量组成 新的候选运动矢量集合;  a merging unit, configured to group the remaining candidate motion vectors in the initial candidate motion vector set into a new candidate motion vector set;
解码单元, 用于根据所述新的候选运动矢量集合进行解码。  And a decoding unit, configured to perform decoding according to the new candidate motion vector set.
8、 根据权利要求 7所述的终端, 其特征在于, 所述筛选单元包括: 第一参考点计算单元,用于根据所述初始候选运动矢量集合中的候选运动 矢量计算参考点;  The terminal according to claim 7, wherein the screening unit comprises: a first reference point calculating unit, configured to calculate a reference point according to candidate motion vectors in the initial candidate motion vector set;
过滤窗设定单元,用于以所述参考点为中心设置用于对候选运动矢量进行 选择的过滤窗;  a filter window setting unit, configured to set, by the reference point, a filter window for selecting a candidate motion vector;
第一运动矢量去除单元, 用于去除未包含在所述过滤窗内的候选运动矢 量。  A first motion vector removing unit is configured to remove candidate motion vectors that are not included in the filtering window.
9、 根据权利要求 7所述的终端, 其特征在于, 所述筛选单元包括: 第二参考点计算单元,用于根据所述初始候选运动矢量集合中的候选运动 矢量计算参考点;  The terminal according to claim 7, wherein the screening unit comprises: a second reference point calculating unit, configured to calculate a reference point according to candidate motion vectors in the initial candidate motion vector set;
第一距离比较单元, 用于比较每个候选运动矢量与所述参考点之间的距 离;  a first distance comparing unit, configured to compare a distance between each candidate motion vector and the reference point;
第二运动矢量去除单元, 用于去除所述距离大于预设阈值的候选运动矢 量。  And a second motion vector removing unit, configured to remove the candidate motion vector whose distance is greater than a preset threshold.
10、 根据权利要求 7所述的终端, 其特征在于, 所述筛选单元包括: 参考点获取单元, 用于获取所述当前解码块的起始点位置,将所述起始点 位置作为参考点; 第二距离比较单元, 用于比较每个候选运动矢量与所述参考点之间的距 离; The terminal according to claim 7, wherein the screening unit comprises: a reference point acquiring unit, configured to acquire a starting point position of the current decoding block, and use the starting point position as a reference point; a second distance comparing unit, configured to compare a distance between each candidate motion vector and the reference point;
第三运动矢量去除单元, 用于去除所述距离大于预设阈值的候选运动矢 量。  And a third motion vector removing unit, configured to remove the candidate motion vector whose distance is greater than a preset threshold.
11、 根据权利要求 7所述的终端, 其特征在于, 所述筛选单元包括: 分量矢量和计算单元, 用于分别计算每个候选运动矢量的分量矢量和,每 个分量矢量和为每个候选运动矢量的水平运动矢量与垂直运动矢量的绝对值 的和;  The terminal according to claim 7, wherein the screening unit comprises: a component vector and a calculating unit, configured to respectively calculate a component vector sum of each candidate motion vector, and each component vector sum is for each candidate The sum of the horizontal motion vector of the motion vector and the absolute value of the vertical motion vector;
分量矢量和提取单元, 用于从最大的分量矢量和开始,按照所述分量矢量 和从大到小的顺序, 提取预设数量的分量矢量和;  a component vector sum extracting unit, configured to extract a preset number of component vector sums according to the component vector and the order of the component vectors from the largest component vector sum;
第四运动矢量去除单元,用于去除所述提取的分量矢量和所对应的候选运 动矢量。  And a fourth motion vector removing unit, configured to remove the extracted component vector and the corresponding candidate motion vector.
12、 一种视频编码方法, 其特征在于, 包括: 12. A video encoding method, comprising:
获取当前编码块的初始候选运动矢量集合;  Obtaining an initial candidate motion vector set of the current coding block;
从所述初始候选运动矢量集合中去除不符合预设条件的候选运动矢量 ,并 将所述初始候选运动矢量集合中剩余的候选运动矢量组成新的候选运动矢量 根据所述新的候选运动矢量集合进行编码。  Removing candidate motion vectors that do not meet the preset condition from the initial candidate motion vector set, and composing the remaining candidate motion vectors in the initial candidate motion vector set to form a new candidate motion vector according to the new candidate motion vector set Encode.
13、 根据权利要求 12所述的方法, 其特征在于, 所述从初始候选运动矢 量集合中去除不符合预设条件的候选运动矢量包括:  The method according to claim 12, wherein the removing the candidate motion vector that does not meet the preset condition from the initial candidate motion vector set comprises:
根据所述初始候选运动矢量集合中的候选运动矢量计算参考点; 以所述参考点为中心设置用于对候选运动矢量进行选择的过滤窗; 去除未包含在所述过滤窗内的候选运动矢量。  Calculating a reference point according to the candidate motion vector in the initial candidate motion vector set; setting a filter window for selecting the candidate motion vector centering on the reference point; removing the candidate motion vector not included in the filter window .
14、 根据权利要求 12所述的方法, 其特征在于, 所述从初始候选运动矢 量集合中去除不符合预设条件的候选运动矢量包括:  The method according to claim 12, wherein the removing the candidate motion vector that does not meet the preset condition from the initial candidate motion vector set comprises:
根据所述初始候选运动矢量集合中的候选运动矢量计算参考点; 比较每个候选运动矢量与所述参考点之间的距离;  Calculating reference points according to candidate motion vectors in the initial candidate motion vector set; comparing distances between each candidate motion vector and the reference point;
去除所述距离大于预设阈值的候选运动矢量。 The candidate motion vector whose distance is greater than a preset threshold is removed.
15、 根据权利要求 13或 14所述的方法, 其特征在于, 所述参考点包括: 所述候选运动矢量集合中所有候选运动矢量的中心点; 或者 The method according to claim 13 or 14, wherein the reference point comprises: a center point of all candidate motion vectors in the candidate motion vector set; or
所述候选运动矢量集合中所有候选运动矢量的重心点; 或者,  a center of gravity of all candidate motion vectors in the candidate motion vector set; or
所述候选运动矢量集合中所有候选运动矢量的中值点。  a median point of all candidate motion vectors in the set of candidate motion vectors.
16、 根据权利要求 12所述的方法, 其特征在于, 所述从初始候选运动矢 量集合中去除不符合预设条件的候选运动矢量包括:  The method according to claim 12, wherein the removing the candidate motion vector that does not meet the preset condition from the initial candidate motion vector set comprises:
获取所述当前编码块的起始点位置 , 将所述起始点位置作为参考点; 比较每个候选运动矢量与所述参考点之间的距离;  Obtaining a starting point position of the current coding block, using the starting point position as a reference point; comparing a distance between each candidate motion vector and the reference point;
去除所述距离大于预设阈值的候选运动矢量。  The candidate motion vector whose distance is greater than a preset threshold is removed.
17、 根据权利要求 12所述的方法, 其特征在于, 所述从初始候选运动矢 量集合中去除不符合预设条件的候选运动矢量包括:  17. The method according to claim 12, wherein the removing the candidate motion vector that does not meet the preset condition from the initial candidate motion vector set comprises:
分别计算每个候选运动矢量的分量矢量和,每个分量矢量和为每个候选运 动矢量的水平运动矢量与垂直运动矢量的绝对值的和;  Calculating a sum of component vectors for each candidate motion vector, each component vector sum being the sum of the absolute values of the horizontal motion vector and the vertical motion vector for each candidate motion vector;
从最大的分量矢量和开始,按照所述分量矢量和从大到小的顺序,提取预 设数量的分量矢量和;  Extracting a predetermined number of component vector sums from the largest component vector sum, in order of the component vectors and from largest to smallest;
去除所述提取的分量矢量和所对应的候选运动矢量。  The extracted component vector and the corresponding candidate motion vector are removed.
18、 一种视频编码终端, 其特征在于, 包括: 18. A video encoding terminal, comprising:
获取单元, 用于获取当前编码块的初始候选运动矢量集合;  An acquiring unit, configured to acquire an initial candidate motion vector set of the current coding block;
筛选单元,用于从所述初始候选运动矢量集合中去除不符合预设条件的候 选运动矢量;  a filtering unit, configured to remove, from the initial candidate motion vector set, a candidate motion vector that does not meet a preset condition;
合并单元,用于将所述初始候选运动矢量集合中剩余的候选运动矢量组成 新的候选运动矢量集合;  a merging unit, configured to group the remaining candidate motion vectors in the initial candidate motion vector set into a new candidate motion vector set;
编码单元, 用于根据所述新的候选运动矢量集合进行编码。  And a coding unit, configured to perform coding according to the new candidate motion vector set.
19、 根据权利要求 18所述的终端, 其特征在于, 所述筛选单元包括: 第一参考点计算单元,用于根据所述初始候选运动矢量集合中的候选运动 矢量计算参考点;  The terminal according to claim 18, wherein the screening unit comprises: a first reference point calculating unit, configured to calculate a reference point according to candidate motion vectors in the initial candidate motion vector set;
过滤窗设定单元,用于以所述参考点为中心设置用于对候选运动矢量进行 选择的过滤窗; 第一运动矢量去除单元, 用于去除未包含在所述过滤窗内的候选运动矢 量。 a filter window setting unit, configured to set, by the reference point, a filter window for selecting a candidate motion vector; And a first motion vector removing unit, configured to remove a candidate motion vector that is not included in the filtering window.
20、 根据权利要求 18所述的终端, 其特征在于, 所述筛选单元包括: 第二参考点计算单元,用于根据所述初始候选运动矢量集合中的候选运动 矢量计算参考点;  The terminal according to claim 18, wherein the screening unit comprises: a second reference point calculating unit, configured to calculate a reference point according to candidate motion vectors in the initial candidate motion vector set;
第一距离比较单元, 用于比较每个候选运动矢量与所述参考点之间的距 离;  a first distance comparing unit, configured to compare a distance between each candidate motion vector and the reference point;
第二运动矢量去除单元, 用于去除所述距离大于预设阈值的候选运动矢 量。  And a second motion vector removing unit, configured to remove the candidate motion vector whose distance is greater than a preset threshold.
21、 根据权利要求 18所述的终端, 其特征在于, 所述筛选单元包括: 参考点获取单元, 用于获取所述当前编码块的起始点位置,将所述起始点 位置作为参考点;  The terminal according to claim 18, wherein the screening unit comprises: a reference point obtaining unit, configured to acquire a starting point position of the current coding block, and use the starting point position as a reference point;
第二距离比较单元, 用于比较每个候选运动矢量与所述参考点之间的距 离;  a second distance comparing unit, configured to compare a distance between each candidate motion vector and the reference point;
第三运动矢量去除单元, 用于去除所述距离大于预设阈值的候选运动矢 量。  And a third motion vector removing unit, configured to remove the candidate motion vector whose distance is greater than a preset threshold.
22、 根据权利要求 17所述的终端, 其特征在于, 所述筛选单元包括: 分量矢量和计算单元, 用于分别计算每个候选运动矢量的分量矢量和,每 个分量矢量和为每个候选运动矢量的水平运动矢量与垂直运动矢量的绝对值 的和;  The terminal according to claim 17, wherein the screening unit comprises: a component vector and a calculating unit, configured to respectively calculate component vector sums of each candidate motion vector, each component vector sum being each candidate The sum of the horizontal motion vector of the motion vector and the absolute value of the vertical motion vector;
分量矢量和提取单元, 用于从最大的分量矢量和开始,按照所述分量矢量 和从大到小的顺序, 提取预设数量的分量矢量和;  a component vector sum extracting unit, configured to extract a preset number of component vector sums according to the component vector and the order of the component vectors from the largest component vector sum;
第四运动矢量去除单元,用于去除所述提取的分量矢量和所对应的候选运 动矢量。  And a fourth motion vector removing unit, configured to remove the extracted component vector and the corresponding candidate motion vector.
PCT/CN2012/070505 2011-02-25 2012-01-18 Video decoding method and encoding method, and terminal WO2012113276A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201110046270.2 2011-02-25
CN201110046270.2A CN102651814B (en) 2011-02-25 2011-02-25 Video encoding/decoding method, coding method and terminal

Publications (1)

Publication Number Publication Date
WO2012113276A1 true WO2012113276A1 (en) 2012-08-30

Family

ID=46693698

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/070505 WO2012113276A1 (en) 2011-02-25 2012-01-18 Video decoding method and encoding method, and terminal

Country Status (2)

Country Link
CN (1) CN102651814B (en)
WO (1) WO2012113276A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20180111378A (en) * 2017-03-31 2018-10-11 주식회사 칩스앤미디어 A method of video processing providing independent properties between coding tree units and coding units, a method and appratus for decoding and encoding video using the processing.
CN114143554B (en) * 2018-09-13 2024-04-12 华为技术有限公司 Decoding method and device for predicting motion information

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101123728A (en) * 2006-08-08 2008-02-13 佳能株式会社 Motion vector detection apparatus and motion vector detection method
CN101860754A (en) * 2009-12-16 2010-10-13 香港应用科技研究院有限公司 Method and device for coding and decoding motion vector
CN101959067A (en) * 2010-09-26 2011-01-26 北京大学 Decision method and system in rapid coding mode based on epipolar constraint

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101123728A (en) * 2006-08-08 2008-02-13 佳能株式会社 Motion vector detection apparatus and motion vector detection method
CN101860754A (en) * 2009-12-16 2010-10-13 香港应用科技研究院有限公司 Method and device for coding and decoding motion vector
CN101959067A (en) * 2010-09-26 2011-01-26 北京大学 Decision method and system in rapid coding mode based on epipolar constraint

Also Published As

Publication number Publication date
CN102651814A (en) 2012-08-29
CN102651814B (en) 2015-11-25

Similar Documents

Publication Publication Date Title
TWI736906B (en) Mv precision refine
US11477463B2 (en) Component-dependent sub-block dividing
US10097826B2 (en) Method and device for generating a predicted value of an image using interpolation and motion vectors
CN109218733B (en) Method for determining prediction motion vector prediction and related equipment
TW201931854A (en) Unified merge candidate list usage
TW202044830A (en) Method, device, and system for determining prediction weight for merge mode
CN109922336B (en) Inter-frame prediction method and device for video data
KR20090094595A (en) Method and appratus for encoding images using motion prediction by multiple reference, and method and apparatus for decoding images using motion prediction by multiple reference
WO2019153861A1 (en) Bidirectional interframe prediction method and apparatus
CN111448800A (en) Affine motion prediction based image decoding method and apparatus using affine MVP candidate list in image coding system
CN109076234A (en) Image prediction method and relevant device
TW201230820A (en) Predictive image coding device, predictive image coding method, predictive image coding program, predictive image decoding device, predictive image decoding method, and predictive image decoding program
CN110876282A (en) Motion vector prediction method and related device
US11785248B2 (en) Affine motion prediction-based image decoding method and device using affine merge candidate list in image coding system
JP7257524B2 (en) Side motion refinement in video encoding/decoding systems
WO2020048205A1 (en) Method and apparatus for acquiring reference frame applied to bidirectional inter-frame prediction
CN117425015A (en) Method, apparatus and storage medium for video encoding
WO2019184556A1 (en) Bidirectional inter-frame prediction method and device
CN114827623A (en) Boundary extension for video coding and decoding
CN114466192A (en) Image/video super-resolution
CN113597769A (en) Video inter-frame prediction based on optical flow
WO2012122836A1 (en) Video encoding/decoding method and device
WO2012113276A1 (en) Video decoding method and encoding method, and terminal
WO2019233423A1 (en) Motion vector acquisition method and device
Ran et al. Distributed adaptive compressed video sensing using smoothed projected landweber reconstruction

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

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

Country of ref document: EP

Kind code of ref document: A1