Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(552)

Unified Diff: celt/cpu_support.h

Issue 28553003: Updating Opus to a pre-release of 1.1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/opus
Patch Set: Removing failing file Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « celt/celt_lpc.c ('k') | celt/cwrs.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « celt/celt_lpc.c ('k') | celt/cwrs.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698