[x264-devel] commit: More accurate MV prediction on edges in lookahead ( Jason Garrett-Glaser )
git at videolan.org
git at videolan.org
Thu May 6 07:49:21 CEST 2010
x264 | branch: master | Jason Garrett-Glaser <darkshikari at gmail.com> | Sat May 1 19:34:14 2010 -0700| [c82273d6d74271e0f743c5729e7438ff37e2df5e] | committer: Jason Garrett-Glaser
More accurate MV prediction on edges in lookahead
> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=c82273d6d74271e0f743c5729e7438ff37e2df5e
---
encoder/slicetype.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/encoder/slicetype.c b/encoder/slicetype.c
index cf2be0e..9352367 100644
--- a/encoder/slicetype.c
+++ b/encoder/slicetype.c
@@ -381,21 +381,23 @@ static void x264_slicetype_mb_cost( x264_t *h, x264_mb_analysis_t *a,
/* Reverse-order MV prediction. */
M32( mvc[0] ) = 0;
- M32( mvc[1] ) = 0;
M32( mvc[2] ) = 0;
#define MVC(mv) { CP32( mvc[i_mvc], mv ); i_mvc++; }
if( i_mb_x < h->sps->i_mb_width - 1 )
- MVC(fenc_mv[1]);
+ MVC( fenc_mv[1] );
if( i_mb_y < h->sps->i_mb_height - 1 )
{
- MVC(fenc_mv[i_mb_stride]);
+ MVC( fenc_mv[i_mb_stride] );
if( i_mb_x > 0 )
- MVC(fenc_mv[i_mb_stride-1]);
+ MVC( fenc_mv[i_mb_stride-1] );
if( i_mb_x < h->sps->i_mb_width - 1 )
- MVC(fenc_mv[i_mb_stride+1]);
+ MVC( fenc_mv[i_mb_stride+1] );
}
#undef MVC
- x264_median_mv( m[l].mvp, mvc[0], mvc[1], mvc[2] );
+ if( i_mvc <= 1 )
+ CP32( m[l].mvp, mvc[0] );
+ else
+ x264_median_mv( m[l].mvp, mvc[0], mvc[1], mvc[2] );
x264_me_search( h, &m[l], mvc, i_mvc );
m[l].cost -= 2; // remove mvcost from skip mbs
More information about the x264-devel
mailing list