]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/ppc/idct_altivec.c
Remove const vector macro indirection that is useless and obfuscating
[ffmpeg] / libavcodec / ppc / idct_altivec.c
index 93d63cfd3508f9f88d55b84735ecc6a3bf96c976..01c0a12b153e30e36784bc079bf862c2fac6efbb 100644 (file)
@@ -1,20 +1,21 @@
 /*
  * Copyright (c) 2001 Michel Lespinasse
  *
- * This library is free software; you can redistribute it and/or
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg 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 of the License, or (at your option) any later version.
+ * version 2.1 of the License, or (at your option) any later version.
  *
- * This library is distributed in the hope that it will be useful,
+ * FFmpeg 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 this library; if not, write to the Free Software
+ * License along with FFmpeg; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
  */
 
 /*
 
 #include <stdlib.h>                                      /* malloc(), free() */
 #include <string.h>
-#include "../dsputil.h"
+#include "dsputil.h"
 
 #include "gcc_fixes.h"
 
 #include "dsputil_altivec.h"
 
 #define vector_s16_t vector signed short
-#define const_vector_s16_t const_vector signed short
+#define const_vector_s16_t const vector signed short
 #define vector_u16_t vector unsigned short
 #define vector_s8_t vector signed char
 #define vector_u8_t vector unsigned char
@@ -167,15 +168,9 @@ static const_vector_s16_t constants[5] = {
 void idct_put_altivec(uint8_t* dest, int stride, vector_s16_t* block)
 {
 POWERPC_PERF_DECLARE(altivec_idct_put_num, 1);
-#ifdef ALTIVEC_USE_REFERENCE_C_CODE
-POWERPC_PERF_START_COUNT(altivec_idct_put_num, 1);
-    void simple_idct_put(uint8_t *dest, int line_size, int16_t *block);
-    simple_idct_put(dest, stride, (int16_t*)block);
-POWERPC_PERF_STOP_COUNT(altivec_idct_put_num, 1);
-#else /* ALTIVEC_USE_REFERENCE_C_CODE */
     vector_u8_t tmp;
 
-#ifdef POWERPC_PERFORMANCE_REPORT
+#ifdef CONFIG_POWERPC_PERF
 POWERPC_PERF_START_COUNT(altivec_idct_put_num, 1);
 #endif
     IDCT
@@ -195,25 +190,18 @@ POWERPC_PERF_START_COUNT(altivec_idct_put_num, 1);
     COPY (dest, vx7)
 
 POWERPC_PERF_STOP_COUNT(altivec_idct_put_num, 1);
-#endif /* ALTIVEC_USE_REFERENCE_C_CODE */
 }
 
 void idct_add_altivec(uint8_t* dest, int stride, vector_s16_t* block)
 {
 POWERPC_PERF_DECLARE(altivec_idct_add_num, 1);
-#ifdef ALTIVEC_USE_REFERENCE_C_CODE
-POWERPC_PERF_START_COUNT(altivec_idct_add_num, 1);
-    void simple_idct_add(uint8_t *dest, int line_size, int16_t *block);
-    simple_idct_add(dest, stride, (int16_t*)block);
-POWERPC_PERF_STOP_COUNT(altivec_idct_add_num, 1);
-#else /* ALTIVEC_USE_REFERENCE_C_CODE */
     vector_u8_t tmp;
     vector_s16_t tmp2, tmp3;
     vector_u8_t perm0;
     vector_u8_t perm1;
     vector_u8_t p0, p1, p;
 
-#ifdef POWERPC_PERFORMANCE_REPORT
+#ifdef CONFIG_POWERPC_PERF
 POWERPC_PERF_START_COUNT(altivec_idct_add_num, 1);
 #endif
 
@@ -244,6 +232,5 @@ POWERPC_PERF_START_COUNT(altivec_idct_add_num, 1);
     ADD (dest, vx7, perm1)
 
 POWERPC_PERF_STOP_COUNT(altivec_idct_add_num, 1);
-#endif /* ALTIVEC_USE_REFERENCE_C_CODE */
 }