Ignore:
Timestamp:
01/20/07 21:43:42 (17 years ago)
Author:
r2d
Message:
  • added more precision to encoding quality information
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libmpc/branches/r2d/libmpcdec/streaminfo.c

    r195 r201  
    5454
    5555static const char *
    56 mpc_get_version_string(mpc_uint32_t profile) // profile is 0...15, where 7...13 is used
    57 {
    58     return profile >= sizeof versionNames / sizeof *versionNames ? na : versionNames[profile];
     56mpc_get_version_string(float profile) // profile is 0...15, where 7...13 is used
     57{
     58        return profile >= sizeof versionNames / sizeof *versionNames ? na : versionNames[(int)profile];
    5959}
    6060
     
    109109        si->max_band           = mpc_bits_read(r, 6);
    110110        si->profile            = mpc_bits_read(r, 4);
    111     si->profile_name       = mpc_get_version_string(si->profile);
     111        si->profile_name       = mpc_get_version_string(si->profile);
    112112        mpc_bits_read(r, 2); // Link ?
    113113        si->sample_freq        = samplefreqs[mpc_bits_read(r, 2)];
     
    195195        mpc_bits_reader r = *r_in;
    196196
    197         si->profile            = mpc_bits_read(&r, 4);
     197        si->profile            = mpc_bits_read(&r, 7) / 8.;
    198198        si->profile_name       = mpc_get_version_string(si->profile);
    199199        si->pns                = mpc_bits_read(&r, 1);
    200         mpc_bits_read(&r, 3); // unused
    201200        si->encoder_version = mpc_bits_read(&r, 4) << 24; // major
    202201        si->encoder_version |= mpc_bits_read(&r, 8) << 16; // minor
Note: See TracChangeset for help on using the changeset viewer.