fix special casing of the 0,0 MV for b frames (slight PSNR/bitrate gain)

Originally committed as revision 7334 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Michael Niedermayer 2006-12-20 17:11:54 +00:00
parent 0683a5c558
commit e4d0e2edb9
3 changed files with 51 additions and 49 deletions

View File

@ -1023,7 +1023,9 @@ static av_always_inline int epzs_motion_search_internal(MpegEncContext * s, int
dmin= cmp(s, 0, 0, 0, 0, size, h, ref_index, src_index, cmpf, chroma_cmpf, flags);
map[0]= map_generation;
score_map[0]= dmin;
if(s->flags&CODEC_FLAG_MV0)
//FIXME precalc first term below?
if((s->pict_type == B_TYPE || s->flags&CODEC_FLAG_MV0) && !(c->flags & FLAG_DIRECT))
dmin += (mv_penalty[pred_x] + mv_penalty[pred_y])*penalty_factor;
/* first line */

View File

@ -19,17 +19,17 @@ stddev: 7.67 PSNR:30.42 bytes:7602176
749746 ./data/a-mpeg2i.mpg
5189af71e6aa96cc2f6452e7f6b29287 *./data/out.yuv
stddev: 7.68 PSNR:30.41 bytes:7602176
f2067ddbe91a90ef12d606bba91cb900 *./data/a-mpeg2thread.mpg
812667 ./data/a-mpeg2thread.mpg
f101d3844ea2e12ac38001718c519232 *./data/out.yuv
stddev: 7.63 PSNR:30.46 bytes:7602176
fb900ca681fc054ed634ee4eadc9dc38 *./data/a-mpeg2threadivlc.mpg
803035 ./data/a-mpeg2threadivlc.mpg
f101d3844ea2e12ac38001718c519232 *./data/out.yuv
stddev: 7.63 PSNR:30.46 bytes:7602176
fd5f3e2a81558213bdfb8a7c86b3f541 *./data/a-mpeg2reuse.mpg
2099878 ./data/a-mpeg2reuse.mpg
e7f8692982e6d339a1f64bde4c297e59 *./data/out.yuv
69576facff13d45171e3a6c53b8018c4 *./data/a-mpeg2thread.mpg
813459 ./data/a-mpeg2thread.mpg
c0e8cbde76ff8377494fe6843fd03e11 *./data/out.yuv
stddev: 7.63 PSNR:30.47 bytes:7602176
17af99d1a7fc391242a809b0782263af *./data/a-mpeg2threadivlc.mpg
803833 ./data/a-mpeg2threadivlc.mpg
c0e8cbde76ff8377494fe6843fd03e11 *./data/out.yuv
stddev: 7.63 PSNR:30.47 bytes:7602176
c8d8b07b5fa97e0affb4a52d4d30a2b6 *./data/a-mpeg2reuse.mpg
2102956 ./data/a-mpeg2reuse.mpg
75d3dfc8133f0122cb9e272a21bc8c5c *./data/out.yuv
stddev: 7.67 PSNR:30.42 bytes:7602176
c83ae8d8f3e2b4506df58e6a2f7e3b2a *./data/a-msmpeg4v2.avi
636512 ./data/a-msmpeg4v2.avi
@ -67,21 +67,21 @@ stddev: 7.99 PSNR:30.06 bytes:7602176
7933744 ./data/a-huffyuv.avi
799d3db687f6cdd7a837ec156efc171f *./data/out.yuv
stddev: 0.00 PSNR:99.99 bytes:7602176
5f35533ff4357e405971466ee06375db *./data/a-mpeg4-rc.avi
814102 ./data/a-mpeg4-rc.avi
2cc2a0b6699d861b4cffad28a704067b *./data/out.yuv
stddev: 10.41 PSNR:27.76 bytes:7602176
b27e911f1563455700c93e6ae39715ca *./data/a-mpeg4-rc.avi
813988 ./data/a-mpeg4-rc.avi
f57311745de96b6551c175679b138efc *./data/out.yuv
stddev: 10.40 PSNR:27.78 bytes:7602176
85e2456a673041d528b242d78318fb65 *./data/a-mpeg4-adv.avi
600188 ./data/a-mpeg4-adv.avi
60edc5a67271e425d0a2a52981895b81 *./data/out.yuv
stddev: 10.25 PSNR:27.91 bytes:7602176
c429ad61139904f03a211ba2bdf4cf01 *./data/a-mpeg4-thread.avi
761308 ./data/a-mpeg4-thread.avi
cd5bb5cbd9a7ea0953825482d2990f5a *./data/out.yuv
5fff534f0b958547dfdb811d4f289931 *./data/a-mpeg4-thread.avi
761170 ./data/a-mpeg4-thread.avi
fe1d119938f8a26174b38eeaa18dff85 *./data/out.yuv
stddev: 12.31 PSNR:26.31 bytes:7602176
339c0dd9f30afa33a6f7134f84d5b60a *./data/a-mpeg4-Q.avi
878910 ./data/a-mpeg4-Q.avi
83b3cef07c91a397c63bc4bc45df667f *./data/out.yuv
41b27141442f773eca9ef3d48d8d555a *./data/a-mpeg4-Q.avi
878264 ./data/a-mpeg4-Q.avi
8995abbcc97ed4767fcbc0bf46accd01 *./data/out.yuv
stddev: 5.61 PSNR:33.13 bytes:7602176
c1dae02bddd79790266bc0a9f7d6eb0e *./data/a-mpeg4-PSP.mp4
406449 ./data/a-mpeg4-PSP.mp4
@ -93,9 +93,9 @@ b699b2fd005571dda3f8d34cb0ce7aec *./data/a-mpeg4-nr.avi
688676 ./data/a-mpeg4-nr.avi
2c16e13b1367022d52b0e75d93a734ba *./data/out.yuv
stddev: 7.02 PSNR:31.18 bytes:7602176
215cd567b5001181c24128e535cf77b0 *./data/a-mpeg1b.mpg
1026948 ./data/a-mpeg1b.mpg
1ee27511d22a4a553cac2ca64a79f2e1 *./data/out.yuv
225ab004f6ac16e5ade3b453f45b9d96 *./data/a-mpeg1b.mpg
1026429 ./data/a-mpeg1b.mpg
dd9a471c6b2d1004a90e42f34707becf *./data/out.yuv
stddev: 6.34 PSNR:32.07 bytes:7602176
2f9cb2ede35f7d12f6b518c50e20d81c *./data/a-mjpeg.avi
1567580 ./data/a-mjpeg.avi

View File

@ -19,17 +19,17 @@ f90197a8b6e62ae25f82625337f27240 *./data/a-mpeg2i.mpg
204579 ./data/a-mpeg2i.mpg
ea5057b60146c06d40449cdfc686bf13 *./data/out.yuv
stddev: 4.98 PSNR:34.17 bytes:7602176
dc359097986fc04df7541f720fa5da14 *./data/a-mpeg2thread.mpg
183314 ./data/a-mpeg2thread.mpg
354eb621a217e50252dbed937f9eab18 *./data/out.yuv
stddev: 4.76 PSNR:34.57 bytes:7602176
fb02afb5a0c79c7e99a32e60e19a86bc *./data/a-mpeg2threadivlc.mpg
182460 ./data/a-mpeg2threadivlc.mpg
354eb621a217e50252dbed937f9eab18 *./data/out.yuv
stddev: 4.76 PSNR:34.57 bytes:7602176
b567ce695c24fb1e08ff1c137a805e1a *./data/a-mpeg2reuse.mpg
394759 ./data/a-mpeg2reuse.mpg
c3a86762e97a8869ed3c969ee2e084b8 *./data/out.yuv
c346717be44450e41d9d6e07f59d1490 *./data/a-mpeg2thread.mpg
182959 ./data/a-mpeg2thread.mpg
02b85a7f67ced2d146a5c4e8000712b6 *./data/out.yuv
stddev: 4.75 PSNR:34.57 bytes:7602176
ff30b3df75626398873ac4f30093a5ae *./data/a-mpeg2threadivlc.mpg
182105 ./data/a-mpeg2threadivlc.mpg
02b85a7f67ced2d146a5c4e8000712b6 *./data/out.yuv
stddev: 4.75 PSNR:34.57 bytes:7602176
3942f86a6aa6fe5aea586fedf210e33e *./data/a-mpeg2reuse.mpg
394265 ./data/a-mpeg2reuse.mpg
afbc483eaa769925259e6094cfda2c72 *./data/out.yuv
stddev: 4.76 PSNR:34.56 bytes:7602176
c09815e40a9d260628e1ebad8b2b3774 *./data/a-msmpeg4v2.avi
129918 ./data/a-msmpeg4v2.avi
@ -67,21 +67,21 @@ a1323da0c8b437cd6961f8c90451880b *./data/a-huffyuv.avi
6455232 ./data/a-huffyuv.avi
dde5895817ad9d219f79a52d0bdfb001 *./data/out.yuv
stddev: 0.00 PSNR:99.99 bytes:7602176
a418db8cc1410a50a154e8418d78e3d7 *./data/a-mpeg4-rc.avi
227918 ./data/a-mpeg4-rc.avi
56b327651c526538576fbc104f696dde *./data/out.yuv
stddev: 4.24 PSNR:35.55 bytes:7602176
1fd3bddc95fa01ee4c4b383373803c67 *./data/a-mpeg4-rc.avi
227936 ./data/a-mpeg4-rc.avi
fa9079e35ff819c39656de95319846fb *./data/out.yuv
stddev: 4.24 PSNR:35.56 bytes:7602176
9001cf571eb7f26fa5592bdec6538583 *./data/a-mpeg4-adv.avi
173590 ./data/a-mpeg4-adv.avi
699edf05648fdc42196b7bebef9be269 *./data/out.yuv
stddev: 4.84 PSNR:34.41 bytes:7602176
5d94ca237bd1ba1a6cdab6796485c6dc *./data/a-mpeg4-thread.avi
254248 ./data/a-mpeg4-thread.avi
1cb815783ab9dc787add51cdbc97e156 *./data/out.yuv
8cd8940d7451925784536fe9b2f2a5e3 *./data/a-mpeg4-thread.avi
254260 ./data/a-mpeg4-thread.avi
d160a4224ea1af66c85178912f8d3a7c *./data/out.yuv
stddev: 4.03 PSNR:36.01 bytes:7602176
59e682efe457070d21170fdb117c1961 *./data/a-mpeg4-Q.avi
165840 ./data/a-mpeg4-Q.avi
f5838ffcf1dd6c538e27dbe906e5eadd *./data/out.yuv
a5150067914ee1dee50f8fc8dcaee841 *./data/a-mpeg4-Q.avi
165802 ./data/a-mpeg4-Q.avi
4dcc71ad79bee90777cf5299044be362 *./data/out.yuv
stddev: 4.00 PSNR:36.08 bytes:7602176
5b5b88ce610114e346a5df4f46995bb9 *./data/a-mpeg4-PSP.mp4
325006 ./data/a-mpeg4-PSP.mp4
@ -93,9 +93,9 @@ c41187c99588fb7229ad330b2f80d28b *./data/a-mpeg4-nr.avi
155044 ./data/a-mpeg4-nr.avi
f7fc191308679f709405e62271f5c65f *./data/out.yuv
stddev: 4.73 PSNR:34.62 bytes:7602176
1244f602a39b255ca676ca1e47617afd *./data/a-mpeg1b.mpg
230033 ./data/a-mpeg1b.mpg
df02ed235141aa229b47b91b28f71da5 *./data/out.yuv
977f3caf286e8f36c6ab4c7464632f26 *./data/a-mpeg1b.mpg
229806 ./data/a-mpeg1b.mpg
f41c60846bfb8cb6dcf6071c846c82b4 *./data/out.yuv
stddev: 4.13 PSNR:35.79 bytes:7602176
b179402bba391073b5f5f9324a834061 *./data/a-mjpeg.avi
703564 ./data/a-mjpeg.avi