Removing lossless flag from the bitstream.
Change-Id: If6aee510cbc4910f2f24fcd92dddc65fdf8edeea
This commit is contained in:
		@@ -989,7 +989,14 @@ int vp9_decode_frame(VP9D_COMP *pbi, const uint8_t **p_data_end) {
 | 
				
			|||||||
  pc->clamp_type = (CLAMP_TYPE)vp9_read_bit(&header_bc);
 | 
					  pc->clamp_type = (CLAMP_TYPE)vp9_read_bit(&header_bc);
 | 
				
			||||||
  pc->error_resilient_mode = vp9_read_bit(&header_bc);
 | 
					  pc->error_resilient_mode = vp9_read_bit(&header_bc);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  xd->lossless = vp9_read_bit(&header_bc);
 | 
					  setup_loopfilter(pc, xd, &header_bc);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  setup_quantization(pbi, &header_bc);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  xd->lossless = pc->base_qindex == 0 &&
 | 
				
			||||||
 | 
					                 pc->y_dc_delta_q == 0 &&
 | 
				
			||||||
 | 
					                 pc->uv_dc_delta_q == 0 &&
 | 
				
			||||||
 | 
					                 pc->uv_ac_delta_q == 0;
 | 
				
			||||||
  if (xd->lossless) {
 | 
					  if (xd->lossless) {
 | 
				
			||||||
    xd->inv_txm4x4_1      = vp9_short_iwalsh4x4_1;
 | 
					    xd->inv_txm4x4_1      = vp9_short_iwalsh4x4_1;
 | 
				
			||||||
    xd->inv_txm4x4        = vp9_short_iwalsh4x4;
 | 
					    xd->inv_txm4x4        = vp9_short_iwalsh4x4;
 | 
				
			||||||
@@ -1004,10 +1011,6 @@ int vp9_decode_frame(VP9D_COMP *pbi, const uint8_t **p_data_end) {
 | 
				
			|||||||
    xd->itxm_add_uv_block = vp9_idct_add_uv_block;
 | 
					    xd->itxm_add_uv_block = vp9_idct_add_uv_block;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  setup_loopfilter(pc, xd, &header_bc);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  setup_quantization(pbi, &header_bc);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  // Determine if the golden frame or ARF buffer should be updated and how.
 | 
					  // Determine if the golden frame or ARF buffer should be updated and how.
 | 
				
			||||||
  // For all non key frames the GF and ARF refresh flags and sign bias
 | 
					  // For all non key frames the GF and ARF refresh flags and sign bias
 | 
				
			||||||
  // flags must be set explicitly.
 | 
					  // flags must be set explicitly.
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1566,9 +1566,6 @@ void vp9_pack_bitstream(VP9_COMP *cpi, uint8_t *dest, unsigned long *size) {
 | 
				
			|||||||
  // error resilient mode
 | 
					  // error resilient mode
 | 
				
			||||||
  vp9_write_bit(&header_bc, pc->error_resilient_mode);
 | 
					  vp9_write_bit(&header_bc, pc->error_resilient_mode);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // lossless mode: note this needs to be before loopfilter
 | 
					 | 
				
			||||||
  vp9_write_bit(&header_bc, cpi->mb.e_mbd.lossless);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  encode_loopfilter(pc, xd, &header_bc);
 | 
					  encode_loopfilter(pc, xd, &header_bc);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  encode_quantization(pc, &header_bc);
 | 
					  encode_quantization(pc, &header_bc);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1269,10 +1269,10 @@ static void encode_frame_internal(VP9_COMP *cpi) {
 | 
				
			|||||||
  vp9_zero(cpi->coef_counts_32x32);
 | 
					  vp9_zero(cpi->coef_counts_32x32);
 | 
				
			||||||
  vp9_zero(cm->fc.eob_branch_counts);
 | 
					  vp9_zero(cm->fc.eob_branch_counts);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  cpi->mb.e_mbd.lossless = (cm->base_qindex == 0 &&
 | 
					  cpi->mb.e_mbd.lossless = cm->base_qindex == 0 &&
 | 
				
			||||||
                            cm->y_dc_delta_q == 0 &&
 | 
					                           cm->y_dc_delta_q == 0 &&
 | 
				
			||||||
                            cm->uv_dc_delta_q == 0 &&
 | 
					                           cm->uv_dc_delta_q == 0 &&
 | 
				
			||||||
                            cm->uv_ac_delta_q == 0);
 | 
					                           cm->uv_ac_delta_q == 0;
 | 
				
			||||||
  switch_lossless_mode(cpi, cpi->mb.e_mbd.lossless);
 | 
					  switch_lossless_mode(cpi, cpi->mb.e_mbd.lossless);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  vp9_frame_init_quantizer(cpi);
 | 
					  vp9_frame_init_quantizer(cpi);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user