CN104811739A - H.264 rapid interpolation method based on movement compensation - Google Patents

H.264 rapid interpolation method based on movement compensation Download PDF

Info

Publication number
CN104811739A
CN104811739A CN201510205008.6A CN201510205008A CN104811739A CN 104811739 A CN104811739 A CN 104811739A CN 201510205008 A CN201510205008 A CN 201510205008A CN 104811739 A CN104811739 A CN 104811739A
Authority
CN
China
Prior art keywords
interpolation
vertical direction
coefficient
pixels
carrying
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201510205008.6A
Other languages
Chinese (zh)
Inventor
王巍
胡洁
颜琳淑
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chongqing University of Post and Telecommunications
Original Assignee
Chongqing University of Post and Telecommunications
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 Chongqing University of Post and Telecommunications filed Critical Chongqing University of Post and Telecommunications
Priority to CN201510205008.6A priority Critical patent/CN104811739A/en
Publication of CN104811739A publication Critical patent/CN104811739A/en
Pending legal-status Critical Current

Links

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The invention relates to an H.264 rapid interpolation method based on movement compensation and belongs to the technical field of video encoding. The H.264 rapid interpolation method comprises the following steps: (1) carrying out interpolation on four adjacent integer pixel points in the horizontal direction by a four-order filter with the coefficient of (-1, 5, 5, -1) to obtain a middle value; carrying out addition and displacement calculation to obtain a predicated value; (2) with regard to 1/2 pixels in the vertical direction, carrying out the interpolation on four adjacent integer pixel points in the vertical direction by the four-order filter with the coefficient of (-1, 5, 5, -1) to obtain a middle value; carrying out addition and displacement calculation to obtain a predicated value; and (3) with regard to 1/2 pixels in the diagonal line direction, carrying out the interpolation on four adjacent integer pixel points in the horizontal or vertical direction by the four-order filter with the coefficient of (-1, 5, 5, -1) to obtain a middle value; carrying out addition and displacement calculation to obtain a predicated value and carrying out addition and displacement processing to obtain a predicated value. Compared with a traditional method, the calculation time can be improved, the calculation complexity is reduced and the resource consumption of hardware is reduced.

Description

