]> granicus.if.org Git - libvpx/commitdiff
Renaming deringing blockwise write-back functions to make code clearer
authorJean-Marc Valin <jmvalin@mozilla.com>
Wed, 26 Oct 2016 04:11:16 +0000 (00:11 -0400)
committerYaowu Xu <yaowu@google.com>
Wed, 2 Nov 2016 22:51:00 +0000 (15:51 -0700)
No change in output.

Change-Id: Ifa5df3adce9f24ef6dcd89a5f33a744bfb57194d

av1/common/dering.c
av1/common/od_dering.c
av1/common/od_dering.h
av1/encoder/pickdering.c

index ba59199616995ab34d7190c7d967ae8715ca1cf2..2b99ac8366be27c224196990989088e1cfee1441 100644 (file)
@@ -72,14 +72,14 @@ int sb_compute_dering_list(const AV1_COMMON *const cm, int mi_row, int mi_col,
   return count;
 }
 
-static INLINE void copy_8x8_16_8bit(uint8_t *dst, int dstride, int16_t *src, int sstride) {
+static INLINE void copy_8x8_16bit_to_8bit(uint8_t *dst, int dstride, int16_t *src, int sstride) {
   int i, j;
   for (i = 0; i < 8; i++)
     for (j = 0; j < 8; j++)
       dst[i * dstride + j] = src[i * sstride + j];
 }
 
-static INLINE void copy_4x4_16_8bit(uint8_t *dst, int dstride, int16_t *src, int sstride) {
+static INLINE void copy_4x4_16bit_to_8bit(uint8_t *dst, int dstride, int16_t *src, int sstride) {
   int i, j;
   for (i = 0; i < 4; i++)
     for (j = 0; j < 4; j++)
@@ -87,7 +87,7 @@ static INLINE void copy_4x4_16_8bit(uint8_t *dst, int dstride, int16_t *src, int
 }
 
 /* TODO: Optimize this function for SSE. */
-void copy_blocks_16_8bit(uint8_t *dst, int dstride, int16_t *src,
+void copy_dering_16bit_to_8bit(uint8_t *dst, int dstride, int16_t *src,
     dering_list *dlist, int dering_count, int bsize)
 {
   int bi, bx, by;
@@ -95,7 +95,7 @@ void copy_blocks_16_8bit(uint8_t *dst, int dstride, int16_t *src,
     for (bi = 0; bi < dering_count; bi++) {
       by = dlist[bi].by;
       bx = dlist[bi].bx;
-      copy_8x8_16_8bit(&dst[(by << 3) * dstride + (bx << 3)],
+      copy_8x8_16bit_to_8bit(&dst[(by << 3) * dstride + (bx << 3)],
                      dstride,
                      &src[bi << 2*bsize], 1 << bsize);
     }
@@ -103,7 +103,7 @@ void copy_blocks_16_8bit(uint8_t *dst, int dstride, int16_t *src,
     for (bi = 0; bi < dering_count; bi++) {
       by = dlist[bi].by;
       bx = dlist[bi].bx;
-      copy_4x4_16_8bit(&dst[(by << 2) * dstride + (bx << 2)],
+      copy_4x4_16bit_to_8bit(&dst[(by << 2) * dstride + (bx << 2)],
                      dstride,
                      &src[bi << 2*bsize], 1 << bsize);
     }
@@ -344,7 +344,7 @@ void av1_dering_frame(YV12_BUFFER_CONFIG *frame, AV1_COMMON *cm,
             dec[pli], dir, pli, dlist, dering_count, threshold, coeff_shift);
 #if CONFIG_AOM_HIGHBITDEPTH
         if (cm->use_highbitdepth) {
-          copy_blocks_16bit(
+          copy_dering_16bit_to_16bit(
               (int16_t*)&CONVERT_TO_SHORTPTR(
                   xd->plane[pli].dst.buf)[xd->plane[pli].dst.stride *
                   (MAX_MIB_SIZE * sbr << bsize[pli]) +
@@ -353,7 +353,7 @@ void av1_dering_frame(YV12_BUFFER_CONFIG *frame, AV1_COMMON *cm,
               dering_count, 3 - dec[pli]);
         } else {
 #endif
-          copy_blocks_16_8bit(
+          copy_dering_16bit_to_8bit(
               &xd->plane[pli].dst.buf[xd->plane[pli].dst.stride *
                                     (MAX_MIB_SIZE * sbr << bsize[pli]) +
                                     (sbc * MAX_MIB_SIZE << bsize[pli])],
index 8b9dd7e05f480ea310443df11176dc41f2a57156..977faa088d81f67743232843c47b6e9b9d0f02de 100644 (file)
@@ -258,14 +258,14 @@ static INLINE int od_adjust_thresh(int threshold, int32_t var) {
   return (threshold * OD_THRESH_TABLE_Q8[OD_ILOG(v1)] + 128) >> 8;
 }
 
-static INLINE void copy_8x8_16bit(int16_t *dst, int dstride, int16_t *src, int sstride) {
+static INLINE void copy_8x8_16bit_to_16bit(int16_t *dst, int dstride, int16_t *src, int sstride) {
   int i, j;
   for (i = 0; i < 8; i++)
     for (j = 0; j < 8; j++)
       dst[i * dstride + j] = src[i * sstride + j];
 }
 
-static INLINE void copy_4x4_16bit(int16_t *dst, int dstride, int16_t *src, int sstride) {
+static INLINE void copy_4x4_16bit_to_16bit(int16_t *dst, int dstride, int16_t *src, int sstride) {
   int i, j;
   for (i = 0; i < 4; i++)
     for (j = 0; j < 4; j++)
@@ -273,7 +273,7 @@ static INLINE void copy_4x4_16bit(int16_t *dst, int dstride, int16_t *src, int s
 }
 
 /* TODO: Optimize this function for SSE. */
-void copy_blocks_16bit(int16_t *dst, int dstride, int16_t *src,
+void copy_dering_16bit_to_16bit(int16_t *dst, int dstride, int16_t *src,
     dering_list *dlist, int dering_count, int bsize)
 {
   int bi, bx, by;
@@ -281,7 +281,7 @@ void copy_blocks_16bit(int16_t *dst, int dstride, int16_t *src,
     for (bi = 0; bi < dering_count; bi++) {
       by = dlist[bi].by;
       bx = dlist[bi].bx;
-      copy_8x8_16bit(&dst[(by << 3) * dstride + (bx << 3)],
+      copy_8x8_16bit_to_16bit(&dst[(by << 3) * dstride + (bx << 3)],
                      dstride,
                      &src[bi << 2*bsize], 1 << bsize);
     }
@@ -289,7 +289,7 @@ void copy_blocks_16bit(int16_t *dst, int dstride, int16_t *src,
     for (bi = 0; bi < dering_count; bi++) {
       by = dlist[bi].by;
       bx = dlist[bi].bx;
-      copy_4x4_16bit(&dst[(by << 2) * dstride + (bx << 2)],
+      copy_4x4_16bit_to_16bit(&dst[(by << 2) * dstride + (bx << 2)],
                      dstride,
                      &src[bi << 2*bsize], 1 << bsize);
     }
@@ -342,7 +342,7 @@ void od_dering(int16_t *y, int16_t *in, int xdec,
           dir[by][bx]);
     }
   }
-  copy_blocks_16bit(in, OD_FILT_BSTRIDE, y, dlist, dering_count,
+  copy_dering_16bit_to_16bit(in, OD_FILT_BSTRIDE, y, dlist, dering_count,
       bsize);
   for (bi = 0; bi < dering_count; bi++) {
     by = dlist[bi].by;
index 60cb041ff46efc32ed55158f44d9e9779d3fd39b..48acf37db39ff4a5a96f8982ee7063572f6ff9a4 100644 (file)
@@ -44,7 +44,7 @@ typedef int (*od_filter_dering_direction_func)(int16_t *y, int ystride,
 typedef void (*od_filter_dering_orthogonal_func)(int16_t *y, int ystride,
                                                  const int16_t *in,
                                                  int threshold, int dir);
-void copy_blocks_16bit(int16_t *dst, int dstride, int16_t *src,
+void copy_dering_16bit_to_16bit(int16_t *dst, int dstride, int16_t *src,
     dering_list *dlist, int dering_count, int bsize);
 
 void od_dering(int16_t *y, int16_t *in, int xdec,
index 558baee7de49316ee92ad26c3344c0ce00c189b2..a6b918c6fc67a2104f705727f26ac105d29408be 100644 (file)
@@ -138,7 +138,7 @@ int av1_dering_search(YV12_BUFFER_CONFIG *frame, const YV12_BUFFER_CONFIG *ref,
         }
         od_dering(tmp_dst, in, 0, dir, 0, dlist, dering_count, threshold,
             coeff_shift);
-        copy_blocks_16bit(dst, MAX_MIB_SIZE << bsize[0], tmp_dst, dlist,
+        copy_dering_16bit_to_16bit(dst, MAX_MIB_SIZE << bsize[0], tmp_dst, dlist,
             dering_count, 3);
         cur_mse = (int)compute_dist(
             dst, MAX_MIB_SIZE << bsize[0],