Replace all CODEC_ID_* with AV_CODEC_ID_*

pull/28/head
Anton Khirnov 13 years ago
parent 104e10fb42
commit 36ef5369ee
  1. 22
      avconv.c
  2. 2
      avprobe.c
  3. 36
      avserver.c
  4. 2
      cmdutils.c
  5. 2
      cmdutils.h
  6. 2
      doc/developer.texi
  7. 2
      libavcodec/4xm.c
  8. 2
      libavcodec/8bps.c
  9. 14
      libavcodec/8svx.c
  10. 6
      libavcodec/a64multienc.c
  11. 6
      libavcodec/aac_ac3_parser.c
  12. 2
      libavcodec/aac_ac3_parser.h
  13. 2
      libavcodec/aac_parser.c
  14. 4
      libavcodec/aacdec.c
  15. 2
      libavcodec/aacenc.c
  16. 2
      libavcodec/aasc.c
  17. 8
      libavcodec/ac3_parser.c
  18. 4
      libavcodec/ac3dec.c
  19. 2
      libavcodec/ac3enc.c
  20. 2
      libavcodec/ac3enc_fixed.c
  21. 2
      libavcodec/ac3enc_float.c
  22. 206
      libavcodec/adpcm.c
  23. 52
      libavcodec/adpcmenc.c
  24. 2
      libavcodec/adx_parser.c
  25. 2
      libavcodec/adxdec.c
  26. 2
      libavcodec/adxenc.c
  27. 2
      libavcodec/alac.c
  28. 2
      libavcodec/alacenc.c
  29. 2
      libavcodec/alsdec.c
  30. 2
      libavcodec/amrnbdec.c
  31. 2
      libavcodec/amrwbdec.c
  32. 2
      libavcodec/anm.c
  33. 2
      libavcodec/ansi.c
  34. 2
      libavcodec/apedec.c
  35. 8
      libavcodec/api-example.c
  36. 6
      libavcodec/arm/h264pred_init_arm.c
  37. 4
      libavcodec/arm/vp56dsp_init_arm.c
  38. 2
      libavcodec/assdec.c
  39. 2
      libavcodec/assenc.c
  40. 22
      libavcodec/asv1.c
  41. 2
      libavcodec/atrac1.c
  42. 2
      libavcodec/atrac3.c
  43. 2
      libavcodec/aura.c
  44. 22
      libavcodec/avcodec.h
  45. 2
      libavcodec/avs.c
  46. 2
      libavcodec/bethsoftvideo.c
  47. 2
      libavcodec/bfi.c
  48. 2
      libavcodec/bink.c
  49. 12
      libavcodec/binkaudio.c
  50. 2
      libavcodec/bmp.c
  51. 2
      libavcodec/bmpenc.c
  52. 4
      libavcodec/bmv.c
  53. 2
      libavcodec/c93.c
  54. 2
      libavcodec/cavs_parser.c
  55. 2
      libavcodec/cavsdec.c
  56. 2
      libavcodec/cdgraphics.c
  57. 2
      libavcodec/cdxl.c
  58. 2
      libavcodec/cinepak.c
  59. 4
      libavcodec/cljr.c
  60. 2
      libavcodec/cllc.c
  61. 2
      libavcodec/cook.c
  62. 2
      libavcodec/cook_parser.c
  63. 2
      libavcodec/cscd.c
  64. 6
      libavcodec/cyuv.c
  65. 2
      libavcodec/dca_parser.c
  66. 2
      libavcodec/dcadec.c
  67. 2
      libavcodec/dfa.c
  68. 2
      libavcodec/dirac_parser.c
  69. 2
      libavcodec/dnxhd_parser.c
  70. 2
      libavcodec/dnxhddec.c
  71. 2
      libavcodec/dnxhdenc.c
  72. 30
      libavcodec/dpcm.c
  73. 2
      libavcodec/dpx.c
  74. 2
      libavcodec/dpxenc.c
  75. 4
      libavcodec/dsicinav.c
  76. 2
      libavcodec/dv.c
  77. 2
      libavcodec/dvbsub.c
  78. 2
      libavcodec/dvbsub_parser.c
  79. 2
      libavcodec/dvbsubdec.c
  80. 2
      libavcodec/dvdec.c
  81. 2
      libavcodec/dvdsub_parser.c
  82. 2
      libavcodec/dvdsubdec.c
  83. 2
      libavcodec/dvdsubenc.c
  84. 2
      libavcodec/dxa.c
  85. 2
      libavcodec/dxtory.c
  86. 2
      libavcodec/dxva2_h264.c
  87. 2
      libavcodec/dxva2_mpeg2.c
  88. 8
      libavcodec/dxva2_vc1.c
  89. 2
      libavcodec/eac3enc.c
  90. 2
      libavcodec/eacmv.c
  91. 2
      libavcodec/eamad.c
  92. 2
      libavcodec/eatgq.c
  93. 2
      libavcodec/eatgv.c
  94. 2
      libavcodec/eatqi.c
  95. 12
      libavcodec/error_resilience.c
  96. 2
      libavcodec/escape124.c
  97. 4
      libavcodec/ffv1.c
  98. 2
      libavcodec/flac_parser.c
  99. 2
      libavcodec/flacdec.c
  100. 2
      libavcodec/flacenc.c
  101. Some files were not shown because too many files have changed in this diff Show More

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

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

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

