r46641 - in /trunk/libaudio-flac-decoder-perl/debian: changelog patches/dithering.patch patches/series

diocles-guest at users.alioth.debian.org diocles-guest at users.alioth.debian.org
Sun Nov 1 19:29:48 UTC 2009


Author: diocles-guest
Date: Sun Nov  1 19:29:39 2009
New Revision: 46641

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=46641
Log:
Add patch for broken dithering. (Closes: #501250)

Added:
    trunk/libaudio-flac-decoder-perl/debian/patches/dithering.patch
Modified:
    trunk/libaudio-flac-decoder-perl/debian/changelog
    trunk/libaudio-flac-decoder-perl/debian/patches/series

Modified: trunk/libaudio-flac-decoder-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libaudio-flac-decoder-perl/debian/changelog?rev=46641&op=diff
==============================================================================
--- trunk/libaudio-flac-decoder-perl/debian/changelog (original)
+++ trunk/libaudio-flac-decoder-perl/debian/changelog Sun Nov  1 19:29:39 2009
@@ -21,6 +21,8 @@
   * debian/README.source: Add standard quilt instructions.
   * debian/copyright: Use DEP-5 format copyright file.
   * debian/libaudio-flac-decoder-perl.examples: New file.
+  * debian/patches/dithering.patch: New patch to fix problem in dithering
+    code. (Closes: #501250)
 
  -- Tim Retout <tim at retout.co.uk>  Sat, 08 Aug 2009 19:50:53 +0100
 

Added: trunk/libaudio-flac-decoder-perl/debian/patches/dithering.patch
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libaudio-flac-decoder-perl/debian/patches/dithering.patch?rev=46641&op=file
==============================================================================
--- trunk/libaudio-flac-decoder-perl/debian/patches/dithering.patch (added)
+++ trunk/libaudio-flac-decoder-perl/debian/patches/dithering.patch Sun Nov  1 19:29:39 2009
@@ -1,0 +1,42 @@
+Author: Daniel Barlow <dan at telent.net>
+Origin: http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=10;filename=Decoder.patch;att=1;bug=501250
+Description: Fix broken dithering.
+Bug-Debian: http://bugs.debian.org/501250
+
+--- libaudio-flac-decoder-perl-0.2/Decoder.xs	2008-10-06 12:28:02.000000000 +0100
++++ libaudio-flac-decoder-perl-0.2-dan/Decoder.xs	2008-10-06 12:21:30.000000000 +0100
+@@ -470,11 +470,32 @@
+ 			const unsigned n = min(datasource->wide_samples_in_reservoir, SAMPLES_PER_WRITE);
+ 			const unsigned delta = n * channels;
+ 			unsigned i;
+-
++			FLAC__byte *out=datasource->sample_buffer;
++			/* 
+ 			int bytes = (int)pack_pcm_signed_little_endian(
+ 				datasource->sample_buffer, datasource->reservoir, n, channels, bps, bps
+ 			);
+-
++			bps==bps (trivially) so all the fancy dithering stuff 
++			that pack_pcm_signed_little_endian might do will
++			never get called.  Let's just do it inline
++			*/
++			int bytes;
++			for(i=0; i<channels*n; i++) {
++			    FLAC__int32 sample=(datasource->reservoir)[i];
++			    switch(bps) {
++			    case 8:
++				out[0] = sample ^ 0x80;
++				break;
++			    case 24:
++				out[2] = (FLAC__byte)(sample >> 16);
++				/* fall through */
++			    case 16:
++				out[1] = (FLAC__byte)(sample >> 8);
++				out[0] = (FLAC__byte)sample;
++			    }
++			    out+=bps/8;
++			}
++			bytes=(out-datasource->sample_buffer);
+ 			for (i = delta; i < datasource->wide_samples_in_reservoir * channels; i++) {
+ 				datasource->reservoir[i-delta] = datasource->reservoir[i];
+ 			}

Modified: trunk/libaudio-flac-decoder-perl/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libaudio-flac-decoder-perl/debian/patches/series?rev=46641&op=diff
==============================================================================
--- trunk/libaudio-flac-decoder-perl/debian/patches/series (original)
+++ trunk/libaudio-flac-decoder-perl/debian/patches/series Sun Nov  1 19:29:39 2009
@@ -1,1 +1,2 @@
 dfsg-fix-tests.patch
+dithering.patch




More information about the Pkg-perl-cvs-commits mailing list