diff options
author | Mans Rullgard <mans@mansr.com> | 2011-07-27 15:47:02 +0100 |
---|---|---|
committer | Mans Rullgard <mans@mansr.com> | 2011-07-27 16:05:49 +0100 |
commit | 1b3539d4534f9877b463fb8b7fa56b7d20dd1338 (patch) | |
tree | 7d5497ea69af1d1e536e1f42b2b1dbcdcbe6e3fc /libavcodec/binkdsp.c | |
parent | cbd58a872d343f5996ed7ab917c8839dbfd99eaa (diff) | |
download | ffmpeg-1b3539d4534f9877b463fb8b7fa56b7d20dd1338.tar.gz |
dsputil: move a bink-only function to binkdsp
Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'libavcodec/binkdsp.c')
-rw-r--r-- | libavcodec/binkdsp.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/libavcodec/binkdsp.c b/libavcodec/binkdsp.c index 109906f262..1f7855b30b 100644 --- a/libavcodec/binkdsp.c +++ b/libavcodec/binkdsp.c @@ -112,8 +112,25 @@ static void bink_idct_put_c(uint8_t *dest, int linesize, int32_t *block) } } +static void scale_block_c(const uint8_t src[64]/*align 8*/, uint8_t *dst/*align 8*/, int linesize) +{ + int i, j; + uint16_t *dst1 = (uint16_t *) dst; + uint16_t *dst2 = (uint16_t *)(dst + linesize); + + for (j = 0; j < 8; j++) { + for (i = 0; i < 8; i++) { + dst1[i] = dst2[i] = src[i] * 0x0101; + } + src += 8; + dst1 += linesize; + dst2 += linesize; + } +} + 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; } |