diff options
author | Diego Biurrun <diego@biurrun.de> | 2013-12-21 19:03:59 +0400 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2014-03-22 17:17:30 +0400 |
commit | 57f09608e1600d1cf1679885a46f5004d522d68f (patch) | |
tree | ddb3ce6e7d2ac7f8479add595d7212434d7ca8f7 /libavcodec/svq3.c | |
parent | 82dd1026cfc1d72b04019185bea4c1c9621ace3f (diff) |
dsputil: Move thirdpel-related bits into their own context
Diffstat (limited to 'libavcodec/svq3.c')
-rw-r--r-- | libavcodec/svq3.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c index 4916314c08..fc2120b2cb 100644 --- a/libavcodec/svq3.c +++ b/libavcodec/svq3.c @@ -54,6 +54,7 @@ #include "golomb.h" #include "hpeldsp.h" #include "rectangle.h" +#include "tpeldsp.h" #if CONFIG_ZLIB #include <zlib.h> @@ -70,6 +71,7 @@ typedef struct { H264Context h; HpelDSPContext hdsp; + TpelDSPContext tdsp; H264Picture *cur_pic; H264Picture *next_pic; H264Picture *last_pic; @@ -321,9 +323,9 @@ static inline void svq3_mc_dir_part(SVQ3Context *s, src = h->edge_emu_buffer; } if (thirdpel) - (avg ? h->dsp.avg_tpel_pixels_tab - : h->dsp.put_tpel_pixels_tab)[dxy](dest, src, h->linesize, - width, height); + (avg ? s->tdsp.avg_tpel_pixels_tab + : s->tdsp.put_tpel_pixels_tab)[dxy](dest, src, h->linesize, + width, height); else (avg ? s->hdsp.avg_pixels_tab : s->hdsp.put_pixels_tab)[blocksize][dxy](dest, src, h->linesize, @@ -349,10 +351,10 @@ static inline void svq3_mc_dir_part(SVQ3Context *s, src = h->edge_emu_buffer; } if (thirdpel) - (avg ? h->dsp.avg_tpel_pixels_tab - : h->dsp.put_tpel_pixels_tab)[dxy](dest, src, - h->uvlinesize, - width, height); + (avg ? s->tdsp.avg_tpel_pixels_tab + : s->tdsp.put_tpel_pixels_tab)[dxy](dest, src, + h->uvlinesize, + width, height); else (avg ? s->hdsp.avg_pixels_tab : s->hdsp.put_pixels_tab)[blocksize][dxy](dest, src, @@ -881,6 +883,8 @@ static av_cold int svq3_decode_init(AVCodecContext *avctx) return -1; ff_hpeldsp_init(&s->hdsp, avctx->flags); + ff_tpeldsp_init(&s->tdsp); + h->flags = avctx->flags; h->is_complex = 1; h->picture_structure = PICT_FRAME; |