예제 #1
0
파일: pb.c 프로젝트: BackupTheBerlios/enix
void InitTmpBuffers(PB_INSTANCE * pbi){

  /* clear any existing info */
  ClearTmpBuffers(pbi);

  /* Adjust the position of all of our temporary */
  pbi->ReconDataBuffer      =
    _ogg_malloc(64*sizeof(*pbi->ReconDataBuffer));

  pbi->DequantBuffer        =
    _ogg_malloc(64 * sizeof(*pbi->DequantBuffer));

  pbi->TmpDataBuffer        =
    _ogg_malloc(64 * sizeof(*pbi->TmpDataBuffer));

  pbi->TmpReconBuffer       =
    _ogg_malloc(64 * sizeof(*pbi->TmpReconBuffer));

  pbi->dequant_Y_coeffs     =
    _ogg_malloc(64 * sizeof(*pbi->dequant_Y_coeffs));

  pbi->dequant_UV_coeffs    =
    _ogg_malloc(64 * sizeof(*pbi->dequant_UV_coeffs));

  pbi->dequant_Inter_coeffs =
    _ogg_malloc(64 * sizeof(*pbi->dequant_Inter_coeffs));

  pbi->dequant_InterUV_coeffs =
    _ogg_malloc(64 * sizeof(*pbi->dequant_InterUV_coeffs));

}
예제 #2
0
파일: pb.c 프로젝트: BackupTheBerlios/enix
void ClearPBInstance(PB_INSTANCE *pbi){
  if(pbi){
    ClearTmpBuffers(pbi);
    if (pbi->opb) {
      _ogg_free(pbi->opb);
    }
  }
}
예제 #3
0
void theora_encoder_clear (CP_INSTANCE * cpi){
  if(cpi){
    
    ClearHuffmanSet(&cpi->pb);
    ClearFragmentInfo(&cpi->pb);
    ClearFrameInfo(&cpi->pb);
    EClearFragmentInfo(cpi);
    EClearFrameInfo(cpi);
    ClearTmpBuffers(&cpi->pb);
    ClearPPInstance(&cpi->pp);
    
    oggpackB_writeclear(cpi->oggbuffer);
    _ogg_free(cpi->oggbuffer);
    _ogg_free(cpi);
  }
}
예제 #4
0
static void theora_encode_clear (theora_state  *th){
  CP_INSTANCE *cpi;
  cpi=(CP_INSTANCE *)th->internal_encode;
  if(cpi){

    ClearHuffmanSet(&cpi->pb);
    ClearFragmentInfo(&cpi->pb);
    ClearFrameInfo(&cpi->pb);
    EClearFragmentInfo(cpi);
    EClearFrameInfo(cpi);
    ClearTmpBuffers(&cpi->pb);
    ClearPPInstance(&cpi->pp);

    oggpackB_writeclear(cpi->oggbuffer);
    _ogg_free(cpi->oggbuffer);
    _ogg_free(cpi);
  }

  memset(th,0,sizeof(*th));
}