Changeset 289aade717ba57b0a47ea0aab00b3f5ca98a826b

Show
Ignore:
Timestamp:
03/01/04 13:54:56 (5 years ago)
Author:
Rocky Bernstein <rocky@videolan.org>
git-committer:
Rocky Bernstein <rocky@videolan.org> 1073134496 +0000
git-parent:

[3a903d5fc45aaccbe084de600c2b3b47ee9b7df9]

git-author:
Rocky Bernstein <rocky@videolan.org> 1073134496 +0000
Message:

ogt.c cvd.c, subtitle.h: move common debug string help into subtitle.h
{cvd,ogt}_parse.c, common.c, subtitle.h: add ability to dump subtitles via
libpng.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/codec/ogt/common.c

    rc17dee7 r289aade  
    22 * Common SVCD and VCD subtitle routines. 
    33 ***************************************************************************** 
    4  * Copyright (C) 2003 VideoLAN 
    5  * $Id: common.c,v 1.2 2003/12/30 04:43:52 rocky Exp $ 
     4 * Copyright (C) 2003, 2004 VideoLAN 
     5 * $Id: common.c,v 1.3 2004/01/03 12:54:56 rocky Exp $ 
    66 * 
    77 * Author: Rocky Bernstein 
     
    3535#include "subtitle.h" 
    3636#include "common.h" 
     37#ifdef HAVE_LIBPNG 
     38#include "write_png.h" 
     39#endif 
    3740 
    3841/***************************************************************************** 
     
    124127 
    125128  if ( chunk_length > 0 ) { 
     129#if 0 
     130    int i; 
     131    int8_t *b=buffer; 
     132    for (i=0; i<chunk_length; i++) 
     133      printf ("%02x", b[i]); 
     134    printf("\n"); 
     135#endif 
     136     
    126137    memcpy(p_sys->subtitle_data + p_sys->subtitle_data_pos, 
    127138       buffer, chunk_length); 
     
    176187   
    177188  for ( ; n >= 0 ; n-- ) { 
    178     p_to[n] = p_sys->pi_palette[p_from[n]]; 
     189    p_to[n] = p_sys->p_palette[p_from[n]]; 
    179190  } 
    180191} 
     
    303314} 
    304315 
     316/*  
     317   Dump an a subtitle image to standard output - for debugging. 
     318 */ 
     319void VCDSubDumpImage( uint8_t *p_image, uint32_t i_height, uint32_t i_width ) 
     320{ 
     321  uint8_t *p = p_image; 
     322  unsigned int i_row;    /* scanline row number */ 
     323  unsigned int i_column; /* scanline column number */ 
     324 
     325  printf("-------------------------------------\n++"); 
     326  for ( i_row=0; i_row < i_height; i_row ++ ) { 
     327    for ( i_column=0; i_column<i_width; i_column++ ) { 
     328      printf("%1d", *p++ & 0x03); 
     329    } 
     330    printf("\n++"); 
     331  } 
     332  printf("\n-------------------------------------\n"); 
     333} 
     334 
     335/*  
     336   FIXME:  
     337   MOVE clip_8_bit and uuv2rgb TO A MORE GENERIC PLACE. 
     338 */ 
     339 
     340/* Force v in the range 0.255 */ 
     341static inline uint8_t  
     342clip_8_bit(int v) 
     343{ 
     344  if (v<0)   return 0; 
     345  if (v>255) return 255; 
     346  return (uint8_t) v; 
     347} 
     348 
     349/*************************************************** 
     350   Color conversion from 
     351    http://www.inforamp.net/~poynton/notes/colour_and_gamma/ColorFAQ.html#RTFToC30 
     352    http://people.ee.ethz.ch/~buc/brechbuehler/mirror/color/ColorFAQ.html 
     353  
     354    Thanks to Billy Biggs <vektor@dumbterm.net> for the pointer and 
     355    the following conversion. 
     356  
     357    R' = [ 1.1644         0    1.5960 ]   ([ Y' ]   [  16 ]) 
     358    G' = [ 1.1644   -0.3918   -0.8130 ] * ([ Cb ] - [ 128 ]) 
     359    B' = [ 1.1644    2.0172         0 ]   ([ Cr ]   [ 128 ]) 
     360 
     361  See also vlc/modules/video_chroma/i420_rgb.h and 
     362  vlc/modules/video_chroma/i420_rgb_c.h for a way to do this in a way 
     363  more optimized for integer arithmetic. Would be nice to merge the 
     364  two routines. 
     365  
     366***************************************************/ 
     367 
     368static inline void 
     369yuv2rgb(ogt_yuvt_t *p_yuv, uint8_t *p_rgb_out ) 
     370{ 
     371   
     372  int i_Y  = p_yuv->s.y - 16; 
     373  int i_Cb = p_yuv->s.v - 128; 
     374  int i_Cr = p_yuv->s.u - 128; 
     375   
     376  int i_red   = (1.1644 * i_Y) + (1.5960 * i_Cr); 
     377  int i_green = (1.1644 * i_Y) - (0.3918 * i_Cb) - (0.8130 * i_Cr); 
     378  int i_blue  = (1.1644 * i_Y) + (2.0172 * i_Cb); 
     379   
     380  i_red   = clip_8_bit( i_red ); 
     381  i_green = clip_8_bit( i_green ); 
     382  i_blue  = clip_8_bit( i_blue ); 
     383   
     384  *p_rgb_out++ = i_red; 
     385  *p_rgb_out++ = i_green; 
     386  *p_rgb_out++ = i_blue; 
     387   
     388} 
     389 
     390#ifdef HAVE_LIBPNG 
     391 
     392#define BYTES_PER_RGB 3 
     393#define PALETTE_SIZE  4 
     394/* Note the below assumes the above is a power of 2 */ 
     395#define PALETTE_SIZE_MASK (PALETTE_SIZE-1) 
     396 
     397/*  
     398   Dump an a subtitle image to a Portable Network Graphics (PNG) file. 
     399   All we do here is convert YUV palette entries to RGB, expand 
     400   the image into a linear RGB pixel array, and call the routine 
     401   that does the PNG writing. 
     402 */ 
     403 
     404void  
     405VCDSubDumpPNG( uint8_t *p_image, decoder_t *p_dec, 
     406           uint32_t i_height, uint32_t i_width, const char *filename, 
     407           png_text *text_ptr, int i_text_count ) 
     408{ 
     409  decoder_sys_t *p_sys = p_dec->p_sys; 
     410  uint8_t *p = p_image; 
     411  uint8_t *image_data = malloc(BYTES_PER_RGB * i_height * i_width ); 
     412  uint8_t *q = image_data; 
     413  unsigned int i_row;    /* scanline row number */ 
     414  unsigned int i_column; /* scanline column number */ 
     415  uint8_t rgb_palette[PALETTE_SIZE * BYTES_PER_RGB]; 
     416  int i; 
     417 
     418  dbg_print( (DECODE_DBG_CALL), "%s", filename); 
     419   
     420  if (NULL == image_data) return; 
     421 
     422  /* Convert palette YUV into RGB. */ 
     423  for (i=0; i<PALETTE_SIZE; i++) { 
     424    ogt_yuvt_t *p_yuv     = &(p_sys->p_palette[i]); 
     425    uint8_t   *p_rgb_out  = &(rgb_palette[i*BYTES_PER_RGB]); 
     426    yuv2rgb( p_yuv, p_rgb_out ); 
     427  } 
     428   
     429  /* Convert palette entries into linear RGB array. */ 
     430  for ( i_row=0; i_row < i_height; i_row ++ ) { 
     431    for ( i_column=0; i_column<i_width; i_column++ ) { 
     432      uint8_t *p_rgb = &rgb_palette[ ((*p)&PALETTE_SIZE_MASK)*BYTES_PER_RGB ]; 
     433      *q++ = p_rgb[0]; 
     434      *q++ = p_rgb[1]; 
     435      *q++ = p_rgb[2]; 
     436      p++; 
     437    } 
     438  } 
     439   
     440  write_png( filename, i_height, i_width, image_data, text_ptr, i_text_count ); 
     441  free(image_data); 
     442} 
     443#endif /*HAVE_LIBPNG*/ 
  • modules/codec/ogt/common.h

    rc17dee7 r289aade  
    22 * Header for Common SVCD and VCD subtitle routines. 
    33 ***************************************************************************** 
    4  * Copyright (C) 2003 VideoLAN 
    5  * $Id: common.h,v 1.2 2003/12/30 04:43:52 rocky Exp $ 
     4 * Copyright (C) 2003, 2004 VideoLAN 
     5 * $Id: common.h,v 1.3 2004/01/03 12:54:56 rocky Exp $ 
    66 * 
    77 * Author: Rocky Bernstein 
     
    2323 
    2424void           VCDSubClose  ( vlc_object_t * ); 
     25 
    2526void           VCDSubInitSubtitleBlock( decoder_sys_t * p_sys ); 
     27 
    2628void           VCDSubInitSubtitleData(decoder_sys_t *p_sys); 
     29 
    2730void           VCDSubAppendData( decoder_t *p_dec, uint8_t *buffer,  
    2831                 uint32_t buf_len ); 
     
    3134void           VCDSubScaleX( decoder_t *p_dec, subpicture_t *p_spu,  
    3235                 unsigned int i_scale_x, unsigned int i_scale_y ); 
     36 
    3337void           VCDSubDestroySPU( subpicture_t *p_spu ); 
     38 
    3439int            VCDSubCropCallback( vlc_object_t *p_object, char const *psz_var, 
    3540                   vlc_value_t oldval, vlc_value_t newval,  
    3641                   void *p_data ); 
     42 
    3743void           VCDSubUpdateSPU( subpicture_t *p_spu, vlc_object_t *p_object ); 
     44 
    3845void           VCDInlinePalette ( /*inout*/ uint8_t *p_dest,  
    3946                  decoder_sys_t *p_sys, unsigned int i_height,  
    4047                  unsigned int i_width ); 
    4148 
     49void           VCDSubDumpImage( uint8_t *p_image, uint32_t i_height,  
     50                uint32_t i_width ); 
    4251 
    43  
     52#ifdef HAVE_LIBPNG 
     53#include <png.h> 
     54void           VCDSubDumpPNG( uint8_t *p_image, decoder_t *p_dec, 
     55                  uint32_t i_height, uint32_t i_width, 
     56                  const char *filename,  /*in*/ png_text *text_ptr, 
     57                  int i_text_count ); 
     58#endif /*HAVE_LIBPNG*/ 
  • modules/codec/ogt/cvd.c

    rb72e3b1 r289aade  
    33 ***************************************************************************** 
    44 * Copyright (C) 2003 VideoLAN 
    5  * $Id: cvd.c,v 1.5 2004/01/01 13:54:24 rocky Exp $ 
     5 * $Id: cvd.c,v 1.6 2004/01/03 12:54:56 rocky Exp $ 
    66 * 
    77 * Authors: Rocky Bernstein 
     
    3737#include "common.h" 
    3838 
    39 #define DEBUG_LONGTEXT N_( \ 
    40     "This integer when viewed in binary is a debugging mask\n" \ 
    41     "external call          1\n" \ 
    42     "all calls              2\n" \ 
    43     "packet assembly info   4\n" \ 
    44     "image bitmaps          8\n" \ 
    45     "image transformations 16\n" \ 
    46     "misc info             32\n" ) 
    47  
    4839/***************************************************************************** 
    4940 * Module descriptor. 
     
    325316               v, p[1], p[2], p[3]); 
    326317         
    327         p_sys->pi_palette[v].s.y = p[1]; 
    328         p_sys->pi_palette[v].s.u = p[2]; 
    329         p_sys->pi_palette[v].s.v = p[3]; 
     318        p_sys->p_palette[v].s.y = p[1]; 
     319        p_sys->p_palette[v].s.u = p[2]; 
     320        p_sys->p_palette[v].s.v = p[3]; 
    330321        break; 
    331322      } 
     
    344335         
    345336        /* Highlight Palette */ 
    346         p_sys->pi_palette_highlight[v].s.y = p[1]; 
    347         p_sys->pi_palette_highlight[v].s.u = p[2]; 
    348         p_sys->pi_palette_highlight[v].s.v = p[3]; 
     337        p_sys->p_palette_highlight[v].s.y = p[1]; 
     338        p_sys->p_palette_highlight[v].s.u = p[2]; 
     339        p_sys->p_palette_highlight[v].s.v = p[3]; 
    349340        break; 
    350341      } 
     
    352343    case 0x37: 
    353344      /* transparency for primary palette */ 
    354       p_sys->pi_palette[0].s.t = p[3] & 0x0f; 
    355       p_sys->pi_palette[1].s.t = p[3] >> 4; 
    356       p_sys->pi_palette[2].s.t = p[2] & 0x0f; 
    357       p_sys->pi_palette[3].s.t = p[2] >> 4; 
     345      p_sys->p_palette[0].s.t = p[3] & 0x0f; 
     346      p_sys->p_palette[1].s.t = p[3] >> 4; 
     347      p_sys->p_palette[2].s.t = p[2] & 0x0f; 
     348      p_sys->p_palette[3].s.t = p[2] >> 4; 
    358349 
    359350      dbg_print( DECODE_DBG_PACKET, 
    360351             "transparancy for primary palette 0..3: " 
    361352             "0x%0x 0x%0x 0x%0x 0x%0x", 
    362              p_sys->pi_palette[0].s.t, 
    363              p_sys->pi_palette[1].s.t, 
    364              p_sys->pi_palette[2].s.t, 
    365              p_sys->pi_palette[3].s.t ); 
     353             p_sys->p_palette[0].s.t, 
     354             p_sys->p_palette[1].s.t, 
     355             p_sys->p_palette[2].s.t, 
     356             p_sys->p_palette[3].s.t ); 
    366357 
    367358      break; 
     
    369360    case 0x3f: 
    370361      /* transparency for highlight palette */ 
    371       p_sys->pi_palette_highlight[0].s.t = p[2] & 0x0f; 
    372       p_sys->pi_palette_highlight[1].s.t = p[2] >> 4; 
    373       p_sys->pi_palette_highlight[2].s.t = p[1] & 0x0f; 
    374       p_sys->pi_palette_highlight[3].s.t = p[1] >> 4; 
     362      p_sys->p_palette_highlight[0].s.t = p[2] & 0x0f; 
     363      p_sys->p_palette_highlight[1].s.t = p[2] >> 4; 
     364      p_sys->p_palette_highlight[2].s.t = p[1] & 0x0f; 
     365      p_sys->p_palette_highlight[3].s.t = p[1] >> 4; 
    375366 
    376367      dbg_print( DECODE_DBG_PACKET, 
    377368             "transparancy for primary palette 0..3: " 
    378369             "0x%0x 0x%0x 0x%0x 0x%0x", 
    379              p_sys->pi_palette_highlight[0].s.t, 
    380              p_sys->pi_palette_highlight[1].s.t, 
    381              p_sys->pi_palette_highlight[2].s.t, 
    382              p_sys->pi_palette_highlight[3].s.t ); 
     370             p_sys->p_palette_highlight[0].s.t, 
     371             p_sys->p_palette_highlight[1].s.t, 
     372             p_sys->p_palette_highlight[2].s.t, 
     373             p_sys->p_palette_highlight[3].s.t ); 
    383374 
    384375      break; 
  • modules/codec/ogt/cvd_parse.c

    rc17dee7 r289aade  
    22 * parse.c: Philips OGT (SVCD subtitle) packet parser 
    33 ***************************************************************************** 
    4  * Copyright (C) 2003 VideoLAN 
    5  * $Id: cvd_parse.c,v 1.4 2003/12/30 04:43:52 rocky Exp $ 
     4 * Copyright (C) 2003, 2004 VideoLAN 
     5 * $Id: cvd_parse.c,v 1.5 2004/01/03 12:54:56 rocky Exp $ 
    66 * 
    77 * Authors: Rocky Bernstein  
     
    3737#include "cvd.h" 
    3838#include "common.h" 
     39 
     40#ifdef HAVE_LIBPNG 
     41#include <png.h> 
     42#endif 
    3943 
    4044/* An image color is a two-bit palette entry: 0..3 */  
     
    265269      i_nibble_field = 2;  /* 4-bit pieces available in *p */ 
    266270 
     271#if 0 
     272      unsigned int i; 
     273      int8_t *b=p; 
     274      for (i=0; i< i_width * i_height; i++) 
     275    printf ("%02x", b[i]); 
     276      printf("\n"); 
     277#endif 
     278     
    267279      for ( i_row=i_field; i_row < i_height; i_row += 2 ) { 
    268280    b_filling   = VLC_FALSE; 
     
    327339    } 
    328340 
    329     /* Dump out image not interlaced... */ 
    330     if (p_sys && p_sys->i_debug & DECODE_DBG_IMAGE) { 
    331       uint8_t *p = p_dest; 
    332       printf("-------------------------------------\n++"); 
    333       for ( i_row=0; i_row < i_height; i_row ++ ) { 
    334     for ( i_column=0; i_column<i_width; i_column++ ) { 
    335       printf("%1d", *p++ & 0x03); 
    336     } 
    337     printf("\n++"); 
    338       } 
    339       printf("\n-------------------------------------\n"); 
    340     } 
     341    if (p_sys && (p_sys->i_debug & DECODE_DBG_IMAGE)) { 
     342      /* Dump out image not interlaced... */ 
     343      VCDSubDumpImage( p_dest, i_height, i_width ); 
     344    } 
     345 
     346#ifdef HAVE_LIBPNG 
     347    if (p_sys && (p_sys->i_debug & DECODE_DBG_PNG)) { 
     348#define TEXT_COUNT 2 
     349      /* Dump image to a file in PNG format. */ 
     350      char filename[300]; 
     351      png_text text_ptr[TEXT_COUNT]; 
     352 
     353      text_ptr[0].key = "Preparer"; 
     354      text_ptr[0].text = "VLC"; 
     355      text_ptr[0].compression = PNG_TEXT_COMPRESSION_NONE; 
     356      text_ptr[1].key = "Description"; 
     357      text_ptr[1].text = "CVD Subtitle"; 
     358      text_ptr[1].compression = PNG_TEXT_COMPRESSION_NONE; 
     359 
     360      snprintf(filename, 300, "%s%d.png", "/tmp/vlc-cvd-sub", p_sys->i_image); 
     361      VCDSubDumpPNG( p_dest, p_dec, i_height, i_width, filename, 
     362             text_ptr, TEXT_COUNT ); 
     363    } 
     364#endif /*HAVE_LIBPNG*/ 
     365 
    341366 
    342367    VCDInlinePalette( p_dest, p_sys, i_height, i_width ); 
  • modules/codec/ogt/ogt.c

    rb72e3b1 r289aade  
    22 * ogt.c : Overlay Graphics Text (SVCD subtitles) decoder thread 
    33 ***************************************************************************** 
    4  * Copyright (C) 2003 VideoLAN 
    5  * $Id: ogt.c,v 1.7 2004/01/01 13:55:17 rocky Exp $ 
    6  * 
    7  * Authors: Rocky Bernstein 
     4 * Copyright (C) 2003, 2004 VideoLAN 
     5 * $Id: ogt.c,v 1.8 2004/01/03 12:54:56 rocky Exp $ 
     6 * 
     7 * Author: Rocky Bernstein 
    88 *   based on code from: 
    99 *       Julio Sanchez Fernandez (http://subhandler.sourceforge.net) 
     
    3636#include "ogt.h" 
    3737#include "common.h" 
    38  
    39 #define DEBUG_LONGTEXT N_( \ 
    40     "This integer when viewed in binary is a debugging mask\n" \ 
    41     "external call          1\n" \ 
    42     "all calls              2\n" \ 
    43     "packet assembly info   4\n" \ 
    44     "image bitmaps          8\n" \ 
    45     "image transformations 16\n" \ 
    46     "rendering information 32\n" \ 
    47     "misc info             64\n" ) 
    48  
    4938 
    5039/***************************************************************************** 
  • modules/codec/ogt/ogt_parse.c

    rc17dee7 r289aade  
    22 * Philips OGT (SVCD subtitle) packet parser 
    33 ***************************************************************************** 
    4  * Copyright (C) 2003 VideoLAN 
    5  * $Id: ogt_parse.c,v 1.4 2003/12/30 04:43:52 rocky Exp $ 
     4 * Copyright (C) 2003, 2004 VideoLAN 
     5 * $Id: ogt_parse.c,v 1.5 2004/01/03 12:54:56 rocky Exp $ 
    66 * 
    77 * Author: Rocky Bernstein  
     
    3737#include "render.h" 
    3838#include "ogt.h" 
     39 
     40#ifdef HAVE_LIBPNG 
     41#include <png.h> 
     42#endif 
    3943 
    4044/* An image color is a two-bit palette entry: 0..3 */  
     
    105109   
    106110  for (i=0; i<4; i++) { 
    107     p_sys->pi_palette[i].s.y = *p++; 
    108     p_sys->pi_palette[i].s.u = *p++; 
    109     p_sys->pi_palette[i].s.v = *p++; 
     111    p_sys->p_palette[i].s.y = *p++; 
     112    p_sys->p_palette[i].s.u = *p++; 
     113    p_sys->p_palette[i].s.v = *p++; 
    110114    /* OGT has 8-bit resolution for alpha, but DVD's and CVDS use 4-bits. 
    111115       Since we want to use the same render routine, rather than scale up 
    112116       CVD (and DVD) subtitles, we'll scale down ours.  
    113117    */ 
    114     p_sys->pi_palette[i].s.t = (*p++) >> 4; 
     118    p_sys->p_palette[i].s.t = (*p++) >> 4; 
    115119  } 
    116120  p_sys->i_cmd = *p++; 
     
    137141    for (i=0; i<4; i++) { 
    138142      msg_Dbg( p_dec, "palette[%d]= T: %2x, Y: %2x, u: %2x, v: %2x", i, 
    139            p_sys->pi_palette[i].s.t, p_sys->pi_palette[i].s.y,  
    140            p_sys->pi_palette[i].s.u, p_sys->pi_palette[i].s.v ); 
     143           p_sys->p_palette[i].s.t, p_sys->p_palette[i].s.y,  
     144           p_sys->p_palette[i].s.u, p_sys->p_palette[i].s.v ); 
    141145    } 
    142146  } 
     
    326330    } 
    327331 
    328     if (p_sys && p_sys->i_debug & DECODE_DBG_IMAGE)     
     332    if (p_sys && (p_sys->i_debug & DECODE_DBG_IMAGE)) 
    329333      printf("\n"); 
    330334 
     
    338342    } 
    339343 
    340     /* Dump out image not interlaced... */ 
    341     if (p_sys && p_sys->i_debug & DECODE_DBG_IMAGE) { 
    342       uint8_t *p = p_dest; 
    343       printf("-------------------------------------\n++"); 
    344       for ( i_row=0; i_row < i_height; i_row ++ ) { 
    345     for ( i_column=0; i_column<i_width; i_column++ ) { 
    346       printf("%1d", *p++ & 0x03); 
    347     } 
    348     printf("\n++"); 
    349       } 
    350       printf("\n-------------------------------------\n"); 
    351     } 
    352  
     344    if (p_sys && (p_sys->i_debug & DECODE_DBG_IMAGE)) { 
     345      /* Dump out image not interlaced... */ 
     346      VCDSubDumpImage( p_dest, i_height, i_width ); 
     347    } 
     348 
     349#ifdef HAVE_LIBPNG 
     350    if (p_sys && (p_sys->i_debug & DECODE_DBG_PNG)) { 
     351#define TEXT_COUNT 2 
     352      /* Dump image to a file in PNG format. */ 
     353      char filename[300]; 
     354      png_text text_ptr[TEXT_COUNT]; 
     355 
     356      text_ptr[0].key = "Preparer"; 
     357      text_ptr[0].text = "VLC"; 
     358      text_ptr[0].compression = PNG_TEXT_COMPRESSION_NONE; 
     359      text_ptr[1].key = "Description"; 
     360      text_ptr[1].text = "SVCD Subtitle"; 
     361      text_ptr[1].compression = PNG_TEXT_COMPRESSION_NONE; 
     362 
     363      snprintf(filename, 300, "%s%d.png", "/tmp/vlc-svcd-sub", p_sys->i_image); 
     364      VCDSubDumpPNG( p_dest, p_dec, i_height, i_width, filename, 
     365             text_ptr, TEXT_COUNT ); 
     366    } 
     367#endif /*HAVE_LIBPNG*/ 
     368     
    353369    VCDInlinePalette( p_dest, p_sys, i_height, i_width ); 
     370     
    354371 
    355372    /* The video is automatically scaled. However subtitle bitmaps 
  • modules/codec/ogt/subtitle.h

    rbea939b r289aade  
    22 * subtitle.h : Common SVCD and CVD subtitles header 
    33 ***************************************************************************** 
    4  * Copyright (C) 2003 VideoLAN 
    5  * $Id: subtitle.h,v 1.2 2003/12/28 11:26:52 rocky Exp $ 
     4 * Copyright (C) 2003,2004 VideoLAN 
     5 * $Id: subtitle.h,v 1.3 2004/01/03 12:54:56 rocky Exp $ 
    66 * 
    77 * Author: Rocky Bernstein 
     
    3131#define DECODE_DBG_TRANSFORM  16 /* bitmap transformations */ 
    3232#define DECODE_DBG_RENDER     32 /* rendering information */ 
    33 #define DECODE_DBG_INFO       64 
     33#define DECODE_DBG_PNG        64 /* Extract subtitles to PNG files. */ 
     34#define DECODE_DBG_INFO      128 
     35 
     36#define DEBUG_LONGTEXT N_( \ 
     37    "This integer when viewed in binary is a debugging mask\n" \ 
     38    "external call          1\n" \ 
     39    "all calls              2\n" \ 
     40    "packet assembly info   4\n" \ 
     41    "image bitmaps          8\n" \ 
     42    "image transformations 16\n" \ 
     43    "rendering information 32\n" \ 
     44    "extract subtitles     64\n" \ 
     45    "misc info            128\n" ) 
    3446 
    3547#define DECODE_DEBUG 1 
     
    125137  uint16_t i_width, i_height;   /* dimensions in pixels of image */ 
    126138 
    127   ogt_yuvt_t pi_palette[NUM_SUBTITLE_COLORS];  /* Palette of colors used 
     139  ogt_yuvt_t p_palette[NUM_SUBTITLE_COLORS];  /* Palette of colors used 
    128140                          in subtitle */ 
    129141 
    130142 
    131   ogt_yuvt_t pi_palette_highlight[NUM_SUBTITLE_COLORS]; /* Only used 
     143  ogt_yuvt_t p_palette_highlight[NUM_SUBTITLE_COLORS]; /* Only used 
    132144                               for CVD */ 
    133145