diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2013-03-11 01:23:52 +0400 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2013-04-20 00:18:38 +0400 |
commit | 28bc406c84b04a5f1458b90ff52ddbec73e46202 (patch) | |
tree | 1fad9fb31fa192351889a3bfa943b6cc02024925 /libavcodec | |
parent | 1277dc07fbe6ec6d7a10312a053e482e6070c52b (diff) |
mjpeg: Use hpeldsp instead of dsputil for half-pel functions
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/mjpegdec.c | 9 | ||||
-rw-r--r-- | libavcodec/mjpegdec.h | 2 |
2 files changed, 7 insertions, 4 deletions
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index abc32d11c1..61ebabc77d 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -89,6 +89,7 @@ av_cold int ff_mjpeg_decode_init(AVCodecContext *avctx) s->picture_ptr = &s->picture; s->avctx = avctx; + ff_hpeldsp_init(&s->hdsp, avctx->flags); ff_dsputil_init(&s->dsp, avctx); ff_init_scantable(s->dsp.idct_permutation, &s->scantable, ff_zigzag_direct); s->buffer_size = 0; @@ -858,7 +859,7 @@ static int mjpeg_decode_scan(MJpegDecodeContext *s, int nb_components, int Ah, ptr = data[c] + block_offset; if (!s->progressive) { if (copy_mb) - s->dsp.put_pixels_tab[1][0](ptr, + s->hdsp.put_pixels_tab[1][0](ptr, reference_data[c] + block_offset, linesize[c], 8); else { @@ -974,9 +975,9 @@ static int mjpeg_decode_scan_progressive_ac(MJpegDecodeContext *s, int ss, if (last_scan) { if (copy_mb) { - s->dsp.put_pixels_tab[1][0](ptr, - reference_data + block_offset, - linesize, 8); + s->hdsp.put_pixels_tab[1][0](ptr, + reference_data + block_offset, + linesize, 8); } else { s->dsp.idct_put(ptr, linesize, *block); ptr += 8; diff --git a/libavcodec/mjpegdec.h b/libavcodec/mjpegdec.h index d48877e650..36598dd5e0 100644 --- a/libavcodec/mjpegdec.h +++ b/libavcodec/mjpegdec.h @@ -34,6 +34,7 @@ #include "avcodec.h" #include "get_bits.h" #include "dsputil.h" +#include "hpeldsp.h" #define MAX_COMPONENTS 4 @@ -94,6 +95,7 @@ typedef struct MJpegDecodeContext { uint64_t coefs_finished[MAX_COMPONENTS]; ///< bitmask of which coefs have been completely decoded (progressive mode) ScanTable scantable; DSPContext dsp; + HpelDSPContext hdsp; int restart_interval; int restart_count; |