mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2025-10-26 18:30:52 +08:00
ADPCM IMA WAV 2, 3 and 5 bits decoder
Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
@@ -2899,7 +2899,9 @@ int av_get_audio_frame_duration(AVCodecContext *avctx, int frame_bytes)
|
||||
int blocks = frame_bytes / ba;
|
||||
switch (avctx->codec_id) {
|
||||
case AV_CODEC_ID_ADPCM_IMA_WAV:
|
||||
return blocks * (1 + (ba - 4 * ch) / (4 * ch) * 8);
|
||||
if (bps < 2 || bps > 5)
|
||||
return 0;
|
||||
return blocks * (1 + (ba - 4 * ch) / (bps * ch) * 8);
|
||||
case AV_CODEC_ID_ADPCM_IMA_DK3:
|
||||
return blocks * (((ba - 16) * 2 / 3 * 4) / ch);
|
||||
case AV_CODEC_ID_ADPCM_IMA_DK4:
|
||||
|
||||
Reference in New Issue
Block a user