| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes the following warnings:
In file included from /usr/include/stdio.h:894,
from src/sbcenc.c:30:
In function ‘fprintf’,
inlined from ‘encode’ at src/sbcenc.c:160:3,
inlined from ‘main’ at src/sbcenc.c:329:3:
/usr/include/bits/stdio2.h:105:10: error: ‘srate’ may be
used uninitialized [-Werror=maybe-uninitialized]
105 | return __fprintf_chk (__stream, __USE_FORTIFY_LEVEL - 1, __fmt,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
106 | __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~
src/sbcenc.c: In function ‘main’:
src/sbcenc.c:54:23: note: ‘srate’ was declared here
54 | int fd, size, srate, codesize, nframes;
| ^~~~~
cc1: all warnings being treated as errors
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Don't call __builtin_cpu_init unless targeting i386 or x86_64.
Otherwise we get an error at link time:
CC sbc/sbc_primitives.lo
sbc/sbc_primitives.c: In function ‘sbc_init_primitives_x86’:
sbc/sbc_primitives.c:596:2: warning: implicit declaration of function ‘__builtin_cpu_init’; did you mean ‘__builtin_irint’? [-Wimplicit-function-declaration]
[...]
CCLD src/sbcdec
ld: sbc/.libs/libsbc-private.a(sbc_primitives.o): in function `sbc_init_primitives':
sbc_primitives.c:(.text+0x3a30): undefined reference to `__builtin_cpu_init'
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Check if SBC_BUILD_WITH_MMX_SUPPORT is defined otherwise
sbc_init_primitives_mmx will not be declared and
_builtin_cpu_supports(“mmx”)) likely fail:
CC sbc/sbc_primitives.lo
sbc/sbc_primitives.c: In function ‘sbc_init_primitives_x86’:
sbc/sbc_primitives.c:599:3: warning: implicit declaration of function
‘sbc_init_primitives_mmx’; did you mean ‘sbc_init_primitives_x86’?
[-Wimplicit-function-declaration]
599 | sbc_init_primitives_mmx(state);
| ^~~~~~~~~~~~~~~~~~~~~~~
| sbc_init_primitives_x86
sbc/sbc_primitives.c: In function ‘sbc_init_primitives’:
sbc/sbc_primitives.c:598:6: error: hwcap ‘mmx’ is an invalid argument to
builtin ‘__builtin_cpu_supports’
598 | if (__builtin_cpu_supports(“mmx”))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[1]: *** [Makefile:711: sbc/sbc_primitives.lo] Error 1
make: *** [Makefile:453: all] Error 2
|
|
|
|
|
| |
This adds a new API function sbc_reinit_msbc. Like sbc_reinit or
sbc_reinit_a2dp but for msbc.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This makes use 128 bit XMM registers whenever possible.
$ time src/sbcenc_mmx -s 8 sin_64m.au > /dev/null
real 0m1.064s
user 0m1.012s
sys 0m0.049s
=== After ====
$ time src/sbcenc -s 8 sin_64m.au > /dev/null
real 0m1.032s
user 0m0.996s
sys 0m0.033s
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This makes use 128 bit XMM registers whenever possible.
$ time src/sbcenc_mmx -s 4 sin_4m.au > /dev/null
real 0m1.073s
user 0m1.039s
sys 0m0.030s
=== After ====
$ time src/sbcenc -s 4 sin_4m.au > /dev/null
real 0m1.049s
user 0m1.000s
sys 0m0.047s
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
sbc_reinit_a2dp() is missing the SBC_EXPORT attribute so it's not
visibile to be used by consumers of the shared object.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
frame_length is the output block size when encoding and the input block
size when decoding, with codesize it's vice versa. The documentation was
inaccurate regarding this. Using the terms "compressed" and
"uncompressed" instead of "output" and "input" should make the function
semantics clear.
|
|
|
|
|
|
| |
When encoding or decoding with JOINT_STEREO and 8 subbands the crc_pos is 88
bits. In this case there are no extra bits which need to be added to the CRC,
but there is still a read 1 byte past the end of the crc_header stack variable.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Otherwise it could overflow in some cases.
For instance in DUAL_CHANNEL mode, with subbands set to SBC_SB_8, blocks
set to SBC_BLK_16 and bitpool set to 64 results in a frame length of 268.
|
|
|
|
|
| |
According to A2DP specification, section 12.9, for DUAL_CHANNEL mode, we
shall use the same formula as for MONO mode.
|
| |
|
| |
|
|
|
|
|
| |
This adds sbc_reinit_a2dp that can be used to reconfigure a previous
initialized sbc_t with new A2DP configuration.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This adds sbc_init_a2dp that can be used to convert A2DP configuration to
the internal representation since they are not binary compatible.
|
|
|
|
|
| |
This enables high precision using 64 bits accumulators by default which
can be disabled with --disable-high-precision.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Traditionnal SBC frame header describe encoding parameters for each
frame: nr of blocks, subbands, allocation method, and bitpool. In mSBC,
only one combination of parameter is defined. That combination cannot be
expressed using a traditionnal SBC header. Because of this, a specific
header is defined with 0xAD followed by two reserved zero bytes.
|
| |
|
|
|
|
|
|
| |
This patch introduce a new private member which purpose is to encode 15
blocks. It is private to the library and can't be set from standard API.
sbc_init_msbc() function will be defined to set this flag.
|