diff options
Diffstat (limited to 'libavcodec')
340 files changed, 1083 insertions, 1083 deletions
diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c index 7869264ae1..2b59c6b19d 100644 --- a/libavcodec/4xm.c +++ b/libavcodec/4xm.c @@ -931,7 +931,7 @@ static av_cold int decode_end(AVCodecContext *avctx) AVCodec ff_fourxm_decoder = { .name = "4xm", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_4XM, + .id = AV_CODEC_ID_4XM, .priv_data_size = sizeof(FourXContext), .init = decode_init, .close = decode_end, diff --git a/libavcodec/8bps.c b/libavcodec/8bps.c index e1c03f9b96..a686b728b9 100644 --- a/libavcodec/8bps.c +++ b/libavcodec/8bps.c @@ -226,7 +226,7 @@ static av_cold int decode_end(AVCodecContext *avctx) AVCodec ff_eightbps_decoder = { .name = "8bps", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_8BPS, + .id = AV_CODEC_ID_8BPS, .priv_data_size = sizeof(EightBpsContext), .init = decode_init, .close = decode_end, diff --git a/libavcodec/8svx.c b/libavcodec/8svx.c index 4f11b8bec4..3c0c0911a5 100644 --- a/libavcodec/8svx.c +++ b/libavcodec/8svx.c @@ -91,7 +91,7 @@ static int eightsvx_decode_frame(AVCodecContext *avctx, void *data, int buf_size; uint8_t *out_data; int ret; - int is_compr = (avctx->codec_id != CODEC_ID_PCM_S8_PLANAR); + int is_compr = (avctx->codec_id != AV_CODEC_ID_PCM_S8_PLANAR); /* for the first packet, copy data to buffer */ if (avpkt->data) { @@ -180,13 +180,13 @@ static av_cold int eightsvx_decode_init(AVCodecContext *avctx) } switch(avctx->codec->id) { - case CODEC_ID_8SVX_FIB: + case AV_CODEC_ID_8SVX_FIB: esc->table = fibonacci; break; - case CODEC_ID_8SVX_EXP: + case AV_CODEC_ID_8SVX_EXP: esc->table = exponential; break; - case CODEC_ID_PCM_S8_PLANAR: + case AV_CODEC_ID_PCM_S8_PLANAR: break; default: return -1; @@ -212,7 +212,7 @@ static av_cold int eightsvx_decode_close(AVCodecContext *avctx) AVCodec ff_eightsvx_fib_decoder = { .name = "8svx_fib", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_8SVX_FIB, + .id = AV_CODEC_ID_8SVX_FIB, .priv_data_size = sizeof (EightSvxContext), .init = eightsvx_decode_init, .close = eightsvx_decode_close, @@ -224,7 +224,7 @@ AVCodec ff_eightsvx_fib_decoder = { AVCodec ff_eightsvx_exp_decoder = { .name = "8svx_exp", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_8SVX_EXP, + .id = AV_CODEC_ID_8SVX_EXP, .priv_data_size = sizeof (EightSvxContext), .init = eightsvx_decode_init, .close = eightsvx_decode_close, @@ -236,7 +236,7 @@ AVCodec ff_eightsvx_exp_decoder = { AVCodec ff_pcm_s8_planar_decoder = { .name = "pcm_s8_planar", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_PCM_S8_PLANAR, + .id = AV_CODEC_ID_PCM_S8_PLANAR, .priv_data_size = sizeof(EightSvxContext), .init = eightsvx_decode_init, .close = eightsvx_decode_close, diff --git a/libavcodec/a64multienc.c b/libavcodec/a64multienc.c index 363b80c3ac..4e604dc8bc 100644 --- a/libavcodec/a64multienc.c +++ b/libavcodec/a64multienc.c @@ -187,7 +187,7 @@ static av_cold int a64multi_init_encoder(AVCodecContext *avctx) av_log(avctx, AV_LOG_INFO, "charset lifetime set to %d frame(s)\n", c->mc_lifetime); c->mc_frame_counter = 0; - c->mc_use_5col = avctx->codec->id == CODEC_ID_A64_MULTI5; + c->mc_use_5col = avctx->codec->id == AV_CODEC_ID_A64_MULTI5; c->mc_pal_size = 4 + c->mc_use_5col; /* precalc luma values for later use */ @@ -373,7 +373,7 @@ static int a64multi_encode_frame(AVCodecContext *avctx, AVPacket *pkt, AVCodec ff_a64multi_encoder = { .name = "a64multi", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_A64_MULTI, + .id = AV_CODEC_ID_A64_MULTI, .priv_data_size = sizeof(A64Context), .init = a64multi_init_encoder, .encode2 = a64multi_encode_frame, @@ -386,7 +386,7 @@ AVCodec ff_a64multi_encoder = { AVCodec ff_a64multi5_encoder = { .name = "a64multi5", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_A64_MULTI5, + .id = AV_CODEC_ID_A64_MULTI5, .priv_data_size = sizeof(A64Context), .init = a64multi_init_encoder, .encode2 = a64multi_encode_frame, diff --git a/libavcodec/aac_ac3_parser.c b/libavcodec/aac_ac3_parser.c index 8132ce899a..fc51612fe5 100644 --- a/libavcodec/aac_ac3_parser.c +++ b/libavcodec/aac_ac3_parser.c @@ -78,7 +78,7 @@ get_next: and total number of samples found in an AAC ADTS header are not reliable. Bit rate is still accurate because the total frame duration in seconds is still correct (as is the number of bits in the frame). */ - if (avctx->codec_id != CODEC_ID_AAC) { + if (avctx->codec_id != AV_CODEC_ID_AAC) { avctx->sample_rate = s->sample_rate; /* allow downmixing to stereo (or mono for AC-3) */ @@ -86,8 +86,8 @@ get_next: avctx->request_channels < s->channels && (avctx->request_channels <= 2 || (avctx->request_channels == 1 && - (avctx->codec_id == CODEC_ID_AC3 || - avctx->codec_id == CODEC_ID_EAC3)))) { + (avctx->codec_id == AV_CODEC_ID_AC3 || + avctx->codec_id == AV_CODEC_ID_EAC3)))) { avctx->channels = avctx->request_channels; } else { avctx->channels = s->channels; diff --git a/libavcodec/aac_ac3_parser.h b/libavcodec/aac_ac3_parser.h index a14fce5190..90b49c5a59 100644 --- a/libavcodec/aac_ac3_parser.h +++ b/libavcodec/aac_ac3_parser.h @@ -55,7 +55,7 @@ typedef struct AACAC3ParseContext { uint64_t state; int need_next_header; - enum CodecID codec_id; + enum AVCodecID codec_id; } AACAC3ParseContext; int ff_aac_ac3_parse(AVCodecParserContext *s1, diff --git a/libavcodec/aac_parser.c b/libavcodec/aac_parser.c index f0914e60c0..fdaa5f8144 100644 --- a/libavcodec/aac_parser.c +++ b/libavcodec/aac_parser.c @@ -61,7 +61,7 @@ static av_cold int aac_parse_init(AVCodecParserContext *s1) AVCodecParser ff_aac_parser = { - .codec_ids = { CODEC_ID_AAC }, + .codec_ids = { AV_CODEC_ID_AAC }, .priv_data_size = sizeof(AACAC3ParseContext), .parser_init = aac_parse_init, .parser_parse = ff_aac_ac3_parse, diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c index c57304447c..958c9d2f97 100644 --- a/libavcodec/aacdec.c +++ b/libavcodec/aacdec.c @@ -2841,7 +2841,7 @@ static av_cold int latm_decode_init(AVCodecContext *avctx) AVCodec ff_aac_decoder = { .name = "aac", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_AAC, + .id = AV_CODEC_ID_AAC, .priv_data_size = sizeof(AACContext), .init = aac_decode_init, .close = aac_decode_close, @@ -2862,7 +2862,7 @@ AVCodec ff_aac_decoder = { AVCodec ff_aac_latm_decoder = { .name = "aac_latm", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_AAC_LATM, + .id = AV_CODEC_ID_AAC_LATM, .priv_data_size = sizeof(struct LATMContext), .init = latm_decode_init, .close = aac_decode_close, diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c index f7360a1785..8d36b317c4 100644 --- a/libavcodec/aacenc.c +++ b/libavcodec/aacenc.c @@ -819,7 +819,7 @@ static const AVClass aacenc_class = { AVCodec ff_aac_encoder = { .name = "aac", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_AAC, + .id = AV_CODEC_ID_AAC, .priv_data_size = sizeof(AACEncContext), .init = aac_encode_init, .encode2 = aac_encode_frame, diff --git a/libavcodec/aasc.c b/libavcodec/aasc.c index edca24c08a..f27f44dd51 100644 --- a/libavcodec/aasc.c +++ b/libavcodec/aasc.c @@ -106,7 +106,7 @@ static av_cold int aasc_decode_end(AVCodecContext *avctx) AVCodec ff_aasc_decoder = { .name = "aasc", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_AASC, + .id = AV_CODEC_ID_AASC, .priv_data_size = sizeof(AascContext), .init = aasc_decode_init, .close = aasc_decode_end, diff --git a/libavcodec/ac3_parser.c b/libavcodec/ac3_parser.c index d9ba1fd70b..9786da3d05 100644 --- a/libavcodec/ac3_parser.c +++ b/libavcodec/ac3_parser.c @@ -167,9 +167,9 @@ static int ac3_sync(uint64_t state, AACAC3ParseContext *hdr_info, if (hdr.bitstream_mode == 0x7 && hdr.channels > 1) hdr_info->service_type = AV_AUDIO_SERVICE_TYPE_KARAOKE; if(hdr.bitstream_id>10) - hdr_info->codec_id = CODEC_ID_EAC3; - else if (hdr_info->codec_id == CODEC_ID_NONE) - hdr_info->codec_id = CODEC_ID_AC3; + hdr_info->codec_id = AV_CODEC_ID_EAC3; + else if (hdr_info->codec_id == AV_CODEC_ID_NONE) + hdr_info->codec_id = AV_CODEC_ID_AC3; *need_next_header = (hdr.frame_type != EAC3_FRAME_TYPE_AC3_CONVERT); *new_frame_start = (hdr.frame_type != EAC3_FRAME_TYPE_DEPENDENT); @@ -186,7 +186,7 @@ static av_cold int ac3_parse_init(AVCodecParserContext *s1) AVCodecParser ff_ac3_parser = { - .codec_ids = { CODEC_ID_AC3, CODEC_ID_EAC3 }, + .codec_ids = { AV_CODEC_ID_AC3, AV_CODEC_ID_EAC3 }, .priv_data_size = sizeof(AACAC3ParseContext), .parser_init = ac3_parse_init, .parser_parse = ff_aac_ac3_parse, diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c index 3056403dcf..4dd4ef75c4 100644 --- a/libavcodec/ac3dec.c +++ b/libavcodec/ac3dec.c @@ -1460,7 +1460,7 @@ static const AVClass ac3_decoder_class = { AVCodec ff_ac3_decoder = { .name = "ac3", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_AC3, + .id = AV_CODEC_ID_AC3, .priv_data_size = sizeof (AC3DecodeContext), .init = ac3_decode_init, .close = ac3_decode_end, @@ -1484,7 +1484,7 @@ static const AVClass eac3_decoder_class = { AVCodec ff_eac3_decoder = { .name = "eac3", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_EAC3, + .id = AV_CODEC_ID_EAC3, .priv_data_size = sizeof (AC3DecodeContext), .init = ac3_decode_init, .close = ac3_decode_end, diff --git a/libavcodec/ac3enc.c b/libavcodec/ac3enc.c index 50d7f704fa..5102e30648 100644 --- a/libavcodec/ac3enc.c +++ b/libavcodec/ac3enc.c @@ -2430,7 +2430,7 @@ av_cold int ff_ac3_encode_init(AVCodecContext *avctx) s->avctx = avctx; - s->eac3 = avctx->codec_id == CODEC_ID_EAC3; + s->eac3 = avctx->codec_id == AV_CODEC_ID_EAC3; ff_ac3_common_init(); diff --git a/libavcodec/ac3enc_fixed.c b/libavcodec/ac3enc_fixed.c index 09a011cbf7..1430c3352c 100644 --- a/libavcodec/ac3enc_fixed.c +++ b/libavcodec/ac3enc_fixed.c @@ -144,7 +144,7 @@ static av_cold int ac3_fixed_encode_init(AVCodecContext *avctx) AVCodec ff_ac3_fixed_encoder = { .name = "ac3_fixed", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_AC3, + .id = AV_CODEC_ID_AC3, .priv_data_size = sizeof(AC3EncodeContext), .init = ac3_fixed_encode_init, .encode2 = ff_ac3_fixed_encode_frame, diff --git a/libavcodec/ac3enc_float.c b/libavcodec/ac3enc_float.c index 9eff5c5b6c..45645da655 100644 --- a/libavcodec/ac3enc_float.c +++ b/libavcodec/ac3enc_float.c @@ -143,7 +143,7 @@ static CoefType calc_cpl_coord(CoefSumType energy_ch, CoefSumType energy_cpl) AVCodec ff_ac3_encoder = { .name = "ac3", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_AC3, + .id = AV_CODEC_ID_AC3, .priv_data_size = sizeof(AC3EncodeContext), .init = ff_ac3_encode_init, .encode2 = ff_ac3_float_encode_frame, diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c index 8170e7f416..19772b0cf7 100644 --- a/libavcodec/adpcm.c +++ b/libavcodec/adpcm.c @@ -96,13 +96,13 @@ static av_cold int adpcm_decode_init(AVCodecContext * avctx) unsigned int max_channels = 2; switch(avctx->codec->id) { - case CODEC_ID_ADPCM_EA: + case AV_CODEC_ID_ADPCM_EA: min_channels = 2; break; - case CODEC_ID_ADPCM_EA_R1: - case CODEC_ID_ADPCM_EA_R2: - case CODEC_ID_ADPCM_EA_R3: - case CODEC_ID_ADPCM_EA_XAS: + case AV_CODEC_ID_ADPCM_EA_R1: + case AV_CODEC_ID_ADPCM_EA_R2: + case AV_CODEC_ID_ADPCM_EA_R3: + case AV_CODEC_ID_ADPCM_EA_XAS: max_channels = 6; break; } @@ -112,22 +112,22 @@ static av_cold int adpcm_decode_init(AVCodecContext * avctx) } switch(avctx->codec->id) { - case CODEC_ID_ADPCM_CT: + case AV_CODEC_ID_ADPCM_CT: c->status[0].step = c->status[1].step = 511; break; - case CODEC_ID_ADPCM_IMA_WAV: + case AV_CODEC_ID_ADPCM_IMA_WAV: if (avctx->bits_per_coded_sample != 4) { av_log(avctx, AV_LOG_ERROR, "Only 4-bit ADPCM IMA WAV files are supported\n"); return -1; } break; - case CODEC_ID_ADPCM_IMA_APC: + case AV_CODEC_ID_ADPCM_IMA_APC: if (avctx->extradata && avctx->extradata_size >= 8) { c->status[0].predictor = AV_RL32(avctx->extradata); c->status[1].predictor = AV_RL32(avctx->extradata + 4); } break; - case CODEC_ID_ADPCM_IMA_WS: + case AV_CODEC_ID_ADPCM_IMA_WS: if (avctx->extradata && avctx->extradata_size >= 2) c->vqa_version = AV_RL16(avctx->extradata); break; @@ -423,22 +423,22 @@ static int get_nb_samples(AVCodecContext *avctx, GetByteContext *gb, switch (avctx->codec->id) { /* constant, only check buf_size */ - case CODEC_ID_ADPCM_EA_XAS: + case AV_CODEC_ID_ADPCM_EA_XAS: if (buf_size < 76 * ch) return 0; nb_samples = 128; break; - case CODEC_ID_ADPCM_IMA_QT: + case AV_CODEC_ID_ADPCM_IMA_QT: if (buf_size < 34 * ch) return 0; nb_samples = 64; break; /* simple 4-bit adpcm */ - case CODEC_ID_ADPCM_CT: - case CODEC_ID_ADPCM_IMA_APC: - case CODEC_ID_ADPCM_IMA_EA_SEAD: - case CODEC_ID_ADPCM_IMA_WS: - case CODEC_ID_ADPCM_YAMAHA: + case AV_CODEC_ID_ADPCM_CT: + case AV_CODEC_ID_ADPCM_IMA_APC: + case AV_CODEC_ID_ADPCM_IMA_EA_SEAD: + case AV_CODEC_ID_ADPCM_IMA_WS: + case AV_CODEC_ID_ADPCM_YAMAHA: nb_samples = buf_size * 2 / ch; break; } @@ -448,46 +448,46 @@ static int get_nb_samples(AVCodecContext *avctx, GetByteContext *gb, /* simple 4-bit adpcm, with header */ header_size = 0; switch (avctx->codec->id) { - case CODEC_ID_ADPCM_4XM: - case CODEC_ID_ADPCM_IMA_ISS: header_size = 4 * ch; break; - case CODEC_ID_ADPCM_IMA_AMV: header_size = 8; break; - case CODEC_ID_ADPCM_IMA_SMJPEG: header_size = 4; break; + case AV_CODEC_ID_ADPCM_4XM: + case AV_CODEC_ID_ADPCM_IMA_ISS: header_size = 4 * ch; break; + case AV_CODEC_ID_ADPCM_IMA_AMV: header_size = 8; break; + case AV_CODEC_ID_ADPCM_IMA_SMJPEG: header_size = 4; break; } if (header_size > 0) return (buf_size - header_size) * 2 / ch; /* more complex formats */ switch (avctx->codec->id) { - case CODEC_ID_ADPCM_EA: + case AV_CODEC_ID_ADPCM_EA: has_coded_samples = 1; *coded_samples = bytestream2_get_le32(gb); *coded_samples -= *coded_samples % 28; nb_samples = (buf_size - 12) / 30 * 28; break; - case CODEC_ID_ADPCM_IMA_EA_EACS: + case AV_CODEC_ID_ADPCM_IMA_EA_EACS: has_coded_samples = 1; *coded_samples = bytestream2_get_le32(gb); nb_samples = (buf_size - (4 + 8 * ch)) * 2 / ch; break; - case CODEC_ID_ADPCM_EA_MAXIS_XA: + case AV_CODEC_ID_ADPCM_EA_MAXIS_XA: nb_samples = (buf_size - ch) / ch * 2; break; - case CODEC_ID_ADPCM_EA_R1: - case CODEC_ID_ADPCM_EA_R2: - case CODEC_ID_ADPCM_EA_R3: + case AV_CODEC_ID_ADPCM_EA_R1: + case AV_CODEC_ID_ADPCM_EA_R2: + case AV_CODEC_ID_ADPCM_EA_R3: /* maximum number of samples */ /* has internal offsets and a per-frame switch to signal raw 16-bit */ has_coded_samples = 1; switch (avctx->codec->id) { - case CODEC_ID_ADPCM_EA_R1: + case AV_CODEC_ID_ADPCM_EA_R1: header_size = 4 + 9 * ch; *coded_samples = bytestream2_get_le32(gb); break; - case CODEC_ID_ADPCM_EA_R2: + case AV_CODEC_ID_ADPCM_EA_R2: header_size = 4 + 5 * ch; *coded_samples = bytestream2_get_le32(gb); break; - case CODEC_ID_ADPCM_EA_R3: + case AV_CODEC_ID_ADPCM_EA_R3: header_size = 4 + 5 * ch; *coded_samples = bytestream2_get_be32(gb); break; @@ -496,35 +496,35 @@ static int get_nb_samples(AVCodecContext *avctx, GetByteContext *gb, nb_samples = (buf_size - header_size) * 2 / ch; nb_samples -= nb_samples % 28; break; - case CODEC_ID_ADPCM_IMA_DK3: + case AV_CODEC_ID_ADPCM_IMA_DK3: if (avctx->block_align > 0) buf_size = FFMIN(buf_size, avctx->block_align); nb_samples = ((buf_size - 16) * 2 / 3 * 4) / ch; break; - case CODEC_ID_ADPCM_IMA_DK4: + case AV_CODEC_ID_ADPCM_IMA_DK4: if (avctx->block_align > 0) buf_size = FFMIN(buf_size, avctx->block_align); nb_samples = 1 + (buf_size - 4 * ch) * 2 / ch; break; - case CODEC_ID_ADPCM_IMA_WAV: + case AV_CODEC_ID_ADPCM_IMA_WAV: if (avctx->block_align > 0) buf_size = FFMIN(buf_size, avctx->block_align); nb_samples = 1 + (buf_size - 4 * ch) / (4 * ch) * 8; break; - case CODEC_ID_ADPCM_MS: + case AV_CODEC_ID_ADPCM_MS: if (avctx->block_align > 0) buf_size = FFMIN(buf_size, avctx->block_align); nb_samples = 2 + (buf_size - 7 * ch) * 2 / ch; break; - case CODEC_ID_ADPCM_SBPRO_2: - case CODEC_ID_ADPCM_SBPRO_3: - case CODEC_ID_ADPCM_SBPRO_4: + case AV_CODEC_ID_ADPCM_SBPRO_2: + case AV_CODEC_ID_ADPCM_SBPRO_3: + case AV_CODEC_ID_ADPCM_SBPRO_4: { int samples_per_byte; switch (avctx->codec->id) { - case CODEC_ID_ADPCM_SBPRO_2: samples_per_byte = 4; break; - case CODEC_ID_ADPCM_SBPRO_3: samples_per_byte = 3; break; - case CODEC_ID_ADPCM_SBPRO_4: samples_per_byte = 2; break; + case AV_CODEC_ID_ADPCM_SBPRO_2: samples_per_byte = 4; break; + case AV_CODEC_ID_ADPCM_SBPRO_3: samples_per_byte = 3; break; + case AV_CODEC_ID_ADPCM_SBPRO_4: samples_per_byte = 2; break; } if (!s->status[0].step_index) { nb_samples++; @@ -533,7 +533,7 @@ static int get_nb_samples(AVCodecContext *avctx, GetByteContext *gb, nb_samples += buf_size * samples_per_byte / ch; break; } - case CODEC_ID_ADPCM_SWF: + case AV_CODEC_ID_ADPCM_SWF: { int buf_bits = buf_size * 8 - 2; int nbits = (bytestream2_get_byte(gb) >> 6) + 2; @@ -546,14 +546,14 @@ static int get_nb_samples(AVCodecContext *avctx, GetByteContext *gb, nb_samples += 1 + (bits_left - block_hdr_size) / (nbits * ch); break; } - case CODEC_ID_ADPCM_THP: + case AV_CODEC_ID_ADPCM_THP: has_coded_samples = 1; bytestream2_skip(gb, 4); // channel size *coded_samples = bytestream2_get_be32(gb); *coded_samples -= *coded_samples % 14; nb_samples = (buf_size - 80) / (8 * ch) * 14; break; - case CODEC_ID_ADPCM_XA: + case AV_CODEC_ID_ADPCM_XA: nb_samples = (buf_size / 128) * 224 / ch; break; } @@ -605,7 +605,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, st = avctx->channels == 2 ? 1 : 0; switch(avctx->codec->id) { - case CODEC_ID_ADPCM_IMA_QT: + case AV_CODEC_ID_ADPCM_IMA_QT: /* In QuickTime, IMA is encoded by chunks of 34 bytes (=64 samples). Channel data is interleaved per-chunk. */ for (channel = 0; channel < avctx->channels; channel++) { @@ -648,7 +648,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, } } break; - case CODEC_ID_ADPCM_IMA_WAV: + case AV_CODEC_ID_ADPCM_IMA_WAV: for(i=0; i<avctx->channels; i++){ cs = &(c->status[i]); cs->predictor = *samples++ = sign_extend(bytestream2_get_le16u(&gb), 16); @@ -676,7 +676,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, samples += 7 * avctx->channels; } break; - case CODEC_ID_ADPCM_4XM: + case AV_CODEC_ID_ADPCM_4XM: for (i = 0; i < avctx->channels; i++) c->status[i].predictor = sign_extend(bytestream2_get_le16u(&gb), 16); @@ -701,7 +701,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, } } break; - case CODEC_ID_ADPCM_MS: + case AV_CODEC_ID_ADPCM_MS: { int block_predictor; @@ -744,7 +744,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, } break; } - case CODEC_ID_ADPCM_IMA_DK4: + case AV_CODEC_ID_ADPCM_IMA_DK4: for (channel = 0; channel < avctx->channels; channel++) { cs = &c->status[channel]; cs->predictor = *samples++ = sign_extend(bytestream2_get_le16u(&gb), 16); @@ -761,7 +761,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, *samples++ = adpcm_ima_expand_nibble(&c->status[st], v & 0x0F, 3); } break; - case CODEC_ID_ADPCM_IMA_DK3: + case AV_CODEC_ID_ADPCM_IMA_DK3: { int last_byte = 0; int nibble; @@ -822,7 +822,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, } break; } - case CODEC_ID_ADPCM_IMA_ISS: + case AV_CODEC_ID_ADPCM_IMA_ISS: for (channel = 0; channel < avctx->channels; channel++) { cs = &c->status[channel]; cs->predictor = sign_extend(bytestream2_get_le16u(&gb), 16); @@ -849,14 +849,14 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, *samples++ = adpcm_ima_expand_nibble(&c->status[st], v2, 3); } break; - case CODEC_ID_ADPCM_IMA_APC: + case AV_CODEC_ID_ADPCM_IMA_APC: while (bytestream2_get_bytes_left(&gb) > 0) { int v = bytestream2_get_byteu(&gb); *samples++ = adpcm_ima_expand_nibble(&c->status[0], v >> 4 , 3); *samples++ = adpcm_ima_expand_nibble(&c->status[st], v & 0x0F, 3); } break; - case CODEC_ID_ADPCM_IMA_WS: + case AV_CODEC_ID_ADPCM_IMA_WS: if (c->vqa_version == 3) { for (channel = 0; channel < avctx->channels; channel++) { int16_t *smp = samples + channel; @@ -881,7 +881,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, } bytestream2_seek(&gb, 0, SEEK_END); break; - case CODEC_ID_ADPCM_XA: + case AV_CODEC_ID_ADPCM_XA: while (bytestream2_get_bytes_left(&gb) >= 128) { if ((ret = xa_decode(avctx, samples, buf + bytestream2_tell(&gb), &c->status[0], &c->status[1], avctx->channels)) < 0) @@ -890,7 +890,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, samples += 28 * 8; } break; - case CODEC_ID_ADPCM_IMA_EA_EACS: + case AV_CODEC_ID_ADPCM_IMA_EA_EACS: for (i=0; i<=st; i++) { c->status[i].step_index = bytestream2_get_le32u(&gb); if (c->status[i].step_index > 88u) { @@ -908,14 +908,14 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, *samples++ = adpcm_ima_expand_nibble(&c->status[st], byte & 0x0F, 3); } break; - case CODEC_ID_ADPCM_IMA_EA_SEAD: + case AV_CODEC_ID_ADPCM_IMA_EA_SEAD: for (n = nb_samples >> (1 - st); n > 0; n--) { int byte = bytestream2_get_byteu(&gb); *samples++ = adpcm_ima_expand_nibble(&c->status[0], byte >> 4, 6); *samples++ = adpcm_ima_expand_nibble(&c->status[st], byte & 0x0F, 6); } break; - case CODEC_ID_ADPCM_EA: + case AV_CODEC_ID_ADPCM_EA: { int previous_left_sample, previous_right_sample; int current_left_sample, current_right_sample; @@ -967,7 +967,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, break; } - case CODEC_ID_ADPCM_EA_MAXIS_XA: + case AV_CODEC_ID_ADPCM_EA_MAXIS_XA: { int coeff[2][2], shift[2]; @@ -997,14 +997,14 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, bytestream2_seek(&gb, 0, SEEK_END); break; } - case CODEC_ID_ADPCM_EA_R1: - case CODEC_ID_ADPCM_EA_R2: - case CODEC_ID_ADPCM_EA_R3: { + case AV_CODEC_ID_ADPCM_EA_R1: + case AV_CODEC_ID_ADPCM_EA_R2: + case AV_CODEC_ID_ADPCM_EA_R3: { /* channel numbering 2chan: 0=fl, 1=fr 4chan: 0=fl, 1=rl, 2=fr, 3=rr 6chan: 0=fl, 1=c, 2=fr, 3=rl, 4=rr, 5=sub */ - const int big_endian = avctx->codec->id == CODEC_ID_ADPCM_EA_R3; + const int big_endian = avctx->codec->id == AV_CODEC_ID_ADPCM_EA_R3; int previous_sample, current_sample, next_sample; int coeff1, coeff2; int shift; @@ -1022,7 +1022,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, bytestream2_seek(&gb, offsets[channel], SEEK_SET); samplesC = samples + channel; - if (avctx->codec->id == CODEC_ID_ADPCM_EA_R1) { + if (avctx->codec->id == AV_CODEC_ID_ADPCM_EA_R1) { current_sample = sign_extend(bytestream2_get_le16(&gb), 16); previous_sample = sign_extend(bytestream2_get_le16(&gb), 16); } else { @@ -1071,7 +1071,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, count = FFMAX(count, count1); } - if (avctx->codec->id != CODEC_ID_ADPCM_EA_R1) { + if (avctx->codec->id != AV_CODEC_ID_ADPCM_EA_R1) { c->status[channel].predictor = current_sample; c->status[channel].prev_sample = previous_sample; } @@ -1081,7 +1081,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, bytestream2_seek(&gb, 0, SEEK_END); break; } - case CODEC_ID_ADPCM_EA_XAS: + case AV_CODEC_ID_ADPCM_EA_XAS: for (channel=0; channel<avctx->channels; channel++) { int coeff[2][4], shift[4]; short *s2, *s = &samples[channel]; @@ -1110,9 +1110,9 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, } } break; - case CODEC_ID_ADPCM_IMA_AMV: - case CODEC_ID_ADPCM_IMA_SMJPEG: - if (avctx->codec->id == CODEC_ID_ADPCM_IMA_AMV) { + case AV_CODEC_ID_ADPCM_IMA_AMV: + case AV_CODEC_ID_ADPCM_IMA_SMJPEG: + if (avctx->codec->id == AV_CODEC_ID_ADPCM_IMA_AMV) { c->status[0].predictor = sign_extend(bytestream2_get_le16u(&gb), 16); c->status[0].step_index = bytestream2_get_le16u(&gb); bytestream2_skipu(&gb, 4); @@ -1130,7 +1130,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, for (n = nb_samples >> (1 - st); n > 0; n--) { int hi, lo, v = bytestream2_get_byteu(&gb); - if (avctx->codec->id == CODEC_ID_ADPCM_IMA_AMV) { + if (avctx->codec->id == AV_CODEC_ID_ADPCM_IMA_AMV) { hi = v & 0x0F; lo = v >> 4; } else { @@ -1142,16 +1142,16 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, *samples++ = adpcm_ima_expand_nibble(&c->status[0], hi, 3); } break; - case CODEC_ID_ADPCM_CT: + case AV_CODEC_ID_ADPCM_CT: for (n = nb_samples >> (1 - st); n > 0; n--) { int v = bytestream2_get_byteu(&gb); *samples++ = adpcm_ct_expand_nibble(&c->status[0 ], v >> 4 ); *samples++ = adpcm_ct_expand_nibble(&c->status[st], v & 0x0F); } break; - case CODEC_ID_ADPCM_SBPRO_4: - case CODEC_ID_ADPCM_SBPRO_3: - case CODEC_ID_ADPCM_SBPRO_2: + case AV_CODEC_ID_ADPCM_SBPRO_4: + case AV_CODEC_ID_ADPCM_SBPRO_3: + case AV_CODEC_ID_ADPCM_SBPRO_2: if (!c->status[0].step_index) { /* the first byte is a raw sample */ *samples++ = 128 * (bytestream2_get_byteu(&gb) - 0x80); @@ -1160,7 +1160,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, c->status[0].step_index = 1; nb_samples--; } - if (avctx->codec->id == CODEC_ID_ADPCM_SBPRO_4) { + if (avctx->codec->id == AV_CODEC_ID_ADPCM_SBPRO_4) { for (n = nb_samples >> (1 - st); n > 0; n--) { int byte = bytestream2_get_byteu(&gb); *samples++ = adpcm_sbpro_expand_nibble(&c->status[0], @@ -1168,7 +1168,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, *samples++ = adpcm_sbpro_expand_nibble(&c->status[st], byte & 0x0F, 4, 0); } - } else if (avctx->codec->id == CODEC_ID_ADPCM_SBPRO_3) { + } else if (avctx->codec->id == AV_CODEC_ID_ADPCM_SBPRO_3) { for (n = nb_samples / 3; n > 0; n--) { int byte = bytestream2_get_byteu(&gb); *samples++ = adpcm_sbpro_expand_nibble(&c->status[0], @@ -1192,18 +1192,18 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data, } } break; - case CODEC_ID_ADPCM_SWF: + case AV_CODEC_ID_ADPCM_SWF: adpcm_swf_decode(avctx, buf, buf_size, samples); bytestream2_seek(&gb, 0, SEEK_END); break; - case CODEC_ID_ADPCM_YAMAHA: + case AV_CODEC_ID_ADPCM_YAMAHA: for (n = nb_samples >> (1 - st); n > 0; n--) { int v = bytestream2_get_byteu(&gb); *samples++ = adpcm_yamaha_expand_nibble(&c->status[0 ], v & 0x0F); *samples++ = adpcm_yamaha_expand_nibble(&c->status[st], v >> 4 ); } break; - case CODEC_ID_ADPCM_THP: + case AV_CODEC_ID_ADPCM_THP: { int table[2][16]; int prev[2][2]; @@ -1279,30 +1279,30 @@ AVCodec ff_ ## name_ ## _decoder = { \ } /* Note: Do not forget to add new entries to the Makefile as well. */ -ADPCM_DECODER(CODEC_ID_ADPCM_4XM, adpcm_4xm, "ADPCM 4X Movie"); -ADPCM_DECODER(CODEC_ID_ADPCM_CT, adpcm_ct, "ADPCM Creative Technology"); -ADPCM_DECODER(CODEC_ID_ADPCM_EA, adpcm_ea, "ADPCM Electronic Arts"); -ADPCM_DECODER(CODEC_ID_ADPCM_EA_MAXIS_XA, adpcm_ea_maxis_xa, "ADPCM Electronic Arts Maxis CDROM XA"); -ADPCM_DECODER(CODEC_ID_ADPCM_EA_R1, adpcm_ea_r1, "ADPCM Electronic Arts R1"); -ADPCM_DECODER(CODEC_ID_ADPCM_EA_R2, adpcm_ea_r2, "ADPCM Electronic Arts R2"); -ADPCM_DECODER(CODEC_ID_ADPCM_EA_R3, adpcm_ea_r3, "ADPCM Electronic Arts R3"); -ADPCM_DECODER(CODEC_ID_ADPCM_EA_XAS, adpcm_ea_xas, "ADPCM Electronic Arts XAS"); -ADPCM_DECODER(CODEC_ID_ADPCM_IMA_AMV, adpcm_ima_amv, "ADPCM IMA AMV"); -ADPCM_DECODER(CODEC_ID_ADPCM_IMA_APC, adpcm_ima_apc, "ADPCM IMA CRYO APC"); -ADPCM_DECODER(CODEC_ID_ADPCM_IMA_DK3, adpcm_ima_dk3, "ADPCM IMA Duck DK3"); -ADPCM_DECODER(CODEC_ID_ADPCM_IMA_DK4, adpcm_ima_dk4, "ADPCM IMA Duck DK4"); -ADPCM_DECODER(CODEC_ID_ADPCM_IMA_EA_EACS, adpcm_ima_ea_eacs, "ADPCM IMA Electronic Arts EACS"); -ADPCM_DECODER(CODEC_ID_ADPCM_IMA_EA_SEAD, adpcm_ima_ea_sead, "ADPCM IMA Electronic Arts SEAD"); -ADPCM_DECODER(CODEC_ID_ADPCM_IMA_ISS, adpcm_ima_iss, "ADPCM IMA Funcom ISS"); -ADPCM_DECODER(CODEC_ID_ADPCM_IMA_QT, adpcm_ima_qt, "ADPCM IMA QuickTime"); -ADPCM_DECODER(CODEC_ID_ADPCM_IMA_SMJPEG, adpcm_ima_smjpeg, "ADPCM IMA Loki SDL MJPEG"); -ADPCM_DECODER(CODEC_ID_ADPCM_IMA_WAV, adpcm_ima_wav, "ADPCM IMA WAV"); -ADPCM_DECODER(CODEC_ID_ADPCM_IMA_WS, adpcm_ima_ws, "ADPCM IMA Westwood"); -ADPCM_DECODER(CODEC_ID_ADPCM_MS, adpcm_ms, "ADPCM Microsoft"); -ADPCM_DECODER(CODEC_ID_ADPCM_SBPRO_2, adpcm_sbpro_2, "ADPCM Sound Blaster Pro 2-bit"); -ADPCM_DECODER(CODEC_ID_ADPCM_SBPRO_3, adpcm_sbpro_3, "ADPCM Sound Blaster Pro 2.6-bit"); -ADPCM_DECODER(CODEC_ID_ADPCM_SBPRO_4, adpcm_sbpro_4, "ADPCM Sound Blaster Pro 4-bit"); -ADPCM_DECODER(CODEC_ID_ADPCM_SWF, adpcm_swf, "ADPCM Shockwave Flash"); -ADPCM_DECODER(CODEC_ID_ADPCM_THP, adpcm_thp, "ADPCM Nintendo Gamecube THP"); -ADPCM_DECODER(CODEC_ID_ADPCM_XA, adpcm_xa, "ADPCM CDROM XA"); -ADPCM_DECODER(CODEC_ID_ADPCM_YAMAHA, adpcm_yamaha, "ADPCM Yamaha"); +ADPCM_DECODER(AV_CODEC_ID_ADPCM_4XM, adpcm_4xm, "ADPCM 4X Movie"); +ADPCM_DECODER(AV_CODEC_ID_ADPCM_CT, adpcm_ct, "ADPCM Creative Technology"); +ADPCM_DECODER(AV_CODEC_ID_ADPCM_EA, adpcm_ea, "ADPCM Electronic Arts"); +ADPCM_DECODER(AV_CODEC_ID_ADPCM_EA_MAXIS_XA, adpcm_ea_maxis_xa, "ADPCM Electronic Arts Maxis CDROM XA"); +ADPCM_DECODER(AV_CODEC_ID_ADPCM_EA_R1, adpcm_ea_r1, "ADPCM Electronic Arts R1"); +ADPCM_DECODER(AV_CODEC_ID_ADPCM_EA_R2, adpcm_ea_r2, "ADPCM Electronic Arts R2"); +ADPCM_DECODER(AV_CODEC_ID_ADPCM_EA_R3, adpcm_ea_r3, "ADPCM Electronic Arts R3"); +ADPCM_DECODER(AV_CODEC_ID_ADPCM_EA_XAS, adpcm_ea_xas, "ADPCM Electronic Arts XAS"); +ADPCM_DECODER(AV_CODEC_ID_ADPCM_IMA_AMV, adpcm_ima_amv, "ADPCM IMA AMV"); +ADPCM_DECODER(AV_CODEC_ID_ADPCM_IMA_APC, adpcm_ima_apc, "ADPCM IMA CRYO APC"); +ADPCM_DECODER(AV_CODEC_ID_ADPCM_IMA_DK3, adpcm_ima_dk3, "ADPCM IMA Duck DK3"); +ADPCM_DECODER(AV_CODEC_ID_ADPCM_IMA_DK4, adpcm_ima_dk4, "ADPCM IMA Duck DK4"); +ADPCM_DECODER(AV_CODEC_ID_ADPCM_IMA_EA_EACS, adpcm_ima_ea_eacs, "ADPCM IMA Electronic Arts EACS"); +ADPCM_DECODER(AV_CODEC_ID_ADPCM_IMA_EA_SEAD, adpcm_ima_ea_sead, "ADPCM IMA Electronic Arts SEAD"); +ADPCM_DECODER(AV_CODEC_ID_ADPCM_IMA_ISS, adpcm_ima_iss, "ADPCM IMA Funcom ISS"); +ADPCM_DECODER(AV_CODEC_ID_ADPCM_IMA_QT, adpcm_ima_qt, "ADPCM IMA QuickTime"); +ADPCM_DECODER(AV_CODEC_ID_ADPCM_IMA_SMJPEG, adpcm_ima_smjpeg, "ADPCM IMA Loki SDL MJPEG"); +ADPCM_DECODER(AV_CODEC_ID_ADPCM_IMA_WAV, adpcm_ima_wav, "ADPCM IMA WAV"); +ADPCM_DECODER(AV_CODEC_ID_ADPCM_IMA_WS, adpcm_ima_ws, "ADPCM IMA Westwood"); +ADPCM_DECODER(AV_CODEC_ID_ADPCM_MS, adpcm_ms, "ADPCM Microsoft"); +ADPCM_DECODER(AV_CODEC_ID_ADPCM_SBPRO_2, adpcm_sbpro_2, "ADPCM Sound Blaster Pro 2-bit"); +ADPCM_DECODER(AV_CODEC_ID_ADPCM_SBPRO_3, adpcm_sbpro_3, "ADPCM Sound Blaster Pro 2.6-bit"); +ADPCM_DECODER(AV_CODEC_ID_ADPCM_SBPRO_4, adpcm_sbpro_4, "ADPCM Sound Blaster Pro 4-bit"); +ADPCM_DECODER(AV_CODEC_ID_ADPCM_SWF, adpcm_swf, "ADPCM Shockwave Flash"); +ADPCM_DECODER(AV_CODEC_ID_ADPCM_THP, adpcm_thp, "ADPCM Nintendo Gamecube THP"); +ADPCM_DECODER(AV_CODEC_ID_ADPCM_XA, adpcm_xa, "ADPCM CDROM XA"); +ADPCM_DECODER(AV_CODEC_ID_ADPCM_YAMAHA, adpcm_yamaha, "ADPCM Yamaha"); diff --git a/libavcodec/adpcmenc.c b/libavcodec/adpcmenc.c index fa40c228f3..038dbf1c5e 100644 --- a/libavcodec/adpcmenc.c +++ b/libavcodec/adpcmenc.c @@ -92,7 +92,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 / @@ -101,11 +101,11 @@ static av_cold int adpcm_encode_init(AVCodecContext *avctx) have to buffer the samples :-( */ avctx->block_align = BLKSIZE; 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 / @@ -122,11 +122,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) { @@ -294,13 +294,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; @@ -322,7 +322,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; @@ -398,9 +398,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;\ @@ -419,7 +419,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)); @@ -487,7 +487,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; @@ -498,7 +498,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; @@ -563,7 +563,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; @@ -593,7 +593,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; @@ -637,7 +637,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; @@ -681,7 +681,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); @@ -733,8 +733,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"); diff --git a/libavcodec/adx_parser.c b/libavcodec/adx_parser.c index 8dc87fcc58..706e242c82 100644 --- a/libavcodec/adx_parser.c +++ b/libavcodec/adx_parser.c @@ -89,7 +89,7 @@ static int adx_parse(AVCodecParserContext *s1, } AVCodecParser ff_adx_parser = { - .codec_ids = { CODEC_ID_ADPCM_ADX }, + .codec_ids = { AV_CODEC_ID_ADPCM_ADX }, .priv_data_size = sizeof(ADXParseContext), .parser_parse = adx_parse, .parser_close = ff_parse_close, diff --git a/libavcodec/adxdec.c b/libavcodec/adxdec.c index 3f7f5f4ca1..96847c03ed 100644 --- a/libavcodec/adxdec.c +++ b/libavcodec/adxdec.c @@ -175,7 +175,7 @@ static void adx_decode_flush(AVCodecContext *avctx) AVCodec ff_adpcm_adx_decoder = { .name = "adpcm_adx", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_ADPCM_ADX, + .id = AV_CODEC_ID_ADPCM_ADX, .priv_data_size = sizeof(ADXContext), .init = adx_decode_init, .decode = adx_decode_frame, diff --git a/libavcodec/adxenc.c b/libavcodec/adxenc.c index 0b5ca2e2dc..8a50539626 100644 --- a/libavcodec/adxenc.c +++ b/libavcodec/adxenc.c @@ -166,7 +166,7 @@ static int adx_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, AVCodec ff_adpcm_adx_encoder = { .name = "adpcm_adx", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_ADPCM_ADX, + .id = AV_CODEC_ID_ADPCM_ADX, .priv_data_size = sizeof(ADXContext), .init = adx_encode_init, .encode2 = adx_encode_frame, diff --git a/libavcodec/alac.c b/libavcodec/alac.c index 61d2e70b4f..11f90fc4a5 100644 --- a/libavcodec/alac.c +++ b/libavcodec/alac.c @@ -605,7 +605,7 @@ static av_cold int alac_decode_init(AVCodecContext * avctx) AVCodec ff_alac_decoder = { .name = "alac", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_ALAC, + .id = AV_CODEC_ID_ALAC, .priv_data_size = sizeof(ALACContext), .init = alac_decode_init, .close = alac_decode_close, diff --git a/libavcodec/alacenc.c b/libavcodec/alacenc.c index 405b85724e..70f4bbad75 100644 --- a/libavcodec/alacenc.c +++ b/libavcodec/alacenc.c @@ -576,7 +576,7 @@ static int alac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, AVCodec ff_alac_encoder = { .name = "alac", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_ALAC, + .id = AV_CODEC_ID_ALAC, .priv_data_size = sizeof(AlacEncodeContext), .init = alac_encode_init, .encode2 = alac_encode_frame, diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c index c411d5739a..56d7f2faca 100644 --- a/libavcodec/alsdec.c +++ b/libavcodec/alsdec.c @@ -1740,7 +1740,7 @@ static av_cold void flush(AVCodecContext *avctx) AVCodec ff_als_decoder = { .name = "als", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_MP4ALS, + .id = AV_CODEC_ID_MP4ALS, .priv_data_size = sizeof(ALSDecContext), .init = decode_init, .close = decode_end, diff --git a/libavcodec/amrnbdec.c b/libavcodec/amrnbdec.c index 27f5eac1c5..28f30216e2 100644 --- a/libavcodec/amrnbdec.c +++ b/libavcodec/amrnbdec.c @@ -1057,7 +1057,7 @@ static int amrnb_decode_frame(AVCodecContext *avctx, void *data, AVCodec ff_amrnb_decoder = { .name = "amrnb", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_AMR_NB, + .id = AV_CODEC_ID_AMR_NB, .priv_data_size = sizeof(AMRContext), .init = amrnb_decode_init, .decode = amrnb_decode_frame, diff --git a/libavcodec/amrwbdec.c b/libavcodec/amrwbdec.c index c1b577ace2..4dc90da038 100644 --- a/libavcodec/amrwbdec.c +++ b/libavcodec/amrwbdec.c @@ -1237,7 +1237,7 @@ static int amrwb_decode_frame(AVCodecContext *avctx, void *data, AVCodec ff_amrwb_decoder = { .name = "amrwb", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_AMR_WB, + .id = AV_CODEC_ID_AMR_WB, .priv_data_size = sizeof(AMRWBContext), .init = amrwb_decode_init, .decode = amrwb_decode_frame, diff --git a/libavcodec/anm.c b/libavcodec/anm.c index d979ba4323..4b6a5564d0 100644 --- a/libavcodec/anm.c +++ b/libavcodec/anm.c @@ -186,7 +186,7 @@ static av_cold int decode_end(AVCodecContext *avctx) AVCodec ff_anm_decoder = { .name = "anm", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_ANM, + .id = AV_CODEC_ID_ANM, .priv_data_size = sizeof(AnmContext), .init = decode_init, .close = decode_end, diff --git a/libavcodec/ansi.c b/libavcodec/ansi.c index 32c7ce4ecd..bd58dd1391 100644 --- a/libavcodec/ansi.c +++ b/libavcodec/ansi.c @@ -425,7 +425,7 @@ static av_cold int decode_close(AVCodecContext *avctx) AVCodec ff_ansi_decoder = { .name = "ansi", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_ANSI, + .id = AV_CODEC_ID_ANSI, .priv_data_size = sizeof(AnsiContext), .init = decode_init, .close = decode_close, diff --git a/libavcodec/apedec.c b/libavcodec/apedec.c index b07f3a090b..061804c053 100644 --- a/libavcodec/apedec.c +++ b/libavcodec/apedec.c @@ -987,7 +987,7 @@ static const AVClass ape_decoder_class = { AVCodec ff_ape_decoder = { .name = "ape", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_APE, + .id = AV_CODEC_ID_APE, .priv_data_size = sizeof(APEContext), .init = ape_decode_init, .close = ape_decode_close, diff --git a/libavcodec/api-example.c b/libavcodec/api-example.c index 93d6c2253c..cdb22c618a 100644 --- a/libavcodec/api-example.c +++ b/libavcodec/api-example.c @@ -60,7 +60,7 @@ static void audio_encode_example(const char *filename) printf("Audio encoding\n"); /* find the MP2 encoder */ - codec = avcodec_find_encoder(CODEC_ID_MP2); + codec = avcodec_find_encoder(AV_CODEC_ID_MP2); if (!codec) { fprintf(stderr, "codec not found\n"); exit(1); @@ -130,7 +130,7 @@ static void audio_decode_example(const char *outfilename, const char *filename) printf("Audio decoding\n"); /* find the mpeg audio decoder */ - codec = avcodec_find_decoder(CODEC_ID_MP2); + codec = avcodec_find_decoder(AV_CODEC_ID_MP2); if (!codec) { fprintf(stderr, "codec not found\n"); exit(1); @@ -221,7 +221,7 @@ static void video_encode_example(const char *filename) printf("Video encoding\n"); /* find the mpeg1 video encoder */ - codec = avcodec_find_encoder(CODEC_ID_MPEG1VIDEO); + codec = avcodec_find_encoder(AV_CODEC_ID_MPEG1VIDEO); if (!codec) { fprintf(stderr, "codec not found\n"); exit(1); @@ -352,7 +352,7 @@ static void video_decode_example(const char *outfilename, const char *filename) printf("Video decoding\n"); /* find the mpeg1 video decoder */ - codec = avcodec_find_decoder(CODEC_ID_MPEG1VIDEO); + codec = avcodec_find_decoder(AV_CODEC_ID_MPEG1VIDEO); if (!codec) { fprintf(stderr, "codec not found\n"); exit(1); diff --git a/libavcodec/arm/h264pred_init_arm.c b/libavcodec/arm/h264pred_init_arm.c index 808cc54d5a..371b1a6733 100644 --- a/libavcodec/arm/h264pred_init_arm.c +++ b/libavcodec/arm/h264pred_init_arm.c @@ -52,10 +52,10 @@ static void ff_h264_pred_init_neon(H264PredContext *h, int codec_id, const int b h->pred8x8[VERT_PRED8x8 ] = ff_pred8x8_vert_neon; h->pred8x8[HOR_PRED8x8 ] = ff_pred8x8_hor_neon; - if (codec_id != CODEC_ID_VP8) + if (codec_id != AV_CODEC_ID_VP8) h->pred8x8[PLANE_PRED8x8] = ff_pred8x8_plane_neon; h->pred8x8[DC_128_PRED8x8 ] = ff_pred8x8_128_dc_neon; - if (codec_id != CODEC_ID_RV40 && codec_id != CODEC_ID_VP8) { + if (codec_id != AV_CODEC_ID_RV40 && codec_id != AV_CODEC_ID_VP8) { h->pred8x8[DC_PRED8x8 ] = ff_pred8x8_dc_neon; h->pred8x8[LEFT_DC_PRED8x8] = ff_pred8x8_left_dc_neon; h->pred8x8[TOP_DC_PRED8x8 ] = ff_pred8x8_top_dc_neon; @@ -71,7 +71,7 @@ static void ff_h264_pred_init_neon(H264PredContext *h, int codec_id, const int b h->pred16x16[LEFT_DC_PRED8x8] = ff_pred16x16_left_dc_neon; h->pred16x16[TOP_DC_PRED8x8 ] = ff_pred16x16_top_dc_neon; h->pred16x16[DC_128_PRED8x8 ] = ff_pred16x16_128_dc_neon; - if (codec_id != CODEC_ID_SVQ3 && codec_id != CODEC_ID_RV40 && codec_id != CODEC_ID_VP8) + if (codec_id != AV_CODEC_ID_SVQ3 && codec_id != AV_CODEC_ID_RV40 && codec_id != AV_CODEC_ID_VP8) h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_plane_neon; } diff --git a/libavcodec/arm/vp56dsp_init_arm.c b/libavcodec/arm/vp56dsp_init_arm.c index 691db584da..afa507061a 100644 --- a/libavcodec/arm/vp56dsp_init_arm.c +++ b/libavcodec/arm/vp56dsp_init_arm.c @@ -27,11 +27,11 @@ void ff_vp6_edge_filter_hor_neon(uint8_t *yuv, int stride, int t); void ff_vp6_edge_filter_ver_neon(uint8_t *yuv, int stride, int t); -void ff_vp56dsp_init_arm(VP56DSPContext *s, enum CodecID codec) +void ff_vp56dsp_init_arm(VP56DSPContext *s, enum AVCodecID codec) { int cpu_flags = av_get_cpu_flags(); - if (codec != CODEC_ID_VP5 && have_neon(cpu_flags)) { + if (codec != AV_CODEC_ID_VP5 && have_neon(cpu_flags)) { s->edge_filter_hor = ff_vp6_edge_filter_hor_neon; s->edge_filter_ver = ff_vp6_edge_filter_ver_neon; } diff --git a/libavcodec/assdec.c b/libavcodec/assdec.c index 2d82ca6ef7..225ecebfb7 100644 --- a/libavcodec/assdec.c +++ b/libavcodec/assdec.c @@ -56,7 +56,7 @@ AVCodec ff_ass_decoder = { .name = "ass", .long_name = NULL_IF_CONFIG_SMALL("SSA (SubStation Alpha) subtitle"), .type = AVMEDIA_TYPE_SUBTITLE, - .id = CODEC_ID_SSA, + .id = AV_CODEC_ID_SSA, .init = ass_decode_init, .decode = ass_decode_frame, }; diff --git a/libavcodec/assenc.c b/libavcodec/assenc.c index 1e442c88c9..28ca6ddb1b 100644 --- a/libavcodec/assenc.c +++ b/libavcodec/assenc.c @@ -61,7 +61,7 @@ AVCodec ff_ass_encoder = { .name = "ass", .long_name = NULL_IF_CONFIG_SMALL("SSA (SubStation Alpha) subtitle"), .type = AVMEDIA_TYPE_SUBTITLE, - .id = CODEC_ID_SSA, + .id = AV_CODEC_ID_SSA, .init = ass_encode_init, .encode = ass_encode_frame, }; diff --git a/libavcodec/asv1.c b/libavcodec/asv1.c index 6c8bed3043..a3106b2a54 100644 --- a/libavcodec/asv1.c +++ b/libavcodec/asv1.c @@ -311,7 +311,7 @@ static inline int decode_mb(ASV1Context *a, DCTELEM block[6][64]){ a->dsp.clear_blocks(block[0]); - if(a->avctx->codec_id == CODEC_ID_ASV1){ + if(a->avctx->codec_id == AV_CODEC_ID_ASV1){ for(i=0; i<6; i++){ if( asv1_decode_block(a, block[i]) < 0) return -1; @@ -335,7 +335,7 @@ static inline int encode_mb(ASV1Context *a, DCTELEM block[6][64]){ return -1; } - if(a->avctx->codec_id == CODEC_ID_ASV1){ + if(a->avctx->codec_id == AV_CODEC_ID_ASV1){ for(i=0; i<6; i++) asv1_encode_block(a, block[i]); }else{ @@ -415,7 +415,7 @@ static int decode_frame(AVCodecContext *avctx, if (!a->bitstream_buffer) return AVERROR(ENOMEM); - if(avctx->codec_id == CODEC_ID_ASV1) + if(avctx->codec_id == AV_CODEC_ID_ASV1) a->dsp.bswap_buf((uint32_t*)a->bitstream_buffer, (const uint32_t*)buf, buf_size/4); else{ int i; @@ -514,7 +514,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, size= put_bits_count(&a->pb)/32; - if(avctx->codec_id == CODEC_ID_ASV1) + if(avctx->codec_id == AV_CODEC_ID_ASV1) a->dsp.bswap_buf((uint32_t*)pkt->data, (uint32_t*)pkt->data, size); else{ int i; @@ -548,7 +548,7 @@ static av_cold int decode_init(AVCodecContext *avctx){ ASV1Context * const a = avctx->priv_data; AVFrame *p= &a->picture; int i; - const int scale= avctx->codec_id == CODEC_ID_ASV1 ? 1 : 2; + const int scale= avctx->codec_id == AV_CODEC_ID_ASV1 ? 1 : 2; common_init(avctx); init_vlcs(a); @@ -558,7 +558,7 @@ static av_cold int decode_init(AVCodecContext *avctx){ a->inv_qscale= avctx->extradata[0]; if(a->inv_qscale == 0){ av_log(avctx, AV_LOG_ERROR, "illegal qscale 0\n"); - if(avctx->codec_id == CODEC_ID_ASV1) + if(avctx->codec_id == AV_CODEC_ID_ASV1) a->inv_qscale= 6; else a->inv_qscale= 10; @@ -582,7 +582,7 @@ static av_cold int decode_init(AVCodecContext *avctx){ static av_cold int encode_init(AVCodecContext *avctx){ ASV1Context * const a = avctx->priv_data; int i; - const int scale= avctx->codec_id == CODEC_ID_ASV1 ? 1 : 2; + const int scale= avctx->codec_id == AV_CODEC_ID_ASV1 ? 1 : 2; common_init(avctx); @@ -620,7 +620,7 @@ static av_cold int decode_end(AVCodecContext *avctx){ AVCodec ff_asv1_decoder = { .name = "asv1", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_ASV1, + .id = AV_CODEC_ID_ASV1, .priv_data_size = sizeof(ASV1Context), .init = decode_init, .close = decode_end, @@ -632,7 +632,7 @@ AVCodec ff_asv1_decoder = { AVCodec ff_asv2_decoder = { .name = "asv2", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_ASV2, + .id = AV_CODEC_ID_ASV2, .priv_data_size = sizeof(ASV1Context), .init = decode_init, .close = decode_end, @@ -645,7 +645,7 @@ AVCodec ff_asv2_decoder = { AVCodec ff_asv1_encoder = { .name = "asv1", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_ASV1, + .id = AV_CODEC_ID_ASV1, .priv_data_size = sizeof(ASV1Context), .init = encode_init, .encode2 = encode_frame, @@ -658,7 +658,7 @@ AVCodec ff_asv1_encoder = { AVCodec ff_asv2_encoder = { .name = "asv2", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_ASV2, + .id = AV_CODEC_ID_ASV2, .priv_data_size = sizeof(ASV1Context), .init = encode_init, .encode2 = encode_frame, diff --git a/libavcodec/atrac1.c b/libavcodec/atrac1.c index d0b58704f6..ec4b7c10e1 100644 --- a/libavcodec/atrac1.c +++ b/libavcodec/atrac1.c @@ -403,7 +403,7 @@ static av_cold int atrac1_decode_init(AVCodecContext *avctx) AVCodec ff_atrac1_decoder = { .name = "atrac1", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_ATRAC1, + .id = AV_CODEC_ID_ATRAC1, .priv_data_size = sizeof(AT1Ctx), .init = atrac1_decode_init, .close = atrac1_decode_end, diff --git a/libavcodec/atrac3.c b/libavcodec/atrac3.c index 638889b32b..a09007c20f 100644 --- a/libavcodec/atrac3.c +++ b/libavcodec/atrac3.c @@ -1068,7 +1068,7 @@ AVCodec ff_atrac3_decoder = { .name = "atrac3", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_ATRAC3, + .id = AV_CODEC_ID_ATRAC3, .priv_data_size = sizeof(ATRAC3Context), .init = atrac3_decode_init, .close = atrac3_decode_close, diff --git a/libavcodec/aura.c b/libavcodec/aura.c index d17fc97280..e015aac6f2 100644 --- a/libavcodec/aura.c +++ b/libavcodec/aura.c @@ -125,7 +125,7 @@ static av_cold int aura_decode_end(AVCodecContext *avctx) AVCodec ff_aura2_decoder = { .name = "aura2", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_AURA2, + .id = AV_CODEC_ID_AURA2, .priv_data_size = sizeof(AuraDecodeContext), .init = aura_decode_init, .close = aura_decode_end, diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 2576754df4..b807ae4bf3 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -1265,7 +1265,7 @@ typedef struct AVCodecContext { enum AVMediaType codec_type; /* see AVMEDIA_TYPE_xxx */ struct AVCodec *codec; char codec_name[32]; - enum CodecID codec_id; /* see AV_CODEC_ID_xxx */ + enum AVCodecID codec_id; /* see AV_CODEC_ID_xxx */ /** * fourcc (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A'). @@ -2869,7 +2869,7 @@ typedef struct AVCodec { */ const char *long_name; enum AVMediaType type; - enum CodecID id; + enum AVCodecID id; /** * Codec capabilities. * see CODEC_CAP_* @@ -2967,9 +2967,9 @@ typedef struct AVHWAccel { /** * Codec implemented by the hardware accelerator. * - * See CODEC_ID_xxx + * See AV_CODEC_ID_xxx */ - enum CodecID id; + enum AVCodecID id; /** * Supported pixel format. @@ -3388,10 +3388,10 @@ uint8_t* av_packet_get_side_data(AVPacket *pkt, enum AVPacketSideDataType type, /** * Find a registered decoder with a matching codec ID. * - * @param id CodecID of the requested decoder + * @param id AVCodecID of the requested decoder * @return A decoder if one was found, NULL otherwise. */ -AVCodec *avcodec_find_decoder(enum CodecID id); +AVCodec *avcodec_find_decoder(enum AVCodecID id); /** * Find a registered decoder with the specified name. @@ -3810,10 +3810,10 @@ void av_parser_close(AVCodecParserContext *s); /** * Find a registered encoder with a matching codec ID. * - * @param id CodecID of the requested encoder + * @param id AVCodecID of the requested encoder * @return An encoder if one was found, NULL otherwise. */ -AVCodec *avcodec_find_encoder(enum CodecID id); +AVCodec *avcodec_find_encoder(enum AVCodecID id); /** * Find a registered encoder with the specified name. @@ -4323,7 +4323,7 @@ void avcodec_default_free_buffers(AVCodecContext *s); * @param[in] codec_id the codec * @return Number of bits per sample or zero if unknown for the given codec. */ -int av_get_bits_per_sample(enum CodecID codec_id); +int av_get_bits_per_sample(enum AVCodecID codec_id); /** * Return codec bits per sample. @@ -4333,7 +4333,7 @@ int av_get_bits_per_sample(enum CodecID codec_id); * @param[in] codec_id the codec * @return Number of bits per sample or zero if unknown for the given codec. */ -int av_get_exact_bits_per_sample(enum CodecID codec_id); +int av_get_exact_bits_per_sample(enum AVCodecID codec_id); /** * Return audio frame duration. @@ -4481,7 +4481,7 @@ int av_lockmgr_register(int (*cb)(void **mutex, enum AVLockOp op)); /** * Get the type of the given codec. */ -enum AVMediaType avcodec_get_type(enum CodecID codec_id); +enum AVMediaType avcodec_get_type(enum AVCodecID codec_id); /** * @return a positive value if s is open (i.e. avcodec_open2() was called on it diff --git a/libavcodec/avs.c b/libavcodec/avs.c index 7f8ff0f024..d4e2837212 100644 --- a/libavcodec/avs.c +++ b/libavcodec/avs.c @@ -173,7 +173,7 @@ static av_cold int avs_decode_end(AVCodecContext *avctx) AVCodec ff_avs_decoder = { .name = "avs", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_AVS, + .id = AV_CODEC_ID_AVS, .priv_data_size = sizeof(AvsContext), .init = avs_decode_init, .decode = avs_decode_frame, diff --git a/libavcodec/bethsoftvideo.c b/libavcodec/bethsoftvideo.c index 406fa6c7a0..3900f7512c 100644 --- a/libavcodec/bethsoftvideo.c +++ b/libavcodec/bethsoftvideo.c @@ -153,7 +153,7 @@ static av_cold int bethsoftvid_decode_end(AVCodecContext *avctx) AVCodec ff_bethsoftvid_decoder = { .name = "bethsoftvid", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_BETHSOFTVID, + .id = AV_CODEC_ID_BETHSOFTVID, .priv_data_size = sizeof(BethsoftvidContext), .init = bethsoftvid_decode_init, .close = bethsoftvid_decode_end, diff --git a/libavcodec/bfi.c b/libavcodec/bfi.c index e4be176f77..8355850183 100644 --- a/libavcodec/bfi.c +++ b/libavcodec/bfi.c @@ -180,7 +180,7 @@ static av_cold int bfi_decode_close(AVCodecContext *avctx) AVCodec ff_bfi_decoder = { .name = "bfi", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_BFI, + .id = AV_CODEC_ID_BFI, .priv_data_size = sizeof(BFIContext), .init = bfi_decode_init, .close = bfi_decode_close, diff --git a/libavcodec/bink.c b/libavcodec/bink.c index 2bde59bcdc..b726bae45a 100644 --- a/libavcodec/bink.c +++ b/libavcodec/bink.c @@ -1330,7 +1330,7 @@ static av_cold int decode_end(AVCodecContext *avctx) AVCodec ff_bink_decoder = { .name = "binkvideo", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_BINKVIDEO, + .id = AV_CODEC_ID_BINKVIDEO, .priv_data_size = sizeof(BinkContext), .init = decode_init, .close = decode_end, diff --git a/libavcodec/binkaudio.c b/libavcodec/binkaudio.c index d77018c1f6..31a6a7caba 100644 --- a/libavcodec/binkaudio.c +++ b/libavcodec/binkaudio.c @@ -98,7 +98,7 @@ static av_cold int decode_init(AVCodecContext *avctx) s->version_b = avctx->extradata && avctx->extradata[3] == 'b'; - if (avctx->codec->id == CODEC_ID_BINKAUDIO_RDFT) { + if (avctx->codec->id == AV_CODEC_ID_BINKAUDIO_RDFT) { // audio is already interleaved for the RDFT format variant sample_rate *= avctx->channels; s->channels = 1; @@ -141,7 +141,7 @@ static av_cold int decode_init(AVCodecContext *avctx) s->prev_ptr[i] = s->coeffs_ptr[i] + s->frame_len - s->overlap_len; } - if (CONFIG_BINKAUDIO_RDFT_DECODER && avctx->codec->id == CODEC_ID_BINKAUDIO_RDFT) + if (CONFIG_BINKAUDIO_RDFT_DECODER && avctx->codec->id == AV_CODEC_ID_BINKAUDIO_RDFT) ff_rdft_init(&s->trans.rdft, frame_len_bits, DFT_C2R); else if (CONFIG_BINKAUDIO_DCT_DECODER) ff_dct_init(&s->trans.dct, frame_len_bits, DCT_III); @@ -293,7 +293,7 @@ static av_cold int decode_end(AVCodecContext *avctx) BinkAudioContext * s = avctx->priv_data; av_freep(&s->bands); av_freep(&s->packet_buffer); - if (CONFIG_BINKAUDIO_RDFT_DECODER && avctx->codec->id == CODEC_ID_BINKAUDIO_RDFT) + if (CONFIG_BINKAUDIO_RDFT_DECODER && avctx->codec->id == AV_CODEC_ID_BINKAUDIO_RDFT) ff_rdft_end(&s->trans.rdft); else if (CONFIG_BINKAUDIO_DCT_DECODER) ff_dct_end(&s->trans.dct); @@ -346,7 +346,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, } samples = (int16_t *)s->frame.data[0]; - if (decode_block(s, samples, avctx->codec->id == CODEC_ID_BINKAUDIO_DCT)) { + if (decode_block(s, samples, avctx->codec->id == AV_CODEC_ID_BINKAUDIO_DCT)) { av_log(avctx, AV_LOG_ERROR, "Incomplete packet\n"); return AVERROR_INVALIDDATA; } @@ -361,7 +361,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, AVCodec ff_binkaudio_rdft_decoder = { .name = "binkaudio_rdft", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_BINKAUDIO_RDFT, + .id = AV_CODEC_ID_BINKAUDIO_RDFT, .priv_data_size = sizeof(BinkAudioContext), .init = decode_init, .close = decode_end, @@ -373,7 +373,7 @@ AVCodec ff_binkaudio_rdft_decoder = { AVCodec ff_binkaudio_dct_decoder = { .name = "binkaudio_dct", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_BINKAUDIO_DCT, + .id = AV_CODEC_ID_BINKAUDIO_DCT, .priv_data_size = sizeof(BinkAudioContext), .init = decode_init, .close = decode_end, diff --git a/libavcodec/bmp.c b/libavcodec/bmp.c index 210d012aaa..299f37c95f 100644 --- a/libavcodec/bmp.c +++ b/libavcodec/bmp.c @@ -364,7 +364,7 @@ static av_cold int bmp_decode_end(AVCodecContext *avctx) AVCodec ff_bmp_decoder = { .name = "bmp", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_BMP, + .id = AV_CODEC_ID_BMP, .priv_data_size = sizeof(BMPContext), .init = bmp_decode_init, .close = bmp_decode_end, diff --git a/libavcodec/bmpenc.c b/libavcodec/bmpenc.c index e1872122c7..37cf6e13e4 100644 --- a/libavcodec/bmpenc.c +++ b/libavcodec/bmpenc.c @@ -162,7 +162,7 @@ static int bmp_encode_frame(AVCodecContext *avctx, AVPacket *pkt, AVCodec ff_bmp_encoder = { .name = "bmp", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_BMP, + .id = AV_CODEC_ID_BMP, .priv_data_size = sizeof(BMPContext), .init = bmp_encode_init, .encode2 = bmp_encode_frame, diff --git a/libavcodec/bmv.c b/libavcodec/bmv.c index 4d496430cc..11f3c4fc58 100644 --- a/libavcodec/bmv.c +++ b/libavcodec/bmv.c @@ -360,7 +360,7 @@ static int bmv_aud_decode_frame(AVCodecContext *avctx, void *data, AVCodec ff_bmv_video_decoder = { .name = "bmv_video", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_BMV_VIDEO, + .id = AV_CODEC_ID_BMV_VIDEO, .priv_data_size = sizeof(BMVDecContext), .init = decode_init, .close = decode_end, @@ -371,7 +371,7 @@ AVCodec ff_bmv_video_decoder = { AVCodec ff_bmv_audio_decoder = { .name = "bmv_audio", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_BMV_AUDIO, + .id = AV_CODEC_ID_BMV_AUDIO, .priv_data_size = sizeof(BMVAudioDecContext), .init = bmv_aud_decode_init, .decode = bmv_aud_decode_frame, diff --git a/libavcodec/c93.c b/libavcodec/c93.c index 589b123191..b0bffbce83 100644 --- a/libavcodec/c93.c +++ b/libavcodec/c93.c @@ -247,7 +247,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, AVCodec ff_c93_decoder = { .name = "c93", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_C93, + .id = AV_CODEC_ID_C93, .priv_data_size = sizeof(C93DecoderContext), .init = decode_init, .close = decode_end, diff --git a/libavcodec/cavs_parser.c b/libavcodec/cavs_parser.c index 504fed9590..84f647c196 100644 --- a/libavcodec/cavs_parser.c +++ b/libavcodec/cavs_parser.c @@ -98,7 +98,7 @@ static int cavsvideo_parse(AVCodecParserContext *s, } AVCodecParser ff_cavsvideo_parser = { - .codec_ids = { CODEC_ID_CAVS }, + .codec_ids = { AV_CODEC_ID_CAVS }, .priv_data_size = sizeof(ParseContext), .parser_parse = cavsvideo_parse, .parser_close = ff_parse_close, diff --git a/libavcodec/cavsdec.c b/libavcodec/cavsdec.c index 30a69b6fb0..8e3d3d05a3 100644 --- a/libavcodec/cavsdec.c +++ b/libavcodec/cavsdec.c @@ -718,7 +718,7 @@ static int cavs_decode_frame(AVCodecContext * avctx,void *data, int *data_size, AVCodec ff_cavs_decoder = { .name = "cavs", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_CAVS, + .id = AV_CODEC_ID_CAVS, .priv_data_size = sizeof(AVSContext), .init = ff_cavs_init, .close = ff_cavs_end, diff --git a/libavcodec/cdgraphics.c b/libavcodec/cdgraphics.c index f2f9900d19..bfbb736a2f 100644 --- a/libavcodec/cdgraphics.c +++ b/libavcodec/cdgraphics.c @@ -370,7 +370,7 @@ static av_cold int cdg_decode_end(AVCodecContext *avctx) AVCodec ff_cdgraphics_decoder = { .name = "cdgraphics", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_CDGRAPHICS, + .id = AV_CODEC_ID_CDGRAPHICS, .priv_data_size = sizeof(CDGraphicsContext), .init = cdg_decode_init, .close = cdg_decode_end, diff --git a/libavcodec/cdxl.c b/libavcodec/cdxl.c index 7726ebfe2f..86b7515df9 100644 --- a/libavcodec/cdxl.c +++ b/libavcodec/cdxl.c @@ -300,7 +300,7 @@ static av_cold int cdxl_decode_end(AVCodecContext *avctx) AVCodec ff_cdxl_decoder = { .name = "cdxl", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_CDXL, + .id = AV_CODEC_ID_CDXL, .priv_data_size = sizeof(CDXLVideoContext), .init = cdxl_decode_init, .close = cdxl_decode_end, diff --git a/libavcodec/cinepak.c b/libavcodec/cinepak.c index 253384e694..9c29f5e5e3 100644 --- a/libavcodec/cinepak.c +++ b/libavcodec/cinepak.c @@ -469,7 +469,7 @@ static av_cold int cinepak_decode_end(AVCodecContext *avctx) AVCodec ff_cinepak_decoder = { .name = "cinepak", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_CINEPAK, + .id = AV_CODEC_ID_CINEPAK, .priv_data_size = sizeof(CinepakContext), .init = cinepak_decode_init, .close = cinepak_decode_end, diff --git a/libavcodec/cljr.c b/libavcodec/cljr.c index 40d8a4c449..3c75d8329f 100644 --- a/libavcodec/cljr.c +++ b/libavcodec/cljr.c @@ -118,7 +118,7 @@ static av_cold int decode_end(AVCodecContext *avctx) AVCodec ff_cljr_decoder = { .name = "cljr", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_CLJR, + .id = AV_CODEC_ID_CLJR, .priv_data_size = sizeof(CLJRContext), .init = decode_init, .close = decode_end, @@ -171,7 +171,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, AVCodec ff_cljr_encoder = { .name = "cljr", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_CLJR, + .id = AV_CODEC_ID_CLJR, .priv_data_size = sizeof(CLJRContext), .init = common_init, .encode2 = encode_frame, diff --git a/libavcodec/cllc.c b/libavcodec/cllc.c index a65689ab56..d23da181ba 100644 --- a/libavcodec/cllc.c +++ b/libavcodec/cllc.c @@ -274,7 +274,7 @@ static av_cold int cllc_decode_init(AVCodecContext *avctx) AVCodec ff_cllc_decoder = { .name = "cllc", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_CLLC, + .id = AV_CODEC_ID_CLLC, .priv_data_size = sizeof(CLLCContext), .init = cllc_decode_init, .decode = cllc_decode_frame, diff --git a/libavcodec/cook.c b/libavcodec/cook.c index 5b1f9d561e..0e7c497d03 100644 --- a/libavcodec/cook.c +++ b/libavcodec/cook.c @@ -1297,7 +1297,7 @@ static av_cold int cook_decode_init(AVCodecContext *avctx) AVCodec ff_cook_decoder = { .name = "cook", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_COOK, + .id = AV_CODEC_ID_COOK, .priv_data_size = sizeof(COOKContext), .init = cook_decode_init, .close = cook_decode_close, diff --git a/libavcodec/cook_parser.c b/libavcodec/cook_parser.c index c16f7c8a5f..f140e90461 100644 --- a/libavcodec/cook_parser.c +++ b/libavcodec/cook_parser.c @@ -53,7 +53,7 @@ static int cook_parse(AVCodecParserContext *s1, AVCodecContext *avctx, } AVCodecParser ff_cook_parser = { - .codec_ids = { CODEC_ID_COOK }, + .codec_ids = { AV_CODEC_ID_COOK }, .priv_data_size = sizeof(CookParseContext), .parser_parse = cook_parse, }; diff --git a/libavcodec/cscd.c b/libavcodec/cscd.c index 1a0f22e938..6c84f03b4a 100644 --- a/libavcodec/cscd.c +++ b/libavcodec/cscd.c @@ -257,7 +257,7 @@ static av_cold int decode_end(AVCodecContext *avctx) { AVCodec ff_cscd_decoder = { .name = "camstudio", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_CSCD, + .id = AV_CODEC_ID_CSCD, .priv_data_size = sizeof(CamStudioContext), .init = decode_init, .close = decode_end, diff --git a/libavcodec/cyuv.c b/libavcodec/cyuv.c index 5bfeef0014..4e30538381 100644 --- a/libavcodec/cyuv.c +++ b/libavcodec/cyuv.c @@ -82,7 +82,7 @@ static int cyuv_decode_frame(AVCodecContext *avctx, unsigned char cur_byte; int pixel_groups; - if (avctx->codec_id == CODEC_ID_AURA) { + if (avctx->codec_id == AV_CODEC_ID_AURA) { y_table = u_table; u_table = v_table; } @@ -181,7 +181,7 @@ static av_cold int cyuv_decode_end(AVCodecContext *avctx) AVCodec ff_aura_decoder = { .name = "aura", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_AURA, + .id = AV_CODEC_ID_AURA, .priv_data_size = sizeof(CyuvDecodeContext), .init = cyuv_decode_init, .close = cyuv_decode_end, @@ -195,7 +195,7 @@ AVCodec ff_aura_decoder = { AVCodec ff_cyuv_decoder = { .name = "cyuv", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_CYUV, + .id = AV_CODEC_ID_CYUV, .priv_data_size = sizeof(CyuvDecodeContext), .init = cyuv_decode_init, .close = cyuv_decode_end, diff --git a/libavcodec/dca_parser.c b/libavcodec/dca_parser.c index 73611e0233..7e65d0ba84 100644 --- a/libavcodec/dca_parser.c +++ b/libavcodec/dca_parser.c @@ -203,7 +203,7 @@ static int dca_parse(AVCodecParserContext * s, } AVCodecParser ff_dca_parser = { - .codec_ids = { CODEC_ID_DTS }, + .codec_ids = { AV_CODEC_ID_DTS }, .priv_data_size = sizeof(DCAParseContext), .parser_init = dca_parse_init, .parser_parse = dca_parse, diff --git a/libavcodec/dcadec.c b/libavcodec/dcadec.c index d4fd23e215..6b0812cf70 100644 --- a/libavcodec/dcadec.c +++ b/libavcodec/dcadec.c @@ -1957,7 +1957,7 @@ static const AVProfile profiles[] = { AVCodec ff_dca_decoder = { .name = "dca", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_DTS, + .id = AV_CODEC_ID_DTS, .priv_data_size = sizeof(DCAContext), .init = dca_decode_init, .decode = dca_decode_frame, diff --git a/libavcodec/dfa.c b/libavcodec/dfa.c index 7b6c5d5254..5beae7f1a4 100644 --- a/libavcodec/dfa.c +++ b/libavcodec/dfa.c @@ -377,7 +377,7 @@ static av_cold int dfa_decode_end(AVCodecContext *avctx) AVCodec ff_dfa_decoder = { .name = "dfa", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_DFA, + .id = AV_CODEC_ID_DFA, .priv_data_size = sizeof(DfaContext), .init = dfa_decode_init, .close = dfa_decode_end, diff --git a/libavcodec/dirac_parser.c b/libavcodec/dirac_parser.c index 11d0cf86b2..4fd47ae7da 100644 --- a/libavcodec/dirac_parser.c +++ b/libavcodec/dirac_parser.c @@ -248,7 +248,7 @@ static void dirac_parse_close(AVCodecParserContext *s) } AVCodecParser ff_dirac_parser = { - .codec_ids = { CODEC_ID_DIRAC }, + .codec_ids = { AV_CODEC_ID_DIRAC }, .priv_data_size = sizeof(DiracParseContext), .parser_parse = dirac_parse, .parser_close = dirac_parse_close, diff --git a/libavcodec/dnxhd_parser.c b/libavcodec/dnxhd_parser.c index 870fed4a11..d981079e56 100644 --- a/libavcodec/dnxhd_parser.c +++ b/libavcodec/dnxhd_parser.c @@ -87,7 +87,7 @@ static int dnxhd_parse(AVCodecParserContext *s, } AVCodecParser ff_dnxhd_parser = { - .codec_ids = { CODEC_ID_DNXHD }, + .codec_ids = { AV_CODEC_ID_DNXHD }, .priv_data_size = sizeof(ParseContext), .parser_parse = dnxhd_parse, .parser_close = ff_parse_close, diff --git a/libavcodec/dnxhddec.c b/libavcodec/dnxhddec.c index c61e2df1f8..00db8a1fc6 100644 --- a/libavcodec/dnxhddec.c +++ b/libavcodec/dnxhddec.c @@ -400,7 +400,7 @@ static av_cold int dnxhd_decode_close(AVCodecContext *avctx) AVCodec ff_dnxhd_decoder = { .name = "dnxhd", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_DNXHD, + .id = AV_CODEC_ID_DNXHD, .priv_data_size = sizeof(DNXHDContext), .init = dnxhd_decode_init, .close = dnxhd_decode_close, diff --git a/libavcodec/dnxhdenc.c b/libavcodec/dnxhdenc.c index d92ea1bd7a..aca54974f7 100644 --- a/libavcodec/dnxhdenc.c +++ b/libavcodec/dnxhdenc.c @@ -1001,7 +1001,7 @@ static int dnxhd_encode_end(AVCodecContext *avctx) AVCodec ff_dnxhd_encoder = { .name = "dnxhd", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_DNXHD, + .id = AV_CODEC_ID_DNXHD, .priv_data_size = sizeof(DNXHDEncContext), .init = dnxhd_encode_init, .encode2 = dnxhd_encode_picture, diff --git a/libavcodec/dpcm.c b/libavcodec/dpcm.c index 2bd7978317..f9aff98417 100644 --- a/libavcodec/dpcm.c +++ b/libavcodec/dpcm.c @@ -128,7 +128,7 @@ static av_cold int dpcm_decode_init(AVCodecContext *avctx) switch(avctx->codec->id) { - case CODEC_ID_ROQ_DPCM: + case AV_CODEC_ID_ROQ_DPCM: /* initialize square table */ for (i = 0; i < 128; i++) { int16_t square = i * i; @@ -137,7 +137,7 @@ static av_cold int dpcm_decode_init(AVCodecContext *avctx) } break; - case CODEC_ID_SOL_DPCM: + case AV_CODEC_ID_SOL_DPCM: switch(avctx->codec_tag){ case 1: s->sol_table = sol_table_old; @@ -159,7 +159,7 @@ static av_cold int dpcm_decode_init(AVCodecContext *avctx) break; } - if (avctx->codec->id == CODEC_ID_SOL_DPCM && avctx->codec_tag != 3) + if (avctx->codec->id == AV_CODEC_ID_SOL_DPCM && avctx->codec_tag != 3) avctx->sample_fmt = AV_SAMPLE_FMT_U8; else avctx->sample_fmt = AV_SAMPLE_FMT_S16; @@ -189,16 +189,16 @@ static int dpcm_decode_frame(AVCodecContext *avctx, void *data, /* calculate output size */ switch(avctx->codec->id) { - case CODEC_ID_ROQ_DPCM: + case AV_CODEC_ID_ROQ_DPCM: out = buf_size - 8; break; - case CODEC_ID_INTERPLAY_DPCM: + case AV_CODEC_ID_INTERPLAY_DPCM: out = buf_size - 6 - s->channels; break; - case CODEC_ID_XAN_DPCM: + case AV_CODEC_ID_XAN_DPCM: out = buf_size - 2 * s->channels; break; - case CODEC_ID_SOL_DPCM: + case AV_CODEC_ID_SOL_DPCM: if (avctx->codec_tag != 3) out = buf_size * 2; else @@ -221,7 +221,7 @@ static int dpcm_decode_frame(AVCodecContext *avctx, void *data, switch(avctx->codec->id) { - case CODEC_ID_ROQ_DPCM: + case AV_CODEC_ID_ROQ_DPCM: bytestream2_skipu(&gb, 6); if (stereo) { @@ -242,7 +242,7 @@ static int dpcm_decode_frame(AVCodecContext *avctx, void *data, } break; - case CODEC_ID_INTERPLAY_DPCM: + case AV_CODEC_ID_INTERPLAY_DPCM: bytestream2_skipu(&gb, 6); /* skip over the stream mask and stream length */ for (ch = 0; ch < s->channels; ch++) { @@ -261,7 +261,7 @@ static int dpcm_decode_frame(AVCodecContext *avctx, void *data, } break; - case CODEC_ID_XAN_DPCM: + case AV_CODEC_ID_XAN_DPCM: { int shift[2] = { 4, 4 }; @@ -294,7 +294,7 @@ static int dpcm_decode_frame(AVCodecContext *avctx, void *data, } break; } - case CODEC_ID_SOL_DPCM: + case AV_CODEC_ID_SOL_DPCM: if (avctx->codec_tag != 3) { uint8_t *output_samples_u8 = s->frame.data[0], *samples_end_u8 = output_samples_u8 + out; @@ -341,7 +341,7 @@ AVCodec ff_ ## name_ ## _decoder = { \ .long_name = NULL_IF_CONFIG_SMALL(long_name_), \ } -DPCM_DECODER(CODEC_ID_INTERPLAY_DPCM, interplay_dpcm, "DPCM Interplay"); -DPCM_DECODER(CODEC_ID_ROQ_DPCM, roq_dpcm, "DPCM id RoQ"); -DPCM_DECODER(CODEC_ID_SOL_DPCM, sol_dpcm, "DPCM Sol"); -DPCM_DECODER(CODEC_ID_XAN_DPCM, xan_dpcm, "DPCM Xan"); +DPCM_DECODER(AV_CODEC_ID_INTERPLAY_DPCM, interplay_dpcm, "DPCM Interplay"); +DPCM_DECODER(AV_CODEC_ID_ROQ_DPCM, roq_dpcm, "DPCM id RoQ"); +DPCM_DECODER(AV_CODEC_ID_SOL_DPCM, sol_dpcm, "DPCM Sol"); +DPCM_DECODER(AV_CODEC_ID_XAN_DPCM, xan_dpcm, "DPCM Xan"); diff --git a/libavcodec/dpx.c b/libavcodec/dpx.c index 9bce6483b5..18d74fea70 100644 --- a/libavcodec/dpx.c +++ b/libavcodec/dpx.c @@ -237,7 +237,7 @@ static av_cold int decode_end(AVCodecContext *avctx) AVCodec ff_dpx_decoder = { .name = "dpx", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_DPX, + .id = AV_CODEC_ID_DPX, .priv_data_size = sizeof(DPXContext), .init = decode_init, .close = decode_end, diff --git a/libavcodec/dpxenc.c b/libavcodec/dpxenc.c index 89548ba0c3..a48a898c83 100644 --- a/libavcodec/dpxenc.c +++ b/libavcodec/dpxenc.c @@ -175,7 +175,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, AVCodec ff_dpx_encoder = { .name = "dpx", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_DPX, + .id = AV_CODEC_ID_DPX, .priv_data_size = sizeof(DPXContext), .init = encode_init, .encode2 = encode_frame, diff --git a/libavcodec/dsicinav.c b/libavcodec/dsicinav.c index 7e64b97b25..b8fad7e550 100644 --- a/libavcodec/dsicinav.c +++ b/libavcodec/dsicinav.c @@ -375,7 +375,7 @@ static int cinaudio_decode_frame(AVCodecContext *avctx, void *data, AVCodec ff_dsicinvideo_decoder = { .name = "dsicinvideo", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_DSICINVIDEO, + .id = AV_CODEC_ID_DSICINVIDEO, .priv_data_size = sizeof(CinVideoContext), .init = cinvideo_decode_init, .close = cinvideo_decode_end, @@ -387,7 +387,7 @@ AVCodec ff_dsicinvideo_decoder = { AVCodec ff_dsicinaudio_decoder = { .name = "dsicinaudio", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_DSICINAUDIO, + .id = AV_CODEC_ID_DSICINAUDIO, .priv_data_size = sizeof(CinAudioContext), .init = cinaudio_decode_init, .decode = cinaudio_decode_frame, diff --git a/libavcodec/dv.c b/libavcodec/dv.c index 16be0eddc0..67e6fd7bc5 100644 --- a/libavcodec/dv.c +++ b/libavcodec/dv.c @@ -979,7 +979,7 @@ static int dvvideo_encode_frame(AVCodecContext *c, AVPacket *pkt, AVCodec ff_dvvideo_encoder = { .name = "dvvideo", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_DVVIDEO, + .id = AV_CODEC_ID_DVVIDEO, .priv_data_size = sizeof(DVVideoContext), .init = dvvideo_init_encoder, .encode2 = dvvideo_encode_frame, diff --git a/libavcodec/dvbsub.c b/libavcodec/dvbsub.c index 49bad217d9..51317f0a87 100644 --- a/libavcodec/dvbsub.c +++ b/libavcodec/dvbsub.c @@ -405,7 +405,7 @@ static int dvbsub_encode(AVCodecContext *avctx, AVCodec ff_dvbsub_encoder = { .name = "dvbsub", .type = AVMEDIA_TYPE_SUBTITLE, - .id = CODEC_ID_DVB_SUBTITLE, + .id = AV_CODEC_ID_DVB_SUBTITLE, .priv_data_size = sizeof(DVBSubtitleContext), .encode = dvbsub_encode, .long_name = NULL_IF_CONFIG_SMALL("DVB subtitles"), diff --git a/libavcodec/dvbsub_parser.c b/libavcodec/dvbsub_parser.c index 643352888f..c13aab62b2 100644 --- a/libavcodec/dvbsub_parser.c +++ b/libavcodec/dvbsub_parser.c @@ -172,7 +172,7 @@ static av_cold void dvbsub_parse_close(AVCodecParserContext *s) } AVCodecParser ff_dvbsub_parser = { - .codec_ids = { CODEC_ID_DVB_SUBTITLE }, + .codec_ids = { AV_CODEC_ID_DVB_SUBTITLE }, .priv_data_size = sizeof(DVBSubParseContext), .parser_init = dvbsub_parse_init, .parser_parse = dvbsub_parse, diff --git a/libavcodec/dvbsubdec.c b/libavcodec/dvbsubdec.c index cc14622c30..b4aba49f09 100644 --- a/libavcodec/dvbsubdec.c +++ b/libavcodec/dvbsubdec.c @@ -1466,7 +1466,7 @@ static int dvbsub_decode(AVCodecContext *avctx, AVCodec ff_dvbsub_decoder = { .name = "dvbsub", .type = AVMEDIA_TYPE_SUBTITLE, - .id = CODEC_ID_DVB_SUBTITLE, + .id = AV_CODEC_ID_DVB_SUBTITLE, .priv_data_size = sizeof(DVBSubContext), .init = dvbsub_init_decoder, .close = dvbsub_close_decoder, diff --git a/libavcodec/dvdec.c b/libavcodec/dvdec.c index 8a21267eca..58889ec526 100644 --- a/libavcodec/dvdec.c +++ b/libavcodec/dvdec.c @@ -375,7 +375,7 @@ static int dvvideo_close(AVCodecContext *c) AVCodec ff_dvvideo_decoder = { .name = "dvvideo", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_DVVIDEO, + .id = AV_CODEC_ID_DVVIDEO, .priv_data_size = sizeof(DVVideoContext), .init = ff_dvvideo_init, .close = dvvideo_close, diff --git a/libavcodec/dvdsub_parser.c b/libavcodec/dvdsub_parser.c index f46d1a452a..76978cd816 100644 --- a/libavcodec/dvdsub_parser.c +++ b/libavcodec/dvdsub_parser.c @@ -77,7 +77,7 @@ static av_cold void dvdsub_parse_close(AVCodecParserContext *s) } AVCodecParser ff_dvdsub_parser = { - .codec_ids = { CODEC_ID_DVD_SUBTITLE }, + .codec_ids = { AV_CODEC_ID_DVD_SUBTITLE }, .priv_data_size = sizeof(DVDSubParseContext), .parser_init = dvdsub_parse_init, .parser_parse = dvdsub_parse, diff --git a/libavcodec/dvdsubdec.c b/libavcodec/dvdsubdec.c index 78203d0026..e52205dd3a 100644 --- a/libavcodec/dvdsubdec.c +++ b/libavcodec/dvdsubdec.c @@ -487,7 +487,7 @@ static int dvdsub_decode(AVCodecContext *avctx, AVCodec ff_dvdsub_decoder = { .name = "dvdsub", .type = AVMEDIA_TYPE_SUBTITLE, - .id = CODEC_ID_DVD_SUBTITLE, + .id = AV_CODEC_ID_DVD_SUBTITLE, .decode = dvdsub_decode, .long_name = NULL_IF_CONFIG_SMALL("DVD subtitles"), }; diff --git a/libavcodec/dvdsubenc.c b/libavcodec/dvdsubenc.c index bf0ae61ed2..c41a98394d 100644 --- a/libavcodec/dvdsubenc.c +++ b/libavcodec/dvdsubenc.c @@ -218,7 +218,7 @@ static int dvdsub_encode(AVCodecContext *avctx, AVCodec ff_dvdsub_encoder = { .name = "dvdsub", .type = AVMEDIA_TYPE_SUBTITLE, - .id = CODEC_ID_DVD_SUBTITLE, + .id = AV_CODEC_ID_DVD_SUBTITLE, .encode = dvdsub_encode, .long_name = NULL_IF_CONFIG_SMALL("DVD subtitles"), }; diff --git a/libavcodec/dxa.c b/libavcodec/dxa.c index 2684179981..966c2fbbb8 100644 --- a/libavcodec/dxa.c +++ b/libavcodec/dxa.c @@ -318,7 +318,7 @@ static av_cold int decode_end(AVCodecContext *avctx) AVCodec ff_dxa_decoder = { .name = "dxa", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_DXA, + .id = AV_CODEC_ID_DXA, .priv_data_size = sizeof(DxaDecContext), .init = decode_init, .close = decode_end, diff --git a/libavcodec/dxtory.c b/libavcodec/dxtory.c index 5f67fbdbef..d11b942ff8 100644 --- a/libavcodec/dxtory.c +++ b/libavcodec/dxtory.c @@ -101,7 +101,7 @@ AVCodec ff_dxtory_decoder = { .name = "dxtory", .long_name = NULL_IF_CONFIG_SMALL("Dxtory"), .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_DXTORY, + .id = AV_CODEC_ID_DXTORY, .init = decode_init, .close = decode_close, .decode = decode_frame, diff --git a/libavcodec/dxva2_h264.c b/libavcodec/dxva2_h264.c index 5cdf5dea5c..086c9a2670 100644 --- a/libavcodec/dxva2_h264.c +++ b/libavcodec/dxva2_h264.c @@ -442,7 +442,7 @@ static int end_frame(AVCodecContext *avctx) AVHWAccel ff_h264_dxva2_hwaccel = { .name = "h264_dxva2", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_H264, + .id = AV_CODEC_ID_H264, .pix_fmt = PIX_FMT_DXVA2_VLD, .start_frame = start_frame, .decode_slice = decode_slice, diff --git a/libavcodec/dxva2_mpeg2.c b/libavcodec/dxva2_mpeg2.c index b20b3d79f4..5c9343cfc1 100644 --- a/libavcodec/dxva2_mpeg2.c +++ b/libavcodec/dxva2_mpeg2.c @@ -263,7 +263,7 @@ static int end_frame(AVCodecContext *avctx) AVHWAccel ff_mpeg2_dxva2_hwaccel = { .name = "mpeg2_dxva2", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_MPEG2VIDEO, + .id = AV_CODEC_ID_MPEG2VIDEO, .pix_fmt = PIX_FMT_DXVA2_VLD, .start_frame = start_frame, .decode_slice = decode_slice, diff --git a/libavcodec/dxva2_vc1.c b/libavcodec/dxva2_vc1.c index 2b0480baa9..487f5fca17 100644 --- a/libavcodec/dxva2_vc1.c +++ b/libavcodec/dxva2_vc1.c @@ -167,7 +167,7 @@ static int commit_bitstream_and_slice_buffer(AVCodecContext *avctx, DXVA_SliceInfo *slice = &ctx_pic->si; static const uint8_t start_code[] = { 0, 0, 1, 0x0d }; - const unsigned start_code_size = avctx->codec_id == CODEC_ID_VC1 ? sizeof(start_code) : 0; + const unsigned start_code_size = avctx->codec_id == AV_CODEC_ID_VC1 ? sizeof(start_code) : 0; const unsigned slice_size = slice->dwSliceBitsInBuffer / 8; const unsigned padding = 128 - ((start_code_size + slice_size) & 127); const unsigned data_size = start_code_size + slice_size + padding; @@ -237,7 +237,7 @@ static int decode_slice(AVCodecContext *avctx, if (ctx_pic->bitstream_size > 0) return -1; - if (avctx->codec_id == CODEC_ID_VC1 && + if (avctx->codec_id == AV_CODEC_ID_VC1 && size >= 4 && IS_MARKER(AV_RB32(buffer))) { buffer += 4; size -= 4; @@ -268,7 +268,7 @@ static int end_frame(AVCodecContext *avctx) AVHWAccel ff_wmv3_dxva2_hwaccel = { .name = "wmv3_dxva2", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_WMV3, + .id = AV_CODEC_ID_WMV3, .pix_fmt = PIX_FMT_DXVA2_VLD, .start_frame = start_frame, .decode_slice = decode_slice, @@ -280,7 +280,7 @@ AVHWAccel ff_wmv3_dxva2_hwaccel = { AVHWAccel ff_vc1_dxva2_hwaccel = { .name = "vc1_dxva2", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_VC1, + .id = AV_CODEC_ID_VC1, .pix_fmt = PIX_FMT_DXVA2_VLD, .start_frame = start_frame, .decode_slice = decode_slice, diff --git a/libavcodec/eac3enc.c b/libavcodec/eac3enc.c index 9aa5ea44b9..c5ba9d6c40 100644 --- a/libavcodec/eac3enc.c +++ b/libavcodec/eac3enc.c @@ -249,7 +249,7 @@ void ff_eac3_output_frame_header(AC3EncodeContext *s) AVCodec ff_eac3_encoder = { .name = "eac3", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_EAC3, + .id = AV_CODEC_ID_EAC3, .priv_data_size = sizeof(AC3EncodeContext), .init = ff_ac3_encode_init, .encode2 = ff_ac3_float_encode_frame, diff --git a/libavcodec/eacmv.c b/libavcodec/eacmv.c index 542a016ebe..b3cd25b94c 100644 --- a/libavcodec/eacmv.c +++ b/libavcodec/eacmv.c @@ -211,7 +211,7 @@ static av_cold int cmv_decode_end(AVCodecContext *avctx){ AVCodec ff_eacmv_decoder = { .name = "eacmv", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_CMV, + .id = AV_CODEC_ID_CMV, .priv_data_size = sizeof(CmvContext), .init = cmv_decode_init, .close = cmv_decode_end, diff --git a/libavcodec/eamad.c b/libavcodec/eamad.c index d7e65db927..c3ec170f4e 100644 --- a/libavcodec/eamad.c +++ b/libavcodec/eamad.c @@ -296,7 +296,7 @@ static av_cold int decode_end(AVCodecContext *avctx) AVCodec ff_eamad_decoder = { .name = "eamad", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_MAD, + .id = AV_CODEC_ID_MAD, .priv_data_size = sizeof(MadContext), .init = decode_init, .close = decode_end, diff --git a/libavcodec/eatgq.c b/libavcodec/eatgq.c index a55b061a50..faba0c702d 100644 --- a/libavcodec/eatgq.c +++ b/libavcodec/eatgq.c @@ -242,7 +242,7 @@ static av_cold int tgq_decode_end(AVCodecContext *avctx){ AVCodec ff_eatgq_decoder = { .name = "eatgq", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_TGQ, + .id = AV_CODEC_ID_TGQ, .priv_data_size = sizeof(TgqContext), .init = tgq_decode_init, .close = tgq_decode_end, diff --git a/libavcodec/eatgv.c b/libavcodec/eatgv.c index 60058b29e9..118cc0bdcc 100644 --- a/libavcodec/eatgv.c +++ b/libavcodec/eatgv.c @@ -345,7 +345,7 @@ static av_cold int tgv_decode_end(AVCodecContext *avctx) AVCodec ff_eatgv_decoder = { .name = "eatgv", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_TGV, + .id = AV_CODEC_ID_TGV, .priv_data_size = sizeof(TgvContext), .init = tgv_decode_init, .close = tgv_decode_end, diff --git a/libavcodec/eatqi.c b/libavcodec/eatqi.c index 548a084044..75edcd60c5 100644 --- a/libavcodec/eatqi.c +++ b/libavcodec/eatqi.c @@ -154,7 +154,7 @@ static av_cold int tqi_decode_end(AVCodecContext *avctx) AVCodec ff_eatqi_decoder = { .name = "eatqi", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_TQI, + .id = AV_CODEC_ID_TQI, .priv_data_size = sizeof(TqiContext), .init = tqi_decode_init, .close = tqi_decode_end, diff --git a/libavcodec/error_resilience.c b/libavcodec/error_resilience.c index 9cebb6d52e..53e8bf971e 100644 --- a/libavcodec/error_resilience.c +++ b/libavcodec/error_resilience.c @@ -46,7 +46,7 @@ static void decode_mb(MpegEncContext *s, int ref) s->dest[1] = s->current_picture.f.data[1] + (s->mb_y * (16 >> s->chroma_y_shift) * s->uvlinesize) + s->mb_x * (16 >> s->chroma_x_shift); s->dest[2] = s->current_picture.f.data[2] + (s->mb_y * (16 >> s->chroma_y_shift) * s->uvlinesize) + s->mb_x * (16 >> s->chroma_x_shift); - if (CONFIG_H264_DECODER && s->codec_id == CODEC_ID_H264) { + if (CONFIG_H264_DECODER && s->codec_id == AV_CODEC_ID_H264) { H264Context *h = (void*)s; h->mb_xy = s->mb_x + s->mb_y * s->mb_stride; memset(h->non_zero_count_cache, 0, sizeof(h->non_zero_count_cache)); @@ -76,7 +76,7 @@ static void decode_mb(MpegEncContext *s, int ref) */ static void set_mv_strides(MpegEncContext *s, int *mv_step, int *stride) { - if (s->codec_id == CODEC_ID_H264) { + if (s->codec_id == AV_CODEC_ID_H264) { H264Context *h = (void*)s; assert(s->quarter_sample); *mv_step = 4; @@ -599,7 +599,7 @@ skip_mean_and_median: pred_count++; if (!fixed[mb_xy]) { - if (s->avctx->codec_id == CODEC_ID_H264) { + if (s->avctx->codec_id == AV_CODEC_ID_H264) { // FIXME } else { ff_thread_await_progress(&s->last_picture_ptr->f, @@ -730,7 +730,7 @@ static int is_intra_more_likely(MpegEncContext *s) undamaged_count++; } - if (s->codec_id == CODEC_ID_H264) { + if (s->codec_id == AV_CODEC_ID_H264) { H264Context *h = (void*) s; if (h->list_count <= 0 || h->ref_count[0] <= 0 || !h->ref_list[0][0].f.data[0]) @@ -770,7 +770,7 @@ static int is_intra_more_likely(MpegEncContext *s) uint8_t *last_mb_ptr = s->last_picture.f.data[0] + mb_x * 16 + mb_y * 16 * s->linesize; - if (s->avctx->codec_id == CODEC_ID_H264) { + if (s->avctx->codec_id == AV_CODEC_ID_H264) { // FIXME } else { ff_thread_await_progress(&s->last_picture_ptr->f, @@ -1161,7 +1161,7 @@ void ff_er_frame_end(MpegEncContext *s) int time_pp = s->pp_time; int time_pb = s->pb_time; - if (s->avctx->codec_id == CODEC_ID_H264) { + if (s->avctx->codec_id == AV_CODEC_ID_H264) { // FIXME } else { ff_thread_await_progress(&s->next_picture_ptr->f, mb_y, 0); diff --git a/libavcodec/escape124.c b/libavcodec/escape124.c index eec7885c7c..0c3339b158 100644 --- a/libavcodec/escape124.c +++ b/libavcodec/escape124.c @@ -366,7 +366,7 @@ static int escape124_decode_frame(AVCodecContext *avctx, AVCodec ff_escape124_decoder = { .name = "escape124", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_ESCAPE124, + .id = AV_CODEC_ID_ESCAPE124, .priv_data_size = sizeof(Escape124Context), .init = escape124_decode_init, .close = escape124_decode_close, diff --git a/libavcodec/ffv1.c b/libavcodec/ffv1.c index 07d6d8855b..51ead47201 100644 --- a/libavcodec/ffv1.c +++ b/libavcodec/ffv1.c @@ -1738,7 +1738,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac AVCodec ff_ffv1_decoder = { .name = "ffv1", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_FFV1, + .id = AV_CODEC_ID_FFV1, .priv_data_size = sizeof(FFV1Context), .init = decode_init, .close = common_end, @@ -1752,7 +1752,7 @@ AVCodec ff_ffv1_decoder = { AVCodec ff_ffv1_encoder = { .name = "ffv1", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_FFV1, + .id = AV_CODEC_ID_FFV1, .priv_data_size = sizeof(FFV1Context), .init = encode_init, .encode2 = encode_frame, diff --git a/libavcodec/flac_parser.c b/libavcodec/flac_parser.c index 8ce7a23f8b..6c8c04675c 100644 --- a/libavcodec/flac_parser.c +++ b/libavcodec/flac_parser.c @@ -675,7 +675,7 @@ static void flac_parse_close(AVCodecParserContext *c) } AVCodecParser ff_flac_parser = { - .codec_ids = { CODEC_ID_FLAC }, + .codec_ids = { AV_CODEC_ID_FLAC }, .priv_data_size = sizeof(FLACParseContext), .parser_init = flac_parse_init, .parser_parse = flac_parse, diff --git a/libavcodec/flacdec.c b/libavcodec/flacdec.c index 8cbd389d47..3cdd957a55 100644 --- a/libavcodec/flacdec.c +++ b/libavcodec/flacdec.c @@ -561,7 +561,7 @@ static av_cold int flac_decode_close(AVCodecContext *avctx) AVCodec ff_flac_decoder = { .name = "flac", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_FLAC, + .id = AV_CODEC_ID_FLAC, .priv_data_size = sizeof(FLACContext), .init = flac_decode_init, .close = flac_decode_close, diff --git a/libavcodec/flacenc.c b/libavcodec/flacenc.c index e2a370507a..3e0ddbb75c 100644 --- a/libavcodec/flacenc.c +++ b/libavcodec/flacenc.c @@ -1304,7 +1304,7 @@ static const AVClass flac_encoder_class = { AVCodec ff_flac_encoder = { .name = "flac", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_FLAC, + .id = AV_CODEC_ID_FLAC, .priv_data_size = sizeof(FlacEncodeContext), .init = flac_encode_init, .encode2 = flac_encode_frame, diff --git a/libavcodec/flashsv.c b/libavcodec/flashsv.c index c6af3f3aa6..aaaf95622f 100644 --- a/libavcodec/flashsv.c +++ b/libavcodec/flashsv.c @@ -455,7 +455,7 @@ static av_cold int flashsv_decode_end(AVCodecContext *avctx) AVCodec ff_flashsv_decoder = { .name = "flashsv", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_FLASHSV, + .id = AV_CODEC_ID_FLASHSV, .priv_data_size = sizeof(FlashSVContext), .init = flashsv_decode_init, .close = flashsv_decode_end, @@ -518,7 +518,7 @@ static av_cold int flashsv2_decode_end(AVCodecContext *avctx) AVCodec ff_flashsv2_decoder = { .name = "flashsv2", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_FLASHSV2, + .id = AV_CODEC_ID_FLASHSV2, .priv_data_size = sizeof(FlashSVContext), .init = flashsv2_decode_init, .close = flashsv2_decode_end, diff --git a/libavcodec/flashsvenc.c b/libavcodec/flashsvenc.c index ddbc2a1257..992a727053 100644 --- a/libavcodec/flashsvenc.c +++ b/libavcodec/flashsvenc.c @@ -282,7 +282,7 @@ static av_cold int flashsv_encode_end(AVCodecContext *avctx) AVCodec ff_flashsv_encoder = { .name = "flashsv", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_FLASHSV, + .id = AV_CODEC_ID_FLASHSV, .priv_data_size = sizeof(FlashSVContext), .init = flashsv_encode_init, .encode2 = flashsv_encode_frame, diff --git a/libavcodec/flicvideo.c b/libavcodec/flicvideo.c index d6c4934e88..fe59963964 100644 --- a/libavcodec/flicvideo.c +++ b/libavcodec/flicvideo.c @@ -735,7 +735,7 @@ static av_cold int flic_decode_end(AVCodecContext *avctx) AVCodec ff_flic_decoder = { .name = "flic", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_FLIC, + .id = AV_CODEC_ID_FLIC, .priv_data_size = sizeof(FlicDecodeContext), .init = flic_decode_init, .close = flic_decode_end, diff --git a/libavcodec/flvdec.c b/libavcodec/flvdec.c index f7a512b435..dfed95bd89 100644 --- a/libavcodec/flvdec.c +++ b/libavcodec/flvdec.c @@ -121,7 +121,7 @@ int ff_flv_decode_picture_header(MpegEncContext *s) AVCodec ff_flv_decoder = { .name = "flv", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_FLV1, + .id = AV_CODEC_ID_FLV1, .priv_data_size = sizeof(MpegEncContext), .init = ff_h263_decode_init, .close = ff_h263_decode_end, diff --git a/libavcodec/flvenc.c b/libavcodec/flvenc.c index b793bd7978..3010eb0e68 100644 --- a/libavcodec/flvenc.c +++ b/libavcodec/flvenc.c @@ -89,7 +89,7 @@ FF_MPV_GENERIC_CLASS(flv) AVCodec ff_flv_encoder = { .name = "flv", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_FLV1, + .id = AV_CODEC_ID_FLV1, .priv_data_size = sizeof(MpegEncContext), .init = ff_MPV_encode_init, .encode2 = ff_MPV_encode_picture, diff --git a/libavcodec/fraps.c b/libavcodec/fraps.c index 6b2c11fe71..3107ba70bf 100644 --- a/libavcodec/fraps.c +++ b/libavcodec/fraps.c @@ -369,7 +369,7 @@ static av_cold int decode_end(AVCodecContext *avctx) AVCodec ff_fraps_decoder = { .name = "fraps", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_FRAPS, + .id = AV_CODEC_ID_FRAPS, .priv_data_size = sizeof(FrapsContext), .init = decode_init, .close = decode_end, diff --git a/libavcodec/frwu.c b/libavcodec/frwu.c index 98e4bc1aa9..8544da90f5 100644 --- a/libavcodec/frwu.c +++ b/libavcodec/frwu.c @@ -115,7 +115,7 @@ static av_cold int decode_close(AVCodecContext *avctx) AVCodec ff_frwu_decoder = { .name = "frwu", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_FRWU, + .id = AV_CODEC_ID_FRWU, .init = decode_init, .close = decode_close, .decode = decode_frame, diff --git a/libavcodec/g722dec.c b/libavcodec/g722dec.c index 72bb0ef3c7..0c08e074a9 100644 --- a/libavcodec/g722dec.c +++ b/libavcodec/g722dec.c @@ -144,7 +144,7 @@ static int g722_decode_frame(AVCodecContext *avctx, void *data, AVCodec ff_adpcm_g722_decoder = { .name = "g722", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_ADPCM_G722, + .id = AV_CODEC_ID_ADPCM_G722, .priv_data_size = sizeof(G722Context), .init = g722_decode_init, .decode = g722_decode_frame, diff --git a/libavcodec/g722enc.c b/libavcodec/g722enc.c index ae00cd7731..efc85400d3 100644 --- a/libavcodec/g722enc.c +++ b/libavcodec/g722enc.c @@ -393,7 +393,7 @@ static int g722_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, AVCodec ff_adpcm_g722_encoder = { .name = "g722", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_ADPCM_G722, + .id = AV_CODEC_ID_ADPCM_G722, .priv_data_size = sizeof(G722Context), .init = g722_encode_init, .close = g722_encode_close, diff --git a/libavcodec/g723_1.c b/libavcodec/g723_1.c index 18a5fe316a..9770dd6cf7 100644 --- a/libavcodec/g723_1.c +++ b/libavcodec/g723_1.c @@ -1175,7 +1175,7 @@ static const AVClass g723_1dec_class = { AVCodec ff_g723_1_decoder = { .name = "g723_1", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_G723_1, + .id = AV_CODEC_ID_G723_1, .priv_data_size = sizeof(G723_1_Context), .init = g723_1_decode_init, .decode = g723_1_decode_frame, diff --git a/libavcodec/g726.c b/libavcodec/g726.c index 83ce0ef083..34aa9c8468 100644 --- a/libavcodec/g726.c +++ b/libavcodec/g726.c @@ -399,7 +399,7 @@ static const AVCodecDefault defaults[] = { AVCodec ff_adpcm_g726_encoder = { .name = "g726", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_ADPCM_G726, + .id = AV_CODEC_ID_ADPCM_G726, .priv_data_size = sizeof(G726Context), .init = g726_encode_init, .encode2 = g726_encode_frame, @@ -491,7 +491,7 @@ static void g726_decode_flush(AVCodecContext *avctx) AVCodec ff_adpcm_g726_decoder = { .name = "g726", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_ADPCM_G726, + .id = AV_CODEC_ID_ADPCM_G726, .priv_data_size = sizeof(G726Context), .init = g726_decode_init, .decode = g726_decode_frame, diff --git a/libavcodec/gif.c b/libavcodec/gif.c index 7f602989e2..24773faed1 100644 --- a/libavcodec/gif.c +++ b/libavcodec/gif.c @@ -182,7 +182,7 @@ static int gif_encode_close(AVCodecContext *avctx) AVCodec ff_gif_encoder = { .name = "gif", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_GIF, + .id = AV_CODEC_ID_GIF, .priv_data_size = sizeof(GIFContext), .init = gif_encode_init, .encode2 = gif_encode_frame, diff --git a/libavcodec/gifdec.c b/libavcodec/gifdec.c index d44a535a15..68715c2f66 100644 --- a/libavcodec/gifdec.c +++ b/libavcodec/gifdec.c @@ -328,7 +328,7 @@ static av_cold int gif_decode_close(AVCodecContext *avctx) AVCodec ff_gif_decoder = { .name = "gif", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_GIF, + .id = AV_CODEC_ID_GIF, .priv_data_size = sizeof(GifState), .init = gif_decode_init, .close = gif_decode_close, diff --git a/libavcodec/gsm_parser.c b/libavcodec/gsm_parser.c index 89afe80ef0..1d381fc109 100644 --- a/libavcodec/gsm_parser.c +++ b/libavcodec/gsm_parser.c @@ -45,11 +45,11 @@ static int gsm_parse(AVCodecParserContext *s1, AVCodecContext *avctx, if (!s->block_size) { switch (avctx->codec_id) { - case CODEC_ID_GSM: + case AV_CODEC_ID_GSM: s->block_size = GSM_BLOCK_SIZE; s->duration = GSM_FRAME_SIZE; break; - case CODEC_ID_GSM_MS: + case AV_CODEC_ID_GSM_MS: s->block_size = GSM_MS_BLOCK_SIZE; s->duration = GSM_FRAME_SIZE * 2; break; @@ -82,7 +82,7 @@ static int gsm_parse(AVCodecParserContext *s1, AVCodecContext *avctx, } AVCodecParser ff_gsm_parser = { - .codec_ids = { CODEC_ID_GSM, CODEC_ID_GSM_MS }, + .codec_ids = { AV_CODEC_ID_GSM, AV_CODEC_ID_GSM_MS }, .priv_data_size = sizeof(GSMParseContext), .parser_parse = gsm_parse, .parser_close = ff_parse_close, diff --git a/libavcodec/gsmdec.c b/libavcodec/gsmdec.c index 4d5b4763e3..a5e0d7d73a 100644 --- a/libavcodec/gsmdec.c +++ b/libavcodec/gsmdec.c @@ -40,11 +40,11 @@ static av_cold int gsm_init(AVCodecContext *avctx) avctx->sample_fmt = AV_SAMPLE_FMT_S16; switch (avctx->codec_id) { - case CODEC_ID_GSM: + case AV_CODEC_ID_GSM: avctx->frame_size = GSM_FRAME_SIZE; avctx->block_align = GSM_BLOCK_SIZE; break; - case CODEC_ID_GSM_MS: + case AV_CODEC_ID_GSM_MS: avctx->frame_size = 2 * GSM_FRAME_SIZE; avctx->block_align = GSM_MS_BLOCK_SIZE; } @@ -79,7 +79,7 @@ static int gsm_decode_frame(AVCodecContext *avctx, void *data, samples = (int16_t *)s->frame.data[0]; switch (avctx->codec_id) { - case CODEC_ID_GSM: + case AV_CODEC_ID_GSM: init_get_bits(&gb, buf, buf_size * 8); if (get_bits(&gb, 4) != 0xd) av_log(avctx, AV_LOG_WARNING, "Missing GSM magic!\n"); @@ -87,7 +87,7 @@ static int gsm_decode_frame(AVCodecContext *avctx, void *data, if (res < 0) return res; break; - case CODEC_ID_GSM_MS: + case AV_CODEC_ID_GSM_MS: res = ff_msgsm_decode_block(avctx, samples, buf); if (res < 0) return res; @@ -108,7 +108,7 @@ static void gsm_flush(AVCodecContext *avctx) AVCodec ff_gsm_decoder = { .name = "gsm", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_GSM, + .id = AV_CODEC_ID_GSM, .priv_data_size = sizeof(GSMContext), .init = gsm_init, .decode = gsm_decode_frame, @@ -120,7 +120,7 @@ AVCodec ff_gsm_decoder = { AVCodec ff_gsm_ms_decoder = { .name = "gsm_ms", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_GSM_MS, + .id = AV_CODEC_ID_GSM_MS, .priv_data_size = sizeof(GSMContext), .init = gsm_init, .decode = gsm_decode_frame, diff --git a/libavcodec/h261_parser.c b/libavcodec/h261_parser.c index fb50acfc4a..8a507ee8f2 100644 --- a/libavcodec/h261_parser.c +++ b/libavcodec/h261_parser.c @@ -82,7 +82,7 @@ static int h261_parse(AVCodecParserContext *s, } AVCodecParser ff_h261_parser = { - .codec_ids = { CODEC_ID_H261 }, + .codec_ids = { AV_CODEC_ID_H261 }, .priv_data_size = sizeof(ParseContext), .parser_parse = h261_parse, .parser_close = ff_parse_close, diff --git a/libavcodec/h261dec.c b/libavcodec/h261dec.c index 23dafc6a6e..57fe57a1ef 100644 --- a/libavcodec/h261dec.c +++ b/libavcodec/h261dec.c @@ -645,7 +645,7 @@ static av_cold int h261_decode_end(AVCodecContext *avctx) AVCodec ff_h261_decoder = { .name = "h261", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_H261, + .id = AV_CODEC_ID_H261, .priv_data_size = sizeof(H261Context), .init = h261_decode_init, .close = h261_decode_end, diff --git a/libavcodec/h261enc.c b/libavcodec/h261enc.c index 2e586ba9bb..1a9a7748df 100644 --- a/libavcodec/h261enc.c +++ b/libavcodec/h261enc.c @@ -326,7 +326,7 @@ FF_MPV_GENERIC_CLASS(h261) AVCodec ff_h261_encoder = { .name = "h261", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_H261, + .id = AV_CODEC_ID_H261, .priv_data_size = sizeof(H261Context), .init = ff_MPV_encode_init, .encode2 = ff_MPV_encode_picture, diff --git a/libavcodec/h263_parser.c b/libavcodec/h263_parser.c index 98a72d92a9..71e047a77e 100644 --- a/libavcodec/h263_parser.c +++ b/libavcodec/h263_parser.c @@ -84,7 +84,7 @@ static int h263_parse(AVCodecParserContext *s, } AVCodecParser ff_h263_parser = { - .codec_ids = { CODEC_ID_H263 }, + .codec_ids = { AV_CODEC_ID_H263 }, .priv_data_size = sizeof(ParseContext), .parser_parse = h263_parse, .parser_close = ff_parse_close, diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c index 6dba8ce1a0..6bb6204d97 100644 --- a/libavcodec/h263dec.c +++ b/libavcodec/h263dec.c @@ -63,43 +63,43 @@ av_cold int ff_h263_decode_init(AVCodecContext *avctx) /* select sub codec */ switch(avctx->codec->id) { - case CODEC_ID_H263: + case AV_CODEC_ID_H263: s->unrestricted_mv= 0; avctx->chroma_sample_location = AVCHROMA_LOC_CENTER; break; - case CODEC_ID_MPEG4: + case AV_CODEC_ID_MPEG4: break; - case CODEC_ID_MSMPEG4V1: + case AV_CODEC_ID_MSMPEG4V1: s->h263_pred = 1; s->msmpeg4_version=1; break; - case CODEC_ID_MSMPEG4V2: + case AV_CODEC_ID_MSMPEG4V2: s->h263_pred = 1; s->msmpeg4_version=2; break; - case CODEC_ID_MSMPEG4V3: + case AV_CODEC_ID_MSMPEG4V3: s->h263_pred = 1; s->msmpeg4_version=3; break; - case CODEC_ID_WMV1: + case AV_CODEC_ID_WMV1: s->h263_pred = 1; s->msmpeg4_version=4; break; - case CODEC_ID_WMV2: + case AV_CODEC_ID_WMV2: s->h263_pred = 1; s->msmpeg4_version=5; break; - case CODEC_ID_VC1: - case CODEC_ID_WMV3: - case CODEC_ID_VC1IMAGE: - case CODEC_ID_WMV3IMAGE: + case AV_CODEC_ID_VC1: + case AV_CODEC_ID_WMV3: + case AV_CODEC_ID_VC1IMAGE: + case AV_CODEC_ID_WMV3IMAGE: s->h263_pred = 1; s->msmpeg4_version=6; avctx->chroma_sample_location = AVCHROMA_LOC_LEFT; break; - case CODEC_ID_H263I: + case AV_CODEC_ID_H263I: break; - case CODEC_ID_FLV1: + case AV_CODEC_ID_FLV1: s->h263_flv = 1; break; default: @@ -109,7 +109,7 @@ av_cold int ff_h263_decode_init(AVCodecContext *avctx) avctx->hwaccel= ff_find_hwaccel(avctx->codec->id, avctx->pix_fmt); /* for h263, we allocate the images after having read the header */ - if (avctx->codec->id != CODEC_ID_H263 && avctx->codec->id != CODEC_ID_MPEG4) + if (avctx->codec->id != AV_CODEC_ID_H263 && avctx->codec->id != AV_CODEC_ID_MPEG4) if (ff_MPV_common_init(s) < 0) return -1; @@ -168,7 +168,7 @@ static int decode_slice(MpegEncContext *s){ if(s->partitioned_frame){ const int qscale= s->qscale; - if(CONFIG_MPEG4_DECODER && s->codec_id==CODEC_ID_MPEG4){ + if(CONFIG_MPEG4_DECODER && s->codec_id==AV_CODEC_ID_MPEG4){ if(ff_mpeg4_decode_partitions(s) < 0) return -1; } @@ -260,7 +260,7 @@ static int decode_slice(MpegEncContext *s){ assert(s->mb_x==0 && s->mb_y==s->mb_height); - if(s->codec_id==CODEC_ID_MPEG4 + if(s->codec_id==AV_CODEC_ID_MPEG4 && (s->workaround_bugs&FF_BUG_AUTODETECT) && get_bits_left(&s->gb) >= 48 && show_bits(&s->gb, 24)==0x4010 @@ -268,7 +268,7 @@ static int decode_slice(MpegEncContext *s){ s->padding_bug_score+=32; /* try to detect the padding bug */ - if( s->codec_id==CODEC_ID_MPEG4 + if( s->codec_id==AV_CODEC_ID_MPEG4 && (s->workaround_bugs&FF_BUG_AUTODETECT) && get_bits_left(&s->gb) >=0 && get_bits_left(&s->gb) < 48 @@ -367,9 +367,9 @@ uint64_t time= rdtsc(); if(s->flags&CODEC_FLAG_TRUNCATED){ int next; - if(CONFIG_MPEG4_DECODER && s->codec_id==CODEC_ID_MPEG4){ + if(CONFIG_MPEG4_DECODER && s->codec_id==AV_CODEC_ID_MPEG4){ next= ff_mpeg4_find_frame_end(&s->parse_context, buf, buf_size); - }else if(CONFIG_H263_DECODER && s->codec_id==CODEC_ID_H263){ + }else if(CONFIG_H263_DECODER && s->codec_id==AV_CODEC_ID_H263){ next= ff_h263_find_frame_end(&s->parse_context, buf, buf_size); }else{ av_log(s->avctx, AV_LOG_ERROR, "this codec does not support truncated bitstreams\n"); @@ -416,7 +416,7 @@ retry: ret = ff_mpeg4_decode_picture_header(s, &gb); } ret = ff_mpeg4_decode_picture_header(s, &s->gb); - } else if (CONFIG_H263I_DECODER && s->codec_id == CODEC_ID_H263I) { + } else if (CONFIG_H263I_DECODER && s->codec_id == AV_CODEC_ID_H263I) { ret = ff_intel_h263_decode_picture_header(s); } else if (CONFIG_FLV_DECODER && s->h263_flv) { ret = ff_flv_decode_picture_header(s); @@ -531,7 +531,7 @@ retry: * Let us hope this at least works. */ if( s->resync_marker==0 && s->data_partitioning==0 && s->divx_version==-1 - && s->codec_id==CODEC_ID_MPEG4 && s->vo_type==0) + && s->codec_id==AV_CODEC_ID_MPEG4 && s->vo_type==0) s->workaround_bugs|= FF_BUG_NO_PADDING; if(s->lavc_build<4609U) //FIXME not sure about the version num but a 4609 file seems ok @@ -561,7 +561,7 @@ retry: s->divx_packed ? "p" : ""); #if HAVE_MMX - if (s->codec_id == CODEC_ID_MPEG4 && s->xvid_build>=0 && avctx->idct_algo == FF_IDCT_AUTO && (av_get_cpu_flags() & AV_CPU_FLAG_MMX)) { + if (s->codec_id == AV_CODEC_ID_MPEG4 && s->xvid_build>=0 && avctx->idct_algo == FF_IDCT_AUTO && (av_get_cpu_flags() & AV_CPU_FLAG_MMX)) { avctx->idct_algo= FF_IDCT_XVIDMMX; ff_dct_common_init(s); s->picture_number=0; @@ -588,7 +588,7 @@ retry: goto retry; } - if((s->codec_id==CODEC_ID_H263 || s->codec_id==CODEC_ID_H263P || s->codec_id == CODEC_ID_H263I)) + if((s->codec_id==AV_CODEC_ID_H263 || s->codec_id==AV_CODEC_ID_H263P || s->codec_id == AV_CODEC_ID_H263I)) s->gob_index = ff_h263_get_gob_height(s); // for skipping the frame @@ -676,7 +676,7 @@ retry: assert(s->bitstream_buffer_size==0); frame_end: /* divx 5.01+ bistream reorder stuff */ - if(s->codec_id==CODEC_ID_MPEG4 && s->divx_packed){ + if(s->codec_id==AV_CODEC_ID_MPEG4 && s->divx_packed){ int current_pos= get_bits_count(&s->gb)>>3; int startcode_found=0; @@ -739,7 +739,7 @@ av_log(avctx, AV_LOG_DEBUG, "%"PRId64"\n", rdtsc()-time); AVCodec ff_h263_decoder = { .name = "h263", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_H263, + .id = AV_CODEC_ID_H263, .priv_data_size = sizeof(MpegEncContext), .init = ff_h263_decode_init, .close = ff_h263_decode_end, diff --git a/libavcodec/h264.c b/libavcodec/h264.c index dcb9e00c43..2019de26ba 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -1068,7 +1068,7 @@ av_cold int ff_h264_decode_init(AVCodecContext *avctx) h->prev_poc_msb = 1 << 16; h->x264_build = -1; ff_h264_reset_sei(h); - if (avctx->codec_id == CODEC_ID_H264) { + if (avctx->codec_id == AV_CODEC_ID_H264) { if (avctx->ticks_per_frame == 1) s->avctx->time_base.den *= 2; avctx->ticks_per_frame = 2; @@ -1290,7 +1290,7 @@ int ff_h264_frame_start(H264Context *h) * SVQ3 as well as most other codecs have only last/next/current and thus * get released even with set reference, besides SVQ3 and others do not * mark frames as reference later "naturally". */ - if (s->codec_id != CODEC_ID_SVQ3) + if (s->codec_id != AV_CODEC_ID_SVQ3) s->current_picture_ptr->f.reference = 0; s->current_picture_ptr->field_poc[0] = @@ -3447,7 +3447,7 @@ static int decode_slice(struct AVCodecContext *avctx, void *arg) s->mb_skip_run = -1; h->is_complex = FRAME_MBAFF || s->picture_structure != PICT_FRAME || - s->codec_id != CODEC_ID_H264 || + s->codec_id != AV_CODEC_ID_H264 || (CONFIG_GRAY && (s->flags & CODEC_FLAG_GRAY)); if (h->pps.cabac) { @@ -4090,7 +4090,7 @@ static const AVProfile profiles[] = { AVCodec ff_h264_decoder = { .name = "h264", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_H264, + .id = AV_CODEC_ID_H264, .priv_data_size = sizeof(H264Context), .init = ff_h264_decode_init, .close = h264_decode_end, @@ -4109,7 +4109,7 @@ AVCodec ff_h264_decoder = { AVCodec ff_h264_vdpau_decoder = { .name = "h264_vdpau", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_H264, + .id = AV_CODEC_ID_H264, .priv_data_size = sizeof(H264Context), .init = ff_h264_decode_init, .close = h264_decode_end, diff --git a/libavcodec/h264_mb_template.c b/libavcodec/h264_mb_template.c index b7856cb3d8..1e5b7f1f4e 100644 --- a/libavcodec/h264_mb_template.c +++ b/libavcodec/h264_mb_template.c @@ -51,7 +51,7 @@ static av_noinline void FUNC(hl_decode_mb)(H264Context *h) int *block_offset = &h->block_offset[0]; const int transform_bypass = !SIMPLE && (s->qscale == 0 && h->sps.transform_bypass); /* is_h264 should always be true if SVQ3 is disabled. */ - const int is_h264 = !CONFIG_SVQ3_DECODER || SIMPLE || s->codec_id == CODEC_ID_H264; + const int is_h264 = !CONFIG_SVQ3_DECODER || SIMPLE || s->codec_id == AV_CODEC_ID_H264; void (*idct_add)(uint8_t *dst, DCTELEM *block, int stride); const int block_h = 16 >> s->chroma_y_shift; const int chroma422 = CHROMA422; diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c index 48215c5ada..1ad8e497f1 100644 --- a/libavcodec/h264_parser.c +++ b/libavcodec/h264_parser.c @@ -342,7 +342,7 @@ static int init(AVCodecParserContext *s) } AVCodecParser ff_h264_parser = { - .codec_ids = { CODEC_ID_H264 }, + .codec_ids = { AV_CODEC_ID_H264 }, .priv_data_size = sizeof(H264Context), .parser_init = init, .parser_parse = h264_parse, diff --git a/libavcodec/h264pred.c b/libavcodec/h264pred.c index 37a4cf1486..4334d60f0a 100644 --- a/libavcodec/h264pred.c +++ b/libavcodec/h264pred.c @@ -371,8 +371,8 @@ void ff_h264_pred_init(H264PredContext *h, int codec_id, const int bit_depth, co #define FUNCD(a) a ## _c #define H264_PRED(depth) \ - if(codec_id != CODEC_ID_RV40){\ - if(codec_id == CODEC_ID_VP8) {\ + if(codec_id != AV_CODEC_ID_RV40){\ + if(codec_id == AV_CODEC_ID_VP8) {\ h->pred4x4[VERT_PRED ]= FUNCD(pred4x4_vertical_vp8);\ h->pred4x4[HOR_PRED ]= FUNCD(pred4x4_horizontal_vp8);\ } else {\ @@ -380,19 +380,19 @@ void ff_h264_pred_init(H264PredContext *h, int codec_id, const int bit_depth, co h->pred4x4[HOR_PRED ]= FUNCC(pred4x4_horizontal , depth);\ }\ h->pred4x4[DC_PRED ]= FUNCC(pred4x4_dc , depth);\ - if(codec_id == CODEC_ID_SVQ3)\ + if(codec_id == AV_CODEC_ID_SVQ3)\ h->pred4x4[DIAG_DOWN_LEFT_PRED ]= FUNCD(pred4x4_down_left_svq3);\ else\ h->pred4x4[DIAG_DOWN_LEFT_PRED ]= FUNCC(pred4x4_down_left , depth);\ h->pred4x4[DIAG_DOWN_RIGHT_PRED]= FUNCC(pred4x4_down_right , depth);\ h->pred4x4[VERT_RIGHT_PRED ]= FUNCC(pred4x4_vertical_right , depth);\ h->pred4x4[HOR_DOWN_PRED ]= FUNCC(pred4x4_horizontal_down , depth);\ - if (codec_id == CODEC_ID_VP8) {\ + if (codec_id == AV_CODEC_ID_VP8) {\ h->pred4x4[VERT_LEFT_PRED ]= FUNCD(pred4x4_vertical_left_vp8);\ } else\ h->pred4x4[VERT_LEFT_PRED ]= FUNCC(pred4x4_vertical_left , depth);\ h->pred4x4[HOR_UP_PRED ]= FUNCC(pred4x4_horizontal_up , depth);\ - if(codec_id != CODEC_ID_VP8) {\ + if(codec_id != AV_CODEC_ID_VP8) {\ h->pred4x4[LEFT_DC_PRED ]= FUNCC(pred4x4_left_dc , depth);\ h->pred4x4[TOP_DC_PRED ]= FUNCC(pred4x4_top_dc , depth);\ h->pred4x4[DC_128_PRED ]= FUNCC(pred4x4_128_dc , depth);\ @@ -441,7 +441,7 @@ void ff_h264_pred_init(H264PredContext *h, int codec_id, const int bit_depth, co h->pred8x8[VERT_PRED8x8 ]= FUNCC(pred8x16_vertical , depth);\ h->pred8x8[HOR_PRED8x8 ]= FUNCC(pred8x16_horizontal , depth);\ }\ - if (codec_id != CODEC_ID_VP8) {\ + if (codec_id != AV_CODEC_ID_VP8) {\ if (chroma_format_idc == 1) {\ h->pred8x8[PLANE_PRED8x8]= FUNCC(pred8x8_plane , depth);\ } else {\ @@ -449,7 +449,7 @@ void ff_h264_pred_init(H264PredContext *h, int codec_id, const int bit_depth, co }\ } else\ h->pred8x8[PLANE_PRED8x8]= FUNCD(pred8x8_tm_vp8);\ - if(codec_id != CODEC_ID_RV40 && codec_id != CODEC_ID_VP8){\ + if(codec_id != AV_CODEC_ID_RV40 && codec_id != AV_CODEC_ID_VP8){\ if (chroma_format_idc == 1) {\ h->pred8x8[DC_PRED8x8 ]= FUNCC(pred8x8_dc , depth);\ h->pred8x8[LEFT_DC_PRED8x8]= FUNCC(pred8x8_left_dc , depth);\ @@ -471,7 +471,7 @@ void ff_h264_pred_init(H264PredContext *h, int codec_id, const int bit_depth, co h->pred8x8[DC_PRED8x8 ]= FUNCD(pred8x8_dc_rv40);\ h->pred8x8[LEFT_DC_PRED8x8]= FUNCD(pred8x8_left_dc_rv40);\ h->pred8x8[TOP_DC_PRED8x8 ]= FUNCD(pred8x8_top_dc_rv40);\ - if (codec_id == CODEC_ID_VP8) {\ + if (codec_id == AV_CODEC_ID_VP8) {\ h->pred8x8[DC_127_PRED8x8]= FUNCC(pred8x8_127_dc , depth);\ h->pred8x8[DC_129_PRED8x8]= FUNCC(pred8x8_129_dc , depth);\ }\ @@ -486,13 +486,13 @@ void ff_h264_pred_init(H264PredContext *h, int codec_id, const int bit_depth, co h->pred16x16[VERT_PRED8x8 ]= FUNCC(pred16x16_vertical , depth);\ h->pred16x16[HOR_PRED8x8 ]= FUNCC(pred16x16_horizontal , depth);\ switch(codec_id){\ - case CODEC_ID_SVQ3:\ + case AV_CODEC_ID_SVQ3:\ h->pred16x16[PLANE_PRED8x8 ]= FUNCD(pred16x16_plane_svq3);\ break;\ - case CODEC_ID_RV40:\ + case AV_CODEC_ID_RV40:\ h->pred16x16[PLANE_PRED8x8 ]= FUNCD(pred16x16_plane_rv40);\ break;\ - case CODEC_ID_VP8:\ + case AV_CODEC_ID_VP8:\ h->pred16x16[PLANE_PRED8x8 ]= FUNCD(pred16x16_tm_vp8);\ h->pred16x16[DC_127_PRED8x8]= FUNCC(pred16x16_127_dc , depth);\ h->pred16x16[DC_129_PRED8x8]= FUNCC(pred16x16_129_dc , depth);\ diff --git a/libavcodec/huffyuv.c b/libavcodec/huffyuv.c index 943e48c569..8e428ac4f9 100644 --- a/libavcodec/huffyuv.c +++ b/libavcodec/huffyuv.c @@ -612,7 +612,7 @@ static av_cold int encode_init(AVCodecContext *avctx) } }else s->context= 0; - if(avctx->codec->id==CODEC_ID_HUFFYUV){ + if(avctx->codec->id==AV_CODEC_ID_HUFFYUV){ if(avctx->pix_fmt==PIX_FMT_YUV420P){ av_log(avctx, AV_LOG_ERROR, "Error: YV12 is not supported by huffyuv; use vcodec=ffvhuff or format=422p\n"); return -1; @@ -1451,7 +1451,7 @@ static av_cold int encode_end(AVCodecContext *avctx) AVCodec ff_huffyuv_decoder = { .name = "huffyuv", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_HUFFYUV, + .id = AV_CODEC_ID_HUFFYUV, .priv_data_size = sizeof(HYuvContext), .init = decode_init, .close = decode_end, @@ -1467,7 +1467,7 @@ AVCodec ff_huffyuv_decoder = { AVCodec ff_ffvhuff_decoder = { .name = "ffvhuff", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_FFVHUFF, + .id = AV_CODEC_ID_FFVHUFF, .priv_data_size = sizeof(HYuvContext), .init = decode_init, .close = decode_end, @@ -1483,7 +1483,7 @@ AVCodec ff_ffvhuff_decoder = { AVCodec ff_huffyuv_encoder = { .name = "huffyuv", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_HUFFYUV, + .id = AV_CODEC_ID_HUFFYUV, .priv_data_size = sizeof(HYuvContext), .init = encode_init, .encode2 = encode_frame, @@ -1499,7 +1499,7 @@ AVCodec ff_huffyuv_encoder = { AVCodec ff_ffvhuff_encoder = { .name = "ffvhuff", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_FFVHUFF, + .id = AV_CODEC_ID_FFVHUFF, .priv_data_size = sizeof(HYuvContext), .init = encode_init, .encode2 = encode_frame, diff --git a/libavcodec/idcinvideo.c b/libavcodec/idcinvideo.c index c936ebbcc3..4a3df46cba 100644 --- a/libavcodec/idcinvideo.c +++ b/libavcodec/idcinvideo.c @@ -256,7 +256,7 @@ static av_cold int idcin_decode_end(AVCodecContext *avctx) AVCodec ff_idcin_decoder = { .name = "idcinvideo", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_IDCIN, + .id = AV_CODEC_ID_IDCIN, .priv_data_size = sizeof(IdcinContext), .init = idcin_decode_init, .close = idcin_decode_end, diff --git a/libavcodec/iff.c b/libavcodec/iff.c index c17850f850..2556acd3ee 100644 --- a/libavcodec/iff.c +++ b/libavcodec/iff.c @@ -370,7 +370,7 @@ static av_cold int decode_end(AVCodecContext *avctx) AVCodec ff_iff_ilbm_decoder = { .name = "iff_ilbm", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_IFF_ILBM, + .id = AV_CODEC_ID_IFF_ILBM, .priv_data_size = sizeof(IffContext), .init = decode_init, .close = decode_end, @@ -382,7 +382,7 @@ AVCodec ff_iff_ilbm_decoder = { AVCodec ff_iff_byterun1_decoder = { .name = "iff_byterun1", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_IFF_BYTERUN1, + .id = AV_CODEC_ID_IFF_BYTERUN1, .priv_data_size = sizeof(IffContext), .init = decode_init, .close = decode_end, diff --git a/libavcodec/imc.c b/libavcodec/imc.c index 3ae8cc927d..95495bff96 100644 --- a/libavcodec/imc.c +++ b/libavcodec/imc.c @@ -175,8 +175,8 @@ static av_cold int imc_decode_init(AVCodecContext *avctx) IMCContext *q = avctx->priv_data; double r1, r2; - if ((avctx->codec_id == CODEC_ID_IMC && avctx->channels != 1) - || (avctx->codec_id == CODEC_ID_IAC && avctx->channels > 2)) { + if ((avctx->codec_id == AV_CODEC_ID_IMC && avctx->channels != 1) + || (avctx->codec_id == AV_CODEC_ID_IAC && avctx->channels > 2)) { av_log_ask_for_sample(avctx, "Number of channels is not supported\n"); return AVERROR_PATCHWELCOME; } @@ -227,7 +227,7 @@ static av_cold int imc_decode_init(AVCodecContext *avctx) } } - if (avctx->codec_id == CODEC_ID_IAC) { + if (avctx->codec_id == AV_CODEC_ID_IAC) { iac_generate_tabs(q, avctx->sample_rate); } else { memcpy(q->cyclTab, cyclTab, sizeof(cyclTab)); @@ -841,7 +841,7 @@ static int imc_decode_block(AVCodecContext *avctx, IMCContext *q, int ch) } } } - if (avctx->codec_id == CODEC_ID_IAC) { + if (avctx->codec_id == AV_CODEC_ID_IAC) { bitscount += !!chctx->bandWidthT[BANDS - 1]; if (!(stream_format_code & 0x2)) bitscount += 16; @@ -990,7 +990,7 @@ static av_cold int imc_decode_close(AVCodecContext * avctx) AVCodec ff_imc_decoder = { .name = "imc", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_IMC, + .id = AV_CODEC_ID_IMC, .priv_data_size = sizeof(IMCContext), .init = imc_decode_init, .close = imc_decode_close, @@ -1002,7 +1002,7 @@ AVCodec ff_imc_decoder = { AVCodec ff_iac_decoder = { .name = "iac", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_IAC, + .id = AV_CODEC_ID_IAC, .priv_data_size = sizeof(IMCContext), .init = imc_decode_init, .close = imc_decode_close, diff --git a/libavcodec/imx_dump_header_bsf.c b/libavcodec/imx_dump_header_bsf.c index 3724daf008..5f5493f5a8 100644 --- a/libavcodec/imx_dump_header_bsf.c +++ b/libavcodec/imx_dump_header_bsf.c @@ -37,7 +37,7 @@ static int imx_dump_header(AVBitStreamFilterContext *bsfc, AVCodecContext *avctx static const uint8_t imx_header[16] = { 0x06,0x0e,0x2b,0x34,0x01,0x02,0x01,0x01,0x0d,0x01,0x03,0x01,0x05,0x01,0x01,0x00 }; uint8_t *poutbufp; - if (avctx->codec_id != CODEC_ID_MPEG2VIDEO) { + if (avctx->codec_id != AV_CODEC_ID_MPEG2VIDEO) { av_log(avctx, AV_LOG_ERROR, "imx bitstream filter only applies to mpeg2video codec\n"); return 0; } diff --git a/libavcodec/indeo2.c b/libavcodec/indeo2.c index 46d1cc5c74..ac0da05065 100644 --- a/libavcodec/indeo2.c +++ b/libavcodec/indeo2.c @@ -233,7 +233,7 @@ static av_cold int ir2_decode_end(AVCodecContext *avctx){ AVCodec ff_indeo2_decoder = { .name = "indeo2", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_INDEO2, + .id = AV_CODEC_ID_INDEO2, .priv_data_size = sizeof(Ir2Context), .init = ir2_decode_init, .close = ir2_decode_end, diff --git a/libavcodec/indeo3.c b/libavcodec/indeo3.c index d526d910da..0f4adc473c 100644 --- a/libavcodec/indeo3.c +++ b/libavcodec/indeo3.c @@ -1095,7 +1095,7 @@ static av_cold int decode_close(AVCodecContext *avctx) AVCodec ff_indeo3_decoder = { .name = "indeo3", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_INDEO3, + .id = AV_CODEC_ID_INDEO3, .priv_data_size = sizeof(Indeo3DecodeContext), .init = decode_init, .close = decode_close, diff --git a/libavcodec/indeo4.c b/libavcodec/indeo4.c index b4e14f625d..c2b8425b64 100644 --- a/libavcodec/indeo4.c +++ b/libavcodec/indeo4.c @@ -601,7 +601,7 @@ static av_cold int decode_init(AVCodecContext *avctx) AVCodec ff_indeo4_decoder = { .name = "indeo4", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_INDEO4, + .id = AV_CODEC_ID_INDEO4, .priv_data_size = sizeof(IVI45DecContext), .init = decode_init, .close = ff_ivi_decode_close, diff --git a/libavcodec/indeo5.c b/libavcodec/indeo5.c index d903cb2773..47437aecd4 100644 --- a/libavcodec/indeo5.c +++ b/libavcodec/indeo5.c @@ -626,7 +626,7 @@ static av_cold int decode_init(AVCodecContext *avctx) AVCodec ff_indeo5_decoder = { .name = "indeo5", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_INDEO5, + .id = AV_CODEC_ID_INDEO5, .priv_data_size = sizeof(IVI45DecContext), .init = decode_init, .close = ff_ivi_decode_close, diff --git a/libavcodec/intelh263dec.c b/libavcodec/intelh263dec.c index 4f983ab727..0701cde73e 100644 --- a/libavcodec/intelh263dec.c +++ b/libavcodec/intelh263dec.c @@ -127,7 +127,7 @@ int ff_intel_h263_decode_picture_header(MpegEncContext *s) AVCodec ff_h263i_decoder = { .name = "h263i", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_H263I, + .id = AV_CODEC_ID_H263I, .priv_data_size = sizeof(MpegEncContext), .init = ff_h263_decode_init, .close = ff_h263_decode_end, diff --git a/libavcodec/internal.h b/libavcodec/internal.h index 57d551d850..0bfc9247be 100644 --- a/libavcodec/internal.h +++ b/libavcodec/internal.h @@ -96,7 +96,7 @@ int ff_is_hwaccel_pix_fmt(enum PixelFormat pix_fmt); * @param pix_fmt the pixel format to match * @return the hardware accelerated codec, or NULL if none was found. */ -AVHWAccel *ff_find_hwaccel(enum CodecID codec_id, enum PixelFormat pix_fmt); +AVHWAccel *ff_find_hwaccel(enum AVCodecID codec_id, enum PixelFormat pix_fmt); /** * Return the index into tab at which {a,b} match elements {[0],[1]} of tab. diff --git a/libavcodec/interplayvideo.c b/libavcodec/interplayvideo.c index bee7a68e52..7d15a24ba0 100644 --- a/libavcodec/interplayvideo.c +++ b/libavcodec/interplayvideo.c @@ -1017,7 +1017,7 @@ static av_cold int ipvideo_decode_end(AVCodecContext *avctx) AVCodec ff_interplay_video_decoder = { .name = "interplayvideo", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_INTERPLAY_VIDEO, + .id = AV_CODEC_ID_INTERPLAY_VIDEO, .priv_data_size = sizeof(IpvideoContext), .init = ipvideo_decode_init, .close = ipvideo_decode_end, diff --git a/libavcodec/ituh263dec.c b/libavcodec/ituh263dec.c index 73e8bf56ef..cb26be21df 100644 --- a/libavcodec/ituh263dec.c +++ b/libavcodec/ituh263dec.c @@ -230,14 +230,14 @@ const uint8_t *ff_h263_find_resync_marker(const uint8_t *restrict p, const uint8 int ff_h263_resync(MpegEncContext *s){ int left, pos, ret; - if(s->codec_id==CODEC_ID_MPEG4){ + if(s->codec_id==AV_CODEC_ID_MPEG4){ skip_bits1(&s->gb); align_get_bits(&s->gb); } if(show_bits(&s->gb, 16)==0){ pos= get_bits_count(&s->gb); - if(CONFIG_MPEG4_DECODER && s->codec_id==CODEC_ID_MPEG4) + if(CONFIG_MPEG4_DECODER && s->codec_id==AV_CODEC_ID_MPEG4) ret= ff_mpeg4_decode_video_packet_header(s); else ret= h263_decode_gob_header(s); @@ -254,7 +254,7 @@ int ff_h263_resync(MpegEncContext *s){ GetBitContext bak= s->gb; pos= get_bits_count(&s->gb); - if(CONFIG_MPEG4_DECODER && s->codec_id==CODEC_ID_MPEG4) + if(CONFIG_MPEG4_DECODER && s->codec_id==AV_CODEC_ID_MPEG4) ret= ff_mpeg4_decode_video_packet_header(s); else ret= h263_decode_gob_header(s); @@ -458,7 +458,7 @@ static int h263_decode_block(MpegEncContext * s, DCTELEM * block, } } else if (s->mb_intra) { /* DC coef */ - if(s->codec_id == CODEC_ID_RV10){ + if(s->codec_id == AV_CODEC_ID_RV10){ #if CONFIG_RV10_DECODER if (s->rv10_version == 3 && s->pict_type == AV_PICTURE_TYPE_I) { int component, diff; @@ -517,7 +517,7 @@ retry: run = get_bits(&s->gb, 6); level = (int8_t)get_bits(&s->gb, 8); if(level == -128){ - if (s->codec_id == CODEC_ID_RV10) { + if (s->codec_id == AV_CODEC_ID_RV10) { /* XXX: should patch encoder too */ level = get_sbits(&s->gb, 12); }else{ diff --git a/libavcodec/ituh263enc.c b/libavcodec/ituh263enc.c index 752b3073a3..f95b1cd9a7 100644 --- a/libavcodec/ituh263enc.c +++ b/libavcodec/ituh263enc.c @@ -288,7 +288,7 @@ void ff_clean_h263_qscales(MpegEncContext *s){ qscale_table[ s->mb_index2xy[i] ]= qscale_table[ s->mb_index2xy[i+1] ]+2; } - if(s->codec_id != CODEC_ID_H263P){ + if(s->codec_id != AV_CODEC_ID_H263P){ for(i=1; i<s->mb_num; i++){ int mb_xy= s->mb_index2xy[i]; @@ -795,10 +795,10 @@ void ff_h263_encode_init(MpegEncContext *s) // use fcodes >1 only for mpeg4 & h263 & h263p FIXME switch(s->codec_id){ - case CODEC_ID_MPEG4: + case AV_CODEC_ID_MPEG4: s->fcode_tab= fcode_tab; break; - case CODEC_ID_H263P: + case AV_CODEC_ID_H263P: if(s->umvplus) s->fcode_tab= umv_fcode_tab; if(s->modified_quant){ @@ -810,7 +810,7 @@ void ff_h263_encode_init(MpegEncContext *s) } break; //Note for mpeg4 & h263 the dc-scale table will be set per frame as needed later - case CODEC_ID_FLV1: + case AV_CODEC_ID_FLV1: if (s->h263_flv > 1) { s->min_qcoeff= -1023; s->max_qcoeff= 1023; diff --git a/libavcodec/ivi_common.c b/libavcodec/ivi_common.c index cbcd970980..715a536d38 100644 --- a/libavcodec/ivi_common.c +++ b/libavcodec/ivi_common.c @@ -767,7 +767,7 @@ int ff_ivi_decode_frame(AVCodecContext *avctx, void *data, int *data_size, /* If the bidirectional mode is enabled, next I and the following P frame will */ /* be sent together. Unfortunately the approach below seems to be the only way */ /* to handle the B-frames mode. That's exactly the same Intel decoders do. */ - if (avctx->codec_id == CODEC_ID_INDEO4 && ctx->frame_type == 0/*FRAMETYPE_INTRA*/) { + if (avctx->codec_id == AV_CODEC_ID_INDEO4 && ctx->frame_type == 0/*FRAMETYPE_INTRA*/) { while (get_bits(&ctx->gb, 8)); // skip version string skip_bits_long(&ctx->gb, 64); // skip padding, TODO: implement correct 8-bytes alignment if (get_bits_left(&ctx->gb) > 18 && show_bits(&ctx->gb, 18) == 0x3FFF8) @@ -784,7 +784,7 @@ int ff_ivi_decode_frame(AVCodecContext *avctx, void *data, int *data_size, } if (ctx->is_scalable) { - if (avctx->codec_id == CODEC_ID_INDEO4) + if (avctx->codec_id == AV_CODEC_ID_INDEO4) ff_ivi_recompose_haar(&ctx->planes[0], ctx->frame.data[0], ctx->frame.linesize[0], 4); else ff_ivi_recompose53 (&ctx->planes[0], ctx->frame.data[0], ctx->frame.linesize[0], 4); @@ -817,7 +817,7 @@ av_cold int ff_ivi_decode_close(AVCodecContext *avctx) avctx->release_buffer(avctx, &ctx->frame); #if IVI4_STREAM_ANALYSER - if (avctx->codec_id == CODEC_ID_INDEO4) { + if (avctx->codec_id == AV_CODEC_ID_INDEO4) { if (ctx->is_scalable) av_log(avctx, AV_LOG_ERROR, "This video uses scalability mode!\n"); if (ctx->uses_tiling) diff --git a/libavcodec/jpeglsdec.c b/libavcodec/jpeglsdec.c index 25b3c3068f..48974dd8d3 100644 --- a/libavcodec/jpeglsdec.c +++ b/libavcodec/jpeglsdec.c @@ -365,7 +365,7 @@ int ff_jpegls_decode_picture(MJpegDecodeContext *s, int near, int point_transfor AVCodec ff_jpegls_decoder = { .name = "jpegls", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_JPEGLS, + .id = AV_CODEC_ID_JPEGLS, .priv_data_size = sizeof(MJpegDecodeContext), .init = ff_mjpeg_decode_init, .close = ff_mjpeg_decode_end, diff --git a/libavcodec/jpeglsenc.c b/libavcodec/jpeglsenc.c index 805c48e507..15e0d111ec 100644 --- a/libavcodec/jpeglsenc.c +++ b/libavcodec/jpeglsenc.c @@ -395,7 +395,7 @@ static av_cold int encode_init_ls(AVCodecContext *ctx) { AVCodec ff_jpegls_encoder = { //FIXME avoid MPV_* lossless JPEG should not need them .name = "jpegls", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_JPEGLS, + .id = AV_CODEC_ID_JPEGLS, .priv_data_size = sizeof(JpeglsContext), .init = encode_init_ls, .encode2 = encode_picture_ls, diff --git a/libavcodec/jvdec.c b/libavcodec/jvdec.c index ffa2f5a558..2a7b52cd62 100644 --- a/libavcodec/jvdec.c +++ b/libavcodec/jvdec.c @@ -206,7 +206,7 @@ AVCodec ff_jv_decoder = { .name = "jv", .long_name = NULL_IF_CONFIG_SMALL("Bitmap Brothers JV video"), .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_JV, + .id = AV_CODEC_ID_JV, .priv_data_size = sizeof(JvContext), .init = decode_init, .close = decode_close, diff --git a/libavcodec/kgv1dec.c b/libavcodec/kgv1dec.c index 2fd6bbcdd6..5977e83635 100644 --- a/libavcodec/kgv1dec.c +++ b/libavcodec/kgv1dec.c @@ -183,7 +183,7 @@ static av_cold int decode_end(AVCodecContext *avctx) AVCodec ff_kgv1_decoder = { .name = "kgv1", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_KGV1, + .id = AV_CODEC_ID_KGV1, .priv_data_size = sizeof(KgvContext), .init = decode_init, .close = decode_end, diff --git a/libavcodec/kmvc.c b/libavcodec/kmvc.c index 8727883704..a8c6dbc1cf 100644 --- a/libavcodec/kmvc.c +++ b/libavcodec/kmvc.c @@ -422,7 +422,7 @@ static av_cold int decode_end(AVCodecContext * avctx) AVCodec ff_kmvc_decoder = { .name = "kmvc", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_KMVC, + .id = AV_CODEC_ID_KMVC, .priv_data_size = sizeof(KmvcContext), .init = decode_init, .close = decode_end, diff --git a/libavcodec/lagarith.c b/libavcodec/lagarith.c index 124ecee161..665bd963b9 100644 --- a/libavcodec/lagarith.c +++ b/libavcodec/lagarith.c @@ -687,7 +687,7 @@ static av_cold int lag_decode_end(AVCodecContext *avctx) AVCodec ff_lagarith_decoder = { .name = "lagarith", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_LAGARITH, + .id = AV_CODEC_ID_LAGARITH, .priv_data_size = sizeof(LagarithContext), .init = lag_decode_init, .close = lag_decode_end, diff --git a/libavcodec/latm_parser.c b/libavcodec/latm_parser.c index bd941f6dc3..6fdb897375 100644 --- a/libavcodec/latm_parser.c +++ b/libavcodec/latm_parser.c @@ -106,7 +106,7 @@ static int latm_parse(AVCodecParserContext *s1, AVCodecContext *avctx, } AVCodecParser ff_aac_latm_parser = { - .codec_ids = { CODEC_ID_AAC_LATM }, + .codec_ids = { AV_CODEC_ID_AAC_LATM }, .priv_data_size = sizeof(LATMParseContext), .parser_parse = latm_parse, .parser_close = ff_parse_close diff --git a/libavcodec/lcldec.c b/libavcodec/lcldec.c index 0b08900f5d..d2482138ab 100644 --- a/libavcodec/lcldec.c +++ b/libavcodec/lcldec.c @@ -189,7 +189,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac /* Decompress frame */ switch (avctx->codec_id) { - case CODEC_ID_MSZH: + case AV_CODEC_ID_MSZH: switch (c->compression) { case COMP_MSZH: if (c->flags & FLAG_MULTITHREAD) { @@ -252,7 +252,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac } break; #if CONFIG_ZLIB_DECODER - case CODEC_ID_ZLIB: + case AV_CODEC_ID_ZLIB: /* Using the original dll with normal compression (-1) and RGB format * gives a file with ZLIB fourcc, but frame is really uncompressed. * To be sure that's true check also frame size */ @@ -290,7 +290,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac /* Apply PNG filter */ - if (avctx->codec_id == CODEC_ID_ZLIB && (c->flags & FLAG_PNGFILTER)) { + if (avctx->codec_id == AV_CODEC_ID_ZLIB && (c->flags & FLAG_PNGFILTER)) { switch (c->imgtype) { case IMGTYPE_YUV111: case IMGTYPE_RGB24: @@ -485,8 +485,8 @@ static av_cold int decode_init(AVCodecContext *avctx) } /* Check codec type */ - if ((avctx->codec_id == CODEC_ID_MSZH && avctx->extradata[7] != CODEC_MSZH) || - (avctx->codec_id == CODEC_ID_ZLIB && avctx->extradata[7] != CODEC_ZLIB)) { + if ((avctx->codec_id == AV_CODEC_ID_MSZH && avctx->extradata[7] != CODEC_MSZH) || + (avctx->codec_id == AV_CODEC_ID_ZLIB && avctx->extradata[7] != CODEC_ZLIB)) { av_log(avctx, AV_LOG_ERROR, "Codec id and codec type mismatch. This should not happen.\n"); } @@ -536,7 +536,7 @@ static av_cold int decode_init(AVCodecContext *avctx) /* Detect compression method */ c->compression = (int8_t)avctx->extradata[5]; switch (avctx->codec_id) { - case CODEC_ID_MSZH: + case AV_CODEC_ID_MSZH: switch (c->compression) { case COMP_MSZH: av_log(avctx, AV_LOG_DEBUG, "Compression enabled.\n"); @@ -551,7 +551,7 @@ static av_cold int decode_init(AVCodecContext *avctx) } break; #if CONFIG_ZLIB_DECODER - case CODEC_ID_ZLIB: + case AV_CODEC_ID_ZLIB: switch (c->compression) { case COMP_ZLIB_HISPEED: av_log(avctx, AV_LOG_DEBUG, "High speed compression.\n"); @@ -590,14 +590,14 @@ static av_cold int decode_init(AVCodecContext *avctx) av_log(avctx, AV_LOG_DEBUG, "Multithread encoder flag set.\n"); if (c->flags & FLAG_NULLFRAME) av_log(avctx, AV_LOG_DEBUG, "Nullframe insertion flag set.\n"); - if (avctx->codec_id == CODEC_ID_ZLIB && (c->flags & FLAG_PNGFILTER)) + if (avctx->codec_id == AV_CODEC_ID_ZLIB && (c->flags & FLAG_PNGFILTER)) av_log(avctx, AV_LOG_DEBUG, "PNG filter flag set.\n"); if (c->flags & FLAGMASK_UNUSED) av_log(avctx, AV_LOG_ERROR, "Unknown flag set (%d).\n", c->flags); /* If needed init zlib */ #if CONFIG_ZLIB_DECODER - if (avctx->codec_id == CODEC_ID_ZLIB) { + if (avctx->codec_id == AV_CODEC_ID_ZLIB) { int zret; c->zstream.zalloc = Z_NULL; c->zstream.zfree = Z_NULL; @@ -627,7 +627,7 @@ static av_cold int decode_end(AVCodecContext *avctx) if (c->pic.data[0]) avctx->release_buffer(avctx, &c->pic); #if CONFIG_ZLIB_DECODER - if (avctx->codec_id == CODEC_ID_ZLIB) + if (avctx->codec_id == AV_CODEC_ID_ZLIB) inflateEnd(&c->zstream); #endif @@ -638,7 +638,7 @@ static av_cold int decode_end(AVCodecContext *avctx) AVCodec ff_mszh_decoder = { .name = "mszh", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_MSZH, + .id = AV_CODEC_ID_MSZH, .priv_data_size = sizeof(LclDecContext), .init = decode_init, .close = decode_end, @@ -652,7 +652,7 @@ AVCodec ff_mszh_decoder = { AVCodec ff_zlib_decoder = { .name = "zlib", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_ZLIB, + .id = AV_CODEC_ID_ZLIB, .priv_data_size = sizeof(LclDecContext), .init = decode_init, .close = decode_end, diff --git a/libavcodec/lclenc.c b/libavcodec/lclenc.c index 9906fd11f2..c5c2ff2acb 100644 --- a/libavcodec/lclenc.c +++ b/libavcodec/lclenc.c @@ -185,7 +185,7 @@ static av_cold int encode_end(AVCodecContext *avctx) AVCodec ff_zlib_encoder = { .name = "zlib", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_ZLIB, + .id = AV_CODEC_ID_ZLIB, .priv_data_size = sizeof(LclEncContext), .init = encode_init, .encode2 = encode_frame, diff --git a/libavcodec/libfaac.c b/libavcodec/libfaac.c index 50860f2967..19f55aac1d 100644 --- a/libavcodec/libfaac.c +++ b/libavcodec/libfaac.c @@ -238,7 +238,7 @@ static const uint64_t faac_channel_layouts[] = { AVCodec ff_libfaac_encoder = { .name = "libfaac", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_AAC, + .id = AV_CODEC_ID_AAC, .priv_data_size = sizeof(FaacAudioContext), .init = Faac_encode_init, .encode2 = Faac_encode_frame, diff --git a/libavcodec/libfdk-aacenc.c b/libavcodec/libfdk-aacenc.c index 4d7aa7b26a..659874bf64 100644 --- a/libavcodec/libfdk-aacenc.c +++ b/libavcodec/libfdk-aacenc.c @@ -395,7 +395,7 @@ static const uint64_t aac_channel_layout[] = { AVCodec ff_libfdk_aac_encoder = { .name = "libfdk_aac", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_AAC, + .id = AV_CODEC_ID_AAC, .priv_data_size = sizeof(AACContext), .init = aac_encode_init, .encode2 = aac_encode_frame, diff --git a/libavcodec/libgsm.c b/libavcodec/libgsm.c index 5e5d9d6a5c..c35acd3bb5 100644 --- a/libavcodec/libgsm.c +++ b/libavcodec/libgsm.c @@ -58,11 +58,11 @@ static av_cold int libgsm_encode_init(AVCodecContext *avctx) { avctx->priv_data = gsm_create(); switch(avctx->codec_id) { - case CODEC_ID_GSM: + case AV_CODEC_ID_GSM: avctx->frame_size = GSM_FRAME_SIZE; avctx->block_align = GSM_BLOCK_SIZE; break; - case CODEC_ID_GSM_MS: { + case AV_CODEC_ID_GSM_MS: { int one = 1; gsm_option(avctx->priv_data, GSM_OPT_WAV49, &one); avctx->frame_size = 2*GSM_FRAME_SIZE; @@ -103,10 +103,10 @@ static int libgsm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, } switch(avctx->codec_id) { - case CODEC_ID_GSM: + case AV_CODEC_ID_GSM: gsm_encode(state, samples, avpkt->data); break; - case CODEC_ID_GSM_MS: + case AV_CODEC_ID_GSM_MS: gsm_encode(state, samples, avpkt->data); gsm_encode(state, samples + GSM_FRAME_SIZE, avpkt->data + 32); } @@ -119,7 +119,7 @@ static int libgsm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, AVCodec ff_libgsm_encoder = { .name = "libgsm", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_GSM, + .id = AV_CODEC_ID_GSM, .init = libgsm_encode_init, .encode2 = libgsm_encode_frame, .close = libgsm_encode_close, @@ -131,7 +131,7 @@ AVCodec ff_libgsm_encoder = { AVCodec ff_libgsm_ms_encoder = { .name = "libgsm_ms", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_GSM_MS, + .id = AV_CODEC_ID_GSM_MS, .init = libgsm_encode_init, .encode2 = libgsm_encode_frame, .close = libgsm_encode_close, @@ -165,11 +165,11 @@ static av_cold int libgsm_decode_init(AVCodecContext *avctx) { s->state = gsm_create(); switch(avctx->codec_id) { - case CODEC_ID_GSM: + case AV_CODEC_ID_GSM: avctx->frame_size = GSM_FRAME_SIZE; avctx->block_align = GSM_BLOCK_SIZE; break; - case CODEC_ID_GSM_MS: { + case AV_CODEC_ID_GSM_MS: { int one = 1; gsm_option(s->state, GSM_OPT_WAV49, &one); avctx->frame_size = 2 * GSM_FRAME_SIZE; @@ -232,14 +232,14 @@ static void libgsm_flush(AVCodecContext *avctx) { gsm_destroy(s->state); s->state = gsm_create(); - if (avctx->codec_id == CODEC_ID_GSM_MS) + if (avctx->codec_id == AV_CODEC_ID_GSM_MS) gsm_option(s->state, GSM_OPT_WAV49, &one); } AVCodec ff_libgsm_decoder = { .name = "libgsm", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_GSM, + .id = AV_CODEC_ID_GSM, .priv_data_size = sizeof(LibGSMDecodeContext), .init = libgsm_decode_init, .close = libgsm_decode_close, @@ -252,7 +252,7 @@ AVCodec ff_libgsm_decoder = { AVCodec ff_libgsm_ms_decoder = { .name = "libgsm_ms", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_GSM_MS, + .id = AV_CODEC_ID_GSM_MS, .priv_data_size = sizeof(LibGSMDecodeContext), .init = libgsm_decode_init, .close = libgsm_decode_close, diff --git a/libavcodec/libilbc.c b/libavcodec/libilbc.c index 5179c375b2..5a98012a96 100644 --- a/libavcodec/libilbc.c +++ b/libavcodec/libilbc.c @@ -106,7 +106,7 @@ static int ilbc_decode_frame(AVCodecContext *avctx, void *data, AVCodec ff_libilbc_decoder = { .name = "libilbc", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_ILBC, + .id = AV_CODEC_ID_ILBC, .priv_data_size = sizeof(ILBCDecContext), .init = ilbc_decode_init, .decode = ilbc_decode_frame, @@ -196,7 +196,7 @@ static const AVCodecDefault ilbc_encode_defaults[] = { AVCodec ff_libilbc_encoder = { .name = "libilbc", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_ILBC, + .id = AV_CODEC_ID_ILBC, .priv_data_size = sizeof(ILBCEncContext), .init = ilbc_encode_init, .encode2 = ilbc_encode_frame, diff --git a/libavcodec/libmp3lame.c b/libavcodec/libmp3lame.c index a747f656cc..75b6c6758a 100644 --- a/libavcodec/libmp3lame.c +++ b/libavcodec/libmp3lame.c @@ -293,7 +293,7 @@ static const int libmp3lame_sample_rates[] = { AVCodec ff_libmp3lame_encoder = { .name = "libmp3lame", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_MP3, + .id = AV_CODEC_ID_MP3, .priv_data_size = sizeof(LAMEContext), .init = mp3lame_encode_init, .encode2 = mp3lame_encode_frame, diff --git a/libavcodec/libopencore-amr.c b/libavcodec/libopencore-amr.c index 61bfcc0398..80b79f0184 100644 --- a/libavcodec/libopencore-amr.c +++ b/libavcodec/libopencore-amr.c @@ -27,7 +27,7 @@ static void amr_decode_fix_avctx(AVCodecContext *avctx) { - const int is_amr_wb = 1 + (avctx->codec_id == CODEC_ID_AMR_WB); + const int is_amr_wb = 1 + (avctx->codec_id == AV_CODEC_ID_AMR_WB); if (!avctx->sample_rate) avctx->sample_rate = 8000 * is_amr_wb; @@ -174,7 +174,7 @@ static int amr_nb_decode_frame(AVCodecContext *avctx, void *data, AVCodec ff_libopencore_amrnb_decoder = { .name = "libopencore_amrnb", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_AMR_NB, + .id = AV_CODEC_ID_AMR_NB, .priv_data_size = sizeof(AMRContext), .init = amr_nb_decode_init, .close = amr_nb_decode_close, @@ -291,7 +291,7 @@ static int amr_nb_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, AVCodec ff_libopencore_amrnb_encoder = { .name = "libopencore_amrnb", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_AMR_NB, + .id = AV_CODEC_ID_AMR_NB, .priv_data_size = sizeof(AMRContext), .init = amr_nb_encode_init, .encode2 = amr_nb_encode_frame, @@ -380,7 +380,7 @@ static int amr_wb_decode_close(AVCodecContext *avctx) AVCodec ff_libopencore_amrwb_decoder = { .name = "libopencore_amrwb", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_AMR_WB, + .id = AV_CODEC_ID_AMR_WB, .priv_data_size = sizeof(AMRWBContext), .init = amr_wb_decode_init, .close = amr_wb_decode_close, diff --git a/libavcodec/libopenjpegdec.c b/libavcodec/libopenjpegdec.c index ed6b141cba..17312ffbd4 100644 --- a/libavcodec/libopenjpegdec.c +++ b/libavcodec/libopenjpegdec.c @@ -446,7 +446,7 @@ static const AVClass class = { AVCodec ff_libopenjpeg_decoder = { .name = "libopenjpeg", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_JPEG2000, + .id = AV_CODEC_ID_JPEG2000, .priv_data_size = sizeof(LibOpenJPEGContext), .init = libopenjpeg_decode_init, .close = libopenjpeg_decode_close, diff --git a/libavcodec/libopenjpegenc.c b/libavcodec/libopenjpegenc.c index 257386cbfa..93c82cf634 100644 --- a/libavcodec/libopenjpegenc.c +++ b/libavcodec/libopenjpegenc.c @@ -414,7 +414,7 @@ static const AVClass class = { AVCodec ff_libopenjpeg_encoder = { .name = "libopenjpeg", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_JPEG2000, + .id = AV_CODEC_ID_JPEG2000, .priv_data_size = sizeof(LibOpenJPEGContext), .init = libopenjpeg_encode_init, .encode2 = libopenjpeg_encode_frame, diff --git a/libavcodec/libschroedingerdec.c b/libavcodec/libschroedingerdec.c index 77f42899c1..7d942e77d0 100644 --- a/libavcodec/libschroedingerdec.c +++ b/libavcodec/libschroedingerdec.c @@ -385,7 +385,7 @@ static void libschroedinger_flush(AVCodecContext *avccontext) AVCodec ff_libschroedinger_decoder = { .name = "libschroedinger", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_DIRAC, + .id = AV_CODEC_ID_DIRAC, .priv_data_size = sizeof(SchroDecoderParams), .init = libschroedinger_decode_init, .close = libschroedinger_decode_close, diff --git a/libavcodec/libschroedingerenc.c b/libavcodec/libschroedingerenc.c index 63d354e04e..865b093fa7 100644 --- a/libavcodec/libschroedingerenc.c +++ b/libavcodec/libschroedingerenc.c @@ -442,7 +442,7 @@ static int libschroedinger_encode_close(AVCodecContext *avccontext) AVCodec ff_libschroedinger_encoder = { .name = "libschroedinger", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_DIRAC, + .id = AV_CODEC_ID_DIRAC, .priv_data_size = sizeof(SchroEncoderParams), .init = libschroedinger_encode_init, .encode2 = libschroedinger_encode_frame, diff --git a/libavcodec/libspeexdec.c b/libavcodec/libspeexdec.c index 5730632055..e0ce7bb00e 100644 --- a/libavcodec/libspeexdec.c +++ b/libavcodec/libspeexdec.c @@ -161,7 +161,7 @@ static av_cold void libspeex_decode_flush(AVCodecContext *avctx) AVCodec ff_libspeex_decoder = { .name = "libspeex", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_SPEEX, + .id = AV_CODEC_ID_SPEEX, .priv_data_size = sizeof(LibSpeexContext), .init = libspeex_decode_init, .close = libspeex_decode_close, diff --git a/libavcodec/libspeexenc.c b/libavcodec/libspeexenc.c index 8a869a0973..18c43adf8a 100644 --- a/libavcodec/libspeexenc.c +++ b/libavcodec/libspeexenc.c @@ -328,7 +328,7 @@ static const AVCodecDefault defaults[] = { AVCodec ff_libspeex_encoder = { .name = "libspeex", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_SPEEX, + .id = AV_CODEC_ID_SPEEX, .priv_data_size = sizeof(LibSpeexEncContext), .init = encode_init, .encode2 = encode_frame, diff --git a/libavcodec/libtheoraenc.c b/libavcodec/libtheoraenc.c index 769b9a56a8..bb2bd087b0 100644 --- a/libavcodec/libtheoraenc.c +++ b/libavcodec/libtheoraenc.c @@ -363,7 +363,7 @@ static av_cold int encode_close(AVCodecContext* avc_context) AVCodec ff_libtheora_encoder = { .name = "libtheora", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_THEORA, + .id = AV_CODEC_ID_THEORA, .priv_data_size = sizeof(TheoraContext), .init = encode_init, .close = encode_close, diff --git a/libavcodec/libvo-aacenc.c b/libavcodec/libvo-aacenc.c index 44bad97f33..d09f1ed109 100644 --- a/libavcodec/libvo-aacenc.c +++ b/libavcodec/libvo-aacenc.c @@ -190,7 +190,7 @@ static int aac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, AVCodec ff_libvo_aacenc_encoder = { .name = "libvo_aacenc", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_AAC, + .id = AV_CODEC_ID_AAC, .priv_data_size = sizeof(AACContext), .init = aac_encode_init, .encode2 = aac_encode_frame, diff --git a/libavcodec/libvo-amrwbenc.c b/libavcodec/libvo-amrwbenc.c index 0e5ee75096..b1584dd1b8 100644 --- a/libavcodec/libvo-amrwbenc.c +++ b/libavcodec/libvo-amrwbenc.c @@ -143,7 +143,7 @@ static int amr_wb_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, AVCodec ff_libvo_amrwbenc_encoder = { .name = "libvo_amrwbenc", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_AMR_WB, + .id = AV_CODEC_ID_AMR_WB, .priv_data_size = sizeof(AMRWBContext), .init = amr_wb_encode_init, .encode2 = amr_wb_encode_frame, diff --git a/libavcodec/libvorbis.c b/libavcodec/libvorbis.c index 1d7b7ef49b..ef87cd77d0 100644 --- a/libavcodec/libvorbis.c +++ b/libavcodec/libvorbis.c @@ -351,7 +351,7 @@ static int oggvorbis_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, AVCodec ff_libvorbis_encoder = { .name = "libvorbis", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_VORBIS, + .id = AV_CODEC_ID_VORBIS, .priv_data_size = sizeof(OggVorbisContext), .init = oggvorbis_encode_init, .encode2 = oggvorbis_encode_frame, diff --git a/libavcodec/libvpxdec.c b/libavcodec/libvpxdec.c index 917a50219c..402998d67b 100644 --- a/libavcodec/libvpxdec.c +++ b/libavcodec/libvpxdec.c @@ -114,7 +114,7 @@ static av_cold int vp8_free(AVCodecContext *avctx) AVCodec ff_libvpx_decoder = { .name = "libvpx", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_VP8, + .id = AV_CODEC_ID_VP8, .priv_data_size = sizeof(VP8Context), .init = vp8_init, .close = vp8_free, diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c index 7986f6a0e2..74e778068d 100644 --- a/libavcodec/libvpxenc.c +++ b/libavcodec/libvpxenc.c @@ -568,7 +568,7 @@ static const AVCodecDefault defaults[] = { AVCodec ff_libvpx_encoder = { .name = "libvpx", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_VP8, + .id = AV_CODEC_ID_VP8, .priv_data_size = sizeof(VP8Context), .init = vp8_init, .encode2 = vp8_encode, diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c index adda8817ec..16df833b63 100644 --- a/libavcodec/libx264.c +++ b/libavcodec/libx264.c @@ -554,7 +554,7 @@ static const AVCodecDefault x264_defaults[] = { AVCodec ff_libx264_encoder = { .name = "libx264", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_H264, + .id = AV_CODEC_ID_H264, .priv_data_size = sizeof(X264Context), .init = X264_init, .encode2 = X264_frame, diff --git a/libavcodec/libxavs.c b/libavcodec/libxavs.c index 4713d75a79..0e1c3869a1 100644 --- a/libavcodec/libxavs.c +++ b/libavcodec/libxavs.c @@ -419,7 +419,7 @@ static const AVCodecDefault xavs_defaults[] = { AVCodec ff_libxavs_encoder = { .name = "libxavs", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_CAVS, + .id = AV_CODEC_ID_CAVS, .priv_data_size = sizeof(XavsContext), .init = XAVS_init, .encode2 = XAVS_frame, diff --git a/libavcodec/libxvid.c b/libavcodec/libxvid.c index 3d63beaffd..e43b52cdf7 100644 --- a/libavcodec/libxvid.c +++ b/libavcodec/libxvid.c @@ -592,7 +592,7 @@ static av_cold int xvid_encode_init(AVCodecContext *avctx) { if( xvid_flags & CODEC_FLAG_GLOBAL_HEADER ) { /* In this case, we are claiming to be MPEG4 */ x->quicktime_format = 1; - avctx->codec_id = CODEC_ID_MPEG4; + avctx->codec_id = AV_CODEC_ID_MPEG4; } else { /* We are claiming to be Xvid */ x->quicktime_format = 0; @@ -778,7 +778,7 @@ static av_cold int xvid_encode_close(AVCodecContext *avctx) { AVCodec ff_libxvid_encoder = { .name = "libxvid", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_MPEG4, + .id = AV_CODEC_ID_MPEG4, .priv_data_size = sizeof(struct xvid_context), .init = xvid_encode_init, .encode2 = xvid_encode_frame, diff --git a/libavcodec/ljpegenc.c b/libavcodec/ljpegenc.c index a73ef45500..41db067342 100644 --- a/libavcodec/ljpegenc.c +++ b/libavcodec/ljpegenc.c @@ -207,7 +207,7 @@ static int encode_picture_lossless(AVCodecContext *avctx, AVPacket *pkt, AVCodec ff_ljpeg_encoder = { //FIXME avoid MPV_* lossless JPEG should not need them .name = "ljpeg", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_LJPEG, + .id = AV_CODEC_ID_LJPEG, .priv_data_size = sizeof(MpegEncContext), .init = ff_MPV_encode_init, .encode2 = encode_picture_lossless, diff --git a/libavcodec/loco.c b/libavcodec/loco.c index b86f5fe6a3..f8e41684d0 100644 --- a/libavcodec/loco.c +++ b/libavcodec/loco.c @@ -288,7 +288,7 @@ static av_cold int decode_end(AVCodecContext *avctx){ AVCodec ff_loco_decoder = { .name = "loco", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_LOCO, + .id = AV_CODEC_ID_LOCO, .priv_data_size = sizeof(LOCOContext), .init = decode_init, .close = decode_end, diff --git a/libavcodec/mace.c b/libavcodec/mace.c index e1402c7b9d..00f6f894fe 100644 --- a/libavcodec/mace.c +++ b/libavcodec/mace.c @@ -249,7 +249,7 @@ static int mace_decode_frame(AVCodecContext *avctx, void *data, int16_t *samples; MACEContext *ctx = avctx->priv_data; int i, j, k, l, ret; - int is_mace3 = (avctx->codec_id == CODEC_ID_MACE3); + int is_mace3 = (avctx->codec_id == AV_CODEC_ID_MACE3); /* get output buffer */ ctx->frame.nb_samples = 3 * (buf_size << (1 - is_mace3)) / avctx->channels; @@ -292,7 +292,7 @@ static int mace_decode_frame(AVCodecContext *avctx, void *data, AVCodec ff_mace3_decoder = { .name = "mace3", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_MACE3, + .id = AV_CODEC_ID_MACE3, .priv_data_size = sizeof(MACEContext), .init = mace_decode_init, .decode = mace_decode_frame, @@ -303,7 +303,7 @@ AVCodec ff_mace3_decoder = { AVCodec ff_mace6_decoder = { .name = "mace6", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_MACE6, + .id = AV_CODEC_ID_MACE6, .priv_data_size = sizeof(MACEContext), .init = mace_decode_init, .decode = mace_decode_frame, diff --git a/libavcodec/mdec.c b/libavcodec/mdec.c index cf619c4fe8..1b90ec984b 100644 --- a/libavcodec/mdec.c +++ b/libavcodec/mdec.c @@ -267,7 +267,7 @@ static av_cold int decode_end(AVCodecContext *avctx){ AVCodec ff_mdec_decoder = { .name = "mdec", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_MDEC, + .id = AV_CODEC_ID_MDEC, .priv_data_size = sizeof(MDECContext), .init = decode_init, .close = decode_end, diff --git a/libavcodec/mimic.c b/libavcodec/mimic.c index 4d81a37259..5aa6a7b3bb 100644 --- a/libavcodec/mimic.c +++ b/libavcodec/mimic.c @@ -423,7 +423,7 @@ static av_cold int mimic_decode_end(AVCodecContext *avctx) AVCodec ff_mimic_decoder = { .name = "mimic", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_MIMIC, + .id = AV_CODEC_ID_MIMIC, .priv_data_size = sizeof(MimicContext), .init = mimic_decode_init, .close = mimic_decode_end, diff --git a/libavcodec/mjpeg_parser.c b/libavcodec/mjpeg_parser.c index 5b83e59dcd..ab654614eb 100644 --- a/libavcodec/mjpeg_parser.c +++ b/libavcodec/mjpeg_parser.c @@ -97,7 +97,7 @@ static int jpeg_parse(AVCodecParserContext *s, AVCodecParser ff_mjpeg_parser = { - .codec_ids = { CODEC_ID_MJPEG }, + .codec_ids = { AV_CODEC_ID_MJPEG }, .priv_data_size = sizeof(ParseContext), .parser_parse = jpeg_parse, .parser_close = ff_parse_close, diff --git a/libavcodec/mjpega_dump_header_bsf.c b/libavcodec/mjpega_dump_header_bsf.c index 2a181fc386..ed32d5a48f 100644 --- a/libavcodec/mjpega_dump_header_bsf.c +++ b/libavcodec/mjpega_dump_header_bsf.c @@ -38,7 +38,7 @@ static int mjpega_dump_header(AVBitStreamFilterContext *bsfc, AVCodecContext *av unsigned dqt = 0, dht = 0, sof0 = 0; int i; - if (avctx->codec_id != CODEC_ID_MJPEG) { + if (avctx->codec_id != AV_CODEC_ID_MJPEG) { av_log(avctx, AV_LOG_ERROR, "mjpega bitstream filter only applies to mjpeg codec\n"); return 0; } diff --git a/libavcodec/mjpegbdec.c b/libavcodec/mjpegbdec.c index 7ba5abf9bd..8c8514f2c5 100644 --- a/libavcodec/mjpegbdec.c +++ b/libavcodec/mjpegbdec.c @@ -155,7 +155,7 @@ read_header: AVCodec ff_mjpegb_decoder = { .name = "mjpegb", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_MJPEGB, + .id = AV_CODEC_ID_MJPEGB, .priv_data_size = sizeof(MJpegDecodeContext), .init = ff_mjpeg_decode_init, .close = ff_mjpeg_decode_end, diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index 7864d3881e..c509402151 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -113,7 +113,7 @@ av_cold int ff_mjpeg_decode_init(AVCodecContext *avctx) s->interlace_polarity = 1; /* bottom field first */ av_log(avctx, AV_LOG_DEBUG, "mjpeg bottom field first\n"); } - if (avctx->codec->id == CODEC_ID_AMV) + if (avctx->codec->id == AV_CODEC_ID_AMV) s->flipped = 1; return 0; @@ -1354,7 +1354,7 @@ int ff_mjpeg_find_marker(MJpegDecodeContext *s, uint8_t x = *(src++); *(dst++) = x; - if (s->avctx->codec_id != CODEC_ID_THP) { + if (s->avctx->codec_id != AV_CODEC_ID_THP) { if (x == 0xff) { while (src < buf_end && x == 0xff) x = *(src++); @@ -1645,7 +1645,7 @@ static const AVClass mjpegdec_class = { AVCodec ff_mjpeg_decoder = { .name = "mjpeg", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_MJPEG, + .id = AV_CODEC_ID_MJPEG, .priv_data_size = sizeof(MJpegDecodeContext), .init = ff_mjpeg_decode_init, .close = ff_mjpeg_decode_end, @@ -1658,7 +1658,7 @@ AVCodec ff_mjpeg_decoder = { AVCodec ff_thp_decoder = { .name = "thp", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_THP, + .id = AV_CODEC_ID_THP, .priv_data_size = sizeof(MJpegDecodeContext), .init = ff_mjpeg_decode_init, .close = ff_mjpeg_decode_end, diff --git a/libavcodec/mjpegenc.c b/libavcodec/mjpegenc.c index 1a559a016f..41f81af0e4 100644 --- a/libavcodec/mjpegenc.c +++ b/libavcodec/mjpegenc.c @@ -196,7 +196,7 @@ static void jpeg_put_comments(MpegEncContext *s) void ff_mjpeg_encode_picture_header(MpegEncContext *s) { - const int lossless= s->avctx->codec_id != CODEC_ID_MJPEG; + const int lossless= s->avctx->codec_id != AV_CODEC_ID_MJPEG; put_marker(&s->pb, SOI); @@ -205,8 +205,8 @@ void ff_mjpeg_encode_picture_header(MpegEncContext *s) jpeg_table_header(s); switch(s->avctx->codec_id){ - case CODEC_ID_MJPEG: put_marker(&s->pb, SOF0 ); break; - case CODEC_ID_LJPEG: put_marker(&s->pb, SOF3 ); break; + case AV_CODEC_ID_MJPEG: put_marker(&s->pb, SOF0 ); break; + case AV_CODEC_ID_LJPEG: put_marker(&s->pb, SOF3 ); break; default: assert(0); } @@ -268,8 +268,8 @@ void ff_mjpeg_encode_picture_header(MpegEncContext *s) put_bits(&s->pb, 8, lossless ? s->avctx->prediction_method+1 : 0); /* Ss (not used) */ switch(s->avctx->codec_id){ - case CODEC_ID_MJPEG: put_bits(&s->pb, 8, 63); break; /* Se (not used) */ - case CODEC_ID_LJPEG: put_bits(&s->pb, 8, 0); break; /* not used */ + case AV_CODEC_ID_MJPEG: put_bits(&s->pb, 8, 63); break; /* Se (not used) */ + case AV_CODEC_ID_LJPEG: put_bits(&s->pb, 8, 0); break; /* not used */ default: assert(0); } @@ -448,7 +448,7 @@ void ff_mjpeg_encode_mb(MpegEncContext *s, DCTELEM block[6][64]) AVCodec ff_mjpeg_encoder = { .name = "mjpeg", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_MJPEG, + .id = AV_CODEC_ID_MJPEG, .priv_data_size = sizeof(MpegEncContext), .init = ff_MPV_encode_init, .encode2 = ff_MPV_encode_picture, diff --git a/libavcodec/mlp_parser.c b/libavcodec/mlp_parser.c index 1879e0044f..016252cfb6 100644 --- a/libavcodec/mlp_parser.c +++ b/libavcodec/mlp_parser.c @@ -346,7 +346,7 @@ lost_sync: } AVCodecParser ff_mlp_parser = { - .codec_ids = { CODEC_ID_MLP, CODEC_ID_TRUEHD }, + .codec_ids = { AV_CODEC_ID_MLP, AV_CODEC_ID_TRUEHD }, .priv_data_size = sizeof(MLPParseContext), .parser_init = mlp_init, .parser_parse = mlp_parse, diff --git a/libavcodec/mlpdec.c b/libavcodec/mlpdec.c index 30310db53a..afd8f887ec 100644 --- a/libavcodec/mlpdec.c +++ b/libavcodec/mlpdec.c @@ -294,7 +294,7 @@ static int read_major_sync(MLPDecodeContext *m, GetBitContext *gb) if (mh.num_substreams == 0) return AVERROR_INVALIDDATA; - if (m->avctx->codec_id == CODEC_ID_MLP && mh.num_substreams > 2) { + if (m->avctx->codec_id == AV_CODEC_ID_MLP && mh.num_substreams > 2) { av_log(m->avctx, AV_LOG_ERROR, "MLP only supports up to 2 substreams.\n"); return AVERROR_INVALIDDATA; } @@ -340,7 +340,7 @@ static int read_restart_header(MLPDecodeContext *m, GetBitContext *gbp, uint8_t checksum; uint8_t lossless_check; int start_count = get_bits_count(gbp); - const int max_matrix_channel = m->avctx->codec_id == CODEC_ID_MLP + const int max_matrix_channel = m->avctx->codec_id == AV_CODEC_ID_MLP ? MAX_MATRIX_CHANNEL_MLP : MAX_MATRIX_CHANNEL_TRUEHD; @@ -354,7 +354,7 @@ static int read_restart_header(MLPDecodeContext *m, GetBitContext *gbp, s->noise_type = get_bits1(gbp); - if (m->avctx->codec_id == CODEC_ID_MLP && s->noise_type) { + if (m->avctx->codec_id == AV_CODEC_ID_MLP && s->noise_type) { av_log(m->avctx, AV_LOG_ERROR, "MLP must have 0x31ea sync word.\n"); return AVERROR_INVALIDDATA; } @@ -549,7 +549,7 @@ static int read_matrix_params(MLPDecodeContext *m, unsigned int substr, GetBitCo { SubStream *s = &m->substream[substr]; unsigned int mat, ch; - const int max_primitive_matrices = m->avctx->codec_id == CODEC_ID_MLP + const int max_primitive_matrices = m->avctx->codec_id == AV_CODEC_ID_MLP ? MAX_MATRICES_MLP : MAX_MATRICES_TRUEHD; @@ -1004,7 +1004,7 @@ static int read_access_unit(AVCodecContext *avctx, void* data, substr_header_size += 2; if (extraword_present) { - if (m->avctx->codec_id == CODEC_ID_MLP) { + if (m->avctx->codec_id == AV_CODEC_ID_MLP) { av_log(m->avctx, AV_LOG_ERROR, "There must be no extraword for MLP.\n"); goto error; } @@ -1093,9 +1093,9 @@ static int read_access_unit(AVCodecContext *avctx, void* data, return AVERROR_INVALIDDATA; shorten_by = get_bits(&gb, 16); - if (m->avctx->codec_id == CODEC_ID_TRUEHD && shorten_by & 0x2000) + if (m->avctx->codec_id == AV_CODEC_ID_TRUEHD && shorten_by & 0x2000) s->blockpos -= FFMIN(shorten_by & 0x1FFF, s->blockpos); - else if (m->avctx->codec_id == CODEC_ID_MLP && shorten_by != 0xD234) + else if (m->avctx->codec_id == AV_CODEC_ID_MLP && shorten_by != 0xD234) return AVERROR_INVALIDDATA; if (substr == m->max_decoded_substream) @@ -1147,7 +1147,7 @@ error: AVCodec ff_mlp_decoder = { .name = "mlp", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_MLP, + .id = AV_CODEC_ID_MLP, .priv_data_size = sizeof(MLPDecodeContext), .init = mlp_decode_init, .decode = read_access_unit, @@ -1159,7 +1159,7 @@ AVCodec ff_mlp_decoder = { AVCodec ff_truehd_decoder = { .name = "truehd", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_TRUEHD, + .id = AV_CODEC_ID_TRUEHD, .priv_data_size = sizeof(MLPDecodeContext), .init = mlp_decode_init, .decode = read_access_unit, diff --git a/libavcodec/mmvideo.c b/libavcodec/mmvideo.c index 1a9dfdd9ed..2187d7f585 100644 --- a/libavcodec/mmvideo.c +++ b/libavcodec/mmvideo.c @@ -228,7 +228,7 @@ static av_cold int mm_decode_end(AVCodecContext *avctx) AVCodec ff_mmvideo_decoder = { .name = "mmvideo", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_MMVIDEO, + .id = AV_CODEC_ID_MMVIDEO, .priv_data_size = sizeof(MmContext), .init = mm_decode_init, .close = mm_decode_end, diff --git a/libavcodec/motion_est.c b/libavcodec/motion_est.c index ce802e5d1b..0afb697eb9 100644 --- a/libavcodec/motion_est.c +++ b/libavcodec/motion_est.c @@ -305,7 +305,7 @@ int ff_init_me(MpegEncContext *s){ return -1; } //special case of snow is needed because snow uses its own iterative ME code - if(s->me_method!=ME_ZERO && s->me_method!=ME_EPZS && s->me_method!=ME_X1 && s->avctx->codec_id != CODEC_ID_SNOW){ + if(s->me_method!=ME_ZERO && s->me_method!=ME_EPZS && s->me_method!=ME_X1 && s->avctx->codec_id != AV_CODEC_ID_SNOW){ av_log(s->avctx, AV_LOG_ERROR, "me_method is only allowed to be set to zero and epzs; for hex,umh,full and others see dia_size\n"); return -1; } @@ -356,7 +356,7 @@ int ff_init_me(MpegEncContext *s){ /* 8x8 fullpel search would need a 4x4 chroma compare, which we do * not have yet, and even if we had, the motion estimation code * does not expect it. */ - if(s->codec_id != CODEC_ID_SNOW){ + if(s->codec_id != AV_CODEC_ID_SNOW){ if((c->avctx->me_cmp&FF_CMP_CHROMA)/* && !s->dsp.me_cmp[2]*/){ s->dsp.me_cmp[2]= zero_cmp; } @@ -367,7 +367,7 @@ int ff_init_me(MpegEncContext *s){ c->hpel_put[2][2]= c->hpel_put[2][3]= zero_hpel; } - if(s->codec_id == CODEC_ID_H261){ + if(s->codec_id == AV_CODEC_ID_H261){ c->sub_motion_search= no_sub_motion_search; } @@ -1664,7 +1664,7 @@ void ff_estimate_b_frame_motion(MpegEncContext * s, c->skip=0; - if (s->codec_id == CODEC_ID_MPEG4 && s->next_picture.f.mbskip_table[xy]) { + if (s->codec_id == AV_CODEC_ID_MPEG4 && s->next_picture.f.mbskip_table[xy]) { int score= direct_search(s, mb_x, mb_y); //FIXME just check 0,0 score= ((unsigned)(score*score + 128*256))>>16; @@ -1726,7 +1726,7 @@ void ff_estimate_b_frame_motion(MpegEncContext * s, } } - if (s->codec_id == CODEC_ID_MPEG4) + if (s->codec_id == AV_CODEC_ID_MPEG4) dmin= direct_search(s, mb_x, mb_y); else dmin= INT_MAX; @@ -1797,7 +1797,7 @@ void ff_estimate_b_frame_motion(MpegEncContext * s, } //FIXME something smarter if(dmin>256*256*16) type&= ~CANDIDATE_MB_TYPE_DIRECT; //do not try direct mode if it is invalid for this MB - if(s->codec_id == CODEC_ID_MPEG4 && type&CANDIDATE_MB_TYPE_DIRECT && s->flags&CODEC_FLAG_MV0 && *(uint32_t*)s->b_direct_mv_table[xy]) + if(s->codec_id == AV_CODEC_ID_MPEG4 && type&CANDIDATE_MB_TYPE_DIRECT && s->flags&CODEC_FLAG_MV0 && *(uint32_t*)s->b_direct_mv_table[xy]) type |= CANDIDATE_MB_TYPE_DIRECT0; } @@ -1816,7 +1816,7 @@ int ff_get_best_fcode(MpegEncContext * s, int16_t (*mv_table)[2], int type) if(s->msmpeg4_version) range= FFMIN(range, 16); - else if(s->codec_id == CODEC_ID_MPEG2VIDEO && s->avctx->strict_std_compliance >= FF_COMPLIANCE_NORMAL) + else if(s->codec_id == AV_CODEC_ID_MPEG2VIDEO && s->avctx->strict_std_compliance >= FF_COMPLIANCE_NORMAL) range= FFMIN(range, 256); for(i=0; i<8; i++) score[i]= s->mb_num*(8-i); @@ -1874,7 +1874,7 @@ void ff_fix_long_p_mvs(MpegEncContext * s) range = (((s->out_format == FMT_MPEG1 || s->msmpeg4_version) ? 8 : 16) << f_code); assert(range <= 16 || !s->msmpeg4_version); - assert(range <=256 || !(s->codec_id == CODEC_ID_MPEG2VIDEO && s->avctx->strict_std_compliance >= FF_COMPLIANCE_NORMAL)); + assert(range <=256 || !(s->codec_id == AV_CODEC_ID_MPEG2VIDEO && s->avctx->strict_std_compliance >= FF_COMPLIANCE_NORMAL)); if(c->avctx->me_range && range > c->avctx->me_range) range= c->avctx->me_range; diff --git a/libavcodec/motionpixels.c b/libavcodec/motionpixels.c index 8a3c870986..4a1c104a59 100644 --- a/libavcodec/motionpixels.c +++ b/libavcodec/motionpixels.c @@ -317,7 +317,7 @@ static av_cold int mp_decode_end(AVCodecContext *avctx) AVCodec ff_motionpixels_decoder = { .name = "motionpixels", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_MOTIONPIXELS, + .id = AV_CODEC_ID_MOTIONPIXELS, .priv_data_size = sizeof(MotionPixelsContext), .init = mp_decode_init, .close = mp_decode_end, diff --git a/libavcodec/mpc7.c b/libavcodec/mpc7.c index 5d87417b69..0d7e9dfc28 100644 --- a/libavcodec/mpc7.c +++ b/libavcodec/mpc7.c @@ -332,7 +332,7 @@ static av_cold int mpc7_decode_close(AVCodecContext *avctx) AVCodec ff_mpc7_decoder = { .name = "mpc7", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_MUSEPACK7, + .id = AV_CODEC_ID_MUSEPACK7, .priv_data_size = sizeof(MPCContext), .init = mpc7_decode_init, .close = mpc7_decode_close, diff --git a/libavcodec/mpc8.c b/libavcodec/mpc8.c index 639adaac3b..915a785b81 100644 --- a/libavcodec/mpc8.c +++ b/libavcodec/mpc8.c @@ -429,7 +429,7 @@ static av_cold void mpc8_decode_flush(AVCodecContext *avctx) AVCodec ff_mpc8_decoder = { .name = "mpc8", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_MUSEPACK8, + .id = AV_CODEC_ID_MUSEPACK8, .priv_data_size = sizeof(MPCContext), .init = mpc8_decode_init, .decode = mpc8_decode_frame, diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c index c40649d92c..f80f3812d4 100644 --- a/libavcodec/mpeg12.c +++ b/libavcodec/mpeg12.c @@ -837,7 +837,7 @@ static int mpeg_decode_mb(MpegEncContext *s, DCTELEM block[12][64]) } } - if (s->codec_id == CODEC_ID_MPEG2VIDEO) { + if (s->codec_id == AV_CODEC_ID_MPEG2VIDEO) { if (s->flags2 & CODEC_FLAG2_FAST) { for (i = 0; i < 6; i++) { mpeg2_fast_decode_block_intra(s, *s->pblocks[i], i); @@ -1050,7 +1050,7 @@ static int mpeg_decode_mb(MpegEncContext *s, DCTELEM block[12][64]) } } - if (s->codec_id == CODEC_ID_MPEG2VIDEO) { + if (s->codec_id == AV_CODEC_ID_MPEG2VIDEO) { if (s->flags2 & CODEC_FLAG2_FAST) { for (i = 0; i < 6; i++) { if (cbp & 32) { @@ -1130,7 +1130,7 @@ static av_cold int mpeg_decode_init(AVCodecContext *avctx) s->repeat_field = 0; s->mpeg_enc_ctx.codec_id = avctx->codec->id; avctx->color_range = AVCOL_RANGE_MPEG; - if (avctx->codec->id == CODEC_ID_MPEG1VIDEO) + if (avctx->codec->id == AV_CODEC_ID_MPEG1VIDEO) avctx->chroma_sample_location = AVCHROMA_LOC_CENTER; else avctx->chroma_sample_location = AVCHROMA_LOC_LEFT; @@ -1184,7 +1184,7 @@ static enum PixelFormat mpeg_get_pixelformat(AVCodecContext *avctx) if (avctx->xvmc_acceleration) return avctx->get_format(avctx, pixfmt_xvmc_mpg2_420); else if (avctx->codec->capabilities & CODEC_CAP_HWACCEL_VDPAU) { - if (avctx->codec_id == CODEC_ID_MPEG1VIDEO) + if (avctx->codec_id == AV_CODEC_ID_MPEG1VIDEO) return PIX_FMT_VDPAU_MPEG1; else return PIX_FMT_VDPAU_MPEG2; @@ -1237,7 +1237,7 @@ static int mpeg_decode_postinit(AVCodecContext *avctx) * that behave like P-frames. */ avctx->has_b_frames = !s->low_delay; - if (avctx->codec_id == CODEC_ID_MPEG1VIDEO) { + if (avctx->codec_id == AV_CODEC_ID_MPEG1VIDEO) { //MPEG-1 fps avctx->time_base.den = avpriv_frame_rate_tab[s->frame_rate_index].num; avctx->time_base.num = avpriv_frame_rate_tab[s->frame_rate_index].den; @@ -1380,7 +1380,7 @@ static void mpeg_decode_sequence_extension(Mpeg1Context *s1) s1->frame_rate_ext.den = get_bits(&s->gb, 5) + 1; av_dlog(s->avctx, "sequence extension\n"); - s->codec_id = s->avctx->codec_id = CODEC_ID_MPEG2VIDEO; + s->codec_id = s->avctx->codec_id = AV_CODEC_ID_MPEG2VIDEO; if (s->avctx->debug & FF_DEBUG_PICT_INFO) av_log(s->avctx, AV_LOG_DEBUG, "profile: %d, level: %d vbv buffer: %d, bitrate:%d\n", @@ -2001,7 +2001,7 @@ static int mpeg1_decode_sequence(AVCodecContext *avctx, s->picture_structure = PICT_FRAME; s->frame_pred_frame_dct = 1; s->chroma_format = 1; - s->codec_id = s->avctx->codec_id = CODEC_ID_MPEG1VIDEO; + s->codec_id = s->avctx->codec_id = AV_CODEC_ID_MPEG1VIDEO; s->out_format = FMT_MPEG1; s->swap_uv = 0; // AFAIK VCR2 does not have SEQ_HEADER if (s->flags & CODEC_FLAG_LOW_DELAY) @@ -2060,7 +2060,7 @@ static int vcr2_init_sequence(AVCodecContext *avctx) s->picture_structure = PICT_FRAME; s->frame_pred_frame_dct = 1; s->chroma_format = 1; - s->codec_id = s->avctx->codec_id = CODEC_ID_MPEG2VIDEO; + s->codec_id = s->avctx->codec_id = AV_CODEC_ID_MPEG2VIDEO; s1->save_width = s->width; s1->save_height = s->height; s1->save_progressive_seq = s->progressive_sequence; @@ -2401,7 +2401,7 @@ static int decode_chunks(AVCodecContext *avctx, if (!s->mpeg_enc_ctx_allocated) break; - if (s2->codec_id == CODEC_ID_MPEG2VIDEO) { + if (s2->codec_id == AV_CODEC_ID_MPEG2VIDEO) { if (mb_y < avctx->skip_top || mb_y >= s2->mb_height - avctx->skip_bottom) break; } @@ -2499,7 +2499,7 @@ static const AVProfile mpeg2_video_profiles[] = { AVCodec ff_mpeg1video_decoder = { .name = "mpeg1video", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_MPEG1VIDEO, + .id = AV_CODEC_ID_MPEG1VIDEO, .priv_data_size = sizeof(Mpeg1Context), .init = mpeg_decode_init, .close = mpeg_decode_end, @@ -2515,7 +2515,7 @@ AVCodec ff_mpeg1video_decoder = { AVCodec ff_mpeg2video_decoder = { .name = "mpeg2video", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_MPEG2VIDEO, + .id = AV_CODEC_ID_MPEG2VIDEO, .priv_data_size = sizeof(Mpeg1Context), .init = mpeg_decode_init, .close = mpeg_decode_end, @@ -2549,7 +2549,7 @@ static av_cold int mpeg_mc_decode_init(AVCodecContext *avctx) AVCodec ff_mpeg_xvmc_decoder = { .name = "mpegvideo_xvmc", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_MPEG2VIDEO_XVMC, + .id = AV_CODEC_ID_MPEG2VIDEO_XVMC, .priv_data_size = sizeof(Mpeg1Context), .init = mpeg_mc_decode_init, .close = mpeg_decode_end, @@ -2566,7 +2566,7 @@ AVCodec ff_mpeg_xvmc_decoder = { AVCodec ff_mpeg_vdpau_decoder = { .name = "mpegvideo_vdpau", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_MPEG2VIDEO, + .id = AV_CODEC_ID_MPEG2VIDEO, .priv_data_size = sizeof(Mpeg1Context), .init = mpeg_decode_init, .close = mpeg_decode_end, @@ -2582,7 +2582,7 @@ AVCodec ff_mpeg_vdpau_decoder = { AVCodec ff_mpeg1_vdpau_decoder = { .name = "mpeg1video_vdpau", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_MPEG1VIDEO, + .id = AV_CODEC_ID_MPEG1VIDEO, .priv_data_size = sizeof(Mpeg1Context), .init = mpeg_decode_init, .close = mpeg_decode_end, diff --git a/libavcodec/mpeg12enc.c b/libavcodec/mpeg12enc.c index b0175b1fc8..cb3e9d5a70 100644 --- a/libavcodec/mpeg12enc.c +++ b/libavcodec/mpeg12enc.c @@ -205,7 +205,7 @@ static void mpeg1_encode_sequence_header(MpegEncContext *s) for(i=1; i<15; i++){ float error= aspect_ratio; - if(s->codec_id == CODEC_ID_MPEG1VIDEO || i <=1) + if(s->codec_id == AV_CODEC_ID_MPEG1VIDEO || i <=1) error-= 1.0/ff_mpeg1_aspect[i]; else error-= av_q2d(ff_mpeg2_aspect[i])*s->height/s->width; @@ -223,7 +223,7 @@ static void mpeg1_encode_sequence_header(MpegEncContext *s) if(s->avctx->rc_max_rate){ v = (s->avctx->rc_max_rate + 399) / 400; - if (v > 0x3ffff && s->codec_id == CODEC_ID_MPEG1VIDEO) + if (v > 0x3ffff && s->codec_id == AV_CODEC_ID_MPEG1VIDEO) v = 0x3ffff; }else{ v= 0x3FFFF; @@ -248,14 +248,14 @@ static void mpeg1_encode_sequence_header(MpegEncContext *s) s->avctx->me_range && s->avctx->me_range < 128 && vbv_buffer_size <= 20 && v <= 1856000/400 && - s->codec_id == CODEC_ID_MPEG1VIDEO; + s->codec_id == AV_CODEC_ID_MPEG1VIDEO; put_bits(&s->pb, 1, constraint_parameter_flag); ff_write_quant_matrix(&s->pb, s->avctx->intra_matrix); ff_write_quant_matrix(&s->pb, s->avctx->inter_matrix); - if(s->codec_id == CODEC_ID_MPEG2VIDEO){ + if(s->codec_id == AV_CODEC_ID_MPEG2VIDEO){ put_header(s, EXT_START_CODE); put_bits(&s->pb, 4, 1); //seq ext @@ -350,7 +350,7 @@ void ff_mpeg1_encode_picture_header(MpegEncContext *s, int picture_number) // RAL: Forward f_code also needed for B frames if (s->pict_type == AV_PICTURE_TYPE_P || s->pict_type == AV_PICTURE_TYPE_B) { put_bits(&s->pb, 1, 0); /* half pel coordinates */ - if(s->codec_id == CODEC_ID_MPEG1VIDEO) + if(s->codec_id == AV_CODEC_ID_MPEG1VIDEO) put_bits(&s->pb, 3, s->f_code); /* forward_f_code */ else put_bits(&s->pb, 3, 7); /* forward_f_code */ @@ -359,7 +359,7 @@ void ff_mpeg1_encode_picture_header(MpegEncContext *s, int picture_number) // RAL: Backward f_code necessary for B frames if (s->pict_type == AV_PICTURE_TYPE_B) { put_bits(&s->pb, 1, 0); /* half pel coordinates */ - if(s->codec_id == CODEC_ID_MPEG1VIDEO) + if(s->codec_id == AV_CODEC_ID_MPEG1VIDEO) put_bits(&s->pb, 3, s->b_code); /* backward_f_code */ else put_bits(&s->pb, 3, 7); /* backward_f_code */ @@ -368,7 +368,7 @@ void ff_mpeg1_encode_picture_header(MpegEncContext *s, int picture_number) put_bits(&s->pb, 1, 0); /* extra bit picture */ s->frame_pred_frame_dct = 1; - if(s->codec_id == CODEC_ID_MPEG2VIDEO){ + if(s->codec_id == AV_CODEC_ID_MPEG2VIDEO){ put_header(s, EXT_START_CODE); put_bits(&s->pb, 4, 8); //pic ext if (s->pict_type == AV_PICTURE_TYPE_P || s->pict_type == AV_PICTURE_TYPE_B) { @@ -449,7 +449,7 @@ static av_always_inline void mpeg1_encode_mb_internal(MpegEncContext *s, } if (cbp == 0 && !first_mb && s->mv_type == MV_TYPE_16X16 && - (mb_x != s->mb_width - 1 || (mb_y != s->mb_height - 1 && s->codec_id == CODEC_ID_MPEG1VIDEO)) && + (mb_x != s->mb_width - 1 || (mb_y != s->mb_height - 1 && s->codec_id == AV_CODEC_ID_MPEG1VIDEO)) && ((s->pict_type == AV_PICTURE_TYPE_P && (motion_x | motion_y) == 0) || (s->pict_type == AV_PICTURE_TYPE_B && s->mv_dir == s->last_mv_dir && (((s->mv_dir & MV_DIR_FORWARD) ? ((s->mv[0][0][0] - s->last_mv[0][0][0])|(s->mv[0][0][1] - s->last_mv[0][0][1])) : 0) | ((s->mv_dir & MV_DIR_BACKWARD) ? ((s->mv[1][0][0] - s->last_mv[1][0][0])|(s->mv[1][0][1] - s->last_mv[1][0][1])) : 0)) == 0))) { @@ -783,7 +783,7 @@ void ff_mpeg1_encode_init(MpegEncContext *s) } s->me.mv_penalty= mv_penalty; s->fcode_tab= fcode_tab; - if(s->codec_id == CODEC_ID_MPEG1VIDEO){ + if(s->codec_id == AV_CODEC_ID_MPEG1VIDEO){ s->min_qcoeff=-255; s->max_qcoeff= 255; }else{ @@ -897,7 +897,7 @@ static void mpeg1_encode_block(MpegEncContext *s, put_bits(&s->pb, table_vlc[111][1], table_vlc[111][0]); /* escape: only clip in this case */ put_bits(&s->pb, 6, run); - if(s->codec_id == CODEC_ID_MPEG1VIDEO){ + if(s->codec_id == AV_CODEC_ID_MPEG1VIDEO){ if (alevel < 128) { put_sbits(&s->pb, 8, level); } else { @@ -953,7 +953,7 @@ mpeg12_class(2) AVCodec ff_mpeg1video_encoder = { .name = "mpeg1video", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_MPEG1VIDEO, + .id = AV_CODEC_ID_MPEG1VIDEO, .priv_data_size = sizeof(MpegEncContext), .init = encode_init, .encode2 = ff_MPV_encode_picture, @@ -969,7 +969,7 @@ AVCodec ff_mpeg1video_encoder = { AVCodec ff_mpeg2video_encoder = { .name = "mpeg2video", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_MPEG2VIDEO, + .id = AV_CODEC_ID_MPEG2VIDEO, .priv_data_size = sizeof(MpegEncContext), .init = encode_init, .encode2 = ff_MPV_encode_picture, diff --git a/libavcodec/mpeg4video_parser.c b/libavcodec/mpeg4video_parser.c index 5362ad8d82..e291262d94 100644 --- a/libavcodec/mpeg4video_parser.c +++ b/libavcodec/mpeg4video_parser.c @@ -133,7 +133,7 @@ static int mpeg4video_parse(AVCodecParserContext *s, AVCodecParser ff_mpeg4video_parser = { - .codec_ids = { CODEC_ID_MPEG4 }, + .codec_ids = { AV_CODEC_ID_MPEG4 }, .priv_data_size = sizeof(struct Mp4vParseContext), .parser_init = mpeg4video_parse_init, .parser_parse = mpeg4video_parse, diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c index 3fcc6d0489..27cae9f846 100644 --- a/libavcodec/mpeg4videodec.c +++ b/libavcodec/mpeg4videodec.c @@ -1466,7 +1466,7 @@ intra: end: /* per-MB end of slice check */ - if(s->codec_id==CODEC_ID_MPEG4){ + if(s->codec_id==AV_CODEC_ID_MPEG4){ if(mpeg4_is_resync(s)){ const int delta= s->mb_x + 1 == s->mb_width ? 2 : 1; @@ -2257,7 +2257,7 @@ static const AVProfile mpeg4_video_profiles[] = { AVCodec ff_mpeg4_decoder = { .name = "mpeg4", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_MPEG4, + .id = AV_CODEC_ID_MPEG4, .priv_data_size = sizeof(MpegEncContext), .init = decode_init, .close = ff_h263_decode_end, @@ -2277,7 +2277,7 @@ AVCodec ff_mpeg4_decoder = { AVCodec ff_mpeg4_vdpau_decoder = { .name = "mpeg4_vdpau", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_MPEG4, + .id = AV_CODEC_ID_MPEG4, .priv_data_size = sizeof(MpegEncContext), .init = decode_init, .close = ff_h263_decode_end, diff --git a/libavcodec/mpeg4videoenc.c b/libavcodec/mpeg4videoenc.c index 95bb3a5261..1104807183 100644 --- a/libavcodec/mpeg4videoenc.c +++ b/libavcodec/mpeg4videoenc.c @@ -1334,7 +1334,7 @@ static const AVClass mpeg4enc_class = { AVCodec ff_mpeg4_encoder = { .name = "mpeg4", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_MPEG4, + .id = AV_CODEC_ID_MPEG4, .priv_data_size = sizeof(MpegEncContext), .init = encode_init, .encode2 = ff_MPV_encode_picture, diff --git a/libavcodec/mpegaudio_parser.c b/libavcodec/mpegaudio_parser.c index 017d6e1cda..2a01e1af18 100644 --- a/libavcodec/mpegaudio_parser.c +++ b/libavcodec/mpegaudio_parser.c @@ -101,7 +101,7 @@ static int mpegaudio_parse(AVCodecParserContext *s1, AVCodecParser ff_mpegaudio_parser = { - .codec_ids = { CODEC_ID_MP1, CODEC_ID_MP2, CODEC_ID_MP3 }, + .codec_ids = { AV_CODEC_ID_MP1, AV_CODEC_ID_MP2, AV_CODEC_ID_MP3 }, .priv_data_size = sizeof(MpegAudioParseContext), .parser_parse = mpegaudio_parse, .parser_close = ff_parse_close, diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c index 6c1e8af845..c33b12a354 100644 --- a/libavcodec/mpegaudiodec.c +++ b/libavcodec/mpegaudiodec.c @@ -437,7 +437,7 @@ static av_cold int decode_init(AVCodecContext * avctx) avctx->sample_fmt= OUT_FMT; s->err_recognition = avctx->err_recognition; - if (avctx->codec_id == CODEC_ID_MP3ADU) + if (avctx->codec_id == AV_CODEC_ID_MP3ADU) s->adu_mode = 1; avcodec_get_frame_defaults(&s->frame); @@ -1984,7 +1984,7 @@ static int decode_frame_mp3on4(AVCodecContext *avctx, void *data, AVCodec ff_mp1_decoder = { .name = "mp1", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_MP1, + .id = AV_CODEC_ID_MP1, .priv_data_size = sizeof(MPADecodeContext), .init = decode_init, .decode = decode_frame, @@ -1997,7 +1997,7 @@ AVCodec ff_mp1_decoder = { AVCodec ff_mp2_decoder = { .name = "mp2", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_MP2, + .id = AV_CODEC_ID_MP2, .priv_data_size = sizeof(MPADecodeContext), .init = decode_init, .decode = decode_frame, @@ -2010,7 +2010,7 @@ AVCodec ff_mp2_decoder = { AVCodec ff_mp3_decoder = { .name = "mp3", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_MP3, + .id = AV_CODEC_ID_MP3, .priv_data_size = sizeof(MPADecodeContext), .init = decode_init, .decode = decode_frame, @@ -2023,7 +2023,7 @@ AVCodec ff_mp3_decoder = { AVCodec ff_mp3adu_decoder = { .name = "mp3adu", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_MP3ADU, + .id = AV_CODEC_ID_MP3ADU, .priv_data_size = sizeof(MPADecodeContext), .init = decode_init, .decode = decode_frame_adu, @@ -2036,7 +2036,7 @@ AVCodec ff_mp3adu_decoder = { AVCodec ff_mp3on4_decoder = { .name = "mp3on4", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_MP3ON4, + .id = AV_CODEC_ID_MP3ON4, .priv_data_size = sizeof(MP3On4DecodeContext), .init = decode_init_mp3on4, .close = decode_close_mp3on4, diff --git a/libavcodec/mpegaudiodec_float.c b/libavcodec/mpegaudiodec_float.c index dd37bbc26c..93468f5062 100644 --- a/libavcodec/mpegaudiodec_float.c +++ b/libavcodec/mpegaudiodec_float.c @@ -26,7 +26,7 @@ AVCodec ff_mp1float_decoder = { .name = "mp1float", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_MP1, + .id = AV_CODEC_ID_MP1, .priv_data_size = sizeof(MPADecodeContext), .init = decode_init, .decode = decode_frame, @@ -39,7 +39,7 @@ AVCodec ff_mp1float_decoder = { AVCodec ff_mp2float_decoder = { .name = "mp2float", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_MP2, + .id = AV_CODEC_ID_MP2, .priv_data_size = sizeof(MPADecodeContext), .init = decode_init, .decode = decode_frame, @@ -52,7 +52,7 @@ AVCodec ff_mp2float_decoder = { AVCodec ff_mp3float_decoder = { .name = "mp3float", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_MP3, + .id = AV_CODEC_ID_MP3, .priv_data_size = sizeof(MPADecodeContext), .init = decode_init, .decode = decode_frame, @@ -65,7 +65,7 @@ AVCodec ff_mp3float_decoder = { AVCodec ff_mp3adufloat_decoder = { .name = "mp3adufloat", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_MP3ADU, + .id = AV_CODEC_ID_MP3ADU, .priv_data_size = sizeof(MPADecodeContext), .init = decode_init, .decode = decode_frame_adu, @@ -78,7 +78,7 @@ AVCodec ff_mp3adufloat_decoder = { AVCodec ff_mp3on4float_decoder = { .name = "mp3on4float", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_MP3ON4, + .id = AV_CODEC_ID_MP3ON4, .priv_data_size = sizeof(MP3On4DecodeContext), .init = decode_init_mp3on4, .close = decode_close_mp3on4, diff --git a/libavcodec/mpegaudiodecheader.c b/libavcodec/mpegaudiodecheader.c index 428137ddaf..f8fc833124 100644 --- a/libavcodec/mpegaudiodecheader.c +++ b/libavcodec/mpegaudiodecheader.c @@ -122,16 +122,16 @@ int avpriv_mpa_decode_header(AVCodecContext *avctx, uint32_t head, int *sample_r switch(s->layer) { case 1: - avctx->codec_id = CODEC_ID_MP1; + avctx->codec_id = AV_CODEC_ID_MP1; *frame_size = 384; break; case 2: - avctx->codec_id = CODEC_ID_MP2; + avctx->codec_id = AV_CODEC_ID_MP2; *frame_size = 1152; break; default: case 3: - avctx->codec_id = CODEC_ID_MP3; + avctx->codec_id = AV_CODEC_ID_MP3; if (s->lsf) *frame_size = 576; else diff --git a/libavcodec/mpegaudioenc.c b/libavcodec/mpegaudioenc.c index 6e79a614c1..bc44aed12d 100644 --- a/libavcodec/mpegaudioenc.c +++ b/libavcodec/mpegaudioenc.c @@ -784,7 +784,7 @@ static const AVCodecDefault mp2_defaults[] = { AVCodec ff_mp2_encoder = { .name = "mp2", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_MP2, + .id = AV_CODEC_ID_MP2, .priv_data_size = sizeof(MpegAudioContext), .init = MPA_encode_init, .encode2 = MPA_encode_frame, diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index 8b2a27f5e2..4fb5949131 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -230,7 +230,7 @@ static void free_frame_buffer(MpegEncContext *s, Picture *pic) /* Windows Media Image codecs allocate internal buffers with different * dimensions; ignore user defined callbacks for these */ - if (s->codec_id != CODEC_ID_WMV3IMAGE && s->codec_id != CODEC_ID_VC1IMAGE) + if (s->codec_id != AV_CODEC_ID_WMV3IMAGE && s->codec_id != AV_CODEC_ID_VC1IMAGE) ff_thread_release_buffer(s->avctx, &pic->f); else avcodec_default_release_buffer(s->avctx, &pic->f); @@ -255,7 +255,7 @@ static int alloc_frame_buffer(MpegEncContext *s, Picture *pic) } } - if (s->codec_id != CODEC_ID_WMV3IMAGE && s->codec_id != CODEC_ID_VC1IMAGE) + if (s->codec_id != AV_CODEC_ID_WMV3IMAGE && s->codec_id != AV_CODEC_ID_VC1IMAGE) r = ff_thread_get_buffer(s->avctx, &pic->f); else r = avcodec_default_get_buffer(s->avctx, &pic->f); @@ -662,9 +662,9 @@ av_cold int ff_MPV_common_init(MpegEncContext *s) if (s->encoding && s->avctx->slices) nb_slices = s->avctx->slices; - if (s->codec_id == CODEC_ID_MPEG2VIDEO && !s->progressive_sequence) + if (s->codec_id == AV_CODEC_ID_MPEG2VIDEO && !s->progressive_sequence) s->mb_height = (s->height + 31) / 32 * 2; - else if (s->codec_id != CODEC_ID_H264) + else if (s->codec_id != AV_CODEC_ID_H264) s->mb_height = (s->height + 15) / 16; if (s->avctx->pix_fmt == PIX_FMT_NONE) { @@ -818,7 +818,7 @@ av_cold int ff_MPV_common_init(MpegEncContext *s) FF_ALLOCZ_OR_GOTO(s->avctx, s->error_status_table, mb_array_size * sizeof(uint8_t), fail); - if (s->codec_id == CODEC_ID_MPEG4 || + if (s->codec_id == AV_CODEC_ID_MPEG4 || (s->flags & CODEC_FLAG_INTERLACED_ME)) { /* interlaced direct mode decoding tables */ for (i = 0; i < 2; i++) { @@ -1174,10 +1174,10 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx) s->mb_skipped = 0; assert(s->last_picture_ptr == NULL || s->out_format != FMT_H264 || - s->codec_id == CODEC_ID_SVQ3); + s->codec_id == AV_CODEC_ID_SVQ3); /* mark & release old frames */ - if (s->out_format != FMT_H264 || s->codec_id == CODEC_ID_SVQ3) { + if (s->out_format != FMT_H264 || s->codec_id == AV_CODEC_ID_SVQ3) { if (s->pict_type != AV_PICTURE_TYPE_B && s->last_picture_ptr && s->last_picture_ptr != s->next_picture_ptr && s->last_picture_ptr->f.data[0]) { @@ -1217,7 +1217,7 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx) pic->f.reference = 0; if (!s->dropable) { - if (s->codec_id == CODEC_ID_H264) + if (s->codec_id == AV_CODEC_ID_H264) pic->f.reference = s->picture_structure; else if (s->pict_type != AV_PICTURE_TYPE_B) pic->f.reference = 3; @@ -1231,8 +1231,8 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx) s->current_picture_ptr = pic; // FIXME use only the vars from current_pic s->current_picture_ptr->f.top_field_first = s->top_field_first; - if (s->codec_id == CODEC_ID_MPEG1VIDEO || - s->codec_id == CODEC_ID_MPEG2VIDEO) { + if (s->codec_id == AV_CODEC_ID_MPEG1VIDEO || + s->codec_id == AV_CODEC_ID_MPEG2VIDEO) { if (s->picture_structure != PICT_FRAME) s->current_picture_ptr->f.top_field_first = (s->picture_structure == PICT_TOP_FIELD) == s->first_field; @@ -1261,7 +1261,7 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx) s->current_picture_ptr ? s->current_picture_ptr->f.data[0] : NULL, s->pict_type, s->dropable); */ - if (s->codec_id != CODEC_ID_H264) { + if (s->codec_id != AV_CODEC_ID_H264) { if ((s->last_picture_ptr == NULL || s->last_picture_ptr->f.data[0] == NULL) && (s->pict_type != AV_PICTURE_TYPE_I || @@ -1306,7 +1306,7 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx) ff_copy_picture(&s->next_picture, s->next_picture_ptr); if (HAVE_THREADS && (avctx->active_thread_type & FF_THREAD_FRAME) && - (s->out_format != FMT_H264 || s->codec_id == CODEC_ID_SVQ3)) { + (s->out_format != FMT_H264 || s->codec_id == AV_CODEC_ID_SVQ3)) { if (s->next_picture_ptr) s->next_picture_ptr->owner2 = s; if (s->last_picture_ptr) @@ -1334,7 +1334,7 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx) /* set dequantizer, we can't do it during init as * it might change for mpeg4 and we can't do it in the header * decode as init is not called for mpeg4 there yet */ - if (s->mpeg_quant || s->codec_id == CODEC_ID_MPEG2VIDEO) { + if (s->mpeg_quant || s->codec_id == AV_CODEC_ID_MPEG2VIDEO) { s->dct_unquantize_intra = s->dct_unquantize_mpeg2_intra; s->dct_unquantize_inter = s->dct_unquantize_mpeg2_inter; } else if (s->out_format == FMT_H263 || s->out_format == FMT_H261) { @@ -1423,7 +1423,7 @@ void ff_MPV_frame_end(MpegEncContext *s) #endif s->avctx->coded_frame = &s->current_picture_ptr->f; - if (s->codec_id != CODEC_ID_H264 && s->current_picture.f.reference) { + if (s->codec_id != AV_CODEC_ID_H264 && s->current_picture.f.reference) { ff_thread_report_progress(&s->current_picture_ptr->f, INT_MAX, 0); } } @@ -1625,7 +1625,7 @@ void ff_print_debug_info(MpegEncContext *s, AVFrame *pict) const int height = s->avctx->height; const int mv_sample_log2 = 4 - pict->motion_subsample_log2; const int mv_stride = (s->mb_width << mv_sample_log2) + - (s->codec_id == CODEC_ID_H264 ? 0 : 1); + (s->codec_id == AV_CODEC_ID_H264 ? 0 : 1); s->low_delay = 0; // needed to see the vectors without trashing the buffers avcodec_get_chroma_sub_sample(s->avctx->pix_fmt, @@ -1814,7 +1814,7 @@ void ff_print_debug_info(MpegEncContext *s, AVFrame *pict) } if (IS_INTERLACED(mb_type) && - s->codec_id == CODEC_ID_H264) { + s->codec_id == AV_CODEC_ID_H264) { // hmm } } @@ -2053,8 +2053,8 @@ void MPV_decode_mb_internal(MpegEncContext *s, DCTELEM block[12][64], } /* add dct residue */ - if(s->encoding || !( s->msmpeg4_version || s->codec_id==CODEC_ID_MPEG1VIDEO || s->codec_id==CODEC_ID_MPEG2VIDEO - || (s->codec_id==CODEC_ID_MPEG4 && !s->mpeg_quant))){ + if(s->encoding || !( s->msmpeg4_version || s->codec_id==AV_CODEC_ID_MPEG1VIDEO || s->codec_id==AV_CODEC_ID_MPEG2VIDEO + || (s->codec_id==AV_CODEC_ID_MPEG4 && !s->mpeg_quant))){ add_dequant_dct(s, block[0], 0, dest_y , dct_linesize, s->qscale); add_dequant_dct(s, block[1], 1, dest_y + block_size, dct_linesize, s->qscale); add_dequant_dct(s, block[2], 2, dest_y + dct_offset , dct_linesize, s->qscale); @@ -2073,7 +2073,7 @@ void MPV_decode_mb_internal(MpegEncContext *s, DCTELEM block[12][64], add_dequant_dct(s, block[7], 7, dest_cr + dct_offset, dct_linesize, s->chroma_qscale); } } - } else if(is_mpeg12 || (s->codec_id != CODEC_ID_WMV2)){ + } else if(is_mpeg12 || (s->codec_id != AV_CODEC_ID_WMV2)){ add_dct(s, block[0], 0, dest_y , dct_linesize); add_dct(s, block[1], 1, dest_y + block_size, dct_linesize); add_dct(s, block[2], 2, dest_y + dct_offset , dct_linesize); @@ -2106,7 +2106,7 @@ void MPV_decode_mb_internal(MpegEncContext *s, DCTELEM block[12][64], } } else { /* dct only in intra block */ - if(s->encoding || !(s->codec_id==CODEC_ID_MPEG1VIDEO || s->codec_id==CODEC_ID_MPEG2VIDEO)){ + if(s->encoding || !(s->codec_id==AV_CODEC_ID_MPEG1VIDEO || s->codec_id==AV_CODEC_ID_MPEG2VIDEO)){ put_dct(s, block[0], 0, dest_y , dct_linesize, s->qscale); put_dct(s, block[1], 1, dest_y + block_size, dct_linesize, s->qscale); put_dct(s, block[2], 2, dest_y + dct_offset , dct_linesize, s->qscale); diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h index f5b20e662e..5c537da38f 100644 --- a/libavcodec/mpegvideo.h +++ b/libavcodec/mpegvideo.h @@ -216,7 +216,7 @@ typedef struct MpegEncContext { int h263_plus; ///< h263 plus headers int h263_flv; ///< use flv h263 header - enum CodecID codec_id; /* see CODEC_ID_xxx */ + enum AVCodecID codec_id; /* see AV_CODEC_ID_xxx */ int fixed_qscale; ///< fixed qscale if non zero int encoding; ///< true if we are encoding (vs decoding) int flags; ///< AVCodecContext.flags (HQ, MV4, ...) diff --git a/libavcodec/mpegvideo_common.h b/libavcodec/mpegvideo_common.h index bb39619637..224ec9887a 100644 --- a/libavcodec/mpegvideo_common.h +++ b/libavcodec/mpegvideo_common.h @@ -302,8 +302,8 @@ if(s->quarter_sample) if( (unsigned)src_x > FFMAX(s->h_edge_pos - (motion_x&1) - 16, 0) || (unsigned)src_y > FFMAX( v_edge_pos - (motion_y&1) - h , 0)){ - if(is_mpeg12 || s->codec_id == CODEC_ID_MPEG2VIDEO || - s->codec_id == CODEC_ID_MPEG1VIDEO){ + if(is_mpeg12 || s->codec_id == AV_CODEC_ID_MPEG2VIDEO || + s->codec_id == AV_CODEC_ID_MPEG1VIDEO){ av_log(s->avctx,AV_LOG_DEBUG, "MPEG motion vector out of boundary (%d %d)\n", src_x, src_y); return; @@ -719,7 +719,7 @@ static av_always_inline void MPV_motion_internal(MpegEncContext *s, ref_picture, pix_op, qpix_op, s->mv[dir][0][0], s->mv[dir][0][1], 16); } else if (!is_mpeg12 && (CONFIG_WMV2_DECODER || CONFIG_WMV2_ENCODER) && - s->mspel && s->codec_id == CODEC_ID_WMV2) { + s->mspel && s->codec_id == AV_CODEC_ID_WMV2) { ff_mspel_motion(s, dest_y, dest_cb, dest_cr, ref_picture, pix_op, s->mv[dir][0][0], s->mv[dir][0][1], 16); diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index f88df92d8d..e84b0dae03 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -278,7 +278,7 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx) MPV_encode_defaults(s); switch (avctx->codec_id) { - case CODEC_ID_MPEG2VIDEO: + case AV_CODEC_ID_MPEG2VIDEO: if (avctx->pix_fmt != PIX_FMT_YUV420P && avctx->pix_fmt != PIX_FMT_YUV422P) { av_log(avctx, AV_LOG_ERROR, @@ -286,7 +286,7 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx) return -1; } break; - case CODEC_ID_LJPEG: + case AV_CODEC_ID_LJPEG: if (avctx->pix_fmt != PIX_FMT_YUVJ420P && avctx->pix_fmt != PIX_FMT_YUVJ422P && avctx->pix_fmt != PIX_FMT_YUVJ444P && @@ -299,7 +299,7 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx) return -1; } break; - case CODEC_ID_MJPEG: + case AV_CODEC_ID_MJPEG: if (avctx->pix_fmt != PIX_FMT_YUVJ420P && avctx->pix_fmt != PIX_FMT_YUVJ422P && ((avctx->pix_fmt != PIX_FMT_YUV420P && @@ -430,8 +430,8 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx) if (s->avctx->rc_max_rate && s->avctx->rc_min_rate == s->avctx->rc_max_rate && - (s->codec_id == CODEC_ID_MPEG1VIDEO || - s->codec_id == CODEC_ID_MPEG2VIDEO) && + (s->codec_id == AV_CODEC_ID_MPEG1VIDEO || + s->codec_id == AV_CODEC_ID_MPEG2VIDEO) && 90000LL * (avctx->rc_buffer_size - 1) > s->avctx->rc_max_rate * 0xFFFFLL) { av_log(avctx, AV_LOG_INFO, @@ -439,9 +439,9 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx) "specified vbv buffer is too large for the given bitrate!\n"); } - if ((s->flags & CODEC_FLAG_4MV) && s->codec_id != CODEC_ID_MPEG4 && - s->codec_id != CODEC_ID_H263 && s->codec_id != CODEC_ID_H263P && - s->codec_id != CODEC_ID_FLV1) { + if ((s->flags & CODEC_FLAG_4MV) && s->codec_id != AV_CODEC_ID_MPEG4 && + s->codec_id != AV_CODEC_ID_H263 && s->codec_id != AV_CODEC_ID_H263P && + s->codec_id != AV_CODEC_ID_FLV1) { av_log(avctx, AV_LOG_ERROR, "4MV not supported by codec\n"); return -1; } @@ -452,22 +452,22 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx) return -1; } - if (s->quarter_sample && s->codec_id != CODEC_ID_MPEG4) { + if (s->quarter_sample && s->codec_id != AV_CODEC_ID_MPEG4) { av_log(avctx, AV_LOG_ERROR, "qpel not supported by codec\n"); return -1; } if (s->max_b_frames && - s->codec_id != CODEC_ID_MPEG4 && - s->codec_id != CODEC_ID_MPEG1VIDEO && - s->codec_id != CODEC_ID_MPEG2VIDEO) { + s->codec_id != AV_CODEC_ID_MPEG4 && + s->codec_id != AV_CODEC_ID_MPEG1VIDEO && + s->codec_id != AV_CODEC_ID_MPEG2VIDEO) { av_log(avctx, AV_LOG_ERROR, "b frames not supported by codec\n"); return -1; } - if ((s->codec_id == CODEC_ID_MPEG4 || - s->codec_id == CODEC_ID_H263 || - s->codec_id == CODEC_ID_H263P) && + if ((s->codec_id == AV_CODEC_ID_MPEG4 || + s->codec_id == AV_CODEC_ID_H263 || + s->codec_id == AV_CODEC_ID_H263P) && (avctx->sample_aspect_ratio.num > 255 || avctx->sample_aspect_ratio.den > 255)) { av_log(avctx, AV_LOG_ERROR, @@ -477,13 +477,13 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx) } if ((s->flags & (CODEC_FLAG_INTERLACED_DCT | CODEC_FLAG_INTERLACED_ME)) && - s->codec_id != CODEC_ID_MPEG4 && s->codec_id != CODEC_ID_MPEG2VIDEO) { + s->codec_id != AV_CODEC_ID_MPEG4 && s->codec_id != AV_CODEC_ID_MPEG2VIDEO) { av_log(avctx, AV_LOG_ERROR, "interlacing not supported by codec\n"); return -1; } // FIXME mpeg2 uses that too - if (s->mpeg_quant && s->codec_id != CODEC_ID_MPEG4) { + if (s->mpeg_quant && s->codec_id != AV_CODEC_ID_MPEG4) { av_log(avctx, AV_LOG_ERROR, "mpeg2 style quantization not supported by codec\n"); return -1; @@ -514,7 +514,7 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx) } if (s->flags & CODEC_FLAG_LOW_DELAY) { - if (s->codec_id != CODEC_ID_MPEG2VIDEO) { + if (s->codec_id != AV_CODEC_ID_MPEG2VIDEO) { av_log(avctx, AV_LOG_ERROR, "low delay forcing is only available for mpeg2\n"); return -1; @@ -535,10 +535,10 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx) } if (s->avctx->thread_count > 1 && - s->codec_id != CODEC_ID_MPEG4 && - s->codec_id != CODEC_ID_MPEG1VIDEO && - s->codec_id != CODEC_ID_MPEG2VIDEO && - (s->codec_id != CODEC_ID_H263P)) { + s->codec_id != AV_CODEC_ID_MPEG4 && + s->codec_id != AV_CODEC_ID_MPEG1VIDEO && + s->codec_id != AV_CODEC_ID_MPEG2VIDEO && + (s->codec_id != AV_CODEC_ID_H263P)) { av_log(avctx, AV_LOG_ERROR, "multi threaded encoding not supported by codec\n"); return -1; @@ -585,8 +585,8 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx) //return -1; } - if (s->mpeg_quant || s->codec_id == CODEC_ID_MPEG1VIDEO || - s->codec_id == CODEC_ID_MPEG2VIDEO || s->codec_id == CODEC_ID_MJPEG) { + if (s->mpeg_quant || s->codec_id == AV_CODEC_ID_MPEG1VIDEO || + s->codec_id == AV_CODEC_ID_MPEG2VIDEO || s->codec_id == AV_CODEC_ID_MJPEG) { // (a + x * 3 / 8) / x s->intra_quant_bias = 3 << (QUANT_BIAS_SHIFT - 3); s->inter_quant_bias = 0; @@ -604,7 +604,7 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx) avcodec_get_chroma_sub_sample(avctx->pix_fmt, &chroma_h_shift, &chroma_v_shift); - if (avctx->codec_id == CODEC_ID_MPEG4 && + if (avctx->codec_id == AV_CODEC_ID_MPEG4 && s->avctx->time_base.den > (1 << 16) - 1) { av_log(avctx, AV_LOG_ERROR, "timebase %d/%d not supported by MPEG 4 standard, " @@ -625,22 +625,22 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx) #endif switch (avctx->codec->id) { - case CODEC_ID_MPEG1VIDEO: + case AV_CODEC_ID_MPEG1VIDEO: s->out_format = FMT_MPEG1; s->low_delay = !!(s->flags & CODEC_FLAG_LOW_DELAY); avctx->delay = s->low_delay ? 0 : (s->max_b_frames + 1); break; - case CODEC_ID_MPEG2VIDEO: + case AV_CODEC_ID_MPEG2VIDEO: s->out_format = FMT_MPEG1; s->low_delay = !!(s->flags & CODEC_FLAG_LOW_DELAY); avctx->delay = s->low_delay ? 0 : (s->max_b_frames + 1); s->rtp_mode = 1; break; - case CODEC_ID_LJPEG: - case CODEC_ID_MJPEG: + case AV_CODEC_ID_LJPEG: + case AV_CODEC_ID_MJPEG: s->out_format = FMT_MJPEG; s->intra_only = 1; /* force intra only for jpeg */ - if (avctx->codec->id == CODEC_ID_LJPEG && + if (avctx->codec->id == AV_CODEC_ID_LJPEG && avctx->pix_fmt == PIX_FMT_BGRA) { s->mjpeg_vsample[0] = s->mjpeg_hsample[0] = s->mjpeg_vsample[1] = s->mjpeg_hsample[1] = @@ -659,7 +659,7 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx) avctx->delay = 0; s->low_delay = 1; break; - case CODEC_ID_H261: + case AV_CODEC_ID_H261: if (!CONFIG_H261_ENCODER) return -1; if (ff_h261_get_picture_format(s->width, s->height) < 0) { @@ -673,7 +673,7 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx) avctx->delay = 0; s->low_delay = 1; break; - case CODEC_ID_H263: + case AV_CODEC_ID_H263: if (!CONFIG_H263_ENCODER) return -1; if (ff_match_2uint16(ff_h263_format, FF_ARRAY_ELEMS(ff_h263_format), @@ -689,7 +689,7 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx) avctx->delay = 0; s->low_delay = 1; break; - case CODEC_ID_H263P: + case AV_CODEC_ID_H263P: s->out_format = FMT_H263; s->h263_plus = 1; /* Fx */ @@ -703,7 +703,7 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx) avctx->delay = 0; s->low_delay = 1; break; - case CODEC_ID_FLV1: + case AV_CODEC_ID_FLV1: s->out_format = FMT_H263; s->h263_flv = 2; /* format = 1; 11-bit codes */ s->unrestricted_mv = 1; @@ -711,12 +711,12 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx) avctx->delay = 0; s->low_delay = 1; break; - case CODEC_ID_RV10: + case AV_CODEC_ID_RV10: s->out_format = FMT_H263; avctx->delay = 0; s->low_delay = 1; break; - case CODEC_ID_RV20: + case AV_CODEC_ID_RV20: s->out_format = FMT_H263; avctx->delay = 0; s->low_delay = 1; @@ -726,14 +726,14 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx) s->loop_filter = 1; s->unrestricted_mv = 0; break; - case CODEC_ID_MPEG4: + case AV_CODEC_ID_MPEG4: s->out_format = FMT_H263; s->h263_pred = 1; s->unrestricted_mv = 1; s->low_delay = s->max_b_frames ? 0 : 1; avctx->delay = s->low_delay ? 0 : (s->max_b_frames + 1); break; - case CODEC_ID_MSMPEG4V2: + case AV_CODEC_ID_MSMPEG4V2: s->out_format = FMT_H263; s->h263_pred = 1; s->unrestricted_mv = 1; @@ -741,7 +741,7 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx) avctx->delay = 0; s->low_delay = 1; break; - case CODEC_ID_MSMPEG4V3: + case AV_CODEC_ID_MSMPEG4V3: s->out_format = FMT_H263; s->h263_pred = 1; s->unrestricted_mv = 1; @@ -750,7 +750,7 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx) avctx->delay = 0; s->low_delay = 1; break; - case CODEC_ID_WMV1: + case AV_CODEC_ID_WMV1: s->out_format = FMT_H263; s->h263_pred = 1; s->unrestricted_mv = 1; @@ -759,7 +759,7 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx) avctx->delay = 0; s->low_delay = 1; break; - case CODEC_ID_WMV2: + case AV_CODEC_ID_WMV2: s->out_format = FMT_H263; s->h263_pred = 1; s->unrestricted_mv = 1; @@ -814,7 +814,7 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx) /* init q matrix */ for (i = 0; i < 64; i++) { int j = s->dsp.idct_permutation[i]; - if (CONFIG_MPEG4_ENCODER && s->codec_id == CODEC_ID_MPEG4 && + if (CONFIG_MPEG4_ENCODER && s->codec_id == AV_CODEC_ID_MPEG4 && s->mpeg_quant) { s->intra_matrix[j] = ff_mpeg4_default_intra_matrix[i]; s->inter_matrix[j] = ff_mpeg4_default_non_intra_matrix[i]; @@ -1477,8 +1477,8 @@ vbv_retry: // done in encode_picture() so we must undo it if (s->pict_type == AV_PICTURE_TYPE_P) { if (s->flipflop_rounding || - s->codec_id == CODEC_ID_H263P || - s->codec_id == CODEC_ID_MPEG4) + s->codec_id == AV_CODEC_ID_H263P || + s->codec_id == AV_CODEC_ID_MPEG4) s->no_rounding ^= 1; } if (s->pict_type != AV_PICTURE_TYPE_B) { @@ -1520,13 +1520,13 @@ vbv_retry: } switch (s->codec_id) { - case CODEC_ID_MPEG1VIDEO: - case CODEC_ID_MPEG2VIDEO: + case AV_CODEC_ID_MPEG1VIDEO: + case AV_CODEC_ID_MPEG2VIDEO: while (stuffing_count--) { put_bits(&s->pb, 8, 0); } break; - case CODEC_ID_MPEG4: + case AV_CODEC_ID_MPEG4: put_bits(&s->pb, 16, 0); put_bits(&s->pb, 16, 0x1C3); stuffing_count -= 4; @@ -1748,7 +1748,7 @@ static av_always_inline void encode_mb_internal(MpegEncContext *s, if (s->out_format == FMT_H263) { s->dquant = av_clip(s->dquant, -2, 2); - if (s->codec_id == CODEC_ID_MPEG4) { + if (s->codec_id == AV_CODEC_ID_MPEG4) { if (!s->mb_intra) { if (s->pict_type == AV_PICTURE_TYPE_B) { if (s->dquant & 1 || s->mv_dir & MV_DIRECT) @@ -2038,38 +2038,38 @@ static av_always_inline void encode_mb_internal(MpegEncContext *s, /* huffman encode */ switch(s->codec_id){ //FIXME funct ptr could be slightly faster - case CODEC_ID_MPEG1VIDEO: - case CODEC_ID_MPEG2VIDEO: + case AV_CODEC_ID_MPEG1VIDEO: + case AV_CODEC_ID_MPEG2VIDEO: if (CONFIG_MPEG1VIDEO_ENCODER || CONFIG_MPEG2VIDEO_ENCODER) ff_mpeg1_encode_mb(s, s->block, motion_x, motion_y); break; - case CODEC_ID_MPEG4: + case AV_CODEC_ID_MPEG4: if (CONFIG_MPEG4_ENCODER) ff_mpeg4_encode_mb(s, s->block, motion_x, motion_y); break; - case CODEC_ID_MSMPEG4V2: - case CODEC_ID_MSMPEG4V3: - case CODEC_ID_WMV1: + case AV_CODEC_ID_MSMPEG4V2: + case AV_CODEC_ID_MSMPEG4V3: + case AV_CODEC_ID_WMV1: if (CONFIG_MSMPEG4_ENCODER) ff_msmpeg4_encode_mb(s, s->block, motion_x, motion_y); break; - case CODEC_ID_WMV2: + case AV_CODEC_ID_WMV2: if (CONFIG_WMV2_ENCODER) ff_wmv2_encode_mb(s, s->block, motion_x, motion_y); break; - case CODEC_ID_H261: + case AV_CODEC_ID_H261: if (CONFIG_H261_ENCODER) ff_h261_encode_mb(s, s->block, motion_x, motion_y); break; - case CODEC_ID_H263: - case CODEC_ID_H263P: - case CODEC_ID_FLV1: - case CODEC_ID_RV10: - case CODEC_ID_RV20: + case AV_CODEC_ID_H263: + case AV_CODEC_ID_H263P: + case AV_CODEC_ID_FLV1: + case AV_CODEC_ID_RV10: + case AV_CODEC_ID_RV20: if (CONFIG_H263_ENCODER) ff_h263_encode_mb(s, s->block, motion_x, motion_y); break; - case CODEC_ID_MJPEG: + case AV_CODEC_ID_MJPEG: if (CONFIG_MJPEG_ENCODER) ff_mjpeg_encode_mb(s, s->block); break; @@ -2317,7 +2317,7 @@ static int mb_var_thread(AVCodecContext *c, void *arg){ } static void write_slice_end(MpegEncContext *s){ - if(CONFIG_MPEG4_ENCODER && s->codec_id==CODEC_ID_MPEG4){ + if(CONFIG_MPEG4_ENCODER && s->codec_id==AV_CODEC_ID_MPEG4){ if(s->partitioned_frame){ ff_mpeg4_merge_partitions(s); } @@ -2420,13 +2420,13 @@ static int encode_thread(AVCodecContext *c, void *arg){ s->last_mv_dir = 0; switch(s->codec_id){ - case CODEC_ID_H263: - case CODEC_ID_H263P: - case CODEC_ID_FLV1: + case AV_CODEC_ID_H263: + case AV_CODEC_ID_H263P: + case AV_CODEC_ID_FLV1: if (CONFIG_H263_ENCODER) s->gob_index = ff_h263_get_gob_height(s); break; - case CODEC_ID_MPEG4: + case AV_CODEC_ID_MPEG4: if(CONFIG_MPEG4_ENCODER && s->partitioned_frame) ff_mpeg4_init_partitions(s); break; @@ -2467,7 +2467,7 @@ static int encode_thread(AVCodecContext *c, void *arg){ s->mb_y = mb_y; // moved into loop, can get changed by H.261 ff_update_block_index(s); - if(CONFIG_H261_ENCODER && s->codec_id == CODEC_ID_H261){ + if(CONFIG_H261_ENCODER && s->codec_id == AV_CODEC_ID_H261){ ff_h261_reorder_mb_index(s); xy= s->mb_y*s->mb_stride + s->mb_x; mb_type= s->mb_type[xy]; @@ -2484,14 +2484,14 @@ static int encode_thread(AVCodecContext *c, void *arg){ if(s->start_mb_y == mb_y && mb_y > 0 && mb_x==0) is_gob_start=1; switch(s->codec_id){ - case CODEC_ID_H263: - case CODEC_ID_H263P: + case AV_CODEC_ID_H263: + case AV_CODEC_ID_H263P: if(!s->h263_slice_structured) if(s->mb_x || s->mb_y%s->gob_index) is_gob_start=0; break; - case CODEC_ID_MPEG2VIDEO: + case AV_CODEC_ID_MPEG2VIDEO: if(s->mb_x==0 && s->mb_y!=0) is_gob_start=1; - case CODEC_ID_MPEG1VIDEO: + case AV_CODEC_ID_MPEG1VIDEO: if(s->mb_skip_run) is_gob_start=0; break; } @@ -2500,7 +2500,7 @@ static int encode_thread(AVCodecContext *c, void *arg){ if(s->start_mb_y != mb_y || mb_x!=0){ write_slice_end(s); - if(CONFIG_MPEG4_ENCODER && s->codec_id==CODEC_ID_MPEG4 && s->partitioned_frame){ + if(CONFIG_MPEG4_ENCODER && s->codec_id==AV_CODEC_ID_MPEG4 && s->partitioned_frame){ ff_mpeg4_init_partitions(s); } } @@ -2525,21 +2525,21 @@ static int encode_thread(AVCodecContext *c, void *arg){ update_mb_info(s, 1); switch(s->codec_id){ - case CODEC_ID_MPEG4: + case AV_CODEC_ID_MPEG4: if (CONFIG_MPEG4_ENCODER) { ff_mpeg4_encode_video_packet_header(s); ff_mpeg4_clean_buffers(s); } break; - case CODEC_ID_MPEG1VIDEO: - case CODEC_ID_MPEG2VIDEO: + case AV_CODEC_ID_MPEG1VIDEO: + case AV_CODEC_ID_MPEG2VIDEO: if (CONFIG_MPEG1VIDEO_ENCODER || CONFIG_MPEG2VIDEO_ENCODER) { ff_mpeg1_encode_slice_header(s); ff_mpeg1_clean_buffers(s); } break; - case CODEC_ID_H263: - case CODEC_ID_H263P: + case AV_CODEC_ID_H263: + case AV_CODEC_ID_H263P: if (CONFIG_H263_ENCODER) ff_h263_encode_gob_header(s, mb_y); break; @@ -3061,13 +3061,13 @@ static int estimate_qp(MpegEncContext *s, int dry_run){ if(s->adaptive_quant){ switch(s->codec_id){ - case CODEC_ID_MPEG4: + case AV_CODEC_ID_MPEG4: if (CONFIG_MPEG4_ENCODER) ff_clean_mpeg4_qscales(s); break; - case CODEC_ID_H263: - case CODEC_ID_H263P: - case CODEC_ID_FLV1: + case AV_CODEC_ID_H263: + case AV_CODEC_ID_H263P: + case AV_CODEC_ID_FLV1: if (CONFIG_H263_ENCODER) ff_clean_h263_qscales(s); break; @@ -3113,9 +3113,9 @@ static int encode_picture(MpegEncContext *s, int picture_number) /* we need to initialize some time vars before we can encode b-frames */ // RAL: Condition added for MPEG1VIDEO - if (s->codec_id == CODEC_ID_MPEG1VIDEO || s->codec_id == CODEC_ID_MPEG2VIDEO || (s->h263_pred && !s->msmpeg4_version)) + if (s->codec_id == AV_CODEC_ID_MPEG1VIDEO || s->codec_id == AV_CODEC_ID_MPEG2VIDEO || (s->h263_pred && !s->msmpeg4_version)) set_frame_distances(s); - if(CONFIG_MPEG4_ENCODER && s->codec_id == CODEC_ID_MPEG4) + if(CONFIG_MPEG4_ENCODER && s->codec_id == AV_CODEC_ID_MPEG4) ff_set_mpeg4_time(s); s->me.scene_change_score=0; @@ -3126,7 +3126,7 @@ static int encode_picture(MpegEncContext *s, int picture_number) if(s->msmpeg4_version >= 3) s->no_rounding=1; else s->no_rounding=0; }else if(s->pict_type!=AV_PICTURE_TYPE_B){ - if(s->flipflop_rounding || s->codec_id == CODEC_ID_H263P || s->codec_id == CODEC_ID_MPEG4) + if(s->flipflop_rounding || s->codec_id == AV_CODEC_ID_H263P || s->codec_id == AV_CODEC_ID_MPEG4) s->no_rounding ^= 1; } @@ -3280,17 +3280,17 @@ static int encode_picture(MpegEncContext *s, int picture_number) ff_h261_encode_picture_header(s, picture_number); break; case FMT_H263: - if (CONFIG_WMV2_ENCODER && s->codec_id == CODEC_ID_WMV2) + if (CONFIG_WMV2_ENCODER && s->codec_id == AV_CODEC_ID_WMV2) ff_wmv2_encode_picture_header(s, picture_number); else if (CONFIG_MSMPEG4_ENCODER && s->msmpeg4_version) ff_msmpeg4_encode_picture_header(s, picture_number); else if (CONFIG_MPEG4_ENCODER && s->h263_pred) ff_mpeg4_encode_picture_header(s, picture_number); - else if (CONFIG_RV10_ENCODER && s->codec_id == CODEC_ID_RV10) + else if (CONFIG_RV10_ENCODER && s->codec_id == AV_CODEC_ID_RV10) ff_rv10_encode_picture_header(s, picture_number); - else if (CONFIG_RV20_ENCODER && s->codec_id == CODEC_ID_RV20) + else if (CONFIG_RV20_ENCODER && s->codec_id == AV_CODEC_ID_RV20) ff_rv20_encode_picture_header(s, picture_number); - else if (CONFIG_FLV_ENCODER && s->codec_id == CODEC_ID_FLV1) + else if (CONFIG_FLV_ENCODER && s->codec_id == AV_CODEC_ID_FLV1) ff_flv_encode_picture_header(s, picture_number); else if (CONFIG_H263_ENCODER) ff_h263_encode_picture_header(s, picture_number); @@ -4129,7 +4129,7 @@ static const AVClass h263_class = { AVCodec ff_h263_encoder = { .name = "h263", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_H263, + .id = AV_CODEC_ID_H263, .priv_data_size = sizeof(MpegEncContext), .init = ff_MPV_encode_init, .encode2 = ff_MPV_encode_picture, @@ -4157,7 +4157,7 @@ static const AVClass h263p_class = { AVCodec ff_h263p_encoder = { .name = "h263p", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_H263P, + .id = AV_CODEC_ID_H263P, .priv_data_size = sizeof(MpegEncContext), .init = ff_MPV_encode_init, .encode2 = ff_MPV_encode_picture, @@ -4173,7 +4173,7 @@ FF_MPV_GENERIC_CLASS(msmpeg4v2) AVCodec ff_msmpeg4v2_encoder = { .name = "msmpeg4v2", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_MSMPEG4V2, + .id = AV_CODEC_ID_MSMPEG4V2, .priv_data_size = sizeof(MpegEncContext), .init = ff_MPV_encode_init, .encode2 = ff_MPV_encode_picture, @@ -4188,7 +4188,7 @@ FF_MPV_GENERIC_CLASS(msmpeg4v3) AVCodec ff_msmpeg4v3_encoder = { .name = "msmpeg4", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_MSMPEG4V3, + .id = AV_CODEC_ID_MSMPEG4V3, .priv_data_size = sizeof(MpegEncContext), .init = ff_MPV_encode_init, .encode2 = ff_MPV_encode_picture, @@ -4203,7 +4203,7 @@ FF_MPV_GENERIC_CLASS(wmv1) AVCodec ff_wmv1_encoder = { .name = "wmv1", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_WMV1, + .id = AV_CODEC_ID_WMV1, .priv_data_size = sizeof(MpegEncContext), .init = ff_MPV_encode_init, .encode2 = ff_MPV_encode_picture, diff --git a/libavcodec/mpegvideo_parser.c b/libavcodec/mpegvideo_parser.c index af4b6e42ba..f1fc4a0e89 100644 --- a/libavcodec/mpegvideo_parser.c +++ b/libavcodec/mpegvideo_parser.c @@ -68,7 +68,7 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s, pc->frame_rate.den = avctx->time_base.den = avpriv_frame_rate_tab[frame_rate_index].num; pc->frame_rate.num = avctx->time_base.num = avpriv_frame_rate_tab[frame_rate_index].den; avctx->bit_rate = ((buf[4]<<10) | (buf[5]<<2) | (buf[6]>>6))*400; - avctx->codec_id = CODEC_ID_MPEG1VIDEO; + avctx->codec_id = AV_CODEC_ID_MPEG1VIDEO; } break; case EXT_START_CODE: @@ -92,7 +92,7 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s, avcodec_set_dimensions(avctx, pc->width, pc->height); avctx->time_base.den = pc->frame_rate.den * (frame_rate_ext_n + 1) * 2; avctx->time_base.num = pc->frame_rate.num * (frame_rate_ext_d + 1); - avctx->codec_id = CODEC_ID_MPEG2VIDEO; + avctx->codec_id = AV_CODEC_ID_MPEG2VIDEO; } break; case 0x8: /* picture coding extension */ @@ -180,7 +180,7 @@ static int mpegvideo_split(AVCodecContext *avctx, } AVCodecParser ff_mpegvideo_parser = { - .codec_ids = { CODEC_ID_MPEG1VIDEO, CODEC_ID_MPEG2VIDEO }, + .codec_ids = { AV_CODEC_ID_MPEG1VIDEO, AV_CODEC_ID_MPEG2VIDEO }, .priv_data_size = sizeof(struct MpvParseContext), .parser_parse = mpegvideo_parse, .parser_close = ff_parse_close, diff --git a/libavcodec/msmpeg4.c b/libavcodec/msmpeg4.c index eed5067690..e20f9b251a 100644 --- a/libavcodec/msmpeg4.c +++ b/libavcodec/msmpeg4.c @@ -1210,7 +1210,7 @@ int ff_msmpeg4_decode_motion(MpegEncContext * s, AVCodec ff_msmpeg4v1_decoder = { .name = "msmpeg4v1", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_MSMPEG4V1, + .id = AV_CODEC_ID_MSMPEG4V1, .priv_data_size = sizeof(MpegEncContext), .init = ff_msmpeg4_decode_init, .close = ff_h263_decode_end, @@ -1223,7 +1223,7 @@ AVCodec ff_msmpeg4v1_decoder = { AVCodec ff_msmpeg4v2_decoder = { .name = "msmpeg4v2", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_MSMPEG4V2, + .id = AV_CODEC_ID_MSMPEG4V2, .priv_data_size = sizeof(MpegEncContext), .init = ff_msmpeg4_decode_init, .close = ff_h263_decode_end, @@ -1236,7 +1236,7 @@ AVCodec ff_msmpeg4v2_decoder = { AVCodec ff_msmpeg4v3_decoder = { .name = "msmpeg4", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_MSMPEG4V3, + .id = AV_CODEC_ID_MSMPEG4V3, .priv_data_size = sizeof(MpegEncContext), .init = ff_msmpeg4_decode_init, .close = ff_h263_decode_end, @@ -1249,7 +1249,7 @@ AVCodec ff_msmpeg4v3_decoder = { AVCodec ff_wmv1_decoder = { .name = "wmv1", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_WMV1, + .id = AV_CODEC_ID_WMV1, .priv_data_size = sizeof(MpegEncContext), .init = ff_msmpeg4_decode_init, .close = ff_h263_decode_end, diff --git a/libavcodec/msrle.c b/libavcodec/msrle.c index 06e9b494be..c938ed9358 100644 --- a/libavcodec/msrle.c +++ b/libavcodec/msrle.c @@ -149,7 +149,7 @@ static av_cold int msrle_decode_end(AVCodecContext *avctx) AVCodec ff_msrle_decoder = { .name = "msrle", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_MSRLE, + .id = AV_CODEC_ID_MSRLE, .priv_data_size = sizeof(MsrleContext), .init = msrle_decode_init, .close = msrle_decode_end, diff --git a/libavcodec/mss1.c b/libavcodec/mss1.c index 6eb9f1486e..e499cfcae2 100644 --- a/libavcodec/mss1.c +++ b/libavcodec/mss1.c @@ -841,7 +841,7 @@ static av_cold int mss1_decode_end(AVCodecContext *avctx) AVCodec ff_mss1_decoder = { .name = "mss1", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_MSS1, + .id = AV_CODEC_ID_MSS1, .priv_data_size = sizeof(MSS1Context), .init = mss1_decode_init, .close = mss1_decode_end, diff --git a/libavcodec/mss3.c b/libavcodec/mss3.c index e163ec7324..327849f92b 100644 --- a/libavcodec/mss3.c +++ b/libavcodec/mss3.c @@ -859,7 +859,7 @@ static av_cold int mss3_decode_end(AVCodecContext *avctx) AVCodec ff_msa1_decoder = { .name = "msa1", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_MSA1, + .id = AV_CODEC_ID_MSA1, .priv_data_size = sizeof(MSS3Context), .init = mss3_decode_init, .close = mss3_decode_end, diff --git a/libavcodec/mss4.c b/libavcodec/mss4.c index 2742d05a5c..3e974e71f5 100644 --- a/libavcodec/mss4.c +++ b/libavcodec/mss4.c @@ -672,7 +672,7 @@ static av_cold int mss4_decode_end(AVCodecContext *avctx) AVCodec ff_mts2_decoder = { .name = "mts2", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_MTS2, + .id = AV_CODEC_ID_MTS2, .priv_data_size = sizeof(MSS4Context), .init = mss4_decode_init, .close = mss4_decode_end, diff --git a/libavcodec/msvideo1.c b/libavcodec/msvideo1.c index eabdbedf0a..ea2cf1450f 100644 --- a/libavcodec/msvideo1.c +++ b/libavcodec/msvideo1.c @@ -336,7 +336,7 @@ static av_cold int msvideo1_decode_end(AVCodecContext *avctx) AVCodec ff_msvideo1_decoder = { .name = "msvideo1", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_MSVIDEO1, + .id = AV_CODEC_ID_MSVIDEO1, .priv_data_size = sizeof(Msvideo1Context), .init = msvideo1_decode_init, .close = msvideo1_decode_end, diff --git a/libavcodec/mxpegdec.c b/libavcodec/mxpegdec.c index aeb474f287..77357fd2e2 100644 --- a/libavcodec/mxpegdec.c +++ b/libavcodec/mxpegdec.c @@ -332,7 +332,7 @@ AVCodec ff_mxpeg_decoder = { .name = "mxpeg", .long_name = NULL_IF_CONFIG_SMALL("Mobotix MxPEG video"), .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_MXPEG, + .id = AV_CODEC_ID_MXPEG, .priv_data_size = sizeof(MXpegDecodeContext), .init = mxpeg_decode_init, .close = mxpeg_decode_end, diff --git a/libavcodec/nellymoserdec.c b/libavcodec/nellymoserdec.c index 09a335fefc..c2c190a11c 100644 --- a/libavcodec/nellymoserdec.c +++ b/libavcodec/nellymoserdec.c @@ -216,7 +216,7 @@ static av_cold int decode_end(AVCodecContext * avctx) { AVCodec ff_nellymoser_decoder = { .name = "nellymoser", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_NELLYMOSER, + .id = AV_CODEC_ID_NELLYMOSER, .priv_data_size = sizeof(NellyMoserDecodeContext), .init = decode_init, .close = decode_end, diff --git a/libavcodec/nellymoserenc.c b/libavcodec/nellymoserenc.c index 18ea6846c2..487cffd2dc 100644 --- a/libavcodec/nellymoserenc.c +++ b/libavcodec/nellymoserenc.c @@ -421,7 +421,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *avpkt, AVCodec ff_nellymoser_encoder = { .name = "nellymoser", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_NELLYMOSER, + .id = AV_CODEC_ID_NELLYMOSER, .priv_data_size = sizeof(NellyMoserEncodeContext), .init = encode_init, .encode2 = encode_frame, diff --git a/libavcodec/nuv.c b/libavcodec/nuv.c index 50bbcd7fc6..d62bb1831b 100644 --- a/libavcodec/nuv.c +++ b/libavcodec/nuv.c @@ -302,7 +302,7 @@ static av_cold int decode_end(AVCodecContext *avctx) AVCodec ff_nuv_decoder = { .name = "nuv", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_NUV, + .id = AV_CODEC_ID_NUV, .priv_data_size = sizeof(NuvContext), .init = decode_init, .close = decode_end, diff --git a/libavcodec/pamenc.c b/libavcodec/pamenc.c index bf8d82c443..646954978d 100644 --- a/libavcodec/pamenc.c +++ b/libavcodec/pamenc.c @@ -117,7 +117,7 @@ static int pam_encode_frame(AVCodecContext *avctx, AVPacket *pkt, AVCodec ff_pam_encoder = { .name = "pam", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_PAM, + .id = AV_CODEC_ID_PAM, .priv_data_size = sizeof(PNMContext), .init = ff_pnm_init, .encode2 = pam_encode_frame, diff --git a/libavcodec/parser.c b/libavcodec/parser.c index 7a6b205207..bd997ab8fd 100644 --- a/libavcodec/parser.c +++ b/libavcodec/parser.c @@ -41,7 +41,7 @@ AVCodecParserContext *av_parser_init(int codec_id) AVCodecParser *parser; int ret; - if(codec_id == CODEC_ID_NONE) + if(codec_id == AV_CODEC_ID_NONE) return NULL; for(parser = av_first_parser; parser != NULL; parser = parser->next) { diff --git a/libavcodec/pcm-mpeg.c b/libavcodec/pcm-mpeg.c index 014fc91df1..4a386483d1 100644 --- a/libavcodec/pcm-mpeg.c +++ b/libavcodec/pcm-mpeg.c @@ -317,7 +317,7 @@ static int pcm_bluray_decode_frame(AVCodecContext *avctx, void *data, AVCodec ff_pcm_bluray_decoder = { .name = "pcm_bluray", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_PCM_BLURAY, + .id = AV_CODEC_ID_PCM_BLURAY, .priv_data_size = sizeof(PCMBRDecode), .init = pcm_bluray_decode_init, .decode = pcm_bluray_decode_frame, diff --git a/libavcodec/pcm.c b/libavcodec/pcm.c index 5f43f9b685..24272d27fe 100644 --- a/libavcodec/pcm.c +++ b/libavcodec/pcm.c @@ -36,10 +36,10 @@ static av_cold int pcm_encode_init(AVCodecContext *avctx) { avctx->frame_size = 0; switch (avctx->codec->id) { - case CODEC_ID_PCM_ALAW: + case AV_CODEC_ID_PCM_ALAW: pcm_alaw_tableinit(); break; - case CODEC_ID_PCM_MULAW: + case AV_CODEC_ID_PCM_MULAW: pcm_ulaw_tableinit(); break; default: @@ -104,25 +104,25 @@ static int pcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, dst = avpkt->data; switch (avctx->codec->id) { - case CODEC_ID_PCM_U32LE: + case AV_CODEC_ID_PCM_U32LE: ENCODE(uint32_t, le32, samples, dst, n, 0, 0x80000000) break; - case CODEC_ID_PCM_U32BE: + case AV_CODEC_ID_PCM_U32BE: ENCODE(uint32_t, be32, samples, dst, n, 0, 0x80000000) break; - case CODEC_ID_PCM_S24LE: + case AV_CODEC_ID_PCM_S24LE: ENCODE(int32_t, le24, samples, dst, n, 8, 0) break; - case CODEC_ID_PCM_S24BE: + case AV_CODEC_ID_PCM_S24BE: ENCODE(int32_t, be24, samples, dst, n, 8, 0) break; - case CODEC_ID_PCM_U24LE: + case AV_CODEC_ID_PCM_U24LE: ENCODE(uint32_t, le24, samples, dst, n, 8, 0x800000) break; - case CODEC_ID_PCM_U24BE: + case AV_CODEC_ID_PCM_U24BE: ENCODE(uint32_t, be24, samples, dst, n, 8, 0x800000) break; - case CODEC_ID_PCM_S24DAUD: + case AV_CODEC_ID_PCM_S24DAUD: for (; n > 0; n--) { uint32_t tmp = av_reverse[(*samples >> 8) & 0xff] + (av_reverse[*samples & 0xff] << 8); @@ -131,13 +131,13 @@ static int pcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, samples++; } break; - case CODEC_ID_PCM_U16LE: + case AV_CODEC_ID_PCM_U16LE: ENCODE(uint16_t, le16, samples, dst, n, 0, 0x8000) break; - case CODEC_ID_PCM_U16BE: + case AV_CODEC_ID_PCM_U16BE: ENCODE(uint16_t, be16, samples, dst, n, 0, 0x8000) break; - case CODEC_ID_PCM_S8: + case AV_CODEC_ID_PCM_S8: srcu8 = frame->data[0]; for (; n > 0; n--) { v = *srcu8++; @@ -145,47 +145,47 @@ static int pcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, } break; #if HAVE_BIGENDIAN - case CODEC_ID_PCM_F64LE: + case AV_CODEC_ID_PCM_F64LE: ENCODE(int64_t, le64, samples, dst, n, 0, 0) break; - case CODEC_ID_PCM_S32LE: - case CODEC_ID_PCM_F32LE: + case AV_CODEC_ID_PCM_S32LE: + case AV_CODEC_ID_PCM_F32LE: ENCODE(int32_t, le32, samples, dst, n, 0, 0) break; - case CODEC_ID_PCM_S16LE: + case AV_CODEC_ID_PCM_S16LE: ENCODE(int16_t, le16, samples, dst, n, 0, 0) break; - case CODEC_ID_PCM_F64BE: - case CODEC_ID_PCM_F32BE: - case CODEC_ID_PCM_S32BE: - case CODEC_ID_PCM_S16BE: + case AV_CODEC_ID_PCM_F64BE: + case AV_CODEC_ID_PCM_F32BE: + case AV_CODEC_ID_PCM_S32BE: + case AV_CODEC_ID_PCM_S16BE: #else - case CODEC_ID_PCM_F64BE: + case AV_CODEC_ID_PCM_F64BE: ENCODE(int64_t, be64, samples, dst, n, 0, 0) break; - case CODEC_ID_PCM_F32BE: - case CODEC_ID_PCM_S32BE: + case AV_CODEC_ID_PCM_F32BE: + case AV_CODEC_ID_PCM_S32BE: ENCODE(int32_t, be32, samples, dst, n, 0, 0) break; - case CODEC_ID_PCM_S16BE: + case AV_CODEC_ID_PCM_S16BE: ENCODE(int16_t, be16, samples, dst, n, 0, 0) break; - case CODEC_ID_PCM_F64LE: - case CODEC_ID_PCM_F32LE: - case CODEC_ID_PCM_S32LE: - case CODEC_ID_PCM_S16LE: + case AV_CODEC_ID_PCM_F64LE: + case AV_CODEC_ID_PCM_F32LE: + case AV_CODEC_ID_PCM_S32LE: + case AV_CODEC_ID_PCM_S16LE: #endif /* HAVE_BIGENDIAN */ - case CODEC_ID_PCM_U8: + case AV_CODEC_ID_PCM_U8: memcpy(dst, samples, n * sample_size); dst += n * sample_size; break; - case CODEC_ID_PCM_ALAW: + case AV_CODEC_ID_PCM_ALAW: for (; n > 0; n--) { v = *samples++; *dst++ = linear_to_alaw[(v + 32768) >> 2]; } break; - case CODEC_ID_PCM_MULAW: + case AV_CODEC_ID_PCM_MULAW: for (; n > 0; n--) { v = *samples++; *dst++ = linear_to_ulaw[(v + 32768) >> 2]; @@ -215,11 +215,11 @@ static av_cold int pcm_decode_init(AVCodecContext *avctx) } switch (avctx->codec->id) { - case CODEC_ID_PCM_ALAW: + case AV_CODEC_ID_PCM_ALAW: for (i = 0; i < 256; i++) s->table[i] = alaw2linear(i); break; - case CODEC_ID_PCM_MULAW: + case AV_CODEC_ID_PCM_MULAW: for (i = 0; i < 256; i++) s->table[i] = ulaw2linear(i); break; @@ -267,9 +267,9 @@ static int pcm_decode_frame(AVCodecContext *avctx, void *data, sample_size = av_get_bits_per_sample(avctx->codec_id) / 8; - /* av_get_bits_per_sample returns 0 for CODEC_ID_PCM_DVD */ + /* av_get_bits_per_sample returns 0 for AV_CODEC_ID_PCM_DVD */ samples_per_block = 1; - if (CODEC_ID_PCM_DVD == avctx->codec_id) { + if (AV_CODEC_ID_PCM_DVD == avctx->codec_id) { if (avctx->bits_per_coded_sample != 20 && avctx->bits_per_coded_sample != 24) { av_log(avctx, AV_LOG_ERROR, "PCM DVD unsupported sample depth\n"); @@ -278,7 +278,7 @@ static int pcm_decode_frame(AVCodecContext *avctx, void *data, /* 2 samples are interleaved per block in PCM_DVD */ samples_per_block = 2; sample_size = avctx->bits_per_coded_sample * 2 / 8; - } else if (avctx->codec_id == CODEC_ID_PCM_LXF) { + } else if (avctx->codec_id == AV_CODEC_ID_PCM_LXF) { /* we process 40-bit blocks per channel for LXF */ samples_per_block = 2; sample_size = 5; @@ -310,25 +310,25 @@ static int pcm_decode_frame(AVCodecContext *avctx, void *data, samples = s->frame.data[0]; switch (avctx->codec->id) { - case CODEC_ID_PCM_U32LE: + case AV_CODEC_ID_PCM_U32LE: DECODE(32, le32, src, samples, n, 0, 0x80000000) break; - case CODEC_ID_PCM_U32BE: + case AV_CODEC_ID_PCM_U32BE: DECODE(32, be32, src, samples, n, 0, 0x80000000) break; - case CODEC_ID_PCM_S24LE: + case AV_CODEC_ID_PCM_S24LE: DECODE(32, le24, src, samples, n, 8, 0) break; - case CODEC_ID_PCM_S24BE: + case AV_CODEC_ID_PCM_S24BE: DECODE(32, be24, src, samples, n, 8, 0) break; - case CODEC_ID_PCM_U24LE: + case AV_CODEC_ID_PCM_U24LE: DECODE(32, le24, src, samples, n, 8, 0x800000) break; - case CODEC_ID_PCM_U24BE: + case AV_CODEC_ID_PCM_U24BE: DECODE(32, be24, src, samples, n, 8, 0x800000) break; - case CODEC_ID_PCM_S24DAUD: + case AV_CODEC_ID_PCM_S24DAUD: for (; n > 0; n--) { uint32_t v = bytestream_get_be24(&src); v >>= 4; // sync flags are here @@ -337,7 +337,7 @@ static int pcm_decode_frame(AVCodecContext *avctx, void *data, samples += 2; } break; - case CODEC_ID_PCM_S16LE_PLANAR: + case AV_CODEC_ID_PCM_S16LE_PLANAR: { const uint8_t *src2[MAX_CHANNELS]; n /= avctx->channels; @@ -350,51 +350,51 @@ static int pcm_decode_frame(AVCodecContext *avctx, void *data, } break; } - case CODEC_ID_PCM_U16LE: + case AV_CODEC_ID_PCM_U16LE: DECODE(16, le16, src, samples, n, 0, 0x8000) break; - case CODEC_ID_PCM_U16BE: + case AV_CODEC_ID_PCM_U16BE: DECODE(16, be16, src, samples, n, 0, 0x8000) break; - case CODEC_ID_PCM_S8: + case AV_CODEC_ID_PCM_S8: for (; n > 0; n--) *samples++ = *src++ + 128; break; #if HAVE_BIGENDIAN - case CODEC_ID_PCM_F64LE: + case AV_CODEC_ID_PCM_F64LE: DECODE(64, le64, src, samples, n, 0, 0) break; - case CODEC_ID_PCM_S32LE: - case CODEC_ID_PCM_F32LE: + case AV_CODEC_ID_PCM_S32LE: + case AV_CODEC_ID_PCM_F32LE: DECODE(32, le32, src, samples, n, 0, 0) break; - case CODEC_ID_PCM_S16LE: + case AV_CODEC_ID_PCM_S16LE: DECODE(16, le16, src, samples, n, 0, 0) break; - case CODEC_ID_PCM_F64BE: - case CODEC_ID_PCM_F32BE: - case CODEC_ID_PCM_S32BE: - case CODEC_ID_PCM_S16BE: + case AV_CODEC_ID_PCM_F64BE: + case AV_CODEC_ID_PCM_F32BE: + case AV_CODEC_ID_PCM_S32BE: + case AV_CODEC_ID_PCM_S16BE: #else - case CODEC_ID_PCM_F64BE: + case AV_CODEC_ID_PCM_F64BE: DECODE(64, be64, src, samples, n, 0, 0) break; - case CODEC_ID_PCM_F32BE: - case CODEC_ID_PCM_S32BE: + case AV_CODEC_ID_PCM_F32BE: + case AV_CODEC_ID_PCM_S32BE: DECODE(32, be32, src, samples, n, 0, 0) break; - case CODEC_ID_PCM_S16BE: + case AV_CODEC_ID_PCM_S16BE: DECODE(16, be16, src, samples, n, 0, 0) break; - case CODEC_ID_PCM_F64LE: - case CODEC_ID_PCM_F32LE: - case CODEC_ID_PCM_S32LE: - case CODEC_ID_PCM_S16LE: + case AV_CODEC_ID_PCM_F64LE: + case AV_CODEC_ID_PCM_F32LE: + case AV_CODEC_ID_PCM_S32LE: + case AV_CODEC_ID_PCM_S16LE: #endif /* HAVE_BIGENDIAN */ - case CODEC_ID_PCM_U8: + case AV_CODEC_ID_PCM_U8: memcpy(samples, src, n * sample_size); break; - case CODEC_ID_PCM_ZORK: + case AV_CODEC_ID_PCM_ZORK: for (; n > 0; n--) { int v = *src++; if (v < 128) @@ -402,14 +402,14 @@ static int pcm_decode_frame(AVCodecContext *avctx, void *data, *samples++ = v; } break; - case CODEC_ID_PCM_ALAW: - case CODEC_ID_PCM_MULAW: + case AV_CODEC_ID_PCM_ALAW: + case AV_CODEC_ID_PCM_MULAW: for (; n > 0; n--) { AV_WN16A(samples, s->table[*src++]); samples += 2; } break; - case CODEC_ID_PCM_DVD: + case AV_CODEC_ID_PCM_DVD: { const uint8_t *src8; dst_int32_t = (int32_t *)s->frame.data[0]; @@ -440,7 +440,7 @@ static int pcm_decode_frame(AVCodecContext *avctx, void *data, } break; } - case CODEC_ID_PCM_LXF: + case AV_CODEC_ID_PCM_LXF: { int i; const uint8_t *src8; @@ -518,28 +518,28 @@ AVCodec ff_ ## name_ ## _decoder = { \ PCM_DECODER(id, sample_fmt_, name, long_name_) /* Note: Do not forget to add new entries to the Makefile as well. */ -PCM_CODEC (CODEC_ID_PCM_ALAW, AV_SAMPLE_FMT_S16, pcm_alaw, "PCM A-law"); -PCM_DECODER(CODEC_ID_PCM_DVD, AV_SAMPLE_FMT_S32, pcm_dvd, "PCM signed 20|24-bit big-endian"); -PCM_CODEC (CODEC_ID_PCM_F32BE, AV_SAMPLE_FMT_FLT, pcm_f32be, "PCM 32-bit floating point big-endian"); -PCM_CODEC (CODEC_ID_PCM_F32LE, AV_SAMPLE_FMT_FLT, pcm_f32le, "PCM 32-bit floating point little-endian"); -PCM_CODEC (CODEC_ID_PCM_F64BE, AV_SAMPLE_FMT_DBL, pcm_f64be, "PCM 64-bit floating point big-endian"); -PCM_CODEC (CODEC_ID_PCM_F64LE, AV_SAMPLE_FMT_DBL, pcm_f64le, "PCM 64-bit floating point little-endian"); -PCM_DECODER(CODEC_ID_PCM_LXF, AV_SAMPLE_FMT_S32, pcm_lxf, "PCM signed 20-bit little-endian planar"); -PCM_CODEC (CODEC_ID_PCM_MULAW, AV_SAMPLE_FMT_S16, pcm_mulaw, "PCM mu-law"); -PCM_CODEC (CODEC_ID_PCM_S8, AV_SAMPLE_FMT_U8, pcm_s8, "PCM signed 8-bit"); -PCM_CODEC (CODEC_ID_PCM_S16BE, AV_SAMPLE_FMT_S16, pcm_s16be, "PCM signed 16-bit big-endian"); -PCM_CODEC (CODEC_ID_PCM_S16LE, AV_SAMPLE_FMT_S16, pcm_s16le, "PCM signed 16-bit little-endian"); -PCM_DECODER(CODEC_ID_PCM_S16LE_PLANAR, AV_SAMPLE_FMT_S16, pcm_s16le_planar, "PCM 16-bit little-endian planar"); -PCM_CODEC (CODEC_ID_PCM_S24BE, AV_SAMPLE_FMT_S32, pcm_s24be, "PCM signed 24-bit big-endian"); -PCM_CODEC (CODEC_ID_PCM_S24DAUD, AV_SAMPLE_FMT_S16, pcm_s24daud, "PCM D-Cinema audio signed 24-bit"); -PCM_CODEC (CODEC_ID_PCM_S24LE, AV_SAMPLE_FMT_S32, pcm_s24le, "PCM signed 24-bit little-endian"); -PCM_CODEC (CODEC_ID_PCM_S32BE, AV_SAMPLE_FMT_S32, pcm_s32be, "PCM signed 32-bit big-endian"); -PCM_CODEC (CODEC_ID_PCM_S32LE, AV_SAMPLE_FMT_S32, pcm_s32le, "PCM signed 32-bit little-endian"); -PCM_CODEC (CODEC_ID_PCM_U8, AV_SAMPLE_FMT_U8, pcm_u8, "PCM unsigned 8-bit"); -PCM_CODEC (CODEC_ID_PCM_U16BE, AV_SAMPLE_FMT_S16, pcm_u16be, "PCM unsigned 16-bit big-endian"); -PCM_CODEC (CODEC_ID_PCM_U16LE, AV_SAMPLE_FMT_S16, pcm_u16le, "PCM unsigned 16-bit little-endian"); -PCM_CODEC (CODEC_ID_PCM_U24BE, AV_SAMPLE_FMT_S32, pcm_u24be, "PCM unsigned 24-bit big-endian"); -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_DECODER(CODEC_ID_PCM_ZORK, AV_SAMPLE_FMT_U8, pcm_zork, "PCM Zork"); +PCM_CODEC (AV_CODEC_ID_PCM_ALAW, AV_SAMPLE_FMT_S16, pcm_alaw, "PCM A-law"); +PCM_DECODER(AV_CODEC_ID_PCM_DVD, AV_SAMPLE_FMT_S32, pcm_dvd, "PCM signed 20|24-bit big-endian"); +PCM_CODEC (AV_CODEC_ID_PCM_F32BE, AV_SAMPLE_FMT_FLT, pcm_f32be, "PCM 32-bit floating point big-endian"); +PCM_CODEC (AV_CODEC_ID_PCM_F32LE, AV_SAMPLE_FMT_FLT, pcm_f32le, "PCM 32-bit floating point little-endian"); +PCM_CODEC (AV_CODEC_ID_PCM_F64BE, AV_SAMPLE_FMT_DBL, pcm_f64be, "PCM 64-bit floating point big-endian"); +PCM_CODEC (AV_CODEC_ID_PCM_F64LE, AV_SAMPLE_FMT_DBL, pcm_f64le, "PCM 64-bit floating point little-endian"); +PCM_DECODER(AV_CODEC_ID_PCM_LXF, AV_SAMPLE_FMT_S32, pcm_lxf, "PCM signed 20-bit little-endian planar"); +PCM_CODEC (AV_CODEC_ID_PCM_MULAW, AV_SAMPLE_FMT_S16, pcm_mulaw, "PCM mu-law"); +PCM_CODEC (AV_CODEC_ID_PCM_S8, AV_SAMPLE_FMT_U8, pcm_s8, "PCM signed 8-bit"); +PCM_CODEC (AV_CODEC_ID_PCM_S16BE, AV_SAMPLE_FMT_S16, pcm_s16be, "PCM signed 16-bit big-endian"); +PCM_CODEC (AV_CODEC_ID_PCM_S16LE, AV_SAMPLE_FMT_S16, pcm_s16le, "PCM signed 16-bit little-endian"); +PCM_DECODER(AV_CODEC_ID_PCM_S16LE_PLANAR, AV_SAMPLE_FMT_S16, pcm_s16le_planar, "PCM 16-bit little-endian planar"); +PCM_CODEC (AV_CODEC_ID_PCM_S24BE, AV_SAMPLE_FMT_S32, pcm_s24be, "PCM signed 24-bit big-endian"); +PCM_CODEC (AV_CODEC_ID_PCM_S24DAUD, AV_SAMPLE_FMT_S16, pcm_s24daud, "PCM D-Cinema audio signed 24-bit"); +PCM_CODEC (AV_CODEC_ID_PCM_S24LE, AV_SAMPLE_FMT_S32, pcm_s24le, "PCM signed 24-bit little-endian"); +PCM_CODEC (AV_CODEC_ID_PCM_S32BE, AV_SAMPLE_FMT_S32, pcm_s32be, "PCM signed 32-bit big-endian"); +PCM_CODEC (AV_CODEC_ID_PCM_S32LE, AV_SAMPLE_FMT_S32, pcm_s32le, "PCM signed 32-bit little-endian"); +PCM_CODEC (AV_CODEC_ID_PCM_U8, AV_SAMPLE_FMT_U8, pcm_u8, "PCM unsigned 8-bit"); +PCM_CODEC (AV_CODEC_ID_PCM_U16BE, AV_SAMPLE_FMT_S16, pcm_u16be, "PCM unsigned 16-bit big-endian"); +PCM_CODEC (AV_CODEC_ID_PCM_U16LE, AV_SAMPLE_FMT_S16, pcm_u16le, "PCM unsigned 16-bit little-endian"); +PCM_CODEC (AV_CODEC_ID_PCM_U24BE, AV_SAMPLE_FMT_S32, pcm_u24be, "PCM unsigned 24-bit big-endian"); +PCM_CODEC (AV_CODEC_ID_PCM_U24LE, AV_SAMPLE_FMT_S32, pcm_u24le, "PCM unsigned 24-bit little-endian"); +PCM_CODEC (AV_CODEC_ID_PCM_U32BE, AV_SAMPLE_FMT_S32, pcm_u32be, "PCM unsigned 32-bit big-endian"); +PCM_CODEC (AV_CODEC_ID_PCM_U32LE, AV_SAMPLE_FMT_S32, pcm_u32le, "PCM unsigned 32-bit little-endian"); +PCM_DECODER(AV_CODEC_ID_PCM_ZORK, AV_SAMPLE_FMT_U8, pcm_zork, "PCM Zork"); diff --git a/libavcodec/pcx.c b/libavcodec/pcx.c index 44b071d24d..0a18acd486 100644 --- a/libavcodec/pcx.c +++ b/libavcodec/pcx.c @@ -250,7 +250,7 @@ static av_cold int pcx_end(AVCodecContext *avctx) { AVCodec ff_pcx_decoder = { .name = "pcx", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_PCX, + .id = AV_CODEC_ID_PCX, .priv_data_size = sizeof(PCXContext), .init = pcx_init, .close = pcx_end, diff --git a/libavcodec/pcxenc.c b/libavcodec/pcxenc.c index 865d7bdbd3..7fc0408b5c 100644 --- a/libavcodec/pcxenc.c +++ b/libavcodec/pcxenc.c @@ -205,7 +205,7 @@ static int pcx_encode_frame(AVCodecContext *avctx, AVPacket *pkt, AVCodec ff_pcx_encoder = { .name = "pcx", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_PCX, + .id = AV_CODEC_ID_PCX, .priv_data_size = sizeof(PCXContext), .init = pcx_encode_init, .encode2 = pcx_encode_frame, diff --git a/libavcodec/pgssubdec.c b/libavcodec/pgssubdec.c index 33354122b2..49ef325eca 100644 --- a/libavcodec/pgssubdec.c +++ b/libavcodec/pgssubdec.c @@ -471,7 +471,7 @@ static int decode(AVCodecContext *avctx, void *data, int *data_size, AVCodec ff_pgssub_decoder = { .name = "pgssub", .type = AVMEDIA_TYPE_SUBTITLE, - .id = CODEC_ID_HDMV_PGS_SUBTITLE, + .id = AV_CODEC_ID_HDMV_PGS_SUBTITLE, .priv_data_size = sizeof(PGSSubContext), .init = init_decoder, .close = close_decoder, diff --git a/libavcodec/pictordec.c b/libavcodec/pictordec.c index 53a14c90e2..109c8f1035 100644 --- a/libavcodec/pictordec.c +++ b/libavcodec/pictordec.c @@ -253,7 +253,7 @@ static av_cold int decode_end(AVCodecContext *avctx) AVCodec ff_pictor_decoder = { .name = "pictor", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_PICTOR, + .id = AV_CODEC_ID_PICTOR, .priv_data_size = sizeof(PicContext), .close = decode_end, .decode = decode_frame, diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c index 871f2b2ba3..da63c5f28c 100644 --- a/libavcodec/pngdec.c +++ b/libavcodec/pngdec.c @@ -652,7 +652,7 @@ static av_cold int png_dec_end(AVCodecContext *avctx) AVCodec ff_png_decoder = { .name = "png", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_PNG, + .id = AV_CODEC_ID_PNG, .priv_data_size = sizeof(PNGDecContext), .init = png_dec_init, .close = png_dec_end, diff --git a/libavcodec/pngenc.c b/libavcodec/pngenc.c index 947c7e147b..a0b667972c 100644 --- a/libavcodec/pngenc.c +++ b/libavcodec/pngenc.c @@ -456,7 +456,7 @@ static av_cold int png_enc_init(AVCodecContext *avctx){ AVCodec ff_png_encoder = { .name = "png", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_PNG, + .id = AV_CODEC_ID_PNG, .priv_data_size = sizeof(PNGEncContext), .init = png_enc_init, .encode2 = encode_frame, diff --git a/libavcodec/pnm.c b/libavcodec/pnm.c index 6d72f234c1..13572dd8bb 100644 --- a/libavcodec/pnm.c +++ b/libavcodec/pnm.c @@ -67,7 +67,7 @@ int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext * const s) if (s->type==1 || s->type==4) { avctx->pix_fmt = PIX_FMT_MONOWHITE; } else if (s->type==2 || s->type==5) { - if (avctx->codec_id == CODEC_ID_PGMYUV) + if (avctx->codec_id == AV_CODEC_ID_PGMYUV) avctx->pix_fmt = PIX_FMT_YUV420P; else avctx->pix_fmt = PIX_FMT_GRAY8; diff --git a/libavcodec/pnm_parser.c b/libavcodec/pnm_parser.c index 89f98715bd..2e00c0a31e 100644 --- a/libavcodec/pnm_parser.c +++ b/libavcodec/pnm_parser.c @@ -84,8 +84,8 @@ retry: } AVCodecParser ff_pnm_parser = { - .codec_ids = { CODEC_ID_PGM, CODEC_ID_PGMYUV, CODEC_ID_PPM, - CODEC_ID_PBM, CODEC_ID_PAM }, + .codec_ids = { AV_CODEC_ID_PGM, AV_CODEC_ID_PGMYUV, AV_CODEC_ID_PPM, + AV_CODEC_ID_PBM, AV_CODEC_ID_PAM }, .priv_data_size = sizeof(ParseContext), .parser_parse = pnm_parse, .parser_close = ff_parse_close, diff --git a/libavcodec/pnmdec.c b/libavcodec/pnmdec.c index 8185a4fc16..f7d8eff8e4 100644 --- a/libavcodec/pnmdec.c +++ b/libavcodec/pnmdec.c @@ -191,7 +191,7 @@ static int pnm_decode_frame(AVCodecContext *avctx, void *data, AVCodec ff_pgm_decoder = { .name = "pgm", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_PGM, + .id = AV_CODEC_ID_PGM, .priv_data_size = sizeof(PNMContext), .init = ff_pnm_init, .close = ff_pnm_end, @@ -205,7 +205,7 @@ AVCodec ff_pgm_decoder = { AVCodec ff_pgmyuv_decoder = { .name = "pgmyuv", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_PGMYUV, + .id = AV_CODEC_ID_PGMYUV, .priv_data_size = sizeof(PNMContext), .init = ff_pnm_init, .close = ff_pnm_end, @@ -219,7 +219,7 @@ AVCodec ff_pgmyuv_decoder = { AVCodec ff_ppm_decoder = { .name = "ppm", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_PPM, + .id = AV_CODEC_ID_PPM, .priv_data_size = sizeof(PNMContext), .init = ff_pnm_init, .close = ff_pnm_end, @@ -233,7 +233,7 @@ AVCodec ff_ppm_decoder = { AVCodec ff_pbm_decoder = { .name = "pbm", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_PBM, + .id = AV_CODEC_ID_PBM, .priv_data_size = sizeof(PNMContext), .init = ff_pnm_init, .close = ff_pnm_end, @@ -247,7 +247,7 @@ AVCodec ff_pbm_decoder = { AVCodec ff_pam_decoder = { .name = "pam", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_PAM, + .id = AV_CODEC_ID_PAM, .priv_data_size = sizeof(PNMContext), .init = ff_pnm_init, .close = ff_pnm_end, diff --git a/libavcodec/pnmenc.c b/libavcodec/pnmenc.c index f41baab72e..b4194b68c8 100644 --- a/libavcodec/pnmenc.c +++ b/libavcodec/pnmenc.c @@ -122,7 +122,7 @@ static int pnm_encode_frame(AVCodecContext *avctx, AVPacket *pkt, AVCodec ff_pgm_encoder = { .name = "pgm", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_PGM, + .id = AV_CODEC_ID_PGM, .priv_data_size = sizeof(PNMContext), .init = ff_pnm_init, .encode2 = pnm_encode_frame, @@ -137,7 +137,7 @@ AVCodec ff_pgm_encoder = { AVCodec ff_pgmyuv_encoder = { .name = "pgmyuv", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_PGMYUV, + .id = AV_CODEC_ID_PGMYUV, .priv_data_size = sizeof(PNMContext), .init = ff_pnm_init, .encode2 = pnm_encode_frame, @@ -150,7 +150,7 @@ AVCodec ff_pgmyuv_encoder = { AVCodec ff_ppm_encoder = { .name = "ppm", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_PPM, + .id = AV_CODEC_ID_PPM, .priv_data_size = sizeof(PNMContext), .init = ff_pnm_init, .encode2 = pnm_encode_frame, @@ -165,7 +165,7 @@ AVCodec ff_ppm_encoder = { AVCodec ff_pbm_encoder = { .name = "pbm", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_PBM, + .id = AV_CODEC_ID_PBM, .priv_data_size = sizeof(PNMContext), .init = ff_pnm_init, .encode2 = pnm_encode_frame, diff --git a/libavcodec/proresdec.c b/libavcodec/proresdec.c index a399576179..86ce1576f3 100644 --- a/libavcodec/proresdec.c +++ b/libavcodec/proresdec.c @@ -663,7 +663,7 @@ static av_cold int decode_close(AVCodecContext *avctx) AVCodec ff_prores_decoder = { .name = "prores", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_PRORES, + .id = AV_CODEC_ID_PRORES, .priv_data_size = sizeof(ProresContext), .init = decode_init, .close = decode_close, diff --git a/libavcodec/proresenc.c b/libavcodec/proresenc.c index f82153309b..374ff45c70 100644 --- a/libavcodec/proresenc.c +++ b/libavcodec/proresenc.c @@ -1021,7 +1021,7 @@ static const AVClass proresenc_class = { AVCodec ff_prores_encoder = { .name = "prores", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_PRORES, + .id = AV_CODEC_ID_PRORES, .priv_data_size = sizeof(ProresContext), .init = encode_init, .close = encode_close, diff --git a/libavcodec/psymodel.c b/libavcodec/psymodel.c index 5d6c32eda1..d145a53691 100644 --- a/libavcodec/psymodel.c +++ b/libavcodec/psymodel.c @@ -51,7 +51,7 @@ av_cold int ff_psy_init(FFPsyContext *ctx, AVCodecContext *avctx, int num_lens, } switch (ctx->avctx->codec_id) { - case CODEC_ID_AAC: + case AV_CODEC_ID_AAC: ctx->model = &ff_aac_psy_model; break; } diff --git a/libavcodec/ptx.c b/libavcodec/ptx.c index 2782706e82..51a69f916d 100644 --- a/libavcodec/ptx.c +++ b/libavcodec/ptx.c @@ -119,7 +119,7 @@ static av_cold int ptx_end(AVCodecContext *avctx) { AVCodec ff_ptx_decoder = { .name = "ptx", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_PTX, + .id = AV_CODEC_ID_PTX, .priv_data_size = sizeof(PTXContext), .init = ptx_init, .close = ptx_end, diff --git a/libavcodec/qcelpdec.c b/libavcodec/qcelpdec.c index a3af2378f3..c598d6bf65 100644 --- a/libavcodec/qcelpdec.c +++ b/libavcodec/qcelpdec.c @@ -793,7 +793,7 @@ erasure: AVCodec ff_qcelp_decoder = { .name = "qcelp", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_QCELP, + .id = AV_CODEC_ID_QCELP, .init = qcelp_decode_init, .decode = qcelp_decode_frame, .capabilities = CODEC_CAP_DR1, diff --git a/libavcodec/qdm2.c b/libavcodec/qdm2.c index 4b5ef5cd00..945999e126 100644 --- a/libavcodec/qdm2.c +++ b/libavcodec/qdm2.c @@ -1962,7 +1962,7 @@ AVCodec ff_qdm2_decoder = { .name = "qdm2", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_QDM2, + .id = AV_CODEC_ID_QDM2, .priv_data_size = sizeof(QDM2Context), .init = qdm2_decode_init, .close = qdm2_decode_close, diff --git a/libavcodec/qdrw.c b/libavcodec/qdrw.c index 9794eab0ef..0228c52f8a 100644 --- a/libavcodec/qdrw.c +++ b/libavcodec/qdrw.c @@ -165,7 +165,7 @@ static av_cold int decode_end(AVCodecContext *avctx){ AVCodec ff_qdraw_decoder = { .name = "qdraw", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_QDRAW, + .id = AV_CODEC_ID_QDRAW, .priv_data_size = sizeof(QdrawContext), .init = decode_init, .close = decode_end, diff --git a/libavcodec/qpeg.c b/libavcodec/qpeg.c index 2f1b7434f2..6092622beb 100644 --- a/libavcodec/qpeg.c +++ b/libavcodec/qpeg.c @@ -310,7 +310,7 @@ static av_cold int decode_end(AVCodecContext *avctx){ AVCodec ff_qpeg_decoder = { .name = "qpeg", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_QPEG, + .id = AV_CODEC_ID_QPEG, .priv_data_size = sizeof(QpegContext), .init = decode_init, .close = decode_end, diff --git a/libavcodec/qtrle.c b/libavcodec/qtrle.c index 03115fa431..c289114d1f 100644 --- a/libavcodec/qtrle.c +++ b/libavcodec/qtrle.c @@ -498,7 +498,7 @@ static av_cold int qtrle_decode_end(AVCodecContext *avctx) AVCodec ff_qtrle_decoder = { .name = "qtrle", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_QTRLE, + .id = AV_CODEC_ID_QTRLE, .priv_data_size = sizeof(QtrleContext), .init = qtrle_decode_init, .close = qtrle_decode_end, diff --git a/libavcodec/qtrleenc.c b/libavcodec/qtrleenc.c index c3dae160e0..ae70e733bd 100644 --- a/libavcodec/qtrleenc.c +++ b/libavcodec/qtrleenc.c @@ -330,7 +330,7 @@ static av_cold int qtrle_encode_end(AVCodecContext *avctx) AVCodec ff_qtrle_encoder = { .name = "qtrle", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_QTRLE, + .id = AV_CODEC_ID_QTRLE, .priv_data_size = sizeof(QtrleEncContext), .init = qtrle_encode_init, .encode2 = qtrle_encode_frame, diff --git a/libavcodec/r210dec.c b/libavcodec/r210dec.c index dae3956f16..d85e970553 100644 --- a/libavcodec/r210dec.c +++ b/libavcodec/r210dec.c @@ -63,7 +63,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, for (w = 0; w < avctx->width; w++) { uint32_t pixel = av_be2ne32(*src++); uint16_t r, g, b; - if (avctx->codec_id==CODEC_ID_R210) { + if (avctx->codec_id==AV_CODEC_ID_R210) { b = pixel << 6; g = (pixel >> 4) & 0xffc0; r = (pixel >> 14) & 0xffc0; @@ -100,7 +100,7 @@ static av_cold int decode_close(AVCodecContext *avctx) AVCodec ff_r210_decoder = { .name = "r210", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_R210, + .id = AV_CODEC_ID_R210, .init = decode_init, .close = decode_close, .decode = decode_frame, @@ -112,7 +112,7 @@ AVCodec ff_r210_decoder = { AVCodec ff_r10k_decoder = { .name = "r10k", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_R10K, + .id = AV_CODEC_ID_R10K, .init = decode_init, .close = decode_close, .decode = decode_frame, diff --git a/libavcodec/ra144dec.c b/libavcodec/ra144dec.c index dd8838c417..0cb4f86721 100644 --- a/libavcodec/ra144dec.c +++ b/libavcodec/ra144dec.c @@ -129,7 +129,7 @@ static int ra144_decode_frame(AVCodecContext * avctx, void *data, AVCodec ff_ra_144_decoder = { .name = "real_144", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_RA_144, + .id = AV_CODEC_ID_RA_144, .priv_data_size = sizeof(RA144Context), .init = ra144_decode_init, .decode = ra144_decode_frame, diff --git a/libavcodec/ra144enc.c b/libavcodec/ra144enc.c index 47f0d6d414..5b5de76434 100644 --- a/libavcodec/ra144enc.c +++ b/libavcodec/ra144enc.c @@ -557,7 +557,7 @@ static int ra144_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, AVCodec ff_ra_144_encoder = { .name = "real_144", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_RA_144, + .id = AV_CODEC_ID_RA_144, .priv_data_size = sizeof(RA144Context), .init = ra144_encode_init, .encode2 = ra144_encode_frame, diff --git a/libavcodec/ra288.c b/libavcodec/ra288.c index aa7ad33312..c13d0e633e 100644 --- a/libavcodec/ra288.c +++ b/libavcodec/ra288.c @@ -224,7 +224,7 @@ static int ra288_decode_frame(AVCodecContext * avctx, void *data, AVCodec ff_ra_288_decoder = { .name = "real_288", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_RA_288, + .id = AV_CODEC_ID_RA_288, .priv_data_size = sizeof(RA288Context), .init = ra288_decode_init, .decode = ra288_decode_frame, diff --git a/libavcodec/ralf.c b/libavcodec/ralf.c index a75fe73168..6866f79609 100644 --- a/libavcodec/ralf.c +++ b/libavcodec/ralf.c @@ -525,7 +525,7 @@ static void decode_flush(AVCodecContext *avctx) AVCodec ff_ralf_decoder = { .name = "ralf", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_RALF, + .id = AV_CODEC_ID_RALF, .priv_data_size = sizeof(RALFContext), .init = decode_init, .close = decode_close, diff --git a/libavcodec/ratecontrol.c b/libavcodec/ratecontrol.c index e2e3a54137..de32da2a7c 100644 --- a/libavcodec/ratecontrol.c +++ b/libavcodec/ratecontrol.c @@ -286,7 +286,7 @@ int ff_vbv_update(MpegEncContext *s, int frame_size){ if(rcc->buffer_index > buffer_size){ int stuffing= ceil((rcc->buffer_index - buffer_size)/8); - if(stuffing < 4 && s->codec_id == CODEC_ID_MPEG4) + if(stuffing < 4 && s->codec_id == AV_CODEC_ID_MPEG4) stuffing=4; rcc->buffer_index -= 8*stuffing; diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c index a9884e6fe9..e8a6a3bcb4 100644 --- a/libavcodec/rawdec.c +++ b/libavcodec/rawdec.c @@ -210,7 +210,7 @@ static av_cold int raw_close_decoder(AVCodecContext *avctx) AVCodec ff_rawvideo_decoder = { .name = "rawvideo", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_RAWVIDEO, + .id = AV_CODEC_ID_RAWVIDEO, .priv_data_size = sizeof(RawVideoContext), .init = raw_init_decoder, .close = raw_close_decoder, diff --git a/libavcodec/rawenc.c b/libavcodec/rawenc.c index cf12684c45..56edf50649 100644 --- a/libavcodec/rawenc.c +++ b/libavcodec/rawenc.c @@ -69,7 +69,7 @@ static int raw_encode(AVCodecContext *avctx, AVPacket *pkt, AVCodec ff_rawvideo_encoder = { .name = "rawvideo", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_RAWVIDEO, + .id = AV_CODEC_ID_RAWVIDEO, .priv_data_size = sizeof(AVFrame), .init = raw_init_encoder, .encode2 = raw_encode, diff --git a/libavcodec/rl2.c b/libavcodec/rl2.c index 4d1937a4b4..9f9ecc225c 100644 --- a/libavcodec/rl2.c +++ b/libavcodec/rl2.c @@ -221,7 +221,7 @@ static av_cold int rl2_decode_end(AVCodecContext *avctx) AVCodec ff_rl2_decoder = { .name = "rl2", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_RL2, + .id = AV_CODEC_ID_RL2, .priv_data_size = sizeof(Rl2Context), .init = rl2_decode_init, .close = rl2_decode_end, diff --git a/libavcodec/roqaudioenc.c b/libavcodec/roqaudioenc.c index 6b6c259046..8ee6002373 100644 --- a/libavcodec/roqaudioenc.c +++ b/libavcodec/roqaudioenc.c @@ -205,7 +205,7 @@ static int roq_dpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, AVCodec ff_roq_dpcm_encoder = { .name = "roq_dpcm", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_ROQ_DPCM, + .id = AV_CODEC_ID_ROQ_DPCM, .priv_data_size = sizeof(ROQDPCMContext), .init = roq_dpcm_encode_init, .encode2 = roq_dpcm_encode_frame, diff --git a/libavcodec/roqvideodec.c b/libavcodec/roqvideodec.c index 7a548e5ad2..a88e9f2ae9 100644 --- a/libavcodec/roqvideodec.c +++ b/libavcodec/roqvideodec.c @@ -215,7 +215,7 @@ static av_cold int roq_decode_end(AVCodecContext *avctx) AVCodec ff_roq_decoder = { .name = "roqvideo", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_ROQ, + .id = AV_CODEC_ID_ROQ, .priv_data_size = sizeof(RoqContext), .init = roq_decode_init, .close = roq_decode_end, diff --git a/libavcodec/roqvideoenc.c b/libavcodec/roqvideoenc.c index b196b89d85..f0b8a9807f 100644 --- a/libavcodec/roqvideoenc.c +++ b/libavcodec/roqvideoenc.c @@ -1075,7 +1075,7 @@ static int roq_encode_end(AVCodecContext *avctx) AVCodec ff_roq_encoder = { .name = "roqvideo", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_ROQ, + .id = AV_CODEC_ID_ROQ, .priv_data_size = sizeof(RoqContext), .init = roq_encode_init, .encode2 = roq_encode_frame, diff --git a/libavcodec/rpza.c b/libavcodec/rpza.c index d034e66e24..79e993a38b 100644 --- a/libavcodec/rpza.c +++ b/libavcodec/rpza.c @@ -282,7 +282,7 @@ static av_cold int rpza_decode_end(AVCodecContext *avctx) AVCodec ff_rpza_decoder = { .name = "rpza", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_RPZA, + .id = AV_CODEC_ID_RPZA, .priv_data_size = sizeof(RpzaContext), .init = rpza_decode_init, .close = rpza_decode_end, diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c index bc81f08b9c..a23684653e 100644 --- a/libavcodec/rv10.c +++ b/libavcodec/rv10.c @@ -510,7 +510,7 @@ static int rv10_decode_packet(AVCodecContext *avctx, active_bits_size = buf_size * 8; init_get_bits(&s->gb, buf, FFMAX(buf_size, buf_size2) * 8); - if(s->codec_id ==CODEC_ID_RV10) + if(s->codec_id ==AV_CODEC_ID_RV10) mb_count = rv10_decode_picture_header(s); else mb_count = rv20_decode_picture_header(rv); @@ -550,7 +550,7 @@ static int rv10_decode_packet(AVCodecContext *avctx, av_dlog(avctx, "qscale=%d\n", s->qscale); /* default quantization values */ - if(s->codec_id== CODEC_ID_RV10){ + if(s->codec_id== AV_CODEC_ID_RV10){ if(s->mb_y==0) s->first_slice_line=1; }else{ s->first_slice_line=1; @@ -720,7 +720,7 @@ static int rv10_decode_frame(AVCodecContext *avctx, AVCodec ff_rv10_decoder = { .name = "rv10", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_RV10, + .id = AV_CODEC_ID_RV10, .priv_data_size = sizeof(RVDecContext), .init = rv10_decode_init, .close = rv10_decode_end, @@ -733,7 +733,7 @@ AVCodec ff_rv10_decoder = { AVCodec ff_rv20_decoder = { .name = "rv20", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_RV20, + .id = AV_CODEC_ID_RV20, .priv_data_size = sizeof(RVDecContext), .init = rv10_decode_init, .close = rv10_decode_end, diff --git a/libavcodec/rv10enc.c b/libavcodec/rv10enc.c index a6127f62fe..4fd09658d4 100644 --- a/libavcodec/rv10enc.c +++ b/libavcodec/rv10enc.c @@ -61,7 +61,7 @@ FF_MPV_GENERIC_CLASS(rv10) AVCodec ff_rv10_encoder = { .name = "rv10", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_RV10, + .id = AV_CODEC_ID_RV10, .priv_data_size = sizeof(MpegEncContext), .init = ff_MPV_encode_init, .encode2 = ff_MPV_encode_picture, diff --git a/libavcodec/rv20enc.c b/libavcodec/rv20enc.c index 44cc59ff58..024e36bee0 100644 --- a/libavcodec/rv20enc.c +++ b/libavcodec/rv20enc.c @@ -62,7 +62,7 @@ FF_MPV_GENERIC_CLASS(rv20) AVCodec ff_rv20_encoder = { .name = "rv20", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_RV20, + .id = AV_CODEC_ID_RV20, .priv_data_size = sizeof(MpegEncContext), .init = ff_MPV_encode_init, .encode2 = ff_MPV_encode_picture, diff --git a/libavcodec/rv30.c b/libavcodec/rv30.c index 8a4cdf8aba..8016ad35f7 100644 --- a/libavcodec/rv30.c +++ b/libavcodec/rv30.c @@ -270,7 +270,7 @@ static av_cold int rv30_decode_init(AVCodecContext *avctx) AVCodec ff_rv30_decoder = { .name = "rv30", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_RV30, + .id = AV_CODEC_ID_RV30, .priv_data_size = sizeof(RV34DecContext), .init = rv30_decode_init, .close = ff_rv34_decode_end, diff --git a/libavcodec/rv34.c b/libavcodec/rv34.c index beecf67e28..7e83a99959 100644 --- a/libavcodec/rv34.c +++ b/libavcodec/rv34.c @@ -1486,14 +1486,14 @@ av_cold int ff_rv34_decode_init(AVCodecContext *avctx) if ((ret = ff_MPV_common_init(s)) < 0) return ret; - ff_h264_pred_init(&r->h, CODEC_ID_RV40, 8, 1); + ff_h264_pred_init(&r->h, AV_CODEC_ID_RV40, 8, 1); #if CONFIG_RV30_DECODER - if (avctx->codec_id == CODEC_ID_RV30) + if (avctx->codec_id == AV_CODEC_ID_RV30) ff_rv30dsp_init(&r->rdsp, &r->s.dsp); #endif #if CONFIG_RV40_DECODER - if (avctx->codec_id == CODEC_ID_RV40) + if (avctx->codec_id == AV_CODEC_ID_RV40) ff_rv40dsp_init(&r->rdsp, &r->s.dsp); #endif diff --git a/libavcodec/rv34_parser.c b/libavcodec/rv34_parser.c index 4c1d2e396e..ccb431426c 100644 --- a/libavcodec/rv34_parser.c +++ b/libavcodec/rv34_parser.c @@ -52,7 +52,7 @@ static int rv34_parse(AVCodecParserContext *s, } hdr = AV_RB32(buf + 9 + *buf * 8); - if (avctx->codec_id == CODEC_ID_RV30) { + if (avctx->codec_id == AV_CODEC_ID_RV30) { type = (hdr >> 27) & 3; pts = (hdr >> 7) & 0x1FFF; } else { @@ -78,7 +78,7 @@ static int rv34_parse(AVCodecParserContext *s, #ifdef CONFIG_RV30_PARSER AVCodecParser ff_rv30_parser = { - .codec_ids = { CODEC_ID_RV30 }, + .codec_ids = { AV_CODEC_ID_RV30 }, .priv_data_size = sizeof(RV34ParseContext), .parser_parse = rv34_parse, }; @@ -86,7 +86,7 @@ AVCodecParser ff_rv30_parser = { #ifdef CONFIG_RV40_PARSER AVCodecParser ff_rv40_parser = { - .codec_ids = { CODEC_ID_RV40 }, + .codec_ids = { AV_CODEC_ID_RV40 }, .priv_data_size = sizeof(RV34ParseContext), .parser_parse = rv34_parse, }; diff --git a/libavcodec/rv40.c b/libavcodec/rv40.c index 695b0299a6..f95622ab5a 100644 --- a/libavcodec/rv40.c +++ b/libavcodec/rv40.c @@ -562,7 +562,7 @@ static av_cold int rv40_decode_init(AVCodecContext *avctx) AVCodec ff_rv40_decoder = { .name = "rv40", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_RV40, + .id = AV_CODEC_ID_RV40, .priv_data_size = sizeof(RV34DecContext), .init = rv40_decode_init, .close = ff_rv34_decode_end, diff --git a/libavcodec/s302m.c b/libavcodec/s302m.c index 34018aeb46..bffd3c6916 100644 --- a/libavcodec/s302m.c +++ b/libavcodec/s302m.c @@ -156,7 +156,7 @@ static int s302m_decode_init(AVCodecContext *avctx) AVCodec ff_s302m_decoder = { .name = "s302m", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_S302M, + .id = AV_CODEC_ID_S302M, .priv_data_size = sizeof(S302MDecodeContext), .init = s302m_decode_init, .decode = s302m_decode_frame, diff --git a/libavcodec/sgidec.c b/libavcodec/sgidec.c index 87d426e7c0..2702746148 100644 --- a/libavcodec/sgidec.c +++ b/libavcodec/sgidec.c @@ -261,7 +261,7 @@ static av_cold int sgi_end(AVCodecContext *avctx) AVCodec ff_sgi_decoder = { .name = "sgi", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_SGI, + .id = AV_CODEC_ID_SGI, .priv_data_size = sizeof(SgiState), .init = sgi_init, .close = sgi_end, diff --git a/libavcodec/sgienc.c b/libavcodec/sgienc.c index 07c942e74c..49440fa978 100644 --- a/libavcodec/sgienc.c +++ b/libavcodec/sgienc.c @@ -173,7 +173,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, AVCodec ff_sgi_encoder = { .name = "sgi", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_SGI, + .id = AV_CODEC_ID_SGI, .priv_data_size = sizeof(SgiContext), .init = encode_init, .encode2 = encode_frame, diff --git a/libavcodec/shorten.c b/libavcodec/shorten.c index 62b6ae1fe0..fb48070eb6 100644 --- a/libavcodec/shorten.c +++ b/libavcodec/shorten.c @@ -630,7 +630,7 @@ static av_cold int shorten_decode_close(AVCodecContext *avctx) AVCodec ff_shorten_decoder = { .name = "shorten", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_SHORTEN, + .id = AV_CODEC_ID_SHORTEN, .priv_data_size = sizeof(ShortenContext), .init = shorten_decode_init, .close = shorten_decode_close, diff --git a/libavcodec/sipr.c b/libavcodec/sipr.c index bd98e025b2..a14b7c7151 100644 --- a/libavcodec/sipr.c +++ b/libavcodec/sipr.c @@ -561,7 +561,7 @@ static int sipr_decode_frame(AVCodecContext *avctx, void *data, AVCodec ff_sipr_decoder = { .name = "sipr", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_SIPR, + .id = AV_CODEC_ID_SIPR, .priv_data_size = sizeof(SiprContext), .init = sipr_decoder_init, .decode = sipr_decode_frame, diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c index 32ce48ff63..72f2ed11a4 100644 --- a/libavcodec/smacker.c +++ b/libavcodec/smacker.c @@ -724,7 +724,7 @@ static int smka_decode_frame(AVCodecContext *avctx, void *data, AVCodec ff_smacker_decoder = { .name = "smackvid", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_SMACKVIDEO, + .id = AV_CODEC_ID_SMACKVIDEO, .priv_data_size = sizeof(SmackVContext), .init = decode_init, .close = decode_end, @@ -736,7 +736,7 @@ AVCodec ff_smacker_decoder = { AVCodec ff_smackaud_decoder = { .name = "smackaud", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_SMACKAUDIO, + .id = AV_CODEC_ID_SMACKAUDIO, .priv_data_size = sizeof(SmackerAudioContext), .init = smka_decode_init, .decode = smka_decode_frame, diff --git a/libavcodec/smc.c b/libavcodec/smc.c index 37b00ca310..25b8885ae8 100644 --- a/libavcodec/smc.c +++ b/libavcodec/smc.c @@ -467,7 +467,7 @@ static av_cold int smc_decode_end(AVCodecContext *avctx) AVCodec ff_smc_decoder = { .name = "smc", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_SMC, + .id = AV_CODEC_ID_SMC, .priv_data_size = sizeof(SmcContext), .init = smc_decode_init, .close = smc_decode_end, diff --git a/libavcodec/snowdec.c b/libavcodec/snowdec.c index 9ea8c493fd..38afdd250a 100644 --- a/libavcodec/snowdec.c +++ b/libavcodec/snowdec.c @@ -563,7 +563,7 @@ static av_cold int decode_end(AVCodecContext *avctx) AVCodec ff_snow_decoder = { .name = "snow", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_SNOW, + .id = AV_CODEC_ID_SNOW, .priv_data_size = sizeof(SnowContext), .init = decode_init, .close = decode_end, diff --git a/libavcodec/snowenc.c b/libavcodec/snowenc.c index ebfeff6cef..2eaf923540 100644 --- a/libavcodec/snowenc.c +++ b/libavcodec/snowenc.c @@ -1928,7 +1928,7 @@ static const AVClass snowenc_class = { AVCodec ff_snow_encoder = { .name = "snow", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_SNOW, + .id = AV_CODEC_ID_SNOW, .priv_data_size = sizeof(SnowContext), .init = encode_init, .encode2 = encode_frame, diff --git a/libavcodec/sp5xdec.c b/libavcodec/sp5xdec.c index 253c211709..29b00592f1 100644 --- a/libavcodec/sp5xdec.c +++ b/libavcodec/sp5xdec.c @@ -68,7 +68,7 @@ static int sp5x_decode_frame(AVCodecContext *avctx, memcpy(recoded+j, &sp5x_data_sos[0], sizeof(sp5x_data_sos)); j += sizeof(sp5x_data_sos); - if(avctx->codec_id==CODEC_ID_AMV) + if(avctx->codec_id==AV_CODEC_ID_AMV) for (i = 2; i < buf_size-2 && j < buf_size+1024-2; i++) recoded[j++] = buf[i]; else @@ -96,7 +96,7 @@ static int sp5x_decode_frame(AVCodecContext *avctx, AVCodec ff_sp5x_decoder = { .name = "sp5x", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_SP5X, + .id = AV_CODEC_ID_SP5X, .priv_data_size = sizeof(MJpegDecodeContext), .init = ff_mjpeg_decode_init, .close = ff_mjpeg_decode_end, @@ -108,7 +108,7 @@ AVCodec ff_sp5x_decoder = { AVCodec ff_amv_decoder = { .name = "amv", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_AMV, + .id = AV_CODEC_ID_AMV, .priv_data_size = sizeof(MJpegDecodeContext), .init = ff_mjpeg_decode_init, .close = ff_mjpeg_decode_end, diff --git a/libavcodec/srtdec.c b/libavcodec/srtdec.c index 99cbd9428b..a5c46af53b 100644 --- a/libavcodec/srtdec.c +++ b/libavcodec/srtdec.c @@ -235,7 +235,7 @@ AVCodec ff_srt_decoder = { .name = "srt", .long_name = NULL_IF_CONFIG_SMALL("SubRip subtitle"), .type = AVMEDIA_TYPE_SUBTITLE, - .id = CODEC_ID_SRT, + .id = AV_CODEC_ID_SRT, .init = ff_ass_subtitle_header_default, .decode = srt_decode_frame, }; diff --git a/libavcodec/sunrast.c b/libavcodec/sunrast.c index 79e6d9dceb..441e6891a8 100644 --- a/libavcodec/sunrast.c +++ b/libavcodec/sunrast.c @@ -196,7 +196,7 @@ static av_cold int sunrast_end(AVCodecContext *avctx) { AVCodec ff_sunrast_decoder = { .name = "sunrast", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_SUNRAST, + .id = AV_CODEC_ID_SUNRAST, .priv_data_size = sizeof(SUNRASTContext), .init = sunrast_init, .close = sunrast_end, diff --git a/libavcodec/sunrastenc.c b/libavcodec/sunrastenc.c index 1ed1d6eddb..8bcfdf487c 100644 --- a/libavcodec/sunrastenc.c +++ b/libavcodec/sunrastenc.c @@ -215,7 +215,7 @@ static const AVCodecDefault sunrast_defaults[] = { AVCodec ff_sunrast_encoder = { .name = "sunrast", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_SUNRAST, + .id = AV_CODEC_ID_SUNRAST, .priv_data_size = sizeof(SUNRASTContext), .init = sunrast_encode_init, .encode2 = sunrast_encode_frame, diff --git a/libavcodec/svq1dec.c b/libavcodec/svq1dec.c index 25972e4996..174313179c 100644 --- a/libavcodec/svq1dec.c +++ b/libavcodec/svq1dec.c @@ -812,7 +812,7 @@ static av_cold int svq1_decode_end(AVCodecContext *avctx) AVCodec ff_svq1_decoder = { .name = "svq1", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_SVQ1, + .id = AV_CODEC_ID_SVQ1, .priv_data_size = sizeof(MpegEncContext), .init = svq1_decode_init, .close = svq1_decode_end, diff --git a/libavcodec/svq1enc.c b/libavcodec/svq1enc.c index 9519d240b5..3d9055864e 100644 --- a/libavcodec/svq1enc.c +++ b/libavcodec/svq1enc.c @@ -581,7 +581,7 @@ static av_cold int svq1_encode_end(AVCodecContext *avctx) AVCodec ff_svq1_encoder = { .name = "svq1", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_SVQ1, + .id = AV_CODEC_ID_SVQ1, .priv_data_size = sizeof(SVQ1Context), .init = svq1_encode_init, .encode2 = svq1_encode_frame, diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c index f343d53447..4d0e282735 100644 --- a/libavcodec/svq3.c +++ b/libavcodec/svq3.c @@ -1104,7 +1104,7 @@ static int svq3_decode_end(AVCodecContext *avctx) AVCodec ff_svq3_decoder = { .name = "svq3", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_SVQ3, + .id = AV_CODEC_ID_SVQ3, .priv_data_size = sizeof(SVQ3Context), .init = svq3_decode_init, .close = svq3_decode_end, diff --git a/libavcodec/targa.c b/libavcodec/targa.c index b703aa1336..aaad2ba2d6 100644 --- a/libavcodec/targa.c +++ b/libavcodec/targa.c @@ -258,7 +258,7 @@ static av_cold int targa_end(AVCodecContext *avctx){ AVCodec ff_targa_decoder = { .name = "targa", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_TARGA, + .id = AV_CODEC_ID_TARGA, .priv_data_size = sizeof(TargaContext), .init = targa_init, .close = targa_end, diff --git a/libavcodec/targaenc.c b/libavcodec/targaenc.c index 0ee7fedb9d..c2045ef833 100644 --- a/libavcodec/targaenc.c +++ b/libavcodec/targaenc.c @@ -164,7 +164,7 @@ static av_cold int targa_encode_init(AVCodecContext *avctx) AVCodec ff_targa_encoder = { .name = "targa", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_TARGA, + .id = AV_CODEC_ID_TARGA, .priv_data_size = sizeof(TargaContext), .init = targa_encode_init, .encode2 = targa_encode_frame, diff --git a/libavcodec/tiertexseqv.c b/libavcodec/tiertexseqv.c index 866d7a8a42..c488b8beb8 100644 --- a/libavcodec/tiertexseqv.c +++ b/libavcodec/tiertexseqv.c @@ -259,7 +259,7 @@ static av_cold int seqvideo_decode_end(AVCodecContext *avctx) AVCodec ff_tiertexseqvideo_decoder = { .name = "tiertexseqvideo", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_TIERTEXSEQVIDEO, + .id = AV_CODEC_ID_TIERTEXSEQVIDEO, .priv_data_size = sizeof(SeqVideoContext), .init = seqvideo_decode_init, .close = seqvideo_decode_end, diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c index 2a5a302e01..8825c47e7f 100644 --- a/libavcodec/tiff.c +++ b/libavcodec/tiff.c @@ -685,7 +685,7 @@ static av_cold int tiff_end(AVCodecContext *avctx) AVCodec ff_tiff_decoder = { .name = "tiff", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_TIFF, + .id = AV_CODEC_ID_TIFF, .priv_data_size = sizeof(TiffContext), .init = tiff_init, .close = tiff_end, diff --git a/libavcodec/tiffenc.c b/libavcodec/tiffenc.c index 7504216f0a..2404f7f03e 100644 --- a/libavcodec/tiffenc.c +++ b/libavcodec/tiffenc.c @@ -469,7 +469,7 @@ static const AVClass tiffenc_class = { AVCodec ff_tiff_encoder = { .name = "tiff", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_TIFF, + .id = AV_CODEC_ID_TIFF, .priv_data_size = sizeof(TiffEncoderContext), .encode2 = encode_frame, .pix_fmts = (const enum PixelFormat[]) { diff --git a/libavcodec/tmv.c b/libavcodec/tmv.c index be809b3675..908e5cffec 100644 --- a/libavcodec/tmv.c +++ b/libavcodec/tmv.c @@ -101,7 +101,7 @@ static av_cold int tmv_decode_close(AVCodecContext *avctx) AVCodec ff_tmv_decoder = { .name = "tmv", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_TMV, + .id = AV_CODEC_ID_TMV, .priv_data_size = sizeof(TMVContext), .init = tmv_decode_init, .close = tmv_decode_close, diff --git a/libavcodec/truemotion1.c b/libavcodec/truemotion1.c index bc501a20b7..8738736c90 100644 --- a/libavcodec/truemotion1.c +++ b/libavcodec/truemotion1.c @@ -886,7 +886,7 @@ static av_cold int truemotion1_decode_end(AVCodecContext *avctx) AVCodec ff_truemotion1_decoder = { .name = "truemotion1", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_TRUEMOTION1, + .id = AV_CODEC_ID_TRUEMOTION1, .priv_data_size = sizeof(TrueMotion1Context), .init = truemotion1_decode_init, .close = truemotion1_decode_end, diff --git a/libavcodec/truemotion2.c b/libavcodec/truemotion2.c index 9937819593..f17415b34c 100644 --- a/libavcodec/truemotion2.c +++ b/libavcodec/truemotion2.c @@ -954,7 +954,7 @@ static av_cold int decode_end(AVCodecContext *avctx){ AVCodec ff_truemotion2_decoder = { .name = "truemotion2", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_TRUEMOTION2, + .id = AV_CODEC_ID_TRUEMOTION2, .priv_data_size = sizeof(TM2Context), .init = decode_init, .close = decode_end, diff --git a/libavcodec/truespeech.c b/libavcodec/truespeech.c index bf83f53145..29ff90d95c 100644 --- a/libavcodec/truespeech.c +++ b/libavcodec/truespeech.c @@ -360,7 +360,7 @@ static int truespeech_decode_frame(AVCodecContext *avctx, void *data, AVCodec ff_truespeech_decoder = { .name = "truespeech", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_TRUESPEECH, + .id = AV_CODEC_ID_TRUESPEECH, .priv_data_size = sizeof(TSContext), .init = truespeech_decode_init, .decode = truespeech_decode_frame, diff --git a/libavcodec/tscc.c b/libavcodec/tscc.c index c1c6eb4e60..b6fdf320fc 100644 --- a/libavcodec/tscc.c +++ b/libavcodec/tscc.c @@ -205,7 +205,7 @@ static av_cold int decode_end(AVCodecContext *avctx) AVCodec ff_tscc_decoder = { .name = "camtasia", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_TSCC, + .id = AV_CODEC_ID_TSCC, .priv_data_size = sizeof(CamtasiaContext), .init = decode_init, .close = decode_end, diff --git a/libavcodec/tscc2.c b/libavcodec/tscc2.c index 42f78371eb..363f5556cf 100644 --- a/libavcodec/tscc2.c +++ b/libavcodec/tscc2.c @@ -372,7 +372,7 @@ static av_cold int tscc2_decode_end(AVCodecContext *avctx) AVCodec ff_tscc2_decoder = { .name = "tscc2", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_TSCC2, + .id = AV_CODEC_ID_TSCC2, .priv_data_size = sizeof(TSCC2Context), .init = tscc2_decode_init, .close = tscc2_decode_end, diff --git a/libavcodec/tta.c b/libavcodec/tta.c index 5590ae28a1..7825c0c980 100644 --- a/libavcodec/tta.c +++ b/libavcodec/tta.c @@ -469,7 +469,7 @@ static av_cold int tta_decode_close(AVCodecContext *avctx) { AVCodec ff_tta_decoder = { .name = "tta", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_TTA, + .id = AV_CODEC_ID_TTA, .priv_data_size = sizeof(TTAContext), .init = tta_decode_init, .close = tta_decode_close, diff --git a/libavcodec/twinvq.c b/libavcodec/twinvq.c index 4421074d80..ab22f64734 100644 --- a/libavcodec/twinvq.c +++ b/libavcodec/twinvq.c @@ -1177,7 +1177,7 @@ static av_cold int twin_decode_init(AVCodecContext *avctx) AVCodec ff_twinvq_decoder = { .name = "twinvq", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_TWINVQ, + .id = AV_CODEC_ID_TWINVQ, .priv_data_size = sizeof(TwinContext), .init = twin_decode_init, .close = twin_decode_close, diff --git a/libavcodec/txd.c b/libavcodec/txd.c index d69f9fa0ae..0eb7aaa896 100644 --- a/libavcodec/txd.c +++ b/libavcodec/txd.c @@ -155,7 +155,7 @@ static av_cold int txd_end(AVCodecContext *avctx) { AVCodec ff_txd_decoder = { .name = "txd", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_TXD, + .id = AV_CODEC_ID_TXD, .priv_data_size = sizeof(TXDContext), .init = txd_init, .close = txd_end, diff --git a/libavcodec/ulti.c b/libavcodec/ulti.c index 8168aa9739..0431159109 100644 --- a/libavcodec/ulti.c +++ b/libavcodec/ulti.c @@ -420,7 +420,7 @@ err: AVCodec ff_ulti_decoder = { .name = "ultimotion", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_ULTI, + .id = AV_CODEC_ID_ULTI, .priv_data_size = sizeof(UltimotionDecodeContext), .init = ulti_decode_init, .close = ulti_decode_end, diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 514a1f5569..43a8f67934 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -197,25 +197,25 @@ void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height, h_align=8; break; case PIX_FMT_YUV410P: - if(s->codec_id == CODEC_ID_SVQ1){ + if(s->codec_id == AV_CODEC_ID_SVQ1){ w_align=64; h_align=64; } case PIX_FMT_RGB555: - if(s->codec_id == CODEC_ID_RPZA){ + if(s->codec_id == AV_CODEC_ID_RPZA){ w_align=4; h_align=4; } case PIX_FMT_PAL8: case PIX_FMT_BGR8: case PIX_FMT_RGB8: - if(s->codec_id == CODEC_ID_SMC){ + if(s->codec_id == AV_CODEC_ID_SMC){ w_align=4; h_align=4; } break; case PIX_FMT_BGR24: - if((s->codec_id == CODEC_ID_MSZH) || (s->codec_id == CODEC_ID_ZLIB)){ + if((s->codec_id == AV_CODEC_ID_MSZH) || (s->codec_id == AV_CODEC_ID_ZLIB)){ w_align=4; h_align=4; } @@ -228,7 +228,7 @@ void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height, *width = FFALIGN(*width , w_align); *height= FFALIGN(*height, h_align); - if (s->codec_id == CODEC_ID_H264) + if (s->codec_id == AV_CODEC_ID_H264) *height+=2; // some of the optimized chroma MC reads one line too much for (i = 0; i < 4; i++) @@ -717,7 +717,7 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, AVCodec *codec, AVD avctx->codec = codec; if ((avctx->codec_type == AVMEDIA_TYPE_UNKNOWN || avctx->codec_type == codec->type) && - avctx->codec_id == CODEC_ID_NONE) { + avctx->codec_id == AV_CODEC_ID_NONE) { avctx->codec_type = codec->type; avctx->codec_id = codec->id; } @@ -1410,7 +1410,7 @@ av_cold int avcodec_close(AVCodecContext *avctx) return 0; } -AVCodec *avcodec_find_encoder(enum CodecID id) +AVCodec *avcodec_find_encoder(enum AVCodecID id) { AVCodec *p, *experimental=NULL; p = first_avcodec; @@ -1440,7 +1440,7 @@ AVCodec *avcodec_find_encoder_by_name(const char *name) return NULL; } -AVCodec *avcodec_find_decoder(enum CodecID id) +AVCodec *avcodec_find_decoder(enum AVCodecID id) { AVCodec *p; p = first_avcodec; @@ -1523,7 +1523,7 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode) if (p) { codec_name = p->name; profile = av_get_profile_name(p, enc->profile); - } else if (enc->codec_id == CODEC_ID_MPEG2TS) { + } else if (enc->codec_id == AV_CODEC_ID_MPEG2TS) { /* fake mpeg2 transport stream codec (currently not registered) */ codec_name = "mpeg2ts"; @@ -1713,61 +1713,61 @@ void avcodec_default_free_buffers(AVCodecContext *avctx) } } -int av_get_exact_bits_per_sample(enum CodecID codec_id) +int av_get_exact_bits_per_sample(enum AVCodecID codec_id) { switch(codec_id){ - case CODEC_ID_ADPCM_CT: - case CODEC_ID_ADPCM_IMA_APC: - case CODEC_ID_ADPCM_IMA_EA_SEAD: - case CODEC_ID_ADPCM_IMA_WS: - case CODEC_ID_ADPCM_G722: - case CODEC_ID_ADPCM_YAMAHA: + case AV_CODEC_ID_ADPCM_CT: + case AV_CODEC_ID_ADPCM_IMA_APC: + case AV_CODEC_ID_ADPCM_IMA_EA_SEAD: + case AV_CODEC_ID_ADPCM_IMA_WS: + case AV_CODEC_ID_ADPCM_G722: + case AV_CODEC_ID_ADPCM_YAMAHA: return 4; - case CODEC_ID_PCM_ALAW: - case CODEC_ID_PCM_MULAW: - case CODEC_ID_PCM_S8: - case CODEC_ID_PCM_U8: - case CODEC_ID_PCM_ZORK: + case AV_CODEC_ID_PCM_ALAW: + case AV_CODEC_ID_PCM_MULAW: + case AV_CODEC_ID_PCM_S8: + case AV_CODEC_ID_PCM_U8: + case AV_CODEC_ID_PCM_ZORK: return 8; - case CODEC_ID_PCM_S16BE: - case CODEC_ID_PCM_S16LE: - case CODEC_ID_PCM_S16LE_PLANAR: - case CODEC_ID_PCM_U16BE: - case CODEC_ID_PCM_U16LE: + case AV_CODEC_ID_PCM_S16BE: + case AV_CODEC_ID_PCM_S16LE: + case AV_CODEC_ID_PCM_S16LE_PLANAR: + case AV_CODEC_ID_PCM_U16BE: + case AV_CODEC_ID_PCM_U16LE: return 16; - case CODEC_ID_PCM_S24DAUD: - case CODEC_ID_PCM_S24BE: - case CODEC_ID_PCM_S24LE: - case CODEC_ID_PCM_U24BE: - case CODEC_ID_PCM_U24LE: + case AV_CODEC_ID_PCM_S24DAUD: + case AV_CODEC_ID_PCM_S24BE: + case AV_CODEC_ID_PCM_S24LE: + case AV_CODEC_ID_PCM_U24BE: + case AV_CODEC_ID_PCM_U24LE: return 24; - case CODEC_ID_PCM_S32BE: - case CODEC_ID_PCM_S32LE: - case CODEC_ID_PCM_U32BE: - case CODEC_ID_PCM_U32LE: - case CODEC_ID_PCM_F32BE: - case CODEC_ID_PCM_F32LE: + case AV_CODEC_ID_PCM_S32BE: + case AV_CODEC_ID_PCM_S32LE: + case AV_CODEC_ID_PCM_U32BE: + case AV_CODEC_ID_PCM_U32LE: + case AV_CODEC_ID_PCM_F32BE: + case AV_CODEC_ID_PCM_F32LE: return 32; - case CODEC_ID_PCM_F64BE: - case CODEC_ID_PCM_F64LE: + case AV_CODEC_ID_PCM_F64BE: + case AV_CODEC_ID_PCM_F64LE: return 64; default: return 0; } } -int av_get_bits_per_sample(enum CodecID codec_id) +int av_get_bits_per_sample(enum AVCodecID codec_id) { switch (codec_id) { - case CODEC_ID_ADPCM_SBPRO_2: + case AV_CODEC_ID_ADPCM_SBPRO_2: return 2; - case CODEC_ID_ADPCM_SBPRO_3: + case AV_CODEC_ID_ADPCM_SBPRO_3: return 3; - case CODEC_ID_ADPCM_SBPRO_4: - case CODEC_ID_ADPCM_IMA_WAV: - case CODEC_ID_ADPCM_IMA_QT: - case CODEC_ID_ADPCM_SWF: - case CODEC_ID_ADPCM_MS: + case AV_CODEC_ID_ADPCM_SBPRO_4: + case AV_CODEC_ID_ADPCM_IMA_WAV: + case AV_CODEC_ID_ADPCM_IMA_QT: + case AV_CODEC_ID_ADPCM_SWF: + case AV_CODEC_ID_ADPCM_MS: return 4; default: return av_get_exact_bits_per_sample(codec_id); @@ -1792,47 +1792,47 @@ int av_get_audio_frame_duration(AVCodecContext *avctx, int frame_bytes) /* codecs with a fixed packet duration */ switch (id) { - case CODEC_ID_ADPCM_ADX: return 32; - case CODEC_ID_ADPCM_IMA_QT: return 64; - case CODEC_ID_ADPCM_EA_XAS: return 128; - case CODEC_ID_AMR_NB: - case CODEC_ID_GSM: - case CODEC_ID_QCELP: - case CODEC_ID_RA_144: - case CODEC_ID_RA_288: return 160; - case CODEC_ID_IMC: return 256; - case CODEC_ID_AMR_WB: - case CODEC_ID_GSM_MS: return 320; - case CODEC_ID_MP1: return 384; - case CODEC_ID_ATRAC1: return 512; - case CODEC_ID_ATRAC3: return 1024; - case CODEC_ID_MP2: - case CODEC_ID_MUSEPACK7: return 1152; - case CODEC_ID_AC3: return 1536; + case AV_CODEC_ID_ADPCM_ADX: return 32; + case AV_CODEC_ID_ADPCM_IMA_QT: return 64; + case AV_CODEC_ID_ADPCM_EA_XAS: return 128; + case AV_CODEC_ID_AMR_NB: + case AV_CODEC_ID_GSM: + case AV_CODEC_ID_QCELP: + case AV_CODEC_ID_RA_144: + case AV_CODEC_ID_RA_288: return 160; + case AV_CODEC_ID_IMC: return 256; + case AV_CODEC_ID_AMR_WB: + case AV_CODEC_ID_GSM_MS: return 320; + case AV_CODEC_ID_MP1: return 384; + case AV_CODEC_ID_ATRAC1: return 512; + case AV_CODEC_ID_ATRAC3: return 1024; + case AV_CODEC_ID_MP2: + case AV_CODEC_ID_MUSEPACK7: return 1152; + case AV_CODEC_ID_AC3: return 1536; } if (sr > 0) { /* calc from sample rate */ - if (id == CODEC_ID_TTA) + if (id == AV_CODEC_ID_TTA) return 256 * sr / 245; if (ch > 0) { /* calc from sample rate and channels */ - if (id == CODEC_ID_BINKAUDIO_DCT) + if (id == AV_CODEC_ID_BINKAUDIO_DCT) return (480 << (sr / 22050)) / ch; } } if (ba > 0) { /* calc from block_align */ - if (id == CODEC_ID_SIPR) { + if (id == AV_CODEC_ID_SIPR) { switch (ba) { case 20: return 160; case 19: return 144; case 29: return 288; case 37: return 480; } - } else if (id == CODEC_ID_ILBC) { + } else if (id == AV_CODEC_ID_ILBC) { switch (ba) { case 38: return 160; case 50: return 240; @@ -1842,46 +1842,46 @@ int av_get_audio_frame_duration(AVCodecContext *avctx, int frame_bytes) if (frame_bytes > 0) { /* calc from frame_bytes only */ - if (id == CODEC_ID_TRUESPEECH) + if (id == AV_CODEC_ID_TRUESPEECH) return 240 * (frame_bytes / 32); - if (id == CODEC_ID_NELLYMOSER) + if (id == AV_CODEC_ID_NELLYMOSER) return 256 * (frame_bytes / 64); if (bps > 0) { /* calc from frame_bytes and bits_per_coded_sample */ - if (id == CODEC_ID_ADPCM_G726) + if (id == AV_CODEC_ID_ADPCM_G726) return frame_bytes * 8 / bps; } if (ch > 0) { /* calc from frame_bytes and channels */ switch (id) { - case CODEC_ID_ADPCM_4XM: - case CODEC_ID_ADPCM_IMA_ISS: + case AV_CODEC_ID_ADPCM_4XM: + case AV_CODEC_ID_ADPCM_IMA_ISS: return (frame_bytes - 4 * ch) * 2 / ch; - case CODEC_ID_ADPCM_IMA_SMJPEG: + case AV_CODEC_ID_ADPCM_IMA_SMJPEG: return (frame_bytes - 4) * 2 / ch; - case CODEC_ID_ADPCM_IMA_AMV: + case AV_CODEC_ID_ADPCM_IMA_AMV: return (frame_bytes - 8) * 2 / ch; - case CODEC_ID_ADPCM_XA: + case AV_CODEC_ID_ADPCM_XA: return (frame_bytes / 128) * 224 / ch; - case CODEC_ID_INTERPLAY_DPCM: + case AV_CODEC_ID_INTERPLAY_DPCM: return (frame_bytes - 6 - ch) / ch; - case CODEC_ID_ROQ_DPCM: + case AV_CODEC_ID_ROQ_DPCM: return (frame_bytes - 8) / ch; - case CODEC_ID_XAN_DPCM: + case AV_CODEC_ID_XAN_DPCM: return (frame_bytes - 2 * ch) / ch; - case CODEC_ID_MACE3: + case AV_CODEC_ID_MACE3: return 3 * frame_bytes / ch; - case CODEC_ID_MACE6: + case AV_CODEC_ID_MACE6: return 6 * frame_bytes / ch; - case CODEC_ID_PCM_LXF: + case AV_CODEC_ID_PCM_LXF: return 2 * (frame_bytes / (5 * ch)); } if (tag) { /* calc from frame_bytes, channels, and codec_tag */ - if (id == CODEC_ID_SOL_DPCM) { + if (id == AV_CODEC_ID_SOL_DPCM) { if (tag == 3) return frame_bytes / ch; else @@ -1893,13 +1893,13 @@ int av_get_audio_frame_duration(AVCodecContext *avctx, int frame_bytes) /* calc from frame_bytes, channels, and block_align */ int blocks = frame_bytes / ba; switch (avctx->codec_id) { - case CODEC_ID_ADPCM_IMA_WAV: + case AV_CODEC_ID_ADPCM_IMA_WAV: return blocks * (1 + (ba - 4 * ch) / (4 * ch) * 8); - case CODEC_ID_ADPCM_IMA_DK3: + case AV_CODEC_ID_ADPCM_IMA_DK3: return blocks * (((ba - 16) * 2 / 3 * 4) / ch); - case CODEC_ID_ADPCM_IMA_DK4: + case AV_CODEC_ID_ADPCM_IMA_DK4: return blocks * (1 + (ba - 4 * ch) * 2 / ch); - case CODEC_ID_ADPCM_MS: + case AV_CODEC_ID_ADPCM_MS: return blocks * (2 + (ba - 7 * ch) * 2 / ch); } } @@ -1907,11 +1907,11 @@ int av_get_audio_frame_duration(AVCodecContext *avctx, int frame_bytes) if (bps > 0) { /* calc from frame_bytes, channels, and bits_per_coded_sample */ switch (avctx->codec_id) { - case CODEC_ID_PCM_DVD: + case AV_CODEC_ID_PCM_DVD: return 2 * (frame_bytes / ((bps * 2 / 8) * ch)); - case CODEC_ID_PCM_BLURAY: + case AV_CODEC_ID_PCM_BLURAY: return frame_bytes / ((FFALIGN(ch, 2) * bps) / 8); - case CODEC_ID_S302M: + case AV_CODEC_ID_S302M: return 2 * (frame_bytes / ((bps + 4) / 4)) / ch; } } @@ -1988,7 +1988,7 @@ AVHWAccel *av_hwaccel_next(AVHWAccel *hwaccel) return hwaccel ? hwaccel->next : first_hwaccel; } -AVHWAccel *ff_find_hwaccel(enum CodecID codec_id, enum PixelFormat pix_fmt) +AVHWAccel *ff_find_hwaccel(enum AVCodecID codec_id, enum PixelFormat pix_fmt) { AVHWAccel *hwaccel=NULL; @@ -2073,15 +2073,15 @@ void ff_thread_await_progress(AVFrame *f, int progress, int field) #endif -enum AVMediaType avcodec_get_type(enum CodecID codec_id) +enum AVMediaType avcodec_get_type(enum AVCodecID codec_id) { - if (codec_id <= CODEC_ID_NONE) + if (codec_id <= AV_CODEC_ID_NONE) return AVMEDIA_TYPE_UNKNOWN; - else if (codec_id < CODEC_ID_FIRST_AUDIO) + else if (codec_id < AV_CODEC_ID_FIRST_AUDIO) return AVMEDIA_TYPE_VIDEO; - else if (codec_id < CODEC_ID_FIRST_SUBTITLE) + else if (codec_id < AV_CODEC_ID_FIRST_SUBTITLE) return AVMEDIA_TYPE_AUDIO; - else if (codec_id < CODEC_ID_FIRST_UNKNOWN) + else if (codec_id < AV_CODEC_ID_FIRST_UNKNOWN) return AVMEDIA_TYPE_SUBTITLE; return AVMEDIA_TYPE_UNKNOWN; diff --git a/libavcodec/utvideo.c b/libavcodec/utvideo.c index 471d85adc3..27980d8e5b 100644 --- a/libavcodec/utvideo.c +++ b/libavcodec/utvideo.c @@ -581,7 +581,7 @@ static av_cold int decode_end(AVCodecContext *avctx) AVCodec ff_utvideo_decoder = { .name = "utvideo", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_UTVIDEO, + .id = AV_CODEC_ID_UTVIDEO, .priv_data_size = sizeof(UtvideoContext), .init = decode_init, .close = decode_end, diff --git a/libavcodec/v210dec.c b/libavcodec/v210dec.c index 5f74828d4e..8d70823673 100644 --- a/libavcodec/v210dec.c +++ b/libavcodec/v210dec.c @@ -125,7 +125,7 @@ static av_cold int decode_close(AVCodecContext *avctx) AVCodec ff_v210_decoder = { .name = "v210", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_V210, + .id = AV_CODEC_ID_V210, .init = decode_init, .close = decode_close, .decode = decode_frame, diff --git a/libavcodec/v210enc.c b/libavcodec/v210enc.c index c69dd9ba2c..fd5129f40d 100644 --- a/libavcodec/v210enc.c +++ b/libavcodec/v210enc.c @@ -119,7 +119,7 @@ static av_cold int encode_close(AVCodecContext *avctx) AVCodec ff_v210_encoder = { .name = "v210", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_V210, + .id = AV_CODEC_ID_V210, .init = encode_init, .encode2 = encode_frame, .close = encode_close, diff --git a/libavcodec/v210x.c b/libavcodec/v210x.c index 24cd625592..75449cd5f5 100644 --- a/libavcodec/v210x.c +++ b/libavcodec/v210x.c @@ -135,7 +135,7 @@ static av_cold int decode_close(AVCodecContext *avctx) AVCodec ff_v210x_decoder = { .name = "v210x", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_V210X, + .id = AV_CODEC_ID_V210X, .init = decode_init, .close = decode_close, .decode = decode_frame, diff --git a/libavcodec/v410dec.c b/libavcodec/v410dec.c index 93545ab102..d23c590462 100644 --- a/libavcodec/v410dec.c +++ b/libavcodec/v410dec.c @@ -113,7 +113,7 @@ static av_cold int v410_decode_close(AVCodecContext *avctx) AVCodec ff_v410_decoder = { .name = "v410", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_V410, + .id = AV_CODEC_ID_V410, .init = v410_decode_init, .decode = v410_decode_frame, .close = v410_decode_close, diff --git a/libavcodec/v410enc.c b/libavcodec/v410enc.c index b90771f754..76aedcbc51 100644 --- a/libavcodec/v410enc.c +++ b/libavcodec/v410enc.c @@ -91,7 +91,7 @@ static av_cold int v410_encode_close(AVCodecContext *avctx) AVCodec ff_v410_encoder = { .name = "v410", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_V410, + .id = AV_CODEC_ID_V410, .init = v410_encode_init, .encode2 = v410_encode_frame, .close = v410_encode_close, diff --git a/libavcodec/vaapi_h264.c b/libavcodec/vaapi_h264.c index 820568aa25..3dafac51ae 100644 --- a/libavcodec/vaapi_h264.c +++ b/libavcodec/vaapi_h264.c @@ -339,7 +339,7 @@ static int decode_slice(AVCodecContext *avctx, AVHWAccel ff_h264_vaapi_hwaccel = { .name = "h264_vaapi", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_H264, + .id = AV_CODEC_ID_H264, .pix_fmt = PIX_FMT_VAAPI_VLD, .start_frame = start_frame, .end_frame = end_frame, diff --git a/libavcodec/vaapi_mpeg2.c b/libavcodec/vaapi_mpeg2.c index ee7b536928..d0de0f7f0e 100644 --- a/libavcodec/vaapi_mpeg2.c +++ b/libavcodec/vaapi_mpeg2.c @@ -141,7 +141,7 @@ static int vaapi_mpeg2_decode_slice(AVCodecContext *avctx, const uint8_t *buffer AVHWAccel ff_mpeg2_vaapi_hwaccel = { .name = "mpeg2_vaapi", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_MPEG2VIDEO, + .id = AV_CODEC_ID_MPEG2VIDEO, .pix_fmt = PIX_FMT_VAAPI_VLD, .start_frame = vaapi_mpeg2_start_frame, .end_frame = vaapi_mpeg2_end_frame, diff --git a/libavcodec/vaapi_mpeg4.c b/libavcodec/vaapi_mpeg4.c index 41d54c6116..9f7d14603b 100644 --- a/libavcodec/vaapi_mpeg4.c +++ b/libavcodec/vaapi_mpeg4.c @@ -60,7 +60,7 @@ static int vaapi_mpeg4_start_frame(AVCodecContext *avctx, av_unused const uint8_ pic_param->forward_reference_picture = VA_INVALID_ID; pic_param->backward_reference_picture = VA_INVALID_ID; pic_param->vol_fields.value = 0; /* reset all bits */ - pic_param->vol_fields.bits.short_video_header = avctx->codec->id == CODEC_ID_H263; + pic_param->vol_fields.bits.short_video_header = avctx->codec->id == AV_CODEC_ID_H263; pic_param->vol_fields.bits.chroma_format = CHROMA_420; pic_param->vol_fields.bits.interlaced = !s->progressive_sequence; pic_param->vol_fields.bits.obmc_disable = 1; @@ -132,7 +132,7 @@ static int vaapi_mpeg4_decode_slice(AVCodecContext *avctx, const uint8_t *buffer * a single slice param. So fake macroblock_number for Libav so * that we don't call vaapi_mpeg4_decode_slice() again */ - if (avctx->codec->id == CODEC_ID_H263) + if (avctx->codec->id == AV_CODEC_ID_H263) size = s->gb.buffer_end - buffer; /* Fill in VASliceParameterBufferMPEG4 */ @@ -143,7 +143,7 @@ static int vaapi_mpeg4_decode_slice(AVCodecContext *avctx, const uint8_t *buffer slice_param->macroblock_number = s->mb_y * s->mb_width + s->mb_x; slice_param->quant_scale = s->qscale; - if (avctx->codec->id == CODEC_ID_H263) + if (avctx->codec->id == AV_CODEC_ID_H263) s->mb_y = s->mb_height; return 0; @@ -153,7 +153,7 @@ static int vaapi_mpeg4_decode_slice(AVCodecContext *avctx, const uint8_t *buffer AVHWAccel ff_mpeg4_vaapi_hwaccel = { .name = "mpeg4_vaapi", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_MPEG4, + .id = AV_CODEC_ID_MPEG4, .pix_fmt = PIX_FMT_VAAPI_VLD, .start_frame = vaapi_mpeg4_start_frame, .end_frame = vaapi_mpeg4_end_frame, @@ -165,7 +165,7 @@ AVHWAccel ff_mpeg4_vaapi_hwaccel = { AVHWAccel ff_h263_vaapi_hwaccel = { .name = "h263_vaapi", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_H263, + .id = AV_CODEC_ID_H263, .pix_fmt = PIX_FMT_VAAPI_VLD, .start_frame = vaapi_mpeg4_start_frame, .end_frame = vaapi_mpeg4_end_frame, diff --git a/libavcodec/vaapi_vc1.c b/libavcodec/vaapi_vc1.c index df3f77e39e..e5bc6f46cc 100644 --- a/libavcodec/vaapi_vc1.c +++ b/libavcodec/vaapi_vc1.c @@ -326,7 +326,7 @@ static int vaapi_vc1_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, av_dlog(avctx, "vaapi_vc1_decode_slice(): buffer %p, size %d\n", buffer, size); /* Current bit buffer is beyond any marker for VC-1, so skip it */ - if (avctx->codec_id == CODEC_ID_VC1 && IS_MARKER(AV_RB32(buffer))) { + if (avctx->codec_id == AV_CODEC_ID_VC1 && IS_MARKER(AV_RB32(buffer))) { buffer += 4; size -= 4; } @@ -344,7 +344,7 @@ static int vaapi_vc1_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, AVHWAccel ff_wmv3_vaapi_hwaccel = { .name = "wmv3_vaapi", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_WMV3, + .id = AV_CODEC_ID_WMV3, .pix_fmt = PIX_FMT_VAAPI_VLD, .start_frame = vaapi_vc1_start_frame, .end_frame = vaapi_vc1_end_frame, @@ -355,7 +355,7 @@ AVHWAccel ff_wmv3_vaapi_hwaccel = { AVHWAccel ff_vc1_vaapi_hwaccel = { .name = "vc1_vaapi", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_VC1, + .id = AV_CODEC_ID_VC1, .pix_fmt = PIX_FMT_VAAPI_VLD, .start_frame = vaapi_vc1_start_frame, .end_frame = vaapi_vc1_end_frame, diff --git a/libavcodec/vb.c b/libavcodec/vb.c index f925cc63f7..d84328e774 100644 --- a/libavcodec/vb.c +++ b/libavcodec/vb.c @@ -269,7 +269,7 @@ static av_cold int decode_end(AVCodecContext *avctx) AVCodec ff_vb_decoder = { .name = "vb", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_VB, + .id = AV_CODEC_ID_VB, .priv_data_size = sizeof(VBDecContext), .init = decode_init, .close = decode_end, diff --git a/libavcodec/vble.c b/libavcodec/vble.c index 5e8543bec0..11b4aaabc1 100644 --- a/libavcodec/vble.c +++ b/libavcodec/vble.c @@ -219,7 +219,7 @@ static av_cold int vble_decode_init(AVCodecContext *avctx) AVCodec ff_vble_decoder = { .name = "vble", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_VBLE, + .id = AV_CODEC_ID_VBLE, .priv_data_size = sizeof(VBLEContext), .init = vble_decode_init, .close = vble_decode_close, diff --git a/libavcodec/vc1_parser.c b/libavcodec/vc1_parser.c index bf29032c54..5aa1248e77 100644 --- a/libavcodec/vc1_parser.c +++ b/libavcodec/vc1_parser.c @@ -192,7 +192,7 @@ static int vc1_parse_init(AVCodecParserContext *s) } AVCodecParser ff_vc1_parser = { - .codec_ids = { CODEC_ID_VC1 }, + .codec_ids = { AV_CODEC_ID_VC1 }, .priv_data_size = sizeof(VC1ParseContext), .parser_init = vc1_parse_init, .parser_parse = vc1_parse, diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c index cb15dee982..7b0b8c9207 100644 --- a/libavcodec/vc1dec.c +++ b/libavcodec/vc1dec.c @@ -4890,7 +4890,7 @@ static void vc1_parse_sprites(VC1Context *v, GetBitContext* gb, SpriteData* sd) av_log(avctx, AV_LOG_DEBUG, "Effect flag set\n"); if (get_bits_count(gb) >= gb->size_in_bits + - (avctx->codec_id == CODEC_ID_WMV3IMAGE ? 64 : 0)) + (avctx->codec_id == AV_CODEC_ID_WMV3IMAGE ? 64 : 0)) av_log(avctx, AV_LOG_ERROR, "Buffer overrun\n"); if (get_bits_count(gb) < gb->size_in_bits - 8) av_log(avctx, AV_LOG_WARNING, "Buffer not fully read\n"); @@ -5099,7 +5099,7 @@ static av_cold int vc1_decode_init_alloc_tables(VC1Context *v) ff_intrax8_common_init(&v->x8,s); - if (s->avctx->codec_id == CODEC_ID_WMV3IMAGE || s->avctx->codec_id == CODEC_ID_VC1IMAGE) { + if (s->avctx->codec_id == AV_CODEC_ID_WMV3IMAGE || s->avctx->codec_id == AV_CODEC_ID_VC1IMAGE) { for (i = 0; i < 4; i++) if (!(v->sr_rows[i >> 1][i & 1] = av_malloc(v->output_width))) return -1; } @@ -5146,7 +5146,7 @@ static av_cold int vc1_decode_init(AVCodecContext *avctx) return -1; ff_vc1dsp_init(&v->vc1dsp); - if (avctx->codec_id == CODEC_ID_WMV3 || avctx->codec_id == CODEC_ID_WMV3IMAGE) { + if (avctx->codec_id == AV_CODEC_ID_WMV3 || avctx->codec_id == AV_CODEC_ID_WMV3IMAGE) { int count = 0; // looks like WMV3 has a sequence header stored in the extradata @@ -5240,7 +5240,7 @@ static av_cold int vc1_decode_init(AVCodecContext *avctx) v->top_blk_sh = 0; } - if (avctx->codec_id == CODEC_ID_WMV3IMAGE || avctx->codec_id == CODEC_ID_VC1IMAGE) { + if (avctx->codec_id == AV_CODEC_ID_WMV3IMAGE || avctx->codec_id == AV_CODEC_ID_VC1IMAGE) { v->sprite_width = avctx->coded_width; v->sprite_height = avctx->coded_height; @@ -5264,7 +5264,7 @@ static av_cold int vc1_decode_end(AVCodecContext *avctx) VC1Context *v = avctx->priv_data; int i; - if ((avctx->codec_id == CODEC_ID_WMV3IMAGE || avctx->codec_id == CODEC_ID_VC1IMAGE) + if ((avctx->codec_id == AV_CODEC_ID_WMV3IMAGE || avctx->codec_id == AV_CODEC_ID_VC1IMAGE) && v->sprite_output_frame.data[0]) avctx->release_buffer(avctx, &v->sprite_output_frame); for (i = 0; i < 4; i++) @@ -5334,7 +5334,7 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data, } //for advanced profile we may need to parse and unescape data - if (avctx->codec_id == CODEC_ID_VC1 || avctx->codec_id == CODEC_ID_VC1IMAGE) { + if (avctx->codec_id == AV_CODEC_ID_VC1 || avctx->codec_id == AV_CODEC_ID_VC1IMAGE) { int buf_size2 = 0; buf2 = av_mallocz(buf_size + FF_INPUT_BUFFER_PADDING_SIZE); @@ -5430,11 +5430,11 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data, if (v->res_sprite) { v->new_sprite = !get_bits1(&s->gb); v->two_sprites = get_bits1(&s->gb); - /* res_sprite means a Windows Media Image stream, CODEC_ID_*IMAGE means + /* res_sprite means a Windows Media Image stream, AV_CODEC_ID_*IMAGE means we're using the sprite compositor. These are intentionally kept separate so you can get the raw sprites by using the wmv3 decoder for WMVP or the vc1 one for WVP2 */ - if (avctx->codec_id == CODEC_ID_WMV3IMAGE || avctx->codec_id == CODEC_ID_VC1IMAGE) { + if (avctx->codec_id == AV_CODEC_ID_WMV3IMAGE || avctx->codec_id == AV_CODEC_ID_VC1IMAGE) { if (v->new_sprite) { // switch AVCodecContext parameters to those of the sprites avctx->width = avctx->coded_width = v->sprite_width; @@ -5484,7 +5484,7 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data, } } - if ((avctx->codec_id == CODEC_ID_WMV3IMAGE || avctx->codec_id == CODEC_ID_VC1IMAGE) + if ((avctx->codec_id == AV_CODEC_ID_WMV3IMAGE || avctx->codec_id == AV_CODEC_ID_VC1IMAGE) && s->pict_type != AV_PICTURE_TYPE_I) { av_log(v->s.avctx, AV_LOG_ERROR, "Sprite decoder: expected I-frame\n"); goto err; @@ -5621,7 +5621,7 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data, ff_MPV_frame_end(s); - if (avctx->codec_id == CODEC_ID_WMV3IMAGE || avctx->codec_id == CODEC_ID_VC1IMAGE) { + if (avctx->codec_id == AV_CODEC_ID_WMV3IMAGE || avctx->codec_id == AV_CODEC_ID_VC1IMAGE) { image: avctx->width = avctx->coded_width = v->output_width; avctx->height = avctx->coded_height = v->output_height; @@ -5672,7 +5672,7 @@ static const AVProfile profiles[] = { AVCodec ff_vc1_decoder = { .name = "vc1", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_VC1, + .id = AV_CODEC_ID_VC1, .priv_data_size = sizeof(VC1Context), .init = vc1_decode_init, .close = vc1_decode_end, @@ -5687,7 +5687,7 @@ AVCodec ff_vc1_decoder = { AVCodec ff_wmv3_decoder = { .name = "wmv3", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_WMV3, + .id = AV_CODEC_ID_WMV3, .priv_data_size = sizeof(VC1Context), .init = vc1_decode_init, .close = vc1_decode_end, @@ -5703,7 +5703,7 @@ AVCodec ff_wmv3_decoder = { AVCodec ff_wmv3_vdpau_decoder = { .name = "wmv3_vdpau", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_WMV3, + .id = AV_CODEC_ID_WMV3, .priv_data_size = sizeof(VC1Context), .init = vc1_decode_init, .close = vc1_decode_end, @@ -5719,7 +5719,7 @@ AVCodec ff_wmv3_vdpau_decoder = { AVCodec ff_vc1_vdpau_decoder = { .name = "vc1_vdpau", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_VC1, + .id = AV_CODEC_ID_VC1, .priv_data_size = sizeof(VC1Context), .init = vc1_decode_init, .close = vc1_decode_end, @@ -5735,7 +5735,7 @@ AVCodec ff_vc1_vdpau_decoder = { AVCodec ff_wmv3image_decoder = { .name = "wmv3image", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_WMV3IMAGE, + .id = AV_CODEC_ID_WMV3IMAGE, .priv_data_size = sizeof(VC1Context), .init = vc1_decode_init, .close = vc1_decode_end, @@ -5751,7 +5751,7 @@ AVCodec ff_wmv3image_decoder = { AVCodec ff_vc1image_decoder = { .name = "vc1image", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_VC1IMAGE, + .id = AV_CODEC_ID_VC1IMAGE, .priv_data_size = sizeof(VC1Context), .init = vc1_decode_init, .close = vc1_decode_end, diff --git a/libavcodec/vcr1.c b/libavcodec/vcr1.c index 3a42612445..d1d63b566a 100644 --- a/libavcodec/vcr1.c +++ b/libavcodec/vcr1.c @@ -139,7 +139,7 @@ static int vcr1_decode_frame(AVCodecContext *avctx, void *data, AVCodec ff_vcr1_decoder = { .name = "vcr1", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_VCR1, + .id = AV_CODEC_ID_VCR1, .priv_data_size = sizeof(VCR1Context), .init = vcr1_decode_init, .close = vcr1_decode_end, @@ -179,7 +179,7 @@ static int vcr1_encode_frame(AVCodecContext *avctx, unsigned char *buf, AVCodec ff_vcr1_encoder = { .name = "vcr1", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_VCR1, + .id = AV_CODEC_ID_VCR1, .priv_data_size = sizeof(VCR1Context), .init = vcr1_common_init, .encode = vcr1_encode_frame, diff --git a/libavcodec/vda_h264.c b/libavcodec/vda_h264.c index b50a4c99a4..eb7e5c7dc3 100644 --- a/libavcodec/vda_h264.c +++ b/libavcodec/vda_h264.c @@ -100,7 +100,7 @@ static int end_frame(AVCodecContext *avctx) AVHWAccel ff_h264_vda_hwaccel = { .name = "h264_vda", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_H264, + .id = AV_CODEC_ID_H264, .pix_fmt = PIX_FMT_VDA_VLD, .start_frame = start_frame, .decode_slice = decode_slice, diff --git a/libavcodec/vdpau.c b/libavcodec/vdpau.c index df04ca01fc..6daf494b60 100644 --- a/libavcodec/vdpau.c +++ b/libavcodec/vdpau.c @@ -340,7 +340,7 @@ void ff_vdpau_mpeg4_decode_picture(MpegEncContext *s, const uint8_t *buf, render->info.mpeg4.interlaced = !s->progressive_sequence; render->info.mpeg4.quant_type = s->mpeg_quant; render->info.mpeg4.quarter_sample = s->quarter_sample; - render->info.mpeg4.short_video_header = s->avctx->codec->id == CODEC_ID_H263; + render->info.mpeg4.short_video_header = s->avctx->codec->id == AV_CODEC_ID_H263; render->info.mpeg4.rounding_control = s->no_rounding; render->info.mpeg4.alternate_vertical_scan_flag = s->alternate_scan; render->info.mpeg4.top_field_first = s->top_field_first; diff --git a/libavcodec/vmdav.c b/libavcodec/vmdav.c index 47a16d8655..d744cc3b0d 100644 --- a/libavcodec/vmdav.c +++ b/libavcodec/vmdav.c @@ -652,7 +652,7 @@ static int vmdaudio_decode_frame(AVCodecContext *avctx, void *data, AVCodec ff_vmdvideo_decoder = { .name = "vmdvideo", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_VMDVIDEO, + .id = AV_CODEC_ID_VMDVIDEO, .priv_data_size = sizeof(VmdVideoContext), .init = vmdvideo_decode_init, .close = vmdvideo_decode_end, @@ -664,7 +664,7 @@ AVCodec ff_vmdvideo_decoder = { AVCodec ff_vmdaudio_decoder = { .name = "vmdaudio", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_VMDAUDIO, + .id = AV_CODEC_ID_VMDAUDIO, .priv_data_size = sizeof(VmdAudioContext), .init = vmdaudio_decode_init, .decode = vmdaudio_decode_frame, diff --git a/libavcodec/vmnc.c b/libavcodec/vmnc.c index 7d7004da43..bf12739bae 100644 --- a/libavcodec/vmnc.c +++ b/libavcodec/vmnc.c @@ -512,7 +512,7 @@ static av_cold int decode_end(AVCodecContext *avctx) AVCodec ff_vmnc_decoder = { .name = "vmnc", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_VMNC, + .id = AV_CODEC_ID_VMNC, .priv_data_size = sizeof(VmncContext), .init = decode_init, .close = decode_end, diff --git a/libavcodec/vorbis_parser.c b/libavcodec/vorbis_parser.c index f8d92e04d0..c6d300d630 100644 --- a/libavcodec/vorbis_parser.c +++ b/libavcodec/vorbis_parser.c @@ -263,7 +263,7 @@ end: } AVCodecParser ff_vorbis_parser = { - .codec_ids = { CODEC_ID_VORBIS }, + .codec_ids = { AV_CODEC_ID_VORBIS }, .priv_data_size = sizeof(VorbisParseContext), .parser_parse = vorbis_parse, }; diff --git a/libavcodec/vorbisdec.c b/libavcodec/vorbisdec.c index deaaaa21c2..ee2e5aea67 100644 --- a/libavcodec/vorbisdec.c +++ b/libavcodec/vorbisdec.c @@ -1730,7 +1730,7 @@ static av_cold void vorbis_decode_flush(AVCodecContext *avccontext) AVCodec ff_vorbis_decoder = { .name = "vorbis", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_VORBIS, + .id = AV_CODEC_ID_VORBIS, .priv_data_size = sizeof(vorbis_context), .init = vorbis_decode_init, .close = vorbis_decode_close, diff --git a/libavcodec/vorbisenc.c b/libavcodec/vorbisenc.c index 173619ae4b..4fd8c322c2 100644 --- a/libavcodec/vorbisenc.c +++ b/libavcodec/vorbisenc.c @@ -1209,7 +1209,7 @@ error: AVCodec ff_vorbis_encoder = { .name = "vorbis", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_VORBIS, + .id = AV_CODEC_ID_VORBIS, .priv_data_size = sizeof(vorbis_enc_context), .init = vorbis_encode_init, .encode2 = vorbis_encode_frame, diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c index 948167c2e8..296f9fca9a 100644 --- a/libavcodec/vp3.c +++ b/libavcodec/vp3.c @@ -2377,7 +2377,7 @@ static av_cold int theora_decode_init(AVCodecContext *avctx) AVCodec ff_theora_decoder = { .name = "theora", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_THEORA, + .id = AV_CODEC_ID_THEORA, .priv_data_size = sizeof(Vp3DecodeContext), .init = theora_decode_init, .close = vp3_decode_end, @@ -2394,7 +2394,7 @@ AVCodec ff_theora_decoder = { AVCodec ff_vp3_decoder = { .name = "vp3", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_VP3, + .id = AV_CODEC_ID_VP3, .priv_data_size = sizeof(Vp3DecodeContext), .init = vp3_decode_init, .close = vp3_decode_end, diff --git a/libavcodec/vp3_parser.c b/libavcodec/vp3_parser.c index 1d70408cc7..ef2c55b8ac 100644 --- a/libavcodec/vp3_parser.c +++ b/libavcodec/vp3_parser.c @@ -25,7 +25,7 @@ static int parse(AVCodecParserContext *s, const uint8_t **poutbuf, int *poutbuf_size, const uint8_t *buf, int buf_size) { - if(avctx->codec_id == CODEC_ID_THEORA) + if(avctx->codec_id == AV_CODEC_ID_THEORA) s->pict_type= (buf[0]&0x40) ? AV_PICTURE_TYPE_P : AV_PICTURE_TYPE_I; else s->pict_type= (buf[0]&0x80) ? AV_PICTURE_TYPE_P : AV_PICTURE_TYPE_I; @@ -36,7 +36,7 @@ static int parse(AVCodecParserContext *s, } AVCodecParser ff_vp3_parser = { - .codec_ids = { CODEC_ID_THEORA, CODEC_ID_VP3, CODEC_ID_VP6, - CODEC_ID_VP6F, CODEC_ID_VP6A }, + .codec_ids = { AV_CODEC_ID_THEORA, AV_CODEC_ID_VP3, AV_CODEC_ID_VP6, + AV_CODEC_ID_VP6F, AV_CODEC_ID_VP6A }, .parser_parse = parse, }; diff --git a/libavcodec/vp5.c b/libavcodec/vp5.c index 189b20ab85..a94fdc87af 100644 --- a/libavcodec/vp5.c +++ b/libavcodec/vp5.c @@ -281,7 +281,7 @@ static av_cold int vp5_decode_init(AVCodecContext *avctx) AVCodec ff_vp5_decoder = { .name = "vp5", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_VP5, + .id = AV_CODEC_ID_VP5, .priv_data_size = sizeof(VP56Context), .init = vp5_decode_init, .close = ff_vp56_free, diff --git a/libavcodec/vp56.c b/libavcodec/vp56.c index 48c4a95ba7..ac11e2e505 100644 --- a/libavcodec/vp56.c +++ b/libavcodec/vp56.c @@ -196,7 +196,7 @@ static void vp56_decode_4mv(VP56Context *s, int row, int col) s->macroblocks[row * s->mb_width + col].mv = s->mv[3]; /* chroma vectors are average luma vectors */ - if (s->avctx->codec->id == CODEC_ID_VP5) { + if (s->avctx->codec->id == AV_CODEC_ID_VP5) { s->mv[4].x = s->mv[5].x = RSHIFT(mv.x,2); s->mv[4].y = s->mv[5].y = RSHIFT(mv.y,2); } else { @@ -281,7 +281,7 @@ static void vp56_add_predictors_dc(VP56Context *s, VP56Frame ref_frame) dc += ab->dc_coeff; count++; } - if (s->avctx->codec->id == CODEC_ID_VP5) + if (s->avctx->codec->id == AV_CODEC_ID_VP5) for (i=0; i<2; i++) if (count < 2 && ref_frame == ab[-1+2*i].ref_frame) { dc += ab[-1+2*i].dc_coeff; diff --git a/libavcodec/vp56dsp.c b/libavcodec/vp56dsp.c index 7b4a771676..7f13605ad5 100644 --- a/libavcodec/vp56dsp.c +++ b/libavcodec/vp56dsp.c @@ -74,9 +74,9 @@ VP56_EDGE_FILTER(vp5, ver, stride, 1) VP56_EDGE_FILTER(vp6, hor, 1, stride) VP56_EDGE_FILTER(vp6, ver, stride, 1) -void ff_vp56dsp_init(VP56DSPContext *s, enum CodecID codec) +void ff_vp56dsp_init(VP56DSPContext *s, enum AVCodecID codec) { - if (codec == CODEC_ID_VP5) { + if (codec == AV_CODEC_ID_VP5) { s->edge_filter_hor = vp5_edge_filter_hor; s->edge_filter_ver = vp5_edge_filter_ver; } else { diff --git a/libavcodec/vp56dsp.h b/libavcodec/vp56dsp.h index 3bd6d27068..034e2e9c5b 100644 --- a/libavcodec/vp56dsp.h +++ b/libavcodec/vp56dsp.h @@ -35,8 +35,8 @@ typedef struct VP56DSPContext { void ff_vp6_filter_diag4_c(uint8_t *dst, uint8_t *src, int stride, const int16_t *h_weights, const int16_t *v_weights); -void ff_vp56dsp_init(VP56DSPContext *s, enum CodecID codec); -void ff_vp56dsp_init_arm(VP56DSPContext *s, enum CodecID codec); -void ff_vp56dsp_init_x86(VP56DSPContext* c, enum CodecID codec); +void ff_vp56dsp_init(VP56DSPContext *s, enum AVCodecID codec); +void ff_vp56dsp_init_arm(VP56DSPContext *s, enum AVCodecID codec); +void ff_vp56dsp_init_x86(VP56DSPContext* c, enum AVCodecID codec); #endif /* AVCODEC_VP56DSP_H */ diff --git a/libavcodec/vp6.c b/libavcodec/vp6.c index 741208ce20..826b77741c 100644 --- a/libavcodec/vp6.c +++ b/libavcodec/vp6.c @@ -594,8 +594,8 @@ static av_cold int vp6_decode_init(AVCodecContext *avctx) { VP56Context *s = avctx->priv_data; - ff_vp56_init(avctx, avctx->codec->id == CODEC_ID_VP6, - avctx->codec->id == CODEC_ID_VP6A); + ff_vp56_init(avctx, avctx->codec->id == AV_CODEC_ID_VP6, + avctx->codec->id == AV_CODEC_ID_VP6A); s->vp56_coord_div = vp6_coord_div; s->parse_vector_adjustment = vp6_parse_vector_adjustment; s->filter = vp6_filter; @@ -627,7 +627,7 @@ static av_cold int vp6_decode_free(AVCodecContext *avctx) AVCodec ff_vp6_decoder = { .name = "vp6", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_VP6, + .id = AV_CODEC_ID_VP6, .priv_data_size = sizeof(VP56Context), .init = vp6_decode_init, .close = vp6_decode_free, @@ -640,7 +640,7 @@ AVCodec ff_vp6_decoder = { AVCodec ff_vp6f_decoder = { .name = "vp6f", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_VP6F, + .id = AV_CODEC_ID_VP6F, .priv_data_size = sizeof(VP56Context), .init = vp6_decode_init, .close = vp6_decode_free, @@ -653,7 +653,7 @@ AVCodec ff_vp6f_decoder = { AVCodec ff_vp6a_decoder = { .name = "vp6a", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_VP6A, + .id = AV_CODEC_ID_VP6A, .priv_data_size = sizeof(VP56Context), .init = vp6_decode_init, .close = vp6_decode_free, diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c index a662f8a2df..3f88d78306 100644 --- a/libavcodec/vp8.c +++ b/libavcodec/vp8.c @@ -2019,7 +2019,7 @@ static av_cold int vp8_decode_init(AVCodecContext *avctx) avctx->pix_fmt = PIX_FMT_YUV420P; ff_dsputil_init(&s->dsp, avctx); - ff_h264_pred_init(&s->hpc, CODEC_ID_VP8, 8, 1); + ff_h264_pred_init(&s->hpc, AV_CODEC_ID_VP8, 8, 1); ff_vp8dsp_init(&s->vp8dsp); return 0; @@ -2073,7 +2073,7 @@ static int vp8_decode_update_thread_context(AVCodecContext *dst, const AVCodecCo AVCodec ff_vp8_decoder = { .name = "vp8", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_VP8, + .id = AV_CODEC_ID_VP8, .priv_data_size = sizeof(VP8Context), .init = vp8_decode_init, .close = vp8_decode_free, diff --git a/libavcodec/vp8_parser.c b/libavcodec/vp8_parser.c index e6d4151bb5..196de83935 100644 --- a/libavcodec/vp8_parser.c +++ b/libavcodec/vp8_parser.c @@ -33,6 +33,6 @@ static int parse(AVCodecParserContext *s, } AVCodecParser ff_vp8_parser = { - .codec_ids = { CODEC_ID_VP8 }, + .codec_ids = { AV_CODEC_ID_VP8 }, .parser_parse = parse, }; diff --git a/libavcodec/vqavideo.c b/libavcodec/vqavideo.c index 1bad2266e8..1d88ece4a7 100644 --- a/libavcodec/vqavideo.c +++ b/libavcodec/vqavideo.c @@ -625,7 +625,7 @@ static av_cold int vqa_decode_end(AVCodecContext *avctx) AVCodec ff_vqa_decoder = { .name = "vqavideo", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_WS_VQA, + .id = AV_CODEC_ID_WS_VQA, .priv_data_size = sizeof(VqaContext), .init = vqa_decode_init, .close = vqa_decode_end, diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c index 920e0b5fd9..eafb40d639 100644 --- a/libavcodec/wavpack.c +++ b/libavcodec/wavpack.c @@ -1249,7 +1249,7 @@ static int wavpack_decode_frame(AVCodecContext *avctx, void *data, AVCodec ff_wavpack_decoder = { .name = "wavpack", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_WAVPACK, + .id = AV_CODEC_ID_WAVPACK, .priv_data_size = sizeof(WavpackContext), .init = wavpack_decode_init, .close = wavpack_decode_end, diff --git a/libavcodec/wma.c b/libavcodec/wma.c index b61228b94b..43714e7c84 100644 --- a/libavcodec/wma.c +++ b/libavcodec/wma.c @@ -90,7 +90,7 @@ int ff_wma_init(AVCodecContext *avctx, int flags2) ff_dsputil_init(&s->dsp, avctx); ff_fmt_convert_init(&s->fmt_conv, avctx); - if (avctx->codec->id == CODEC_ID_WMAV1) { + if (avctx->codec->id == AV_CODEC_ID_WMAV1) { s->version = 1; } else { s->version = 2; diff --git a/libavcodec/wmadec.c b/libavcodec/wmadec.c index a7300594ca..5ee3742380 100644 --- a/libavcodec/wmadec.c +++ b/libavcodec/wmadec.c @@ -90,9 +90,9 @@ static int wma_decode_init(AVCodecContext * avctx) /* extract flag infos */ flags2 = 0; extradata = avctx->extradata; - if (avctx->codec->id == CODEC_ID_WMAV1 && avctx->extradata_size >= 4) { + if (avctx->codec->id == AV_CODEC_ID_WMAV1 && avctx->extradata_size >= 4) { flags2 = AV_RL16(extradata+2); - } else if (avctx->codec->id == CODEC_ID_WMAV2 && avctx->extradata_size >= 6) { + } else if (avctx->codec->id == AV_CODEC_ID_WMAV2 && avctx->extradata_size >= 6) { flags2 = AV_RL16(extradata+4); } // for(i=0; i<avctx->extradata_size; i++) @@ -939,7 +939,7 @@ static av_cold void flush(AVCodecContext *avctx) AVCodec ff_wmav1_decoder = { .name = "wmav1", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_WMAV1, + .id = AV_CODEC_ID_WMAV1, .priv_data_size = sizeof(WMACodecContext), .init = wma_decode_init, .close = ff_wma_end, @@ -952,7 +952,7 @@ AVCodec ff_wmav1_decoder = { AVCodec ff_wmav2_decoder = { .name = "wmav2", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_WMAV2, + .id = AV_CODEC_ID_WMAV2, .priv_data_size = sizeof(WMACodecContext), .init = wma_decode_init, .close = ff_wma_end, diff --git a/libavcodec/wmaenc.c b/libavcodec/wmaenc.c index 35dac73149..8c93e0dbbc 100644 --- a/libavcodec/wmaenc.c +++ b/libavcodec/wmaenc.c @@ -55,12 +55,12 @@ static int encode_init(AVCodecContext * avctx){ /* extract flag infos */ flags1 = 0; flags2 = 1; - if (avctx->codec->id == CODEC_ID_WMAV1) { + if (avctx->codec->id == AV_CODEC_ID_WMAV1) { extradata= av_malloc(4); avctx->extradata_size= 4; AV_WL16(extradata, flags1); AV_WL16(extradata+2, flags2); - } else if (avctx->codec->id == CODEC_ID_WMAV2) { + } else if (avctx->codec->id == AV_CODEC_ID_WMAV2) { extradata= av_mallocz(10); avctx->extradata_size= 10; AV_WL32(extradata, flags1); @@ -422,7 +422,7 @@ static int encode_superframe(AVCodecContext *avctx, AVPacket *avpkt, AVCodec ff_wmav1_encoder = { .name = "wmav1", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_WMAV1, + .id = AV_CODEC_ID_WMAV1, .priv_data_size = sizeof(WMACodecContext), .init = encode_init, .encode2 = encode_superframe, @@ -435,7 +435,7 @@ AVCodec ff_wmav1_encoder = { AVCodec ff_wmav2_encoder = { .name = "wmav2", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_WMAV2, + .id = AV_CODEC_ID_WMAV2, .priv_data_size = sizeof(WMACodecContext), .init = encode_init, .encode2 = encode_superframe, diff --git a/libavcodec/wmalosslessdec.c b/libavcodec/wmalosslessdec.c index cb7f66715b..56e9aad399 100644 --- a/libavcodec/wmalosslessdec.c +++ b/libavcodec/wmalosslessdec.c @@ -1283,7 +1283,7 @@ static void flush(AVCodecContext *avctx) AVCodec ff_wmalossless_decoder = { .name = "wmalossless", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_WMALOSSLESS, + .id = AV_CODEC_ID_WMALOSSLESS, .priv_data_size = sizeof(WmallDecodeCtx), .init = decode_init, .decode = decode_packet, diff --git a/libavcodec/wmaprodec.c b/libavcodec/wmaprodec.c index 699c1b7503..60d39be74e 100644 --- a/libavcodec/wmaprodec.c +++ b/libavcodec/wmaprodec.c @@ -1623,7 +1623,7 @@ static void flush(AVCodecContext *avctx) AVCodec ff_wmapro_decoder = { .name = "wmapro", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_WMAPRO, + .id = AV_CODEC_ID_WMAPRO, .priv_data_size = sizeof(WMAProDecodeCtx), .init = decode_init, .close = decode_end, diff --git a/libavcodec/wmavoice.c b/libavcodec/wmavoice.c index ef711141da..ca5bbeef05 100644 --- a/libavcodec/wmavoice.c +++ b/libavcodec/wmavoice.c @@ -2046,7 +2046,7 @@ static av_cold void wmavoice_flush(AVCodecContext *ctx) AVCodec ff_wmavoice_decoder = { .name = "wmavoice", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_WMAVOICE, + .id = AV_CODEC_ID_WMAVOICE, .priv_data_size = sizeof(WMAVoiceContext), .init = wmavoice_decode_init, .close = wmavoice_decode_end, diff --git a/libavcodec/wmv2dec.c b/libavcodec/wmv2dec.c index 2e4bbaac50..b23ebf060f 100644 --- a/libavcodec/wmv2dec.c +++ b/libavcodec/wmv2dec.c @@ -473,7 +473,7 @@ static av_cold int wmv2_decode_end(AVCodecContext *avctx) AVCodec ff_wmv2_decoder = { .name = "wmv2", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_WMV2, + .id = AV_CODEC_ID_WMV2, .priv_data_size = sizeof(Wmv2Context), .init = wmv2_decode_init, .close = wmv2_decode_end, diff --git a/libavcodec/wmv2enc.c b/libavcodec/wmv2enc.c index b7a8446ddd..7af9cf6b42 100644 --- a/libavcodec/wmv2enc.c +++ b/libavcodec/wmv2enc.c @@ -214,7 +214,7 @@ void ff_wmv2_encode_mb(MpegEncContext * s, AVCodec ff_wmv2_encoder = { .name = "wmv2", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_WMV2, + .id = AV_CODEC_ID_WMV2, .priv_data_size = sizeof(Wmv2Context), .init = wmv2_encode_init, .encode2 = ff_MPV_encode_picture, diff --git a/libavcodec/wnv1.c b/libavcodec/wnv1.c index b57c215e8e..5b0811d196 100644 --- a/libavcodec/wnv1.c +++ b/libavcodec/wnv1.c @@ -159,7 +159,7 @@ static av_cold int decode_end(AVCodecContext *avctx){ AVCodec ff_wnv1_decoder = { .name = "wnv1", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_WNV1, + .id = AV_CODEC_ID_WNV1, .priv_data_size = sizeof(WNV1Context), .init = decode_init, .close = decode_end, diff --git a/libavcodec/ws-snd1.c b/libavcodec/ws-snd1.c index 53e7b38c01..d9ca77d965 100644 --- a/libavcodec/ws-snd1.c +++ b/libavcodec/ws-snd1.c @@ -185,7 +185,7 @@ static int ws_snd_decode_frame(AVCodecContext *avctx, void *data, AVCodec ff_ws_snd1_decoder = { .name = "ws_snd1", .type = AVMEDIA_TYPE_AUDIO, - .id = CODEC_ID_WESTWOOD_SND1, + .id = AV_CODEC_ID_WESTWOOD_SND1, .priv_data_size = sizeof(WSSndContext), .init = ws_snd_decode_init, .decode = ws_snd_decode_frame, diff --git a/libavcodec/x86/dsputil_mmx.c b/libavcodec/x86/dsputil_mmx.c index 3daa09b314..f13e920bed 100644 --- a/libavcodec/x86/dsputil_mmx.c +++ b/libavcodec/x86/dsputil_mmx.c @@ -2656,8 +2656,8 @@ static void dsputil_init_mmx2(DSPContext *c, AVCodecContext *avctx, } } - if (CONFIG_VP3_DECODER && (avctx->codec_id == CODEC_ID_VP3 || - avctx->codec_id == CODEC_ID_THEORA)) { + if (CONFIG_VP3_DECODER && (avctx->codec_id == AV_CODEC_ID_VP3 || + avctx->codec_id == AV_CODEC_ID_THEORA)) { c->put_no_rnd_pixels_tab[1][1] = put_no_rnd_pixels8_x2_exact_mmx2; c->put_no_rnd_pixels_tab[1][2] = put_no_rnd_pixels8_y2_exact_mmx2; } @@ -2764,8 +2764,8 @@ static void dsputil_init_3dnow(DSPContext *c, AVCodecContext *avctx, } } - if (CONFIG_VP3_DECODER && (avctx->codec_id == CODEC_ID_VP3 || - avctx->codec_id == CODEC_ID_THEORA)) { + if (CONFIG_VP3_DECODER && (avctx->codec_id == AV_CODEC_ID_VP3 || + avctx->codec_id == AV_CODEC_ID_THEORA)) { c->put_no_rnd_pixels_tab[1][1] = put_no_rnd_pixels8_x2_exact_3dnow; c->put_no_rnd_pixels_tab[1][2] = put_no_rnd_pixels8_y2_exact_3dnow; } diff --git a/libavcodec/x86/h264_intrapred_init.c b/libavcodec/x86/h264_intrapred_init.c index 08c35c7138..3703e78866 100644 --- a/libavcodec/x86/h264_intrapred_init.c +++ b/libavcodec/x86/h264_intrapred_init.c @@ -180,17 +180,17 @@ void ff_h264_pred_init_x86(H264PredContext *h, int codec_id, const int bit_depth h->pred8x8 [VERT_PRED8x8 ] = ff_pred8x8_vertical_mmx; h->pred8x8 [HOR_PRED8x8 ] = ff_pred8x8_horizontal_mmx; } - if (codec_id == CODEC_ID_VP8) { + if (codec_id == AV_CODEC_ID_VP8) { h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_tm_vp8_mmx; h->pred8x8 [PLANE_PRED8x8 ] = ff_pred8x8_tm_vp8_mmx; h->pred4x4 [TM_VP8_PRED ] = ff_pred4x4_tm_vp8_mmx; } else { if (chroma_format_idc == 1) h->pred8x8 [PLANE_PRED8x8] = ff_pred8x8_plane_mmx; - if (codec_id == CODEC_ID_SVQ3) { + if (codec_id == AV_CODEC_ID_SVQ3) { if (mm_flags & AV_CPU_FLAG_CMOV) h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_svq3_mmx; - } else if (codec_id == CODEC_ID_RV40) { + } else if (codec_id == AV_CODEC_ID_RV40) { h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_rv40_mmx; } else { h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_h264_mmx; @@ -216,22 +216,22 @@ void ff_h264_pred_init_x86(H264PredContext *h, int codec_id, const int bit_depth h->pred4x4 [VERT_RIGHT_PRED ] = ff_pred4x4_vertical_right_mmxext; h->pred4x4 [HOR_DOWN_PRED ] = ff_pred4x4_horizontal_down_mmxext; h->pred4x4 [DC_PRED ] = ff_pred4x4_dc_mmxext; - if (codec_id == CODEC_ID_VP8 || codec_id == CODEC_ID_H264) { + if (codec_id == AV_CODEC_ID_VP8 || codec_id == AV_CODEC_ID_H264) { h->pred4x4 [DIAG_DOWN_LEFT_PRED] = ff_pred4x4_down_left_mmxext; } - if (codec_id == CODEC_ID_SVQ3 || codec_id == CODEC_ID_H264) { + if (codec_id == AV_CODEC_ID_SVQ3 || codec_id == AV_CODEC_ID_H264) { h->pred4x4 [VERT_LEFT_PRED ] = ff_pred4x4_vertical_left_mmxext; } - if (codec_id != CODEC_ID_RV40) { + if (codec_id != AV_CODEC_ID_RV40) { h->pred4x4 [HOR_UP_PRED ] = ff_pred4x4_horizontal_up_mmxext; } - if (codec_id == CODEC_ID_SVQ3 || codec_id == CODEC_ID_H264) { + if (codec_id == AV_CODEC_ID_SVQ3 || codec_id == AV_CODEC_ID_H264) { if (chroma_format_idc == 1) { h->pred8x8[TOP_DC_PRED8x8 ] = ff_pred8x8_top_dc_mmxext; h->pred8x8[DC_PRED8x8 ] = ff_pred8x8_dc_mmxext; } } - if (codec_id == CODEC_ID_VP8) { + if (codec_id == AV_CODEC_ID_VP8) { h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_tm_vp8_mmx2; h->pred8x8 [DC_PRED8x8 ] = ff_pred8x8_dc_rv40_mmxext; h->pred8x8 [PLANE_PRED8x8 ] = ff_pred8x8_tm_vp8_mmx2; @@ -240,9 +240,9 @@ void ff_h264_pred_init_x86(H264PredContext *h, int codec_id, const int bit_depth } else { if (chroma_format_idc == 1) h->pred8x8 [PLANE_PRED8x8] = ff_pred8x8_plane_mmx2; - if (codec_id == CODEC_ID_SVQ3) { + if (codec_id == AV_CODEC_ID_SVQ3) { h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_plane_svq3_mmx2; - } else if (codec_id == CODEC_ID_RV40) { + } else if (codec_id == AV_CODEC_ID_RV40) { h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_plane_rv40_mmx2; } else { h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_plane_h264_mmx2; @@ -261,15 +261,15 @@ void ff_h264_pred_init_x86(H264PredContext *h, int codec_id, const int bit_depth h->pred8x8l [VERT_RIGHT_PRED ] = ff_pred8x8l_vertical_right_sse2; h->pred8x8l [VERT_LEFT_PRED ] = ff_pred8x8l_vertical_left_sse2; h->pred8x8l [HOR_DOWN_PRED ] = ff_pred8x8l_horizontal_down_sse2; - if (codec_id == CODEC_ID_VP8) { + if (codec_id == AV_CODEC_ID_VP8) { h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_tm_vp8_sse2; h->pred8x8 [PLANE_PRED8x8 ] = ff_pred8x8_tm_vp8_sse2; } else { if (chroma_format_idc == 1) h->pred8x8 [PLANE_PRED8x8] = ff_pred8x8_plane_sse2; - if (codec_id == CODEC_ID_SVQ3) { + if (codec_id == AV_CODEC_ID_SVQ3) { h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_svq3_sse2; - } else if (codec_id == CODEC_ID_RV40) { + } else if (codec_id == AV_CODEC_ID_RV40) { h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_rv40_sse2; } else { h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_h264_sse2; @@ -292,15 +292,15 @@ void ff_h264_pred_init_x86(H264PredContext *h, int codec_id, const int bit_depth h->pred8x8l [VERT_LEFT_PRED ] = ff_pred8x8l_vertical_left_ssse3; h->pred8x8l [HOR_UP_PRED ] = ff_pred8x8l_horizontal_up_ssse3; h->pred8x8l [HOR_DOWN_PRED ] = ff_pred8x8l_horizontal_down_ssse3; - if (codec_id == CODEC_ID_VP8) { + if (codec_id == AV_CODEC_ID_VP8) { h->pred8x8 [PLANE_PRED8x8 ] = ff_pred8x8_tm_vp8_ssse3; h->pred4x4 [TM_VP8_PRED ] = ff_pred4x4_tm_vp8_ssse3; } else { if (chroma_format_idc == 1) h->pred8x8 [PLANE_PRED8x8] = ff_pred8x8_plane_ssse3; - if (codec_id == CODEC_ID_SVQ3) { + if (codec_id == AV_CODEC_ID_SVQ3) { h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_svq3_ssse3; - } else if (codec_id == CODEC_ID_RV40) { + } else if (codec_id == AV_CODEC_ID_RV40) { h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_rv40_ssse3; } else { h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_h264_ssse3; diff --git a/libavcodec/x86/motion_est_mmx.c b/libavcodec/x86/motion_est_mmx.c index ab845c1129..68b1633a47 100644 --- a/libavcodec/x86/motion_est_mmx.c +++ b/libavcodec/x86/motion_est_mmx.c @@ -460,7 +460,7 @@ void ff_dsputil_init_pix_mmx(DSPContext* c, AVCodecContext *avctx) c->pix_abs[1][3] = sad8_xy2_mmx2; } } - if ((mm_flags & AV_CPU_FLAG_SSE2) && !(mm_flags & AV_CPU_FLAG_3DNOW) && avctx->codec_id != CODEC_ID_SNOW) { + if ((mm_flags & AV_CPU_FLAG_SSE2) && !(mm_flags & AV_CPU_FLAG_3DNOW) && avctx->codec_id != AV_CODEC_ID_SNOW) { c->sad[0]= sad16_sse2; } #endif /* HAVE_INLINE_ASM */ diff --git a/libavcodec/x86/vp56dsp_init.c b/libavcodec/x86/vp56dsp_init.c index ae04440611..69c197e520 100644 --- a/libavcodec/x86/vp56dsp_init.c +++ b/libavcodec/x86/vp56dsp_init.c @@ -30,12 +30,12 @@ void ff_vp6_filter_diag4_mmx(uint8_t *dst, uint8_t *src, int stride, void ff_vp6_filter_diag4_sse2(uint8_t *dst, uint8_t *src, int stride, const int16_t *h_weights,const int16_t *v_weights); -av_cold void ff_vp56dsp_init_x86(VP56DSPContext* c, enum CodecID codec) +av_cold void ff_vp56dsp_init_x86(VP56DSPContext* c, enum AVCodecID codec) { #if HAVE_YASM int mm_flags = av_get_cpu_flags(); - if (CONFIG_VP6_DECODER && codec == CODEC_ID_VP6) { + if (CONFIG_VP6_DECODER && codec == AV_CODEC_ID_VP6) { #if ARCH_X86_32 if (mm_flags & AV_CPU_FLAG_MMX) { c->vp6_filter_diag4 = ff_vp6_filter_diag4_mmx; diff --git a/libavcodec/xan.c b/libavcodec/xan.c index 4c4721ada2..b22de0e7ab 100644 --- a/libavcodec/xan.c +++ b/libavcodec/xan.c @@ -500,7 +500,7 @@ static int xan_decode_frame(AVCodecContext *avctx, int ret, buf_size = avpkt->size; XanContext *s = avctx->priv_data; - if (avctx->codec->id == CODEC_ID_XAN_WC3) { + if (avctx->codec->id == AV_CODEC_ID_XAN_WC3) { const uint8_t *buf_end = buf + buf_size; int tag = 0; while (buf_end - buf > 8 && tag != VGA__TAG) { @@ -612,7 +612,7 @@ static av_cold int xan_decode_end(AVCodecContext *avctx) AVCodec ff_xan_wc3_decoder = { .name = "xan_wc3", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_XAN_WC3, + .id = AV_CODEC_ID_XAN_WC3, .priv_data_size = sizeof(XanContext), .init = xan_decode_init, .close = xan_decode_end, diff --git a/libavcodec/xbmenc.c b/libavcodec/xbmenc.c index 2df6ae0d77..358a25ab67 100644 --- a/libavcodec/xbmenc.c +++ b/libavcodec/xbmenc.c @@ -76,7 +76,7 @@ static av_cold int xbm_encode_close(AVCodecContext *avctx) AVCodec ff_xbm_encoder = { .name = "xbm", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_XBM, + .id = AV_CODEC_ID_XBM, .init = xbm_encode_init, .encode2 = xbm_encode_frame, .close = xbm_encode_close, diff --git a/libavcodec/xl.c b/libavcodec/xl.c index e74d131943..6f6729b9a7 100644 --- a/libavcodec/xl.c +++ b/libavcodec/xl.c @@ -147,7 +147,7 @@ static av_cold int decode_end(AVCodecContext *avctx){ AVCodec ff_xl_decoder = { .name = "xl", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_VIXL, + .id = AV_CODEC_ID_VIXL, .priv_data_size = sizeof(VideoXLContext), .init = decode_init, .close = decode_end, diff --git a/libavcodec/xsubdec.c b/libavcodec/xsubdec.c index af87388928..b66a57e2c2 100644 --- a/libavcodec/xsubdec.c +++ b/libavcodec/xsubdec.c @@ -136,7 +136,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVCodec ff_xsub_decoder = { .name = "xsub", .type = AVMEDIA_TYPE_SUBTITLE, - .id = CODEC_ID_XSUB, + .id = AV_CODEC_ID_XSUB, .init = decode_init, .decode = decode_frame, .long_name = NULL_IF_CONFIG_SMALL("XSUB"), diff --git a/libavcodec/xsubenc.c b/libavcodec/xsubenc.c index bd66f86501..ff3b495a03 100644 --- a/libavcodec/xsubenc.c +++ b/libavcodec/xsubenc.c @@ -213,7 +213,7 @@ static av_cold int xsub_encoder_init(AVCodecContext *avctx) AVCodec ff_xsub_encoder = { .name = "xsub", .type = AVMEDIA_TYPE_SUBTITLE, - .id = CODEC_ID_XSUB, + .id = AV_CODEC_ID_XSUB, .init = xsub_encoder_init, .encode = xsub_encode, .long_name = NULL_IF_CONFIG_SMALL("DivX subtitles (XSUB)"), diff --git a/libavcodec/xwddec.c b/libavcodec/xwddec.c index 2879358aa4..bb38a1ebac 100644 --- a/libavcodec/xwddec.c +++ b/libavcodec/xwddec.c @@ -260,7 +260,7 @@ static av_cold int xwd_decode_close(AVCodecContext *avctx) AVCodec ff_xwd_decoder = { .name = "xwd", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_XWD, + .id = AV_CODEC_ID_XWD, .init = xwd_decode_init, .close = xwd_decode_close, .decode = xwd_decode_frame, diff --git a/libavcodec/xwdenc.c b/libavcodec/xwdenc.c index 8c98ef9f5d..8f56b1b646 100644 --- a/libavcodec/xwdenc.c +++ b/libavcodec/xwdenc.c @@ -222,7 +222,7 @@ static av_cold int xwd_encode_close(AVCodecContext *avctx) AVCodec ff_xwd_encoder = { .name = "xwd", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_XWD, + .id = AV_CODEC_ID_XWD, .init = xwd_encode_init, .encode2 = xwd_encode_frame, .close = xwd_encode_close, diff --git a/libavcodec/xxan.c b/libavcodec/xxan.c index 575cc34bd1..0c3bdb64e8 100644 --- a/libavcodec/xxan.c +++ b/libavcodec/xxan.c @@ -412,7 +412,7 @@ static av_cold int xan_decode_end(AVCodecContext *avctx) AVCodec ff_xan_wc4_decoder = { .name = "xan_wc4", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_XAN_WC4, + .id = AV_CODEC_ID_XAN_WC4, .priv_data_size = sizeof(XanContext), .init = xan_decode_init, .close = xan_decode_end, diff --git a/libavcodec/yop.c b/libavcodec/yop.c index a16a5eb6f7..d142f3bc18 100644 --- a/libavcodec/yop.c +++ b/libavcodec/yop.c @@ -250,7 +250,7 @@ static int yop_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVCodec ff_yop_decoder = { .name = "yop", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_YOP, + .id = AV_CODEC_ID_YOP, .priv_data_size = sizeof(YopDecContext), .init = yop_decode_init, .close = yop_decode_close, diff --git a/libavcodec/zerocodec.c b/libavcodec/zerocodec.c index cfbd16f147..c8c2453a56 100644 --- a/libavcodec/zerocodec.c +++ b/libavcodec/zerocodec.c @@ -157,7 +157,7 @@ static av_cold int zerocodec_decode_init(AVCodecContext *avctx) AVCodec ff_zerocodec_decoder = { .type = AVMEDIA_TYPE_VIDEO, .name = "zerocodec", - .id = CODEC_ID_ZEROCODEC, + .id = AV_CODEC_ID_ZEROCODEC, .priv_data_size = sizeof(ZeroCodecContext), .init = zerocodec_decode_init, .decode = zerocodec_decode_frame, diff --git a/libavcodec/zmbv.c b/libavcodec/zmbv.c index bec7abde8d..4557cb16f9 100644 --- a/libavcodec/zmbv.c +++ b/libavcodec/zmbv.c @@ -675,7 +675,7 @@ static av_cold int decode_end(AVCodecContext *avctx) AVCodec ff_zmbv_decoder = { .name = "zmbv", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_ZMBV, + .id = AV_CODEC_ID_ZMBV, .priv_data_size = sizeof(ZmbvContext), .init = decode_init, .close = decode_end, diff --git a/libavcodec/zmbvenc.c b/libavcodec/zmbvenc.c index 8b9bd86450..85651bebbd 100644 --- a/libavcodec/zmbvenc.c +++ b/libavcodec/zmbvenc.c @@ -339,7 +339,7 @@ static av_cold int encode_end(AVCodecContext *avctx) AVCodec ff_zmbv_encoder = { .name = "zmbv", .type = AVMEDIA_TYPE_VIDEO, - .id = CODEC_ID_ZMBV, + .id = AV_CODEC_ID_ZMBV, .priv_data_size = sizeof(ZmbvEncContext), .init = encode_init, .encode2 = encode_frame, |