Your message dated Sat, 03 Apr 2010 17:04:03 +0000
with message-id <[email protected]>
and subject line Bug#549899: fixed in libvorbis 1.3.1-1
has caused the Debian Bug report #549899,
regarding libvorbis0a: Incorrect encoding on powerpc (probably also mips(el), 
ia64 and hppa)
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.)


-- 
549899: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=549899
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: libvorbis0a
Version: 1.2.0.dfsg-6
Severity: normal

The attached test program passes on i386 and amd64 but fails on powerpc. This 
test
program also passes with version 1.2.3 of libvorbis0a currently in unstable.

This problem was originally uncovered by the libsndfile test suite. See:

    http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=518037#89

CHeers,
Erik

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: powerpc (ppc)

Kernel: Linux 2.6.30-1-powerpc
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=ANSI_X3.4-1968) 
(ignored: LC_ALL set to POSIX)
Shell: /bin/sh linked to /bin/dash

Versions of packages libvorbis0a depends on:
ii  libc6                       2.9-25       GNU C Library: Shared libraries
ii  libogg0                     1.1.4~dfsg-1 Ogg bitstream library

libvorbis0a recommends no packages.

libvorbis0a suggests no packages.

-- no debconf information
/********************************************************************
 *                                                                  *
 * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
 * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
 * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
 * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
 *                                                                  *
 * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007             *
 * by the Xiph.Org Foundation http://www.xiph.org/                  *
 *                                                                  *
 ********************************************************************

 function: utility functions for vorbis codec test suite.
 last mod: $Id: util.c 13293 2007-07-24 00:09:47Z erikd $

 ********************************************************************/

/*
Compile with:

gcc -Wall -Werror vorbis-test.c -lvorbisenc -o vorbis-test

*/

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <errno.h>

#include <vorbis/codec.h>
#include <vorbis/vorbisenc.h>

#define DATA_LEN  2048
#define ARRAY_LEN(x)    (sizeof(x)/sizeof(x[0]))
#define MAX(a,b)        ((a) > (b) ? (a) : (b))

void
gen_windowed_sine (float *data, int len, float maximum)
{    int k ;

    memset (data, 0, len * sizeof (float)) ;

    len /= 2 ;

    for (k = 0 ; k < len ; k++)
    {    data [k] = sin (2.0 * k * M_PI * 1.0 / 32.0 + 0.4) ;

        /* Apply Hanning Window. */
        data [k] *= maximum * (0.5 - 0.5 * cos (2.0 * M_PI * k / ((len) - 1))) ;
        }

    return ;
}

void
set_data_in (float * data, unsigned len, float value)
{        unsigned k ;

        for (k = 0 ; k < len ; k++)
                data [k] = value ;
}

/* The following function is basically a hacked version of the code in
 * examples/encoder_example.c */
void
write_vorbis_data_or_die (const char *filename, int srate, const float * data, 
int count)
{
  FILE * file ;
  ogg_stream_state os;
  ogg_page         og;
  ogg_packet       op;
  vorbis_info      vi;
  vorbis_comment   vc;
  vorbis_dsp_state vd;
  vorbis_block     vb;

  int eos = 0, ret;

  if ((file = fopen (filename, "wb")) == NULL) {
    printf("\n\nError : fopen failed : %s\n", strerror (errno)) ;
    exit (1) ;
  }

  /********** Encode setup ************/

  vorbis_info_init (&vi);

  ret = vorbis_encode_init_vbr (&vi,1,srate,0.8);
  if (ret) {
    printf ("vorbis_encode_init_vbr return %d\n", ret) ;
    exit (1) ;
  }

  vorbis_comment_init (&vc);
  vorbis_comment_add_tag (&vc,"ENCODER","test/util.c");
  vorbis_analysis_init (&vd,&vi);
  vorbis_block_init (&vd,&vb);

  ogg_stream_init (&os,12345678);

  {
    ogg_packet header;
    ogg_packet header_comm;
    ogg_packet header_code;

    vorbis_analysis_headerout (&vd,&vc,&header,&header_comm,&header_code);
    ogg_stream_packetin (&os,&header);
    ogg_stream_packetin (&os,&header_comm);
    ogg_stream_packetin (&os,&header_code);

    /* Ensures the audio data will start on a new page. */
    while (!eos){
        int result = ogg_stream_flush (&os,&og);
        if (result == 0)
            break;
        fwrite (og.header,1,og.header_len,file);
        fwrite (og.body,1,og.body_len,file);
    }

  }

  {
    /* expose the buffer to submit data */
    float **buffer = vorbis_analysis_buffer (&vd,count);

    memcpy (buffer [0], data, count * sizeof (float)) ;

    /* tell the library how much we actually submitted */
    vorbis_analysis_wrote (&vd,count);
    vorbis_analysis_wrote (&vd,0);
  }

  while (vorbis_analysis_blockout (&vd,&vb) == 1) {
    vorbis_analysis (&vb,NULL);
    vorbis_bitrate_addblock (&vb);

    while (vorbis_bitrate_flushpacket (&vd,&op)) {
      ogg_stream_packetin (&os,&op);

      while (!eos) {
          int result = ogg_stream_pageout (&os,&og);
          if (result == 0)
              break;
          fwrite (og.header,1,og.header_len,file);
          fwrite (og.body,1,og.body_len,file);

          if (ogg_page_eos (&og))
              eos = 1;
      }
    }
  }

  ogg_stream_clear (&os);
  vorbis_block_clear (&vb);
  vorbis_dsp_clear (&vd);
  vorbis_comment_clear (&vc);
  vorbis_info_clear (&vi);

 fclose (file) ;
}

/* The following function is basically a hacked version of the code in
 * examples/decoder_example.c */
void
read_vorbis_data_or_die (const char *filename, int srate, float * data, int 
count)
{
  ogg_sync_state   oy;
  ogg_stream_state os;
  ogg_page         og;
  ogg_packet       op;

  vorbis_info      vi;
  vorbis_comment   vc;
  vorbis_dsp_state vd;
  vorbis_block     vb;

  FILE *file;
  char *buffer;
  int  bytes;
  int eos = 0;
  int i;
  int read_total = 0 ;

  if ((file = fopen (filename, "rb")) == NULL) {
    printf("\n\nError : fopen failed : %s\n", strerror (errno)) ;
    exit (1) ;
  }

  ogg_sync_init (&oy);

  {
    buffer = ogg_sync_buffer (&oy,4096);
    bytes = fread (buffer,1,4096,file);
    ogg_sync_wrote (&oy,bytes);

    if(ogg_sync_pageout (&oy,&og) != 1) {
      if(bytes < 4096) {
        printf ("Out of data.\n") ;
          goto done_decode ;
      }

      fprintf (stderr,"Input does not appear to be an Ogg bitstream.\n");
      exit (1);
    }

    ogg_stream_init (&os,ogg_page_serialno(&og));

    vorbis_info_init (&vi);
    vorbis_comment_init (&vc);
    if (ogg_stream_pagein (&os,&og) < 0) {
      fprintf (stderr,"Error reading first page of Ogg bitstream data.\n");
      exit (1);
    }

    if (ogg_stream_packetout(&os,&op) != 1) {
      fprintf (stderr,"Error reading initial header packet.\n");
      exit (1);
    }

    if (vorbis_synthesis_headerin (&vi,&vc,&op) < 0) {
      fprintf (stderr,"This Ogg bitstream does not contain Vorbis "
          "audio data.\n");
      exit (1);
    }

    i = 0;
    while ( i < 2) {
      while (i < 2) {
        int result = ogg_sync_pageout (&oy,&og);
        if(result == 0)
          break;
        if(result==1) {
          ogg_stream_pagein(&os,&og);

        while (i < 2) {
          result = ogg_stream_packetout (&os,&op);
          if (result == 0)
            goto done_decode;
          if (result < 0) {
            fprintf (stderr,"Corrupt secondary header.  Exiting.\n");
            exit(1);
          }
        vorbis_synthesis_headerin (&vi,&vc,&op);
        i++;
        }
      }
    }

    buffer = ogg_sync_buffer (&oy,4096);
    bytes = fread (buffer,1,4096,file);
    if (bytes == 0 && i < 2) {
      fprintf (stderr,"End of file before finding all Vorbis headers!\n");
      exit (1);
    }

    ogg_sync_wrote (&oy,bytes);
  }

  if (vi.rate != srate) {
    printf ("\n\nError : File '%s' has sample rate of %ld when it should be 
%d.\n\n", filename, vi.rate, srate);
    exit (1) ;
  }
  if (vi.channels != 1) {
    printf ("\n\nError : File '%s' has %d channels, but should be mono.\n\n", 
filename, vi.channels);
    exit (1) ;
  }

  vorbis_synthesis_init (&vd,&vi);
  vorbis_block_init (&vd,&vb);

  while(!eos) {
    while (!eos) {
      int result = ogg_sync_pageout (&oy,&og);
      if (result == 0)
        break;
      if (result < 0) {
        fprintf (stderr,"Corrupt or missing data in bitstream; "
            "continuing...\n");
      } else {
        ogg_stream_pagein (&os,&og);
        while (1) {
          result = ogg_stream_packetout (&os,&op);

          if (result == 0)
            break;
          if (result < 0) {
            /* no reason to complain; already complained above */
          } else {
              float **pcm;
            int samples;

            if (vorbis_synthesis (&vb,&op) == 0)
              vorbis_synthesis_blockin(&vd,&vb);
            while ((samples = vorbis_synthesis_pcmout (&vd,&pcm)) > 0 && 
read_total < count) {
              int bout = samples < count ? samples : count;
              bout = read_total + bout > count ? count - read_total : bout;

              memcpy (data + read_total, pcm[0], bout * sizeof (float)) ;

              vorbis_synthesis_read (&vd,bout);
              read_total += bout ;
            }
          }
        }

        if (ogg_page_eos (&og)) eos = 1;
      }
    }

      if (!eos) {
        buffer = ogg_sync_buffer (&oy,4096);
        bytes = fread (buffer,1,4096,file);
        ogg_sync_wrote (&oy,bytes);
        if (bytes == 0) eos = 1;
      }
    }

    ogg_stream_clear (&os);

    vorbis_block_clear (&vb);
    vorbis_dsp_clear (&vd);
    vorbis_comment_clear (&vc);
    vorbis_info_clear (&vi);

  }
done_decode:

  /* OK, clean up the framer */
  ogg_sync_clear (&oy);

  fclose (file) ;
}

static int check_output (const float * data_in, unsigned len);

int
main(void){
  static float data_out [DATA_LEN] ;
  static float data_in [DATA_LEN] ;

  /* Do safest and most used sample rates first. */
  int sample_rates [] = { 44100, 48000, 32000, 22050, 16000, 96000 } ;
  unsigned k ;
  int errors = 0 ;

  gen_windowed_sine (data_out, ARRAY_LEN (data_out), 0.95);

  for (k = 0 ; k < ARRAY_LEN (sample_rates); k ++) {
        char filename [64] ;
        snprintf (filename, sizeof (filename), "vorbis_%u.ogg", sample_rates 
[k]);

        printf ("    %-20s : ", filename);
        fflush (stdout);

        /* Set to know value. */
        set_data_in (data_in, ARRAY_LEN (data_in), 3.141);

        write_vorbis_data_or_die (filename, sample_rates [k], data_out, 
ARRAY_LEN (data_out));
        read_vorbis_data_or_die (filename, sample_rates [k], data_in, ARRAY_LEN 
(data_in));

        if (check_output (data_in, ARRAY_LEN (data_in)) != 0)
          errors ++ ;
        else {
          puts ("ok");
      remove (filename);
        }
  }

  if (errors)
    exit (1);

  return 0;
}

static int
check_output (const float * data_in, unsigned len)
{
  float max_abs = 0.0 ;
  unsigned k ;

  for (k = 0 ; k < len ; k++) {
    float temp = fabs (data_in [k]);
    max_abs = MAX (max_abs, temp);
  }
        
  if (max_abs < 0.9) {
    printf ("Error : max_abs (%f) too small.\n", max_abs);
    return 1 ;
  } else if (max_abs > 1.0) {
    printf ("Error : max_abs (%f) too big.\n", max_abs);
    return 1 ;
  }

  return 0 ;
}


--- End Message ---
--- Begin Message ---
Source: libvorbis
Source-Version: 1.3.1-1

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

libvorbis-dbg_1.3.1-1_i386.deb
  to main/libv/libvorbis/libvorbis-dbg_1.3.1-1_i386.deb
libvorbis-dev_1.3.1-1_i386.deb
  to main/libv/libvorbis/libvorbis-dev_1.3.1-1_i386.deb
libvorbis0a_1.3.1-1_i386.deb
  to main/libv/libvorbis/libvorbis0a_1.3.1-1_i386.deb
libvorbis_1.3.1-1.diff.gz
  to main/libv/libvorbis/libvorbis_1.3.1-1.diff.gz
libvorbis_1.3.1-1.dsc
  to main/libv/libvorbis/libvorbis_1.3.1-1.dsc
libvorbis_1.3.1.orig.tar.gz
  to main/libv/libvorbis/libvorbis_1.3.1.orig.tar.gz
libvorbisenc2_1.3.1-1_i386.deb
  to main/libv/libvorbis/libvorbisenc2_1.3.1-1_i386.deb
libvorbisfile3_1.3.1-1_i386.deb
  to main/libv/libvorbis/libvorbisfile3_1.3.1-1_i386.deb



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.
John Francesco Ferlito <[email protected]> (supplier of updated libvorbis 
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: SHA1

Format: 1.8
Date: Fri, 26 Mar 2010 19:10:35 +1100
Source: libvorbis
Binary: libvorbis0a libvorbisenc2 libvorbisfile3 libvorbis-dev libvorbis-dbg
Architecture: source i386
Version: 1.3.1-1
Distribution: unstable
Urgency: low
Maintainer: Debian Xiph.org Maintainers <[email protected]>
Changed-By: John Francesco Ferlito <[email protected]>
Description: 
 libvorbis-dbg - The Vorbis General Audio Compression Codec (debug files)
 libvorbis-dev - The Vorbis General Audio Compression Codec (development files)
 libvorbis0a - The Vorbis General Audio Compression Codec (Decoder library)
 libvorbisenc2 - The Vorbis General Audio Compression Codec (Encoder library)
 libvorbisfile3 - The Vorbis General Audio Compression Codec (High Level API)
Closes: 549899 555383 573562 575676
Changes: 
 libvorbis (1.3.1-1) unstable; urgency=low
 .
   * New upstream release.
     - Please package new upstream version 1.3.1. (Closes: #575676)
     - libvorbis: additional CVE-2009-3379 security fixes. (Closes: #573562)
     - libvorbis0a: Incorrect encoding on powerpc. (Closes: #549899)
     - FTBFS with binutils-gold. (Closes: #555383)
Checksums-Sha1: 
 a4b09ae710994018cbd10debbb26b37587895cae 1232 libvorbis_1.3.1-1.dsc
 0874dd08699240b868b22979da4c95ae6325006b 1467164 libvorbis_1.3.1.orig.tar.gz
 337f33cee4c1ebd7ca0b5144ec6d750f705a8737 7138 libvorbis_1.3.1-1.diff.gz
 f75d0ebc295549ad5ddd439e42c8e37d1f74d40b 99688 libvorbis0a_1.3.1-1_i386.deb
 c80bb93d46eae33b9259a0c4beb1417456b2e570 119898 libvorbisenc2_1.3.1-1_i386.deb
 140343f6446925c5eea0902c2a7c9a6d6dc6468a 24184 libvorbisfile3_1.3.1-1_i386.deb
 7a8fcb1a5c03be72ff440ee70647d762d1225b18 437626 libvorbis-dev_1.3.1-1_i386.deb
 c003294826b0a22a3aadcaaff98df3dcc25c7e04 194654 libvorbis-dbg_1.3.1-1_i386.deb
Checksums-Sha256: 
 d42e83cf26884decaa1f91d6308a4abd0c8aa3dd08b9d936edbb619aa6401266 1232 
libvorbis_1.3.1-1.dsc
 951f462ba732a76f51002590d56437ee45362f4353d8bdbeb01231a54a2da0f1 1467164 
libvorbis_1.3.1.orig.tar.gz
 9f40f02a3c08974e6ad8a95b3b25935ad8b940935503bef9f39080eb48ae3901 7138 
libvorbis_1.3.1-1.diff.gz
 18a489e45caa764a555f09ae5f6f876f2235b9e4c75c7232507e1684f1814166 99688 
libvorbis0a_1.3.1-1_i386.deb
 b70435da7649327f05e33b00e2b430b151267bfd54669498b51ea619641d5b57 119898 
libvorbisenc2_1.3.1-1_i386.deb
 45630b0a51197ca43c39c59396e6f58ddacbc0cce22cf4b71a2974f8593b34b3 24184 
libvorbisfile3_1.3.1-1_i386.deb
 21a8bb167463d4855347841bed93ad1267a731191960d49d654f48dd0ae40937 437626 
libvorbis-dev_1.3.1-1_i386.deb
 5c2af688504d59042974450853c94278f2539ec8a51a85202447c2678d2f666b 194654 
libvorbis-dbg_1.3.1-1_i386.deb
Files: 
 39d747c5a072d417ebd14eb4e9a154b8 1232 libs optional libvorbis_1.3.1-1.dsc
 016e523fac70bdd786258a9d15fd36e9 1467164 libs optional 
libvorbis_1.3.1.orig.tar.gz
 6ef91898e6c7a923b222605eda510307 7138 libs optional libvorbis_1.3.1-1.diff.gz
 63a0ffb6a6c1c70a2bdd9058b6f04aed 99688 libs optional 
libvorbis0a_1.3.1-1_i386.deb
 848bd94a8c5dad3597ac3b978a2efda2 119898 libs optional 
libvorbisenc2_1.3.1-1_i386.deb
 8a74b3df0ce81360d0f0b0bf9218bcfc 24184 libs optional 
libvorbisfile3_1.3.1-1_i386.deb
 9ae865fb7851ccc0696b6f57f3a33245 437626 libdevel optional 
libvorbis-dev_1.3.1-1_i386.deb
 cdbbdf366da7594915f762da7bd6a31a 194654 debug extra 
libvorbis-dbg_1.3.1-1_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAku28hMACgkQYcdJscd4KNRwAQCgkkjehMQNdLpzq2yIv99KqNyl
OFgAoLqb76SVEVmIWtcncTMAWRYG2mag
=VGkl
-----END PGP SIGNATURE-----



--- End Message ---

Reply via email to