Your message dated Sun, 13 Nov 2016 17:18:45 +0000
with message-id <[email protected]>
and subject line Bug#843173: fixed in faad2 2.8.0~cvs20161113-1
has caused the Debian Bug report #843173,
regarding libfaad-dev: Implicit SBR detection via AudioSpecificConfig fails 
when char is unsigned
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
843173: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=843173
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: libfaad-dev
Version: 2.7-8
Severity: normal

I'm not sure if this an issue which affects Debian itself. As it affects FAAD2
users and the development seems (the original homepage is orphaned) to be
continued within a Debian Git repo, I post it here.


FAAD2 provides the ability to init the decoder with the help of an 
AudioSpecificConfig
bit sequence (see also ISO/IEC 14496-3) via NeAACDecInit2. That function also
returns the "output" sample rate of the AAC stream.

When the AAC stream has the SBR extension (therefore: the core sample rate is
the half of the output sample rate), this can be signalled implicitely. In this
case the AudioSpecificConfig signals e.g. 24 kHz. FAAD2 treats streams with
sample rates of 24 kHz (or lower) automatically as having the SBR extension
(see the end of AudioSpecificConfigFromBitfile in /libfaad/mp4.c) and the
double of the core sample rate is returned as output sample rate.

Unfortunately, this does not work on systems where the char data type is
unsigned (e.g. Raspbian Jessie). In this case, the variable
mp4ASC->sbr_present_flag in the mentioned function
AudioSpecificConfigFromBitfile does not get initialized to -1. Therefore the
sample rate returned by NeAACDecInit2 is not doubled and still refers to the
core sample rate instead of the output sample rate.


The problem affects the installed version (see below) as well as the latest Git
version from git://anonscm.debian.org/pkg-multimedia/faad2.git

One way to fix this is to make the struct variable sbr_present_flag signed.
Another way is to enforce signed char by compiling FAAD2 with -fsigned-char.

I attach a short example in C which reproduces the problem. It prints out the
expected vs. the returned sample rate.

-- System Information:
Distributor ID: Raspbian
Description:    Raspbian GNU/Linux 8.0 (jessie)
Release:        8.0
Codename:       jessie
Architecture: armv7l

