Commit f7f8af46 authored by Michael Niedermayer's avatar Michael Niedermayer

1 step diamond search around the median MV predictor

+0.01 PSNR
idea from x264

Originally committed as revision 7189 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent fc0b0416
......@@ -907,7 +907,11 @@ static always_inline int epzs_motion_search_internal(MpegEncContext * s, int *mx
c->skip=1;
return dmin;
}
CHECK_MV(P_MEDIAN[0]>>shift, P_MEDIAN[1]>>shift)
CHECK_MV( P_MEDIAN[0] >>shift , P_MEDIAN[1] >>shift)
CHECK_CLIPED_MV((P_MEDIAN[0]>>shift) , (P_MEDIAN[1]>>shift)-1)
CHECK_CLIPED_MV((P_MEDIAN[0]>>shift) , (P_MEDIAN[1]>>shift)+1)
CHECK_CLIPED_MV((P_MEDIAN[0]>>shift)-1, (P_MEDIAN[1]>>shift) )
CHECK_CLIPED_MV((P_MEDIAN[0]>>shift)+1, (P_MEDIAN[1]>>shift) )
if(dmin>h*h*2){
CHECK_CLIPED_MV((last_mv[ref_mv_xy][0]*ref_mv_scale + (1<<15))>>16,
(last_mv[ref_mv_xy][1]*ref_mv_scale + (1<<15))>>16)
......
This diff is collapsed.
ffmpeg regression test
5fb135845dbde3ce5208c468173ef2c2 *./data/b-libav.avi
343318 ./data/b-libav.avi
./data/b-libav.avi CRC=0x1fdd352c
bac6c5f50f3ca5db6e2ef6eaccf1d4f1 *./data/b-libav.asf
342967 ./data/b-libav.asf
./data/b-libav.asf CRC=0x94d219de
3f63f396a3e9f08cdb5c30b4ef3a2436 *./data/b-libav.rm
360269 ./data/b-libav.rm
90784a1b9589095f20fc6bcc0cc23cc4 *./data/b-libav.mpg
387072 ./data/b-libav.mpg
./data/b-libav.mpg CRC=0xde87433c
2933a367c996b49f4b7e66a481fb334e *./data/b-libav.ts
476768 ./data/b-libav.ts
./data/b-libav.ts CRC=0x60faf764
57a8dfc7926802bb337a9d8918de94a8 *./data/b-libav.swf
41816 ./data/b-libav.swf
./data/b-libav.swf CRC=0x2b273fea
0026c4e2528ff8f71b79ef53d38cc04d *./data/b-libav.ffm
389120 ./data/b-libav.ffm
./data/b-libav.ffm CRC=0x1acfcaf1
1596b6d08a94e6b5519357ed23a48aa3 *./data/b-libav.flv
339476 ./data/b-libav.flv
./data/b-libav.flv CRC=0x7b9076f8
63e05396e2d52135c4025ce14eb090a9 *./data/b-libav.mov
369893 ./data/b-libav.mov
./data/b-libav.mov CRC=0x48f5a90d
8a0536ccfe36f4fff408b3327d33e1dd *./data/b-libav.avi
340344 ./data/b-libav.avi
./data/b-libav.avi CRC=0x400c29e9
85caa242a36abeab85a27c82ba73cc28 *./data/b-libav.asf
339767 ./data/b-libav.asf
./data/b-libav.asf CRC=0x74113749
1ad618e9fd318eb3483270cf9b9b3f43 *./data/b-libav.rm
355405 ./data/b-libav.rm
bdb7484c68db722f66ba1630cf79844c *./data/b-libav.mpg
378880 ./data/b-libav.mpg
./data/b-libav.mpg CRC=0x2b71a386
0bf8fb3b4d7bb70ed89356e94cd8ffa2 *./data/b-libav.ts
471316 ./data/b-libav.ts
./data/b-libav.ts CRC=0xcc4948e1
16cf1c37c123f8d3c4a31d192d9b0cc6 *./data/b-libav.swf
41836 ./data/b-libav.swf
./data/b-libav.swf CRC=0xcdec36a1
87a8c8be5db2513356b28f29dff5769e *./data/b-libav.ffm
380928 ./data/b-libav.ffm
./data/b-libav.ffm CRC=0x01522b4a
5e8aa303a877cfac6569ed11cf20e92b *./data/b-libav.flv
335810 ./data/b-libav.flv
./data/b-libav.flv CRC=0xe14e8847
16518706f425cb537362bfc1c58b8de5 *./data/b-libav.mov
366923 ./data/b-libav.mov
./data/b-libav.mov CRC=0x45079dca
26c41db318d9aacfd6b9e734c0ea4d94 *./data/b-libav.dv
3600000 ./data/b-libav.dv
./data/b-libav.dv CRC=0xa6b8b635
ff65eeeb156c8b42ad9fdb7c8dbdb6b7 *./data/b-libav.gxf
816068 ./data/b-libav.gxf
./data/b-libav.gxf CRC=0xb19044fa
002bb6d522748f81d4f785e64ede608b *./data/b-libav.gxf
815224 ./data/b-libav.gxf
./data/b-libav.gxf CRC=0x8da7e19c
9a9da315747599f7718cc9a9a09c21ff *./data/b-libav.pbm
317075 ./data/b-libav.pbm
./data/b-libav.pbm CRC=0xb92906cb
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment