[x264-devel] Fix use of uninitialized MVs in sub8x8 RDO
Anton Mitrofanov
git at videolan.org
Sat Oct 22 02:30:22 CEST 2011
x264 | branch: master | Anton Mitrofanov <BugMaster at narod.ru> | Sun Oct 9 01:13:29 2011 +0400| [c4644d878dc82f8812482f660f651948d53d4b43] | committer: Jason Garrett-Glaser
Fix use of uninitialized MVs in sub8x8 RDO
> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=c4644d878dc82f8812482f660f651948d53d4b43
---
encoder/analyse.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/encoder/analyse.c b/encoder/analyse.c
index 579c226..98a77c3 100644
--- a/encoder/analyse.c
+++ b/encoder/analyse.c
@@ -2659,10 +2659,12 @@ static void x264_mb_analyse_p_rd( x264_t *h, x264_mb_analysis_t *a, int i_satd )
for( subtype = D_L0_4x4; subtype <= D_L0_8x8; subtype++ )
{
uint64_t cost;
- if( costs[subtype] > sub8x8_thresh || (subtype == D_L0_8x8 && bcost == COST_MAX64) )
+ if( costs[subtype] > sub8x8_thresh )
continue;
h->mb.i_sub_partition[i] = subtype;
x264_mb_cache_mv_p8x8( h, a, i );
+ if( subtype == btype )
+ continue;
cost = x264_rd_cost_part( h, a->i_lambda2, i<<2, PIXEL_8x8 );
COPY2_IF_LT( bcost, cost, btype, subtype );
}
More information about the x264-devel
mailing list