[x264-devel] commit: Slightly improve non-RD p8x8 mode decision (Jason Garrett-Glaser )
git version control
git at videolan.org
Wed Oct 7 03:27:44 CEST 2009
x264 | branch: master | Jason Garrett-Glaser <darkshikari at gmail.com> | Sun Oct 4 00:48:27 2009 -0700| [a88f2d78533af5ff38c01054cf336bdd7f2cf27c] | committer: Jason Garrett-Glaser
Slightly improve non-RD p8x8 mode decision
Subpartition costs are effectively zero in CABAC if sub-8x8 search is off.
> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=a88f2d78533af5ff38c01054cf336bdd7f2cf27c
---
encoder/analyse.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/encoder/analyse.c b/encoder/analyse.c
index 5fcfd99..242d6ba 100644
--- a/encoder/analyse.c
+++ b/encoder/analyse.c
@@ -1308,8 +1308,10 @@ static void x264_mb_analyse_inter_p8x8_mixed_ref( x264_t *h, x264_mb_analysis_t
x264_macroblock_cache_mv_ptr( h, 2*x8, 2*y8, 2, 2, 0, l0m->mv );
x264_macroblock_cache_ref( h, 2*x8, 2*y8, 2, 2, 0, l0m->i_ref );
- /* mb type cost */
- l0m->cost += a->i_lambda * i_sub_mb_p_cost_table[D_L0_8x8];
+ /* If CABAC is on and we're not doing sub-8x8 analysis, the costs
+ are effectively zero. */
+ if( !h->param.b_cabac || (h->param.analyse.inter & X264_ANALYSE_PSUB8x8) )
+ l0m->cost += a->i_lambda * i_sub_mb_p_cost_table[D_L0_8x8];
}
a->l0.i_cost8x8 = a->l0.me8x8[0].cost + a->l0.me8x8[1].cost +
@@ -1361,7 +1363,8 @@ static void x264_mb_analyse_inter_p8x8( x264_t *h, x264_mb_analysis_t *a )
/* mb type cost */
m->cost += i_ref_cost;
- m->cost += a->i_lambda * i_sub_mb_p_cost_table[D_L0_8x8];
+ if( !h->param.b_cabac || (h->param.analyse.inter & X264_ANALYSE_PSUB8x8) )
+ m->cost += a->i_lambda * i_sub_mb_p_cost_table[D_L0_8x8];
}
a->l0.i_cost8x8 = a->l0.me8x8[0].cost + a->l0.me8x8[1].cost +
More information about the x264-devel
mailing list