REGISTER_ENCDEC (PCM_U24LE, pcm_u24le);
REGISTER_ENCDEC (PCM_U32BE, pcm_u32be);
REGISTER_ENCDEC (PCM_U32LE, pcm_u32le);
+ REGISTER_ENCDEC (PCM_ZORK , pcm_zork);
/* dpcm codecs */
REGISTER_DECODER(INTERPLAY_DPCM, interplay_dpcm);
PCM_CODEC(CODEC_ID_PCM_U24LE, pcm_u24le);
PCM_CODEC(CODEC_ID_PCM_U32BE, pcm_u32be);
PCM_CODEC(CODEC_ID_PCM_U32LE, pcm_u32le);
+PCM_CODEC(CODEC_ID_PCM_ZORK, pcm_zork);
/* ADPCM codecs */
CODEC_ID_PCM_U24LE,
CODEC_ID_PCM_U24BE,
CODEC_ID_PCM_S24DAUD,
+ CODEC_ID_PCM_ZORK,
/* various ADPCM codecs */
CODEC_ID_ADPCM_IMA_QT= 0x11000,
*dst++ = (v >> 8) + 128;
}
break;
+ case CODEC_ID_PCM_ZORK:
+ for(;n>0;n--) {
+ v= *samples++ >> 8;
+ if(v<0) v = -v;
+ else v+= 128;
+ *dst++ = v;
+ }
+ break;
case CODEC_ID_PCM_ALAW:
for(;n>0;n--) {
v = *samples++;
*samples++ = ((int)*src++ - 128) << 8;
}
break;
+ case CODEC_ID_PCM_ZORK:
+ n = buf_size;
+ for(;n>0;n--) {
+ int x= *src++;
+ if(x&128) x-= 128;
+ else x = -x;
+ *samples++ = x << 8;
+ }
+ break;
case CODEC_ID_PCM_ALAW:
case CODEC_ID_PCM_MULAW:
n = buf_size;
PCM_CODEC(CODEC_ID_PCM_U8, pcm_u8);
PCM_CODEC(CODEC_ID_PCM_ALAW, pcm_alaw);
PCM_CODEC(CODEC_ID_PCM_MULAW, pcm_mulaw);
+PCM_CODEC(CODEC_ID_PCM_ZORK, pcm_zork);
#undef PCM_CODEC
id = CODEC_ID_PCM_S24LE;
if (id == CODEC_ID_PCM_S16LE && bps == 32)
id = CODEC_ID_PCM_S32LE;
+ if (id == CODEC_ID_ADPCM_IMA_WAV && bps == 8)
+ id = CODEC_ID_PCM_ZORK;
return id;
}
#endif // CONFIG_DEMUXERS