Replace all CODEC_ID_* with AV_CODEC_ID_*

This commit is contained in:
Anton Khirnov 2012-08-05 11:11:04 +02:00
parent 104e10fb42
commit 36ef5369ee
582 changed files with 3494 additions and 3494 deletions

View File

@ -1337,7 +1337,7 @@ static void do_subtitle_out(AVFormatContext *s,
/* Note: DVB subtitle need one packet to draw them and one other
packet to clear them */
/* XXX: signal it in the codec context ? */
if (enc->codec_id == CODEC_ID_DVB_SUBTITLE)
if (enc->codec_id == AV_CODEC_ID_DVB_SUBTITLE)
nb = 2;
else
nb = 1;
@ -1363,7 +1363,7 @@ static void do_subtitle_out(AVFormatContext *s,
pkt.data = subtitle_out;
pkt.size = subtitle_out_size;
pkt.pts = av_rescale_q(sub->pts, AV_TIME_BASE_Q, ost->st->time_base);
if (enc->codec_id == CODEC_ID_DVB_SUBTITLE) {
if (enc->codec_id == AV_CODEC_ID_DVB_SUBTITLE) {
/* XXX: the pts correction is handled here. Maybe handling
it in the codec would be better */
if (i == 0)
@ -1416,7 +1416,7 @@ static void do_video_out(AVFormatContext *s,
return;
if (s->oformat->flags & AVFMT_RAWPICTURE &&
enc->codec->id == CODEC_ID_RAWVIDEO) {
enc->codec->id == AV_CODEC_ID_RAWVIDEO) {
/* raw pictures are written as AVPicture structure to
avoid any copies. We support temporarily the older
method. */
@ -1736,7 +1736,7 @@ static void flush_encoders(void)
if (ost->st->codec->codec_type == AVMEDIA_TYPE_AUDIO && enc->frame_size <= 1)
continue;
if (ost->st->codec->codec_type == AVMEDIA_TYPE_VIDEO && (os->oformat->flags & AVFMT_RAWPICTURE) && enc->codec->id == CODEC_ID_RAWVIDEO)
if (ost->st->codec->codec_type == AVMEDIA_TYPE_VIDEO && (os->oformat->flags & AVFMT_RAWPICTURE) && enc->codec->id == AV_CODEC_ID_RAWVIDEO)
continue;
for (;;) {
@ -1850,10 +1850,10 @@ static void do_streamcopy(InputStream *ist, OutputStream *ost, const AVPacket *p
opkt.flags = pkt->flags;
// FIXME remove the following 2 lines they shall be replaced by the bitstream filters
if ( ost->st->codec->codec_id != CODEC_ID_H264
&& ost->st->codec->codec_id != CODEC_ID_MPEG1VIDEO
&& ost->st->codec->codec_id != CODEC_ID_MPEG2VIDEO
&& ost->st->codec->codec_id != CODEC_ID_VC1
if ( ost->st->codec->codec_id != AV_CODEC_ID_H264
&& ost->st->codec->codec_id != AV_CODEC_ID_MPEG1VIDEO
&& ost->st->codec->codec_id != AV_CODEC_ID_MPEG2VIDEO
&& ost->st->codec->codec_id != AV_CODEC_ID_VC1
) {
if (av_parser_change(ist->st->parser, ost->st->codec, &opkt.data, &opkt.size, pkt->data, pkt->size, pkt->flags & AV_PKT_FLAG_KEY))
opkt.destruct = av_destruct_packet;
@ -4230,7 +4230,7 @@ static void opt_output_file(void *optctx, const char *filename)
}
/* video: highest resolution */
if (!o->video_disable && oc->oformat->video_codec != CODEC_ID_NONE) {
if (!o->video_disable && oc->oformat->video_codec != AV_CODEC_ID_NONE) {
int area = 0, idx = -1;
for (i = 0; i < nb_input_streams; i++) {
ist = input_streams[i];
@ -4244,7 +4244,7 @@ static void opt_output_file(void *optctx, const char *filename)
}
/* audio: most channels */
if (!o->audio_disable && oc->oformat->audio_codec != CODEC_ID_NONE) {
if (!o->audio_disable && oc->oformat->audio_codec != AV_CODEC_ID_NONE) {
int channels = 0, idx = -1;
for (i = 0; i < nb_input_streams; i++) {
ist = input_streams[i];
@ -4258,7 +4258,7 @@ static void opt_output_file(void *optctx, const char *filename)
}
/* subtitles: pick first */
if (!o->subtitle_disable && oc->oformat->subtitle_codec != CODEC_ID_NONE) {
if (!o->subtitle_disable && oc->oformat->subtitle_codec != AV_CODEC_ID_NONE) {
for (i = 0; i < nb_input_streams; i++)
if (input_streams[i]->st->codec->codec_type == AVMEDIA_TYPE_SUBTITLE) {
NEW_STREAM(subtitle, i);

View File

@ -730,7 +730,7 @@ static int open_input_file(AVFormatContext **fmt_ctx_ptr, const char *filename)
AVStream *stream = fmt_ctx->streams[i];
AVCodec *codec;
if (stream->codec->codec_id == CODEC_ID_PROBE) {
if (stream->codec->codec_id == AV_CODEC_ID_PROBE) {
fprintf(stderr, "Failed to probe codec for input stream %d\n",
stream->index);
} else if (!(codec = avcodec_find_decoder(stream->codec->codec_id))) {

View File

@ -3539,7 +3539,7 @@ static void extract_mpeg4_header(AVFormatContext *infile)
mpeg4_count = 0;
for(i=0;i<infile->nb_streams;i++) {
st = infile->streams[i];
if (st->codec->codec_id == CODEC_ID_MPEG4 &&
if (st->codec->codec_id == AV_CODEC_ID_MPEG4 &&
st->codec->extradata_size == 0) {
mpeg4_count++;
}
@ -3552,7 +3552,7 @@ static void extract_mpeg4_header(AVFormatContext *infile)
if (av_read_packet(infile, &pkt) < 0)
break;
st = infile->streams[pkt.stream_index];
if (st->codec->codec_id == CODEC_ID_MPEG4 &&
if (st->codec->codec_id == AV_CODEC_ID_MPEG4 &&
st->codec->extradata_size == 0) {
av_freep(&st->codec->extradata);
/* fill extradata with the header */
@ -3866,22 +3866,22 @@ static void add_codec(FFStream *stream, AVCodecContext *av)
memcpy(st->codec, av, sizeof(AVCodecContext));
}
static enum CodecID opt_audio_codec(const char *arg)
static enum AVCodecID opt_audio_codec(const char *arg)
{
AVCodec *p= avcodec_find_encoder_by_name(arg);
if (p == NULL || p->type != AVMEDIA_TYPE_AUDIO)
return CODEC_ID_NONE;
return AV_CODEC_ID_NONE;
return p->id;
}
static enum CodecID opt_video_codec(const char *arg)
static enum AVCodecID opt_video_codec(const char *arg)
{
AVCodec *p= avcodec_find_encoder_by_name(arg);
if (p == NULL || p->type != AVMEDIA_TYPE_VIDEO)
return CODEC_ID_NONE;
return AV_CODEC_ID_NONE;
return p->id;
}
@ -3924,7 +3924,7 @@ static int avserver_opt_default(const char *opt, const char *arg,
static int avserver_opt_preset(const char *arg,
AVCodecContext *avctx, int type,
enum CodecID *audio_id, enum CodecID *video_id)
enum AVCodecID *audio_id, enum AVCodecID *video_id)
{
FILE *f=NULL;
char filename[1000], tmp[1000], tmp2[1000], line[1000];
@ -4006,7 +4006,7 @@ static int parse_ffconfig(const char *filename)
FFStream **last_stream, *stream, *redirect;
FFStream **last_feed, *feed, *s;
AVCodecContext audio_enc, video_enc;
enum CodecID audio_id, video_id;
enum AVCodecID audio_id, video_id;
f = fopen(filename, "r");
if (!f) {
@ -4023,8 +4023,8 @@ static int parse_ffconfig(const char *filename)
stream = NULL;
feed = NULL;
redirect = NULL;
audio_id = CODEC_ID_NONE;
video_id = CODEC_ID_NONE;
audio_id = AV_CODEC_ID_NONE;
video_id = AV_CODEC_ID_NONE;
#define ERROR(...) report_config_error(filename, line_num, &errors, __VA_ARGS__)
for(;;) {
@ -4216,8 +4216,8 @@ static int parse_ffconfig(const char *filename)
stream->fmt = avserver_guess_format(NULL, stream->filename, NULL);
avcodec_get_context_defaults3(&video_enc, NULL);
avcodec_get_context_defaults3(&audio_enc, NULL);
audio_id = CODEC_ID_NONE;
video_id = CODEC_ID_NONE;
audio_id = AV_CODEC_ID_NONE;
video_id = AV_CODEC_ID_NONE;
if (stream->fmt) {
audio_id = stream->fmt->audio_codec;
video_id = stream->fmt->video_codec;
@ -4299,13 +4299,13 @@ static int parse_ffconfig(const char *filename)
} else if (!av_strcasecmp(cmd, "AudioCodec")) {
get_arg(arg, sizeof(arg), &p);
audio_id = opt_audio_codec(arg);
if (audio_id == CODEC_ID_NONE) {
if (audio_id == AV_CODEC_ID_NONE) {
ERROR("Unknown AudioCodec: %s\n", arg);
}
} else if (!av_strcasecmp(cmd, "VideoCodec")) {
get_arg(arg, sizeof(arg), &p);
video_id = opt_video_codec(arg);
if (video_id == CODEC_ID_NONE) {
if (video_id == AV_CODEC_ID_NONE) {
ERROR("Unknown VideoCodec: %s\n", arg);
}
} else if (!av_strcasecmp(cmd, "MaxTime")) {
@ -4496,9 +4496,9 @@ static int parse_ffconfig(const char *filename)
if (stream)
video_enc.dark_masking = atof(arg);
} else if (!av_strcasecmp(cmd, "NoVideo")) {
video_id = CODEC_ID_NONE;
video_id = AV_CODEC_ID_NONE;
} else if (!av_strcasecmp(cmd, "NoAudio")) {
audio_id = CODEC_ID_NONE;
audio_id = AV_CODEC_ID_NONE;
} else if (!av_strcasecmp(cmd, "ACL")) {
parse_acl_row(stream, feed, NULL, p, filename, line_num);
} else if (!av_strcasecmp(cmd, "DynamicACL")) {
@ -4536,12 +4536,12 @@ static int parse_ffconfig(const char *filename)
ERROR("No corresponding <Stream> for </Stream>\n");
} else {
if (stream->feed && stream->fmt && strcmp(stream->fmt->name, "ffm") != 0) {
if (audio_id != CODEC_ID_NONE) {
if (audio_id != AV_CODEC_ID_NONE) {
audio_enc.codec_type = AVMEDIA_TYPE_AUDIO;
audio_enc.codec_id = audio_id;
add_codec(stream, &audio_enc);
}
if (video_id != CODEC_ID_NONE) {
if (video_id != AV_CODEC_ID_NONE) {
video_enc.codec_type = AVMEDIA_TYPE_VIDEO;
video_enc.codec_id = video_id;
add_codec(stream, &video_enc);

View File

@ -948,7 +948,7 @@ int check_stream_specifier(AVFormatContext *s, AVStream *st, const char *spec)
return AVERROR(EINVAL);
}
AVDictionary *filter_codec_opts(AVDictionary *opts, enum CodecID codec_id,
AVDictionary *filter_codec_opts(AVDictionary *opts, enum AVCodecID codec_id,
AVFormatContext *s, AVStream *st, AVCodec *codec)
{
AVDictionary *ret = NULL;

View File

@ -218,7 +218,7 @@ int check_stream_specifier(AVFormatContext *s, AVStream *st, const char *spec);
* If null, the default one is looked up according to the codec id.
* @return a pointer to the created dictionary
*/
AVDictionary *filter_codec_opts(AVDictionary *opts, enum CodecID codec_id,
AVDictionary *filter_codec_opts(AVDictionary *opts, enum AVCodecID codec_id,
AVFormatContext *s, AVStream *st, AVCodec *codec);
/**

View File

@ -403,7 +403,7 @@ send a reminder by email. Your patch should eventually be dealt with.
@item
Did you register it in @file{allcodecs.c} or @file{allformats.c}?
@item
Did you add the CodecID to @file{avcodec.h}?
Did you add the AVCodecID to @file{avcodec.h}?
@item
If it has a fourcc, did you add it to @file{libavformat/riff.c},
even if it is only a decoder?

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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;

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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();

View File

@ -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,

View File

@ -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,

View File

@ -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");

View File

@ -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");

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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);

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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,
};

View File

@ -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,
};

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,
};

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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");

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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"),

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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"),
};

View File

@ -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"),
};

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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);

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

Some files were not shown because too many files have changed in this diff Show More