]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/sparc/dsputil_vis.c
libstagefright: limit the output queue size
[ffmpeg] / libavcodec / sparc / dsputil_vis.c
index 5e59ce776579a424d53d4d38e19e7eac21860c01..e45bfd28e611395e130183f12b50ab09f49683ce 100644 (file)
@@ -1,21 +1,20 @@
 /*
- * dsputil_vis.c
  * Copyright (C) 2003 David S. Miller <davem@redhat.com>
  *
- * This file is part of FFmpeg.
+ * This file is part of Libav.
  *
- * FFmpeg is free software; you can redistribute it and/or
+ * Libav is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation; either
  * version 2.1 of the License, or (at your option) any later version.
  *
- * FFmpeg is distributed in the hope that it will be useful,
+ * Libav is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with FFmpeg; if not, write to the Free Software
+ * License along with Libav; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 
 #include "config.h"
 
-#ifdef ARCH_SPARC
-
 #include <inttypes.h>
-#include <signal.h>
-#include <setjmp.h>
 
-#include "../dsputil.h"
+#include "libavcodec/dsputil.h"
+#include "dsputil_vis.h"
 
 #include "vis.h"
 
  *      fpsub16         f12, f10, f10
  */
 
-#define ATTR_ALIGN(alignd) __attribute__ ((aligned(alignd)))
-
 #define DUP4(x) {x, x, x, x}
 #define DUP8(x) {x, x, x, x, x, x, x, x}
-static const int16_t constants1[] ATTR_ALIGN(8) = DUP4 (1);
-static const int16_t constants2[] ATTR_ALIGN(8) = DUP4 (2);
-static const int16_t constants3[] ATTR_ALIGN(8) = DUP4 (3);
-static const int16_t constants6[] ATTR_ALIGN(8) = DUP4 (6);
-static const int8_t constants_fe[] ATTR_ALIGN(8) = DUP8 (0xfe);
-static const int8_t constants_7f[] ATTR_ALIGN(8) = DUP8 (0x7f);
-static const int8_t constants128[] ATTR_ALIGN(8) = DUP8 (128);
-static const int16_t constants256_512[] ATTR_ALIGN(8) =
+DECLARE_ALIGNED(8, static const int16_t, constants1)[] = DUP4 (1);
+DECLARE_ALIGNED(8, static const int16_t, constants2)[] = DUP4 (2);
+DECLARE_ALIGNED(8, static const int16_t, constants3)[] = DUP4 (3);
+DECLARE_ALIGNED(8, static const int16_t, constants6)[] = DUP4 (6);
+DECLARE_ALIGNED(8, static const int8_t, constants_fe)[] = DUP8 (0xfe);
+DECLARE_ALIGNED(8, static const int8_t, constants_7f)[] = DUP8 (0x7f);
+DECLARE_ALIGNED(8, static const int8_t, constants128)[] = DUP8 (128);
+DECLARE_ALIGNED(8, static const int16_t, constants256_512)[] =
         {256, 512, 256, 512};
-static const int16_t constants256_1024[] ATTR_ALIGN(8) =
+DECLARE_ALIGNED(8, static const int16_t, constants256_1024)[] =
         {256, 1024, 256, 1024};
 
 #define REF_0           0
@@ -124,11 +118,9 @@ static const int16_t constants256_1024[] ATTR_ALIGN(8) =
 #define TMP30           56
 #define TMP32           58
 
