[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] [bug #45722] Gnash emitted loud screech after playing PCM
From: |
Nutchanon Wetchasit |
Subject: |
[Gnash-commit] [bug #45722] Gnash emitted loud screech after playing PCM audio object |
Date: |
Fri, 18 Sep 2015 05:19:29 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:10.0.12) Gecko/20100101 Firefox/10.0.12 Iceweasel/10.0.12 |
Follow-up Comment #27, bug #45722 (project gnash):
I've tested around Gnash's FFmpeg/libAV-based codec backend, and found problem
on many levels:
* Gnash's FFmpeg-based sample format converter uses a hard coded assumption
that input sample format is _16-bit signed PCM_
<http://git.savannah.gnu.org/cgit/gnash.git/tree/libmedia/ffmpeg/AudioResamplerFfmpeg.cpp?id=516a6cae2301c582b54d7f00188c8e22c5d76c1b#n64>
when `swresample.h` and `avresample.h` are both unavailable.
* Gnash's FFmpeg-based sample format converter wouldn't attempt to convert
8-bit PCM input sound
<http://git.savannah.gnu.org/cgit/gnash.git/tree/libmedia/ffmpeg/AudioResamplerFfmpeg.cpp?id=516a6cae2301c582b54d7f00188c8e22c5d76c1b#n52>
when `swresample.h` and `avresample.h` are both unavailable.
* Gnash's FFmpeg-based codec handler uses a wrong codec ID for 8-bit embeded
PCM sound (Gnash mistakenly uses _signed_ PCM
<http://git.savannah.gnu.org/cgit/gnash.git/tree/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp?id=516a6cae2301c582b54d7f00188c8e22c5d76c1b#n186>,
but it really is _unsigned_ PCM).
* Gnash's FFmpeg-based codec handler divided sample rate with 2
<http://git.savannah.gnu.org/cgit/gnash.git/tree/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp?id=516a6cae2301c582b54d7f00188c8e22c5d76c1b#n279>
if the source audio is 8-bit PCM for an unobvious reason. As the SWF parser
seems to give a correct sample rate (e.g. 44100 Hz in `pcmplay-8bit.swf`
test), I think the divisor was put there to work around other problems listed
here.
* Gnash's FFmpeg-based audio frame decoder uses an incorrect calculation for
resampling buffer size
<http://git.savannah.gnu.org/cgit/gnash.git/tree/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp?id=516a6cae2301c582b54d7f00188c8e22c5d76c1b#n540>.
(`resampleFactor` should account only sample _rate_ change, as channels number
change is multiplied in later
<http://git.savannah.gnu.org/cgit/gnash.git/tree/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp?id=516a6cae2301c582b54d7f00188c8e22c5d76c1b#n547>)
* Gnash's FFmpeg-based audio frame decoder uses a hard-coded assumption that
the decoded audio uses 2 bytes/samples
<http://git.savannah.gnu.org/cgit/gnash.git/tree/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp?id=516a6cae2301c582b54d7f00188c8e22c5d76c1b#n542>
when calculating total samples to convert. (Which produces an incorrect number
when the decoded audio is 8-bit PCM, as it uses 1 byte/sample)
These problems seems to be very closely related that all of them would have
to be fixed at the same instant to get the correct behavior.
Gnash: 0.8.11dev (git 516a6ca 15-Sep-2015)
SDL: libsdl1.2debian 1.2.15-5 (debian)
libAV: libavcodec53 6:0.8.17-1 (debian), libavformat53 6:0.8.17-1 (debian),
libavutil51 6:0.8.17-1 (debian)
CSound: libcsound64-5.2 1:5.17.11~dfsg-3 (debian)
System: Debian GNU/Linux 7.0 Wheezy i386
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?45722>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Gnash-commit] [bug #45722] Gnash emitted loud screech after playing PCM audio object, (continued)
- [Gnash-commit] [bug #45722] Gnash emitted loud screech after playing PCM audio object, Nutchanon Wetchasit, 2015/09/09
- [Gnash-commit] [bug #45722] Gnash emitted loud screech after playing PCM audio object, Nutchanon Wetchasit, 2015/09/12
- [Gnash-commit] [bug #45722] Gnash emitted loud screech after playing PCM audio object, Nutchanon Wetchasit, 2015/09/13
- [Gnash-commit] [bug #45722] Gnash emitted loud screech after playing PCM audio object, Nutchanon Wetchasit, 2015/09/13
- [Gnash-commit] [bug #45722] Gnash emitted loud screech after playing PCM audio object, Nutchanon Wetchasit, 2015/09/13
- [Gnash-commit] [bug #45722] Gnash emitted loud screech after playing PCM audio object, Nutchanon Wetchasit, 2015/09/14
- [Gnash-commit] [bug #45722] Gnash emitted loud screech after playing PCM audio object, Nutchanon Wetchasit, 2015/09/14
- [Gnash-commit] [bug #45722] Gnash emitted loud screech after playing PCM audio object, Sandro Santilli, 2015/09/14
- [Gnash-commit] [bug #45722] Gnash emitted loud screech after playing PCM audio object, Nutchanon Wetchasit, 2015/09/14
- [Gnash-commit] [bug #45722] Gnash emitted loud screech after playing PCM audio object, Nutchanon Wetchasit, 2015/09/17
- [Gnash-commit] [bug #45722] Gnash emitted loud screech after playing PCM audio object,
Nutchanon Wetchasit <=
- [Gnash-commit] [bug #45722] Gnash emitted loud screech after playing PCM audio object, Sandro Santilli, 2015/09/18
- [Gnash-commit] [bug #45722] Gnash emitted loud screech after playing PCM audio object, Nutchanon Wetchasit, 2015/09/19
- [Gnash-commit] [bug #45722] Gnash emitted loud screech after playing PCM audio object, Nutchanon Wetchasit, 2015/09/19
- [Gnash-commit] [bug #45722] Gnash emitted loud screech after playing PCM audio object, Nutchanon Wetchasit, 2015/09/20
- [Gnash-commit] [bug #45722] Gnash emitted loud screech after playing PCM audio object, Sandro Santilli, 2015/09/23
- [Gnash-commit] [bug #45722] Gnash emitted loud screech after playing PCM audio object, Sandro Santilli, 2015/09/23
- [Gnash-commit] [bug #45722] Gnash emitted loud screech after playing PCM audio object, Nutchanon Wetchasit, 2015/09/26