A kind of H.264 Fast Interpolation method based on motion compensation
Technical field
The invention belongs to technical field of video coding, relate to a kind of H.264 Fast Interpolation method based on motion compensation.
Background technology
Along with developing rapidly of information network technique, video conference, video telephone, Digital Television etc. increase day by day to the demand of HD video, and video compression becomes the key technology that data store and transmit.At present, H.264 ISO/IEC image motion expert group and ITU-T Video Coding Experts group have formulated the video compression standard of latest generation.With previous JPEG, MPEG-2/4, H.261 compare with the video compression standard such as H.263, H.264 propose much new thought and algorithm, increased substantially efficiency and the picture quality of video compression.
H.264 encoder has excellent performance, but it with high computational complexity for cost, and inter prediction is exactly the part that wherein complexity is the highest, is also maximum part consuming time.Its object is to eliminate the time redundancy in video image, directly affects the quality of coding efficiency and image.Therefore the code efficiency improving inter prediction becomes the problem needing to solve.
Motion compensation is H.264/AVC important in video encoding standard part, and the motion compensation of fraction pixel is wherein the most complicated part.Therefore improve the operation time of fraction pixel, the complexity reducing computing is particularly important.H.264/AVC video encoding and decoding standard of new generation, the joint video team JVT be jointly made up of the expert of ITU-TVCEG and ISO/IEC MPEG (Joint Video Team) development and the video of new generation formulated compile international standard.Compared with coding standard in the past, H.264/AVC have employed many new features, comprise the motion compensation of variable-block size, the motion compensation of 1/4th pixels, motion compensation of multi-reference frame etc.Standard before the ratio of the compression efficiency H.264/AVC on different bit rates and video resolution that these new features make improves 50%.
In cataloged procedure H.264, motion compensation occupies the overwhelming majority of whole scramble time, and the time major part of motion compensation all consumes in the Interpolation Process of sub-pixel.H.264/AVC support the interpolation arithmetic of 1/2nd pixels and 1/4th pixels, add the read volume of interpolation arithmetic time and integer position reference pixel.And the increase of reference pixel read volume makes the visit capacity of exterior storage increase, this adds increased the performance such as real-time and power consumption of whole cataloged procedure.Fractional-pel motion compensation calculation is complicated large, hinders the raising of code efficiency H.264.In other patents, propose employing 6 rank FIR filter to design motion predication, its weighted value is chosen for (1/32 ,-5/32,5/8,5/8 ,-5/32,1/32).Also have and three class pipeline design has been carried out to 6 rank FIR filter, thus further reduce critical path, improve the speed of service of system.And the optimization to interpolation algorithm hardware configuration, be the performance optimizing it to a certain extent, improve the accuracy of computing; , a large amount of hardware consumptions, causes the reduction of arithmetic speed, the prolongation in cycle operation time, and these problems all await solving.
Summary of the invention
In view of this, the object of the present invention is to provide a kind of H.264 Fast Interpolation method based on motion compensation, the method while improving operation time, can reduce computation complexity, reduces the resource consumption of hardware.
For achieving the above object, the invention provides following technical scheme:
A kind of H.264 Fast Interpolation method based on motion compensation, 6 rank filtering used for calculating half-pix in traditional motion compensated interpolation algorithm are improved to 4 rank filtering by the method, and employ the mode of the input of parallel pipeline, disposable 12 pixels that can process input, can improve the efficiency of whole algorithm;
Specifically comprise the following steps:
Step one: with the 4 rank filters that coefficient is (-1,5,5 ,-1), interpolation is carried out to 4 integer pixel points adjacent in horizontal direction, first obtain median, then through addition, shift operation, obtain predicted value;
Step 2: for 1/2nd pixels of vertical direction is (-1,5 with coefficient, 5 ,-1) 4 rank filters carry out interpolation to 4 integer pixel points adjacent in vertical direction, first obtain median, then through addition, shift operation, predicted value is obtained;
Step 3: for 1/2nd pixels of diagonal, be (-1 with coefficient, 5,5,-1) 4 rank filters carry out interpolation in horizontal or vertical direction to adjacent 4 1/2nd pixel medians, first obtain median, and then addition is carried out to median, shifting processing obtains predicted value.
Beneficial effect of the present invention is: compared to conventional method, and this method while improving operation time, can reduce computation complexity, reduces the resource consumption of hardware.
Accompanying drawing explanation
In order to make object of the present invention, technical scheme and beneficial effect clearly, the invention provides following accompanying drawing and being described:
Fig. 1 is the interpolation graphs of H.264 middle brightness fraction pixel;
Fig. 2 is the interpolation of H.264 middle brightness half-pix;
Fig. 3 is the interpolation of H.264 middle brightness 1/4 pixel.
Embodiment
By contrast, the workflow of primal algorithm is as follows: first, and the integer position of optimum Match is found in the motion compensation performed on integer pixel; Secondly, the half-pix of optimum Match is found in the motion compensation of half-pix according to the optimum integer pixel around it; 3rd, 1/4 pixel of optimum Match is found in the motion compensation of 1/4 pixel around according to best half-pix.
6 rank filtering used for calculating half-pix in traditional motion compensated interpolation algorithm are improved to 4 rank filtering by method of the present invention, and employ the mode of the input of parallel pipeline, disposable 12 pixels that can process input, can improve the efficiency of whole algorithm.
This method specifically comprises the following steps: step one: carry out interpolation with the 4 rank filters that coefficient is (-1,5,5 ,-1) to 4 integer pixel points adjacent in horizontal direction, first obtain median, then through addition, shift operation, obtain predicted value; Step 2: for 1/2nd pixels of vertical direction is (-1,5 with coefficient, 5 ,-1) 4 rank filters carry out interpolation to 4 integer pixel points adjacent in vertical direction, first obtain median, then through addition, shift operation, predicted value is obtained; Step 3: for 1/2nd pixels of diagonal, be (-1 with coefficient, 5,5,-1) 4 rank filters carry out interpolation in horizontal or vertical direction to adjacent 4 1/2nd pixel medians, first obtain median, and then addition is carried out to median, shifting processing obtains predicted value.
The invention provides the interpolating unit method for designing of motion compensation, specific as follows:
(1) motion vector of 7 variable-blocks (16 × 16,16 × 8,8 × 16,8 × 8,8 × 4,4 × 8,4 × 4) and 1/4th pixel precisions is H.264/AVC comprised.
(2) H.264/AVC the integer position of optimum Match is found in the motion compensation first performed in the process performed on integer pixel.The second, the half-pix of optimum Match is found in the motion compensation of half-pix according to the optimum integer pixel around it.3rd, 1/4th pixels of optimum Match are found in the motion compensation of 1/4th pixels around according to best half-pix.
(3) half-pix and 1/4th pixels are not be present in primitive frame at the very start, must be calculated by filtering interpolation.In standard H.264/AVC, half-pix is obtained in horizontal and vertical direction calculating respectively by the Weiner filter of 6 taps.
(4) half-pix in horizontal and vertical direction is calculated its median by 6 tap FIR filters according to its 6 contiguous integer pixel, then span is limited between [0,255].
b 1=E-5F+20G+20H-5I+J.
h 1=A-5C+20G+20M-5R+T.
b=Clip((b 1+16)>>5)
h=Clip((h 1+16)>>5).
(5) half-pix of diagonal carries out horizontal or vertical direction 6 rank filter coefficients according to the half-pix that it closes on and calculates.
j 1=cc-5dd+20h 1+20m 1-5ee+ff.
j 1=aa-5bb+20b 1+20s 1-5gg+hh
j=Clip((j 1+512)>>10)
(6) in order to reduce the complexity of system, for the improvement of the interpolation algorithm of the pixel in 1/2nd horizontal directions, be (-1 with coefficient, 5,5 ,-1) 4 rank filters carry out interpolation to 4 integer pixel points adjacent in horizontal direction, first obtain median:
b 1=(-1)×F+5×G+5×H+(-1)×R
Then through addition, shift operation, predicted value is obtained:
b=Clip((b 1+4)>>3)
(7) 1/2nd pixels of vertical direction, are that the 4 rank filters of (-1,5,5 ,-1) carry out interpolation to 4 integer pixel points adjacent in vertical direction with coefficient, first obtain median:
h 1=(-1)×C+5×G+5×M+(-1)×R
Then addition is carried out to median, displacement obtains predicted value:
h=Clip((h 1+4)>>3)
(8) for 1/2nd pixels of diagonal, be that the 6 rank filters of (-1,5,5 ,-1) carry out interpolation in horizontal or vertical direction to adjacent 4 1/2nd pixel medians with coefficient, first obtain median
j 1=(-1)×bb 1+5×b 1+5×s 1+(-1)×gg 1
Or j 1=(-1) × dd 1+ 5 × h 1+ 5 × m 1+ (-1) × ee 1
Wherein bb 1, s 1, gg 1the median of relevant position 1/2nd pixel, with filter in the vertical direction interpolation obtain, dd, m 1,ee 1the median of relevant position 1/2nd pixel, with filter in the horizontal direction interpolation obtain.Again addition is carried out to median, shifting processing obtains predicted value:
j=Clip((j 1+4)>>3)
Below in conjunction with accompanying drawing, the preferred embodiments of the present invention are described in detail:
Fig. 1 is the interpolation schematic diagram of H.264 middle brightness fraction pixel.What describe be half-pix and 1/4th pixels is not be present in primitive frame at the very start, must be calculated by filtering interpolation.In standard H.264/AVC, half-pix is obtained in horizontal and vertical direction calculating respectively by the Weiner filter of 6 taps.
But half-pix and 1/4 pixel are not be present in primitive frame at the very start, must be calculated by filtering interpolation.In the h .264 standard, half-pix carries out filtering in horizontal and vertical direction respectively by the Weiner filter on 6 rank to calculate, as shown in Figure 2.
Motion predication has three types, is respectively H type motion predication, and as the b etc. in figure, they obtain by the integer pixel interpolation of horizontal direction adjacent with it; The second is V-type motion predication, and as h, m etc. in figure, they are obtained by the integer pixel interpolation of vertical direction adjacent with it; The third be D type motion predication as the j in figure, the integer pixel that it is not adjacent with it in horizontal and vertical direction, but obtained by 1/2 pixel (i.e. H or the V-type half-pix) interpolation in the level adjacent with it or vertical direction.
As shown in Figure 2, the half-pix of H type and V-type calculates its median by 6 tap FIR filters according to its 6 contiguous integer pixel, then span be limited between [0,255], and formula is as follows:
b 1=E-5F+20G+20H-5I+J
h 1=A-5C+20G+20M-5R+T
b=Clip((b 1+16)>>5)
h=Clip((h 1+16)>>5)
The 6 rank filter coefficients that D type half-pix carries out horizontal or vertical direction according to the half-pix that it closes on calculate.
j 1=cc-5dd+20h 1+20m 1-5ee+ff
j 1=aa-5bb+20b 1+20s 1-5gg+hh
j=Clip((j 1+512)>>10)
Be denoted as a in figure 3,1/4 pixel value of c, d, n, f, i, k, q to be averaging the most contiguous 2 Integer Pel and half-pix by bi-linear filter and to obtain.Be denoted as e in fig. 2,1/4 pixel value of g, p, r to be then averaging 2 of diagonal the most contiguous half-pix points by bi-linear filter and to obtain.For a pixel and p pixel, these 12 1/4 pixel values obtain by following formulae discovery:
a=(G+b+1)>>1,p=(h+s+1)>>1
Use H.264 reference software, adopt several different coded video sequence (QCIF, CIF, 4CIF and 1080p), to 4 × 4 H.264,8 × 4,4 × 8,8 × 8,16 × 8, the utilance of 8 × 16 and 16 × 16 these 7 kinds of blocks is tested.Found that the selection rate of 8 × 8 sized blocks or the sized blocks larger than 8 × 8 is the highest.Same employing the method, respectively to adopting and not adopting the video sequence of motion predication algorithm to test, finds to adopt the interpolation algorithm of half-pix can show video compression effect better.
In order to reduce the complexity of algorithm, that reduces algorithm realizes the time, the present invention improves former interpolation algorithm, coefficient is selected to be (-1,5,5 ,-1) 4 rank filters carry out interpolation arithmetic to 4 integer pixel points adjacent in horizontal direction, such as to the half-pix b of horizontal direction, first ask median:
b 1=(-1)×F+5×G+5×H+(-1)×R
Then carry out addition, shift operation, obtain predicted value:
b=Clip((b+4)>>3)
For 1/2 pixel of vertical direction, same coefficient of utilization is that the 4 rank filters of (-1,5,5 ,-1) carry out interpolation to 4 integer pixel points adjacent with it in vertical direction, such as, to the half-pix h of vertical direction, first asks its median:
h 1=(-1)×C+5×G+5×M+(-1)×R
Then addition is carried out to median, displacement obtains predicted value:
h=Clip((h 1+4)>>3)
For the half-pix of diagonal, in horizontal or vertical direction, interpolation is carried out to the median of adjacent 4 1/2 pixels, such as j with the 4 rank filters that coefficient is (-1,5,5 ,-1), first tries to achieve its median:
j 1=(-1)×bb 1+5×b 1+5×s 1+(-1)×gg 1
In formula, bb 1, s 1, gg 1the median of relevant position half-pix, with filter in the vertical direction interpolation obtain;
Dd, m 1,ee 1the median of relevant position half-pix, with filter in the horizontal direction interpolation obtain.Again addition is carried out to median, shifting processing obtains predicted value:
j=Clip((j 1+4)>>3)
Method after improvement is compared with original method, operand has had certain reduction, in order to improve the hardware implementing speed of algorithm, the algorithm that three steps realize being obtained by two step interpolation, first by the filter on 4 rank, the half-pix that filtering interpolation obtains V-type is carried out to the integer pixel of vertical direction; Then obtained the half-pix of H type by the integer pixel filtering interpolation of 4 rank filters to horizontal direction, the V-type motion predication then by obtaining calculates D type half-pix.Such design can reduce the computing clock cycle of system, and what shorten algorithm realizes the time, improves the efficiency of Video coding.
What finally illustrate is, above preferred embodiment is only in order to illustrate technical scheme of the present invention and unrestricted, although by above preferred embodiment to invention has been detailed description, but those skilled in the art are to be understood that, various change can be made to it in the form and details, and not depart from claims of the present invention limited range.

