示例#1
0
Int CVTCDecoder::decUpdateStateAC(Int c)
{
  Int err;
  Int x, y;
  Int nc;
  Int xc[3], yc[3];

  err=0;

  /* loop through DC */
  noteDetail("Updating state of AC bands....");
  for (x = 0; x < mzte_codec.m_iDCWidth; ++x)
    for (y = 0; y < mzte_codec.m_iDCHeight; ++y)
    {
      if ((nc = findChild(x, y, xc, yc,c)) != 3)
      {
	noteError("DC band coefficient has %d children instead of 3.", nc);
	exit(-1);
      }
      
      updateCoeffAndDescState(xc[0], yc[0], c);
      updateCoeffAndDescState(xc[1], yc[1], c);
      updateCoeffAndDescState(xc[2], yc[2], c);
    }
  
  noteDetail("Completed updating state of AC bands.");

  return err;
}
示例#2
0
/* hjlee 0901 */
Int CVTCDecoder::decUpdateStateAC_spa(Int c)
{  
  Int err,h,w,hstart,wstart,hend,wend;

  err=0;

  /* loop through DC */
  noteDetail("Updating state of AC bands (difference)....");

  hstart=mzte_codec.m_SPlayer[c].height/2;
  wstart=mzte_codec.m_SPlayer[c].width/2;
  hend=mzte_codec.m_SPlayer[c].height;
  wend=mzte_codec.m_SPlayer[c].width;

  for(h=0;h<hstart;h++)
    for(w=wstart;w<wend;w++)
      updateCoeffAndDescState(w, h, c);

  for(h=hstart;h<hend;h++)
    for(w=0;w<wend;w++)
      updateCoeffAndDescState(w, h, c);
   
  noteDetail("Completed updating state of AC bands.");

  return err;
}
示例#3
0
Void CVTCCommon::updateCoeffAndDescState(Int x, Int y, Int c)
{
  Int i;
  Int xc[4], yc[4]; /* coords of children */
  Int nc; /* number of children */

  /* Are we at a leaf? */
  if ((nc = findChild(x, y, xc, yc, c)) > 0)
  {
    /* No - mark descendents in all branches */
    for (i = 0; i < nc; ++i)
      updateCoeffAndDescState(xc[i], yc[i], c);
  }
  
  /* Updates state in coeffTable */
  updateState(x, y, COEFF_TYPE(x, y, c), c);
}