-static void MC_put_o_16_vis (uint8_t * dest, const uint8_t * _ref,
+static void MC_put_o_16_vis (uint8_t * dest, const uint8_t * ref,
                              const int stride, int height)
 {
-        uint8_t *ref = (uint8_t *) _ref;
-
         ref = vis_alignaddr(ref);
         do {    /* 5 cycles */
                 vis_ld64(ref[0], TMP0);
@@ -147,11 +139,9 @@ static void MC_put_o_16_vis (uint8_t * dest, const uint8_t * _ref,
         } while (--height);
 }
 
-static void MC_put_o_8_vis (uint8_t * dest, const uint8_t * _ref,
+static void MC_put_o_8_vis (uint8_t * dest, const uint8_t * ref,
                             const int stride, int height)
 {
-        uint8_t *ref = (uint8_t *) _ref;
-
         ref = vis_alignaddr(ref);
         do {    /* 4 cycles */
                 vis_ld64(ref[0], TMP0);
@@ -168,10 +158,9 @@ static void MC_put_o_8_vis (uint8_t * dest, const uint8_t * _ref,
 }
 
 
-static void MC_avg_o_16_vis (uint8_t * dest, const uint8_t * _ref,
+static void MC_avg_o_16_vis (uint8_t * dest, const uint8_t * ref,
                              const int stride, int height)
 {
-        uint8_t *ref = (uint8_t *) _ref;
         int stride_8 = stride + 8;
 
         ref = vis_alignaddr(ref);
@@ -329,11 +318,9 @@ static void MC_avg_o_16_vis (uint8_t * dest, const uint8_t * _ref,
         vis_st64_2(TMP22, dest, 8);
 }
 
-static void MC_avg_o_8_vis (uint8_t * dest, const uint8_t * _ref,
+static void MC_avg_o_8_vis (uint8_t * dest, const uint8_t * ref,
                             const int stride, int height)
 {
-        uint8_t *ref = (uint8_t *) _ref;
-
         ref = vis_alignaddr(ref);
 
         vis_ld64(ref[0], TMP0);
@@ -423,10 +410,9 @@ static void MC_avg_o_8_vis (uint8_t * dest, const uint8_t * _ref,
         vis_st64(TMP4, dest[0]);
 }
 
-static void MC_put_x_16_vis (uint8_t * dest, const uint8_t * _ref,
+static void MC_put_x_16_vis (uint8_t * dest, const uint8_t * ref,
                              const int stride, int height)
 {
-        uint8_t *ref = (uint8_t *) _ref;
         unsigned long off = (unsigned long) ref & 0x7;
         unsigned long off_plus_1 = off + 1;
 
@@ -616,10 +602,9 @@ static void MC_put_x_16_vis (uint8_t * dest, const uint8_t * _ref,
         vis_st64_2(TMP8, dest, 8);
 }
 
-static void MC_put_x_8_vis (uint8_t * dest, const uint8_t * _ref,
+static void MC_put_x_8_vis (uint8_t * dest, const uint8_t * ref,
                             const int stride, int height)
 {
-        uint8_t *ref = (uint8_t *) _ref;
         unsigned long off = (unsigned long) ref & 0x7;
         unsigned long off_plus_1 = off + 1;
 
@@ -740,10 +725,9 @@ static void MC_put_x_8_vis (uint8_t * dest, const uint8_t * _ref,
         dest += stride;
 }
 
-static void MC_avg_x_16_vis (uint8_t * dest, const uint8_t * _ref,
+static void MC_avg_x_16_vis (uint8_t * dest, const uint8_t * ref,
                              const int stride, int height)
 {
-        uint8_t *ref = (uint8_t *) _ref;
         unsigned long off = (unsigned long) ref & 0x7;
         unsigned long off_plus_1 = off + 1;
 
@@ -831,10 +815,9 @@ static void MC_avg_x_16_vis (uint8_t * dest, const uint8_t * _ref,
         } while (--height);
 }
 
-static void MC_avg_x_8_vis (uint8_t * dest, const uint8_t * _ref,
+static void MC_avg_x_8_vis (uint8_t * dest, const uint8_t * ref,
                             const int stride, int height)
 {
-        uint8_t *ref = (uint8_t *) _ref;
         unsigned long off = (unsigned long) ref & 0x7;
         unsigned long off_plus_1 = off + 1;
         int stride_times_2 = stride << 1;
@@ -997,11 +980,9 @@ static void MC_avg_x_8_vis (uint8_t * dest, const uint8_t * _ref,
         } while (--height);
 }
 
-static void MC_put_y_16_vis (uint8_t * dest, const uint8_t * _ref,
+static void MC_put_y_16_vis (uint8_t * dest, const uint8_t * ref,
                              const int stride, int height)
 {
-        uint8_t *ref = (uint8_t *) _ref;
-
         ref = vis_alignaddr(ref);
         vis_ld64(ref[0], TMP0);
 
@@ -1153,11 +1134,9 @@ static void MC_put_y_16_vis (uint8_t * dest, const uint8_t * _ref,
         vis_st64_2(TMP2, dest, 8);
 }
 
-static void MC_put_y_8_vis (uint8_t * dest, const uint8_t * _ref,
+static void MC_put_y_8_vis (uint8_t * dest, const uint8_t * ref,
                             const int stride, int height)
 {
-        uint8_t *ref = (uint8_t *) _ref;
-
         ref = vis_alignaddr(ref);
         vis_ld64(ref[0], TMP0);
 
@@ -1245,10 +1224,9 @@ static void MC_put_y_8_vis (uint8_t * dest, const uint8_t * _ref,
         vis_st64(DST_0, dest[0]);
 }
 
-static void MC_avg_y_16_vis (uint8_t * dest, const uint8_t * _ref,
+static void MC_avg_y_16_vis (uint8_t * dest, const uint8_t * ref,
                              const int stride, int height)
 {
-        uint8_t *ref = (uint8_t *) _ref;
         int stride_8 = stride + 8;
         int stride_16 = stride + 16;
 
@@ -1374,10 +1352,9 @@ static void MC_avg_y_16_vis (uint8_t * dest, const uint8_t * _ref,
         } while (--height);
 }
 
-static void MC_avg_y_8_vis (uint8_t * dest, const uint8_t * _ref,
+static void MC_avg_y_8_vis (uint8_t * dest, const uint8_t * ref,
                             const int stride, int height)
 {
-        uint8_t *ref = (uint8_t *) _ref;
         int stride_8 = stride + 8;
 
         vis_set_gsr(5 << VIS_GSR_SCALEFACT_SHIFT);
@@ -1454,10 +1431,9 @@ static void MC_avg_y_8_vis (uint8_t * dest, const uint8_t * _ref,
         } while (--height);
 }
 
-static void MC_put_xy_16_vis (uint8_t * dest, const uint8_t * _ref,
+static void MC_put_xy_16_vis (uint8_t * dest, const uint8_t * ref,
                               const int stride, int height)
 {
-        uint8_t *ref = (uint8_t *) _ref;
         unsigned long off = (unsigned long) ref & 0x7;
         unsigned long off_plus_1 = off + 1;
         int stride_8 = stride + 8;
@@ -1619,10 +1595,9 @@ static void MC_put_xy_16_vis (uint8_t * dest, const uint8_t * _ref,
         } while (--height);
 }
 
-static void MC_put_xy_8_vis (uint8_t * dest, const uint8_t * _ref,
+static void MC_put_xy_8_vis (uint8_t * dest, const uint8_t * ref,
                              const int stride, int height)
 {
-        uint8_t *ref = (uint8_t *) _ref;
         unsigned long off = (unsigned long) ref & 0x7;
         unsigned long off_plus_1 = off + 1;
         int stride_8 = stride + 8;
@@ -1724,10 +1699,9 @@ static void MC_put_xy_8_vis (uint8_t * dest, const uint8_t * _ref,
         } while (--height);
 }
 
-static void MC_avg_xy_16_vis (uint8_t * dest, const uint8_t * _ref,
+static void MC_avg_xy_16_vis (uint8_t * dest, const uint8_t * ref,
                               const int stride, int height)
 {
-        uint8_t *ref = (uint8_t *) _ref;
         unsigned long off = (unsigned long) ref & 0x7;
         unsigned long off_plus_1 = off + 1;
         int stride_8 = stride + 8;
@@ -1921,10 +1895,9 @@ static void MC_avg_xy_16_vis (uint8_t * dest, const uint8_t * _ref,
         } while (--height);
 }
 
-static void MC_avg_xy_8_vis (uint8_t * dest, const uint8_t * _ref,
+static void MC_avg_xy_8_vis (uint8_t * dest, const uint8_t * ref,
                              const int stride, int height)
 {
-        uint8_t *ref = (uint8_t *) _ref;
         unsigned long off = (unsigned long) ref & 0x7;
         unsigned long off_plus_1 = off + 1;
         int stride_8 = stride + 8;
@@ -2065,11 +2038,9 @@ static void MC_avg_xy_8_vis (uint8_t * dest, const uint8_t * _ref,
  *      fpadd16         f12, f10, f10
  */
 
-static void MC_put_no_round_o_16_vis (uint8_t * dest, const uint8_t * _ref,
+static void MC_put_no_round_o_16_vis (uint8_t * dest, const uint8_t * ref,
                                       const int stride, int height)
 {
-        uint8_t *ref = (uint8_t *) _ref;
-
         ref = vis_alignaddr(ref);
         do {    /* 5 cycles */
                 vis_ld64(ref[0], TMP0);
@@ -2088,11 +2059,9 @@ static void MC_put_no_round_o_16_vis (uint8_t * dest, const uint8_t * _ref,
         } while (--height);
 }
 
-static void MC_put_no_round_o_8_vis (uint8_t * dest, const uint8_t * _ref,
+static void MC_put_no_round_o_8_vis (uint8_t * dest, const uint8_t * ref,
                             const int stride, int height)
 {
-        uint8_t *ref = (uint8_t *) _ref;
-
         ref = vis_alignaddr(ref);
         do {    /* 4 cycles */
                 vis_ld64(ref[0], TMP0);
@@ -2109,10 +2078,9 @@ static void MC_put_no_round_o_8_vis (uint8_t * dest, const uint8_t * _ref,
 }
 
 
-static void MC_avg_no_round_o_16_vis (uint8_t * dest, const uint8_t * _ref,
+static void MC_avg_no_round_o_16_vis (uint8_t * dest, const uint8_t * ref,
                              const int stride, int height)
 {
-        uint8_t *ref = (uint8_t *) _ref;
         int stride_8 = stride + 8;
 
         ref = vis_alignaddr(ref);
@@ -2270,11 +2238,9 @@ static void MC_avg_no_round_o_16_vis (uint8_t * dest, const uint8_t * _ref,
         vis_st64_2(TMP22, dest, 8);
 }
 
-static void MC_avg_no_round_o_8_vis (uint8_t * dest, const uint8_t * _ref,
+static void MC_avg_no_round_o_8_vis (uint8_t * dest, const uint8_t * ref,
                             const int stride, int height)
 {
-        uint8_t *ref = (uint8_t *) _ref;
-
         ref = vis_alignaddr(ref);
 
         vis_ld64(ref[0], TMP0);
@@ -2364,10 +2330,9 @@ static void MC_avg_no_round_o_8_vis (uint8_t * dest, const uint8_t * _ref,
         vis_st64(TMP4, dest[0]);
 }
 
-static void MC_put_no_round_x_16_vis (uint8_t * dest, const uint8_t * _ref,
+static void MC_put_no_round_x_16_vis (uint8_t * dest, const uint8_t * ref,
                              const int stride, int height)
 {
-        uint8_t *ref = (uint8_t *) _ref;
         unsigned long off = (unsigned long) ref & 0x7;
         unsigned long off_plus_1 = off + 1;
 
@@ -2557,10 +2522,9 @@ static void MC_put_no_round_x_16_vis (uint8_t * dest, const uint8_t * _ref,
         vis_st64_2(TMP8, dest, 8);
 }
 
-static void MC_put_no_round_x_8_vis (uint8_t * dest, const uint8_t * _ref,
+static void MC_put_no_round_x_8_vis (uint8_t * dest, const uint8_t * ref,
                             const int stride, int height)
 {
-        uint8_t *ref = (uint8_t *) _ref;
         unsigned long off = (unsigned long) ref & 0x7;
         unsigned long off_plus_1 = off + 1;
 
@@ -2681,10 +2645,9 @@ static void MC_put_no_round_x_8_vis (uint8_t * dest, const uint8_t * _ref,
         dest += stride;
 }
 
-static void MC_avg_no_round_x_16_vis (uint8_t * dest, const uint8_t * _ref,
+static void MC_avg_no_round_x_16_vis (uint8_t * dest, const uint8_t * ref,
                              const int stride, int height)
 {
-        uint8_t *ref = (uint8_t *) _ref;
         unsigned long off = (unsigned long) ref & 0x7;
         unsigned long off_plus_1 = off + 1;
 
@@ -2772,10 +2735,9 @@ static void MC_avg_no_round_x_16_vis (uint8_t * dest, const uint8_t * _ref,
         } while (--height);
 }
 
-static void MC_avg_no_round_x_8_vis (uint8_t * dest, const uint8_t * _ref,
+static void MC_avg_no_round_x_8_vis (uint8_t * dest, const uint8_t * ref,
                             const int stride, int height)
 {
-        uint8_t *ref = (uint8_t *) _ref;
         unsigned long off = (unsigned long) ref & 0x7;
         unsigned long off_plus_1 = off + 1;
         int stride_times_2 = stride << 1;
@@ -2938,11 +2900,9 @@ static void MC_avg_no_round_x_8_vis (uint8_t * dest, const uint8_t * _ref,
         } while (--height);
 }
 
-static void MC_put_no_round_y_16_vis (uint8_t * dest, const uint8_t * _ref,
+static void MC_put_no_round_y_16_vis (uint8_t * dest, const uint8_t * ref,
                              const int stride, int height)
 {
-        uint8_t *ref = (uint8_t *) _ref;
-
         ref = vis_alignaddr(ref);
         vis_ld64(ref[0], TMP0);
 
@@ -3094,11 +3054,9 @@ static void MC_put_no_round_y_16_vis (uint8_t * dest, const uint8_t * _ref,
         vis_st64_2(TMP2, dest, 8);
 }
 
-static void MC_put_no_round_y_8_vis (uint8_t * dest, const uint8_t * _ref,
+static void MC_put_no_round_y_8_vis (uint8_t * dest, const uint8_t * ref,
                             const int stride, int height)
 {
-        uint8_t *ref = (uint8_t *) _ref;
-
         ref = vis_alignaddr(ref);
         vis_ld64(ref[0], TMP0);
 
@@ -3186,10 +3144,9 @@ static void MC_put_no_round_y_8_vis (uint8_t * dest, const uint8_t * _ref,
         vis_st64(DST_0, dest[0]);
 }
 
-static void MC_avg_no_round_y_16_vis (uint8_t * dest, const uint8_t * _ref,
+static void MC_avg_no_round_y_16_vis (uint8_t * dest, const uint8_t * ref,
                              const int stride, int height)
 {
-        uint8_t *ref = (uint8_t *) _ref;
         int stride_8 = stride + 8;
         int stride_16 = stride + 16;
 
@@ -3315,10 +3272,9 @@ static void MC_avg_no_round_y_16_vis (uint8_t * dest, const uint8_t * _ref,
         } while (--height);
 }
 
-static void MC_avg_no_round_y_8_vis (uint8_t * dest, const uint8_t * _ref,
+static void MC_avg_no_round_y_8_vis (uint8_t * dest, const uint8_t * ref,
                             const int stride, int height)
 {
-        uint8_t *ref = (uint8_t *) _ref;
         int stride_8 = stride + 8;
 
         vis_set_gsr(5 << VIS_GSR_SCALEFACT_SHIFT);
@@ -3395,10 +3351,9 @@ static void MC_avg_no_round_y_8_vis (uint8_t * dest, const uint8_t * _ref,
         } while (--height);
 }
 
-static void MC_put_no_round_xy_16_vis (uint8_t * dest, const uint8_t * _ref,
+static void MC_put_no_round_xy_16_vis (uint8_t * dest, const uint8_t * ref,
                                        const int stride, int height)
 {
-        uint8_t *ref = (uint8_t *) _ref;
         unsigned long off = (unsigned long) ref & 0x7;
         unsigned long off_plus_1 = off + 1;
         int stride_8 = stride + 8;
@@ -3560,10 +3515,9 @@ static void MC_put_no_round_xy_16_vis (uint8_t * dest, const uint8_t * _ref,
         } while (--height);
 }
 
-static void MC_put_no_round_xy_8_vis (uint8_t * dest, const uint8_t * _ref,
+static void MC_put_no_round_xy_8_vis (uint8_t * dest, const uint8_t * ref,
                                       const int stride, int height)
 {
-        uint8_t *ref = (uint8_t *) _ref;
         unsigned long off = (unsigned long) ref & 0x7;
         unsigned long off_plus_1 = off + 1;
         int stride_8 = stride + 8;
@@ -3665,10 +3619,9 @@ static void MC_put_no_round_xy_8_vis (uint8_t * dest, const uint8_t * _ref,
         } while (--height);
 }
 
-static void MC_avg_no_round_xy_16_vis (uint8_t * dest, const uint8_t * _ref,
+static void MC_avg_no_round_xy_16_vis (uint8_t * dest, const uint8_t * ref,
                                        const int stride, int height)
 {
-        uint8_t *ref = (uint8_t *) _ref;
         unsigned long off = (unsigned long) ref & 0x7;
         unsigned long off_plus_1 = off + 1;
         int stride_8 = stride + 8;
@@ -3862,10 +3815,9 @@ static void MC_avg_no_round_xy_16_vis (uint8_t * dest, const uint8_t * _ref,
         } while (--height);
 }
 
-static void MC_avg_no_round_xy_8_vis (uint8_t * dest, const uint8_t * _ref,
+static void MC_avg_no_round_xy_8_vis (uint8_t * dest, const uint8_t * ref,
                                       const int stride, int height)
 {
-        uint8_t *ref = (uint8_t *) _ref;
         unsigned long off = (unsigned long) ref & 0x7;
         unsigned long off_plus_1 = off + 1;
         int stride_8 = stride + 8;
@@ -3985,66 +3937,34 @@ static void MC_avg_no_round_xy_8_vis (uint8_t * dest, const uint8_t * _ref,
 
 /* End of no rounding code */
 
-static sigjmp_buf jmpbuf;
-static volatile sig_atomic_t canjump = 0;
-
-static void sigill_handler (int sig)
-{
-    if (!canjump) {
-        signal (sig, SIG_DFL);
-        raise (sig);
-    }
-
-    canjump = 0;
-    siglongjmp (jmpbuf, 1);
-}
-
 #define ACCEL_SPARC_VIS 1
 #define ACCEL_SPARC_VIS2 2
 
-static int vis_level ()
+static int vis_level(void)
 {
     int accel = 0;
-
-    signal (SIGILL, sigill_handler);
-    if (sigsetjmp (jmpbuf, 1)) {
-        signal (SIGILL, SIG_DFL);
-        return accel;
-    }
-
-    canjump = 1;
-
-    /* pdist %f0, %f0, %f0 */
-    __asm__ __volatile__(".word\t0x81b007c0");
-
-    canjump = 0;
     accel |= ACCEL_SPARC_VIS;
-
-    if (sigsetjmp (jmpbuf, 1)) {
-        signal (SIGILL, SIG_DFL);
-        return accel;
-    }
-
-    canjump = 1;
-
-    /* edge8n %g0, %g0, %g0 */
-    __asm__ __volatile__(".word\t0x81b00020");
-
-    canjump = 0;
     accel |= ACCEL_SPARC_VIS2;
-
-    signal (SIGILL, SIG_DFL);
-
     return accel;
 }
 
 /* libavcodec initialization code */
 void dsputil_init_vis(DSPContext* c, AVCodecContext *avctx)
 {
-  /* VIS specific optimisations */
+  /* VIS-specific optimizations */
   int accel = vis_level ();
+  const int high_bit_depth = avctx->bits_per_raw_sample > 8;
 
   if (accel & ACCEL_SPARC_VIS) {
+      if (avctx->bits_per_raw_sample <= 8 &&
+          avctx->idct_algo == FF_IDCT_SIMPLEVIS) {
+          c->idct_put = ff_simple_idct_put_vis;
+          c->idct_add = ff_simple_idct_add_vis;
+          c->idct     = ff_simple_idct_vis;
+          c->idct_permutation_type = FF_TRANSPOSE_IDCT_PERM;
+      }
+
+      if (!high_bit_depth) {
       c->put_pixels_tab[0][0] = MC_put_o_16_vis;
       c->put_pixels_tab[0][1] = MC_put_x_16_vis;
       c->put_pixels_tab[0][2] = MC_put_y_16_vis;
@@ -4084,7 +4004,6 @@ void dsputil_init_vis(DSPContext* c, AVCodecContext *avctx)
       c->avg_no_rnd_pixels_tab[1][1] = MC_avg_no_round_x_8_vis;
       c->avg_no_rnd_pixels_tab[1][2] = MC_avg_no_round_y_8_vis;
       c->avg_no_rnd_pixels_tab[1][3] = MC_avg_no_round_xy_8_vis;
+      }
   }
 }
-
-#endif  /* !(ARCH_SPARC) */