[x264-devel] commit: Faster probe_skip (Jason Garrett-Glaser )
git version control
git at videolan.org
Fri Mar 27 07:10:54 CET 2009
x264 | branch: master | Jason Garrett-Glaser <darkshikari at gmail.com> | Thu Mar 26 22:22:23 2009 -0700| [847597773aff56a5612a9edbebb40b350c637edf] | committer: Jason Garrett-Glaser
Faster probe_skip
Add a second chroma threshold after the DC transform.
> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=847597773aff56a5612a9edbebb40b350c637edf
---
encoder/macroblock.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/encoder/macroblock.c b/encoder/macroblock.c
index 73cc597..92226b3 100644
--- a/encoder/macroblock.c
+++ b/encoder/macroblock.c
@@ -802,7 +802,7 @@ int x264_macroblock_probe_skip( x264_t *h, int b_bidir )
int i_qp = h->mb.i_qp;
int mvp[2];
- int ch, thresh;
+ int ch, thresh, ssd;
int i8x8, i4x4;
int i_decimate_mb;
@@ -856,7 +856,8 @@ int x264_macroblock_probe_skip( x264_t *h, int b_bidir )
/* there is almost never a termination during chroma, but we can't avoid the check entirely */
/* so instead we check SSD and skip the actual check if the score is low enough. */
- if( h->pixf.ssd[PIXEL_8x8]( p_dst, FDEC_STRIDE, p_src, FENC_STRIDE ) < thresh )
+ ssd = h->pixf.ssd[PIXEL_8x8]( p_dst, FDEC_STRIDE, p_src, FENC_STRIDE );
+ if( ssd < thresh )
continue;
h->dctf.sub8x8_dct( dct4x4, p_src, p_dst );
@@ -866,6 +867,10 @@ int x264_macroblock_probe_skip( x264_t *h, int b_bidir )
if( h->quantf.quant_2x2_dc( dct2x2, h->quant4_mf[CQM_4PC][i_qp][0]>>1, h->quant4_bias[CQM_4PC][i_qp][0]<<1 ) )
return 0;
+ /* If there wasn't a termination in DC, we can check against a much higher threshold. */
+ if( ssd < thresh*4 )
+ continue;
+
/* calculate dct coeffs */
for( i4x4 = 0, i_decimate_mb = 0; i4x4 < 4; i4x4++ )
{
More information about the x264-devel
mailing list