]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/dirac_dwt.c
lavf/mpjpeg: do not include CRLF preceding boundary as part of the returned frame
[ffmpeg] / libavcodec / dirac_dwt.c
index 6cf32ae2b959ab4374d56fe563d8f89cccf9c155..cc08f8865ac0533d73092ecbfd4b6392c81bf4d1 100644 (file)
@@ -23,7 +23,6 @@
 #include "libavutil/avassert.h"
 #include "libavutil/common.h"
 #include "dirac_dwt.h"
-#include "libavcodec/x86/dirac_dwt.h"
 
 #define TEMPLATE_8bit
 #include "dirac_dwt_template.c"
 #define TEMPLATE_12bit
 #include "dirac_dwt_template.c"
 
-int ff_spatial_idwt_init2(DWTContext *d, uint8_t *buffer, int width, int height,
-                          int stride, enum dwt_type type, int decomposition_count,
-                          uint8_t *temp, int bit_depth)
+int ff_spatial_idwt_init(DWTContext *d, DWTPlane *p, enum dwt_type type,
+                         int decomposition_count, int bit_depth)
 {
     int ret = 0;
 
+    d->buffer = p->buf;
+    d->width  = p->width;
+    d->height = p->height;
+    d->stride = p->stride;
+    d->temp   = p->tmp;
+    d->decomposition_count = decomposition_count;
+
     if (bit_depth == 8)
-        ret = ff_spatial_idwt_init2_8bit(d, buffer, width, height, stride, type, decomposition_count, temp);
+        ret = ff_spatial_idwt_init_8bit(d, type);
     else if (bit_depth == 10)
-        ret = ff_spatial_idwt_init2_10bit(d, buffer, width, height, stride, type, decomposition_count, temp);
+        ret = ff_spatial_idwt_init_10bit(d, type);
     else if (bit_depth == 12)
-        ret = ff_spatial_idwt_init2_12bit(d, buffer, width, height, stride, type, decomposition_count, temp);
+        ret = ff_spatial_idwt_init_12bit(d, type);
     else
         av_log(NULL, AV_LOG_WARNING, "Unsupported bit depth = %i\n", bit_depth);
 
@@ -54,8 +59,8 @@ int ff_spatial_idwt_init2(DWTContext *d, uint8_t *buffer, int width, int height,
         return AVERROR_INVALIDDATA;
     }
 
-    if (bit_depth == 8 && HAVE_MMX)
-        ff_spatial_idwt_init_mmx(d, type);
+    if (ARCH_X86 && bit_depth == 8)
+        ff_spatial_idwt_init_x86(d, type);
     return 0;
 }