Claims (1)

1. the H.264 Fast Interpolation method based on motion compensation, it is characterized in that: 6 rank filtering used for the calculating half-pix in traditional motion compensated interpolation algorithm are improved to 4 rank filtering by the method, and employ the mode of the input of parallel pipeline, disposable 12 pixels that can process input, can improve the efficiency of whole algorithm;
Specifically comprise the following steps:
Step one: with the 4 rank filters that coefficient is (-1,5,5 ,-1), interpolation is carried out to 4 integer pixel points adjacent in horizontal direction, first obtain median, then through addition, shift operation, obtain predicted value;
Step 2: for 1/2nd pixels of vertical direction is (-1,5 with coefficient, 5 ,-1) 4 rank filters carry out interpolation to 4 integer pixel points adjacent in vertical direction, first obtain median, then through addition, shift operation, predicted value is obtained;
Step 3: for 1/2nd pixels of diagonal, be (-1 with coefficient, 5,5,-1) 4 rank filters carry out interpolation in horizontal or vertical direction to adjacent 4 1/2nd pixel medians, first obtain median, and then addition is carried out to median, shifting processing obtains predicted value.
CN201510205008.6A 2015-04-27 2015-04-27 H.264 rapid interpolation method based on movement compensation Pending CN104811739A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510205008.6A CN104811739A (en) 2015-04-27 2015-04-27 H.264 rapid interpolation method based on movement compensation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510205008.6A CN104811739A (en) 2015-04-27 2015-04-27 H.264 rapid interpolation method based on movement compensation

