Logo Search packages:      
Sourcecode: libtheora version File versions  Download package

int theora_decode_init ( theora_state th,
theora_info c 
)

Initialize a theora_state handle for decoding.

Parameters:
thThe theora_state handle to initialize.
cA theora_info struct filled with the desired decoding parameters. This is of course usually obtained from a previous call to theora_decode_header().
Return values:
0Success

Definition at line 295 of file toplevel.c.

References theora_decode_init().

Referenced by theora_decode_init().

                                                        {
  PB_INSTANCE *pbi;
  codec_setup_info *ci;

  ci=(codec_setup_info *)c->codec_setup;
  memset(th, 0, sizeof(*th));
  th->internal_decode=pbi=_ogg_calloc(1,sizeof(*pbi));
  th->internal_encode=NULL;

  InitPBInstance(pbi);
  memcpy(&pbi->info,c,sizeof(*c));
  pbi->info.codec_setup=NULL;
  th->i=&pbi->info;
  th->granulepos=-1;

  InitFrameDetails(pbi);

  pbi->keyframe_granule_shift=_ilog(c->keyframe_frequency_force-1);

  pbi->LastFrameQualityValue = 0;
  pbi->DecoderErrorCode = 0;

  /* Clear down the YUVtoRGB conversion skipped list. */
  memset(pbi->skipped_display_fragments, 0, pbi->UnitFragments );

  /* Initialise quantiser and in-loop filter */
  CopyQTables(pbi, ci);
  CopyFilterTables(pbi, ci);

  /* Huffman setup */
  InitHuffmanTrees(pbi, ci);

  return(0);

}

Here is the call graph for this function:

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index