/[amv]/amv.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /amv.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 13 by dpavlin, Fri Jul 20 16:55:33 2007 UTC revision 15 by dpavlin, Sat Jul 21 11:05:43 2007 UTC
# Line 15  use strict; Line 15  use strict;
15  use Data::Dump qw/dump/;  use Data::Dump qw/dump/;
16  use Carp qw/confess/;  use Carp qw/confess/;
17  use File::Path;  use File::Path;
18    use Getopt::Long;
19    
20  my $dump = 0;  my $dump = 0;
21  my $debug = 0;  my $debug = 0;
22    my $dump_dir = '/tmp/dump/';
23    
24    GetOptions(
25            "dump!"                 => \$dump,
26            "debug!"                => \$debug,
27            "dump-dir=s"    => \$dump_dir,
28    );
29    
30  my $path = shift @ARGV || die "usage: $0 movie.amv\n";  my $path = shift @ARGV || die "usage: $0 movie.amv\n";
31    
32  my $dump_dir = '/tmp/dump/';  
33  rmtree $dump_dir if -e $dump_dir;  rmtree $dump_dir if -e $dump_dir;
34  mkpath $dump_dir || die "can't create $dump_dir: $!";  mkpath $dump_dir || die "can't create $dump_dir: $!";
35    
# Line 355  sub mkjpg { Line 363  sub mkjpg {
363          # Define huffman table (section B.2.4.1)          # Define huffman table (section B.2.4.1)
364          "\xFF\xC4".     # Marker          "\xFF\xC4".     # Marker
365          "\x00\x1F".     # Length (31 bytes)          "\x00\x1F".     # Length (31 bytes)
366          "\x00".         # DC, table 0          "\x00".         # DC luminance, table 0
367          "\x00\x01\x05\x01\x01\x01\x01\x01\x01\x00\x00\x00".          "\x00\x01\x05\x01\x01\x01\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00".
368          "\x00\x00\x00\x00\x00\x01\x02\x03\x04\x05\x06\x07".          "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B".
369          "\x08\x09\x0A\x0B".          # Define huffman table (section B.2.4.1)
370            "\xFF\xC4".     # Marker
371            "\x00\x1F".     # Length (31 bytes)
372            "\x01".         # DC chrominance, table 1
373            "\x00\x03\x01\x01\x01\x01\x01\x01\x01\x01\x01\x00".
374            "\x00\x00\x00\x00".
375            "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B".
376          # Define huffman table (section B.2.4.1)          # Define huffman table (section B.2.4.1)
377          "\xFF\xC4".     # Marker          "\xFF\xC4".     # Marker
378          "\x00\xB5".     # Length (181 bytes)          "\x00\xB5".     # Length (181 bytes)
379          "\x10".         # AC, table 0          "\x10".         # AC luminance, table 0
380          "\x00\x02\x01\x03\x03\x02\x04\x03\x05\x05\x04\x04".          "\x00\x02\x01\x03\x03\x02\x04\x03\x05\x05\x04\x04\x00\x00\x01\x7D".
381          "\x00\x00\x01\x7D\x01\x02\x03\x00\x04\x11\x05\x12".          "\x01\x02\x03\x00\x04\x11\x05\x12".
382          "\x21\x31\x41\x06\x13\x51\x61\x07\x22\x71\x14\x32".          "\x21\x31\x41\x06\x13\x51\x61\x07\x22\x71\x14\x32".
383          "\x81\x91\xA1\x08\x23\x42\xB1\xC1\x15\x52\xD1\xF0".          "\x81\x91\xA1\x08\x23\x42\xB1\xC1\x15\x52\xD1\xF0".
384          "\x24\x33\x62\x72\x82\x09\x0A\x16\x17\x18\x19\x1A".          "\x24\x33\x62\x72\x82\x09\x0A\x16\x17\x18\x19\x1A".
# Line 378  sub mkjpg { Line 392  sub mkjpg {
392          "\xC6\xC7\xC8\xC9\xCA\xD2\xD3\xD4\xD5\xD6\xD7\xD8".          "\xC6\xC7\xC8\xC9\xCA\xD2\xD3\xD4\xD5\xD6\xD7\xD8".
393          "\xD9\xDA\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA".          "\xD9\xDA\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA".
394          "\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA".          "\xF1\xF2\xF3\xF4\xF5\xF6\xF7\xF8\xF9\xFA".
         # Define huffman table (section B.2.4.1)  
         "\xFF\xC4".     #       /* Marker */  
         "\x00\x1F".     #       /* Length (31 bytes) */  
         "\x01".         #/* DC". table 1 */  
         "\x00\x03\x01\x01\x01\x01\x01\x01\x01\x01\x01\x00".  
         "\x00\x00\x00\x00\x00\x01\x02\x03\x04\x05\x06\x07".  
         "\x08\x09\x0A\x0B".  
395          #/* Define huffman table (section B.2.4.1) */          #/* Define huffman table (section B.2.4.1) */
396          "\xFF\xC4".     #       /* Marker */          "\xFF\xC4".     # Marker
397          "\x00\xB5".     #       /* Length (181 bytes) */          "\x00\xB5".     # Length (181 bytes)
398          "\x11".         #/* AC". table 1 */          "\x11".         # AC chrominance, table 1
399          "\x00\x02\x01\x02\x04\x04\x03\x04\x07\x05\x04\x04".          "\x00\x02\x01\x02\x04\x04\x03\x04\x07\x05\x04\x04".
400          "\x00\x01\x02\x77\x00\x01\x02\x03\x11\x04\x05\x21".          "\x00\x01\x02\x77".
401            "\x00\x01\x02\x03\x11\x04\x05\x21".
402          "\x31\x06\x12\x41\x51\x07\x61\x71\x13\x22\x32\x81".          "\x31\x06\x12\x41\x51\x07\x61\x71\x13\x22\x32\x81".
403          "\x08\x14\x42\x91\xA1\xB1\xC1\x09\x23\x33\x52\xF0".          "\x08\x14\x42\x91\xA1\xB1\xC1\x09\x23\x33\x52\xF0".
404          "\x15\x62\x72\xD1\x0A\x16\x24\x34\xE1\x25\xF1\x17".          "\x15\x62\x72\xD1\x0A\x16\x24\x34\xE1\x25\xF1\x17".

Legend:
Removed from v.13  
changed lines
  Added in v.15

  ViewVC Help
Powered by ViewVC 1.1.26