[x264-devel] deblock: Write combining

Henrik Gramner git at videolan.org
Sun Jul 26 22:26:32 CEST 2015


x264 | branch: master | Henrik Gramner <henrik at gramner.com> | Tue Jun 23 17:00:47 2015 +0200| [6ee94dc898dc029553e308f1e76891ccefb3f0a7] | committer: Henrik Gramner

deblock: Write combining

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

 common/deblock.c    |    6 ++++--
 common/macroblock.c |   10 +++++++---
 2 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/common/deblock.c b/common/deblock.c
index 4aae394..dcf3b98 100644
--- a/common/deblock.c
+++ b/common/deblock.c
@@ -612,8 +612,10 @@ void x264_macroblock_deblock( x264_t *h )
     uint8_t (*bs)[8][4] = h->mb.cache.deblock_strength;
     if( intra_cur )
     {
-        memset( &bs[0][1], 3, 3*4*sizeof(uint8_t) );
-        memset( &bs[1][1], 3, 3*4*sizeof(uint8_t) );
+        M32( bs[0][1] ) = 0x03030303;
+        M64( bs[0][2] ) = 0x0303030303030303ULL;
+        M32( bs[1][1] ) = 0x03030303;
+        M64( bs[1][2] ) = 0x0303030303030303ULL;
     }
     else
         h->loopf.deblock_strength( h->mb.cache.non_zero_count, h->mb.cache.ref, h->mb.cache.mv,
diff --git a/common/macroblock.c b/common/macroblock.c
index 0cc1cf1..603594a 100644
--- a/common/macroblock.c
+++ b/common/macroblock.c
@@ -1436,8 +1436,10 @@ void x264_macroblock_deblock_strength( x264_t *h )
     uint8_t (*bs)[8][4] = h->mb.cache.deblock_strength;
     if( IS_INTRA( h->mb.i_type ) )
     {
-        memset( bs[0][1], 3, 3*4*sizeof(uint8_t) );
-        memset( bs[1][1], 3, 3*4*sizeof(uint8_t) );
+        M32( bs[0][1] ) = 0x03030303;
+        M64( bs[0][2] ) = 0x0303030303030303ULL;
+        M32( bs[1][1] ) = 0x03030303;
+        M64( bs[1][2] ) = 0x0303030303030303ULL;
         return;
     }
 
@@ -1450,7 +1452,9 @@ void x264_macroblock_deblock_strength( x264_t *h )
             M32( bs[0][0] ) = 0x02020202;
             M32( bs[0][2] ) = 0x02020202;
             M32( bs[0][4] ) = 0x02020202;
-            memset( bs[1][0], 2, 5*4*sizeof(uint8_t) ); /* [1][1] and [1][3] has to be set for 4:2:2 */
+            M64( bs[1][0] ) = 0x0202020202020202ULL; /* [1][1] and [1][3] has to be set for 4:2:2 */
+            M64( bs[1][2] ) = 0x0202020202020202ULL;
+            M32( bs[1][4] ) = 0x02020202;
             return;
         }
     }



More information about the x264-devel mailing list