* [FFmpeg-devel] [PATCH 1/2] avcodec/adpcm: Sanyo LD-ADPCM decoder @ 2025-06-25 8:02 Peter Ross 2025-06-25 8:03 ` [FFmpeg-devel] [PATCH 2/2] tests/fate: Sanyo LD-ADPCM test case Peter Ross 0 siblings, 1 reply; 2+ messages in thread From: Peter Ross @ 2025-06-25 8:02 UTC (permalink / raw) To: ffmpeg-devel [-- Attachment #1.1: Type: text/plain, Size: 12884 bytes --] --- adpcm_le.c was added because the decoder needs little-endian get_bits.h Samples: https://pross.sdf.org/sandpit/sanyo-mono-3bit-8000.wav https://pross.sdf.org/sandpit/sanyo-mono-4bit-8000.wav https://pross.sdf.org/sandpit/sanyo-mono-5bit-8000.wav libavcodec/Makefile | 1 + libavcodec/adpcm.c | 21 ++++ libavcodec/adpcm.h | 2 + libavcodec/adpcm_le.c | 205 ++++++++++++++++++++++++++++++++++++++++ libavcodec/allcodecs.c | 1 + libavcodec/codec_desc.c | 7 ++ libavcodec/codec_id.h | 1 + libavformat/riff.c | 1 + 8 files changed, 239 insertions(+) create mode 100644 libavcodec/adpcm_le.c diff --git a/libavcodec/Makefile b/libavcodec/Makefile index dca6c100c0..45cf80e5dd 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -990,6 +990,7 @@ OBJS-$(CONFIG_ADPCM_MS_DECODER) += adpcm.o adpcm_data.o OBJS-$(CONFIG_ADPCM_MS_ENCODER) += adpcmenc.o adpcm_data.o OBJS-$(CONFIG_ADPCM_MTAF_DECODER) += adpcm.o adpcm_data.o OBJS-$(CONFIG_ADPCM_PSX_DECODER) += adpcm.o adpcm_data.o +OBJS-$(CONFIG_ADPCM_SANYO_DECODER) += adpcm.o adpcm_data.o adpcm_le.o OBJS-$(CONFIG_ADPCM_SBPRO_2_DECODER) += adpcm.o adpcm_data.o OBJS-$(CONFIG_ADPCM_SBPRO_3_DECODER) += adpcm.o adpcm_data.o OBJS-$(CONFIG_ADPCM_SBPRO_4_DECODER) += adpcm.o adpcm_data.o diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c index 622cf54b40..d0f5780dce 100644 --- a/libavcodec/adpcm.c +++ b/libavcodec/adpcm.c @@ -260,6 +260,9 @@ static av_cold int adpcm_decode_init(AVCodecContext * avctx) case AV_CODEC_ID_ADPCM_IMA_AMV: max_channels = 1; break; + case AV_CODEC_ID_ADPCM_SANYO: + max_channels = 2; + break; case AV_CODEC_ID_ADPCM_AFC: case AV_CODEC_ID_ADPCM_EA_R1: case AV_CODEC_ID_ADPCM_EA_R2: @@ -307,6 +310,10 @@ static av_cold int adpcm_decode_init(AVCodecContext * avctx) avctx->block_align != 17 * avctx->ch_layout.nb_channels) return AVERROR_INVALIDDATA; break; + case AV_CODEC_ID_ADPCM_SANYO: + if (avctx->bits_per_coded_sample < 3 || avctx->bits_per_coded_sample > 5) + return AVERROR_INVALIDDATA; + break; case AV_CODEC_ID_ADPCM_IMA_XBOX: if (avctx->bits_per_coded_sample != 4) return AVERROR_INVALIDDATA; @@ -338,6 +345,7 @@ static av_cold int adpcm_decode_init(AVCodecContext * avctx) case AV_CODEC_ID_ADPCM_AFC: case AV_CODEC_ID_ADPCM_DTK: case AV_CODEC_ID_ADPCM_PSX: + case AV_CODEC_ID_ADPCM_SANYO: case AV_CODEC_ID_ADPCM_MTAF: case AV_CODEC_ID_ADPCM_ARGO: case AV_CODEC_ID_ADPCM_IMA_MOFLEX: @@ -1072,6 +1080,11 @@ static int get_nb_samples(AVCodecContext *avctx, GetByteContext *gb, case AV_CODEC_ID_ADPCM_ZORK: nb_samples = buf_size / ch; break; + case AV_CODEC_ID_ADPCM_SANYO: + if (!avctx->extradata || avctx->extradata_size != 2) + return AVERROR_INVALIDDATA; + nb_samples = AV_RL16(avctx->extradata); + break; } /* validate coded sample count */ @@ -2265,6 +2278,13 @@ static int adpcm_decode_frame(AVCodecContext *avctx, AVFrame *frame, } } ) /* End of CASE */ + CASE(ADPCM_SANYO, + for (int ch = 0; ch < channels; ch++) { + c->status[ch].predictor = (int16_t)bytestream2_get_le16(&gb); + c->status[ch].step = (int16_t)bytestream2_get_le16(&gb); + } + bytestream2_skip(&gb, ff_adpcm_sanyo_decode(c->status, gb.buffer, bytestream2_get_bytes_left(&gb), avctx->bits_per_coded_sample, nb_samples, channels, samples_p)); + ) /* End of CASE */ CASE(ADPCM_ARGO, /* * The format of each block: @@ -2448,6 +2468,7 @@ ADPCM_DECODER(ADPCM_IMA_XBOX, sample_fmts_s16p, adpcm_ima_xbox, "ADPCM IMA ADPCM_DECODER(ADPCM_MS, sample_fmts_both, adpcm_ms, "ADPCM Microsoft") ADPCM_DECODER(ADPCM_MTAF, sample_fmts_s16p, adpcm_mtaf, "ADPCM MTAF") ADPCM_DECODER(ADPCM_PSX, sample_fmts_s16p, adpcm_psx, "ADPCM Playstation") +ADPCM_DECODER(ADPCM_SANYO, sample_fmts_s16p, adpcm_sanyo, "ADPCM Sanyo") ADPCM_DECODER(ADPCM_SBPRO_2, sample_fmts_s16, adpcm_sbpro_2, "ADPCM Sound Blaster Pro 2-bit") ADPCM_DECODER(ADPCM_SBPRO_3, sample_fmts_s16, adpcm_sbpro_3, "ADPCM Sound Blaster Pro 2.6-bit") ADPCM_DECODER(ADPCM_SBPRO_4, sample_fmts_s16, adpcm_sbpro_4, "ADPCM Sound Blaster Pro 4-bit") diff --git a/libavcodec/adpcm.h b/libavcodec/adpcm.h index 0ffc3da1d0..b1c54ed275 100644 --- a/libavcodec/adpcm.h +++ b/libavcodec/adpcm.h @@ -45,4 +45,6 @@ typedef struct ADPCMChannelStatus { int16_t ff_adpcm_argo_expand_nibble(ADPCMChannelStatus *cs, int nibble, int shift, int flag); +int ff_adpcm_sanyo_decode(ADPCMChannelStatus *cs, const uint8_t *data, int data_size, int bits_per_coded_sample, int nb_samples, int channels, int16_t **samples_p); + #endif /* AVCODEC_ADPCM_H */ diff --git a/libavcodec/adpcm_le.c b/libavcodec/adpcm_le.c new file mode 100644 index 0000000000..df8eb3dd90 --- /dev/null +++ b/libavcodec/adpcm_le.c @@ -0,0 +1,205 @@ +/* + * Copyright (c) 2025 Peter Ross + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "adpcm.h" +#define BITSTREAM_READER_LE +#include "get_bits.h" + +static int adpcm_sanyo_expand3(ADPCMChannelStatus *c, int bits) +{ + int sign, delta, add; + + sign = bits & 4; + if (sign) + delta = 4 - (bits & 3); + else + delta = bits; + + switch (delta) { + case 0: + add = 0; + c->step = (3 * c->step) >> 2; + break; + case 1: + add = c->step; + c->step = (4 * c->step - (c->step >> 1)) >> 2; + break; + case 2: + add = 2 * c->step; + c->step = ((c->step >> 1) + add) >> 1; + break; + case 3: + add = 4 * c->step - (c->step >> 1); + c->step = 2 * c->step; + break; + case 4: + add = (11 * c->step) >> 1; + c->step = 3 * c->step; + break; + } + + if (sign) + add = -add; + + c->predictor = av_clip_int16(c->predictor + add); + c->step = av_clip(c->step, 1, 7281); + return c->predictor; +} + +static int adpcm_sanyo_expand4(ADPCMChannelStatus *c, int bits) +{ + int sign, delta, add; + + sign = bits & 8; + if (sign) + delta = 8 - (bits & 7); + else + delta = bits; + + switch (delta) { + case 0: + add = 0; + c->step = (3 * c->step) >> 2; + break; + case 1: + add = c->step; + c->step = (3 * c->step) >> 2; + break; + case 2: + add = 2 * c->step; + break; + case 3: + add = 3 * c->step; + break; + case 4: + add = 4 * c->step; + break; + case 5: + add = (11 * c->step) >> 1; + c->step += c->step >> 2; + break; + case 6: + add = (15 * c->step) >> 1; + c->step = 2 * c->step; + break; + case 7: + if (sign) + add = (19 * c->step) >> 1; + else + add = (21 * c->step) >> 1; + c->step = (c->step >> 1) + 2 * c->step; + break; + case 8: + add = (25 * c->step) >> 1; + c->step = 5 * c->step; + break; + } + + if (sign) + add = -add; + + c->predictor = av_clip_int16(c->predictor + add); + c->step = av_clip(c->step, 1, 2621); + return c->predictor; +} + +static int adpcm_sanyo_expand5(ADPCMChannelStatus *c, int bits) +{ + int sign, delta, add; + + sign = bits & 0x10; + if (sign) + delta = 16 - (bits & 0xF); + else + delta = bits; + + add = delta * c->step; + switch (delta) { + case 0: + c->step += (c->step >> 2) - (c->step >> 1); + break; + case 1: + case 2: + case 3: + c->step += (c->step >> 3) - (c->step >> 2); + break; + case 4: + case 5: + c->step += (c->step >> 4) - (c->step >> 3); + break; + case 6: + break; + case 7: + c->step += c->step >> 3; + break; + case 8: + c->step += c->step >> 2; + break; + case 9: + c->step += c->step >> 1; + break; + case 10: + c->step = 2 * c->step - (c->step >> 3); + break; + case 11: + c->step = 2 * c->step + (c->step >> 3); + break; + case 12: + c->step = 2 * c->step + (c->step >> 1) - (c->step >> 3); + break; + case 13: + c->step = 3 * c->step - (c->step >> 2); + break; + case 14: + c->step *= 3; + break; + case 15: + case 16: + c->step = (7 * c->step) >> 1; + break; + } + + if (sign) + add = -add; + + c->predictor = av_clip_int16(c->predictor + add); + c->step = av_clip(c->step, 1, 1024); + return c->predictor; +} + +int ff_adpcm_sanyo_decode(ADPCMChannelStatus *cs, const uint8_t *data, int data_size, int bits_per_coded_sample, int nb_samples, int channels, int16_t **samples_p) +{ + int (*expand)(ADPCMChannelStatus *c, int bits); + GetBitContext gb; + + switch(bits_per_coded_sample) { + case 3: expand = adpcm_sanyo_expand3; break; + case 4: expand = adpcm_sanyo_expand4; break; + case 5: expand = adpcm_sanyo_expand5; break; + } + + init_get_bits8(&gb, data, data_size); + for (int i = 0; i < nb_samples; i++) + for (int ch = 0; ch < channels; ch++) + samples_p[ch][i] = expand(&cs[ch], get_bits(&gb, bits_per_coded_sample)); + + align_get_bits(&gb); + return get_bits_count(&gb) / 8; +} diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c index 4b11ad3a75..082cd22e6a 100644 --- a/libavcodec/allcodecs.c +++ b/libavcodec/allcodecs.c @@ -694,6 +694,7 @@ extern const FFCodec ff_adpcm_ms_encoder; extern const FFCodec ff_adpcm_ms_decoder; extern const FFCodec ff_adpcm_mtaf_decoder; extern const FFCodec ff_adpcm_psx_decoder; +extern const FFCodec ff_adpcm_sanyo_decoder; extern const FFCodec ff_adpcm_sbpro_2_decoder; extern const FFCodec ff_adpcm_sbpro_3_decoder; extern const FFCodec ff_adpcm_sbpro_4_decoder; diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c index 5b6aaab88e..dae2296689 100644 --- a/libavcodec/codec_desc.c +++ b/libavcodec/codec_desc.c @@ -2619,6 +2619,13 @@ static const AVCodecDescriptor codec_descriptors[] = { .long_name = NULL_IF_CONFIG_SMALL("ADPCM IMA Xbox"), .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY, }, + { + .id = AV_CODEC_ID_ADPCM_SANYO, + .type = AVMEDIA_TYPE_AUDIO, + .name = "adpcm_sanyo", + .long_name = NULL_IF_CONFIG_SMALL("ADPCM Sanyo"), + .props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY, + }, /* AMR */ { diff --git a/libavcodec/codec_id.h b/libavcodec/codec_id.h index 09dff29886..d00d3fe121 100644 --- a/libavcodec/codec_id.h +++ b/libavcodec/codec_id.h @@ -425,6 +425,7 @@ enum AVCodecID { AV_CODEC_ID_ADPCM_IMA_ACORN, AV_CODEC_ID_ADPCM_XMD, AV_CODEC_ID_ADPCM_IMA_XBOX, + AV_CODEC_ID_ADPCM_SANYO, /* AMR */ AV_CODEC_ID_AMR_NB = 0x12000, diff --git a/libavformat/riff.c b/libavformat/riff.c index 151563e9f2..3c12c4e6c3 100644 --- a/libavformat/riff.c +++ b/libavformat/riff.c @@ -570,6 +570,7 @@ const AVCodecTag ff_codec_wav_tags[] = { { AV_CODEC_ID_G729, 0x0083 }, { AV_CODEC_ID_AAC, 0x00ff }, { AV_CODEC_ID_G723_1, 0x0111 }, + { AV_CODEC_ID_ADPCM_SANYO, 0x0125 }, { AV_CODEC_ID_SIPR, 0x0130 }, { AV_CODEC_ID_ACELP_KELVIN, 0x0135 }, { AV_CODEC_ID_WMAV1, 0x0160 }, -- 2.47.2 -- Peter (A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B) [-- Attachment #1.2: signature.asc --] [-- Type: application/pgp-signature, Size: 195 bytes --] [-- Attachment #2: Type: text/plain, Size: 251 bytes --] _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". ^ permalink raw reply [flat|nested] 2+ messages in thread
* [FFmpeg-devel] [PATCH 2/2] tests/fate: Sanyo LD-ADPCM test case 2025-06-25 8:02 [FFmpeg-devel] [PATCH 1/2] avcodec/adpcm: Sanyo LD-ADPCM decoder Peter Ross @ 2025-06-25 8:03 ` Peter Ross 0 siblings, 0 replies; 2+ messages in thread From: Peter Ross @ 2025-06-25 8:03 UTC (permalink / raw) To: ffmpeg-devel [-- Attachment #1.1: Type: text/plain, Size: 10114 bytes --] --- tests/fate/audio.mak | 11 ++++++++ tests/ref/fate/sanyo-3bit | 36 +++++++++++++++++++++++++ tests/ref/fate/sanyo-4bit | 46 +++++++++++++++++++++++++++++++ tests/ref/fate/sanyo-5bit | 57 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 150 insertions(+) create mode 100644 tests/ref/fate/sanyo-3bit create mode 100644 tests/ref/fate/sanyo-4bit create mode 100644 tests/ref/fate/sanyo-5bit diff --git a/tests/fate/audio.mak b/tests/fate/audio.mak index 6e091760ea..17dfdeabf0 100644 --- a/tests/fate/audio.mak +++ b/tests/fate/audio.mak @@ -85,6 +85,17 @@ fate-ws_snd: CMD = md5 -i $(TARGET_SAMPLES)/vqa/ws_snd.vqa -f s16le -af aresampl FATE_SAMPLES_AUDIO_FFPROBE-$(call DEMDEC, WAV, WMAV2, FILE_PROTOCOL) += fate-flcl1905 fate-flcl1905: CMD = run ffprobe$(PROGSSUF)$(EXESUF) -show_frames -show_packets -print_format compact $(TARGET_SAMPLES)/wav/FLCL_Ending_My-short.wav +FATE_SAMPLES_AUDIO-$(call DEMDEC, WAV, ADPCM_SANYO, ARESAMPLE_FILTER) += fate-sanyo-3bit +fate-sanyo-3bit: CMD = framecrc -i $(TARGET_SAMPLES)/sanyo/sanyo-mono-3bit-8000.wav -af aresample + +FATE_SAMPLES_AUDIO-$(call DEMDEC, WAV, ADPCM_SANYO, ARESAMPLE_FILTER) += fate-sanyo-4bit +fate-sanyo-4bit: CMD = framecrc -i $(TARGET_SAMPLES)/sanyo/sanyo-mono-4bit-8000.wav -af aresample + +FATE_SAMPLES_AUDIO-$(call DEMDEC, WAV, ADPCM_SANYO, ARESAMPLE_FILTER) += fate-sanyo-5bit +fate-sanyo-5bit: CMD = framecrc -i $(TARGET_SAMPLES)/sanyo/sanyo-mono-5bit-8000.wav -af aresample + +fate-sanyo: fate-sanyo-3bit fate-sanyo-4bit fate-sanyo-5bit + FATE_SAMPLES_AUDIO += $(FATE_SAMPLES_AUDIO-yes) FATE_SAMPLES_AUDIO_FFPROBE += $(FATE_SAMPLES_AUDIO_FFPROBE-yes) diff --git a/tests/ref/fate/sanyo-3bit b/tests/ref/fate/sanyo-3bit new file mode 100644 index 0000000000..0109d319c6 --- /dev/null +++ b/tests/ref/fate/sanyo-3bit @@ -0,0 +1,36 @@ +#tb 0: 1/8000 +#media_type 0: audio +#codec_id 0: pcm_s16le +#sample_rate 0: 8000 +#channel_layout_name 0: mono +0, 0, 0, 672, 1344, 0x3c0e906d +0, 672, 672, 672, 1344, 0xd2fcc7cc +0, 1344, 1344, 672, 1344, 0x7848aeb7 +0, 2016, 2016, 672, 1344, 0x82e2b37d +0, 2688, 2688, 672, 1344, 0xdeebc252 +0, 3360, 3360, 672, 1344, 0x83e5a6ef +0, 4032, 4032, 672, 1344, 0x9a58a8cd +0, 4704, 4704, 672, 1344, 0x081fbbc2 +0, 5376, 5376, 672, 1344, 0x4ca36019 +0, 6048, 6048, 672, 1344, 0x2ef29445 +0, 6720, 6720, 672, 1344, 0xa291bb7c +0, 7392, 7392, 672, 1344, 0xa32cd23a +0, 8064, 8064, 672, 1344, 0x147c9fec +0, 8736, 8736, 672, 1344, 0x2e1ca1b8 +0, 9408, 9408, 672, 1344, 0x77bfac0c +0, 10080, 10080, 672, 1344, 0xbf2d97c0 +0, 10752, 10752, 672, 1344, 0x114893ac +0, 11424, 11424, 672, 1344, 0xe0b88410 +0, 12096, 12096, 672, 1344, 0x76388fee +0, 12768, 12768, 672, 1344, 0xb3019bf5 +0, 13440, 13440, 672, 1344, 0x94a2a691 +0, 14112, 14112, 672, 1344, 0x739bdae5 +0, 14784, 14784, 672, 1344, 0x83bab684 +0, 15456, 15456, 672, 1344, 0x94ca84b6 +0, 16128, 16128, 672, 1344, 0x54426c4b +0, 16800, 16800, 672, 1344, 0x7451b88f +0, 17472, 17472, 672, 1344, 0xbc4d9be7 +0, 18144, 18144, 672, 1344, 0xca539b65 +0, 18816, 18816, 672, 1344, 0x3bc4b8fb +0, 19488, 19488, 672, 1344, 0xc3453756 +0, 20160, 20160, 672, 1344, 0x1b283764 diff --git a/tests/ref/fate/sanyo-4bit b/tests/ref/fate/sanyo-4bit new file mode 100644 index 0000000000..8a475f006c --- /dev/null +++ b/tests/ref/fate/sanyo-4bit @@ -0,0 +1,46 @@ +#tb 0: 1/8000 +#media_type 0: audio +#codec_id 0: pcm_s16le +#sample_rate 0: 8000 +#channel_layout_name 0: mono +0, 0, 0, 504, 1008, 0x00560003 +0, 504, 504, 504, 1008, 0x081be750 +0, 1008, 1008, 504, 1008, 0x3ae9fbfc +0, 1512, 1512, 504, 1008, 0x5876f043 +0, 2016, 2016, 504, 1008, 0x9d451779 +0, 2520, 2520, 504, 1008, 0xabf514ab +0, 3024, 3024, 504, 1008, 0x66b00a87 +0, 3528, 3528, 504, 1008, 0xfc6dfeba +0, 4032, 4032, 504, 1008, 0x50c90d39 +0, 4536, 4536, 504, 1008, 0x302ff3f2 +0, 5040, 5040, 504, 1008, 0x9c6de6c6 +0, 5544, 5544, 504, 1008, 0x50aac56a +0, 6048, 6048, 504, 1008, 0x3211f67b +0, 6552, 6552, 504, 1008, 0xf412f994 +0, 7056, 7056, 504, 1008, 0xdcdd11ce +0, 7560, 7560, 504, 1008, 0xed11e0cf +0, 8064, 8064, 504, 1008, 0x844ef4c8 +0, 8568, 8568, 504, 1008, 0x0b13f41d +0, 9072, 9072, 504, 1008, 0xde81133d +0, 9576, 9576, 504, 1008, 0xefaafe3f +0, 10080, 10080, 504, 1008, 0xad7fe0ed +0, 10584, 10584, 504, 1008, 0x0bf1f2b3 +0, 11088, 11088, 504, 1008, 0xe064fa35 +0, 11592, 11592, 504, 1008, 0xd90decce +0, 12096, 12096, 504, 1008, 0x5817120e +0, 12600, 12600, 504, 1008, 0xd904f0a2 +0, 13104, 13104, 504, 1008, 0xe9f1f201 +0, 13608, 13608, 504, 1008, 0x577d1f7c +0, 14112, 14112, 504, 1008, 0x59f414f4 +0, 14616, 14616, 504, 1008, 0xe2241468 +0, 15120, 15120, 504, 1008, 0xc8aef989 +0, 15624, 15624, 504, 1008, 0xb61e09d3 +0, 16128, 16128, 504, 1008, 0xc065c80d +0, 16632, 16632, 504, 1008, 0xa171f7a4 +0, 17136, 17136, 504, 1008, 0x95b4e9e3 +0, 17640, 17640, 504, 1008, 0xae23fe53 +0, 18144, 18144, 504, 1008, 0x28bef0dc +0, 18648, 18648, 504, 1008, 0x2db67d74 +0, 19152, 19152, 504, 1008, 0x15b3c343 +0, 19656, 19656, 504, 1008, 0xb72de97b +0, 20160, 20160, 504, 1008, 0xc263e985 diff --git a/tests/ref/fate/sanyo-5bit b/tests/ref/fate/sanyo-5bit new file mode 100644 index 0000000000..c842d1684c --- /dev/null +++ b/tests/ref/fate/sanyo-5bit @@ -0,0 +1,57 @@ +#tb 0: 1/8000 +#media_type 0: audio +#codec_id 0: pcm_s16le +#sample_rate 0: 8000 +#channel_layout_name 0: mono +0, 0, 0, 403, 806, 0x00000000 +0, 403, 403, 403, 806, 0xdbdb2949 +0, 806, 806, 403, 806, 0x1bea8557 +0, 1209, 1209, 403, 806, 0x53179f26 +0, 1612, 1612, 403, 806, 0x43508ae1 +0, 2015, 2015, 403, 806, 0xab66a5fe +0, 2418, 2418, 403, 806, 0x1752947b +0, 2821, 2821, 403, 806, 0x4bc7ba09 +0, 3224, 3224, 403, 806, 0x0e8a82fd +0, 3627, 3627, 403, 806, 0xd9cca62d +0, 4030, 4030, 403, 806, 0xefc07dd9 +0, 4433, 4433, 403, 806, 0x57028697 +0, 4836, 4836, 403, 806, 0x6ba48daf +0, 5239, 5239, 403, 806, 0x73229202 +0, 5642, 5642, 403, 806, 0xaaa2a29f +0, 6045, 6045, 403, 806, 0x919c879a +0, 6448, 6448, 403, 806, 0x49476e74 +0, 6851, 6851, 403, 806, 0x7ceaa4be +0, 7254, 7254, 403, 806, 0x816ea842 +0, 7657, 7657, 403, 806, 0xda3b9271 +0, 8060, 8060, 403, 806, 0x2d8ab50b +0, 8463, 8463, 403, 806, 0x89539a5c +0, 8866, 8866, 403, 806, 0xdd018442 +0, 9269, 9269, 403, 806, 0x28d08ee1 +0, 9672, 9672, 403, 806, 0x3556b32c +0, 10075, 10075, 403, 806, 0x148287f0 +0, 10478, 10478, 403, 806, 0xd0e188fc +0, 10881, 10881, 403, 806, 0xbaae7f26 +0, 11284, 11284, 403, 806, 0xf6e48696 +0, 11687, 11687, 403, 806, 0x720b80d3 +0, 12090, 12090, 403, 806, 0xe7249e86 +0, 12493, 12493, 403, 806, 0xdc00a8d0 +0, 12896, 12896, 403, 806, 0x016e9187 +0, 13299, 13299, 403, 806, 0x762e93ab +0, 13702, 13702, 403, 806, 0xb8098d29 +0, 14105, 14105, 403, 806, 0x69bcbaa4 +0, 14508, 14508, 403, 806, 0xce90b32f +0, 14911, 14911, 403, 806, 0x962da543 +0, 15314, 15314, 403, 806, 0x18468c64 +0, 15717, 15717, 403, 806, 0x85a58af1 +0, 16120, 16120, 403, 806, 0xd71eb37c +0, 16523, 16523, 403, 806, 0x4c0e7d2c +0, 16926, 16926, 403, 806, 0x8d7294e7 +0, 17329, 17329, 403, 806, 0x3c9f9edc +0, 17732, 17732, 403, 806, 0xad7e7c70 +0, 18135, 18135, 403, 806, 0x5bfdab2b +0, 18538, 18538, 403, 806, 0xda3782f5 +0, 18941, 18941, 403, 806, 0xaeb8e751 +0, 19344, 19344, 403, 806, 0x2fc320cf +0, 19747, 19747, 403, 806, 0x30e720c6 +0, 20150, 20150, 403, 806, 0x1d8f20c8 +0, 20553, 20553, 403, 806, 0x2fc920cd -- 2.47.2 -- Peter (A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B) [-- Attachment #1.2: signature.asc --] [-- Type: application/pgp-signature, Size: 195 bytes --] [-- Attachment #2: Type: text/plain, Size: 251 bytes --] _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-06-25 8:03 UTC | newest] Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2025-06-25 8:02 [FFmpeg-devel] [PATCH 1/2] avcodec/adpcm: Sanyo LD-ADPCM decoder Peter Ross 2025-06-25 8:03 ` [FFmpeg-devel] [PATCH 2/2] tests/fate: Sanyo LD-ADPCM test case Peter Ross
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git