X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fdsputil.c;h=80ed6503fadc3400f1d85a2813400ce3b0e0193e;hb=0b1f20e23c3d61d06c86ee1aa160cd4da8b47b0c;hp=6a33ef4f87a4c1ddd0097e1acc3598ee3c85f962;hpb=6d91045d835635fe889f684bdf77f68e00b15d0b;p=ffmpeg diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c index 6a33ef4f87a..80ed6503fad 100644 --- a/libavcodec/dsputil.c +++ b/libavcodec/dsputil.c @@ -1824,7 +1824,7 @@ static void add_8x8basis_c(int16_t rem[64], int16_t basis[64], int scale){ } /** - * permutes an 8x8 block. + * Permute an 8x8 block. * @param block the block which will be permuted according to the given permutation vector * @param permutation the permutation vector * @param last the last non zero coefficient in scantable order, used to speed the permutation up @@ -2543,6 +2543,18 @@ static void butterflies_float_c(float *restrict v1, float *restrict v2, } } +static void butterflies_float_interleave_c(float *dst, const float *src0, + const float *src1, int len) +{ + int i; + for (i = 0; i < len; i++) { + float f1 = src0[i]; + float f2 = src1[i]; + dst[2*i ] = f1 + f2; + dst[2*i + 1] = f1 - f2; + } +} + static float scalarproduct_float_c(const float *v1, const float *v2, int len) { float p = 0.0; @@ -3066,6 +3078,7 @@ av_cold void dsputil_init(DSPContext* c, AVCodecContext *avctx) c->vector_clip_int32 = vector_clip_int32_c; c->scalarproduct_float = scalarproduct_float_c; c->butterflies_float = butterflies_float_c; + c->butterflies_float_interleave = butterflies_float_interleave_c; c->vector_fmul_scalar = vector_fmul_scalar_c; c->vector_fmac_scalar = vector_fmac_scalar_c;