~ubuntu-branches/ubuntu/oneiric/submux-dvd/oneiric

« back to all changes in this revision

Viewing changes to submux-dvd.c

  • Committer: Bazaar Package Importer
  • Author(s): Christian Marillat
  • Date: 2006-05-13 18:08:13 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20060513180813-bchjiov4887v0qqf
Tags: 0.5.1-0.0
* New upstream release.
* debian/copyright Update upstream home page.
* Add a watch file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
 
25
25
#define _FILE_OFFSET_BITS   64
26
26
 
27
 
#define VERSION "0.5"
 
27
#define VERSION "0.5.1"
28
28
 
29
29
#define SUB_BUFFER_MAX          53220 
30
30
 
3044
3044
 
3045
3045
 
3046
3046
static int max_bits_in_line;
 
3047
static int reported_max_bits_flag;
 
3048
static int size_errors;
 
3049
 
3047
3050
 
3048
3051
//#define TEST_PIC
3049
3052
int dvd_encode()
3084
3087
        spts / 90000, sd / 90000, xd, yd, x0, y0);
3085
3088
        }
3086
3089
        
 
3090
oddp = 0;
 
3091
 
3087
3092
xstart = x0;
3088
3093
xsize = xd;
3089
3094
ystart = y0;
3232
3237
                store_nibble(0);
3233
3238
                store_nibble(0);
3234
3239
                store_nibble(0);
3235
 
                store_nibble(icptr[idx]);
 
3240
                store_nibble(icptr[idx]); /* color 0-3, high 2 bits zero of this nibble */
3236
3241
 
3237
3242
                if(odd) odd_line_nibbles += 4;
3238
3243
                else even_line_nibbles += 4;
3273
3278
//      fprintf(stderr, "max_bits_in_line=%d\n", max_bits_in_line);
3274
3279
        if(max_bits_in_line > 1440)
3275
3280
                {
3276
 
                fprintf(stderr,\
3277
 
                "dvd_encode(): bitmap too wide? max_bits_in_line=%d > 1440, aborting\n",\
3278
 
                max_bits_in_line);
3279
 
 
 
3281
                if(! reported_max_bits_flag)
 
3282
                        {
 
3283
                        size_errors++;
 
3284
 
 
3285
                        fprintf(stderr,\
 
3286
                        "dvd_encode(): bitmap too wide? max_bits_in_line=%d > 1440 size_errors=%d, aborting\n",\
 
3287
                        max_bits_in_line, size_errors);
 
3288
                        reported_max_bits_flag = 1;
 
3289
                        fprintf(stderr,\
 
3290
                        "This is a DVD compatibility problem (too much detail in a line)\n\
 
3291
try reformatting the text for this bitmap\n");
 
3292
 
 
3293
                        }
 
3294
 
 
3295
//amaroo3 frame8422.bmp font 22 v0.04 h0.02 have to sort this out
3280
3296
                exit(1);        
3281
3297
                }
3282
3298
 
3283
 
 
3284
3299
        odd = 1 - odd;
3285
3300
        } /* end for y (all lines in an img) */ 
3286
3301