cdef.c: Make functions static BUG=aomedia:1540 Change-Id: I6a2afc889a8131d3fc238d99378d2419a2e8aa74
diff --git a/av1/common/cdef.c b/av1/common/cdef.c index 63f9883..2b87737 100644 --- a/av1/common/cdef.c +++ b/av1/common/cdef.c
@@ -21,25 +21,6 @@ #include "av1/common/onyxc_int.h" #include "av1/common/reconinter.h" -int sb_all_skip(const AV1_COMMON *const cm, int mi_row, int mi_col) { - int maxc, maxr; - int skip = 1; - maxc = cm->mi_cols - mi_col; - maxr = cm->mi_rows - mi_row; - - maxr = AOMMIN(maxr, MI_SIZE_64X64); - maxc = AOMMIN(maxc, MI_SIZE_64X64); - - for (int r = 0; r < maxr; r++) { - for (int c = 0; c < maxc; c++) { - skip = - skip && - cm->mi_grid_visible[(mi_row + r) * cm->mi_stride + mi_col + c]->skip; - } - } - return skip; -} - static int is_8x8_block_skip(MB_MODE_INFO **grid, int mi_row, int mi_col, int mi_stride) { int is_skip = 1;
diff --git a/av1/common/cdef.h b/av1/common/cdef.h index 3b2eac8..7f7694b 100644 --- a/av1/common/cdef.h +++ b/av1/common/cdef.h
@@ -37,7 +37,6 @@ extern "C" { #endif -int sb_all_skip(const AV1_COMMON *const cm, int mi_row, int mi_col); int sb_compute_cdef_list(const AV1_COMMON *const cm, int mi_row, int mi_col, cdef_list *dlist, BLOCK_SIZE bsize); void av1_cdef_frame(YV12_BUFFER_CONFIG *frame, AV1_COMMON *cm, MACROBLOCKD *xd);
diff --git a/av1/encoder/pickcdef.c b/av1/encoder/pickcdef.c index fb07056..8122100 100644 --- a/av1/encoder/pickcdef.c +++ b/av1/encoder/pickcdef.c
@@ -232,9 +232,9 @@ } /* Compute MSE only on the blocks we filtered. */ -uint64_t compute_cdef_dist(uint16_t *dst, int dstride, uint16_t *src, - cdef_list *dlist, int cdef_count, BLOCK_SIZE bsize, - int coeff_shift, int pli) { +static uint64_t compute_cdef_dist(uint16_t *dst, int dstride, uint16_t *src, + cdef_list *dlist, int cdef_count, + BLOCK_SIZE bsize, int coeff_shift, int pli) { uint64_t sum = 0; int bi, bx, by; if (bsize == BLOCK_8X8) { @@ -279,6 +279,25 @@ return sum >> 2 * coeff_shift; } +static int sb_all_skip(const AV1_COMMON *const cm, int mi_row, int mi_col) { + int maxc, maxr; + int skip = 1; + maxc = cm->mi_cols - mi_col; + maxr = cm->mi_rows - mi_row; + + maxr = AOMMIN(maxr, MI_SIZE_64X64); + maxc = AOMMIN(maxc, MI_SIZE_64X64); + + for (int r = 0; r < maxr; r++) { + for (int c = 0; c < maxc; c++) { + skip = + skip && + cm->mi_grid_visible[(mi_row + r) * cm->mi_stride + mi_col + c]->skip; + } + } + return skip; +} + void av1_cdef_search(YV12_BUFFER_CONFIG *frame, const YV12_BUFFER_CONFIG *ref, AV1_COMMON *cm, MACROBLOCKD *xd, int fast) { CdefInfo *const cdef_info = &cm->cdef_info;