Kernel: Linux 4.4.21-v7+ (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages libfaad-dev depends on:
ii  libfaad2  2.7-8

libfaad-dev recommends no packages.

libfaad-dev suggests no packages.

-- no debconf information
// compile with:
// gcc -o faad2_test faad2_test.c -lfaad

#include <stdio.h>
#include <stdint.h>

#include <neaacdec.h>


int main() {
	NeAACDecHandle handle = NeAACDecOpen();
	if(!handle) {
		fprintf(stderr, "Error while NeAACDecOpen\n");
		return 1;
	}

	/* AudioSpecificConfig structure (see also ISO/IEC 14496-3)
	 *
	 *  00010 = AudioObjectType 2 (AAC LC)
	 *  xxxx  = (core) sample rate index
	 *  xxxx  = (core) channel config
	 *  100   = GASpecificConfig with 960 transform (used for DAB+; does not matter here)
	 *
	 * SBR extension: implicit signaling used - libfaad2 automatically assumes SBR on sample rates <= 24 kHz
	 */

	int core_sr_index = 0b0110;		// 24 kHz
	int core_ch_config = 0b0010;	// L/R

	uint8_t asc[2];
	asc[0] = 0b00010 << 3 | core_sr_index >> 1;
	asc[1] = (core_sr_index & 0x01) << 7 | core_ch_config << 3 | 0b100;


	// init decoder
	unsigned long output_sr;
	unsigned char output_ch;
	long int init_result = NeAACDecInit2(handle, asc, sizeof(asc), &output_sr, &output_ch);
	if(init_result != 0) {
		fprintf(stderr, "Error while NeAACDecInit2\n");
		NeAACDecClose(handle);
		return 1;
	}

	printf("The output sample rate is: %ld (expected: 48000)\n", output_sr);

	NeAACDecClose(handle);
	return 0;
}

--- End Message ---
--- Begin Message ---
Source: faad2
Source-Version: 2.8.0~cvs20161113-1

We believe that the bug you reported is fixed in the latest version of
faad2, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Fabian Greffrath <[email protected]> (supplier of updated faad2 package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Sun, 13 Nov 2016 17:45:15 +0100
Source: faad2
Binary: faad faad2-dbg libfaad-dev libfaad2
Architecture: source amd64
Version: 2.8.0~cvs20161113-1
Distribution: unstable
Urgency: medium
Maintainer: Debian Multimedia Maintainers 
<[email protected]>
Changed-By: Fabian Greffrath <[email protected]>
Description:
 faad       - freeware Advanced Audio Decoder player
 faad2-dbg  - freeware Advanced Audio Decoder - debugging symbols
 libfaad-dev - freeware Advanced Audio Decoder - development files
 libfaad2   - freeware Advanced Audio Decoder - runtime files
Closes: 843173
Changes:
 faad2 (2.8.0~cvs20161113-1) unstable; urgency=medium
 .
   * New upstream CVS snapshot.
     + Fixes implicit SBR detection via AudioSpecificConfig
       on systems with unsigned char (Closes: #843173).
   * Change Uploaders field to use my Debian account.
Checksums-Sha1:
 4efc99491809864aff8d5823cf64598b188d0c8f 2231 faad2_2.8.0~cvs20161113-1.dsc
 847e7ed97108e26e226943e7d0a6d3ea8e488134 514680 
faad2_2.8.0~cvs20161113.orig.tar.xz
 bdaec8320ac7cc11f106911830ebb579927431ca 15016 
faad2_2.8.0~cvs20161113-1.debian.tar.xz
 9e4debbe95a0e877e7f3ff82459ec011a5ca7a36 503644 
faad2-dbg_2.8.0~cvs20161113-1_amd64.deb
 7d3bf48daf16d2d4679dcf94883622107302659f 5390 
faad2_2.8.0~cvs20161113-1_20161113T165652z-feec11e8.buildinfo
 cfc193455f54dfa0003f9ff1974bfb7fa4d041f4 38048 
faad_2.8.0~cvs20161113-1_amd64.deb
 907c3aef886a9cedaac3a8bc1ef23b9fa3fe8d0b 182296 
libfaad-dev_2.8.0~cvs20161113-1_amd64.deb
 ffaf752f88032f5222fdb054c3d7035233cc4d18 166706 
libfaad2_2.8.0~cvs20161113-1_amd64.deb
Checksums-Sha256:
 8da31dd8c5726104f50d52f7006dd7374c84b2d411ebbc8821b8083ea605188e 2231 
faad2_2.8.0~cvs20161113-1.dsc
 de34bce327eac8a89cd58b7d44dfb58988033de6fda0ab9582ed0585fc3fd07e 514680 
faad2_2.8.0~cvs20161113.orig.tar.xz
 6fb50fd4b80346ab02c19efaf1f6e157e13b7e0567777765c8953c1291a92418 15016 
faad2_2.8.0~cvs20161113-1.debian.tar.xz
 b35684c9a4ff6fb347d6a0aef3590a6a789a4c072d524d0890cf6a6353ad326b 503644 
faad2-dbg_2.8.0~cvs20161113-1_amd64.deb
 962c18e4168de951c42fe7ecfc3551ab66c6634d27eec1bed843134e4ee74d35 5390 
faad2_2.8.0~cvs20161113-1_20161113T165652z-feec11e8.buildinfo
 c6aa72a74705e7bf08e0b3650c2040eff596a75cf83b34dff2986c8b9fa86b7c 38048 
faad_2.8.0~cvs20161113-1_amd64.deb
 30acb734f91d80e915cf4bec10ae4016f56e4e335ff5da1032b14493d88003ba 182296 
libfaad-dev_2.8.0~cvs20161113-1_amd64.deb
 b1ce0c6db8a3f4e71b0d1b96604ee333dd779ea7e18c6319dbf53d8b3039b297 166706 
libfaad2_2.8.0~cvs20161113-1_amd64.deb
Files:
 1f370b691db53c8ea8d53a4ed3510400 2231 libs optional 
faad2_2.8.0~cvs20161113-1.dsc
 bceecaced180cdeb9f73d7d04967ce46 514680 libs optional 
faad2_2.8.0~cvs20161113.orig.tar.xz
 4252c0f8b291ecc2da121907b429cfed 15016 libs optional 
faad2_2.8.0~cvs20161113-1.debian.tar.xz
 5b4f6c04cc9b931017157e9ca9d82b9b 503644 debug extra 
faad2-dbg_2.8.0~cvs20161113-1_amd64.deb
 feec11e835b65c5da8719e3787a53952 5390 libs optional 
faad2_2.8.0~cvs20161113-1_20161113T165652z-feec11e8.buildinfo
 5f235a012548d775b0b8fa4bc4c4f457 38048 sound optional 
faad_2.8.0~cvs20161113-1_amd64.deb
 f097931dfbedfef8416b6bd443ad01a9 182296 libdevel optional 
libfaad-dev_2.8.0~cvs20161113-1_amd64.deb
 6279a595820f55e7f55115cd6fa3302d 166706 libs optional 
libfaad2_2.8.0~cvs20161113-1_amd64.deb

-----BEGIN PGP SIGNATURE-----

iQIvBAEBCAAZBQJYKJtnEhxmYWJpYW5AZGViaWFuLm9yZwAKCRDL6o6XDM1Z37fy
D/96jYMUShlp+dNhSGfET6wvNVx6Uyk+HNzqCICtnRpjmlSjFFEykSJyN6Rgsg1/
P3PisyqtUYsZ9bu1mkm9/hadCIYD2L1th7bUdBPXlyEJRvxt3rV0GUYSgnkoRvdJ
NJ/rxkkGKnwKcgTSRfmBcDPuezEWiNV/iUklVPq3Vy9wXL0DPZMyjDkeZMuEQ/De
yx1xO9e4D3vWLKUXUqlLyA+oReRFRlWgQnRbEmcSJ2ZmyWJTiSuPD3kDseTGzZbj
lGijlYEK3q8xmbERZQIxBCw/y8KPazE6F7uqRYSc+p+lZ4mkjwPiiRUMbpkQkYwF
z/xJ8L1g9j3RR2YLxkmgDLPk5TUffuvRTu9oygL6dQtLXysIB+9imj2qgUP5iTs8
S6o/+HDCBFiENIrVlYucU2wLwLC90lE2Sa3mdglKmdMShb86P1BjltpWeEgNtm6e
FOafIKnfrXsZ+GHVkohwmSXhGnjRY8HR17LKF8h5zKfaWQfGmmZzSSbg1GMn8XGt
ksPwndeFI+U314QBwZN2azqFLYmvlpyPesQxh6BJXQB2gUcUqO5RGk3TRY4/35xA
deRfhX3BpVZg2plbtTr0ohjhlEpl0kSYATKtjEw2CMjeYPO1JOToUpNMbmqoFGmn
1VBV/dtLu+MjKyKCkwnRgcTHl91UHtdCXcpHZcpM0hyX0A==
=bLYb
-----END PGP SIGNATURE-----

--- End Message ---
_______________________________________________
pkg-multimedia-maintainers mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers

Reply via email to