예제 #1
0
/*
 * Decode a 1x2 mcu
 *  .---.
 *  | 1 |
 *  |---|
 *  | 2 |
 *  `---'
 */
static void decode_MCU_1x2_1plane(struct jdec_private *priv)
{
  // Y
  process_Huffman_data_unit(priv, cY);
  IDCT(&priv->component_infos[cY], priv->Y, 8);
  process_Huffman_data_unit(priv, cY);
  IDCT(&priv->component_infos[cY], priv->Y+64, 8);

  // Cb
  process_Huffman_data_unit(priv, cCb);

  // Cr
  process_Huffman_data_unit(priv, cCr);
}
예제 #2
0
/*
 * Decode all the 3 components for 1x1 
 */
static void decode_MCU_1x1_3planes(struct jdec_private *priv)
{
  // Y
  process_Huffman_data_unit(priv, cY);
  IDCT(&priv->component_infos[cY], priv->Y, 8);
  
  // Cb
  process_Huffman_data_unit(priv, cCb);
  IDCT(&priv->component_infos[cCb], priv->Cb, 8);

  // Cr
  process_Huffman_data_unit(priv, cCr);
  IDCT(&priv->component_infos[cCr], priv->Cr, 8);
}
예제 #3
0
파일: huffman.c 프로젝트: paav2015/paav2015
int process_huffman_mcu(struct huffman_context *hc, struct jdec_task *hdata, struct idct_data *idata){
	// Y
	int i;
	for (i=0; i<4; i++){
		if(process_Huffman_data_unit(hc, hdata, cY, idata->DCT_Y[i])){
			return -1;
		}
	}
	//Cb
	if(process_Huffman_data_unit(hc, hdata, cCb, idata->DCT_C[0])){
		return -1;
	}
	//Cr
	if(process_Huffman_data_unit(hc, hdata, cCr, idata->DCT_C[1])){
		return -1;
	}
	return 0;
}