~ubuntu-branches/ubuntu/jaunty/xvidcap/jaunty-proposed

« back to all changes in this revision

Viewing changes to ffmpeg/libavcodec/ra144.c

  • Committer: Bazaar Package Importer
  • Author(s): Lionel Le Folgoc, Andrew Starr-Bochicchio, Lionel Le Folgoc
  • Date: 2008-12-26 00:10:06 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20081226001006-2040ls9680bd1blt
Tags: 1.1.7-0.2ubuntu1
[ Andrew Starr-Bochicchio ]
* Merge from debian-multimedia (LP: #298547), Ubuntu Changes:
 - For ffmpeg-related build-deps, fix versionized dependencies
   as the ubuntu versioning is different than debian-multimedia's.

[ Lionel Le Folgoc ]
* LP: #311412 is fixed since the 1.1.7~rc1-0.1 revision.
* debian/patches/03_ffmpeg.diff: updated to fix FTBFS due to libswscale API
  change (cherry-pick from Gentoo #234383).

Show diffs side-by-side

added added

removed removed

Lines of Context:
251
251
}
252
252
 
253
253
/* Decode 20-byte input */
254
 
static void unpack_input(unsigned char *input, unsigned int *output)
 
254
static void unpack_input(const unsigned char *input, unsigned int *output)
255
255
{
256
256
  unsigned int outbuffer[28];
257
257
  unsigned short inbuffer[10];
427
427
/* Uncompress one block (20 bytes -> 160*2 bytes) */
428
428
static int ra144_decode_frame(AVCodecContext * avctx,
429
429
            void *vdata, int *data_size,
430
 
            uint8_t * buf, int buf_size)
 
430
            const uint8_t * buf, int buf_size)
431
431
{
432
432
  unsigned int a,b,c;
433
 
  long s;
434
433
  signed short *shptr;
435
434
  unsigned int *lptr,*temp;
436
435
  const short **dptr;
484
483
    glob->resetflag=0;
485
484
 
486
485
    shptr=glob->output_buffer;
487
 
    while (shptr<glob->output_buffer+BLOCKSIZE) {
488
 
      s=*(shptr++)<<2;
489
 
      *data=s;
490
 
      if (s>32767) *data=32767;
491
 
      if (s<-32767) *data=-32768;
492
 
      data++;
493
 
    }
 
486
    while (shptr<glob->output_buffer+BLOCKSIZE)
 
487
      *data++=av_clip_int16(*(shptr++)<<2);
494
488
    b+=30;
495
489
  }
496
490
 
516
510
    NULL,
517
511
    NULL,
518
512
    ra144_decode_frame,
 
513
    .long_name = "RealAudio 1.0 (14.4K)",
519
514
};