[FFmpeg-devel] [PATCH 12/33] indeo3: use hpeldsp instead of dsputil.
Ronald S. Bultje
rsbultje at gmail.com
Wed Feb 6 04:27:25 CET 2013
From: "Ronald S. Bultje" <rsbultje at gmail.com>
---
configure | 1 +
libavcodec/indeo3.c | 11 ++++++-----
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/configure b/configure
index 21c72cb..fbeafe1 100755
--- a/configure
+++ b/configure
@@ -1686,6 +1686,7 @@ h264_decoder_select="error_resilience golomb h264chroma h264dsp h264pred h264qpe
huffyuv_encoder_select="huffman"
iac_decoder_select="fft mdct sinewin"
imc_decoder_select="fft mdct sinewin"
+indeo3_decoder_select="hpeldsp"
jpegls_decoder_select="golomb"
jpegls_encoder_select="golomb"
ljpeg_encoder_select="aandcttables mpegvideoenc"
diff --git a/libavcodec/indeo3.c b/libavcodec/indeo3.c
index a8206db..c814f08 100644
--- a/libavcodec/indeo3.c
+++ b/libavcodec/indeo3.c
@@ -32,9 +32,10 @@
#include "libavutil/imgutils.h"
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
-#include "dsputil.h"
#include "bytestream.h"
+#include "dsputil.h" // for copy_block4()
#include "get_bits.h"
+#include "hpeldsp.h"
#include "internal.h"
#include "indeo3data.h"
@@ -82,7 +83,7 @@ typedef struct Cell {
typedef struct Indeo3DecodeContext {
AVCodecContext *avctx;
AVFrame frame;
- DSPContext dsp;
+ HpelDSPContext hdsp;
GetBitContext gb;
int need_resync;
@@ -248,12 +249,12 @@ static void copy_cell(Indeo3DecodeContext *ctx, Plane *plane, Cell *cell)
/* copy using 16xH blocks */
if (!((cell->xpos << 2) & 15) && w >= 4) {
for (; w >= 4; src += 16, dst += 16, w -= 4)
- ctx->dsp.put_no_rnd_pixels_tab[0][0](dst, src, plane->pitch, h);
+ ctx->hdsp.put_no_rnd_pixels_tab[0][0](dst, src, plane->pitch, h);
}
/* copy using 8xH blocks */
if (!((cell->xpos << 2) & 7) && w >= 2) {
- ctx->dsp.put_no_rnd_pixels_tab[1][0](dst, src, plane->pitch, h);
+ ctx->hdsp.put_no_rnd_pixels_tab[1][0](dst, src, plane->pitch, h);
w -= 2;
src += 8;
dst += 8;
@@ -1048,7 +1049,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
build_requant_tab();
- ff_dsputil_init(&ctx->dsp, avctx);
+ ff_hpeldsp_init(&ctx->hdsp, avctx->flags);
return allocate_frame_buffers(ctx, avctx, avctx->width, avctx->height);
}
--
1.7.11.3
More information about the ffmpeg-devel
mailing list