aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2013-12-29 11:53:00 +0100
committerDiego Biurrun <diego@biurrun.de>2014-05-29 06:48:08 -0700
commitcb52a17cb62297802b0a77e5af9850d87c3f925b (patch)
tree543f0f6024eb8f78db699b4179cc0d65289977a7
parent054013a0fc6f2b52c60cee3e051be8cc7f82cef3 (diff)
downloadffmpeg-cb52a17cb62297802b0a77e5af9850d87c3f925b.tar.gz
dsputil: Move Bink-specific add_pixels8 to binkdsp
-rw-r--r--libavcodec/bink.c4
-rw-r--r--libavcodec/binkdsp.c21
-rw-r--r--libavcodec/binkdsp.h1
-rw-r--r--libavcodec/dsputil.c21
-rw-r--r--libavcodec/dsputil.h1
5 files changed, 24 insertions, 24 deletions
diff --git a/libavcodec/bink.c b/libavcodec/bink.c
index 005754291d..e1312a86d2 100644
--- a/libavcodec/bink.c
+++ b/libavcodec/bink.c
@@ -883,7 +883,7 @@ static int binkb_decode_plane(BinkContext *c, AVFrame *frame, GetBitContext *gb,
c->dsp.clear_block(block);
v = binkb_get_value(c, BINKB_SRC_INTER_COEFS);
read_residue(gb, block, v);
- c->dsp.add_pixels8(dst, block, stride);
+ c->bdsp.add_pixels8(dst, block, stride);
break;
case 4:
xoff = binkb_get_value(c, BINKB_SRC_X_OFF);
@@ -1120,7 +1120,7 @@ static int bink_decode_plane(BinkContext *c, AVFrame *frame, GetBitContext *gb,
c->dsp.clear_block(block);
v = get_bits(gb, 7);
read_residue(gb, block, v);
- c->dsp.add_pixels8(dst, block, stride);
+ c->bdsp.add_pixels8(dst, block, stride);
break;
case INTRA_BLOCK:
memset(dctblock, 0, sizeof(*dctblock) * 64);
diff --git a/libavcodec/binkdsp.c b/libavcodec/binkdsp.c
index 1fb03b201e..0dfe12cd4f 100644
--- a/libavcodec/binkdsp.c
+++ b/libavcodec/binkdsp.c
@@ -24,6 +24,7 @@
* Bink DSP routines
*/
+#include "config.h"
#include "libavutil/attributes.h"
#include "binkdsp.h"
@@ -128,9 +129,29 @@ static void scale_block_c(const uint8_t src[64]/*align 8*/, uint8_t *dst/*align
}
}
+static void add_pixels8_c(uint8_t *restrict pixels, int16_t *block,
+ int line_size)
+{
+ int i;
+
+ for (i = 0; i < 8; i++) {
+ pixels[0] += block[0];
+ pixels[1] += block[1];
+ pixels[2] += block[2];
+ pixels[3] += block[3];
+ pixels[4] += block[4];
+ pixels[5] += block[5];
+ pixels[6] += block[6];
+ pixels[7] += block[7];
+ pixels += line_size;
+ block += 8;
+ }
+}
+
av_cold void ff_binkdsp_init(BinkDSPContext *c)
{
c->idct_add = bink_idct_add_c;
c->idct_put = bink_idct_put_c;
c->scale_block = scale_block_c;
+ c->add_pixels8 = add_pixels8_c;
}
diff --git a/libavcodec/binkdsp.h b/libavcodec/binkdsp.h
index 4c1f73f0c8..418afb9895 100644
--- a/libavcodec/binkdsp.h
+++ b/libavcodec/binkdsp.h
@@ -33,6 +33,7 @@ typedef struct BinkDSPContext {
void (*idct_put)(uint8_t *dest/*align 8*/, int line_size, int32_t *block/*align 16*/);
void (*idct_add)(uint8_t *dest/*align 8*/, int line_size, int32_t *block/*align 16*/);
void (*scale_block)(const uint8_t src[64]/*align 8*/, uint8_t *dst/*align 8*/, int linesize);
+ void (*add_pixels8)(uint8_t *pixels, int16_t *block, int line_size);
} BinkDSPContext;
void ff_binkdsp_init(BinkDSPContext *c);
diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c
index 6b846588fa..89c0da4ec3 100644
--- a/libavcodec/dsputil.c
+++ b/libavcodec/dsputil.c
@@ -347,25 +347,6 @@ static void put_signed_pixels_clamped_c(const int16_t *block,
}
}
-static void add_pixels8_c(uint8_t *restrict pixels, int16_t *block,
- int line_size)
-{
- int i;
-
- for (i = 0; i < 8; i++) {
- pixels[0] += block[0];
- pixels[1] += block[1];
- pixels[2] += block[2];
- pixels[3] += block[3];
- pixels[4] += block[4];
- pixels[5] += block[5];
- pixels[6] += block[6];
- pixels[7] += block[7];
- pixels += line_size;
- block += 8;
- }
-}
-
static void add_pixels_clamped_c(const int16_t *block, uint8_t *restrict pixels,
int line_size)
{
@@ -2290,8 +2271,6 @@ av_cold void ff_dsputil_init(DSPContext *c, AVCodecContext *avctx)
c->shrink[2] = ff_shrink44;
c->shrink[3] = ff_shrink88;
- c->add_pixels8 = add_pixels8_c;
-
c->draw_edges = draw_edges_8_c;
c->clear_block = clear_block_8_c;
diff --git a/libavcodec/dsputil.h b/libavcodec/dsputil.h
index 471988bddd..ec4eb29288 100644
--- a/libavcodec/dsputil.h
+++ b/libavcodec/dsputil.h
@@ -136,7 +136,6 @@ typedef struct DSPContext {
void (*add_pixels_clamped)(const int16_t *block /* align 16 */,
uint8_t *pixels /* align 8 */,
int line_size);
- void (*add_pixels8)(uint8_t *pixels, int16_t *block, int line_size);
int (*sum_abs_dctelem)(int16_t *block /* align 16 */);
/**
* translational global motion compensation.