Publications (1)

Publication Number Publication Date
CN104811739A true CN104811739A (en) 2015-07-29

Family

ID=53696159

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510205008.6A Pending CN104811739A (en) 2015-04-27 2015-04-27 H.264 rapid interpolation method based on movement compensation

Country Status (1)

Country Link
CN (1) CN104811739A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106791881A (en) * 2016-12-28 2017-05-31 北京奇艺世纪科技有限公司 A kind of filtering method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1589020A (en) * 2004-07-29 2005-03-02 联合信源数字音视频技术(北京)有限公司 Fractional pixel filter system and its filter method for video frequency decoding chip
CN1835585A (en) * 2004-12-21 2006-09-20 St微电子公司 Method and system for fast implementation of subpixel interpolation
CN1863319A (en) * 2005-07-21 2006-11-15 华为技术有限公司 Fractional pixel interpolation method and encoding and decoding apparatus
CN101043621A (en) * 2006-06-05 2007-09-26 华为技术有限公司 Self-adaptive interpolation process method and coding/decoding module
CN101198063A (en) * 2006-12-05 2008-06-11 华为技术有限公司 Encoding and decoding method and device, image element interpolation processing method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1589020A (en) * 2004-07-29 2005-03-02 联合信源数字音视频技术(北京)有限公司 Fractional pixel filter system and its filter method for video frequency decoding chip
CN1835585A (en) * 2004-12-21 2006-09-20 St微电子公司 Method and system for fast implementation of subpixel interpolation
CN1863319A (en) * 2005-07-21 2006-11-15 华为技术有限公司 Fractional pixel interpolation method and encoding and decoding apparatus
CN101043621A (en) * 2006-06-05 2007-09-26 华为技术有限公司 Self-adaptive interpolation process method and coding/decoding module
CN101198063A (en) * 2006-12-05 2008-06-11 华为技术有限公司 Encoding and decoding method and device, image element interpolation processing method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106791881A (en) * 2016-12-28 2017-05-31 北京奇艺世纪科技有限公司 A kind of filtering method and device
CN106791881B (en) * 2016-12-28 2019-09-17 北京奇艺世纪科技有限公司 A kind of filtering method and device

