~medibuntu-maintainers/mplayer/medibuntu.natty

« back to all changes in this revision

Viewing changes to tremor/sharedbook.c

  • Committer: Gauvain Pocentek
  • Date: 2010-09-25 09:39:02 UTC
  • mfrom: (66.1.6 maverick)
  • Revision ID: gauvain@images-20100925093902-9q2akz3ls3qzhaaw
* Merge from Ubuntu:
  - put back faac support
  - recommends apport-hooks-medibuntu
  - change Maintainer, Uploaders & Vcs-* fields.
* merge from debian, remaining changes:
  - build depend against, lame, x264, xvid
* debian/patches/60eval-api.patch, backport patch from upstream to
  unbreak compilation for eval.h move not yet in 0.6
* gmplayer is gone now, please see smplayer as alternative frontend.
  LP: #503537, #493088, #467534, #467524, #460326, #390399, #285570,
      #208680, #118709, #513065, #459595, #455913, #179918, #65165.
* enable the mencoder package
* sort build depends alphabetically
* enable dvdnav support, Closes: #582508, #488226, LP: #611749
* prepare new upload
* no longer build mplayer-gui, it doesn't build anymore with shared
  swscale
* merge from debian/experimental, remaining changes:
  - build depend against, lame, x264, xvid
  - enable mencoder and mplayer-gui
* ensure that quilt patches are actually applied
* New Upstream Version, LP: #539315
* Build (against) again the System FFmpeg 
* tighten dependency on FFmpeg 0.6
* remove patches merged upstream
* remove 22disable-xscreensaver.patch
* refresh patches
* readd x264, xvid and mp3lame support, LP: #606125
* remove old parallel building mechanism, fixes FTBFS
* New upstream version
* compile against internal ffmpeg for now, LP: #587203, #588097
* recompile for directfb transtion, LP: #587163
* remove patches that were merged upstream
* avoid removing DOCS/html directory. it is included in release
  tarball
* convert to source Format: 3.0 (quilt)
* refreshed patches
* remove files that are included in upstream tarball
* rework debian/rules file
  - support parallel building
  - merge build rules for mplayer and mencoder package
  - remove unreferenced COMMON_CONFIGURE_FLAGS macro
  - rename DEB_BUILD_CONFIGURE -> CONFIGURE_FLAGS
  - don't build documentation - release tarballs have them prebuilt
  - build HTML documentation only if not already avaiable in the build
    tree
  - remove remaining references to debian/strip.sh from debian/rules
