| Index: celt/cpu_support.h
|
| diff --git a/src/opus.c b/celt/cpu_support.h
|
| similarity index 75%
|
| copy from src/opus.c
|
| copy to celt/cpu_support.h
|
| index d6ae7bab24e688901361e9681386d99492fb067f..41481feb9c69041d7f2df636376dd9590ed53a2d 100644
|
| --- a/src/opus.c
|
| +++ b/celt/cpu_support.h
|
| @@ -1,5 +1,5 @@
|
| -/* Copyright (c) 2011 Xiph.Org Foundation, Skype Limited
|
| - Written by Jean-Marc Valin and Koen Vos */
|
| +/* Copyright (c) 2010 Xiph.Org Foundation
|
| + * Copyright (c) 2013 Parrot */
|
| /*
|
| Redistribution and use in source and binary forms, with or without
|
| modification, are permitted provided that the following conditions
|
| @@ -25,23 +25,27 @@
|
| SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| */
|
|
|
| -#ifdef HAVE_CONFIG_H
|
| -#include "config.h"
|
| -#endif
|
| +#ifndef CPU_SUPPORT_H
|
| +#define CPU_SUPPORT_H
|
| +
|
| +#if defined(OPUS_HAVE_RTCD) && defined(ARMv4_ASM)
|
| +#include "arm/armcpu.h"
|
| +
|
| +/* We currently support 4 ARM variants:
|
| + * arch[0] -> ARMv4
|
| + * arch[1] -> ARMv5E
|
| + * arch[2] -> ARMv6
|
| + * arch[3] -> NEON
|
| + */
|
| +#define OPUS_ARCHMASK 3
|
|
|
| -#include "opus.h"
|
| -#include "opus_private.h"
|
| +#else
|
| +#define OPUS_ARCHMASK 0
|
|
|
| -int encode_size(int size, unsigned char *data)
|
| +static inline int opus_select_arch(void)
|
| {
|
| - if (size < 252)
|
| - {
|
| - data[0] = size;
|
| - return 1;
|
| - } else {
|
| - data[0] = 252+(size&0x3);
|
| - data[1] = (size-(int)data[0])>>2;
|
| - return 2;
|
| - }
|
| + return 0;
|
| }
|
| +#endif
|
|
|
| +#endif
|
|
|