gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] [patch #8747] Patches to fix 8-bit PCM sound wailing/cras


From: Nutchanon Wetchasit
Subject: [Gnash-commit] [patch #8747] Patches to fix 8-bit PCM sound wailing/crashing in FFmpeg media backend
Date: Sun, 20 Sep 2015 06:50:50 +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 #4, patch #8747 (project gnash):

Patch 5 of 5:
See the attached `0008-fix-ffmpeg-resample-factor-count-calculation.patch`

Originally, FFmpeg backend used a wrong resample factor calculation
by multiplying in channel expansion to `resampleFactor`
<http://git.savannah.gnu.org/cgit/gnash.git/tree/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp?id=516a6cae2301c582b54d7f00188c8e22c5d76c1b#n540>;
it should
account only sample rate change. The resampled channel number (fixed to 2)
is already multiplied-in later
<http://git.savannah.gnu.org/cgit/gnash.git/tree/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp?id=516a6cae2301c582b54d7f00188c8e22c5d76c1b#n547>.

This patch removes the channel part from the statement.

Also, current sample count calculation ignores the possibility of the
decoded audio being 1 byte/sample
<http://git.savannah.gnu.org/cgit/gnash.git/tree/libmedia/ffmpeg/AudioDecoderFfmpeg.cpp?id=516a6cae2301c582b54d7f00188c8e22c5d76c1b#n542>
(which is the case when 8-bit
`UNCOMPRESSED`/`RAW PCM audio is being played).

This patch makes the division depends on the decoded sample format.
(Additional divide-by-2 only if the audio is 16-bit or 16-bit planar)

*Note:* This patch provides no provision for audio codec that decodes into
32/24-bit PCM, 32-bit float, or 64-bit double sample formats. To my
knowledge,
Flash didn't really support any codec that decodes into these formats.
(Well, unless Gnash somehow used `ffmp3float` decoder for MP3 codec.
Original code didn't have any provision for it however)

Gnash: 0.8.11dev (patched against 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

(file #34934)
    _______________________________________________________

Additional Item Attachment:

File name: 0008-fix-ffmpeg-resample-factor-count-calculation.patch Size:1 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/patch/?8747>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]