Commit 28bc406c authored by Ronald S. Bultje's avatar Ronald S. Bultje Committed by Martin Storsjö

mjpeg: Use hpeldsp instead of dsputil for half-pel functions

Signed-off-by: 's avatarMartin Storsjö <martin@martin.st>
parent 1277dc07
...@@ -1525,7 +1525,7 @@ alac_encoder_select="lpc" ...@@ -1525,7 +1525,7 @@ alac_encoder_select="lpc"
als_decoder_select="dsputil" als_decoder_select="dsputil"
amrnb_decoder_select="lsp" amrnb_decoder_select="lsp"
amrwb_decoder_select="lsp" amrwb_decoder_select="lsp"
amv_decoder_select="dsputil" amv_decoder_select="dsputil hpeldsp"
ape_decoder_select="dsputil" ape_decoder_select="dsputil"
asv1_decoder_select="dsputil" asv1_decoder_select="dsputil"
asv1_encoder_select="dsputil" asv1_encoder_select="dsputil"
...@@ -1580,7 +1580,7 @@ iac_decoder_select="dsputil fft mdct sinewin" ...@@ -1580,7 +1580,7 @@ iac_decoder_select="dsputil fft mdct sinewin"
imc_decoder_select="dsputil fft mdct sinewin" imc_decoder_select="dsputil fft mdct sinewin"
indeo3_decoder_select="hpeldsp" indeo3_decoder_select="hpeldsp"
interplay_video_decoder_select="hpeldsp" interplay_video_decoder_select="hpeldsp"
jpegls_decoder_select="dsputil golomb" jpegls_decoder_select="dsputil golomb hpeldsp"
jpegls_encoder_select="golomb" jpegls_encoder_select="golomb"
jv_decoder_select="dsputil" jv_decoder_select="dsputil"
lagarith_decoder_select="dsputil" lagarith_decoder_select="dsputil"
...@@ -1588,8 +1588,8 @@ ljpeg_encoder_select="aandcttables mpegvideoenc" ...@@ -1588,8 +1588,8 @@ ljpeg_encoder_select="aandcttables mpegvideoenc"
loco_decoder_select="golomb" loco_decoder_select="golomb"
mdec_decoder_select="dsputil error_resilience mpegvideo" mdec_decoder_select="dsputil error_resilience mpegvideo"
mimic_decoder_select="dsputil hpeldsp" mimic_decoder_select="dsputil hpeldsp"
mjpeg_decoder_select="dsputil" mjpeg_decoder_select="dsputil hpeldsp"
mjpegb_decoder_select="dsputil" mjpegb_decoder_select="dsputil hpeldsp"
mjpeg_encoder_select="aandcttables dsputil mpegvideoenc" mjpeg_encoder_select="aandcttables dsputil mpegvideoenc"
mlp_decoder_select="dsputil mlp_parser" mlp_decoder_select="dsputil mlp_parser"
motionpixels_decoder_select="dsputil" motionpixels_decoder_select="dsputil"
...@@ -1619,7 +1619,7 @@ msmpeg4v2_encoder_select="h263_encoder" ...@@ -1619,7 +1619,7 @@ msmpeg4v2_encoder_select="h263_encoder"
msmpeg4v3_decoder_select="h263_decoder" msmpeg4v3_decoder_select="h263_decoder"
msmpeg4v3_encoder_select="h263_encoder" msmpeg4v3_encoder_select="h263_encoder"
mss2_decoder_select="error_resilience vc1_decoder" mss2_decoder_select="error_resilience vc1_decoder"
mxpeg_decoder_select="dsputil" mxpeg_decoder_select="dsputil hpeldsp"
nellymoser_decoder_select="mdct sinewin" nellymoser_decoder_select="mdct sinewin"
nellymoser_encoder_select="audio_frame_queue mdct sinewin" nellymoser_encoder_select="audio_frame_queue mdct sinewin"
nuv_decoder_select="dsputil lzo" nuv_decoder_select="dsputil lzo"
...@@ -1639,7 +1639,7 @@ rv30_decoder_select="error_resilience golomb h264chroma h264pred h264qpel mpegvi ...@@ -1639,7 +1639,7 @@ rv30_decoder_select="error_resilience golomb h264chroma h264pred h264qpel mpegvi
rv40_decoder_select="error_resilience golomb h264chroma h264pred h264qpel mpegvideo videodsp" rv40_decoder_select="error_resilience golomb h264chroma h264pred h264qpel mpegvideo videodsp"
shorten_decoder_select="golomb" shorten_decoder_select="golomb"
sipr_decoder_select="lsp" sipr_decoder_select="lsp"
sp5x_decoder_select="dsputil" sp5x_decoder_select="dsputil hpeldsp"
svq1_decoder_select="hpeldsp" svq1_decoder_select="hpeldsp"
svq1_encoder_select="aandcttables dsputil hpeldsp mpegvideoenc" svq1_encoder_select="aandcttables dsputil hpeldsp mpegvideoenc"
svq3_decoder_select="golomb h264chroma h264dsp h264pred h264qpel hpeldsp mpegvideo videodsp" svq3_decoder_select="golomb h264chroma h264dsp h264pred h264qpel hpeldsp mpegvideo videodsp"
...@@ -1648,7 +1648,7 @@ tak_decoder_select="dsputil" ...@@ -1648,7 +1648,7 @@ tak_decoder_select="dsputil"
theora_decoder_select="vp3_decoder" theora_decoder_select="vp3_decoder"
tiff_decoder_suggest="zlib" tiff_decoder_suggest="zlib"
tiff_encoder_suggest="zlib" tiff_encoder_suggest="zlib"
thp_decoder_select="dsputil" thp_decoder_select="dsputil hpeldsp"
truehd_decoder_select="mlp_decoder" truehd_decoder_select="mlp_decoder"
truemotion2_decoder_select="dsputil" truemotion2_decoder_select="dsputil"
truespeech_decoder_select="dsputil" truespeech_decoder_select="dsputil"
......
...@@ -89,6 +89,7 @@ av_cold int ff_mjpeg_decode_init(AVCodecContext *avctx) ...@@ -89,6 +89,7 @@ av_cold int ff_mjpeg_decode_init(AVCodecContext *avctx)
s->picture_ptr = &s->picture; s->picture_ptr = &s->picture;
s->avctx = avctx; s->avctx = avctx;
ff_hpeldsp_init(&s->hdsp, avctx->flags);
ff_dsputil_init(&s->dsp, avctx); ff_dsputil_init(&s->dsp, avctx);
ff_init_scantable(s->dsp.idct_permutation, &s->scantable, ff_zigzag_direct); ff_init_scantable(s->dsp.idct_permutation, &s->scantable, ff_zigzag_direct);
s->buffer_size = 0; s->buffer_size = 0;
...@@ -858,7 +859,7 @@ static int mjpeg_decode_scan(MJpegDecodeContext *s, int nb_components, int Ah, ...@@ -858,7 +859,7 @@ static int mjpeg_decode_scan(MJpegDecodeContext *s, int nb_components, int Ah,
ptr = data[c] + block_offset; ptr = data[c] + block_offset;
if (!s->progressive) { if (!s->progressive) {
if (copy_mb) if (copy_mb)
s->dsp.put_pixels_tab[1][0](ptr, s->hdsp.put_pixels_tab[1][0](ptr,
reference_data[c] + block_offset, reference_data[c] + block_offset,
linesize[c], 8); linesize[c], 8);
else { else {
...@@ -974,9 +975,9 @@ static int mjpeg_decode_scan_progressive_ac(MJpegDecodeContext *s, int ss, ...@@ -974,9 +975,9 @@ static int mjpeg_decode_scan_progressive_ac(MJpegDecodeContext *s, int ss,
if (last_scan) { if (last_scan) {
if (copy_mb) { if (copy_mb) {
s->dsp.put_pixels_tab[1][0](ptr, s->hdsp.put_pixels_tab[1][0](ptr,
reference_data + block_offset, reference_data + block_offset,
linesize, 8); linesize, 8);
} else { } else {
s->dsp.idct_put(ptr, linesize, *block); s->dsp.idct_put(ptr, linesize, *block);
ptr += 8; ptr += 8;
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include "avcodec.h" #include "avcodec.h"
#include "get_bits.h" #include "get_bits.h"
#include "dsputil.h" #include "dsputil.h"
#include "hpeldsp.h"
#define MAX_COMPONENTS 4 #define MAX_COMPONENTS 4
...@@ -94,6 +95,7 @@ typedef struct MJpegDecodeContext { ...@@ -94,6 +95,7 @@ typedef struct MJpegDecodeContext {
uint64_t coefs_finished[MAX_COMPONENTS]; ///< bitmask of which coefs have been completely decoded (progressive mode) uint64_t coefs_finished[MAX_COMPONENTS]; ///< bitmask of which coefs have been completely decoded (progressive mode)
ScanTable scantable; ScanTable scantable;
DSPContext dsp; DSPContext dsp;
HpelDSPContext hdsp;
int restart_interval; int restart_interval;
int restart_count; int restart_count;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment