Commit 2e40cc4c authored by Steinar Midtskogen's avatar Steinar Midtskogen Committed by Yaowu Xu
Browse files

Bugfix in the CLPF RDO.

When CLPF was extended to chroma, the chroma RDO accidentally
discarded the optimal block size found in the luma RDO.

PSNR YCbCr:     -0.25%      0.05%      0.06%
   PSNRHVS:     -0.19%
      SSIM:     -0.36%
    MSSSIM:     -0.23%

Conflicts:
	av1/common/clpf.c

Change-Id: Ie49cd30f9276a311ada88cb2f13d14757617f030
parent 25faa0e9
......@@ -108,12 +108,9 @@ int av1_clpf_frame(const YV12_BUFFER_CONFIG *frame,
: frame->y_buffer;
uint8_t *dst_buffer;
// Make buffer space for in-place filtering
#if CONFIG_AOM_HIGHBITDEPTH
strength <<= (cm->bit_depth - 8);
#endif
// Make buffer space for in-place filtering
#if CONFIG_AOM_HIGHBITDEPTH
CHECK_MEM_ERROR(cm, cache, aom_malloc(cache_size << !!cm->use_highbitdepth));
dst_buffer = cm->use_highbitdepth ? CONVERT_TO_BYTEPTR(cache) : cache;
#else
......
......@@ -332,6 +332,6 @@ void av1_clpf_test_frame(const YV12_BUFFER_CONFIG *rec,
for (j = 0; j < 4; j++)
if ((!c || j) && sums[c][j] < best) best = sums[c][j];
best &= 15;
*best_bs = (best > 3) * (5 + (best < 12) + (best < 8));
if (best_bs) *best_bs = (best > 3) * (5 + (best < 12) + (best < 8));
*best_strength = best ? 1 << ((best - 1) & 3) : 0;
}
......@@ -3438,10 +3438,8 @@ static void loopfilter_frame(AV1_COMP *cpi, AV1_COMMON *cm) {
int fb_size_log2, strength_y, strength_u, strength_v;
av1_clpf_test_frame(frame, cpi->Source, cm, &strength_y, &fb_size_log2,
AOM_PLANE_Y);
av1_clpf_test_frame(frame, cpi->Source, cm, &strength_u, &fb_size_log2,
AOM_PLANE_U);
av1_clpf_test_frame(frame, cpi->Source, cm, &strength_v, &fb_size_log2,
AOM_PLANE_V);
av1_clpf_test_frame(frame, cpi->Source, cm, &strength_u, 0, AOM_PLANE_U);
av1_clpf_test_frame(frame, cpi->Source, cm, &strength_v, 0, AOM_PLANE_V);
if (!fb_size_log2) fb_size_log2 = get_msb(MAX_FB_SIZE);
......
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