Opus issueshttps://gitlab.xiph.org/xiph/opus/-/issues2018-11-26T18:44:40Zhttps://gitlab.xiph.org/xiph/opus/-/issues/1962Quality is poorer when the FrameSize is 10 ms2018-11-26T18:44:40ZCedrick FonkwaQuality is poorer when the FrameSize is 10 msRunning PESQ score with OPUS codec show that the quality is not as good with 10ms packet size as with others (20, 40, 60).
Example:
Mean PESQ with 8 kHz - 10000 kbps - 10 ms : 3.19
Mean PESQ with 8 kHz - 10000 kbps - 20 ms : 3.75
Is...Running PESQ score with OPUS codec show that the quality is not as good with 10ms packet size as with others (20, 40, 60).
Example:
Mean PESQ with 8 kHz - 10000 kbps - 10 ms : 3.19
Mean PESQ with 8 kHz - 10000 kbps - 20 ms : 3.75
Is there any reason that could explain this ? Jean-Marc ValinJean-Marc Valinhttps://gitlab.xiph.org/xiph/opus/-/issues/1991llvm crashes when building pitch.c for iOS (opus 1.1rc2) with optimisation en...2017-10-21T19:37:06Zmcguinnllvm crashes when building pitch.c for iOS (opus 1.1rc2) with optimisation enabled and floating pointI am trying to build the latest opus 1.1rc2 within webrtc for iOS using the chromium gyp build framework.
The build flag OPUS_ARM_MAY_HAVE_NEON is defined to get access to any neon optimisations
Without minimal compiler optimisations ...I am trying to build the latest opus 1.1rc2 within webrtc for iOS using the chromium gyp build framework.
The build flag OPUS_ARM_MAY_HAVE_NEON is defined to get access to any neon optimisations
Without minimal compiler optimisations (-O0) I see a message stating that opus will be very slow, but things build just fine.
With any optimisation set for iOS in the file trunk/build/common.gypi (i.e.., 'mac_debug_optimization%': 's', instead of '0') and building for FIXED_POINT (toggled 'use_opus_fixed_point%': 1, in trunk/third_party/opus/opus.gyp) then the compiler crashes and reports a problem similar to what is described here: http://lists.cs.uiuc.edu/pipermail/llvmbugs/2013-August/029853.html
The file that building stops at is celt/pitch.c
However building with fixed point and optimisation is not a problem.
More information about the llvm crash dump:
ninja: Entering directory `trunk/out_ios/Debug-iphoneos'
[74/2136] CC obj/third_party/opus-1.1-rc2/src/celt/opus.pitch.o
FAILED: ../../third_party/llvm-build/Release+Asserts/bin/clang -MMD -MF obj/third_party/opus-1.1-rc2/src/celt/opus.pitch.o.d -DANGLE_DX11 -DDISABLE_NACL -DCHROMIUM_BUILD -DUSE_LIBJPEG_TURBO=1 -DENABLE_INPUT_SPEECH -DENABLE_EGLIMAGE=1 -DCLD_VERSION=1 -DENABLE_SPELLCHECK=1 -DDISABLE_FTP_SUPPORT=1 -DOPUS_BUILD -DOPUS_EXPORT= -DHAVE_LRINT -DHAVE_LRINTF -DVAR_ARRAYS -DOPUS_ARM_MAY_HAVE_NEON -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DWTF_USE_DYNAMIC_ANNOTATIONS=1 -I../../third_party/opus-1.1-rc2/src/celt -I../../third_party/opus-1.1-rc2/src/include -I../../third_party/opus-1.1-rc2/src/silk -I../../third_party/opus-1.1-rc2/src/silk/float -isysroot /Applications/Xcode5.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk -O1 -gdwarf-2 -fvisibility=hidden -Wnewline-eof -miphoneos-version-min=6.0 -arch armv7 -Wendif-labels -Wno-unused-parameter -Wno-missing-field-initializers -Wheader-hygiene -Wno-c++11-narrowing -Wno-char-subscripts -Wno-unused-function -Wno-covered-switch-default -Wstring-conversion -Wno-deprecated-register -Wno-deprecated-declarations -Wheader-hygiene -Wno-char-subscripts -Wno-unused-function -Wno-unnamed-type-template-args -Wno-c++11-narrowing -std=c99 -Xclang -load -Xclang /Users/tommcguinness/webrtc2/trunk/tools/clang/scripts/../../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.dylib -Xclang -add-plugin -Xclang find-bad-constructs -fcolor-diagnostics -c ../../third_party/opus-1.1-rc2/src/celt/pitch.c -o obj/third_party/opus-1.1-rc2/src/celt/opus.pitch.o
Assertion failed: (MLoc.isReg() && !Indirect && "This doesn't support offset/indirection - implement it if needed"), function EmitDwarfRegOp, file /work/chromium/src/third_party/llvm/lib/Target/ARM/ARMAsmPrinter.cpp, line 225.
0 clang 0x0000000101b5b138 llvm::sys::PrintStackTrace(__sFILE*) + 40
1 clang 0x0000000101b5b684 abort + 692
2 libsystem_platform.dylib 0x00007fff896ff5aa _sigtramp + 26
3 libsystem_platform.dylib 000000000000000000 _sigtramp + 1989151344
4 clang 0x0000000101b5b3e6 abort + 22
5 clang 0x0000000101b5b3c1 __assert_rtn + 81
6 clang 0x000000010103b135 std::_Rb_tree<llvm::MachineInstr*, std::pair<llvm::MachineInstr* const, unsigned int>, std::_Select1st<std::pair<llvm::MachineInstr* const, unsigned int> >, std::less<llvm::MachineInstr*>, std::allocator<std::pair<llvm::MachineInstr* const, unsigned int> > >::_M_erase(std::_Rb_tree_node<std::pair<llvm::MachineInstr* const, unsigned int> >*) + 805
7 clang 0x000000010152ee8e llvm::DwarfDebug::emitDebugLoc() + 878
8 clang 0x000000010152e748 llvm::DwarfDebug::endModule() + 648
9 clang 0x00000001015082c3 llvm::AsmPrinter::doFinalization(llvm::Module&) + 563
10 clang 0x0000000101af24de llvm::FPPassManager::doFinalization(llvm::Module&) + 94
11 clang 0x0000000101af2816 llvm::MPPassManager::runOnModule(llvm::Module&) + 710
12 clang 0x0000000101af314f llvm::PassManagerImpl::run(llvm::Module&) + 543
13 clang 0x00000001001c5b4e clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::Module*, clang::BackendAction, llvm::raw_ostream*) + 5694
14 clang 0x00000001002cc813 clang::EmitObjAction::EmitObjAction(llvm::LLVMContext*) + 1555
15 clang 0x0000000100084b44 clang::MultiplexConsumer::HandleTranslationUnit(clang::ASTContext&) + 68
16 clang 0x000000010031fc54 clang::ParseAST(clang::Sema&, bool, bool) + 484
17 clang 0x00000001002cb801 clang::CodeGenAction::ExecuteAction() + 545
18 clang 0x0000000100069174 clang::FrontendAction::Execute() + 116
19 clang 0x00000001000422bd clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 973
20 clang 0x0000000100009064 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 3348
21 clang 0x0000000100001179 cc1_main(char const**, char const**, char const*, void*) + 793
22 clang 0x00000001000072b5 main + 8901
23 clang 0x0000000100000e34 start + 52
24 clang 0x000000000000007b start + 4294963835
Stack dump:
0. Program arguments: /Users/tommcguinness/webrtc2/trunk/third_party/llvm-build/Release+Asserts/bin/clang -cc1 -triple thumbv7-apple-ios6.0.0 -emit-obj -disable-free -main-file-name pitch.c -mrelocation-model pic -pic-level 2 -mdisable-fp-elim -masm-verbose -target-cpu cortex-a8 -target-feature +soft-float-abi -target-abi apcs-gnu -mfloat-abi soft -target-linker-version 133.3 -gdwarf-2 -coverage-file /Users/tommcguinness/webrtc2/trunk/out_ios/Debug-iphoneos/obj/third_party/opus-1.1-rc2/src/celt/opus.pitch.o -resource-dir /Users/tommcguinness/webrtc2/trunk/third_party/llvm-build/Release+Asserts/bin/../lib/clang/3.4 -dependency-file obj/third_party/opus-1.1-rc2/src/celt/opus.pitch.o.d -MT obj/third_party/opus-1.1-rc2/src/celt/opus.pitch.o -isysroot /Applications/Xcode5.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk -D ANGLE_DX11 -D DISABLE_NACL -D CHROMIUM_BUILD -D USE_LIBJPEG_TURBO=1 -D ENABLE_INPUT_SPEECH -D ENABLE_EGLIMAGE=1 -D CLD_VERSION=1 -D ENABLE_SPELLCHECK=1 -D DISABLE_FTP_SUPPORT=1 -D OPUS_BUILD -D OPUS_EXPORT= -D HAVE_LRINT -D HAVE_LRINTF -D VAR_ARRAYS -D OPUS_ARM_MAY_HAVE_NEON -D DYNAMIC_ANNOTATIONS_ENABLED=1 -D WTF_USE_DYNAMIC_ANNOTATIONS=1 -I ../../third_party/opus-1.1-rc2/src/celt -I ../../third_party/opus-1.1-rc2/src/include -I ../../third_party/opus-1.1-rc2/src/silk -I ../../third_party/opus-1.1-rc2/src/silk/float -O1 -Wnewline-eof -Wendif-labels -Wno-unused-parameter -Wno-missing-field-initializers -Wheader-hygiene -Wno-c++11-narrowing -Wno-char-subscripts -Wno-unused-function -Wno-covered-switch-default -Wstring-conversion -Wno-deprecated-register -Wno-deprecated-declarations -Wheader-hygiene -Wno-char-subscripts -Wno-unused-function -Wno-unnamed-type-template-args -Wno-c++11-narrowing -std=c99 -fdebug-compilation-dir /Users/tommcguinness/webrtc2/trunk/out_ios/Debug-iphoneos -ferror-limit 19 -fmessage-length 0 -fvisibility hidden -stack-protector 1 -mstackrealign -fblocks -fobjc-runtime=ios-6.0.0 -fencode-extended-block-signature -fsjlj-exceptions -fdiagnostics-show-option -fcolor-diagnostics -vectorize-slp -load /Users/tommcguinness/webrtc2/trunk/tools/clang/scripts/../../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.dylib -add-plugin find-bad-constructs -o obj/third_party/opus-1.1-rc2/src/celt/opus.pitch.o -x c ../../third_party/opus-1.1-rc2/src/celt/pitch.c
1. <eof> parser at end of file
2. Code generation
clang: error: unable to execute command: Illegal instruction: 4
clang: error: clang frontend command failed due to signal (use -v to see invocation)
clang version 3.4 (trunk 192635)
Target: arm-apple-darwin13.0.0
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and associated run script.
clang: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /var/folders/h1/51w8ct3j2mq60f_y9djxbhxh04m7j1/T/pitch-c74fe5.c
clang: note: diagnostic msg: /var/folders/h1/51w8ct3j2mq60f_y9djxbhxh04m7j1/T/pitch-c74fe5.sh
clang: note: diagnostic msg:
********************
[74/2136] CC obj/third_party/opus-1.1-rc2/src/silk/opus.enc_API.o
ninja: build stopped: subcommand failed.
Jean-Marc ValinJean-Marc Valinhttps://gitlab.xiph.org/xiph/opus/-/issues/1998Opus 1.1: 64 bit windows compilation generates conversion warnings2017-10-21T19:37:06ZJ. MarkiewiczOpus 1.1: 64 bit windows compilation generates conversion warningsUsing the 2010 projects to compile opus 1.1 and generate the following warnings compiling x64 Release.
opus_compare.c
..\..\src\opus_compare.c(78): warning C4244: '=' : conversion from 'int' to 'float', possible loss of data
..\..\src...Using the 2010 projects to compile opus 1.1 and generate the following warnings compiling x64 Release.
opus_compare.c
..\..\src\opus_compare.c(78): warning C4244: '=' : conversion from 'int' to 'float', possible loss of data
..\..\src\opus_compare.c(233): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
..\..\src\opus_compare.c(349): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
..\..\src\opus_compare.c(367): warning C4244: '=' : conversion from 'double' to 'float', possible loss of data
opus_decoder.c
opus_encoder.c
..\..\src\opus_encoder.c(588): warning C4334: '<<' : result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
..\..\src\opus_encoder.c(589): warning C4334: '<<' : result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
..\..\src\opus_encoder.c(608): warning C4334: '<<' : result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
..\..\src\opus_encoder.c(615): warning C4334: '<<' : result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
..\..\src\opus_encoder.c(620): warning C4334: '<<' : result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
..\..\src\opus_encoder.c(623): warning C4334: '<<' : result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
..\..\src\opus_encoder.c(625): warning C4334: '<<' : result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
..\..\src\opus_encoder.c(714): warning C4334: '<<' : result of 32-bit shift implicitly converted to 64 bits (was 64-bit shift intended?)
repacketizer.c
..\..\src\repacketizer.c(222): warning C4244: '=' : conversion from '__int64' to 'int', possible loss of data
Maybe they are harmless, but they look scary especially when dealing we're talking about a codec. I didn't see a open issue filed on this so I thought I'd let you know.Jean-Marc ValinJean-Marc Valinhttps://gitlab.xiph.org/xiph/opus/-/issues/2048Compiling without optimization produces a warning2017-10-21T19:37:05ZDave MichaelCompiling without optimization produces a warningI work on Chromium, and in my debug build, I always get this warning:
src/src/opus_decoder.c:37:10: warning: You appear to be compiling without optimization, if so opus will be very slow. [-W#pragma-messages]
# pragma message "You appear...I work on Chromium, and in my debug build, I always get this warning:
src/src/opus_decoder.c:37:10: warning: You appear to be compiling without optimization, if so opus will be very slow. [-W#pragma-messages]
# pragma message "You appear to be compiling without optimization, if so opus will be very slow."
^
I personally want my build output to be clean, and I'm perfectly aware when doing a debug build that it's debug and might be slow. So I would prefer if this warning was not there.
If it's not acceptable to simply remove this warning, it seems like it ought to be possible to turn this off with a precompile define so that embedders like Chromium can turn it off. We have a large code base and noise in our build output can be very annoying.
I'm willing to do the patch if there's an acceptable solution to this.Jean-Marc ValinJean-Marc Valinhttps://gitlab.xiph.org/xiph/opus/-/issues/2215Opus encoder blends both audio channels in each audio channel in low bitrates2017-10-21T19:37:05ZPavel ChrpaOpus encoder blends both audio channels in each audio channel in low bitratesIn low bitrate encoding of a stereo file (WAV), the Opus codec seems to blend both audio channel in each audio channel. From my initial testing it seems that the border is around ~38-40kbps and the lower the bitrate is, the more signific...In low bitrate encoding of a stereo file (WAV), the Opus codec seems to blend both audio channel in each audio channel. From my initial testing it seems that the border is around ~38-40kbps and the lower the bitrate is, the more significant this seems. This may be a problem in recording of two speakers, where each of the speaker represent one of the audio channel.
*Steps*:
1. Install opus-tools 0.1.9-1 (e.g. _sudo apt-get install opus-tools_)
2. Encode stereo file by running _opusenc --bitrate 24 --hard-cbr --framesize 60_
3. Play the file and listen to each of the channels separately
*Expected*:
- both channels will retain only their audio footage
*Environment*:
- Ubuntu MATE 15.04 running on Dell Latitude E5430
- WAV info (file available at: [https://drive.google.com/folderview?id=0B_W_T_CohbhsfnNaOGZkb0NzekhKeDZDV2FnbFJTeUV4QzdBaDFPalpGQUdIVkJoTUpIVEk&usp=sharing]):
```
$ mediainfo ~/Desktop/1352389720037_5516_5517_31870.wav
General
Complete name : /home/pavel/Desktop/1352389720037_5516_5517_31870.wav
Format : Wave
File size : 2.81 MiB
Duration : 1mn 32s
Overall bit rate mode : Constant
Overall bit rate : 256 Kbps
Audio
Format : PCM
Format settings, Endianness : Little
Format settings, Sign : Signed
Codec ID : 1
Duration : 1mn 32s
Bit rate mode : Constant
Bit rate : 256 Kbps
Channel(s) : 2 channels
Sampling rate : 8 000 Hz
Bit depth : 16 bits
Stream size : 2.81 MiB (100%)
```
- Opus codec:
```
$ dpkg -l | grep opus
ii libopus0:amd64 1.1-0ubuntu2 amd64 Opus codec runtime library
ii opus-tools 0.1.9-1 amd64 Opus codec command line tools
```Jean-Marc ValinJean-Marc Valinhttps://gitlab.xiph.org/xiph/opus/-/issues/2314Opus 1.1.3 fixed and floating point code behavior difference while encoding a...2017-10-21T19:37:03Zpks831Opus 1.1.3 fixed and floating point code behavior difference while encoding and decoding 3 kHz sine tone at 48 kHz sampling rate.Hi,
The attached 16 bit stereo pcm file when encoded (at 8 kbps bitrate) and decoded with opus application (opus-1.1.3), produces quite different output for fixed (./configure --enable-fixed-point --disable-float-api) and floating po...Hi,
The attached 16 bit stereo pcm file when encoded (at 8 kbps bitrate) and decoded with opus application (opus-1.1.3), produces quite different output for fixed (./configure --enable-fixed-point --disable-float-api) and floating point builds. Floating point build gives close enough output to original pcm content, but for fixed point build there are a lot of amplitude fluctuations. Command lines used for encoding and decoding are given below:
Encoding:
./opus_demo -e voip 48000 2 8000 3229_sin_3000_stereo_fs_48000.pcm encoded.bit
Decoding:
./opus_demo -d 48000 2 encoded.bit out.pcm
Input pcm file is attached (16 bit PCM, 48 kHz Sampling Rate, Stereo)Jean-Marc ValinJean-Marc Valin