[x264-devel] commit: Some minor optimizations in RD refinement (Jason Garrett-Glaser )

git version control git at videolan.org
Fri Oct 31 16:57:51 CET 2008


x264 | branch: master | Jason Garrett-Glaser <darkshikari at gmail.com> | Wed Oct 22 00:37:00 2008 -0700| [f451563f93fad8972c0e9b788b30799e777e913a] | committer: Jason Garrett-Glaser 

Some minor optimizations in RD refinement
Don't write b subpartition in CABAC RDO
Calculate nonzero count in i4x4 CAVLC RDO

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=f451563f93fad8972c0e9b788b30799e777e913a
---

 encoder/cabac.c |    1 -
 encoder/cavlc.c |    4 ++--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/encoder/cabac.c b/encoder/cabac.c
index 2f0f02a..111b82e 100644
--- a/encoder/cabac.c
+++ b/encoder/cabac.c
@@ -1047,7 +1047,6 @@ static void x264_partition_size_cabac( x264_t *h, x264_cabac_t *cb, int i8, int
     }
     else if( i_mb_type == B_8x8 )
     {
-        x264_cabac_mb_sub_b_partition( cb, h->mb.i_sub_partition[i8] );
         x264_cabac_mb8x8_mvd( h, cb, 0, i8 );
         x264_cabac_mb8x8_mvd( h, cb, 1, i8 );
     }
diff --git a/encoder/cavlc.c b/encoder/cavlc.c
index 8e27aa2..df084e2 100644
--- a/encoder/cavlc.c
+++ b/encoder/cavlc.c
@@ -701,8 +701,7 @@ static int x264_partition_i8x8_size_cavlc( x264_t *h, int i8, int i_mode )
     {
         for( i = 0; i < 16; i++ )
             h->dct.luma4x4[i4+i8*4][i] = h->dct.luma8x8[i8][i4+i*4];
-        h->mb.cache.non_zero_count[x264_scan8[i4+i8*4]] =
-            array_non_zero_count( h->dct.luma4x4[i4+i8*4] );
+        h->mb.cache.non_zero_count[x264_scan8[i4+i8*4]] = array_non_zero_count( h->dct.luma4x4[i4+i8*4] );
         block_residual_write_cavlc( h, &h->out.bs, i4+i8*4, h->dct.luma4x4[i4+i8*4], 16 );
     }
     return h->out.bs.i_bits_encoded;
@@ -711,6 +710,7 @@ static int x264_partition_i8x8_size_cavlc( x264_t *h, int i8, int i_mode )
 static int x264_partition_i4x4_size_cavlc( x264_t *h, int i4, int i_mode )
 {
     h->out.bs.i_bits_encoded = cavlc_intra4x4_pred_size( h, i4, i_mode );
+    h->mb.cache.non_zero_count[x264_scan8[i4]] = array_non_zero_count( h->dct.luma4x4[i4] );
     block_residual_write_cavlc( h, &h->out.bs, i4, h->dct.luma4x4[i4], 16 );
     return h->out.bs.i_bits_encoded;
 }



More information about the x264-devel mailing list