aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Hoffman <mmhoffm@gmail.com>2007-09-17 13:23:16 +0000
committerMarc Hoffman <mmhoffm@gmail.com>2007-09-17 13:23:16 +0000
commit584a3ac9078f3facb956420dd59348bfae11c63f (patch)
treea7bd1fbc47b2ae646d4335dcac296370c1456194
parent56261c615035859a8d9574b0a1b7adc60b44eb6a (diff)
downloadffmpeg-584a3ac9078f3facb956420dd59348bfae11c63f.tar.gz
blackfin vsad primitives
Originally committed as revision 10521 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/bfin/dsputil_bfin.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/libavcodec/bfin/dsputil_bfin.c b/libavcodec/bfin/dsputil_bfin.c
index 9615dcd326..d62ff0ab0f 100644
--- a/libavcodec/bfin/dsputil_bfin.c
+++ b/libavcodec/bfin/dsputil_bfin.c
@@ -161,6 +161,15 @@ static int bfin_pix_abs16 (void *c, uint8_t *blk1, uint8_t *blk2, int line_size,
return ff_bfin_z_sad16x16 (blk1,blk2,line_size,line_size,h);
}
+static int bfin_vsad_intra16 (void *c, uint8_t *blk1, uint8_t *dummy, int stride, int h) {
+ return ff_bfin_z_sad16x16 (blk1,blk1+stride,stride<<1,stride<<1,h);
+}
+
+static int bfin_vsad (void *c, uint8_t *blk1, uint8_t *blk2, int stride, int h) {
+ return ff_bfin_z_sad16x16 (blk1,blk1+stride,stride<<1,stride<<1,h)
+ + ff_bfin_z_sad16x16 (blk2,blk2+stride,stride<<1,stride<<1,h);
+}
+
static uint8_t vtmp_blk[256] __attribute__((l1_data_B));
static int bfin_pix_abs16_x2 (void *c, uint8_t *blk1, uint8_t *blk2, int line_size, int h)
@@ -230,6 +239,9 @@ void dsputil_init_bfin( DSPContext* c, AVCodecContext *avctx )
c->sad[0] = bfin_pix_abs16;
c->sad[1] = bfin_pix_abs8;
+ c->vsad[0] = bfin_vsad;
+ c->vsad[4] = bfin_vsad_intra16;
+
/* TODO [0] 16 [1] 8 */
c->pix_abs[0][0] = bfin_pix_abs16;
c->pix_abs[0][1] = bfin_pix_abs16_x2;