vp10: only assume ONLY_4X4 if segmentation is disabled.
authorRonald S. Bultje <rsbultje@gmail.com>
Mon, 4 Jan 2016 20:13:29 +0000 (15:13 -0500)
committerRonald S. Bultje <rsbultje@gmail.com>
Mon, 4 Jan 2016 20:21:02 +0000 (15:21 -0500)
Otherwise, per-segment lossless might mean that some segments are not
lossless and they could still want to use another mode. The per-block
tx points remain uncoded on blocks where (per the segment id) the Q
value implies lossless.

Change-Id: If210206ab1fe3dd11976797370c77f961f13dfa0

vp10/decoder/decodeframe.c
vp10/encoder/bitstream.c

index c0fbc49..2bfedf6 100644 (file)
@@ -2109,8 +2109,8 @@ static size_t read_uncompressed_header(VP10Decoder *pbi,
 
   setup_segmentation_dequant(cm);
 #if CONFIG_MISC_FIXES
-  cm->tx_mode = (xd->lossless[0]) ? ONLY_4X4
-                                  : read_tx_mode(rb);
+  cm->tx_mode = (!cm->seg.enabled && xd->lossless[0]) ? ONLY_4X4
+                                                      : read_tx_mode(rb);
   cm->reference_mode = read_frame_reference_mode(cm, rb);
 #endif
 
index 477752a..d4b8c36 100644 (file)
@@ -1261,7 +1261,7 @@ static void write_uncompressed_header(VP10_COMP *cpi,
   encode_quantization(cm, wb);
   encode_segmentation(cm, xd, wb);
 #if CONFIG_MISC_FIXES
-  if (xd->lossless[0])
+  if (!cm->seg.enabled && xd->lossless[0])
     cm->tx_mode = TX_4X4;
   else
     write_txfm_mode(cm->tx_mode, wb);