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

« back to all changes in this revision

Viewing changes to libavcodec/nuv.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:
24
24
 
25
25
#include "libavutil/bswap.h"
26
26
#include "libavutil/common.h"
 
27
#include "libavutil/intreadwrite.h"
27
28
#include "libavutil/lzo.h"
28
29
#include "libavutil/imgutils.h"
29
30
#include "avcodec.h"
 
31
#include "idctdsp.h"
30
32
#include "internal.h"
31
33
#include "rtjpeg.h"
32
34
 
39
41
    unsigned char *decomp_buf;
40
42
    uint32_t lq[64], cq[64];
41
43
    RTJpegContext rtj;
42
 
    DSPContext dsp;
43
44
} NuvContext;
44
45
 
45
46
static const uint8_t fallback_lquant[] = {
135
136
            return AVERROR(ENOMEM);
136
137
        } else
137
138
            c->decomp_buf = ptr;
138
 
        ff_rtjpeg_decode_init(&c->rtj, &c->dsp, c->width, c->height,
139
 
                              c->lq, c->cq);
 
139
        ff_rtjpeg_decode_init(&c->rtj, c->width, c->height, c->lq, c->cq);
140
140
        av_frame_unref(c->pic);
141
141
    } else if (quality != c->quality)
142
 
        ff_rtjpeg_decode_init(&c->rtj, &c->dsp, c->width, c->height,
143
 
                              c->lq, c->cq);
 
142
        ff_rtjpeg_decode_init(&c->rtj, c->width, c->height, c->lq, c->cq);
144
143
 
145
144
    return 0;
146
145
}
178
177
        ret       = get_quant(avctx, c, buf, buf_size);
179
178
        if (ret < 0)
180
179
            return ret;
181
 
        ff_rtjpeg_decode_init(&c->rtj, &c->dsp, c->width, c->height, c->lq,
182
 
                              c->cq);
 
180
        ff_rtjpeg_decode_init(&c->rtj, c->width, c->height, c->lq, c->cq);
183
181
        return orig_size;
184
182
    }
185
183
 
307
305
    if (avctx->extradata_size)
308
306
        get_quant(avctx, c, avctx->extradata, avctx->extradata_size);
309
307
 
310
 
    ff_dsputil_init(&c->dsp, avctx);
 
308
    ff_rtjpeg_init(&c->rtj, avctx);
311
309
 
312
310
    if ((ret = codec_reinit(avctx, avctx->width, avctx->height, -1)) < 0)
313
311
        return ret;