Revision 055dc116 libavcodec/adpcm.c

View differences:

libavcodec/adpcm.c
1131 1131
            *samples++ = c->status[0].predictor - c->status[1].predictor;
1132 1132
        }
1133 1133
        break;
1134
    case CODEC_ID_ADPCM_IMA_ISS:
1135
        c->status[0].predictor  = (int16_t)AV_RL16(src + 0);
1136
        c->status[0].step_index = src[2];
1137
        src += 4;
1138
        if(st) {
1139
            c->status[1].predictor  = (int16_t)AV_RL16(src + 0);
1140
            c->status[1].step_index = src[2];
1141
            src += 4;
1142
        }
1143

  
1144
        while (src < buf + buf_size) {
1145

  
1146
            if (st) {
1147
                *samples++ = adpcm_ima_expand_nibble(&c->status[0],
1148
                    src[0] >> 4  , 3);
1149
                *samples++ = adpcm_ima_expand_nibble(&c->status[1],
1150
                    src[0] & 0x0F, 3);
1151
            } else {
1152
                *samples++ = adpcm_ima_expand_nibble(&c->status[0],
1153
                    src[0] & 0x0F, 3);
1154
                *samples++ = adpcm_ima_expand_nibble(&c->status[0],
1155
                    src[0] >> 4  , 3);
1156
            }
1157

  
1158
            src++;
1159
        }
1160
        break;
1134 1161
    case CODEC_ID_ADPCM_IMA_WS:
1135 1162
        /* no per-block initialization; just start decoding the data */
1136 1163
        while (src < buf + buf_size) {
......
1641 1668
ADPCM_DECODER(CODEC_ID_ADPCM_IMA_DK4, adpcm_ima_dk4, "IMA Duck DK4 ADPCM");
1642 1669
ADPCM_DECODER(CODEC_ID_ADPCM_IMA_EA_EACS, adpcm_ima_ea_eacs, "IMA Electronic Arts EACS ADPCM");
1643 1670
ADPCM_DECODER(CODEC_ID_ADPCM_IMA_EA_SEAD, adpcm_ima_ea_sead, "IMA Electronic Arts SEAD ADPCM");
1671
ADPCM_DECODER(CODEC_ID_ADPCM_IMA_ISS, adpcm_ima_iss, "IMA Funcom ISS ADPCM");
1644 1672
ADPCM_CODEC  (CODEC_ID_ADPCM_IMA_QT, adpcm_ima_qt, "IMA QuickTime ADPCM");
1645 1673
ADPCM_DECODER(CODEC_ID_ADPCM_IMA_SMJPEG, adpcm_ima_smjpeg, "IMA Loki SDL MJPEG ADPCM");
1646 1674
ADPCM_CODEC  (CODEC_ID_ADPCM_IMA_WAV, adpcm_ima_wav, "IMA Wav ADPCM");

Also available in: Unified diff