Ignore:
Timestamp:
11/24/06 19:18:18 (18 years ago)
Author:
r2d
Message:
  • updated libmpcenc / libmpcdec according to the spec
  • added seek table loading from file in libmpcdec
Location:
libmpc/branches/r2d/libmpcenc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libmpc/branches/r2d/libmpcenc/encode_sv7.c

    r149 r150  
    105105        writeBits ( e, tmp[0]  , 8 );
    106106
    107     writeBits ( e, 0x08,  8 );    // StreamVersion
     107    writeBits ( e, 8,  8 );    // StreamVersion
    108108
    109109        len = encodeSize(SamplesCount, (char *)tmp, MPC_FALSE);
     
    112112
    113113        switch ( SampleFreq ) {
    114                 case 44100: writeBits ( e, 0, 4 ); break;
    115                 case 48000: writeBits ( e, 1, 4 ); break;
    116                 case 37800: writeBits ( e, 2, 4 ); break;
    117                 case 32000: writeBits ( e, 3, 4 ); break;
     114                case 44100: writeBits ( e, 0, 3 ); break;
     115                case 48000: writeBits ( e, 1, 3 ); break;
     116                case 37800: writeBits ( e, 2, 3 ); break;
     117                case 32000: writeBits ( e, 3, 3 ); break;
    118118                default   : fprintf(stderr, "Internal error\n");// FIXME : stderr_printf ( "Internal error\n");
    119119                exit (1);
     
    123123        writeBits ( e, MaxBand - 1  ,  5 );    // Bandwidth
    124124        writeBits ( e, MS_on        ,  1 );    // MS-Coding Flag
    125         writeBits ( e, FRAMES_PER_BLOCK_PWR,  4 );    // frames per block (log2 unit)
    126         writeBits ( e, 0, 6 );    // unused
     125        writeBits ( e, FRAMES_PER_BLOCK_PWR >> 1,  3 );    // frames per block (log4 unit)
    127126
    128127        writeGainInfo(e);
  • libmpc/branches/r2d/libmpcenc/libmpcenc.h

    r149 r150  
    2828
    2929// bitstream.c
    30 #define FRAMES_PER_BLOCK_PWR 6
     30#define FRAMES_PER_BLOCK_PWR 6 // MUST be even
    3131#define FRAMES_PER_BLOCK (1 << FRAMES_PER_BLOCK_PWR)
    3232#define BUFFER_FULL         (4352 * FRAMES_PER_BLOCK)         // 34490 bit/frame  1320.3 kbps
Note: See TracChangeset for help on using the changeset viewer.