Renaming deringing blockwise write-back functions to make code clearer

No change in output.

Change-Id: Ifa5df3adce9f24ef6dcd89a5f33a744bfb57194d
This commit is contained in:
Jean-Marc Valin 2016-10-26 00:11:16 -04:00 коммит произвёл Jean-Marc Valin
Родитель 02241a9c4b
Коммит fe280130d6
4 изменённых файлов: 15 добавлений и 15 удалений

Просмотреть файл

@ -72,14 +72,14 @@ int sb_compute_dering_list(const AV1_COMMON *const cm, int mi_row, int mi_col,
return count; 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; int i, j;
for (i = 0; i < 8; i++) for (i = 0; i < 8; i++)
for (j = 0; j < 8; j++) for (j = 0; j < 8; j++)
dst[i * dstride + j] = src[i * sstride + 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; int i, j;
for (i = 0; i < 4; i++) for (i = 0; i < 4; i++)
for (j = 0; j < 4; j++) 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. */ /* 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) dering_list *dlist, int dering_count, int bsize)
{ {
int bi, bx, by; 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++) { for (bi = 0; bi < dering_count; bi++) {
by = dlist[bi].by; by = dlist[bi].by;
bx = dlist[bi].bx; 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, dstride,
&src[bi << 2*bsize], 1 << bsize); &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++) { for (bi = 0; bi < dering_count; bi++) {
by = dlist[bi].by; by = dlist[bi].by;
bx = dlist[bi].bx; 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, dstride,
&src[bi << 2*bsize], 1 << bsize); &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); dec[pli], dir, pli, dlist, dering_count, threshold, coeff_shift);
#if CONFIG_AOM_HIGHBITDEPTH #if CONFIG_AOM_HIGHBITDEPTH
if (cm->use_highbitdepth) { if (cm->use_highbitdepth) {
copy_blocks_16bit( copy_dering_16bit_to_16bit(
(int16_t*)&CONVERT_TO_SHORTPTR( (int16_t*)&CONVERT_TO_SHORTPTR(
xd->plane[pli].dst.buf)[xd->plane[pli].dst.stride * xd->plane[pli].dst.buf)[xd->plane[pli].dst.stride *
(MAX_MIB_SIZE * sbr << bsize[pli]) + (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]); dering_count, 3 - dec[pli]);
} else { } else {
#endif #endif
copy_blocks_16_8bit( copy_dering_16bit_to_8bit(
&xd->plane[pli].dst.buf[xd->plane[pli].dst.stride * &xd->plane[pli].dst.buf[xd->plane[pli].dst.stride *
(MAX_MIB_SIZE * sbr << bsize[pli]) + (MAX_MIB_SIZE * sbr << bsize[pli]) +
(sbc * MAX_MIB_SIZE << bsize[pli])], (sbc * MAX_MIB_SIZE << bsize[pli])],

Просмотреть файл

@ -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; 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; int i, j;
for (i = 0; i < 8; i++) for (i = 0; i < 8; i++)
for (j = 0; j < 8; j++) for (j = 0; j < 8; j++)
dst[i * dstride + j] = src[i * sstride + 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; int i, j;
for (i = 0; i < 4; i++) for (i = 0; i < 4; i++)
for (j = 0; j < 4; j++) 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. */ /* 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) dering_list *dlist, int dering_count, int bsize)
{ {
int bi, bx, by; 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++) { for (bi = 0; bi < dering_count; bi++) {
by = dlist[bi].by; by = dlist[bi].by;
bx = dlist[bi].bx; 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, dstride,
&src[bi << 2*bsize], 1 << bsize); &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++) { for (bi = 0; bi < dering_count; bi++) {
by = dlist[bi].by; by = dlist[bi].by;
bx = dlist[bi].bx; 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, dstride,
&src[bi << 2*bsize], 1 << bsize); &src[bi << 2*bsize], 1 << bsize);
} }
@ -342,7 +342,7 @@ void od_dering(int16_t *y, int16_t *in, int xdec,
dir[by][bx]); 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); bsize);
for (bi = 0; bi < dering_count; bi++) { for (bi = 0; bi < dering_count; bi++) {
by = dlist[bi].by; by = dlist[bi].by;

Просмотреть файл

@ -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, typedef void (*od_filter_dering_orthogonal_func)(int16_t *y, int ystride,
const int16_t *in, const int16_t *in,
int threshold, int dir); 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); dering_list *dlist, int dering_count, int bsize);
void od_dering(int16_t *y, int16_t *in, int xdec, void od_dering(int16_t *y, int16_t *in, int xdec,

Просмотреть файл

@ -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, od_dering(tmp_dst, in, 0, dir, 0, dlist, dering_count, threshold,
coeff_shift); 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); dering_count, 3);
cur_mse = (int)compute_dist( cur_mse = (int)compute_dist(
dst, MAX_MIB_SIZE << bsize[0], dst, MAX_MIB_SIZE << bsize[0],