diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-03-22 21:58:04 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-03-22 21:58:04 +0100 |
commit | 32da2fd422651f1f36f26975685cb7f7ff5a678b (patch) | |
tree | 875a560658191a7a11a660d8c1a3ff0d76799ef1 /libavcodec/nuv.c | |
parent | 82c742377a168c0a6eb7c34f7c321acdf25036e0 (diff) | |
parent | 1df0b061621b10edde87e3ab7ea83aed381c574f (diff) | |
download | ffmpeg-32da2fd422651f1f36f26975685cb7f7ff5a678b.tar.gz |
Merge commit '1df0b061621b10edde87e3ab7ea83aed381c574f'
* commit '1df0b061621b10edde87e3ab7ea83aed381c574f':
nuv: Reuse the DSPContext from RTJpegContext
Conflicts:
libavcodec/nuv.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/nuv.c')
-rw-r--r-- | libavcodec/nuv.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/libavcodec/nuv.c b/libavcodec/nuv.c index c01d6264ba..31ab1a95e8 100644 --- a/libavcodec/nuv.c +++ b/libavcodec/nuv.c @@ -41,7 +41,6 @@ typedef struct { unsigned char *decomp_buf; uint32_t lq[64], cq[64]; RTJpegContext rtj; - DSPContext dsp; } NuvContext; static const uint8_t fallback_lquant[] = { @@ -139,13 +138,11 @@ static int codec_reinit(AVCodecContext *avctx, int width, int height, "Can't allocate decompression buffer.\n"); return AVERROR(ENOMEM); } - ff_rtjpeg_decode_init(&c->rtj, &c->dsp, c->width, c->height, - c->lq, c->cq); + ff_rtjpeg_decode_init(&c->rtj, c->width, c->height, c->lq, c->cq); av_frame_unref(c->pic); return 1; } else if (quality != c->quality) - ff_rtjpeg_decode_init(&c->rtj, &c->dsp, c->width, c->height, - c->lq, c->cq); + ff_rtjpeg_decode_init(&c->rtj, c->width, c->height, c->lq, c->cq); return 0; } @@ -184,8 +181,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, ret = get_quant(avctx, c, buf, buf_size); if (ret < 0) return ret; - ff_rtjpeg_decode_init(&c->rtj, &c->dsp, c->width, c->height, c->lq, - c->cq); + ff_rtjpeg_decode_init(&c->rtj, c->width, c->height, c->lq, c->cq); return orig_size; } @@ -323,7 +319,7 @@ static av_cold int decode_init(AVCodecContext *avctx) if (avctx->extradata_size) get_quant(avctx, c, avctx->extradata, avctx->extradata_size); - ff_dsputil_init(&c->dsp, avctx); + ff_rtjpeg_init(&c->rtj, avctx); if ((ret = codec_reinit(avctx, avctx->width, avctx->height, -1)) < 0) return ret; |