[Ffmpeg-cvslog] r7361 - in trunk: libavcodec/motion_est.c libavcodec/motion_est_template.c tests/ffmpeg.regression.ref tests/rotozoom.regression.ref
michael
subversion
Sat Dec 23 00:30:57 CET 2006
Author: michael
Date: Sat Dec 23 00:30:57 2006
New Revision: 7361
Modified:
trunk/libavcodec/motion_est.c
trunk/libavcodec/motion_est_template.c
trunk/tests/ffmpeg.regression.ref
trunk/tests/rotozoom.regression.ref
Log:
test DIRECT{0,0} too if flag mv0 is used
slight PSNR/bitrate increase
Modified: trunk/libavcodec/motion_est.c
==============================================================================
--- trunk/libavcodec/motion_est.c (original)
+++ trunk/libavcodec/motion_est.c Sat Dec 23 00:30:57 2006
@@ -1978,6 +1978,8 @@
}
//FIXME something smarter
if(dmin>256*256*16) type&= ~CANDIDATE_MB_TYPE_DIRECT; //dont try direct mode if its invalid for this MB
+ if(s->codec_id == CODEC_ID_MPEG4 && type&CANDIDATE_MB_TYPE_DIRECT && s->flags&CODEC_FLAG_MV0 && *(uint32_t*)s->b_direct_mv_table[xy])
+ type |= CANDIDATE_MB_TYPE_DIRECT0;
#if 0
if(s->out_format == FMT_MPEG1)
type |= CANDIDATE_MB_TYPE_INTRA;
Modified: trunk/libavcodec/motion_est_template.c
==============================================================================
--- trunk/libavcodec/motion_est_template.c (original)
+++ trunk/libavcodec/motion_est_template.c Sat Dec 23 00:30:57 2006
@@ -1025,7 +1025,7 @@
score_map[0]= dmin;
//FIXME precalc first term below?
- if((s->pict_type == B_TYPE || s->flags&CODEC_FLAG_MV0) && !(c->flags & FLAG_DIRECT))
+ if((s->pict_type == B_TYPE && !(c->flags & FLAG_DIRECT)) || s->flags&CODEC_FLAG_MV0)
dmin += (mv_penalty[pred_x] + mv_penalty[pred_y])*penalty_factor;
/* first line */
Modified: trunk/tests/ffmpeg.regression.ref
==============================================================================
--- trunk/tests/ffmpeg.regression.ref (original)
+++ trunk/tests/ffmpeg.regression.ref Sat Dec 23 00:30:57 2006
@@ -75,14 +75,14 @@
600188 ./data/a-mpeg4-adv.avi
60edc5a67271e425d0a2a52981895b81 *./data/out.yuv
stddev: 10.25 PSNR:27.91 bytes:7602176
-8cbcdc72a33e5a8d624f38529efd93c8 *./data/a-mpeg4-qprd.avi
-657582 ./data/a-mpeg4-qprd.avi
-5b620f592a795b1caad323ab3fab0859 *./data/out.yuv
-stddev: 12.12 PSNR:26.45 bytes:7602176
-7573ec318b965cfb83da45daa23a9fc2 *./data/a-mpeg4-adap.avi
-400752 ./data/a-mpeg4-adap.avi
-820c4231d4fd192a93102f17f163d621 *./data/out.yuv
-stddev: 14.65 PSNR:24.80 bytes:7602176
+d099307d14c1a4daa145618ca0522888 *./data/a-mpeg4-qprd.avi
+657996 ./data/a-mpeg4-qprd.avi
+8a52c562082bad78cabb40ffa292ceec *./data/out.yuv
+stddev: 12.12 PSNR:26.44 bytes:7602176
+9192b10ae298ba325d53abf7b5b91ba3 *./data/a-mpeg4-adap.avi
+400650 ./data/a-mpeg4-adap.avi
+0ce1d1fbebc9e9178e1a1d4a32a5804c *./data/out.yuv
+stddev: 14.66 PSNR:24.80 bytes:7602176
5fff534f0b958547dfdb811d4f289931 *./data/a-mpeg4-thread.avi
761170 ./data/a-mpeg4-thread.avi
fe1d119938f8a26174b38eeaa18dff85 *./data/out.yuv
Modified: trunk/tests/rotozoom.regression.ref
==============================================================================
--- trunk/tests/rotozoom.regression.ref (original)
+++ trunk/tests/rotozoom.regression.ref Sat Dec 23 00:30:57 2006
@@ -75,14 +75,14 @@
173590 ./data/a-mpeg4-adv.avi
699edf05648fdc42196b7bebef9be269 *./data/out.yuv
stddev: 4.84 PSNR:34.41 bytes:7602176
-edd969be2816c13ae078b7a0416a5715 *./data/a-mpeg4-qprd.avi
-234852 ./data/a-mpeg4-qprd.avi
-51fa46add28e145c1a5ce6b27a4c57b8 *./data/out.yuv
-stddev: 4.24 PSNR:35.57 bytes:7602176
-0784800b9914cf69a6a3dc950747d376 *./data/a-mpeg4-adap.avi
-204726 ./data/a-mpeg4-adap.avi
-3172924d9449b83586e30ae73c86be2a *./data/out.yuv
-stddev: 4.04 PSNR:35.98 bytes:7602176
+1e12bb209dae0ab4b64265b0a4262257 *./data/a-mpeg4-qprd.avi
+234048 ./data/a-mpeg4-qprd.avi
+1ec355ffb30d2adf302a550cf5812636 *./data/out.yuv
+stddev: 4.23 PSNR:35.58 bytes:7602176
+d581d6f4a331325905b8ffb05cd3bfd3 *./data/a-mpeg4-adap.avi
+204284 ./data/a-mpeg4-adap.avi
+c2c7f1c7844ab92d34247ccb70198c61 *./data/out.yuv
+stddev: 4.04 PSNR:35.99 bytes:7602176
8cd8940d7451925784536fe9b2f2a5e3 *./data/a-mpeg4-thread.avi
254260 ./data/a-mpeg4-thread.avi
d160a4224ea1af66c85178912f8d3a7c *./data/out.yuv
More information about the ffmpeg-cvslog
mailing list