]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/fmtconvert.c
lavc: document that avcodec_close() should not be used
[ffmpeg] / libavcodec / fmtconvert.c
index 2dff704aa2dd46d88fdf62840157b4abc28c0076..f94d438ba297ce6a65c05f55fb95a2954ab1dde0 100644 (file)
@@ -32,6 +32,14 @@ static void int32_to_float_fmul_scalar_c(float *dst, const int32_t *src,
         dst[i] = src[i] * mul;
 }
 
+static void int32_to_float_c(float *dst, const int32_t *src, intptr_t len)
+{
+    int i;
+
+    for (i = 0; i < len; i++)
+        dst[i] = (float)src[i];
+}
+
 static void int32_to_float_fmul_array8_c(FmtConvertContext *c, float *dst,
                                          const int32_t *src, const float *mul,
                                          int len)
@@ -43,10 +51,16 @@ static void int32_to_float_fmul_array8_c(FmtConvertContext *c, float *dst,
 
 av_cold void ff_fmt_convert_init(FmtConvertContext *c, AVCodecContext *avctx)
 {
+    c->int32_to_float             = int32_to_float_c;
     c->int32_to_float_fmul_scalar = int32_to_float_fmul_scalar_c;
     c->int32_to_float_fmul_array8 = int32_to_float_fmul_array8_c;
 
-    if (ARCH_ARM) ff_fmt_convert_init_arm(c, avctx);
-    if (ARCH_PPC) ff_fmt_convert_init_ppc(c, avctx);
-    if (ARCH_X86) ff_fmt_convert_init_x86(c, avctx);
+    if (ARCH_AARCH64)
+        ff_fmt_convert_init_aarch64(c, avctx);
+    if (ARCH_ARM)
+        ff_fmt_convert_init_arm(c, avctx);
+    if (ARCH_PPC)
+        ff_fmt_convert_init_ppc(c, avctx);
+    if (ARCH_X86)
+        ff_fmt_convert_init_x86(c, avctx);
 }