History

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.

Justin Ruggles committed 15 years ago

Commit 85579b61 parent 67a3b676 files · +3 −18Browse files

Unified · Split

6 files
  1. doc/general.texi +1 −1
  2. libavcodec/Makefile +0 −1
  3. libavcodec/allcodecs.c +1 −1
  4. libavcodec/pcm.c +1 −10
  5. tests/codec-regression.sh +0 −1
  6. tests/ref/acodec/pcm +0 −4
doc/general.texi+1−1
@@ -666,7 +666,7 @@ following image formats are supported: · 665 unmodified lines
666666 @item PCM unsigned 24-bit little-endian @tab X @tab X
667667 @item PCM unsigned 32-bit big-endian @tab X @tab X
668668 @item PCM unsigned 32-bit little-endian @tab X @tab X
669−@item PCM Zork @tab X @tab X
669+@item PCM Zork @tab @tab X
670670 @item QCELP / PureVoice @tab @tab X
671671 @item QDesign Music Codec 2 @tab @tab X
672672 @tab There are still some distortions.
libavcodec/Makefile+0−1
@@ -483,7 +483,6 @@ OBJS-$(CONFIG_PCM_U32BE_ENCODER) += pcm.o · 482 unmodified lines
483483 OBJS-$(CONFIG_PCM_U32LE_DECODER) += pcm.o
484484 OBJS-$(CONFIG_PCM_U32LE_ENCODER) += pcm.o
485485 OBJS-$(CONFIG_PCM_ZORK_DECODER) += pcm.o
486−OBJS-$(CONFIG_PCM_ZORK_ENCODER) += pcm.o
487486
488487 OBJS-$(CONFIG_ADPCM_4XM_DECODER) += adpcm.o adpcm_data.o
489488 OBJS-$(CONFIG_ADPCM_ADX_DECODER) += adxdec.o
libavcodec/allcodecs.c+1−1
@@ -313,7 +313,7 @@ void avcodec_register_all(void) · 312 unmodified lines
313313 REGISTER_ENCDEC (PCM_U24LE, pcm_u24le);
314314 REGISTER_ENCDEC (PCM_U32BE, pcm_u32be);
315315 REGISTER_ENCDEC (PCM_U32LE, pcm_u32le);
316− REGISTER_ENCDEC (PCM_ZORK , pcm_zork);
316+ REGISTER_DECODER (PCM_ZORK , pcm_zork);
317317
318318 /* DPCM codecs */
319319 REGISTER_DECODER (INTERPLAY_DPCM, interplay_dpcm);
libavcodec/pcm.c+1−10
@@ -171,15 +171,6 @@ static int pcm_encode_frame(AVCodecContext *avctx, · 170 unmodified lines
171171 memcpy(dst, samples, n*sample_size);
172172 dst += n*sample_size;
173173 break;
174− case CODEC_ID_PCM_ZORK:
175− srcu8 = data;
176− for (; n > 0; n--) {
177− v = *srcu8++;
178− if (v < 128)
179− v = 128 - v;
180− *dst++ = v;
181− }
182− break;
183174 case CODEC_ID_PCM_ALAW:
184175 for(;n>0;n--) {
185176 v = *samples++;
@@ -518,4 +509,4 @@ PCM_CODEC (CODEC_ID_PCM_U24BE, AV_SAMPLE_FMT_S32, pcm_u24be, "PCM unsigned 24-b · 332 unmodified lines
518509 PCM_CODEC (CODEC_ID_PCM_U24LE, AV_SAMPLE_FMT_S32, pcm_u24le, "PCM unsigned 24-bit little-endian");
519510 PCM_CODEC (CODEC_ID_PCM_U32BE, AV_SAMPLE_FMT_S32, pcm_u32be, "PCM unsigned 32-bit big-endian");
520511 PCM_CODEC (CODEC_ID_PCM_U32LE, AV_SAMPLE_FMT_S32, pcm_u32le, "PCM unsigned 32-bit little-endian");
521−PCM_CODEC (CODEC_ID_PCM_ZORK, AV_SAMPLE_FMT_U8, pcm_zork, "PCM Zork");
512+PCM_DECODER(CODEC_ID_PCM_ZORK, AV_SAMPLE_FMT_U8, pcm_zork, "PCM Zork");
tests/codec-regression.sh+0−1
@@ -357,6 +357,5 @@ do_audio_enc_dec au flt pcm_f32be · 356 unmodified lines
357357 do_audio_enc_dec wav flt pcm_f32le
358358 do_audio_enc_dec au dbl pcm_f64be
359359 do_audio_enc_dec wav dbl pcm_f64le
360−do_audio_enc_dec wav s16 pcm_zork
361360 do_audio_enc_dec 302 s16 pcm_s24daud "-ac 6 -ar 96000"
362361 fi
tests/ref/acodec/pcm+0−4
@@ -62,10 +62,6 @@ ba17c6d1a270e1333e981f239bf7eb45 *./tests/data/acodec/pcm_f64le.wav · 61 unmodified lines
6262 4233680 ./tests/data/acodec/pcm_f64le.wav
6363 64151e4bcc2b717aa5a8454d424d6a1f *./tests/data/pcm.acodec.out.wav
6464 stddev: 0.00 PSNR:999.99 MAXDIFF: 0 bytes: 1058400/ 1058400
65−ebd38ed390ebdefe0bdf00d21bf12c6b *./tests/data/acodec/pcm_zork.wav
66−529258 ./tests/data/acodec/pcm_zork.wav
67−7b02646acdd063650bb3ebc444543ace *./tests/data/pcm.acodec.out.wav
68−stddev: 633.11 PSNR: 40.30 MAXDIFF:32768 bytes: 1058400/ 1058400
6965 8168a5c1343553ef027541830f2cb879 *./tests/data/acodec/pcm_s24daud.302
7066 10368730 ./tests/data/acodec/pcm_s24daud.302
7167 f552afadfdfcd6348a07095da6382de5 *./tests/data/pcm.acodec.out.wav

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t