Similar Documents

Publication Publication Date Title
CA2797569C (en) Method and device for video predictive encoding
CN104967852A (en) Method and apparatus for encoding and decoding image through intra prediction
TW202041010A (en) Inter prediction methods for coding video data
CN103152579A (en) In-loop adaptive wiener filter for video coding and decoding
CN103141097B (en) The de-blocking filter optimized
JP2006129436A (en) Non-integer pixel sharing for video encoding
TWI504241B (en) Video encoding method and apparatus, video decoding method and apparatus, and programs product thereof
CN101765011B (en) Method and device for scaling motion estimation
CN105306957A (en) Adaptive loop filtering method and device
CN102833550A (en) Low-complexity sub-pixel interpolation filter
US20170150166A1 (en) System and method for efficient multi-bitrate and multi-spatial resolution media encoding
WO2008068623A2 (en) Adaptive interpolation method and system for motion compensated predictive video coding and decoding
US20130182763A1 (en) Video encoding apparatus, decoding apparatus and video encoding method
CN113068030B (en) Video image component prediction method and device, and computer storage medium
WO2012010023A1 (en) Method and apparatus for image motion estimation
CN104811739A (en) H.264 rapid interpolation method based on movement compensation
CN101141559A (en) Serial input-parallel output video image brightness interpolating method and device
Yasin et al. Review and evaluation of end-to-end video compression with deep-learning
CN103237211B (en) A kind of method of the video sub-pix brightness interpolating based on FPGA and device thereof
WO2022077490A1 (en) Intra prediction method, encoder, decoder, and storage medium
CN104602026B (en) A kind of reconstruction loop structure being multiplexed entirely encoder under HEVC standard
WO2020252707A1 (en) Video processing method and device
CN102215404B (en) Decoding method and system of videos inside embedded system
CN103731674A (en) H.264 two-dimensional parallel post-processing block removing filter hardware achieving method
WO2022077495A1 (en) Inter-frame prediction methods, encoder and decoders and computer storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20150729