diff options
Diffstat (limited to 'libavcodec/pcm.c')
-rw-r--r-- | libavcodec/pcm.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libavcodec/pcm.c b/libavcodec/pcm.c index d91113d781..36385f7e99 100644 --- a/libavcodec/pcm.c +++ b/libavcodec/pcm.c @@ -376,6 +376,15 @@ static int pcm_decode_frame(AVCodecContext *avctx, void *data, for (; n > 0; n--) *samples++ = *src++ + 128; break; + case AV_CODEC_ID_PCM_S8_PLANAR: + n /= avctx->channels; + for (c = 0; c < avctx->channels; c++) { + int i; + samples = s->frame.extended_data[c]; + for (i = n; i > 0; i--) + *samples++ = *src++ + 128; + } + break; #if HAVE_BIGENDIAN case AV_CODEC_ID_PCM_F64LE: DECODE(64, le64, src, samples, n, 0, 0) @@ -548,6 +557,7 @@ PCM_CODEC (PCM_F64LE, AV_SAMPLE_FMT_DBL, pcm_f64le, "PCM 64-bit f PCM_DECODER(PCM_LXF, AV_SAMPLE_FMT_S32P,pcm_lxf, "PCM signed 20-bit little-endian planar"); PCM_CODEC (PCM_MULAW, AV_SAMPLE_FMT_S16, pcm_mulaw, "PCM mu-law / G.711 mu-law"); PCM_CODEC (PCM_S8, AV_SAMPLE_FMT_U8, pcm_s8, "PCM signed 8-bit"); +PCM_DECODER(PCM_S8_PLANAR, AV_SAMPLE_FMT_U8P, pcm_s8_planar, "PCM signed 8-bit planar"); PCM_CODEC (PCM_S16BE, AV_SAMPLE_FMT_S16, pcm_s16be, "PCM signed 16-bit big-endian"); PCM_DECODER(PCM_S16BE_PLANAR, AV_SAMPLE_FMT_S16P,pcm_s16be_planar, "PCM signed 16-bit big-endian planar"); PCM_CODEC (PCM_S16LE, AV_SAMPLE_FMT_S16, pcm_s16le, "PCM signed 16-bit little-endian"); |