From da0684820a58ce42a5a2953cbce417e06a54be8f Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 20 Jan 2014 03:50:43 +0100 Subject: avcodec/dsputil/huffyuv: move diff int16 and add int16 to dsputil This also fixes masking the bits Signed-off-by: Michael Niedermayer --- libavcodec/huffyuvenc.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'libavcodec/huffyuvenc.c') diff --git a/libavcodec/huffyuvenc.c b/libavcodec/huffyuvenc.c index 5fb7d0cea7..2bc95b59e8 100644 --- a/libavcodec/huffyuvenc.c +++ b/libavcodec/huffyuvenc.c @@ -38,19 +38,10 @@ static inline void diff_bytes(HYuvContext *s, uint8_t *dst, const uint8_t *src0, const uint8_t *src1, int w) { - int i; if (s->bps <= 8) { s->dsp.diff_bytes(dst, src0, src1, w); } else { - const uint16_t *src016 = (const uint16_t *)src0; - const uint16_t *src116 = (const uint16_t *)src1; - uint16_t *dst16 = ( uint16_t *)dst; - - for (i = 0; i < w; i++) { - dst16[i] = src016[i] - src116[i]; - } - - //FIXME optimize + s->dsp.diff_int16((uint16_t *)dst, (const uint16_t *)src0, (const uint16_t *)src1, s->n - 1, w); } } -- cgit v1.2.3