Ignore:
Timestamp:
03/27/07 11:23:35 (18 years ago)
Author:
r2d
Message:

corrected pns encoding/decoding bug (doesn't change bitstream for quality >= 5)

File:
1 edited

Legend:

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

    r226 r243  
    177177
    178178        if (MaxBand) {
    179                 writeBits(e, HuffRes[0][Res_L[MaxBand - 1]].Code, HuffRes[0][Res_L[MaxBand - 1]].Length);
    180                 writeBits(e, HuffRes[0][Res_R[MaxBand - 1]].Code, HuffRes[0][Res_R[MaxBand - 1]].Length);
     179                {
     180                        int tmp = Res_L[MaxBand - 1];
     181                        if (tmp < 0) tmp += 17;
     182                        writeBits(e, HuffRes[0][tmp].Code, HuffRes[0][tmp].Length);
     183                        tmp = Res_R[MaxBand - 1];
     184                        if (tmp < 0) tmp += 17;
     185                        writeBits(e, HuffRes[0][tmp].Code, HuffRes[0][tmp].Length);
     186                }
    181187                for ( n = MaxBand - 2; n >= 0; n--) {
    182188                        int tmp = Res_L[n] - Res_L[n + 1];
Note: See TracChangeset for help on using the changeset viewer.