Remove PVQ_CHROMA_RD codes
Which was a workaround to balance the quality between
luma and chroma when PVQ is enabled, by
1) skipping PVQ DC RDO for chroma and
2) using smaller lambda value (x0.5) for intra prediction of chroma,
intended to spend more bits and thus improve quality for chroma.
The change in metric for 5 frames of objective-1-fast is:
PSNR PSNR-HVS SSIM CIEDE-2000 PSNR Cb PSNR Cr MS-SSIM
-1.45 -1.54 -1.46 4.62 13.71 14.87 -1.47
For still images (subset1)
PSNR PSNR-HVS SSIM CIEDE-2000 PSNR Cb PSNR Cr MS-SSIM VMAF
-1.52 -1.54 -1.60 2.56 11.92 12.17 -1.52 -1.66
Change-Id: I31c4d7a7de2939f6004c112649f7303f0e944156
diff --git a/av1/encoder/encodemb.c b/av1/encoder/encodemb.c
index 5f4e981..7de97d9 100644
--- a/av1/encoder/encodemb.c
+++ b/av1/encoder/encodemb.c
@@ -1155,9 +1155,6 @@
int has_dc_skip = 1;
int i;
int off = od_qm_offset(tx_size, plane ? 1 : 0);
-#if PVQ_CHROMA_RD
- double save_pvq_lambda;
-#endif
DECLARE_ALIGNED(16, tran_low_t, coeff_pvq[OD_TXSIZE_MAX * OD_TXSIZE_MAX]);
DECLARE_ALIGNED(16, tran_low_t, ref_coeff_pvq[OD_TXSIZE_MAX * OD_TXSIZE_MAX]);
@@ -1198,12 +1195,6 @@
in_int32[i] = coeff_pvq[i] << (OD_COEFF_SHIFT - coeff_shift);
}
-#if PVQ_CHROMA_RD
- if (plane != 0) {
- save_pvq_lambda = daala_enc->pvq_norm_lambda;
- daala_enc->pvq_norm_lambda *= 0.8;
- }
-#endif
if (abs(in_int32[0] - ref_int32[0]) < pvq_dc_quant * 141 / 256) { /* 0.55 */
out_int32[0] = 0;
} else {
@@ -1260,9 +1251,7 @@
#error "CONFIG_PVQ currently requires CONFIG_DAALA_EC."
#endif
assert(*rate >= 0);
-#if PVQ_CHROMA_RD
- if (plane != 0) daala_enc->pvq_norm_lambda = save_pvq_lambda;
-#endif
+
return ac_dc_coded;
}