Package: dvdauthor
Version: 0.6.11-3.1
Severity: normal
Tags: patch

I found an odd phenomenon with multi-line links in menus generated
with VideoLink.  On my Panasonic DVD player, these sometimes have a
thin fringe of the link's background colour at the bottom and
sometimes at the right as well.  This is noticeable with multi-line
links because they are not rectangular.  The effect also appears,
though more rarely, in totem-xine.

Examining the images VideoLink passes into spumux, I did not find any
such fringe.  However, when I modified spumux to dump combined
subpicture bitmaps, I found that areas of the bitmap outside buttons
were being filled with colour 0, which in practice tends to be
assigned to the link background colour.  It seems possible that some
DVD players pad buttons with colour 0.

I think spumux should attempt to make each button group's palette
entry 0 transparent in all states if there is any existing entry with
this property or if there is a spare entry.  Here is a patch that
implements this:

--- dvdauthor-0.6.11.orig/src/subgen-image.c
+++ dvdauthor-0.6.11/src/subgen-image.c
@@ -438,6 +438,48 @@
         }
         free(bpgs);
         free(gs);
+
+       // If possible, make each palette entry 0 transparent in
+       // all states, since some players may pad buttons with 0
+       // and we also pad with 0 in some cases.
+       for( j=0; j<ng; j++ ) {
+           int spare = -1;
+           int tri;
+
+           for( k=0; k<4; k++ ) {
+               tri = s->groupmap[j][k];
+               if( tri == -1
+                   || (s->img.pal[(tri >> 16) & 0xFF].t == 0
+                       && s->hlt.pal[(tri >> 8) & 0xFF].t == 0
+                       && s->sel.pal[tri & 0xFF].t == 0) ) {
+                   spare = k;
+                   break;
+               }
+           }
+           if( spare > 0 && tri == -1 ) {
+               tri = 0;
+               for( k=0; k<s->img.numpal; ++k )
+                   if( s->img.pal[k].t == 0 ) {
+                       tri |= k << 16;
+                       break;
+                   }
+               for( k=0; k<s->hlt.numpal; ++k )
+                   if( s->hlt.pal[k].t == 0 ) {
+                       tri |= k << 8;
+                       break;
+                   }
+               for( k=0; k<s->sel.numpal; ++k )
+                   if( s->sel.pal[k].t == 0 ) {
+                       tri |= k;
+                       break;
+                   }
+           }
+           if( spare > 0 ) {
+               s->groupmap[j][spare] = s->groupmap[j][0];
+               s->groupmap[j][0] = tri;
+           }
+       }
+
         fprintf(stderr,"INFO: Pickbuttongroups, success with %d groups, 
useimg=%d\n",ng,useimg);
         s->numgroups=ng;
         return 1;
-- END --

-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (100, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.16-2-k7
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)

Versions of packages dvdauthor depends on:
ii  libbz2-1.0       1.0.2-7                 high-quality block-sorting file co
ii  libc6            2.3.2.ds1-22sarge4      GNU C Library: Shared libraries an
ii  libdvdread3      0.9.4-5                 Simple foundation for reading DVDs
ii  libfreetype6     2.1.7-5                 FreeType 2 font engine, shared lib
ii  libice6          4.3.0.dfsg.1-14sarge1   Inter-Client Exchange library
ii  libjasper-1.701- 1.701.0-2               The JasPer JPEG-2000 runtime libra
ii  libjpeg62        6b-10                   The Independent JPEG Group's JPEG 
ii  liblcms1         1.13-1                  Color management library
ii  libmagick9       7:6.2.4.5.dfsg1-0.8bpo1 Image manipulation library
ii  libpng12-0       1.2.8rel-1              PNG library - runtime
ii  libsm6           4.3.0.dfsg.1-14sarge1   X Window System Session Management
ii  libtiff4         3.7.2-7                 Tag Image File Format (TIFF) libra
ii  libx11-6         4.3.0.dfsg.1-14sarge1   X Window System protocol client li
ii  libxext6         4.3.0.dfsg.1-14sarge1   X Window System miscellaneous exte
ii  libxml2          2.6.20-1                GNOME XML library
ii  libxt6           4.3.0.dfsg.1-14sarge1   X Toolkit Intrinsics
ii  xlibs            4.3.0.dfsg.1-14sarge1   X Keyboard Extension (XKB) configu
ii  zlib1g           1:1.2.2-4.sarge.2       compression library - runtime

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to