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

Unified Diff: webrtc/modules/audio_coding/codecs/opus/opus/convert_rtcd_assembler.py

Issue 1612443002: Create local copy of Opus v1.1.2 Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: testing if neteq4_opus_network_stats.dat.sha1 needs to be updated Created 4 years, 11 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
Index: webrtc/modules/audio_coding/codecs/opus/opus/convert_rtcd_assembler.py
diff --git a/webrtc/modules/audio_coding/codecs/opus/opus/convert_rtcd_assembler.py b/webrtc/modules/audio_coding/codecs/opus/opus/convert_rtcd_assembler.py
new file mode 100755
index 0000000000000000000000000000000000000000..dc63c641f57f4c7ce49bda7f32bf976f87225ec7
--- /dev/null
+++ b/webrtc/modules/audio_coding/codecs/opus/opus/convert_rtcd_assembler.py
@@ -0,0 +1,52 @@
+#!/usr/bin/env python
+# Copyright 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# Script for converting celt_pitch_xcorr_arm.s -> celt_pitch_xcorr_arm.S
+# using the arm2gnu.pl script.
+
+import os
+import sys
+
+
+USAGE = ('Usage:\n'
+ './convert_rtcd_assembler.py arm2gnu_script input_file output_file')
+
+
+def main(argv):
+ if len(argv) != 3:
+ print >> sys.stderr, ('Error: You must pass the following arguments:\n'
+ ' * arm2gnu_script_path\n'
+ ' * input_file\n'
+ ' * output_file')
+ print USAGE
+ return 1
+
+ arm2gnu_script = os.path.abspath(argv[0])
+ if not os.path.exists(arm2gnu_script):
+ print >> sys.stderr, ('Error: Cannot find arm2gnu.pl script at: %s.' %
+ arm2gnu_script)
+ return 2
+
+ input_file = os.path.abspath(argv[1])
+ if not os.path.exists(input_file):
+ print >> sys.stderr, 'Error: Cannot find input file at: %s.' % input_file
+ return 3
+
+ output_file = argv[2]
+
+ # Ensure the output file's directory path exists.
+ output_dir = os.path.dirname(output_file)
+ if not os.path.exists(output_dir):
+ os.makedirs(output_dir)
+
+ cmd = ('perl %s %s | '
+ 'sed "s/OPUS_ARM_MAY_HAVE_[A-Z]*/1/g" | '
+ 'sed "/.include/d" '
+ '> %s') % (arm2gnu_script, input_file, output_file)
+ print cmd
+ return os.system(cmd)
+
+if __name__ == '__main__':
+ sys.exit(main(sys.argv[1:]))
« no previous file with comments | « webrtc/modules/audio_coding/codecs/opus/opus/README.chromium ('k') | webrtc/modules/audio_coding/codecs/opus/opus/opus.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698