diff options
author | Ronald S. Bultje | 2013-03-10 14:14:35 -0700 |
---|---|---|
committer | Michael Niedermayer | 2013-03-13 03:58:49 +0100 |
commit | 771ba8f206e23f753f4f8ab04d2f6251911bfd99 (patch) | |
tree | c5fa1244716070873ca17e494372171cf4c6d05d /libavcodec | |
parent | 05dd583426db7962e610bd924e840bce78abce6c (diff) |
snow: use hpeldsp instead of dsputil for half-pel functions.
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/snow.c | 9 | ||||
-rw-r--r-- | libavcodec/snow.h | 2 | ||||
-rw-r--r-- | libavcodec/snowenc.c | 2 |
3 files changed, 9 insertions, 4 deletions
diff --git a/libavcodec/snow.c b/libavcodec/snow.c index db5a95685a..eea729716e 100644 --- a/libavcodec/snow.c +++ b/libavcodec/snow.c @@ -401,6 +401,7 @@ av_cold int ff_snow_common_init(AVCodecContext *avctx){ s->max_ref_frames=1; //just make sure it's not an invalid value in case of no initial keyframe ff_dsputil_init(&s->dsp, avctx); + ff_hpeldsp_init(&s->hdsp, avctx->flags); ff_videodsp_init(&s->vdsp, 8); ff_dwt_init(&s->dwt); ff_h264qpel_init(&s->h264qpel, 8); @@ -431,11 +432,11 @@ av_cold int ff_snow_common_init(AVCodecContext *avctx){ mcf(12,12) #define mcfh(dx,dy)\ - s->dsp.put_pixels_tab [0][dy/4+dx/8]=\ - s->dsp.put_no_rnd_pixels_tab[0][dy/4+dx/8]=\ + s->hdsp.put_pixels_tab [0][dy/4+dx/8]=\ + s->hdsp.put_no_rnd_pixels_tab[0][dy/4+dx/8]=\ mc_block_hpel ## dx ## dy ## 16;\ - s->dsp.put_pixels_tab [1][dy/4+dx/8]=\ - s->dsp.put_no_rnd_pixels_tab[1][dy/4+dx/8]=\ + s->hdsp.put_pixels_tab [1][dy/4+dx/8]=\ + s->hdsp.put_no_rnd_pixels_tab[1][dy/4+dx/8]=\ mc_block_hpel ## dx ## dy ## 8; mcfh(0, 0) diff --git a/libavcodec/snow.h b/libavcodec/snow.h index a3b0512490..922a48e54d 100644 --- a/libavcodec/snow.h +++ b/libavcodec/snow.h @@ -23,6 +23,7 @@ #define AVCODEC_SNOW_H #include "dsputil.h" +#include "hpeldsp.h" #include "snow_dwt.h" #include "rangecoder.h" @@ -109,6 +110,7 @@ typedef struct SnowContext{ AVCodecContext *avctx; RangeCoder c; DSPContext dsp; + HpelDSPContext hdsp; VideoDSPContext vdsp; H264QpelContext h264qpel; SnowDWTContext dwt; diff --git a/libavcodec/snowenc.c b/libavcodec/snowenc.c index 624278bd65..7266ee12f0 100644 --- a/libavcodec/snowenc.c +++ b/libavcodec/snowenc.c @@ -1748,7 +1748,9 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, s->lambda2= s->m.lambda2= (s->m.lambda*s->m.lambda + FF_LAMBDA_SCALE/2) >> FF_LAMBDA_SHIFT; s->m.dsp= s->dsp; //move + s->m.hdsp = s->hdsp; ff_init_me(&s->m); + s->hdsp = s->m.hdsp; s->dsp= s->m.dsp; } |