~ubuntu-branches/ubuntu/trusty/libtheora/trusty-proposed

« back to all changes in this revision

Viewing changes to lib/enc/frinit.c

  • Committer: Bazaar Package Importer
  • Author(s): Clint Adams
  • Date: 2008-04-23 14:08:37 UTC
  • mfrom: (1.1.6 upstream) (3.1.2 lenny)
  • Revision ID: james.westby@ubuntu.com-20080423140837-t981xtgv43carzk8
Tags: 1.0~beta3-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
 ********************************************************************
12
12
 
13
13
  function:
14
 
  last mod: $Id: frinit.c 13884 2007-09-22 08:38:10Z giles $
 
14
  last mod: $Id: frinit.c 14059 2007-10-28 23:43:27Z xiphmont $
15
15
 
16
16
 ********************************************************************/
17
17
 
141
141
  if(pbi->FragCoefEOB) _ogg_free(pbi->FragCoefEOB);
142
142
  if(pbi->skipped_display_fragments) _ogg_free(pbi->skipped_display_fragments);
143
143
  if(pbi->QFragData) _ogg_free(pbi->QFragData);
 
144
#ifdef _TH_DEBUG_
 
145
  if(pbi->QFragTIME) _ogg_free(pbi->QFragTIME);
 
146
  if(pbi->QFragFREQ) _ogg_free(pbi->QFragFREQ);
 
147
  if(pbi->QFragQUAN) _ogg_free(pbi->QFragQUAN);
 
148
  pbi->QFragTIME = 0;
 
149
  pbi->QFragFREQ = 0;
 
150
  pbi->QFragQUAN = 0;
 
151
#endif
144
152
  if(pbi->TokenList) _ogg_free(pbi->TokenList);
145
153
  if(pbi->FragCodingMethod) _ogg_free(pbi->FragCodingMethod);
146
154
  if(pbi->FragCoordinates) _ogg_free(pbi->FragCoordinates);
235
243
  pbi->QFragData =
236
244
    _ogg_malloc(pbi->UnitFragments * sizeof(*pbi->QFragData));
237
245
 
 
246
#ifdef _TH_DEBUG_
 
247
 
 
248
  pbi->QFragTIME =
 
249
    _ogg_malloc(pbi->UnitFragments * sizeof(*pbi->QFragTIME));
 
250
 
 
251
  pbi->QFragFREQ =
 
252
    _ogg_malloc(pbi->UnitFragments * sizeof(*pbi->QFragFREQ));
 
253
 
 
254
  pbi->QFragQUAN =
 
255
    _ogg_malloc(pbi->UnitFragments * sizeof(*pbi->QFragQUAN));
 
256
 
 
257
#endif
 
258
 
238
259
  pbi->TokenList =
239
260
    _ogg_malloc(pbi->UnitFragments * sizeof(*pbi->TokenList));
240
261
 
374
395
  pbi->SuperBlocks = pbi->YSuperBlocks+2*pbi->UVSuperBlocks;
375
396
 
376
397
  /* Useful externals */
377
 
  pbi->YMacroBlocks = ((pbi->VFragments+1)/2)*((pbi->HFragments+1)/2);
378
 
  pbi->UVMacroBlocks = ((pbi->VFragments/2+1)/2)*((pbi->HFragments/2+1)/2);
379
 
  pbi->MacroBlocks = pbi->YMacroBlocks+2*pbi->UVMacroBlocks;
 
398
  pbi->MacroBlocks = ((pbi->VFragments+1)/2)*((pbi->HFragments+1)/2);
380
399
 
381
400
  InitFragmentInfo(pbi);
382
401
  InitFrameInfo(pbi, FrameSize);