]> git.sesse.net Git - x264/blobdiff - common/common.h
arm: Implement luma intra deblocking
[x264] / common / common.h
index e6a6fd00f97ea56f447a20c16625992ce8f62772..9cda1871ac4356a4908414d1407f74554b18a61c 100644 (file)
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * common.h: misc common functions
  *****************************************************************************
- * Copyright (C) 2003-2014 x264 project
+ * Copyright (C) 2003-2015 x264 project
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *          Loren Merritt <lorenm@u.washington.edu>
@@ -316,8 +316,8 @@ static ALWAYS_INLINE int x264_predictor_difference( int16_t (*mvc)[2], intptr_t
 
 static ALWAYS_INLINE uint16_t x264_cabac_mvd_sum( uint8_t *mvdleft, uint8_t *mvdtop )
 {
-    int amvd0 = abs(mvdleft[0]) + abs(mvdtop[0]);
-    int amvd1 = abs(mvdleft[1]) + abs(mvdtop[1]);
+    int amvd0 = mvdleft[0] + mvdtop[0];
+    int amvd1 = mvdleft[1] + mvdtop[1];
     amvd0 = (amvd0 > 2) + (amvd0 > 32);
     amvd1 = (amvd1 > 2) + (amvd1 > 32);
     return amvd0 + (amvd1<<8);
@@ -895,9 +895,6 @@ struct x264_t
     /* stats */
     struct
     {
-        /* Current frame stats */
-        x264_frame_stat_t frame;
-
         /* Cumulated stats */
 
         /* per slice info */
@@ -927,6 +924,8 @@ struct x264_t
         /* num p-frames weighted */
         int     i_wpred[2];
 
+        /* Current frame stats */
+        x264_frame_stat_t frame;
     } stat;
 
     /* 0 = luma 4x4, 1 = luma 8x8, 2 = chroma 4x4, 3 = chroma 8x8 */