Changeset 821

Show
Ignore:
Timestamp:
03/01/08 02:35:10 (7 months ago)
Author:
astrange
Message:

Now that I've replaced my latin-1 files with ACTUAL latin-1 files, regenerate the latin1/2 detector again. Also add some miscellaneous tool sources I had lying around.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Subtitles/SubUtilities.m

    r734 r821  
    6767} 
    6868 
     69static const short frequencies[] = { 
     70        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,  
     71        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,  
     72        674, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,  
     73        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,  
     74        0, 1026, 29, -1258, 539, -930, -652, -815, -487, -2526, -2161, 146, -956, -914, 1149, -102,  
     75        293, -2675, -923, -597, 339, 110, 247, 9, 0, 1024, 1239, 0, 0, 0, 0, 0,  
     76        0, 1980, 1472, 1733, -304, -4086, 273, 582, 333, 2479, 1193, 5014, -1039, 1964, -2025, 1083,  
     77        -154, -5000, -1725, -4843, -366, -1850, -191, 1356, -2262, 1648, 1475, 0, 0, 0, 0, 0,  
     78        0, 0, 0, 0, 0, -458, 0, 0, 0, 0, 300, 0, 0, 300, 601, 0,  
     79        0, 0, -2247, 0, 0, 0, 0, 0, 0, 0, 3667, 0, 0, 3491, 3567, 0,  
     80        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1993, 0, 0, 0, 0, 0,  
     81        0, 0, 0, 0, 0, 0, 1472, 0, 0, 0, 5000, 0, 601, 0, 1993, 0,  
     82        0, 1083, 0, 672, -458, 0, 0, -458, 1409, 0, 0, 0, 0, 0, 1645, 425,  
     83        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 601, -1123,  
     84        -1912, 4259, 2573, 8866, 55, 0, 0, -2247, -831, -3788, -3043, 0, 0, 3412, 2921, 1251,  
     85        0, 0, 1377, 520, 1344, 0, -1123, 0, 0, -1213, 2208, -458, -794, 2636, 3824, 0}; 
     86 
    6987static BOOL DifferentiateLatin12(const unsigned char *data, int length) 
    7088{ 
    71         // generated from french/german (latin1) and hungarian/slovak (latin2) 
    72          
    73         const short frequencies[] = { 
    74                 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,  
    75                 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,  
    76                 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,  
    77                 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,  
    78                 504, 1024, -192, -403, 433, -1106, -1376, -865, 447, -1894, -1550, 878, -2285, -385, 1616, -1292,  
    79                 27, -2306, -1328, 57, 402, 194, -338, -1509, 0, 944, 1471, 0, 0, 0, 0, 0,  
    80                 0, 1891, 1663, 2461, 226, -4595, -1174, -1672, -1096, 2218, 3418, 4572, -1075, 2244, -2666, 855,  
    81                 279, -4997, -3202, -4819, -627, -1330, 855, -1276, -2190, 3607, 810, 0, 1555, 0, 0, 0,  
    82                 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 618, 0, 0, 0, 357, 0,  
    83                 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4220, 0, -1279, 504, 4677, 0,  
    84                 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2366, 0, 0, 0, 0, 0,  
    85                 0, 0, 0, 0, 0, 0, 1747, 0, 0, 0, 5936, 0, 0, 0, 0, 0,  
    86                 -1107, 0, 0, 798, -639, 0, 0, -1107, 874, -751, 0, 0, 0, 0, 1953, 0,  
    87                 0, 0, 0, 0, 0, 0, 0, 0, 874, 0, 0, 0, 0, 0, 713, -1567,  
    88                 -3675, 6370, 2120, 10526, -1107, 0, 0, -2306, -598, -3012, -3262, 0, 5571, 6644, 2104, 1595,  
    89                 0, 0, 798, 1070, -1430, 0, -1567, 0, 4280, 1004, 713, -904, -1107, 3288, 4539, 0}; 
     89        // generated from french/german (latin1) and hungarian/romanian (latin2) 
    9090         
    9191        int frcount = 0;