@ -948,7 +948,7 @@ int check_stream_specifier(AVFormatContext *s, AVStream *st, const char *spec)
return AVERROR(EINVAL); 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) AVFormatContext *s, AVStream *st, AVCodec *codec)
{ {
AVDictionary *ret = NULL; AVDictionary *ret = NULL;

@ -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. * If null, the default one is looked up according to the codec id.
* @return a pointer to the created dictionary * @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); AVFormatContext *s, AVStream *st, AVCodec *codec);
/** /**

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

@ -931,7 +931,7 @@ static av_cold int decode_end(AVCodecContext *avctx)
AVCodec ff_fourxm_decoder = { AVCodec ff_fourxm_decoder = {
.name = "4xm", .name = "4xm",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_4XM, .id = AV_CODEC_ID_4XM,
.priv_data_size = sizeof(FourXContext), .priv_data_size = sizeof(FourXContext),
.init = decode_init, .init = decode_init,
.close = decode_end, .close = decode_end,

@ -226,7 +226,7 @@ static av_cold int decode_end(AVCodecContext *avctx)
AVCodec ff_eightbps_decoder = { AVCodec ff_eightbps_decoder = {
.name = "8bps", .name = "8bps",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_8BPS, .id = AV_CODEC_ID_8BPS,
.priv_data_size = sizeof(EightBpsContext), .priv_data_size = sizeof(EightBpsContext),
.init = decode_init, .init = decode_init,
.close = decode_end, .close = decode_end,

@ -91,7 +91,7 @@ static int eightsvx_decode_frame(AVCodecContext *avctx, void *data,
int buf_size; int buf_size;
uint8_t *out_data; uint8_t *out_data;
int ret; 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 */ /* for the first packet, copy data to buffer */
if (avpkt->data) { if (avpkt->data) {
@ -180,13 +180,13 @@ static av_cold int eightsvx_decode_init(AVCodecContext *avctx)
} }
switch(avctx->codec->id) { switch(avctx->codec->id) {
case CODEC_ID_8SVX_FIB: case AV_CODEC_ID_8SVX_FIB:
esc->table = fibonacci; esc->table = fibonacci;
break; break;
case CODEC_ID_8SVX_EXP: case AV_CODEC_ID_8SVX_EXP:
esc->table = exponential; esc->table = exponential;
break; break;
case CODEC_ID_PCM_S8_PLANAR: case AV_CODEC_ID_PCM_S8_PLANAR:
break; break;
default: default:
return -1; return -1;
@ -212,7 +212,7 @@ static av_cold int eightsvx_decode_close(AVCodecContext *avctx)
AVCodec ff_eightsvx_fib_decoder = { AVCodec ff_eightsvx_fib_decoder = {
.name = "8svx_fib", .name = "8svx_fib",
.type = AVMEDIA_TYPE_AUDIO, .type = AVMEDIA_TYPE_AUDIO,
.id = CODEC_ID_8SVX_FIB, .id = AV_CODEC_ID_8SVX_FIB,
.priv_data_size = sizeof (EightSvxContext), .priv_data_size = sizeof (EightSvxContext),
.init = eightsvx_decode_init, .init = eightsvx_decode_init,
.close = eightsvx_decode_close, .close = eightsvx_decode_close,
@ -224,7 +224,7 @@ AVCodec ff_eightsvx_fib_decoder = {
AVCodec ff_eightsvx_exp_decoder = { AVCodec ff_eightsvx_exp_decoder = {
.name = "8svx_exp", .name = "8svx_exp",
.type = AVMEDIA_TYPE_AUDIO, .type = AVMEDIA_TYPE_AUDIO,
.id = CODEC_ID_8SVX_EXP, .id = AV_CODEC_ID_8SVX_EXP,
.priv_data_size = sizeof (EightSvxContext), .priv_data_size = sizeof (EightSvxContext),
.init = eightsvx_decode_init, .init = eightsvx_decode_init,
.close = eightsvx_decode_close, .close = eightsvx_decode_close,
@ -236,7 +236,7 @@ AVCodec ff_eightsvx_exp_decoder = {
AVCodec ff_pcm_s8_planar_decoder = { AVCodec ff_pcm_s8_planar_decoder = {
.name = "pcm_s8_planar", .name = "pcm_s8_planar",
.type = AVMEDIA_TYPE_AUDIO, .type = AVMEDIA_TYPE_AUDIO,
.id = CODEC_ID_PCM_S8_PLANAR, .id = AV_CODEC_ID_PCM_S8_PLANAR,
.priv_data_size = sizeof(EightSvxContext), .priv_data_size = sizeof(EightSvxContext),
.init = eightsvx_decode_init, .init = eightsvx_decode_init,
.close = eightsvx_decode_close, .close = eightsvx_decode_close,

@ -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); av_log(avctx, AV_LOG_INFO, "charset lifetime set to %d frame(s)\n", c->mc_lifetime);
c->mc_frame_counter = 0; 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; c->mc_pal_size = 4 + c->mc_use_5col;
/* precalc luma values for later use */ /* precalc luma values for later use */
@ -373,7 +373,7 @@ static int a64multi_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
AVCodec ff_a64multi_encoder = { AVCodec ff_a64multi_encoder = {
.name = "a64multi", .name = "a64multi",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_A64_MULTI, .id = AV_CODEC_ID_A64_MULTI,
.priv_data_size = sizeof(A64Context), .priv_data_size = sizeof(A64Context),
.init = a64multi_init_encoder, .init = a64multi_init_encoder,
.encode2 = a64multi_encode_frame, .encode2 = a64multi_encode_frame,
@ -386,7 +386,7 @@ AVCodec ff_a64multi_encoder = {
AVCodec ff_a64multi5_encoder = { AVCodec ff_a64multi5_encoder = {
.name = "a64multi5", .name = "a64multi5",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_A64_MULTI5, .id = AV_CODEC_ID_A64_MULTI5,
.priv_data_size = sizeof(A64Context), .priv_data_size = sizeof(A64Context),
.init = a64multi_init_encoder, .init = a64multi_init_encoder,
.encode2 = a64multi_encode_frame, .encode2 = a64multi_encode_frame,

@ -78,7 +78,7 @@ get_next:
and total number of samples found in an AAC ADTS header are not 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 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). */ 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; avctx->sample_rate = s->sample_rate;
/* allow downmixing to stereo (or mono for AC-3) */ /* allow downmixing to stereo (or mono for AC-3) */
@ -86,8 +86,8 @@ get_next:
avctx->request_channels < s->channels && avctx->request_channels < s->channels &&
(avctx->request_channels <= 2 || (avctx->request_channels <= 2 ||
(avctx->request_channels == 1 && (avctx->request_channels == 1 &&
(avctx->codec_id == CODEC_ID_AC3 || (avctx->codec_id == AV_CODEC_ID_AC3 ||
avctx->codec_id == CODEC_ID_EAC3)))) { avctx->codec_id == AV_CODEC_ID_EAC3)))) {
avctx->channels = avctx->request_channels; avctx->channels = avctx->request_channels;
} else { } else {
avctx->channels = s->channels; avctx->channels = s->channels;

@ -55,7 +55,7 @@ typedef struct AACAC3ParseContext {
uint64_t state; uint64_t state;
int need_next_header; int need_next_header;
enum CodecID codec_id; enum AVCodecID codec_id;
} AACAC3ParseContext; } AACAC3ParseContext;
int ff_aac_ac3_parse(AVCodecParserContext *s1, int ff_aac_ac3_parse(AVCodecParserContext *s1,

@ -61,7 +61,7 @@ static av_cold int aac_parse_init(AVCodecParserContext *s1)
AVCodecParser ff_aac_parser = { AVCodecParser ff_aac_parser = {
.codec_ids = { CODEC_ID_AAC }, .codec_ids = { AV_CODEC_ID_AAC },
.priv_data_size = sizeof(AACAC3ParseContext), .priv_data_size = sizeof(AACAC3ParseContext),
.parser_init = aac_parse_init, .parser_init = aac_parse_init,
.parser_parse = ff_aac_ac3_parse, .parser_parse = ff_aac_ac3_parse,

@ -2841,7 +2841,7 @@ static av_cold int latm_decode_init(AVCodecContext *avctx)
AVCodec ff_aac_decoder = { AVCodec ff_aac_decoder = {
.name = "aac", .name = "aac",
.type = AVMEDIA_TYPE_AUDIO, .type = AVMEDIA_TYPE_AUDIO,
.id = CODEC_ID_AAC, .id = AV_CODEC_ID_AAC,
.priv_data_size = sizeof(AACContext), .priv_data_size = sizeof(AACContext),
.init = aac_decode_init, .init = aac_decode_init,
.close = aac_decode_close, .close = aac_decode_close,
@ -2862,7 +2862,7 @@ AVCodec ff_aac_decoder = {
AVCodec ff_aac_latm_decoder = { AVCodec ff_aac_latm_decoder = {
.name = "aac_latm", .name = "aac_latm",
.type = AVMEDIA_TYPE_AUDIO, .type = AVMEDIA_TYPE_AUDIO,
.id = CODEC_ID_AAC_LATM, .id = AV_CODEC_ID_AAC_LATM,
.priv_data_size = sizeof(struct LATMContext), .priv_data_size = sizeof(struct LATMContext),
.init = latm_decode_init, .init = latm_decode_init,
.close = aac_decode_close, .close = aac_decode_close,

@ -819,7 +819,7 @@ static const AVClass aacenc_class = {
AVCodec ff_aac_encoder = { AVCodec ff_aac_encoder = {
.name = "aac", .name = "aac",
.type = AVMEDIA_TYPE_AUDIO, .type = AVMEDIA_TYPE_AUDIO,
.id = CODEC_ID_AAC, .id = AV_CODEC_ID_AAC,
.priv_data_size = sizeof(AACEncContext), .priv_data_size = sizeof(AACEncContext),
.init = aac_encode_init, .init = aac_encode_init,
.encode2 = aac_encode_frame, .encode2 = aac_encode_frame,

@ -106,7 +106,7 @@ static av_cold int aasc_decode_end(AVCodecContext *avctx)
AVCodec ff_aasc_decoder = { AVCodec ff_aasc_decoder = {
.name = "aasc", .name = "aasc",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_AASC, .id = AV_CODEC_ID_AASC,
.priv_data_size = sizeof(AascContext), .priv_data_size = sizeof(AascContext),
.init = aasc_decode_init, .init = aasc_decode_init,
.close = aasc_decode_end, .close = aasc_decode_end,

@ -167,9 +167,9 @@ static int ac3_sync(uint64_t state, AACAC3ParseContext *hdr_info,
if (hdr.bitstream_mode == 0x7 && hdr.channels > 1) if (hdr.bitstream_mode == 0x7 && hdr.channels > 1)
hdr_info->service_type = AV_AUDIO_SERVICE_TYPE_KARAOKE; hdr_info->service_type = AV_AUDIO_SERVICE_TYPE_KARAOKE;
if(hdr.bitstream_id>10) if(hdr.bitstream_id>10)
hdr_info->codec_id = CODEC_ID_EAC3; hdr_info->codec_id = AV_CODEC_ID_EAC3;
else if (hdr_info->codec_id == CODEC_ID_NONE) else if (hdr_info->codec_id == AV_CODEC_ID_NONE)
hdr_info->codec_id = CODEC_ID_AC3; hdr_info->codec_id = AV_CODEC_ID_AC3;
*need_next_header = (hdr.frame_type != EAC3_FRAME_TYPE_AC3_CONVERT); *need_next_header = (hdr.frame_type != EAC3_FRAME_TYPE_AC3_CONVERT);
*new_frame_start = (hdr.frame_type != EAC3_FRAME_TYPE_DEPENDENT); *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 = { 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), .priv_data_size = sizeof(AACAC3ParseContext),
.parser_init = ac3_parse_init, .parser_init = ac3_parse_init,
.parser_parse = ff_aac_ac3_parse, .parser_parse = ff_aac_ac3_parse,

@ -1460,7 +1460,7 @@ static const AVClass ac3_decoder_class = {
AVCodec ff_ac3_decoder = { AVCodec ff_ac3_decoder = {
.name = "ac3", .name = "ac3",
.type = AVMEDIA_TYPE_AUDIO, .type = AVMEDIA_TYPE_AUDIO,
.id = CODEC_ID_AC3, .id = AV_CODEC_ID_AC3,
.priv_data_size = sizeof (AC3DecodeContext), .priv_data_size = sizeof (AC3DecodeContext),
.init = ac3_decode_init, .init = ac3_decode_init,
.close = ac3_decode_end, .close = ac3_decode_end,
@ -1484,7 +1484,7 @@ static const AVClass eac3_decoder_class = {
AVCodec ff_eac3_decoder = { AVCodec ff_eac3_decoder = {
.name = "eac3", .name = "eac3",
.type = AVMEDIA_TYPE_AUDIO, .type = AVMEDIA_TYPE_AUDIO,
.id = CODEC_ID_EAC3, .id = AV_CODEC_ID_EAC3,
.priv_data_size = sizeof (AC3DecodeContext), .priv_data_size = sizeof (AC3DecodeContext),
.init = ac3_decode_init, .init = ac3_decode_init,
.close = ac3_decode_end, .close = ac3_decode_end,

@ -2430,7 +2430,7 @@ av_cold int ff_ac3_encode_init(AVCodecContext *avctx)
s->avctx = 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(); ff_ac3_common_init();

@ -144,7 +144,7 @@ static av_cold int ac3_fixed_encode_init(AVCodecContext *avctx)
AVCodec ff_ac3_fixed_encoder = { AVCodec ff_ac3_fixed_encoder = {
.name = "ac3_fixed", .name = "ac3_fixed",
.type = AVMEDIA_TYPE_AUDIO, .type = AVMEDIA_TYPE_AUDIO,
.id = CODEC_ID_AC3, .id = AV_CODEC_ID_AC3,
.priv_data_size = sizeof(AC3EncodeContext), .priv_data_size = sizeof(AC3EncodeContext),
.init = ac3_fixed_encode_init, .init = ac3_fixed_encode_init,
.encode2 = ff_ac3_fixed_encode_frame, .encode2 = ff_ac3_fixed_encode_frame,

@ -143,7 +143,7 @@ static CoefType calc_cpl_coord(CoefSumType energy_ch, CoefSumType energy_cpl)
AVCodec ff_ac3_encoder = { AVCodec ff_ac3_encoder = {
.name = "ac3", .name = "ac3",
.type = AVMEDIA_TYPE_AUDIO, .type = AVMEDIA_TYPE_AUDIO,
.id = CODEC_ID_AC3, .id = AV_CODEC_ID_AC3,
.priv_data_size = sizeof(AC3EncodeContext), .priv_data_size = sizeof(AC3EncodeContext),
.init = ff_ac3_encode_init, .init = ff_ac3_encode_init,
.encode2 = ff_ac3_float_encode_frame, .encode2 = ff_ac3_float_encode_frame,

@ -96,13 +96,13 @@ static av_cold int adpcm_decode_init(AVCodecContext * avctx)
unsigned int max_channels = 2; unsigned int max_channels = 2;
switch(avctx->codec->id) { switch(avctx->codec->id) {
case CODEC_ID_ADPCM_EA: case AV_CODEC_ID_ADPCM_EA:
min_channels = 2; min_channels = 2;
break; break;
case CODEC_ID_ADPCM_EA_R1: case AV_CODEC_ID_ADPCM_EA_R1:
case CODEC_ID_ADPCM_EA_R2: case AV_CODEC_ID_ADPCM_EA_R2:
case CODEC_ID_ADPCM_EA_R3: case AV_CODEC_ID_ADPCM_EA_R3:
case CODEC_ID_ADPCM_EA_XAS: case AV_CODEC_ID_ADPCM_EA_XAS:
max_channels = 6; max_channels = 6;
break; break;
} }
@ -112,22 +112,22 @@ static av_cold int adpcm_decode_init(AVCodecContext * avctx)
} }
switch(avctx->codec->id) { switch(avctx->codec->id) {
case CODEC_ID_ADPCM_CT: case AV_CODEC_ID_ADPCM_CT:
c->status[0].step = c->status[1].step = 511; c->status[0].step = c->status[1].step = 511;
break; break;
case CODEC_ID_ADPCM_IMA_WAV: case AV_CODEC_ID_ADPCM_IMA_WAV:
if (avctx->bits_per_coded_sample != 4) { if (avctx->bits_per_coded_sample != 4) {
av_log(avctx, AV_LOG_ERROR, "Only 4-bit ADPCM IMA WAV files are supported\n"); av_log(avctx, AV_LOG_ERROR, "Only 4-bit ADPCM IMA WAV files are supported\n");
return -1; return -1;
} }
break; break;
case CODEC_ID_ADPCM_IMA_APC: case AV_CODEC_ID_ADPCM_IMA_APC:
if (avctx->extradata && avctx->extradata_size >= 8) { if (avctx->extradata && avctx->extradata_size >= 8) {
c->status[0].predictor = AV_RL32(avctx->extradata); c->status[0].predictor = AV_RL32(avctx->extradata);
c->status[1].predictor = AV_RL32(avctx->extradata + 4); c->status[1].predictor = AV_RL32(avctx->extradata + 4);
} }
break; break;
case CODEC_ID_ADPCM_IMA_WS: case AV_CODEC_ID_ADPCM_IMA_WS:
if (avctx->extradata && avctx->extradata_size >= 2) if (avctx->extradata && avctx->extradata_size >= 2)
c->vqa_version = AV_RL16(avctx->extradata); c->vqa_version = AV_RL16(avctx->extradata);
break; break;
@ -423,22 +423,22 @@ static int get_nb_samples(AVCodecContext *avctx, GetByteContext *gb,
switch (avctx->codec->id) { switch (avctx->codec->id) {
/* constant, only check buf_size */ /* constant, only check buf_size */
case CODEC_ID_ADPCM_EA_XAS: case AV_CODEC_ID_ADPCM_EA_XAS:
if (buf_size < 76 * ch) if (buf_size < 76 * ch)
return 0; return 0;
nb_samples = 128; nb_samples = 128;
break; break;
case CODEC_ID_ADPCM_IMA_QT: case AV_CODEC_ID_ADPCM_IMA_QT:
if (buf_size < 34 * ch) if (buf_size < 34 * ch)
return 0; return 0;
nb_samples = 64; nb_samples = 64;
break; break;
/* simple 4-bit adpcm */ /* simple 4-bit adpcm */
case CODEC_ID_ADPCM_CT: case AV_CODEC_ID_ADPCM_CT:
case CODEC_ID_ADPCM_IMA_APC: case AV_CODEC_ID_ADPCM_IMA_APC:
case CODEC_ID_ADPCM_IMA_EA_SEAD: case AV_CODEC_ID_ADPCM_IMA_EA_SEAD:
case CODEC_ID_ADPCM_IMA_WS: case AV_CODEC_ID_ADPCM_IMA_WS:
case CODEC_ID_ADPCM_YAMAHA: case AV_CODEC_ID_ADPCM_YAMAHA:
nb_samples = buf_size * 2 / ch; nb_samples = buf_size * 2 / ch;
break; break;
} }
@ -448,46 +448,46 @@ static int get_nb_samples(AVCodecContext *avctx, GetByteContext *gb,
/* simple 4-bit adpcm, with header */ /* simple 4-bit adpcm, with header */
header_size = 0; header_size = 0;
switch (avctx->codec->id) { switch (avctx->codec->id) {
case CODEC_ID_ADPCM_4XM: case AV_CODEC_ID_ADPCM_4XM:
case CODEC_ID_ADPCM_IMA_ISS: header_size = 4 * ch; break; case AV_CODEC_ID_ADPCM_IMA_ISS: header_size = 4 * ch; break;
case CODEC_ID_ADPCM_IMA_AMV: header_size = 8; break; case AV_CODEC_ID_ADPCM_IMA_AMV: header_size = 8; break;
case CODEC_ID_ADPCM_IMA_SMJPEG: header_size = 4; break; case AV_CODEC_ID_ADPCM_IMA_SMJPEG: header_size = 4; break;
} }
if (header_size > 0) if (header_size > 0)
return (buf_size - header_size) * 2 / ch; return (buf_size - header_size) * 2 / ch;
/* more complex formats */ /* more complex formats */
switch (avctx->codec->id) { switch (avctx->codec->id) {
case CODEC_ID_ADPCM_EA: case AV_CODEC_ID_ADPCM_EA:
has_coded_samples = 1; has_coded_samples = 1;
*coded_samples = bytestream2_get_le32(gb); *coded_samples = bytestream2_get_le32(gb);
*coded_samples -= *coded_samples % 28; *coded_samples -= *coded_samples % 28;
nb_samples = (buf_size - 12) / 30 * 28; nb_samples = (buf_size - 12) / 30 * 28;
break; break;
case CODEC_ID_ADPCM_IMA_EA_EACS: case AV_CODEC_ID_ADPCM_IMA_EA_EACS:
has_coded_samples = 1; has_coded_samples = 1;
*coded_samples = bytestream2_get_le32(gb); *coded_samples = bytestream2_get_le32(gb);
nb_samples = (buf_size - (4 + 8 * ch)) * 2 / ch; nb_samples = (buf_size - (4 + 8 * ch)) * 2 / ch;
break; break;
case CODEC_ID_ADPCM_EA_MAXIS_XA: case AV_CODEC_ID_ADPCM_EA_MAXIS_XA:
nb_samples = (buf_size - ch) / ch * 2; nb_samples = (buf_size - ch) / ch * 2;
break; break;
case CODEC_ID_ADPCM_EA_R1: case AV_CODEC_ID_ADPCM_EA_R1:
case CODEC_ID_ADPCM_EA_R2: case AV_CODEC_ID_ADPCM_EA_R2:
case CODEC_ID_ADPCM_EA_R3: case AV_CODEC_ID_ADPCM_EA_R3:
/* maximum number of samples */ /* maximum number of samples */
/* has internal offsets and a per-frame switch to signal raw 16-bit */ /* has internal offsets and a per-frame switch to signal raw 16-bit */
has_coded_samples = 1; has_coded_samples = 1;
switch (avctx->codec->id) { switch (avctx->codec->id) {
case CODEC_ID_ADPCM_EA_R1: case AV_CODEC_ID_ADPCM_EA_R1:
header_size = 4 + 9 * ch; header_size = 4 + 9 * ch;
*coded_samples = bytestream2_get_le32(gb); *coded_samples = bytestream2_get_le32(gb);
break; break;
case CODEC_ID_ADPCM_EA_R2: case AV_CODEC_ID_ADPCM_EA_R2:
header_size = 4 + 5 * ch; header_size = 4 + 5 * ch;
*coded_samples = bytestream2_get_le32(gb); *coded_samples = bytestream2_get_le32(gb);
break; break;
case CODEC_ID_ADPCM_EA_R3: case AV_CODEC_ID_ADPCM_EA_R3:
header_size = 4 + 5 * ch; header_size = 4 + 5 * ch;
*coded_samples = bytestream2_get_be32(gb); *coded_samples = bytestream2_get_be32(gb);
break; break;
@ -496,35 +496,35 @@ static int get_nb_samples(AVCodecContext *avctx, GetByteContext *gb,
nb_samples = (buf_size - header_size) * 2 / ch; nb_samples = (buf_size - header_size) * 2 / ch;
nb_samples -= nb_samples % 28; nb_samples -= nb_samples % 28;
break; break;
case CODEC_ID_ADPCM_IMA_DK3: case AV_CODEC_ID_ADPCM_IMA_DK3:
if (avctx->block_align > 0) if (avctx->block_align > 0)
buf_size = FFMIN(buf_size, avctx->block_align); buf_size = FFMIN(buf_size, avctx->block_align);
nb_samples = ((buf_size - 16) * 2 / 3 * 4) / ch; nb_samples = ((buf_size - 16) * 2 / 3 * 4) / ch;
break; break;
case CODEC_ID_ADPCM_IMA_DK4: case AV_CODEC_ID_ADPCM_IMA_DK4:
if (avctx->block_align > 0) if (avctx->block_align > 0)
buf_size = FFMIN(buf_size, avctx->block_align); buf_size = FFMIN(buf_size, avctx->block_align);
nb_samples = 1 + (buf_size - 4 * ch) * 2 / ch; nb_samples = 1 + (buf_size - 4 * ch) * 2 / ch;
break; break;
case CODEC_ID_ADPCM_IMA_WAV: case AV_CODEC_ID_ADPCM_IMA_WAV:
if (avctx->block_align > 0) if (avctx->block_align > 0)
buf_size = FFMIN(buf_size, avctx->block_align); buf_size = FFMIN(buf_size, avctx->block_align);
nb_samples = 1 + (buf_size - 4 * ch) / (4 * ch) * 8; nb_samples = 1 + (buf_size - 4 * ch) / (4 * ch) * 8;
break; break;
case CODEC_ID_ADPCM_MS: case AV_CODEC_ID_ADPCM_MS:
if (avctx->block_align > 0) if (avctx->block_align > 0)
buf_size = FFMIN(buf_size, avctx->block_align); buf_size = FFMIN(buf_size, avctx->block_align);
nb_samples = 2 + (buf_size - 7 * ch) * 2 / ch; nb_samples = 2 + (buf_size - 7 * ch) * 2 / ch;
break; break;
case CODEC_ID_ADPCM_SBPRO_2: case AV_CODEC_ID_ADPCM_SBPRO_2:
case CODEC_ID_ADPCM_SBPRO_3: case AV_CODEC_ID_ADPCM_SBPRO_3:
case CODEC_ID_ADPCM_SBPRO_4: case AV_CODEC_ID_ADPCM_SBPRO_4:
{ {
int samples_per_byte; int samples_per_byte;
switch (avctx->codec->id) { switch (avctx->codec->id) {
case CODEC_ID_ADPCM_SBPRO_2: samples_per_byte = 4; break; case AV_CODEC_ID_ADPCM_SBPRO_2: samples_per_byte = 4; break;
case CODEC_ID_ADPCM_SBPRO_3: samples_per_byte = 3; break; case AV_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_4: samples_per_byte = 2; break;
} }
if (!s->status[0].step_index) { if (!s->status[0].step_index) {
nb_samples++; nb_samples++;
@ -533,7 +533,7 @@ static int get_nb_samples(AVCodecContext *avctx, GetByteContext *gb,
nb_samples += buf_size * samples_per_byte / ch; nb_samples += buf_size * samples_per_byte / ch;
break; break;
} }
case CODEC_ID_ADPCM_SWF: case AV_CODEC_ID_ADPCM_SWF:
{ {
int buf_bits = buf_size * 8 - 2; int buf_bits = buf_size * 8 - 2;
int nbits = (bytestream2_get_byte(gb) >> 6) + 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); nb_samples += 1 + (bits_left - block_hdr_size) / (nbits * ch);
break; break;
} }
case CODEC_ID_ADPCM_THP: case AV_CODEC_ID_ADPCM_THP:
has_coded_samples = 1; has_coded_samples = 1;
bytestream2_skip(gb, 4); // channel size bytestream2_skip(gb, 4); // channel size
*coded_samples = bytestream2_get_be32(gb); *coded_samples = bytestream2_get_be32(gb);
*coded_samples -= *coded_samples % 14; *coded_samples -= *coded_samples % 14;
nb_samples = (buf_size - 80) / (8 * ch) * 14; nb_samples = (buf_size - 80) / (8 * ch) * 14;
break; break;
case CODEC_ID_ADPCM_XA: case AV_CODEC_ID_ADPCM_XA:
nb_samples = (buf_size / 128) * 224 / ch; nb_samples = (buf_size / 128) * 224 / ch;
break; break;
} }
@ -605,7 +605,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
st = avctx->channels == 2 ? 1 : 0; st = avctx->channels == 2 ? 1 : 0;
switch(avctx->codec->id) { 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). /* In QuickTime, IMA is encoded by chunks of 34 bytes (=64 samples).
Channel data is interleaved per-chunk. */ Channel data is interleaved per-chunk. */
for (channel = 0; channel < avctx->channels; channel++) { for (channel = 0; channel < avctx->channels; channel++) {
@ -648,7 +648,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
} }
} }
break; break;
case CODEC_ID_ADPCM_IMA_WAV: case AV_CODEC_ID_ADPCM_IMA_WAV:
for(i=0; i<avctx->channels; i++){ for(i=0; i<avctx->channels; i++){
cs = &(c->status[i]); cs = &(c->status[i]);
cs->predictor = *samples++ = sign_extend(bytestream2_get_le16u(&gb), 16); 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; samples += 7 * avctx->channels;
} }
break; break;
case CODEC_ID_ADPCM_4XM: case AV_CODEC_ID_ADPCM_4XM:
for (i = 0; i < avctx->channels; i++) for (i = 0; i < avctx->channels; i++)
c->status[i].predictor = sign_extend(bytestream2_get_le16u(&gb), 16); 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; break;
case CODEC_ID_ADPCM_MS: case AV_CODEC_ID_ADPCM_MS:
{ {
int block_predictor; int block_predictor;
@ -744,7 +744,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
} }
break; break;
} }
case CODEC_ID_ADPCM_IMA_DK4: case AV_CODEC_ID_ADPCM_IMA_DK4:
for (channel = 0; channel < avctx->channels; channel++) { for (channel = 0; channel < avctx->channels; channel++) {
cs = &c->status[channel]; cs = &c->status[channel];
cs->predictor = *samples++ = sign_extend(bytestream2_get_le16u(&gb), 16); 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); *samples++ = adpcm_ima_expand_nibble(&c->status[st], v & 0x0F, 3);
} }
break; break;
case CODEC_ID_ADPCM_IMA_DK3: case AV_CODEC_ID_ADPCM_IMA_DK3:
{ {
int last_byte = 0; int last_byte = 0;
int nibble; int nibble;
@ -822,7 +822,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
} }
break; break;
} }
case CODEC_ID_ADPCM_IMA_ISS: case AV_CODEC_ID_ADPCM_IMA_ISS:
for (channel = 0; channel < avctx->channels; channel++) { for (channel = 0; channel < avctx->channels; channel++) {
cs = &c->status[channel]; cs = &c->status[channel];
cs->predictor = sign_extend(bytestream2_get_le16u(&gb), 16); 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); *samples++ = adpcm_ima_expand_nibble(&c->status[st], v2, 3);
} }
break; break;
case CODEC_ID_ADPCM_IMA_APC: case AV_CODEC_ID_ADPCM_IMA_APC:
while (bytestream2_get_bytes_left(&gb) > 0) { while (bytestream2_get_bytes_left(&gb) > 0) {
int v = bytestream2_get_byteu(&gb); int v = bytestream2_get_byteu(&gb);
*samples++ = adpcm_ima_expand_nibble(&c->status[0], v >> 4 , 3); *samples++ = adpcm_ima_expand_nibble(&c->status[0], v >> 4 , 3);
*samples++ = adpcm_ima_expand_nibble(&c->status[st], v & 0x0F, 3); *samples++ = adpcm_ima_expand_nibble(&c->status[st], v & 0x0F, 3);
} }
break; break;
case CODEC_ID_ADPCM_IMA_WS: case AV_CODEC_ID_ADPCM_IMA_WS:
if (c->vqa_version == 3) { if (c->vqa_version == 3) {
for (channel = 0; channel < avctx->channels; channel++) { for (channel = 0; channel < avctx->channels; channel++) {
int16_t *smp = samples + 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); bytestream2_seek(&gb, 0, SEEK_END);
break; break;
case CODEC_ID_ADPCM_XA: case AV_CODEC_ID_ADPCM_XA:
while (bytestream2_get_bytes_left(&gb) >= 128) { while (bytestream2_get_bytes_left(&gb) >= 128) {
if ((ret = xa_decode(avctx, samples, buf + bytestream2_tell(&gb), &c->status[0], if ((ret = xa_decode(avctx, samples, buf + bytestream2_tell(&gb), &c->status[0],
&c->status[1], avctx->channels)) < 0) &c->status[1], avctx->channels)) < 0)
@ -890,7 +890,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
samples += 28 * 8; samples += 28 * 8;
} }
break; break;
case CODEC_ID_ADPCM_IMA_EA_EACS: case AV_CODEC_ID_ADPCM_IMA_EA_EACS:
for (i=0; i<=st; i++) { for (i=0; i<=st; i++) {
c->status[i].step_index = bytestream2_get_le32u(&gb); c->status[i].step_index = bytestream2_get_le32u(&gb);
if (c->status[i].step_index > 88u) { 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); *samples++ = adpcm_ima_expand_nibble(&c->status[st], byte & 0x0F, 3);
} }
break; 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--) { for (n = nb_samples >> (1 - st); n > 0; n--) {
int byte = bytestream2_get_byteu(&gb); int byte = bytestream2_get_byteu(&gb);
*samples++ = adpcm_ima_expand_nibble(&c->status[0], byte >> 4, 6); *samples++ = adpcm_ima_expand_nibble(&c->status[0], byte >> 4, 6);
*samples++ = adpcm_ima_expand_nibble(&c->status[st], byte & 0x0F, 6); *samples++ = adpcm_ima_expand_nibble(&c->status[st], byte & 0x0F, 6);
} }
break; break;
case CODEC_ID_ADPCM_EA: case AV_CODEC_ID_ADPCM_EA:
{ {
int previous_left_sample, previous_right_sample; int previous_left_sample, previous_right_sample;
int current_left_sample, current_right_sample; int current_left_sample, current_right_sample;
@ -967,7 +967,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
break; break;
} }
case CODEC_ID_ADPCM_EA_MAXIS_XA: case AV_CODEC_ID_ADPCM_EA_MAXIS_XA:
{ {
int coeff[2][2], shift[2]; 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); bytestream2_seek(&gb, 0, SEEK_END);
break; break;
} }
case CODEC_ID_ADPCM_EA_R1: case AV_CODEC_ID_ADPCM_EA_R1:
case CODEC_ID_ADPCM_EA_R2: case AV_CODEC_ID_ADPCM_EA_R2:
case CODEC_ID_ADPCM_EA_R3: { case AV_CODEC_ID_ADPCM_EA_R3: {
/* channel numbering /* channel numbering
2chan: 0=fl, 1=fr 2chan: 0=fl, 1=fr
4chan: 0=fl, 1=rl, 2=fr, 3=rr 4chan: 0=fl, 1=rl, 2=fr, 3=rr
6chan: 0=fl, 1=c, 2=fr, 3=rl, 4=rr, 5=sub */ 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 previous_sample, current_sample, next_sample;
int coeff1, coeff2; int coeff1, coeff2;
int shift; int shift;
@ -1022,7 +1022,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
bytestream2_seek(&gb, offsets[channel], SEEK_SET); bytestream2_seek(&gb, offsets[channel], SEEK_SET);
samplesC = samples + channel; 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); current_sample = sign_extend(bytestream2_get_le16(&gb), 16);
previous_sample = sign_extend(bytestream2_get_le16(&gb), 16); previous_sample = sign_extend(bytestream2_get_le16(&gb), 16);
} else { } else {
@ -1071,7 +1071,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
count = FFMAX(count, count1); 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].predictor = current_sample;
c->status[channel].prev_sample = previous_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); bytestream2_seek(&gb, 0, SEEK_END);
break; break;
} }
case CODEC_ID_ADPCM_EA_XAS: case AV_CODEC_ID_ADPCM_EA_XAS:
for (channel=0; channel<avctx->channels; channel++) { for (channel=0; channel<avctx->channels; channel++) {
int coeff[2][4], shift[4]; int coeff[2][4], shift[4];
short *s2, *s = &samples[channel]; short *s2, *s = &samples[channel];
@ -1110,9 +1110,9 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
} }
} }
break; break;
case CODEC_ID_ADPCM_IMA_AMV: case AV_CODEC_ID_ADPCM_IMA_AMV:
case CODEC_ID_ADPCM_IMA_SMJPEG: case AV_CODEC_ID_ADPCM_IMA_SMJPEG:
if (avctx->codec->id == CODEC_ID_ADPCM_IMA_AMV) { if (avctx->codec->id == AV_CODEC_ID_ADPCM_IMA_AMV) {
c->status[0].predictor = sign_extend(bytestream2_get_le16u(&gb), 16); c->status[0].predictor = sign_extend(bytestream2_get_le16u(&gb), 16);
c->status[0].step_index = bytestream2_get_le16u(&gb); c->status[0].step_index = bytestream2_get_le16u(&gb);
bytestream2_skipu(&gb, 4); 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--) { for (n = nb_samples >> (1 - st); n > 0; n--) {
int hi, lo, v = bytestream2_get_byteu(&gb); 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; hi = v & 0x0F;
lo = v >> 4; lo = v >> 4;
} else { } else {
@ -1142,16 +1142,16 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
*samples++ = adpcm_ima_expand_nibble(&c->status[0], hi, 3); *samples++ = adpcm_ima_expand_nibble(&c->status[0], hi, 3);
} }
break; break;
case CODEC_ID_ADPCM_CT: case AV_CODEC_ID_ADPCM_CT:
for (n = nb_samples >> (1 - st); n > 0; n--) { for (n = nb_samples >> (1 - st); n > 0; n--) {
int v = bytestream2_get_byteu(&gb); int v = bytestream2_get_byteu(&gb);
*samples++ = adpcm_ct_expand_nibble(&c->status[0 ], v >> 4 ); *samples++ = adpcm_ct_expand_nibble(&c->status[0 ], v >> 4 );
*samples++ = adpcm_ct_expand_nibble(&c->status[st], v & 0x0F); *samples++ = adpcm_ct_expand_nibble(&c->status[st], v & 0x0F);
} }
break; break;
case CODEC_ID_ADPCM_SBPRO_4: case AV_CODEC_ID_ADPCM_SBPRO_4:
case CODEC_ID_ADPCM_SBPRO_3: case AV_CODEC_ID_ADPCM_SBPRO_3:
case CODEC_ID_ADPCM_SBPRO_2: case AV_CODEC_ID_ADPCM_SBPRO_2:
if (!c->status[0].step_index) { if (!c->status[0].step_index) {
/* the first byte is a raw sample */ /* the first byte is a raw sample */
*samples++ = 128 * (bytestream2_get_byteu(&gb) - 0x80); *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; c->status[0].step_index = 1;
nb_samples--; 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--) { for (n = nb_samples >> (1 - st); n > 0; n--) {
int byte = bytestream2_get_byteu(&gb); int byte = bytestream2_get_byteu(&gb);
*samples++ = adpcm_sbpro_expand_nibble(&c->status[0], *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], *samples++ = adpcm_sbpro_expand_nibble(&c->status[st],
byte & 0x0F, 4, 0); 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--) { for (n = nb_samples / 3; n > 0; n--) {
int byte = bytestream2_get_byteu(&gb); int byte = bytestream2_get_byteu(&gb);
*samples++ = adpcm_sbpro_expand_nibble(&c->status[0], *samples++ = adpcm_sbpro_expand_nibble(&c->status[0],
@ -1192,18 +1192,18 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
} }
} }
break; break;
case CODEC_ID_ADPCM_SWF: case AV_CODEC_ID_ADPCM_SWF:
adpcm_swf_decode(avctx, buf, buf_size, samples); adpcm_swf_decode(avctx, buf, buf_size, samples);
bytestream2_seek(&gb, 0, SEEK_END); bytestream2_seek(&gb, 0, SEEK_END);
break; break;
case CODEC_ID_ADPCM_YAMAHA: case AV_CODEC_ID_ADPCM_YAMAHA:
for (n = nb_samples >> (1 - st); n > 0; n--) { for (n = nb_samples >> (1 - st); n > 0; n--) {
int v = bytestream2_get_byteu(&gb); int v = bytestream2_get_byteu(&gb);
*samples++ = adpcm_yamaha_expand_nibble(&c->status[0 ], v & 0x0F); *samples++ = adpcm_yamaha_expand_nibble(&c->status[0 ], v & 0x0F);
*samples++ = adpcm_yamaha_expand_nibble(&c->status[st], v >> 4 ); *samples++ = adpcm_yamaha_expand_nibble(&c->status[st], v >> 4 );
} }
break; break;
case CODEC_ID_ADPCM_THP: case AV_CODEC_ID_ADPCM_THP:
{ {
int table[2][16]; int table[2][16];
int prev[2][2]; 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. */ /* 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(AV_CODEC_ID_ADPCM_4XM, adpcm_4xm, "ADPCM 4X Movie");
ADPCM_DECODER(CODEC_ID_ADPCM_CT, adpcm_ct, "ADPCM Creative Technology"); ADPCM_DECODER(AV_CODEC_ID_ADPCM_CT, adpcm_ct, "ADPCM Creative Technology");
ADPCM_DECODER(CODEC_ID_ADPCM_EA, adpcm_ea, "ADPCM Electronic Arts"); ADPCM_DECODER(AV_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(AV_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(AV_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(AV_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(AV_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(AV_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(AV_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(AV_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(AV_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(AV_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(AV_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(AV_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(AV_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(AV_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(AV_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(AV_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(AV_CODEC_ID_ADPCM_IMA_WS, adpcm_ima_ws, "ADPCM IMA Westwood");
ADPCM_DECODER(CODEC_ID_ADPCM_MS, adpcm_ms, "ADPCM Microsoft"); ADPCM_DECODER(AV_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(AV_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(AV_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(AV_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(AV_CODEC_ID_ADPCM_SWF, adpcm_swf, "ADPCM Shockwave Flash");
ADPCM_DECODER(CODEC_ID_ADPCM_THP, adpcm_thp, "ADPCM Nintendo Gamecube THP"); ADPCM_DECODER(AV_CODEC_ID_ADPCM_THP, adpcm_thp, "ADPCM Nintendo Gamecube THP");
ADPCM_DECODER(CODEC_ID_ADPCM_XA, adpcm_xa, "ADPCM CDROM XA"); ADPCM_DECODER(AV_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_YAMAHA, adpcm_yamaha, "ADPCM Yamaha");

@ -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); avctx->bits_per_coded_sample = av_get_bits_per_sample(avctx->codec->id);
switch (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 /* each 16 bits sample gives one nibble
and we have 4 bytes per channel overhead */ and we have 4 bytes per channel overhead */
avctx->frame_size = (BLKSIZE - 4 * avctx->channels) * 8 / 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 :-( */ have to buffer the samples :-( */
avctx->block_align = BLKSIZE; avctx->block_align = BLKSIZE;
break; break;
case CODEC_ID_ADPCM_IMA_QT: case AV_CODEC_ID_ADPCM_IMA_QT:
avctx->frame_size = 64; avctx->frame_size = 64;
avctx->block_align = 34 * avctx->channels; avctx->block_align = 34 * avctx->channels;
break; break;
case CODEC_ID_ADPCM_MS: case AV_CODEC_ID_ADPCM_MS:
/* each 16 bits sample gives one nibble /* each 16 bits sample gives one nibble
and we have 7 bytes per channel overhead */ and we have 7 bytes per channel overhead */
avctx->frame_size = (BLKSIZE - 7 * avctx->channels) * 2 / 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); bytestream_put_le16(&extradata, ff_adpcm_AdaptCoeff2[i] * 4);
} }
break; break;
case CODEC_ID_ADPCM_YAMAHA: case AV_CODEC_ID_ADPCM_YAMAHA:
avctx->frame_size = BLKSIZE * 2 / avctx->channels; avctx->frame_size = BLKSIZE * 2 / avctx->channels;
avctx->block_align = BLKSIZE; avctx->block_align = BLKSIZE;
break; break;
case CODEC_ID_ADPCM_SWF: case AV_CODEC_ID_ADPCM_SWF:
if (avctx->sample_rate != 11025 && if (avctx->sample_rate != 11025 &&
avctx->sample_rate != 22050 && avctx->sample_rate != 22050 &&
avctx->sample_rate != 44100) { avctx->sample_rate != 44100) {
@ -294,13 +294,13 @@ static void adpcm_compress_trellis(AVCodecContext *avctx,
nodes[0]->step = c->step_index; nodes[0]->step = c->step_index;
nodes[0]->sample1 = c->sample1; nodes[0]->sample1 = c->sample1;
nodes[0]->sample2 = c->sample2; nodes[0]->sample2 = c->sample2;
if (version == CODEC_ID_ADPCM_IMA_WAV || if (version == AV_CODEC_ID_ADPCM_IMA_WAV ||
version == CODEC_ID_ADPCM_IMA_QT || version == AV_CODEC_ID_ADPCM_IMA_QT ||
version == CODEC_ID_ADPCM_SWF) version == AV_CODEC_ID_ADPCM_SWF)
nodes[0]->sample1 = c->prev_sample; nodes[0]->sample1 = c->prev_sample;
if (version == CODEC_ID_ADPCM_MS) if (version == AV_CODEC_ID_ADPCM_MS)
nodes[0]->step = c->idelta; nodes[0]->step = c->idelta;
if (version == CODEC_ID_ADPCM_YAMAHA) { if (version == AV_CODEC_ID_ADPCM_YAMAHA) {
if (c->step == 0) { if (c->step == 0) {
nodes[0]->step = 127; nodes[0]->step = 127;
nodes[0]->sample1 = 0; 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 range = (j < frontier / 2) ? 1 : 0;
const int step = nodes[j]->step; const int step = nodes[j]->step;
int nidx; int nidx;
if (version == CODEC_ID_ADPCM_MS) { if (version == AV_CODEC_ID_ADPCM_MS) {
const int predictor = ((nodes[j]->sample1 * c->coeff1) + const int predictor = ((nodes[j]->sample1 * c->coeff1) +
(nodes[j]->sample2 * c->coeff2)) / 64; (nodes[j]->sample2 * c->coeff2)) / 64;
const int div = (sample - predictor) / step; const int div = (sample - predictor) / step;
@ -398,9 +398,9 @@ static void adpcm_compress_trellis(AVCodecContext *avctx,
STORE_NODE(ms, FFMAX(16, STORE_NODE(ms, FFMAX(16,
(ff_adpcm_AdaptationTable[nibble] * step) >> 8)); (ff_adpcm_AdaptationTable[nibble] * step) >> 8));
} }
} else if (version == CODEC_ID_ADPCM_IMA_WAV || } else if (version == AV_CODEC_ID_ADPCM_IMA_WAV ||
version == CODEC_ID_ADPCM_IMA_QT || version == AV_CODEC_ID_ADPCM_IMA_QT ||
version == CODEC_ID_ADPCM_SWF) { version == AV_CODEC_ID_ADPCM_SWF) {
#define LOOP_NODES(NAME, STEP_TABLE, STEP_INDEX)\ #define LOOP_NODES(NAME, STEP_TABLE, STEP_INDEX)\
const int predictor = nodes[j]->sample1;\ const int predictor = nodes[j]->sample1;\
const int div = (sample - predictor) * 4 / STEP_TABLE;\ 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], LOOP_NODES(ima, ff_adpcm_step_table[step],
av_clip(step + ff_adpcm_index_table[nibble], 0, 88)); 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, LOOP_NODES(yamaha, step,
av_clip((step * ff_adpcm_yamaha_indexscale[nibble]) >> 8, av_clip((step * ff_adpcm_yamaha_indexscale[nibble]) >> 8,
127, 24567)); 127, 24567));
@ -487,7 +487,7 @@ static int adpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
samples = (const int16_t *)frame->data[0]; samples = (const int16_t *)frame->data[0];
st = avctx->channels == 2; 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; pkt_size = (2 + avctx->channels * (22 + 4 * (frame->nb_samples - 1)) + 7) / 8;
else else
pkt_size = avctx->block_align; pkt_size = avctx->block_align;
@ -498,7 +498,7 @@ static int adpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
dst = avpkt->data; dst = avpkt->data;
switch(avctx->codec->id) { switch(avctx->codec->id) {
case CODEC_ID_ADPCM_IMA_WAV: case AV_CODEC_ID_ADPCM_IMA_WAV:
n = frame->nb_samples / 8; n = frame->nb_samples / 8;
c->status[0].prev_sample = samples[0]; c->status[0].prev_sample = samples[0];
/* c->status[0].step_index = 0; /* c->status[0].step_index = 0;
@ -563,7 +563,7 @@ static int adpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
} }
} }
break; break;
case CODEC_ID_ADPCM_IMA_QT: case AV_CODEC_ID_ADPCM_IMA_QT:
{ {
int ch, i; int ch, i;
PutBitContext pb; PutBitContext pb;
@ -593,7 +593,7 @@ static int adpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
flush_put_bits(&pb); flush_put_bits(&pb);
break; break;
} }
case CODEC_ID_ADPCM_SWF: case AV_CODEC_ID_ADPCM_SWF:
{ {
int i; int i;
PutBitContext pb; PutBitContext pb;
@ -637,7 +637,7 @@ static int adpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
flush_put_bits(&pb); flush_put_bits(&pb);
break; break;
} }
case CODEC_ID_ADPCM_MS: case AV_CODEC_ID_ADPCM_MS:
for (i = 0; i < avctx->channels; i++) { for (i = 0; i < avctx->channels; i++) {
int predictor = 0; int predictor = 0;
*dst++ = predictor; *dst++ = predictor;
@ -681,7 +681,7 @@ static int adpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
} }
} }
break; break;
case CODEC_ID_ADPCM_YAMAHA: case AV_CODEC_ID_ADPCM_YAMAHA:
n = frame->nb_samples / 2; n = frame->nb_samples / 2;
if (avctx->trellis > 0) { if (avctx->trellis > 0) {
FF_ALLOC_OR_GOTO(avctx, buf, 2 * n * 2, error); 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_), \ .long_name = NULL_IF_CONFIG_SMALL(long_name_), \
} }
ADPCM_ENCODER(CODEC_ID_ADPCM_IMA_QT, adpcm_ima_qt, "ADPCM IMA QuickTime"); ADPCM_ENCODER(AV_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(AV_CODEC_ID_ADPCM_IMA_WAV, adpcm_ima_wav, "ADPCM IMA WAV");
ADPCM_ENCODER(CODEC_ID_ADPCM_MS, adpcm_ms, "ADPCM Microsoft"); ADPCM_ENCODER(AV_CODEC_ID_ADPCM_MS, adpcm_ms, "ADPCM Microsoft");
ADPCM_ENCODER(CODEC_ID_ADPCM_SWF, adpcm_swf, "ADPCM Shockwave Flash"); ADPCM_ENCODER(AV_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_YAMAHA, adpcm_yamaha, "ADPCM Yamaha");

@ -89,7 +89,7 @@ static int adx_parse(AVCodecParserContext *s1,
} }
AVCodecParser ff_adx_parser = { AVCodecParser ff_adx_parser = {
.codec_ids = { CODEC_ID_ADPCM_ADX }, .codec_ids = { AV_CODEC_ID_ADPCM_ADX },
.priv_data_size = sizeof(ADXParseContext), .priv_data_size = sizeof(ADXParseContext),
.parser_parse = adx_parse, .parser_parse = adx_parse,
.parser_close = ff_parse_close, .parser_close = ff_parse_close,

@ -175,7 +175,7 @@ static void adx_decode_flush(AVCodecContext *avctx)
AVCodec ff_adpcm_adx_decoder = { AVCodec ff_adpcm_adx_decoder = {
.name = "adpcm_adx", .name = "adpcm_adx",
.type = AVMEDIA_TYPE_AUDIO, .type = AVMEDIA_TYPE_AUDIO,
.id = CODEC_ID_ADPCM_ADX, .id = AV_CODEC_ID_ADPCM_ADX,
.priv_data_size = sizeof(ADXContext), .priv_data_size = sizeof(ADXContext),
.init = adx_decode_init, .init = adx_decode_init,
.decode = adx_decode_frame, .decode = adx_decode_frame,

@ -166,7 +166,7 @@ static int adx_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
AVCodec ff_adpcm_adx_encoder = { AVCodec ff_adpcm_adx_encoder = {
.name = "adpcm_adx", .name = "adpcm_adx",
.type = AVMEDIA_TYPE_AUDIO, .type = AVMEDIA_TYPE_AUDIO,
.id = CODEC_ID_ADPCM_ADX, .id = AV_CODEC_ID_ADPCM_ADX,
.priv_data_size = sizeof(ADXContext), .priv_data_size = sizeof(ADXContext),
.init = adx_encode_init, .init = adx_encode_init,
.encode2 = adx_encode_frame, .encode2 = adx_encode_frame,

@ -605,7 +605,7 @@ static av_cold int alac_decode_init(AVCodecContext * avctx)
AVCodec ff_alac_decoder = { AVCodec ff_alac_decoder = {
.name = "alac", .name = "alac",
.type = AVMEDIA_TYPE_AUDIO, .type = AVMEDIA_TYPE_AUDIO,
.id = CODEC_ID_ALAC, .id = AV_CODEC_ID_ALAC,
.priv_data_size = sizeof(ALACContext), .priv_data_size = sizeof(ALACContext),
.init = alac_decode_init, .init = alac_decode_init,
.close = alac_decode_close, .close = alac_decode_close,

@ -576,7 +576,7 @@ static int alac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
AVCodec ff_alac_encoder = { AVCodec ff_alac_encoder = {
.name = "alac", .name = "alac",
.type = AVMEDIA_TYPE_AUDIO, .type = AVMEDIA_TYPE_AUDIO,
.id = CODEC_ID_ALAC, .id = AV_CODEC_ID_ALAC,
.priv_data_size = sizeof(AlacEncodeContext), .priv_data_size = sizeof(AlacEncodeContext),
.init = alac_encode_init, .init = alac_encode_init,
.encode2 = alac_encode_frame, .encode2 = alac_encode_frame,

@ -1740,7 +1740,7 @@ static av_cold void flush(AVCodecContext *avctx)
AVCodec ff_als_decoder = { AVCodec ff_als_decoder = {
.name = "als", .name = "als",
.type = AVMEDIA_TYPE_AUDIO, .type = AVMEDIA_TYPE_AUDIO,
.id = CODEC_ID_MP4ALS, .id = AV_CODEC_ID_MP4ALS,
.priv_data_size = sizeof(ALSDecContext), .priv_data_size = sizeof(ALSDecContext),
.init = decode_init, .init = decode_init,
.close = decode_end, .close = decode_end,

@ -1057,7 +1057,7 @@ static int amrnb_decode_frame(AVCodecContext *avctx, void *data,
AVCodec ff_amrnb_decoder = { AVCodec ff_amrnb_decoder = {
.name = "amrnb", .name = "amrnb",
.type = AVMEDIA_TYPE_AUDIO, .type = AVMEDIA_TYPE_AUDIO,
.id = CODEC_ID_AMR_NB, .id = AV_CODEC_ID_AMR_NB,
.priv_data_size = sizeof(AMRContext), .priv_data_size = sizeof(AMRContext),
.init = amrnb_decode_init, .init = amrnb_decode_init,
.decode = amrnb_decode_frame, .decode = amrnb_decode_frame,

@ -1237,7 +1237,7 @@ static int amrwb_decode_frame(AVCodecContext *avctx, void *data,
AVCodec ff_amrwb_decoder = { AVCodec ff_amrwb_decoder = {
.name = "amrwb", .name = "amrwb",
.type = AVMEDIA_TYPE_AUDIO, .type = AVMEDIA_TYPE_AUDIO,
.id = CODEC_ID_AMR_WB, .id = AV_CODEC_ID_AMR_WB,
.priv_data_size = sizeof(AMRWBContext), .priv_data_size = sizeof(AMRWBContext),
.init = amrwb_decode_init, .init = amrwb_decode_init,
.decode = amrwb_decode_frame, .decode = amrwb_decode_frame,

@ -186,7 +186,7 @@ static av_cold int decode_end(AVCodecContext *avctx)
AVCodec ff_anm_decoder = { AVCodec ff_anm_decoder = {
.name = "anm", .name = "anm",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_ANM, .id = AV_CODEC_ID_ANM,
.priv_data_size = sizeof(AnmContext), .priv_data_size = sizeof(AnmContext),
.init = decode_init, .init = decode_init,
.close = decode_end, .close = decode_end,

@ -425,7 +425,7 @@ static av_cold int decode_close(AVCodecContext *avctx)
AVCodec ff_ansi_decoder = { AVCodec ff_ansi_decoder = {
.name = "ansi", .name = "ansi",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_ANSI, .id = AV_CODEC_ID_ANSI,
.priv_data_size = sizeof(AnsiContext), .priv_data_size = sizeof(AnsiContext),
.init = decode_init, .init = decode_init,
.close = decode_close, .close = decode_close,

@ -987,7 +987,7 @@ static const AVClass ape_decoder_class = {
AVCodec ff_ape_decoder = { AVCodec ff_ape_decoder = {
.name = "ape", .name = "ape",
.type = AVMEDIA_TYPE_AUDIO, .type = AVMEDIA_TYPE_AUDIO,
.id = CODEC_ID_APE, .id = AV_CODEC_ID_APE,
.priv_data_size = sizeof(APEContext), .priv_data_size = sizeof(APEContext),
.init = ape_decode_init, .init = ape_decode_init,
.close = ape_decode_close, .close = ape_decode_close,

@ -60,7 +60,7 @@ static void audio_encode_example(const char *filename)
printf("Audio encoding\n"); printf("Audio encoding\n");
/* find the MP2 encoder */ /* find the MP2 encoder */
codec = avcodec_find_encoder(CODEC_ID_MP2); codec = avcodec_find_encoder(AV_CODEC_ID_MP2);
if (!codec) { if (!codec) {
fprintf(stderr, "codec not found\n"); fprintf(stderr, "codec not found\n");
exit(1); exit(1);
@ -130,7 +130,7 @@ static void audio_decode_example(const char *outfilename, const char *filename)
printf("Audio decoding\n"); printf("Audio decoding\n");
/* find the mpeg audio decoder */ /* find the mpeg audio decoder */
codec = avcodec_find_decoder(CODEC_ID_MP2); codec = avcodec_find_decoder(AV_CODEC_ID_MP2);
if (!codec) { if (!codec) {
fprintf(stderr, "codec not found\n"); fprintf(stderr, "codec not found\n");
exit(1); exit(1);
@ -221,7 +221,7 @@ static void video_encode_example(const char *filename)
printf("Video encoding\n"); printf("Video encoding\n");
/* find the mpeg1 video encoder */ /* find the mpeg1 video encoder */
codec = avcodec_find_encoder(CODEC_ID_MPEG1VIDEO); codec = avcodec_find_encoder(AV_CODEC_ID_MPEG1VIDEO);
if (!codec) { if (!codec) {
fprintf(stderr, "codec not found\n"); fprintf(stderr, "codec not found\n");
exit(1); exit(1);
@ -352,7 +352,7 @@ static void video_decode_example(const char *outfilename, const char *filename)
printf("Video decoding\n"); printf("Video decoding\n");
/* find the mpeg1 video decoder */ /* find the mpeg1 video decoder */
codec = avcodec_find_decoder(CODEC_ID_MPEG1VIDEO); codec = avcodec_find_decoder(AV_CODEC_ID_MPEG1VIDEO);
if (!codec) { if (!codec) {
fprintf(stderr, "codec not found\n"); fprintf(stderr, "codec not found\n");
exit(1); exit(1);

@ -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[VERT_PRED8x8 ] = ff_pred8x8_vert_neon;
h->pred8x8[HOR_PRED8x8 ] = ff_pred8x8_hor_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[PLANE_PRED8x8] = ff_pred8x8_plane_neon;
h->pred8x8[DC_128_PRED8x8 ] = ff_pred8x8_128_dc_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[DC_PRED8x8 ] = ff_pred8x8_dc_neon;
h->pred8x8[LEFT_DC_PRED8x8] = ff_pred8x8_left_dc_neon; h->pred8x8[LEFT_DC_PRED8x8] = ff_pred8x8_left_dc_neon;
h->pred8x8[TOP_DC_PRED8x8 ] = ff_pred8x8_top_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[LEFT_DC_PRED8x8] = ff_pred16x16_left_dc_neon;
h->pred16x16[TOP_DC_PRED8x8 ] = ff_pred16x16_top_dc_neon; h->pred16x16[TOP_DC_PRED8x8 ] = ff_pred16x16_top_dc_neon;
h->pred16x16[DC_128_PRED8x8 ] = ff_pred16x16_128_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; h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_plane_neon;
} }

@ -27,11 +27,11 @@
void ff_vp6_edge_filter_hor_neon(uint8_t *yuv, int stride, int t); 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_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(); 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_hor = ff_vp6_edge_filter_hor_neon;
s->edge_filter_ver = ff_vp6_edge_filter_ver_neon; s->edge_filter_ver = ff_vp6_edge_filter_ver_neon;
} }

@ -56,7 +56,7 @@ AVCodec ff_ass_decoder = {
.name = "ass", .name = "ass",
.long_name = NULL_IF_CONFIG_SMALL("SSA (SubStation Alpha) subtitle"), .long_name = NULL_IF_CONFIG_SMALL("SSA (SubStation Alpha) subtitle"),
.type = AVMEDIA_TYPE_SUBTITLE, .type = AVMEDIA_TYPE_SUBTITLE,
.id = CODEC_ID_SSA, .id = AV_CODEC_ID_SSA,
.init = ass_decode_init, .init = ass_decode_init,
.decode = ass_decode_frame, .decode = ass_decode_frame,
}; };

@ -61,7 +61,7 @@ AVCodec ff_ass_encoder = {
.name = "ass", .name = "ass",
.long_name = NULL_IF_CONFIG_SMALL("SSA (SubStation Alpha) subtitle"), .long_name = NULL_IF_CONFIG_SMALL("SSA (SubStation Alpha) subtitle"),
.type = AVMEDIA_TYPE_SUBTITLE, .type = AVMEDIA_TYPE_SUBTITLE,
.id = CODEC_ID_SSA, .id = AV_CODEC_ID_SSA,
.init = ass_encode_init, .init = ass_encode_init,
.encode = ass_encode_frame, .encode = ass_encode_frame,
}; };

@ -311,7 +311,7 @@ static inline int decode_mb(ASV1Context *a, DCTELEM block[6][64]){
a->dsp.clear_blocks(block[0]); 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++){ for(i=0; i<6; i++){
if( asv1_decode_block(a, block[i]) < 0) if( asv1_decode_block(a, block[i]) < 0)
return -1; return -1;
@ -335,7 +335,7 @@ static inline int encode_mb(ASV1Context *a, DCTELEM block[6][64]){
return -1; 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++) for(i=0; i<6; i++)
asv1_encode_block(a, block[i]); asv1_encode_block(a, block[i]);
}else{ }else{
@ -415,7 +415,7 @@ static int decode_frame(AVCodecContext *avctx,
if (!a->bitstream_buffer) if (!a->bitstream_buffer)
return AVERROR(ENOMEM); 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); a->dsp.bswap_buf((uint32_t*)a->bitstream_buffer, (const uint32_t*)buf, buf_size/4);
else{ else{
int i; int i;
@ -514,7 +514,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
size= put_bits_count(&a->pb)/32; 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); a->dsp.bswap_buf((uint32_t*)pkt->data, (uint32_t*)pkt->data, size);
else{ else{
int i; int i;
@ -548,7 +548,7 @@ static av_cold int decode_init(AVCodecContext *avctx){
ASV1Context * const a = avctx->priv_data; ASV1Context * const a = avctx->priv_data;
AVFrame *p= &a->picture; AVFrame *p= &a->picture;
int i; 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); common_init(avctx);
init_vlcs(a); init_vlcs(a);
@ -558,7 +558,7 @@ static av_cold int decode_init(AVCodecContext *avctx){
a->inv_qscale= avctx->extradata[0]; a->inv_qscale= avctx->extradata[0];
if(a->inv_qscale == 0){ if(a->inv_qscale == 0){
av_log(avctx, AV_LOG_ERROR, "illegal qscale 0\n"); 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; a->inv_qscale= 6;
else else
a->inv_qscale= 10; a->inv_qscale= 10;
@ -582,7 +582,7 @@ static av_cold int decode_init(AVCodecContext *avctx){
static av_cold int encode_init(AVCodecContext *avctx){ static av_cold int encode_init(AVCodecContext *avctx){
ASV1Context * const a = avctx->priv_data; ASV1Context * const a = avctx->priv_data;
int i; 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); common_init(avctx);
@ -620,7 +620,7 @@ static av_cold int decode_end(AVCodecContext *avctx){
AVCodec ff_asv1_decoder = { AVCodec ff_asv1_decoder = {
.name = "asv1", .name = "asv1",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_ASV1, .id = AV_CODEC_ID_ASV1,
.priv_data_size = sizeof(ASV1Context), .priv_data_size = sizeof(ASV1Context),
.init = decode_init, .init = decode_init,
.close = decode_end, .close = decode_end,
@ -632,7 +632,7 @@ AVCodec ff_asv1_decoder = {
AVCodec ff_asv2_decoder = { AVCodec ff_asv2_decoder = {
.name = "asv2", .name = "asv2",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_ASV2, .id = AV_CODEC_ID_ASV2,
.priv_data_size = sizeof(ASV1Context), .priv_data_size = sizeof(ASV1Context),
.init = decode_init, .init = decode_init,
.close = decode_end, .close = decode_end,
@ -645,7 +645,7 @@ AVCodec ff_asv2_decoder = {
AVCodec ff_asv1_encoder = { AVCodec ff_asv1_encoder = {
.name = "asv1", .name = "asv1",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_ASV1, .id = AV_CODEC_ID_ASV1,
.priv_data_size = sizeof(ASV1Context), .priv_data_size = sizeof(ASV1Context),
.init = encode_init, .init = encode_init,
.encode2 = encode_frame, .encode2 = encode_frame,
@ -658,7 +658,7 @@ AVCodec ff_asv1_encoder = {
AVCodec ff_asv2_encoder = { AVCodec ff_asv2_encoder = {
.name = "asv2", .name = "asv2",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_ASV2, .id = AV_CODEC_ID_ASV2,
.priv_data_size = sizeof(ASV1Context), .priv_data_size = sizeof(ASV1Context),
.init = encode_init, .init = encode_init,
.encode2 = encode_frame, .encode2 = encode_frame,

@ -403,7 +403,7 @@ static av_cold int atrac1_decode_init(AVCodecContext *avctx)
AVCodec ff_atrac1_decoder = { AVCodec ff_atrac1_decoder = {
.name = "atrac1", .name = "atrac1",
.type = AVMEDIA_TYPE_AUDIO, .type = AVMEDIA_TYPE_AUDIO,
.id = CODEC_ID_ATRAC1, .id = AV_CODEC_ID_ATRAC1,
.priv_data_size = sizeof(AT1Ctx), .priv_data_size = sizeof(AT1Ctx),
.init = atrac1_decode_init, .init = atrac1_decode_init,
.close = atrac1_decode_end, .close = atrac1_decode_end,

@ -1068,7 +1068,7 @@ AVCodec ff_atrac3_decoder =
{ {
.name = "atrac3", .name = "atrac3",
.type = AVMEDIA_TYPE_AUDIO, .type = AVMEDIA_TYPE_AUDIO,
.id = CODEC_ID_ATRAC3, .id = AV_CODEC_ID_ATRAC3,
.priv_data_size = sizeof(ATRAC3Context), .priv_data_size = sizeof(ATRAC3Context),
.init = atrac3_decode_init, .init = atrac3_decode_init,
.close = atrac3_decode_close, .close = atrac3_decode_close,

@ -125,7 +125,7 @@ static av_cold int aura_decode_end(AVCodecContext *avctx)
AVCodec ff_aura2_decoder = { AVCodec ff_aura2_decoder = {
.name = "aura2", .name = "aura2",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_AURA2, .id = AV_CODEC_ID_AURA2,
.priv_data_size = sizeof(AuraDecodeContext), .priv_data_size = sizeof(AuraDecodeContext),
.init = aura_decode_init, .init = aura_decode_init,
.close = aura_decode_end, .close = aura_decode_end,

@ -1265,7 +1265,7 @@ typedef struct AVCodecContext {
enum AVMediaType codec_type; /* see AVMEDIA_TYPE_xxx */ enum AVMediaType codec_type; /* see AVMEDIA_TYPE_xxx */
struct AVCodec *codec; struct AVCodec *codec;
char codec_name[32]; 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'). * fourcc (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A').
@ -2869,7 +2869,7 @@ typedef struct AVCodec {
*/ */
const char *long_name; const char *long_name;
enum AVMediaType type; enum AVMediaType type;
enum CodecID id; enum AVCodecID id;
/** /**
* Codec capabilities. * Codec capabilities.
* see CODEC_CAP_* * see CODEC_CAP_*
@ -2967,9 +2967,9 @@ typedef struct AVHWAccel {
/** /**
* Codec implemented by the hardware accelerator. * Codec implemented by the hardware accelerator.
* *
* See CODEC_ID_xxx * See AV_CODEC_ID_xxx
*/ */
enum CodecID id; enum AVCodecID id;
/** /**
* Supported pixel format. * 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. * 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. * @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. * 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. * 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. * @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. * 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 * @param[in] codec_id the codec
* @return Number of bits per sample or zero if unknown for the given 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. * 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 * @param[in] codec_id the codec
* @return Number of bits per sample or zero if unknown for the given 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. * 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. * 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 * @return a positive value if s is open (i.e. avcodec_open2() was called on it

@ -173,7 +173,7 @@ static av_cold int avs_decode_end(AVCodecContext *avctx)
AVCodec ff_avs_decoder = { AVCodec ff_avs_decoder = {
.name = "avs", .name = "avs",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_AVS, .id = AV_CODEC_ID_AVS,
.priv_data_size = sizeof(AvsContext), .priv_data_size = sizeof(AvsContext),
.init = avs_decode_init, .init = avs_decode_init,
.decode = avs_decode_frame, .decode = avs_decode_frame,

@ -153,7 +153,7 @@ static av_cold int bethsoftvid_decode_end(AVCodecContext *avctx)
AVCodec ff_bethsoftvid_decoder = { AVCodec ff_bethsoftvid_decoder = {
.name = "bethsoftvid", .name = "bethsoftvid",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_BETHSOFTVID, .id = AV_CODEC_ID_BETHSOFTVID,
.priv_data_size = sizeof(BethsoftvidContext), .priv_data_size = sizeof(BethsoftvidContext),
.init = bethsoftvid_decode_init, .init = bethsoftvid_decode_init,
.close = bethsoftvid_decode_end, .close = bethsoftvid_decode_end,

@ -180,7 +180,7 @@ static av_cold int bfi_decode_close(AVCodecContext *avctx)
AVCodec ff_bfi_decoder = { AVCodec ff_bfi_decoder = {
.name = "bfi", .name = "bfi",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_BFI, .id = AV_CODEC_ID_BFI,
.priv_data_size = sizeof(BFIContext), .priv_data_size = sizeof(BFIContext),
.init = bfi_decode_init, .init = bfi_decode_init,
.close = bfi_decode_close, .close = bfi_decode_close,

@ -1330,7 +1330,7 @@ static av_cold int decode_end(AVCodecContext *avctx)
AVCodec ff_bink_decoder = { AVCodec ff_bink_decoder = {
.name = "binkvideo", .name = "binkvideo",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_BINKVIDEO, .id = AV_CODEC_ID_BINKVIDEO,
.priv_data_size = sizeof(BinkContext), .priv_data_size = sizeof(BinkContext),
.init = decode_init, .init = decode_init,
.close = decode_end, .close = decode_end,

@ -98,7 +98,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
s->version_b = avctx->extradata && avctx->extradata[3] == 'b'; 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 // audio is already interleaved for the RDFT format variant
sample_rate *= avctx->channels; sample_rate *= avctx->channels;
s->channels = 1; 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; 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); ff_rdft_init(&s->trans.rdft, frame_len_bits, DFT_C2R);
else if (CONFIG_BINKAUDIO_DCT_DECODER) else if (CONFIG_BINKAUDIO_DCT_DECODER)
ff_dct_init(&s->trans.dct, frame_len_bits, DCT_III); 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; BinkAudioContext * s = avctx->priv_data;
av_freep(&s->bands); av_freep(&s->bands);
av_freep(&s->packet_buffer); 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); ff_rdft_end(&s->trans.rdft);
else if (CONFIG_BINKAUDIO_DCT_DECODER) else if (CONFIG_BINKAUDIO_DCT_DECODER)
ff_dct_end(&s->trans.dct); 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]; 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"); av_log(avctx, AV_LOG_ERROR, "Incomplete packet\n");
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
} }
@ -361,7 +361,7 @@ static int decode_frame(AVCodecContext *avctx, void *data,
AVCodec ff_binkaudio_rdft_decoder = { AVCodec ff_binkaudio_rdft_decoder = {
.name = "binkaudio_rdft", .name = "binkaudio_rdft",
.type = AVMEDIA_TYPE_AUDIO, .type = AVMEDIA_TYPE_AUDIO,
.id = CODEC_ID_BINKAUDIO_RDFT, .id = AV_CODEC_ID_BINKAUDIO_RDFT,
.priv_data_size = sizeof(BinkAudioContext), .priv_data_size = sizeof(BinkAudioContext),
.init = decode_init, .init = decode_init,
.close = decode_end, .close = decode_end,
@ -373,7 +373,7 @@ AVCodec ff_binkaudio_rdft_decoder = {
AVCodec ff_binkaudio_dct_decoder = { AVCodec ff_binkaudio_dct_decoder = {
.name = "binkaudio_dct", .name = "binkaudio_dct",
.type = AVMEDIA_TYPE_AUDIO, .type = AVMEDIA_TYPE_AUDIO,
.id = CODEC_ID_BINKAUDIO_DCT, .id = AV_CODEC_ID_BINKAUDIO_DCT,
.priv_data_size = sizeof(BinkAudioContext), .priv_data_size = sizeof(BinkAudioContext),
.init = decode_init, .init = decode_init,
.close = decode_end, .close = decode_end,

@ -364,7 +364,7 @@ static av_cold int bmp_decode_end(AVCodecContext *avctx)
AVCodec ff_bmp_decoder = { AVCodec ff_bmp_decoder = {
.name = "bmp", .name = "bmp",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_BMP, .id = AV_CODEC_ID_BMP,
.priv_data_size = sizeof(BMPContext), .priv_data_size = sizeof(BMPContext),
.init = bmp_decode_init, .init = bmp_decode_init,
.close = bmp_decode_end, .close = bmp_decode_end,

@ -162,7 +162,7 @@ static int bmp_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
AVCodec ff_bmp_encoder = { AVCodec ff_bmp_encoder = {
.name = "bmp", .name = "bmp",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_BMP, .id = AV_CODEC_ID_BMP,
.priv_data_size = sizeof(BMPContext), .priv_data_size = sizeof(BMPContext),
.init = bmp_encode_init, .init = bmp_encode_init,
.encode2 = bmp_encode_frame, .encode2 = bmp_encode_frame,

@ -360,7 +360,7 @@ static int bmv_aud_decode_frame(AVCodecContext *avctx, void *data,
AVCodec ff_bmv_video_decoder = { AVCodec ff_bmv_video_decoder = {
.name = "bmv_video", .name = "bmv_video",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_BMV_VIDEO, .id = AV_CODEC_ID_BMV_VIDEO,
.priv_data_size = sizeof(BMVDecContext), .priv_data_size = sizeof(BMVDecContext),
.init = decode_init, .init = decode_init,
.close = decode_end, .close = decode_end,
@ -371,7 +371,7 @@ AVCodec ff_bmv_video_decoder = {
AVCodec ff_bmv_audio_decoder = { AVCodec ff_bmv_audio_decoder = {
.name = "bmv_audio", .name = "bmv_audio",
.type = AVMEDIA_TYPE_AUDIO, .type = AVMEDIA_TYPE_AUDIO,
.id = CODEC_ID_BMV_AUDIO, .id = AV_CODEC_ID_BMV_AUDIO,
.priv_data_size = sizeof(BMVAudioDecContext), .priv_data_size = sizeof(BMVAudioDecContext),
.init = bmv_aud_decode_init, .init = bmv_aud_decode_init,
.decode = bmv_aud_decode_frame, .decode = bmv_aud_decode_frame,

@ -247,7 +247,7 @@ static int decode_frame(AVCodecContext *avctx, void *data,
AVCodec ff_c93_decoder = { AVCodec ff_c93_decoder = {
.name = "c93", .name = "c93",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_C93, .id = AV_CODEC_ID_C93,
.priv_data_size = sizeof(C93DecoderContext), .priv_data_size = sizeof(C93DecoderContext),
.init = decode_init, .init = decode_init,
.close = decode_end, .close = decode_end,

@ -98,7 +98,7 @@ static int cavsvideo_parse(AVCodecParserContext *s,
} }
AVCodecParser ff_cavsvideo_parser = { AVCodecParser ff_cavsvideo_parser = {
.codec_ids = { CODEC_ID_CAVS }, .codec_ids = { AV_CODEC_ID_CAVS },
.priv_data_size = sizeof(ParseContext), .priv_data_size = sizeof(ParseContext),
.parser_parse = cavsvideo_parse, .parser_parse = cavsvideo_parse,
.parser_close = ff_parse_close, .parser_close = ff_parse_close,

@ -718,7 +718,7 @@ static int cavs_decode_frame(AVCodecContext * avctx,void *data, int *data_size,
AVCodec ff_cavs_decoder = { AVCodec ff_cavs_decoder = {
.name = "cavs", .name = "cavs",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_CAVS, .id = AV_CODEC_ID_CAVS,
.priv_data_size = sizeof(AVSContext), .priv_data_size = sizeof(AVSContext),
.init = ff_cavs_init, .init = ff_cavs_init,
.close = ff_cavs_end, .close = ff_cavs_end,

@ -370,7 +370,7 @@ static av_cold int cdg_decode_end(AVCodecContext *avctx)
AVCodec ff_cdgraphics_decoder = { AVCodec ff_cdgraphics_decoder = {
.name = "cdgraphics", .name = "cdgraphics",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_CDGRAPHICS, .id = AV_CODEC_ID_CDGRAPHICS,
.priv_data_size = sizeof(CDGraphicsContext), .priv_data_size = sizeof(CDGraphicsContext),
.init = cdg_decode_init, .init = cdg_decode_init,
.close = cdg_decode_end, .close = cdg_decode_end,

@ -300,7 +300,7 @@ static av_cold int cdxl_decode_end(AVCodecContext *avctx)
AVCodec ff_cdxl_decoder = { AVCodec ff_cdxl_decoder = {
.name = "cdxl", .name = "cdxl",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_CDXL, .id = AV_CODEC_ID_CDXL,
.priv_data_size = sizeof(CDXLVideoContext), .priv_data_size = sizeof(CDXLVideoContext),
.init = cdxl_decode_init, .init = cdxl_decode_init,
.close = cdxl_decode_end, .close = cdxl_decode_end,

@ -469,7 +469,7 @@ static av_cold int cinepak_decode_end(AVCodecContext *avctx)
AVCodec ff_cinepak_decoder = { AVCodec ff_cinepak_decoder = {
.name = "cinepak", .name = "cinepak",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_CINEPAK, .id = AV_CODEC_ID_CINEPAK,
.priv_data_size = sizeof(CinepakContext), .priv_data_size = sizeof(CinepakContext),
.init = cinepak_decode_init, .init = cinepak_decode_init,
.close = cinepak_decode_end, .close = cinepak_decode_end,

@ -118,7 +118,7 @@ static av_cold int decode_end(AVCodecContext *avctx)
AVCodec ff_cljr_decoder = { AVCodec ff_cljr_decoder = {
.name = "cljr", .name = "cljr",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_CLJR, .id = AV_CODEC_ID_CLJR,
.priv_data_size = sizeof(CLJRContext), .priv_data_size = sizeof(CLJRContext),
.init = decode_init, .init = decode_init,
.close = decode_end, .close = decode_end,
@ -171,7 +171,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
AVCodec ff_cljr_encoder = { AVCodec ff_cljr_encoder = {
.name = "cljr", .name = "cljr",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_CLJR, .id = AV_CODEC_ID_CLJR,
.priv_data_size = sizeof(CLJRContext), .priv_data_size = sizeof(CLJRContext),
.init = common_init, .init = common_init,
.encode2 = encode_frame, .encode2 = encode_frame,

@ -274,7 +274,7 @@ static av_cold int cllc_decode_init(AVCodecContext *avctx)
AVCodec ff_cllc_decoder = { AVCodec ff_cllc_decoder = {
.name = "cllc", .name = "cllc",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_CLLC, .id = AV_CODEC_ID_CLLC,
.priv_data_size = sizeof(CLLCContext), .priv_data_size = sizeof(CLLCContext),
.init = cllc_decode_init, .init = cllc_decode_init,
.decode = cllc_decode_frame, .decode = cllc_decode_frame,

@ -1297,7 +1297,7 @@ static av_cold int cook_decode_init(AVCodecContext *avctx)
AVCodec ff_cook_decoder = { AVCodec ff_cook_decoder = {
.name = "cook", .name = "cook",
.type = AVMEDIA_TYPE_AUDIO, .type = AVMEDIA_TYPE_AUDIO,
.id = CODEC_ID_COOK, .id = AV_CODEC_ID_COOK,
.priv_data_size = sizeof(COOKContext), .priv_data_size = sizeof(COOKContext),
.init = cook_decode_init, .init = cook_decode_init,
.close = cook_decode_close, .close = cook_decode_close,

@ -53,7 +53,7 @@ static int cook_parse(AVCodecParserContext *s1, AVCodecContext *avctx,
} }
AVCodecParser ff_cook_parser = { AVCodecParser ff_cook_parser = {
.codec_ids = { CODEC_ID_COOK }, .codec_ids = { AV_CODEC_ID_COOK },
.priv_data_size = sizeof(CookParseContext), .priv_data_size = sizeof(CookParseContext),
.parser_parse = cook_parse, .parser_parse = cook_parse,
}; };

@ -257,7 +257,7 @@ static av_cold int decode_end(AVCodecContext *avctx) {
AVCodec ff_cscd_decoder = { AVCodec ff_cscd_decoder = {
.name = "camstudio", .name = "camstudio",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_CSCD, .id = AV_CODEC_ID_CSCD,
.priv_data_size = sizeof(CamStudioContext), .priv_data_size = sizeof(CamStudioContext),
.init = decode_init, .init = decode_init,
.close = decode_end, .close = decode_end,

@ -82,7 +82,7 @@ static int cyuv_decode_frame(AVCodecContext *avctx,
unsigned char cur_byte; unsigned char cur_byte;
int pixel_groups; int pixel_groups;
if (avctx->codec_id == CODEC_ID_AURA) { if (avctx->codec_id == AV_CODEC_ID_AURA) {
y_table = u_table; y_table = u_table;
u_table = v_table; u_table = v_table;
} }
@ -181,7 +181,7 @@ static av_cold int cyuv_decode_end(AVCodecContext *avctx)
AVCodec ff_aura_decoder = { AVCodec ff_aura_decoder = {
.name = "aura", .name = "aura",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_AURA, .id = AV_CODEC_ID_AURA,
.priv_data_size = sizeof(CyuvDecodeContext), .priv_data_size = sizeof(CyuvDecodeContext),
.init = cyuv_decode_init, .init = cyuv_decode_init,
.close = cyuv_decode_end, .close = cyuv_decode_end,
@ -195,7 +195,7 @@ AVCodec ff_aura_decoder = {
AVCodec ff_cyuv_decoder = { AVCodec ff_cyuv_decoder = {
.name = "cyuv", .name = "cyuv",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_CYUV, .id = AV_CODEC_ID_CYUV,
.priv_data_size = sizeof(CyuvDecodeContext), .priv_data_size = sizeof(CyuvDecodeContext),
.init = cyuv_decode_init, .init = cyuv_decode_init,
.close = cyuv_decode_end, .close = cyuv_decode_end,

@ -203,7 +203,7 @@ static int dca_parse(AVCodecParserContext * s,
} }
AVCodecParser ff_dca_parser = { AVCodecParser ff_dca_parser = {
.codec_ids = { CODEC_ID_DTS }, .codec_ids = { AV_CODEC_ID_DTS },
.priv_data_size = sizeof(DCAParseContext), .priv_data_size = sizeof(DCAParseContext),
.parser_init = dca_parse_init, .parser_init = dca_parse_init,
.parser_parse = dca_parse, .parser_parse = dca_parse,

@ -1957,7 +1957,7 @@ static const AVProfile profiles[] = {
AVCodec ff_dca_decoder = { AVCodec ff_dca_decoder = {
.name = "dca", .name = "dca",
.type = AVMEDIA_TYPE_AUDIO, .type = AVMEDIA_TYPE_AUDIO,
.id = CODEC_ID_DTS, .id = AV_CODEC_ID_DTS,
.priv_data_size = sizeof(DCAContext), .priv_data_size = sizeof(DCAContext),
.init = dca_decode_init, .init = dca_decode_init,
.decode = dca_decode_frame, .decode = dca_decode_frame,

@ -377,7 +377,7 @@ static av_cold int dfa_decode_end(AVCodecContext *avctx)
AVCodec ff_dfa_decoder = { AVCodec ff_dfa_decoder = {
.name = "dfa", .name = "dfa",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_DFA, .id = AV_CODEC_ID_DFA,
.priv_data_size = sizeof(DfaContext), .priv_data_size = sizeof(DfaContext),
.init = dfa_decode_init, .init = dfa_decode_init,
.close = dfa_decode_end, .close = dfa_decode_end,

@ -248,7 +248,7 @@ static void dirac_parse_close(AVCodecParserContext *s)
} }
AVCodecParser ff_dirac_parser = { AVCodecParser ff_dirac_parser = {
.codec_ids = { CODEC_ID_DIRAC }, .codec_ids = { AV_CODEC_ID_DIRAC },
.priv_data_size = sizeof(DiracParseContext), .priv_data_size = sizeof(DiracParseContext),
.parser_parse = dirac_parse, .parser_parse = dirac_parse,
.parser_close = dirac_parse_close, .parser_close = dirac_parse_close,

@ -87,7 +87,7 @@ static int dnxhd_parse(AVCodecParserContext *s,
} }
AVCodecParser ff_dnxhd_parser = { AVCodecParser ff_dnxhd_parser = {
.codec_ids = { CODEC_ID_DNXHD }, .codec_ids = { AV_CODEC_ID_DNXHD },
.priv_data_size = sizeof(ParseContext), .priv_data_size = sizeof(ParseContext),
.parser_parse = dnxhd_parse, .parser_parse = dnxhd_parse,
.parser_close = ff_parse_close, .parser_close = ff_parse_close,

@ -400,7 +400,7 @@ static av_cold int dnxhd_decode_close(AVCodecContext *avctx)
AVCodec ff_dnxhd_decoder = { AVCodec ff_dnxhd_decoder = {
.name = "dnxhd", .name = "dnxhd",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_DNXHD, .id = AV_CODEC_ID_DNXHD,
.priv_data_size = sizeof(DNXHDContext), .priv_data_size = sizeof(DNXHDContext),
.init = dnxhd_decode_init, .init = dnxhd_decode_init,
.close = dnxhd_decode_close, .close = dnxhd_decode_close,

@ -1001,7 +1001,7 @@ static int dnxhd_encode_end(AVCodecContext *avctx)
AVCodec ff_dnxhd_encoder = { AVCodec ff_dnxhd_encoder = {
.name = "dnxhd", .name = "dnxhd",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_DNXHD, .id = AV_CODEC_ID_DNXHD,
.priv_data_size = sizeof(DNXHDEncContext), .priv_data_size = sizeof(DNXHDEncContext),
.init = dnxhd_encode_init, .init = dnxhd_encode_init,
.encode2 = dnxhd_encode_picture, .encode2 = dnxhd_encode_picture,

@ -128,7 +128,7 @@ static av_cold int dpcm_decode_init(AVCodecContext *avctx)
switch(avctx->codec->id) { switch(avctx->codec->id) {
case CODEC_ID_ROQ_DPCM: case AV_CODEC_ID_ROQ_DPCM:
/* initialize square table */ /* initialize square table */
for (i = 0; i < 128; i++) { for (i = 0; i < 128; i++) {
int16_t square = i * i; int16_t square = i * i;
@ -137,7 +137,7 @@ static av_cold int dpcm_decode_init(AVCodecContext *avctx)
} }
break; break;
case CODEC_ID_SOL_DPCM: case AV_CODEC_ID_SOL_DPCM:
switch(avctx->codec_tag){ switch(avctx->codec_tag){
case 1: case 1:
s->sol_table = sol_table_old; s->sol_table = sol_table_old;
@ -159,7 +159,7 @@ static av_cold int dpcm_decode_init(AVCodecContext *avctx)
break; 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; avctx->sample_fmt = AV_SAMPLE_FMT_U8;
else else
avctx->sample_fmt = AV_SAMPLE_FMT_S16; avctx->sample_fmt = AV_SAMPLE_FMT_S16;
@ -189,16 +189,16 @@ static int dpcm_decode_frame(AVCodecContext *avctx, void *data,
/* calculate output size */ /* calculate output size */
switch(avctx->codec->id) { switch(avctx->codec->id) {
case CODEC_ID_ROQ_DPCM: case AV_CODEC_ID_ROQ_DPCM:
out = buf_size - 8; out = buf_size - 8;
break; break;
case CODEC_ID_INTERPLAY_DPCM: case AV_CODEC_ID_INTERPLAY_DPCM:
out = buf_size - 6 - s->channels; out = buf_size - 6 - s->channels;
break; break;
case CODEC_ID_XAN_DPCM: case AV_CODEC_ID_XAN_DPCM:
out = buf_size - 2 * s->channels; out = buf_size - 2 * s->channels;
break; break;
case CODEC_ID_SOL_DPCM: case AV_CODEC_ID_SOL_DPCM:
if (avctx->codec_tag != 3) if (avctx->codec_tag != 3)
out = buf_size * 2; out = buf_size * 2;
else else
@ -221,7 +221,7 @@ static int dpcm_decode_frame(AVCodecContext *avctx, void *data,
switch(avctx->codec->id) { switch(avctx->codec->id) {
case CODEC_ID_ROQ_DPCM: case AV_CODEC_ID_ROQ_DPCM:
bytestream2_skipu(&gb, 6); bytestream2_skipu(&gb, 6);
if (stereo) { if (stereo) {
@ -242,7 +242,7 @@ static int dpcm_decode_frame(AVCodecContext *avctx, void *data,
} }
break; break;
case CODEC_ID_INTERPLAY_DPCM: case AV_CODEC_ID_INTERPLAY_DPCM:
bytestream2_skipu(&gb, 6); /* skip over the stream mask and stream length */ bytestream2_skipu(&gb, 6); /* skip over the stream mask and stream length */
for (ch = 0; ch < s->channels; ch++) { for (ch = 0; ch < s->channels; ch++) {
@ -261,7 +261,7 @@ static int dpcm_decode_frame(AVCodecContext *avctx, void *data,
} }
break; break;
case CODEC_ID_XAN_DPCM: case AV_CODEC_ID_XAN_DPCM:
{ {
int shift[2] = { 4, 4 }; int shift[2] = { 4, 4 };
@ -294,7 +294,7 @@ static int dpcm_decode_frame(AVCodecContext *avctx, void *data,
} }
break; break;
} }
case CODEC_ID_SOL_DPCM: case AV_CODEC_ID_SOL_DPCM:
if (avctx->codec_tag != 3) { if (avctx->codec_tag != 3) {
uint8_t *output_samples_u8 = s->frame.data[0], uint8_t *output_samples_u8 = s->frame.data[0],
*samples_end_u8 = output_samples_u8 + out; *samples_end_u8 = output_samples_u8 + out;
@ -341,7 +341,7 @@ AVCodec ff_ ## name_ ## _decoder = { \
.long_name = NULL_IF_CONFIG_SMALL(long_name_), \ .long_name = NULL_IF_CONFIG_SMALL(long_name_), \
} }
DPCM_DECODER(CODEC_ID_INTERPLAY_DPCM, interplay_dpcm, "DPCM Interplay"); DPCM_DECODER(AV_CODEC_ID_INTERPLAY_DPCM, interplay_dpcm, "DPCM Interplay");
DPCM_DECODER(CODEC_ID_ROQ_DPCM, roq_dpcm, "DPCM id RoQ"); DPCM_DECODER(AV_CODEC_ID_ROQ_DPCM, roq_dpcm, "DPCM id RoQ");
DPCM_DECODER(CODEC_ID_SOL_DPCM, sol_dpcm, "DPCM Sol"); DPCM_DECODER(AV_CODEC_ID_SOL_DPCM, sol_dpcm, "DPCM Sol");
DPCM_DECODER(CODEC_ID_XAN_DPCM, xan_dpcm, "DPCM Xan"); DPCM_DECODER(AV_CODEC_ID_XAN_DPCM, xan_dpcm, "DPCM Xan");

@ -237,7 +237,7 @@ static av_cold int decode_end(AVCodecContext *avctx)
AVCodec ff_dpx_decoder = { AVCodec ff_dpx_decoder = {
.name = "dpx", .name = "dpx",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_DPX, .id = AV_CODEC_ID_DPX,
.priv_data_size = sizeof(DPXContext), .priv_data_size = sizeof(DPXContext),
.init = decode_init, .init = decode_init,
.close = decode_end, .close = decode_end,

@ -175,7 +175,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
AVCodec ff_dpx_encoder = { AVCodec ff_dpx_encoder = {
.name = "dpx", .name = "dpx",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_DPX, .id = AV_CODEC_ID_DPX,
.priv_data_size = sizeof(DPXContext), .priv_data_size = sizeof(DPXContext),
.init = encode_init, .init = encode_init,
.encode2 = encode_frame, .encode2 = encode_frame,

@ -375,7 +375,7 @@ static int cinaudio_decode_frame(AVCodecContext *avctx, void *data,
AVCodec ff_dsicinvideo_decoder = { AVCodec ff_dsicinvideo_decoder = {
.name = "dsicinvideo", .name = "dsicinvideo",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_DSICINVIDEO, .id = AV_CODEC_ID_DSICINVIDEO,
.priv_data_size = sizeof(CinVideoContext), .priv_data_size = sizeof(CinVideoContext),
.init = cinvideo_decode_init, .init = cinvideo_decode_init,
.close = cinvideo_decode_end, .close = cinvideo_decode_end,
@ -387,7 +387,7 @@ AVCodec ff_dsicinvideo_decoder = {
AVCodec ff_dsicinaudio_decoder = { AVCodec ff_dsicinaudio_decoder = {
.name = "dsicinaudio", .name = "dsicinaudio",
.type = AVMEDIA_TYPE_AUDIO, .type = AVMEDIA_TYPE_AUDIO,
.id = CODEC_ID_DSICINAUDIO, .id = AV_CODEC_ID_DSICINAUDIO,
.priv_data_size = sizeof(CinAudioContext), .priv_data_size = sizeof(CinAudioContext),
.init = cinaudio_decode_init, .init = cinaudio_decode_init,
.decode = cinaudio_decode_frame, .decode = cinaudio_decode_frame,

@ -979,7 +979,7 @@ static int dvvideo_encode_frame(AVCodecContext *c, AVPacket *pkt,
AVCodec ff_dvvideo_encoder = { AVCodec ff_dvvideo_encoder = {
.name = "dvvideo", .name = "dvvideo",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_DVVIDEO, .id = AV_CODEC_ID_DVVIDEO,
.priv_data_size = sizeof(DVVideoContext), .priv_data_size = sizeof(DVVideoContext),
.init = dvvideo_init_encoder, .init = dvvideo_init_encoder,
.encode2 = dvvideo_encode_frame, .encode2 = dvvideo_encode_frame,

@ -405,7 +405,7 @@ static int dvbsub_encode(AVCodecContext *avctx,
AVCodec ff_dvbsub_encoder = { AVCodec ff_dvbsub_encoder = {
.name = "dvbsub", .name = "dvbsub",
.type = AVMEDIA_TYPE_SUBTITLE, .type = AVMEDIA_TYPE_SUBTITLE,
.id = CODEC_ID_DVB_SUBTITLE, .id = AV_CODEC_ID_DVB_SUBTITLE,
.priv_data_size = sizeof(DVBSubtitleContext), .priv_data_size = sizeof(DVBSubtitleContext),
.encode = dvbsub_encode, .encode = dvbsub_encode,
.long_name = NULL_IF_CONFIG_SMALL("DVB subtitles"), .long_name = NULL_IF_CONFIG_SMALL("DVB subtitles"),

@ -172,7 +172,7 @@ static av_cold void dvbsub_parse_close(AVCodecParserContext *s)
} }
AVCodecParser ff_dvbsub_parser = { AVCodecParser ff_dvbsub_parser = {
.codec_ids = { CODEC_ID_DVB_SUBTITLE }, .codec_ids = { AV_CODEC_ID_DVB_SUBTITLE },
.priv_data_size = sizeof(DVBSubParseContext), .priv_data_size = sizeof(DVBSubParseContext),
.parser_init = dvbsub_parse_init, .parser_init = dvbsub_parse_init,
.parser_parse = dvbsub_parse, .parser_parse = dvbsub_parse,

@ -1466,7 +1466,7 @@ static int dvbsub_decode(AVCodecContext *avctx,
AVCodec ff_dvbsub_decoder = { AVCodec ff_dvbsub_decoder = {
.name = "dvbsub", .name = "dvbsub",
.type = AVMEDIA_TYPE_SUBTITLE, .type = AVMEDIA_TYPE_SUBTITLE,
.id = CODEC_ID_DVB_SUBTITLE, .id = AV_CODEC_ID_DVB_SUBTITLE,
.priv_data_size = sizeof(DVBSubContext), .priv_data_size = sizeof(DVBSubContext),
.init = dvbsub_init_decoder, .init = dvbsub_init_decoder,
.close = dvbsub_close_decoder, .close = dvbsub_close_decoder,

@ -375,7 +375,7 @@ static int dvvideo_close(AVCodecContext *c)
AVCodec ff_dvvideo_decoder = { AVCodec ff_dvvideo_decoder = {
.name = "dvvideo", .name = "dvvideo",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_DVVIDEO, .id = AV_CODEC_ID_DVVIDEO,
.priv_data_size = sizeof(DVVideoContext), .priv_data_size = sizeof(DVVideoContext),
.init = ff_dvvideo_init, .init = ff_dvvideo_init,
.close = dvvideo_close, .close = dvvideo_close,

@ -77,7 +77,7 @@ static av_cold void dvdsub_parse_close(AVCodecParserContext *s)
} }
AVCodecParser ff_dvdsub_parser = { AVCodecParser ff_dvdsub_parser = {
.codec_ids = { CODEC_ID_DVD_SUBTITLE }, .codec_ids = { AV_CODEC_ID_DVD_SUBTITLE },
.priv_data_size = sizeof(DVDSubParseContext), .priv_data_size = sizeof(DVDSubParseContext),
.parser_init = dvdsub_parse_init, .parser_init = dvdsub_parse_init,
.parser_parse = dvdsub_parse, .parser_parse = dvdsub_parse,

@ -487,7 +487,7 @@ static int dvdsub_decode(AVCodecContext *avctx,
AVCodec ff_dvdsub_decoder = { AVCodec ff_dvdsub_decoder = {
.name = "dvdsub", .name = "dvdsub",
.type = AVMEDIA_TYPE_SUBTITLE, .type = AVMEDIA_TYPE_SUBTITLE,
.id = CODEC_ID_DVD_SUBTITLE, .id = AV_CODEC_ID_DVD_SUBTITLE,
.decode = dvdsub_decode, .decode = dvdsub_decode,
.long_name = NULL_IF_CONFIG_SMALL("DVD subtitles"), .long_name = NULL_IF_CONFIG_SMALL("DVD subtitles"),
}; };

@ -218,7 +218,7 @@ static int dvdsub_encode(AVCodecContext *avctx,
AVCodec ff_dvdsub_encoder = { AVCodec ff_dvdsub_encoder = {
.name = "dvdsub", .name = "dvdsub",
.type = AVMEDIA_TYPE_SUBTITLE, .type = AVMEDIA_TYPE_SUBTITLE,
.id = CODEC_ID_DVD_SUBTITLE, .id = AV_CODEC_ID_DVD_SUBTITLE,
.encode = dvdsub_encode, .encode = dvdsub_encode,
.long_name = NULL_IF_CONFIG_SMALL("DVD subtitles"), .long_name = NULL_IF_CONFIG_SMALL("DVD subtitles"),
}; };

@ -318,7 +318,7 @@ static av_cold int decode_end(AVCodecContext *avctx)
AVCodec ff_dxa_decoder = { AVCodec ff_dxa_decoder = {
.name = "dxa", .name = "dxa",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_DXA, .id = AV_CODEC_ID_DXA,
.priv_data_size = sizeof(DxaDecContext), .priv_data_size = sizeof(DxaDecContext),
.init = decode_init, .init = decode_init,
.close = decode_end, .close = decode_end,

@ -101,7 +101,7 @@ AVCodec ff_dxtory_decoder = {
.name = "dxtory", .name = "dxtory",
.long_name = NULL_IF_CONFIG_SMALL("Dxtory"), .long_name = NULL_IF_CONFIG_SMALL("Dxtory"),
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_DXTORY, .id = AV_CODEC_ID_DXTORY,
.init = decode_init, .init = decode_init,
.close = decode_close, .close = decode_close,
.decode = decode_frame, .decode = decode_frame,

@ -442,7 +442,7 @@ static int end_frame(AVCodecContext *avctx)
AVHWAccel ff_h264_dxva2_hwaccel = { AVHWAccel ff_h264_dxva2_hwaccel = {
.name = "h264_dxva2", .name = "h264_dxva2",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_H264, .id = AV_CODEC_ID_H264,
.pix_fmt = PIX_FMT_DXVA2_VLD, .pix_fmt = PIX_FMT_DXVA2_VLD,
.start_frame = start_frame, .start_frame = start_frame,
.decode_slice = decode_slice, .decode_slice = decode_slice,

@ -263,7 +263,7 @@ static int end_frame(AVCodecContext *avctx)
AVHWAccel ff_mpeg2_dxva2_hwaccel = { AVHWAccel ff_mpeg2_dxva2_hwaccel = {
.name = "mpeg2_dxva2", .name = "mpeg2_dxva2",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_MPEG2VIDEO, .id = AV_CODEC_ID_MPEG2VIDEO,
.pix_fmt = PIX_FMT_DXVA2_VLD, .pix_fmt = PIX_FMT_DXVA2_VLD,
.start_frame = start_frame, .start_frame = start_frame,
.decode_slice = decode_slice, .decode_slice = decode_slice,

@ -167,7 +167,7 @@ static int commit_bitstream_and_slice_buffer(AVCodecContext *avctx,
DXVA_SliceInfo *slice = &ctx_pic->si; DXVA_SliceInfo *slice = &ctx_pic->si;
static const uint8_t start_code[] = { 0, 0, 1, 0x0d }; 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 slice_size = slice->dwSliceBitsInBuffer / 8;
const unsigned padding = 128 - ((start_code_size + slice_size) & 127); const unsigned padding = 128 - ((start_code_size + slice_size) & 127);
const unsigned data_size = start_code_size + slice_size + padding; 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) if (ctx_pic->bitstream_size > 0)
return -1; return -1;
if (avctx->codec_id == CODEC_ID_VC1 && if (avctx->codec_id == AV_CODEC_ID_VC1 &&
size >= 4 && IS_MARKER(AV_RB32(buffer))) { size >= 4 && IS_MARKER(AV_RB32(buffer))) {
buffer += 4; buffer += 4;
size -= 4; size -= 4;
@ -268,7 +268,7 @@ static int end_frame(AVCodecContext *avctx)
AVHWAccel ff_wmv3_dxva2_hwaccel = { AVHWAccel ff_wmv3_dxva2_hwaccel = {
.name = "wmv3_dxva2", .name = "wmv3_dxva2",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_WMV3, .id = AV_CODEC_ID_WMV3,
.pix_fmt = PIX_FMT_DXVA2_VLD, .pix_fmt = PIX_FMT_DXVA2_VLD,
.start_frame = start_frame, .start_frame = start_frame,
.decode_slice = decode_slice, .decode_slice = decode_slice,
@ -280,7 +280,7 @@ AVHWAccel ff_wmv3_dxva2_hwaccel = {
AVHWAccel ff_vc1_dxva2_hwaccel = { AVHWAccel ff_vc1_dxva2_hwaccel = {
.name = "vc1_dxva2", .name = "vc1_dxva2",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_VC1, .id = AV_CODEC_ID_VC1,
.pix_fmt = PIX_FMT_DXVA2_VLD, .pix_fmt = PIX_FMT_DXVA2_VLD,
.start_frame = start_frame, .start_frame = start_frame,
.decode_slice = decode_slice, .decode_slice = decode_slice,

@ -249,7 +249,7 @@ void ff_eac3_output_frame_header(AC3EncodeContext *s)
AVCodec ff_eac3_encoder = { AVCodec ff_eac3_encoder = {
.name = "eac3", .name = "eac3",
.type = AVMEDIA_TYPE_AUDIO, .type = AVMEDIA_TYPE_AUDIO,
.id = CODEC_ID_EAC3, .id = AV_CODEC_ID_EAC3,
.priv_data_size = sizeof(AC3EncodeContext), .priv_data_size = sizeof(AC3EncodeContext),
.init = ff_ac3_encode_init, .init = ff_ac3_encode_init,
.encode2 = ff_ac3_float_encode_frame, .encode2 = ff_ac3_float_encode_frame,

@ -211,7 +211,7 @@ static av_cold int cmv_decode_end(AVCodecContext *avctx){
AVCodec ff_eacmv_decoder = { AVCodec ff_eacmv_decoder = {
.name = "eacmv", .name = "eacmv",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_CMV, .id = AV_CODEC_ID_CMV,
.priv_data_size = sizeof(CmvContext), .priv_data_size = sizeof(CmvContext),
.init = cmv_decode_init, .init = cmv_decode_init,
.close = cmv_decode_end, .close = cmv_decode_end,

@ -296,7 +296,7 @@ static av_cold int decode_end(AVCodecContext *avctx)
AVCodec ff_eamad_decoder = { AVCodec ff_eamad_decoder = {
.name = "eamad", .name = "eamad",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_MAD, .id = AV_CODEC_ID_MAD,
.priv_data_size = sizeof(MadContext), .priv_data_size = sizeof(MadContext),
.init = decode_init, .init = decode_init,
.close = decode_end, .close = decode_end,

@ -242,7 +242,7 @@ static av_cold int tgq_decode_end(AVCodecContext *avctx){
AVCodec ff_eatgq_decoder = { AVCodec ff_eatgq_decoder = {
.name = "eatgq", .name = "eatgq",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_TGQ, .id = AV_CODEC_ID_TGQ,
.priv_data_size = sizeof(TgqContext), .priv_data_size = sizeof(TgqContext),
.init = tgq_decode_init, .init = tgq_decode_init,
.close = tgq_decode_end, .close = tgq_decode_end,

@ -345,7 +345,7 @@ static av_cold int tgv_decode_end(AVCodecContext *avctx)
AVCodec ff_eatgv_decoder = { AVCodec ff_eatgv_decoder = {
.name = "eatgv", .name = "eatgv",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_TGV, .id = AV_CODEC_ID_TGV,
.priv_data_size = sizeof(TgvContext), .priv_data_size = sizeof(TgvContext),
.init = tgv_decode_init, .init = tgv_decode_init,
.close = tgv_decode_end, .close = tgv_decode_end,

@ -154,7 +154,7 @@ static av_cold int tqi_decode_end(AVCodecContext *avctx)
AVCodec ff_eatqi_decoder = { AVCodec ff_eatqi_decoder = {
.name = "eatqi", .name = "eatqi",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_TQI, .id = AV_CODEC_ID_TQI,
.priv_data_size = sizeof(TqiContext), .priv_data_size = sizeof(TqiContext),
.init = tqi_decode_init, .init = tqi_decode_init,
.close = tqi_decode_end, .close = tqi_decode_end,

@ -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[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); 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; H264Context *h = (void*)s;
h->mb_xy = s->mb_x + s->mb_y * s->mb_stride; 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)); 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) 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; H264Context *h = (void*)s;
assert(s->quarter_sample); assert(s->quarter_sample);
*mv_step = 4; *mv_step = 4;
@ -599,7 +599,7 @@ skip_mean_and_median:
pred_count++; pred_count++;
if (!fixed[mb_xy]) { if (!fixed[mb_xy]) {
if (s->avctx->codec_id == CODEC_ID_H264) { if (s->avctx->codec_id == AV_CODEC_ID_H264) {
// FIXME // FIXME
} else { } else {
ff_thread_await_progress(&s->last_picture_ptr->f, ff_thread_await_progress(&s->last_picture_ptr->f,
@ -730,7 +730,7 @@ static int is_intra_more_likely(MpegEncContext *s)
undamaged_count++; undamaged_count++;
} }
if (s->codec_id == CODEC_ID_H264) { if (s->codec_id == AV_CODEC_ID_H264) {
H264Context *h = (void*) s; H264Context *h = (void*) s;
if (h->list_count <= 0 || h->ref_count[0] <= 0 || if (h->list_count <= 0 || h->ref_count[0] <= 0 ||
!h->ref_list[0][0].f.data[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] + uint8_t *last_mb_ptr = s->last_picture.f.data[0] +
mb_x * 16 + mb_y * 16 * s->linesize; 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 // FIXME
} else { } else {
ff_thread_await_progress(&s->last_picture_ptr->f, 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_pp = s->pp_time;
int time_pb = s->pb_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 // FIXME
} else { } else {
ff_thread_await_progress(&s->next_picture_ptr->f, mb_y, 0); ff_thread_await_progress(&s->next_picture_ptr->f, mb_y, 0);

@ -366,7 +366,7 @@ static int escape124_decode_frame(AVCodecContext *avctx,
AVCodec ff_escape124_decoder = { AVCodec ff_escape124_decoder = {
.name = "escape124", .name = "escape124",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_ESCAPE124, .id = AV_CODEC_ID_ESCAPE124,
.priv_data_size = sizeof(Escape124Context), .priv_data_size = sizeof(Escape124Context),
.init = escape124_decode_init, .init = escape124_decode_init,
.close = escape124_decode_close, .close = escape124_decode_close,

@ -1738,7 +1738,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
AVCodec ff_ffv1_decoder = { AVCodec ff_ffv1_decoder = {
.name = "ffv1", .name = "ffv1",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_FFV1, .id = AV_CODEC_ID_FFV1,
.priv_data_size = sizeof(FFV1Context), .priv_data_size = sizeof(FFV1Context),
.init = decode_init, .init = decode_init,
.close = common_end, .close = common_end,
@ -1752,7 +1752,7 @@ AVCodec ff_ffv1_decoder = {
AVCodec ff_ffv1_encoder = { AVCodec ff_ffv1_encoder = {
.name = "ffv1", .name = "ffv1",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_FFV1, .id = AV_CODEC_ID_FFV1,
.priv_data_size = sizeof(FFV1Context), .priv_data_size = sizeof(FFV1Context),
.init = encode_init, .init = encode_init,
.encode2 = encode_frame, .encode2 = encode_frame,

@ -675,7 +675,7 @@ static void flac_parse_close(AVCodecParserContext *c)
} }
AVCodecParser ff_flac_parser = { AVCodecParser ff_flac_parser = {
.codec_ids = { CODEC_ID_FLAC }, .codec_ids = { AV_CODEC_ID_FLAC },
.priv_data_size = sizeof(FLACParseContext), .priv_data_size = sizeof(FLACParseContext),
.parser_init = flac_parse_init, .parser_init = flac_parse_init,
.parser_parse = flac_parse, .parser_parse = flac_parse,

@ -561,7 +561,7 @@ static av_cold int flac_decode_close(AVCodecContext *avctx)
AVCodec ff_flac_decoder = { AVCodec ff_flac_decoder = {
.name = "flac", .name = "flac",
.type = AVMEDIA_TYPE_AUDIO, .type = AVMEDIA_TYPE_AUDIO,
.id = CODEC_ID_FLAC, .id = AV_CODEC_ID_FLAC,
.priv_data_size = sizeof(FLACContext), .priv_data_size = sizeof(FLACContext),
.init = flac_decode_init, .init = flac_decode_init,
.close = flac_decode_close, .close = flac_decode_close,

@ -1304,7 +1304,7 @@ static const AVClass flac_encoder_class = {
AVCodec ff_flac_encoder = { AVCodec ff_flac_encoder = {
.name = "flac", .name = "flac",
.type = AVMEDIA_TYPE_AUDIO, .type = AVMEDIA_TYPE_AUDIO,
.id = CODEC_ID_FLAC, .id = AV_CODEC_ID_FLAC,
.priv_data_size = sizeof(FlacEncodeContext), .priv_data_size = sizeof(FlacEncodeContext),
.init = flac_encode_init, .init = flac_encode_init,
.encode2 = flac_encode_frame, .encode2 = flac_encode_frame,

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

Loading…
Cancel
Save