~ubuntu-branches/ubuntu/utopic/libav/utopic-proposed

« back to all changes in this revision

Viewing changes to libavcodec/ac3dec.c

  • Committer: Package Import Robot
  • Author(s): Reinhard Tartler, Reinhard Tartler, Rico Tzschichholz
  • Date: 2014-08-30 11:02:45 UTC
  • mfrom: (1.3.47 sid)
  • Revision ID: package-import@ubuntu.com-20140830110245-io3dg7q85wfr7125
Tags: 6:11~beta1-2
[ Reinhard Tartler ]
* Make libavcodec-dev depend on libavresample-dev

[ Rico Tzschichholz ]
* Some fixes and leftovers from soname bumps

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
#include "libavutil/crc.h"
34
34
#include "libavutil/downmix_info.h"
35
35
#include "libavutil/opt.h"
 
36
#include "bswapdsp.h"
36
37
#include "internal.h"
37
38
#include "aac_ac3_parser.h"
38
39
#include "ac3_parser.h"
180
181
    ff_mdct_init(&s->imdct_256, 8, 1, 1.0);
181
182
    ff_mdct_init(&s->imdct_512, 9, 1, 1.0);
182
183
    ff_kbd_window_init(s->window, 5.0, 256);
183
 
    ff_dsputil_init(&s->dsp, avctx);
 
184
    ff_bswapdsp_init(&s->bdsp);
184
185
    avpriv_float_dsp_init(&s->fdsp, avctx->flags & CODEC_FLAG_BITEXACT);
185
186
    ff_ac3dsp_init(&s->ac3dsp, avctx->flags & CODEC_FLAG_BITEXACT);
186
187
    ff_fmt_convert_init(&s->fmt_conv, avctx);
1325
1326
    if (buf_size >= 2 && AV_RB16(buf) == 0x770B) {
1326
1327
        // seems to be byte-swapped AC-3
1327
1328
        int cnt = FFMIN(buf_size, AC3_FRAME_BUFFER_SIZE) >> 1;
1328
 
        s->dsp.bswap16_buf((uint16_t *)s->input_buffer, (const uint16_t *)buf, cnt);
 
1329
        s->bdsp.bswap16_buf((uint16_t *) s->input_buffer,
 
1330
                            (const uint16_t *) buf, cnt);
1329
1331
    } else
1330
1332
        memcpy(s->input_buffer, buf, FFMIN(buf_size, AC3_FRAME_BUFFER_SIZE));
1331
1333
    buf = s->input_buffer;