* remove copied vdpau headers
* copy in mencoder.c from upstream
* enable mplayer-gui (Closes: #579925) and mencoder packages. 
  (Closes: #396954, #400940, #580168)
* Fix rtsp vulnerability. Patch applied by DSA. Closes: #581245
* Fix another integer overflow, Closes: #524805
* prepare new upload
* sync libao2/ao_pulse.c with svn r30062, Closes: #558196, #580113
* make configure use pkg-config for fribidi checks. Closes: #582784,
  LP: #556200
* document 23mplayer-debug-printf.patch
* avoid mentioning of GTK frontend in mplayer description
* improve package descriptions of mplayer-doc and mplayer-dbg
* medium urgency because of fixed security issue
* fix SVN_VERION regex in debian rules to unbreak get-orig-source
  target. Closes: #582369
* forcefully disable arts support. Closes: #581225
* Remove mencoder from Depends in mplayer-dbg package.
* new upstream snapshot from rc3 branch.
* remove patches applied upstream:
  
  - 24_enable_fontconfig_by_default.diff
  - 30_add_gmplayer_man_rules.diff
  - 40_improve_desktop_file.patch
  - 41_fix_forcedsubsonly.patch
  - 50_fix_crashes_with_invalid_SDPs.patch
  - 50_fix_initial_volume_setting_pulse_output.patch
  - 61-malloc-bsd.patch
  - 62-disable-vidix-on-kfreebsd-amd64.patch
  - 63-sys-kd-include.patch
* don't install apport hook
* gross hack to avoid building mplayer-nogui and mplayer-gui packages
* add md5sum to remove to avoid spurious conffile prompt, Closes: #568272
* Make mplayer build on kFreeBSD (backports from upstream), Closes: #578622
  - Revert obscure hack that disables the malloc.h check on certain BSD
    platforms. 
  - disable vidix on kFreeBSD-amd64
  - rename 'struct keypad' -> 'struct m_keypad' to avoid FTBFS on
    kFreeBSD/amd64
* enable fontconfig by default. (Closes: #573257)

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
}
36
36
 
37
37
/* 32 bit float (not IEEE; nonnormalized mantissa +
38
 
   biased exponent) : neeeeeee eeemmmmm mmmmmmmm mmmmmmmm 
 
38
   biased exponent) : neeeeeee eeemmmmm mmmmmmmm mmmmmmmm
39
39
   Why not IEEE?  It's just not that important here. */
40
40
 
41
41
#define VQ_FEXP 10
78
78
    long length=l[i];
79
79
    if(length>0){
80
80
      ogg_uint32_t entry=marker[length];
81
 
      
 
81
 
82
82
      /* when we claim a node for an entry, we also claim the nodes
83
83
         below it (pruning off the imagined tree that may have dangled
84
84
         from it) as well as blocking the use of any nodes directly
85
85
         above for leaves */
86
 
      
 
86
 
87
87
      /* update ourself */
88
88
      if(length<32 && (entry>>length)){
89
89
        /* error condition; the lengths must specify an overpopulated tree */
91
91
        return(NULL);
92
92
      }
93
93
      r[count++]=entry;
94
 
    
 
94
 
95
95
      /* Look to see if the next shorter marker points to the node
96
96
         above. if so, update it and repeat.  */
97
97
      {
98
98
        for(j=length;j>0;j--){
99
 
          
 
99
 
100
100
          if(marker[j]&1){
101
101
            /* have to jump branches */
102
102
            if(j==1)
109
109
          marker[j]++;
110
110
        }
111
111
      }
112
 
      
 
112
 
113
113
      /* prune the tree; the implicit invariant says all the longer
114
114
         markers were dangling from our just-taken node.  Dangle them
115
115
         from our *new* node. */
122
122
    }else
123
123
      if(sparsecount==0)count++;
124
124
  }
125
 
    
 
125
 
126
126
  /* bitreverse the words because our bitwise packer/unpacker is LSb
127
127
     endian */
128
128
  for(i=0,count=0;i<n;i++){
217
217
 
218
218
            val=VFLOAT_ADD(mindel,minpoint,val,point,&point);
219
219
            val=VFLOAT_ADD(last,lastpoint,val,point,&point);
220
 
            
 
220
 
221
221
            if(b->q_sequencep){
222
 
              last=val;   
 
222
              last=val;
223
223
              lastpoint=point;
224
224
            }
225
 
            
 
225
 
226
226
            if(sparsemap){
227
227
              r[sparsemap[count]*b->dim+k]=val;
228
228
              rp[sparsemap[count]*b->dim+k]=point;
251
251
 
252
252
            val=VFLOAT_ADD(mindel,minpoint,val,point,&point);
253
253
            val=VFLOAT_ADD(last,lastpoint,val,point,&point);
254
 
            
 
254
 
255
255
            if(b->q_sequencep){
256
 
              last=val;   
 
256
              last=val;
257
257
              lastpoint=point;
258
258
            }
259
259
 
275
275
    for(j=0;j<n*b->dim;j++)
276
276
      if(rp[j]<*maxpoint)
277
277
        r[j]>>=*maxpoint-rp[j];
278
 
            
 
278
 
279
279
    _ogg_free(rp);
280
280
    return(r);
281
281
  }
325
325
  int i,j,n=0,tabn;
326
326
  int *sortindex;
327
327
  memset(c,0,sizeof(*c));
328
 
  
 
328
 
329
329
  /* count actually used entries */
330
330
  for(i=0;i<s->entries;i++)
331
331
    if(s->lengthlist[i]>0)
338
338
  c->q_min=s->q_min;
339
339
  c->q_delta=s->q_delta;
340
340
 
341
 
  /* two different remappings go on here.  
 
341
  /* two different remappings go on here.
342
342
 
343
343
     First, we collapse the likely sparse codebook down only to
344
344
     actually represented values/words.  This collapsing needs to be
352
352
    /* perform sort */
353
353
    ogg_uint32_t *codes=_make_words(s->lengthlist,s->entries,c->used_entries);
354
354
    ogg_uint32_t **codep=(ogg_uint32_t **)alloca(sizeof(*codep)*n);
355
 
    
 
355
 
356
356
    if(codes==NULL)goto err_out;
357
357
 
358
358
    for(i=0;i<n;i++){
375
375
    _ogg_free(codes);
376
376
  }
377
377
 
378
 
  
 
378
 
379
379
  c->valuelist=_book_unquantize(s,n,sortindex,&c->binarypoint);
380
380
  c->dec_index=(int *)_ogg_malloc(n*sizeof(*c->dec_index));
381
 
  
 
381
 
382
382
  for(n=0,i=0;i<s->entries;i++)
383
383
    if(s->lengthlist[i]>0)
384
384
      c->dec_index[sortindex[n++]]=i;
385
 
 
 
385
 
386
386
  c->dec_codelengths=(char *)_ogg_malloc(n*sizeof(*c->dec_codelengths));
387
387
  for(n=0,i=0;i<s->entries;i++)
388
388
    if(s->lengthlist[i]>0)
417
417
      if(c->dec_firsttable[bitreverse(word)]==0){
418
418
        while((lo+1)<n && c->codelist[lo+1]<=word)lo++;
419
419
        while(    hi<n && word>=(c->codelist[hi]&mask))hi++;
420
 
        
 
420
 
421
421
        /* we only actually have 15 bits per hint to play with here.
422
422
           In order to overflow gracefully (nothing breaks, efficiency
423
423
           just drops), encode as the difference from the extremes. */
433
433
      }
434
434
    }
435
435
  }
436
 
  
 
436
 
437
437
 
438
438
  return(0);
439
439
 err_out: