[Swfdec] swfdec sound test not compiling in master

Riccardo Magliocchetti riccardo.magliocchetti at gmail.com
Sat Dec 27 02:18:36 PST 2008


hi,

i'm having trouble compiling latest git because of this

swfdec/test/sound/downsample.c:86: error: cannot optimize loop, the loop 
counter may overflow

the code in question is this:

static guint
cut_silence (char *data, guint length, guint steps)
{
   guint i, new;

   new = length * steps;
   while (new > 0) { // line 86
     for (i = 0; i < steps; i++) {
       if (data[new - 1 - i] != 0)
         goto out;
     }
     new -= steps;
   }
...


gcc version is 4.3.2.

I have the same problem in the ijg decoder patch i'm trying to resurrect:

static void
swfdec_jpeg_cmyk_to_argb (struct jpeg_decompress_struct *cinfo,
                          JSAMPROW *cmyk, uint32_t *argb)
{
   guint size = cinfo->output_width * cinfo->output_components;
   guint colors;

   for (guint i = 0, j = 0; i < size && j < cinfo->output_width; i += 4, j++) {
     colors = 255 - cmyk[0][i+3];
     argb[j] = SWFDEC_COLOR_COMBINE(colors * (255 - cmyk[0][i])   / 255,
                                    colors * (255 - cmyk[0][i+1]) / 255,
                                    colors * (255 - cmyk[0][i+2]) / 255,
                                    0xff);
   }
}

If someone has any hints feel free to comment :)

thanks,
rm


More information about the Swfdec mailing list