Commit ccc86a35 authored by Jean-Marc Valin's avatar Jean-Marc Valin Committed by Jean-Marc Valin

Introducing OD_DERING_SIZE_LOG2 constant (3)

Also cleans up the size of the deringing destination buffer.

No change in output.

Change-Id: I7fc50d862d3906ce809c1031bf0789acdf39cf34
parent fe280130
......@@ -171,7 +171,7 @@ void av1_dering_frame(YV12_BUFFER_CONFIG *frame, AV1_COMMON *cm,
curr_row_dering = prev_row_dering + nhsb + 2;
for (pli = 0; pli < nplanes; pli++) {
dec[pli] = xd->plane[pli].subsampling_x;
bsize[pli] = 3 - dec[pli];
bsize[pli] = OD_DERING_SIZE_LOG2 - dec[pli];
}
stride = (cm->mi_cols << bsize[0]) + 2*OD_FILT_HBORDER;
for (pli = 0; pli < nplanes; pli++) {
......@@ -207,7 +207,7 @@ void av1_dering_frame(YV12_BUFFER_CONFIG *frame, AV1_COMMON *cm,
}
curr_row_dering[sbc] = 1;
for (pli = 0; pli < nplanes; pli++) {
int16_t dst[MAX_MIB_SIZE * MAX_MIB_SIZE * 8 * 8];
int16_t dst[OD_BSIZE_MAX * OD_BSIZE_MAX];
int threshold;
int coffset;
int rend, cend;
......@@ -358,7 +358,7 @@ void av1_dering_frame(YV12_BUFFER_CONFIG *frame, AV1_COMMON *cm,
(MAX_MIB_SIZE * sbr << bsize[pli]) +
(sbc * MAX_MIB_SIZE << bsize[pli])],
xd->plane[pli].dst.stride, dst, dlist,
dering_count, 3 - dec[pli]);
dering_count, bsize[pli]);
#if CONFIG_AOM_HIGHBITDEPTH
}
#endif
......
......@@ -311,7 +311,7 @@ void od_dering(int16_t *y, int16_t *in, int xdec,
od_filter_dering_orthogonal_func filter_dering_orthogonal[OD_DERINGSIZES] = {
od_filter_dering_orthogonal_4x4, od_filter_dering_orthogonal_8x8
};
bsize = 3 - xdec;
bsize = OD_DERING_SIZE_LOG2 - xdec;
if (pli == 0) {
for (bi = 0; bi < dering_count; bi++) {
int32_t var;
......
......@@ -18,6 +18,8 @@
#define OD_DERINGSIZES (2)
#define OD_DERING_SIZE_LOG2 (3)
#define OD_DERING_NBLOCKS (OD_BSIZE_MAX / 8)
/* We need to buffer three vertical lines. */
......
......@@ -58,7 +58,7 @@ int av1_dering_search(YV12_BUFFER_CONFIG *frame, const YV12_BUFFER_CONFIG *ref,
av1_setup_dst_planes(xd->plane, frame, 0, 0);
for (pli = 0; pli < 3; pli++) {
dec[pli] = xd->plane[pli].subsampling_x;
bsize[pli] = 3 - dec[pli];
bsize[pli] = OD_DERING_SIZE_LOG2 - dec[pli];
}
stride = cm->mi_cols << bsize[0];
for (r = 0; r < cm->mi_rows << bsize[0]; ++r) {
......@@ -139,7 +139,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_dering_16bit_to_16bit(dst, MAX_MIB_SIZE << bsize[0], tmp_dst, dlist,
dering_count, 3);
dering_count, bsize[0]);
cur_mse = (int)compute_dist(
dst, MAX_MIB_SIZE << bsize[0],
&ref_coeff[(sbr * stride * MAX_MIB_SIZE << bsize[0]) +
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment