diff --git a/doc/general.texi b/doc/general.texi index b1c2534be0..24869c3208 100644 --- a/doc/general.texi +++ b/doc/general.texi @@ -666,7 +666,7 @@ following image formats are supported: @item PCM unsigned 24-bit little-endian @tab X @tab X @item PCM unsigned 32-bit big-endian @tab X @tab X @item PCM unsigned 32-bit little-endian @tab X @tab X -@item PCM Zork @tab X @tab X +@item PCM Zork @tab @tab X @item QCELP / PureVoice @tab @tab X @item QDesign Music Codec 2 @tab @tab X @tab There are still some distortions. diff --git a/libavcodec/Makefile b/libavcodec/Makefile index bd4275a1f4..9dfde53eb7 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -483,7 +483,6 @@ OBJS-$(CONFIG_PCM_U32BE_ENCODER) += pcm.o OBJS-$(CONFIG_PCM_U32LE_DECODER) += pcm.o OBJS-$(CONFIG_PCM_U32LE_ENCODER) += pcm.o OBJS-$(CONFIG_PCM_ZORK_DECODER) += pcm.o -OBJS-$(CONFIG_PCM_ZORK_ENCODER) += pcm.o OBJS-$(CONFIG_ADPCM_4XM_DECODER) += adpcm.o adpcm_data.o OBJS-$(CONFIG_ADPCM_ADX_DECODER) += adxdec.o diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c index 64669b7c8f..107ec310e0 100644 --- a/libavcodec/allcodecs.c +++ b/libavcodec/allcodecs.c @@ -313,7 +313,7 @@ void avcodec_register_all(void) REGISTER_ENCDEC (PCM_U24LE, pcm_u24le); REGISTER_ENCDEC (PCM_U32BE, pcm_u32be); REGISTER_ENCDEC (PCM_U32LE, pcm_u32le); - REGISTER_ENCDEC (PCM_ZORK , pcm_zork); + REGISTER_DECODER (PCM_ZORK , pcm_zork); /* DPCM codecs */ REGISTER_DECODER (INTERPLAY_DPCM, interplay_dpcm); diff --git a/libavcodec/pcm.c b/libavcodec/pcm.c index ec2660cbd3..ca3926402a 100644 --- a/libavcodec/pcm.c +++ b/libavcodec/pcm.c @@ -171,15 +171,6 @@ static int pcm_encode_frame(AVCodecContext *avctx, memcpy(dst, samples, n*sample_size); dst += n*sample_size; break; - case CODEC_ID_PCM_ZORK: - srcu8 = data; - for (; n > 0; n--) { - v = *srcu8++; - if (v < 128) - v = 128 - v; - *dst++ = v; - } - break; case CODEC_ID_PCM_ALAW: for(;n>0;n--) { v = *samples++; @@ -518,4 +509,4 @@ PCM_CODEC (CODEC_ID_PCM_U24BE, AV_SAMPLE_FMT_S32, pcm_u24be, "PCM unsigned 24-b PCM_CODEC (CODEC_ID_PCM_U24LE, AV_SAMPLE_FMT_S32, pcm_u24le, "PCM unsigned 24-bit little-endian"); PCM_CODEC (CODEC_ID_PCM_U32BE, AV_SAMPLE_FMT_S32, pcm_u32be, "PCM unsigned 32-bit big-endian"); PCM_CODEC (CODEC_ID_PCM_U32LE, AV_SAMPLE_FMT_S32, pcm_u32le, "PCM unsigned 32-bit little-endian"); -PCM_CODEC (CODEC_ID_PCM_ZORK, AV_SAMPLE_FMT_U8, pcm_zork, "PCM Zork"); +PCM_DECODER(CODEC_ID_PCM_ZORK, AV_SAMPLE_FMT_U8, pcm_zork, "PCM Zork"); diff --git a/tests/codec-regression.sh b/tests/codec-regression.sh index cafa84779f..38d641a197 100755 --- a/tests/codec-regression.sh +++ b/tests/codec-regression.sh @@ -357,6 +357,5 @@ do_audio_enc_dec au flt pcm_f32be do_audio_enc_dec wav flt pcm_f32le do_audio_enc_dec au dbl pcm_f64be do_audio_enc_dec wav dbl pcm_f64le -do_audio_enc_dec wav s16 pcm_zork do_audio_enc_dec 302 s16 pcm_s24daud "-ac 6 -ar 96000" fi diff --git a/tests/ref/acodec/pcm b/tests/ref/acodec/pcm index da64e62a6f..1c710b8c97 100644 --- a/tests/ref/acodec/pcm +++ b/tests/ref/acodec/pcm @@ -62,10 +62,6 @@ ba17c6d1a270e1333e981f239bf7eb45 *./tests/data/acodec/pcm_f64le.wav 4233680 ./tests/data/acodec/pcm_f64le.wav 64151e4bcc2b717aa5a8454d424d6a1f *./tests/data/pcm.acodec.out.wav stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400 -ebd38ed390ebdefe0bdf00d21bf12c6b *./tests/data/acodec/pcm_zork.wav -529258 ./tests/data/acodec/pcm_zork.wav -7b02646acdd063650bb3ebc444543ace *./tests/data/pcm.acodec.out.wav -stddev: 633.11 PSNR: 40.30 MAXDIFF:32768 bytes: 1058400/ 1058400 8168a5c1343553ef027541830f2cb879 *./tests/data/acodec/pcm_s24daud.302 10368730 ./tests/data/acodec/pcm_s24daud.302 f552afadfdfcd6348a07095da6382de5 *./tests/data/pcm.acodec.out.wav