Do not allow lossless encoding if delta_q is present
Lossless doesn't make sense with delta_q. However, one can argue that
with delta_q it may make sense to do lossless encoding temporarily,
but this doesn't seem to work in the encoder currently.
BUG=aomedia:1645
Change-Id: I075625298efe8d6b0f83efcab1233b6b4acc11de
diff --git a/av1/encoder/av1_quantize.c b/av1/encoder/av1_quantize.c
index 191e7f5..28e250e 100644
--- a/av1/encoder/av1_quantize.c
+++ b/av1/encoder/av1_quantize.c
@@ -712,7 +712,7 @@
void av1_set_quantizer(AV1_COMMON *cm, int q) {
// quantizer has to be reinitialized with av1_init_quantizer() if any
// delta_q changes.
- cm->base_qindex = q;
+ cm->base_qindex = AOMMAX(cm->delta_q_present_flag, q);
cm->y_dc_delta_q = 0;
cm->u_dc_delta_q = 0;
cm->u_ac_delta_q = 0;