diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-08-07 22:45:46 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-08-07 22:45:46 +0200 |
commit | 7a72695c05f12f21a62dc99fa64d1726fc11b236 (patch) | |
tree | e8f1a2813c4cd1fd8bd0ac5f764c7fd676ab85af /libavcodec/adpcmenc.c | |
parent | 49440853d0c1e740daee0e2df1e65d5e67b1ad6b (diff) | |
parent | 36ef5369ee9b336febc2c270f8718cec4476cb85 (diff) | |
download | ffmpeg-7a72695c05f12f21a62dc99fa64d1726fc11b236.tar.gz |
Merge commit '36ef5369ee9b336febc2c270f8718cec4476cb85'
* commit '36ef5369ee9b336febc2c270f8718cec4476cb85':
Replace all CODEC_ID_* with AV_CODEC_ID_*
lavc: add AV prefix to codec ids.
Conflicts:
doc/APIchanges
doc/examples/decoding_encoding.c
doc/examples/muxing.c
ffmpeg.c
ffprobe.c
ffserver.c
libavcodec/8svx.c
libavcodec/avcodec.h
libavcodec/dnxhd_parser.c
libavcodec/dvdsubdec.c
libavcodec/error_resilience.c
libavcodec/h263dec.c
libavcodec/libvorbisenc.c
libavcodec/mjpeg_parser.c
libavcodec/mjpegenc.c
libavcodec/mpeg12.c
libavcodec/mpeg4videodec.c
libavcodec/mpegvideo.c
libavcodec/mpegvideo_enc.c
libavcodec/pcm.c
libavcodec/r210dec.c
libavcodec/utils.c
libavcodec/v210dec.c
libavcodec/version.h
libavdevice/alsa-audio-dec.c
libavdevice/bktr.c
libavdevice/v4l2.c
libavformat/asfdec.c
libavformat/asfenc.c
libavformat/avformat.h
libavformat/avidec.c
libavformat/caf.c
libavformat/electronicarts.c
libavformat/flacdec.c
libavformat/flvdec.c
libavformat/flvenc.c
libavformat/framecrcenc.c
libavformat/img2.c
libavformat/img2dec.c
libavformat/img2enc.c
libavformat/ipmovie.c
libavformat/isom.c
libavformat/matroska.c
libavformat/matroskadec.c
libavformat/matroskaenc.c
libavformat/mov.c
libavformat/movenc.c
libavformat/mp3dec.c
libavformat/mpeg.c
libavformat/mpegts.c
libavformat/mxf.c
libavformat/mxfdec.c
libavformat/mxfenc.c
libavformat/nsvdec.c
libavformat/nut.c
libavformat/oggenc.c
libavformat/pmpdec.c
libavformat/rawdec.c
libavformat/rawenc.c
libavformat/riff.c
libavformat/sdp.c
libavformat/utils.c
libavformat/vocenc.c
libavformat/wtv.c
libavformat/xmv.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/adpcmenc.c')
-rw-r--r-- | libavcodec/adpcmenc.c | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/libavcodec/adpcmenc.c b/libavcodec/adpcmenc.c index 4a0023231e..3af81cbc21 100644 --- a/libavcodec/adpcmenc.c +++ b/libavcodec/adpcmenc.c @@ -94,7 +94,7 @@ static av_cold int adpcm_encode_init(AVCodecContext *avctx) avctx->bits_per_coded_sample = av_get_bits_per_sample(avctx->codec->id); switch (avctx->codec->id) { - case CODEC_ID_ADPCM_IMA_WAV: + case AV_CODEC_ID_ADPCM_IMA_WAV: /* each 16 bits sample gives one nibble and we have 4 bytes per channel overhead */ avctx->frame_size = (BLKSIZE - 4 * avctx->channels) * 8 / @@ -104,11 +104,11 @@ static av_cold int adpcm_encode_init(AVCodecContext *avctx) avctx->block_align = BLKSIZE; avctx->bits_per_coded_sample = 4; break; - case CODEC_ID_ADPCM_IMA_QT: + case AV_CODEC_ID_ADPCM_IMA_QT: avctx->frame_size = 64; avctx->block_align = 34 * avctx->channels; break; - case CODEC_ID_ADPCM_MS: + case AV_CODEC_ID_ADPCM_MS: /* each 16 bits sample gives one nibble and we have 7 bytes per channel overhead */ avctx->frame_size = (BLKSIZE - 7 * avctx->channels) * 2 / avctx->channels + 2; @@ -125,11 +125,11 @@ static av_cold int adpcm_encode_init(AVCodecContext *avctx) bytestream_put_le16(&extradata, ff_adpcm_AdaptCoeff2[i] * 4); } break; - case CODEC_ID_ADPCM_YAMAHA: + case AV_CODEC_ID_ADPCM_YAMAHA: avctx->frame_size = BLKSIZE * 2 / avctx->channels; avctx->block_align = BLKSIZE; break; - case CODEC_ID_ADPCM_SWF: + case AV_CODEC_ID_ADPCM_SWF: if (avctx->sample_rate != 11025 && avctx->sample_rate != 22050 && avctx->sample_rate != 44100) { @@ -297,13 +297,13 @@ static void adpcm_compress_trellis(AVCodecContext *avctx, nodes[0]->step = c->step_index; nodes[0]->sample1 = c->sample1; nodes[0]->sample2 = c->sample2; - if (version == CODEC_ID_ADPCM_IMA_WAV || - version == CODEC_ID_ADPCM_IMA_QT || - version == CODEC_ID_ADPCM_SWF) + if (version == AV_CODEC_ID_ADPCM_IMA_WAV || + version == AV_CODEC_ID_ADPCM_IMA_QT || + version == AV_CODEC_ID_ADPCM_SWF) nodes[0]->sample1 = c->prev_sample; - if (version == CODEC_ID_ADPCM_MS) + if (version == AV_CODEC_ID_ADPCM_MS) nodes[0]->step = c->idelta; - if (version == CODEC_ID_ADPCM_YAMAHA) { + if (version == AV_CODEC_ID_ADPCM_YAMAHA) { if (c->step == 0) { nodes[0]->step = 127; nodes[0]->sample1 = 0; @@ -325,7 +325,7 @@ static void adpcm_compress_trellis(AVCodecContext *avctx, const int range = (j < frontier / 2) ? 1 : 0; const int step = nodes[j]->step; int nidx; - if (version == CODEC_ID_ADPCM_MS) { + if (version == AV_CODEC_ID_ADPCM_MS) { const int predictor = ((nodes[j]->sample1 * c->coeff1) + (nodes[j]->sample2 * c->coeff2)) / 64; const int div = (sample - predictor) / step; @@ -401,9 +401,9 @@ static void adpcm_compress_trellis(AVCodecContext *avctx, STORE_NODE(ms, FFMAX(16, (ff_adpcm_AdaptationTable[nibble] * step) >> 8)); } - } else if (version == CODEC_ID_ADPCM_IMA_WAV || - version == CODEC_ID_ADPCM_IMA_QT || - version == CODEC_ID_ADPCM_SWF) { + } else if (version == AV_CODEC_ID_ADPCM_IMA_WAV || + version == AV_CODEC_ID_ADPCM_IMA_QT || + version == AV_CODEC_ID_ADPCM_SWF) { #define LOOP_NODES(NAME, STEP_TABLE, STEP_INDEX)\ const int predictor = nodes[j]->sample1;\ const int div = (sample - predictor) * 4 / STEP_TABLE;\ @@ -422,7 +422,7 @@ static void adpcm_compress_trellis(AVCodecContext *avctx, } LOOP_NODES(ima, ff_adpcm_step_table[step], av_clip(step + ff_adpcm_index_table[nibble], 0, 88)); - } else { //CODEC_ID_ADPCM_YAMAHA + } else { //AV_CODEC_ID_ADPCM_YAMAHA LOOP_NODES(yamaha, step, av_clip((step * ff_adpcm_yamaha_indexscale[nibble]) >> 8, 127, 24567)); @@ -490,7 +490,7 @@ static int adpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, samples = (const int16_t *)frame->data[0]; st = avctx->channels == 2; - if (avctx->codec_id == CODEC_ID_ADPCM_SWF) + if (avctx->codec_id == AV_CODEC_ID_ADPCM_SWF) pkt_size = (2 + avctx->channels * (22 + 4 * (frame->nb_samples - 1)) + 7) / 8; else pkt_size = avctx->block_align; @@ -499,7 +499,7 @@ static int adpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, dst = avpkt->data; switch(avctx->codec->id) { - case CODEC_ID_ADPCM_IMA_WAV: + case AV_CODEC_ID_ADPCM_IMA_WAV: n = frame->nb_samples / 8; c->status[0].prev_sample = samples[0]; /* c->status[0].step_index = 0; @@ -564,7 +564,7 @@ static int adpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, } } break; - case CODEC_ID_ADPCM_IMA_QT: + case AV_CODEC_ID_ADPCM_IMA_QT: { int ch, i; PutBitContext pb; @@ -594,7 +594,7 @@ static int adpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, flush_put_bits(&pb); break; } - case CODEC_ID_ADPCM_SWF: + case AV_CODEC_ID_ADPCM_SWF: { int i; PutBitContext pb; @@ -638,7 +638,7 @@ static int adpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, flush_put_bits(&pb); break; } - case CODEC_ID_ADPCM_MS: + case AV_CODEC_ID_ADPCM_MS: for (i = 0; i < avctx->channels; i++) { int predictor = 0; *dst++ = predictor; @@ -682,7 +682,7 @@ static int adpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, } } break; - case CODEC_ID_ADPCM_YAMAHA: + case AV_CODEC_ID_ADPCM_YAMAHA: n = frame->nb_samples / 2; if (avctx->trellis > 0) { FF_ALLOC_OR_GOTO(avctx, buf, 2 * n * 2, error); @@ -734,8 +734,8 @@ AVCodec ff_ ## name_ ## _encoder = { \ .long_name = NULL_IF_CONFIG_SMALL(long_name_), \ } -ADPCM_ENCODER(CODEC_ID_ADPCM_IMA_QT, adpcm_ima_qt, "ADPCM IMA QuickTime"); -ADPCM_ENCODER(CODEC_ID_ADPCM_IMA_WAV, adpcm_ima_wav, "ADPCM IMA WAV"); -ADPCM_ENCODER(CODEC_ID_ADPCM_MS, adpcm_ms, "ADPCM Microsoft"); -ADPCM_ENCODER(CODEC_ID_ADPCM_SWF, adpcm_swf, "ADPCM Shockwave Flash"); -ADPCM_ENCODER(CODEC_ID_ADPCM_YAMAHA, adpcm_yamaha, "ADPCM Yamaha"); +ADPCM_ENCODER(AV_CODEC_ID_ADPCM_IMA_QT, adpcm_ima_qt, "ADPCM IMA QuickTime"); +ADPCM_ENCODER(AV_CODEC_ID_ADPCM_IMA_WAV, adpcm_ima_wav, "ADPCM IMA WAV"); +ADPCM_ENCODER(AV_CODEC_ID_ADPCM_MS, adpcm_ms, "ADPCM Microsoft"); +ADPCM_ENCODER(AV_CODEC_ID_ADPCM_SWF, adpcm_swf, "ADPCM Shockwave Flash"); +ADPCM_ENCODER(AV_CODEC_ID_ADPCM_YAMAHA, adpcm_yamaha, "ADPCM Yamaha"); |