Skip to content
Snippets Groups Projects
Commit 85579b63 authored by Justin Ruggles's avatar Justin Ruggles
Browse files

avcodec: remove the Zork PCM encoder.

The Zork PCM decoder does not decode the 1 sample we have correctly, therefore
the encoder based on the decoder is also incorrect. There is no good reason to
keep the encoder.
parent 67a3b67c
No related branches found
No related tags found
No related merge requests found
......@@ -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.
......
......@@ -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
......
......@@ -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);
......
......@@ -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");
......@@ -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
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment