summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-08-07 22:45:46 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-08-07 22:45:46 +0200
commit7a72695c05f12f21a62dc99fa64d1726fc11b236 (patch)
treee8f1a2813c4cd1fd8bd0ac5f764c7fd676ab85af
parent49440853d0c1e740daee0e2df1e65d5e67b1ad6b (diff)
parent36ef5369ee9b336febc2c270f8718cec4476cb85 (diff)
downloadffmpeg-7a72695c05f12f21a62dc99fa64d1726fc11b236.tar.gz
Merge commit '36ef5369ee9b336febc2c270f8718cec4476cb85'
* commit '36ef5369ee9b336febc2c270f8718cec4476cb85': Replace all CODEC_ID_* with AV_CODEC_ID_* lavc: add AV prefix to codec ids. Conflicts: doc/APIchanges doc/examples/decoding_encoding.c doc/examples/muxing.c ffmpeg.c ffprobe.c ffserver.c libavcodec/8svx.c libavcodec/avcodec.h libavcodec/dnxhd_parser.c libavcodec/dvdsubdec.c libavcodec/error_resilience.c libavcodec/h263dec.c libavcodec/libvorbisenc.c libavcodec/mjpeg_parser.c libavcodec/mjpegenc.c libavcodec/mpeg12.c libavcodec/mpeg4videodec.c libavcodec/mpegvideo.c libavcodec/mpegvideo_enc.c libavcodec/pcm.c libavcodec/r210dec.c libavcodec/utils.c libavcodec/v210dec.c libavcodec/version.h libavdevice/alsa-audio-dec.c libavdevice/bktr.c libavdevice/v4l2.c libavformat/asfdec.c libavformat/asfenc.c libavformat/avformat.h libavformat/avidec.c libavformat/caf.c libavformat/electronicarts.c libavformat/flacdec.c libavformat/flvdec.c libavformat/flvenc.c libavformat/framecrcenc.c libavformat/img2.c libavformat/img2dec.c libavformat/img2enc.c libavformat/ipmovie.c libavformat/isom.c libavformat/matroska.c libavformat/matroskadec.c libavformat/matroskaenc.c libavformat/mov.c libavformat/movenc.c libavformat/mp3dec.c libavformat/mpeg.c libavformat/mpegts.c libavformat/mxf.c libavformat/mxfdec.c libavformat/mxfenc.c libavformat/nsvdec.c libavformat/nut.c libavformat/oggenc.c libavformat/pmpdec.c libavformat/rawdec.c libavformat/rawenc.c libavformat/riff.c libavformat/sdp.c libavformat/utils.c libavformat/vocenc.c libavformat/wtv.c libavformat/xmv.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--cmdutils.c2
-rw-r--r--cmdutils.h2
-rw-r--r--doc/APIchanges3
-rw-r--r--doc/developer.texi2
-rw-r--r--doc/examples/decoding_encoding.c12
-rw-r--r--doc/examples/muxing.c12
-rw-r--r--ffmpeg.c40
-rw-r--r--ffprobe.c4
-rw-r--r--ffserver.c36
-rw-r--r--libavcodec/4xm.c2
-rw-r--r--libavcodec/8bps.c2
-rw-r--r--libavcodec/8svx.c14
-rw-r--r--libavcodec/Makefile1
-rw-r--r--libavcodec/a64multienc.c6
-rw-r--r--libavcodec/aac_ac3_parser.c6
-rw-r--r--libavcodec/aac_ac3_parser.h2
-rw-r--r--libavcodec/aac_parser.c2
-rw-r--r--libavcodec/aacdec.c4
-rw-r--r--libavcodec/aacenc.c2
-rw-r--r--libavcodec/aasc.c2
-rw-r--r--libavcodec/ac3_parser.c8
-rw-r--r--libavcodec/ac3dec.c4
-rw-r--r--libavcodec/ac3enc.c2
-rw-r--r--libavcodec/ac3enc_fixed.c2
-rw-r--r--libavcodec/ac3enc_float.c2
-rw-r--r--libavcodec/adpcm.c206
-rw-r--r--libavcodec/adpcmenc.c52
-rw-r--r--libavcodec/adx_parser.c2
-rw-r--r--libavcodec/adxdec.c2
-rw-r--r--libavcodec/adxenc.c2
-rw-r--r--libavcodec/alac.c2
-rw-r--r--libavcodec/alacenc.c2
-rw-r--r--libavcodec/alsdec.c2
-rw-r--r--libavcodec/amrnbdec.c2
-rw-r--r--libavcodec/amrwbdec.c2
-rw-r--r--libavcodec/anm.c2
-rw-r--r--libavcodec/ansi.c2
-rw-r--r--libavcodec/apedec.c2
-rw-r--r--libavcodec/arm/h264pred_init_arm.c6
-rw-r--r--libavcodec/arm/vp56dsp_init_arm.c4
-rw-r--r--libavcodec/assdec.c2
-rw-r--r--libavcodec/assenc.c2
-rw-r--r--libavcodec/asv1.c22
-rw-r--r--libavcodec/atrac1.c2
-rw-r--r--libavcodec/atrac3.c2
-rw-r--r--libavcodec/aura.c2
-rw-r--r--libavcodec/avcodec.h722
-rw-r--r--libavcodec/avs.c2
-rw-r--r--libavcodec/avuidec.c2
-rw-r--r--libavcodec/avuienc.c2
-rw-r--r--libavcodec/bethsoftvideo.c2
-rw-r--r--libavcodec/bfi.c2
-rw-r--r--libavcodec/bink.c2
-rw-r--r--libavcodec/binkaudio.c12
-rw-r--r--libavcodec/bintext.c10
-rw-r--r--libavcodec/bmp.c2
-rw-r--r--libavcodec/bmp_parser.c2
-rw-r--r--libavcodec/bmpenc.c2
-rw-r--r--libavcodec/bmv.c4
-rw-r--r--libavcodec/c93.c2
-rw-r--r--libavcodec/cavs_parser.c2
-rw-r--r--libavcodec/cavsdec.c2
-rw-r--r--libavcodec/cdgraphics.c2
-rw-r--r--libavcodec/cdxl.c2
-rw-r--r--libavcodec/cinepak.c2
-rw-r--r--libavcodec/cljr.c4
-rw-r--r--libavcodec/cllc.c2
-rwxr-xr-xlibavcodec/codec_names.sh8
-rw-r--r--libavcodec/cook.c2
-rw-r--r--libavcodec/cook_parser.c2
-rw-r--r--libavcodec/crystalhd.c30
-rw-r--r--libavcodec/cscd.c2
-rw-r--r--libavcodec/cyuv.c6
-rw-r--r--libavcodec/dca_parser.c2
-rw-r--r--libavcodec/dcadec.c2
-rw-r--r--libavcodec/dcaenc.c2
-rw-r--r--libavcodec/dfa.c2
-rw-r--r--libavcodec/dirac_parser.c2
-rw-r--r--libavcodec/diracdec.c2
-rw-r--r--libavcodec/dnxhd_parser.c2
-rw-r--r--libavcodec/dnxhddec.c2
-rw-r--r--libavcodec/dnxhdenc.c2
-rw-r--r--libavcodec/dpcm.c30
-rw-r--r--libavcodec/dpx.c2
-rw-r--r--libavcodec/dpxenc.c2
-rw-r--r--libavcodec/dsicinav.c4
-rw-r--r--libavcodec/dv.c2
-rw-r--r--libavcodec/dvbsub.c2
-rw-r--r--libavcodec/dvbsub_parser.c2
-rw-r--r--libavcodec/dvbsubdec.c2
-rw-r--r--libavcodec/dvdec.c2
-rw-r--r--libavcodec/dvdsub_parser.c2
-rw-r--r--libavcodec/dvdsubdec.c2
-rw-r--r--libavcodec/dvdsubenc.c2
-rw-r--r--libavcodec/dxa.c2
-rw-r--r--libavcodec/dxtory.c2
-rw-r--r--libavcodec/dxva2_h264.c2
-rw-r--r--libavcodec/dxva2_mpeg2.c2
-rw-r--r--libavcodec/dxva2_vc1.c8
-rw-r--r--libavcodec/eac3enc.c2
-rw-r--r--libavcodec/eacmv.c2
-rw-r--r--libavcodec/eamad.c2
-rw-r--r--libavcodec/eatgq.c2
-rw-r--r--libavcodec/eatgv.c2
-rw-r--r--libavcodec/eatqi.c2
-rw-r--r--libavcodec/error_resilience.c12
-rw-r--r--libavcodec/escape124.c2
-rw-r--r--libavcodec/escape130.c2
-rw-r--r--libavcodec/exr.c2
-rw-r--r--libavcodec/ffv1.c4
-rw-r--r--libavcodec/ffwavesynth.c2
-rw-r--r--libavcodec/flac_parser.c2
-rw-r--r--libavcodec/flacdec.c2
-rw-r--r--libavcodec/flacenc.c2
-rw-r--r--libavcodec/flashsv.c4
-rw-r--r--libavcodec/flashsv2enc.c2
-rw-r--r--libavcodec/flashsvenc.c2
-rw-r--r--libavcodec/flicvideo.c2
-rw-r--r--libavcodec/flvdec.c2
-rw-r--r--libavcodec/flvenc.c2
-rw-r--r--libavcodec/fraps.c2
-rw-r--r--libavcodec/frwu.c2
-rw-r--r--libavcodec/g722dec.c2
-rw-r--r--libavcodec/g722enc.c2
-rw-r--r--libavcodec/g723_1.c4
-rw-r--r--libavcodec/g726.c4
-rw-r--r--libavcodec/g729dec.c2
-rw-r--r--libavcodec/gif.c2
-rw-r--r--libavcodec/gifdec.c2
-rw-r--r--libavcodec/gsm_parser.c6
-rw-r--r--libavcodec/gsmdec.c12
-rw-r--r--libavcodec/h261_parser.c2
-rw-r--r--libavcodec/h261dec.c2
-rw-r--r--libavcodec/h261enc.c2
-rw-r--r--libavcodec/h263_parser.c2
-rw-r--r--libavcodec/h263dec.c56
-rw-r--r--libavcodec/h264.c10
-rw-r--r--libavcodec/h264_mb_template.c2
-rw-r--r--libavcodec/h264_parser.c2
-rw-r--r--libavcodec/h264pred.c22
-rw-r--r--libavcodec/huffyuv.c10
-rw-r--r--libavcodec/idcinvideo.c2
-rw-r--r--libavcodec/iff.c4
-rw-r--r--libavcodec/imc.c12
-rw-r--r--libavcodec/imx_dump_header_bsf.c2
-rw-r--r--libavcodec/indeo2.c2
-rw-r--r--libavcodec/indeo3.c2
-rw-r--r--libavcodec/indeo4.c2
-rw-r--r--libavcodec/indeo5.c2
-rw-r--r--libavcodec/intelh263dec.c2
-rw-r--r--libavcodec/internal.h2
-rw-r--r--libavcodec/interplayvideo.c2
-rw-r--r--libavcodec/ituh263dec.c10
-rw-r--r--libavcodec/ituh263enc.c8
-rw-r--r--libavcodec/ivi_common.c6
-rw-r--r--libavcodec/j2kdec.c2
-rw-r--r--libavcodec/j2kenc.c2
-rw-r--r--libavcodec/jacosubdec.c2
-rw-r--r--libavcodec/jpeglsdec.c2
-rw-r--r--libavcodec/jpeglsenc.c2
-rw-r--r--libavcodec/jvdec.c2
-rw-r--r--libavcodec/kgv1dec.c2
-rw-r--r--libavcodec/kmvc.c2
-rw-r--r--libavcodec/lagarith.c2
-rw-r--r--libavcodec/latm_parser.c2
-rw-r--r--libavcodec/lcldec.c24
-rw-r--r--libavcodec/lclenc.c2
-rw-r--r--libavcodec/libaacplus.c2
-rw-r--r--libavcodec/libcelt_dec.c2
-rw-r--r--libavcodec/libfaac.c2
-rw-r--r--libavcodec/libfdk-aacenc.c2
-rw-r--r--libavcodec/libgsm.c22
-rw-r--r--libavcodec/libilbc.c4
-rw-r--r--libavcodec/libmp3lame.c2
-rw-r--r--libavcodec/libopencore-amr.c8
-rw-r--r--libavcodec/libopenjpegdec.c2
-rw-r--r--libavcodec/libopenjpegenc.c2
-rw-r--r--libavcodec/libopus_dec.c2
-rw-r--r--libavcodec/libschroedingerdec.c2
-rw-r--r--libavcodec/libschroedingerenc.c2
-rw-r--r--libavcodec/libspeexdec.c2
-rw-r--r--libavcodec/libspeexenc.c2
-rw-r--r--libavcodec/libstagefright.cpp2
-rw-r--r--libavcodec/libtheoraenc.c2
-rw-r--r--libavcodec/libtwolame.c2
-rw-r--r--libavcodec/libutvideodec.cpp2
-rw-r--r--libavcodec/libutvideoenc.cpp2
-rw-r--r--libavcodec/libvo-aacenc.c2
-rw-r--r--libavcodec/libvo-amrwbenc.c2
-rw-r--r--libavcodec/libvorbisdec.c2
-rw-r--r--libavcodec/libvorbisenc.c2
-rw-r--r--libavcodec/libvpxdec.c2
-rw-r--r--libavcodec/libvpxenc.c2
-rw-r--r--libavcodec/libx264.c4
-rw-r--r--libavcodec/libxavs.c2
-rw-r--r--libavcodec/libxvid.c4
-rw-r--r--libavcodec/ljpegenc.c2
-rw-r--r--libavcodec/loco.c2
-rw-r--r--libavcodec/mace.c6
-rw-r--r--libavcodec/mdec.c2
-rw-r--r--libavcodec/microdvddec.c2
-rw-r--r--libavcodec/mimic.c2
-rw-r--r--libavcodec/mjpeg_parser.c2
-rw-r--r--libavcodec/mjpega_dump_header_bsf.c2
-rw-r--r--libavcodec/mjpegbdec.c2
-rw-r--r--libavcodec/mjpegdec.c10
-rw-r--r--libavcodec/mjpegenc.c16
-rw-r--r--libavcodec/mlp_parser.c2
-rw-r--r--libavcodec/mlpdec.c24
-rw-r--r--libavcodec/mmvideo.c2
-rw-r--r--libavcodec/motion_est.c16
-rw-r--r--libavcodec/motionpixels.c2
-rw-r--r--libavcodec/movtextdec.c2
-rw-r--r--libavcodec/movtextenc.c2
-rw-r--r--libavcodec/mpc7.c2
-rw-r--r--libavcodec/mpc8.c2
-rw-r--r--libavcodec/mpeg12.c38
-rw-r--r--libavcodec/mpeg12enc.c26
-rw-r--r--libavcodec/mpeg4video_parser.c2
-rw-r--r--libavcodec/mpeg4videodec.c6
-rw-r--r--libavcodec/mpeg4videoenc.c2
-rw-r--r--libavcodec/mpegaudio_parser.c2
-rw-r--r--libavcodec/mpegaudiodec.c12
-rw-r--r--libavcodec/mpegaudiodec_float.c10
-rw-r--r--libavcodec/mpegaudiodecheader.c6
-rw-r--r--libavcodec/mpegaudioenc.c2
-rw-r--r--libavcodec/mpegvideo.c40
-rw-r--r--libavcodec/mpegvideo.h2
-rw-r--r--libavcodec/mpegvideo_common.h6
-rw-r--r--libavcodec/mpegvideo_enc.c222
-rw-r--r--libavcodec/mpegvideo_parser.c6
-rw-r--r--libavcodec/msmpeg4.c8
-rw-r--r--libavcodec/msrle.c2
-rw-r--r--libavcodec/mss1.c2
-rw-r--r--libavcodec/mss3.c2
-rw-r--r--libavcodec/mss4.c2
-rw-r--r--libavcodec/msvideo1.c2
-rw-r--r--libavcodec/msvideo1enc.c2
-rw-r--r--libavcodec/mxpegdec.c2
-rw-r--r--libavcodec/nellymoserdec.c2
-rw-r--r--libavcodec/nellymoserenc.c2
-rw-r--r--libavcodec/nuv.c2
-rw-r--r--libavcodec/old_codec_ids.h399
-rw-r--r--libavcodec/paf.c4
-rw-r--r--libavcodec/pamenc.c2
-rw-r--r--libavcodec/parser.c2
-rw-r--r--libavcodec/pcm-mpeg.c2
-rw-r--r--libavcodec/pcm.c188
-rw-r--r--libavcodec/pcx.c2
-rw-r--r--libavcodec/pcxenc.c2
-rw-r--r--libavcodec/pgssubdec.c2
-rw-r--r--libavcodec/pictordec.c2
-rw-r--r--libavcodec/png_parser.c2
-rw-r--r--libavcodec/pngdec.c2
-rw-r--r--libavcodec/pngenc.c2
-rw-r--r--libavcodec/pnm.c2
-rw-r--r--libavcodec/pnm_parser.c4
-rw-r--r--libavcodec/pnmdec.c10
-rw-r--r--libavcodec/pnmenc.c8
-rw-r--r--libavcodec/proresdec2.c2
-rw-r--r--libavcodec/proresdec_lgpl.c2
-rw-r--r--libavcodec/proresenc_anatoliy.c4
-rw-r--r--libavcodec/proresenc_kostya.c2
-rw-r--r--libavcodec/psymodel.c4
-rw-r--r--libavcodec/pthread.c2
-rw-r--r--libavcodec/ptx.c2
-rw-r--r--libavcodec/qcelpdec.c2
-rw-r--r--libavcodec/qdm2.c2
-rw-r--r--libavcodec/qdrw.c2
-rw-r--r--libavcodec/qpeg.c2
-rw-r--r--libavcodec/qtrle.c2
-rw-r--r--libavcodec/qtrleenc.c2
-rw-r--r--libavcodec/r210dec.c12
-rw-r--r--libavcodec/r210enc.c12
-rw-r--r--libavcodec/ra144dec.c2
-rw-r--r--libavcodec/ra144enc.c2
-rw-r--r--libavcodec/ra288.c2
-rw-r--r--libavcodec/ralf.c2
-rw-r--r--libavcodec/ratecontrol.c2
-rw-r--r--libavcodec/rawdec.c2
-rw-r--r--libavcodec/rawenc.c2
-rw-r--r--libavcodec/realtextdec.c2
-rw-r--r--libavcodec/rl2.c2
-rw-r--r--libavcodec/roqaudioenc.c2
-rw-r--r--libavcodec/roqvideodec.c2
-rw-r--r--libavcodec/roqvideoenc.c2
-rw-r--r--libavcodec/rpza.c2
-rw-r--r--libavcodec/rv10.c8
-rw-r--r--libavcodec/rv10enc.c2
-rw-r--r--libavcodec/rv20enc.c2
-rw-r--r--libavcodec/rv30.c2
-rw-r--r--libavcodec/rv34.c6
-rw-r--r--libavcodec/rv34_parser.c6
-rw-r--r--libavcodec/rv40.c2
-rw-r--r--libavcodec/s302m.c2
-rw-r--r--libavcodec/samidec.c2
-rw-r--r--libavcodec/sanm.c2
-rw-r--r--libavcodec/sgidec.c2
-rw-r--r--libavcodec/sgienc.c2
-rw-r--r--libavcodec/shorten.c2
-rw-r--r--libavcodec/sipr.c2
-rw-r--r--libavcodec/smacker.c4
-rw-r--r--libavcodec/smc.c2
-rw-r--r--libavcodec/snowdec.c2
-rw-r--r--libavcodec/snowenc.c2
-rw-r--r--libavcodec/sonic.c8
-rw-r--r--libavcodec/sp5xdec.c6
-rw-r--r--libavcodec/srtdec.c2
-rw-r--r--libavcodec/srtenc.c2
-rw-r--r--libavcodec/subviewerdec.c2
-rw-r--r--libavcodec/sunrast.c2
-rw-r--r--libavcodec/sunrastenc.c2
-rw-r--r--libavcodec/svq1dec.c2
-rw-r--r--libavcodec/svq1enc.c2
-rw-r--r--libavcodec/svq3.c2
-rw-r--r--libavcodec/targa.c2
-rw-r--r--libavcodec/targaenc.c2
-rw-r--r--libavcodec/tiertexseqv.c2
-rw-r--r--libavcodec/tiff.c2
-rw-r--r--libavcodec/tiffenc.c2
-rw-r--r--libavcodec/tmv.c2
-rw-r--r--libavcodec/truemotion1.c2
-rw-r--r--libavcodec/truemotion2.c2
-rw-r--r--libavcodec/truespeech.c2
-rw-r--r--libavcodec/tscc.c2
-rw-r--r--libavcodec/tscc2.c2
-rw-r--r--libavcodec/tta.c2
-rw-r--r--libavcodec/twinvq.c2
-rw-r--r--libavcodec/txd.c2
-rw-r--r--libavcodec/ulti.c2
-rw-r--r--libavcodec/utils.c238
-rw-r--r--libavcodec/utvideo.c2
-rw-r--r--libavcodec/v210dec.c2
-rw-r--r--libavcodec/v210enc.c2
-rw-r--r--libavcodec/v210x.c2
-rw-r--r--libavcodec/v308dec.c2
-rw-r--r--libavcodec/v308enc.c2
-rw-r--r--libavcodec/v408dec.c6
-rw-r--r--libavcodec/v408enc.c6
-rw-r--r--libavcodec/v410dec.c2
-rw-r--r--libavcodec/v410enc.c2
-rw-r--r--libavcodec/vaapi_h264.c2
-rw-r--r--libavcodec/vaapi_mpeg2.c2
-rw-r--r--libavcodec/vaapi_mpeg4.c10
-rw-r--r--libavcodec/vaapi_vc1.c6
-rw-r--r--libavcodec/vb.c2
-rw-r--r--libavcodec/vble.c2
-rw-r--r--libavcodec/vc1_parser.c2
-rw-r--r--libavcodec/vc1dec.c32
-rw-r--r--libavcodec/vcr1.c4
-rw-r--r--libavcodec/vda_h264.c2
-rw-r--r--libavcodec/vdpau.c6
-rw-r--r--libavcodec/version.h5
-rw-r--r--libavcodec/vima.c2
-rw-r--r--libavcodec/vmdav.c4
-rw-r--r--libavcodec/vmnc.c2
-rw-r--r--libavcodec/vorbis_parser.c2
-rw-r--r--libavcodec/vorbisdec.c2
-rw-r--r--libavcodec/vorbisenc.c2
-rw-r--r--libavcodec/vp3.c6
-rw-r--r--libavcodec/vp3_parser.c6
-rw-r--r--libavcodec/vp5.c2
-rw-r--r--libavcodec/vp56.c4
-rw-r--r--libavcodec/vp56dsp.c4
-rw-r--r--libavcodec/vp56dsp.h6
-rw-r--r--libavcodec/vp6.c10
-rw-r--r--libavcodec/vp8.c4
-rw-r--r--libavcodec/vp8_parser.c2
-rw-r--r--libavcodec/vqavideo.c2
-rw-r--r--libavcodec/wavpack.c2
-rw-r--r--libavcodec/wma.c2
-rw-r--r--libavcodec/wmadec.c10
-rw-r--r--libavcodec/wmaenc.c8
-rw-r--r--libavcodec/wmalosslessdec.c2
-rw-r--r--libavcodec/wmaprodec.c2
-rw-r--r--libavcodec/wmavoice.c2
-rw-r--r--libavcodec/wmv2dec.c2
-rw-r--r--libavcodec/wmv2enc.c2
-rw-r--r--libavcodec/wnv1.c2
-rw-r--r--libavcodec/ws-snd1.c2
-rw-r--r--libavcodec/x86/dsputil_mmx.c8
-rw-r--r--libavcodec/x86/h264_intrapred_init.c32
-rw-r--r--libavcodec/x86/motion_est_mmx.c2
-rw-r--r--libavcodec/x86/vp56dsp_init.c4
-rw-r--r--libavcodec/xan.c4
-rw-r--r--libavcodec/xbmdec.c2
-rw-r--r--libavcodec/xbmenc.c2
-rw-r--r--libavcodec/xl.c2
-rw-r--r--libavcodec/xsubdec.c2
-rw-r--r--libavcodec/xsubenc.c2
-rw-r--r--libavcodec/xwddec.c2
-rw-r--r--libavcodec/xwdenc.c2
-rw-r--r--libavcodec/xxan.c2
-rw-r--r--libavcodec/y41pdec.c2
-rw-r--r--libavcodec/y41penc.c2
-rw-r--r--libavcodec/yop.c2
-rw-r--r--libavcodec/yuv4dec.c2
-rw-r--r--libavcodec/yuv4enc.c2
-rw-r--r--libavcodec/zerocodec.c2
-rw-r--r--libavcodec/zmbv.c2
-rw-r--r--libavcodec/zmbvenc.c2
-rw-r--r--libavdevice/alsa-audio-common.c72
-rw-r--r--libavdevice/alsa-audio-dec.c2
-rw-r--r--libavdevice/alsa-audio-enc.c4
-rw-r--r--libavdevice/alsa-audio.h10
-rw-r--r--libavdevice/bktr.c2
-rw-r--r--libavdevice/caca.c6
-rw-r--r--libavdevice/dshow.c18
-rw-r--r--libavdevice/fbdev.c2
-rw-r--r--libavdevice/jack_audio.c4
-rw-r--r--libavdevice/lavfi.c4
-rw-r--r--libavdevice/libcdio.c4
-rw-r--r--libavdevice/libdc1394.c2
-rw-r--r--libavdevice/openal-dec.c8
-rw-r--r--libavdevice/oss_audio.c10
-rw-r--r--libavdevice/pulse.c28
-rw-r--r--libavdevice/sdl.c6
-rw-r--r--libavdevice/sndio_common.c2
-rw-r--r--libavdevice/sndio_common.h2
-rw-r--r--libavdevice/sndio_enc.c4
-rw-r--r--libavdevice/v4l.c2
-rw-r--r--libavdevice/v4l2.c62
-rw-r--r--libavdevice/vfwcap.c12
-rw-r--r--libavdevice/x11grab.c2
-rw-r--r--libavfilter/libmpcodecs/vf_mcdeint.c2
-rw-r--r--libavfilter/libmpcodecs/vf_uspp.c2
-rw-r--r--libavformat/4xm.c8
-rw-r--r--libavformat/a64.c10
-rw-r--r--libavformat/aacdec.c2
-rw-r--r--libavformat/ac3dec.c14
-rw-r--r--libavformat/act.c2
-rw-r--r--libavformat/adtsenc.c4
-rw-r--r--libavformat/adxdec.c2
-rw-r--r--libavformat/aea.c2
-rw-r--r--libavformat/aiff.h36
-rw-r--r--libavformat/aiffdec.c34
-rw-r--r--libavformat/aiffenc.c4
-rw-r--r--libavformat/amr.c18
-rw-r--r--libavformat/anm.c2
-rw-r--r--libavformat/apc.c2
-rw-r--r--libavformat/ape.c2
-rw-r--r--libavformat/apetag.c4
-rw-r--r--libavformat/asfdec.c14
-rw-r--r--libavformat/asfenc.c20
-rw-r--r--libavformat/assdec.c2
-rw-r--r--libavformat/assenc.c4
-rw-r--r--libavformat/au.c24
-rw-r--r--libavformat/avformat.h36
-rw-r--r--libavformat/avidec.c16
-rw-r--r--libavformat/avienc.c16
-rw-r--r--libavformat/avisynth.c2
-rw-r--r--libavformat/avs.c2
-rw-r--r--libavformat/bethsoftvid.c4
-rw-r--r--libavformat/bfi.c4
-rw-r--r--libavformat/bink.c4
-rw-r--r--libavformat/bintext.c8
-rw-r--r--libavformat/bit.c8
-rw-r--r--libavformat/bmv.c4
-rw-r--r--libavformat/c93.c2
-rw-r--r--libavformat/caf.c46
-rw-r--r--libavformat/cafdec.c6
-rw-r--r--libavformat/cafenc.c110
-rw-r--r--libavformat/cavsvideodec.c2
-rw-r--r--libavformat/cdg.c2
-rw-r--r--libavformat/cdxl.c4
-rw-r--r--libavformat/crcenc.c4
-rw-r--r--libavformat/daud.c6
-rw-r--r--libavformat/dfa.c2
-rw-r--r--libavformat/diracdec.c2
-rw-r--r--libavformat/dnxhddec.c2
-rw-r--r--libavformat/dsicin.c4
-rw-r--r--libavformat/dtsdec.c2
-rw-r--r--libavformat/dv.c4
-rw-r--r--libavformat/dvenc.c8
-rw-r--r--libavformat/dxa.c2
-rw-r--r--libavformat/eacdata.c2
-rw-r--r--libavformat/electronicarts.c72
-rw-r--r--libavformat/ffmenc.c4
-rw-r--r--libavformat/ffmetadec.c2
-rw-r--r--libavformat/filmstripdec.c2
-rw-r--r--libavformat/filmstripenc.c4
-rw-r--r--libavformat/flacdec.c10
-rw-r--r--libavformat/flacenc.c4
-rw-r--r--libavformat/flic.c4
-rw-r--r--libavformat/flvdec.c92
-rw-r--r--libavformat/flvenc.c98
-rw-r--r--libavformat/framecrcenc.c4
-rw-r--r--libavformat/g723_1.c2
-rw-r--r--libavformat/g729dec.c2
-rw-r--r--libavformat/gif.c4
-rw-r--r--libavformat/gsmdec.c2
-rw-r--r--libavformat/gxf.c26
-rw-r--r--libavformat/gxfenc.c64
-rw-r--r--libavformat/h261dec.c2
-rw-r--r--libavformat/h263dec.c2
-rw-r--r--libavformat/h264dec.c2
-rw-r--r--libavformat/icodec.c6
-rw-r--r--libavformat/id3v2.c20
-rw-r--r--libavformat/id3v2.h2
-rw-r--r--libavformat/id3v2enc.c2
-rw-r--r--libavformat/idcin.c6
-rw-r--r--libavformat/idroqdec.c4
-rw-r--r--libavformat/idroqenc.c4
-rw-r--r--libavformat/iff.c10
-rw-r--r--libavformat/ilbc.c6
-rw-r--r--libavformat/img2.c104
-rw-r--r--libavformat/img2dec.c6
-rw-r--r--libavformat/img2enc.c6
-rw-r--r--libavformat/ingenientdec.c2
-rw-r--r--libavformat/internal.h6
-rw-r--r--libavformat/ipmovie.c22
-rw-r--r--libavformat/isom.c532
-rw-r--r--libavformat/isom.h2
-rw-r--r--libavformat/iss.c2
-rw-r--r--libavformat/iv8.c2
-rw-r--r--libavformat/ivfenc.c6
-rw-r--r--libavformat/jacosubdec.c2
-rw-r--r--libavformat/jacosubenc.c2
-rw-r--r--libavformat/jvdec.c4
-rw-r--r--libavformat/latmenc.c8
-rw-r--r--libavformat/libmodplug.c4
-rw-r--r--libavformat/libnut.c16
-rw-r--r--libavformat/lmlm4.c4
-rw-r--r--libavformat/loasdec.c2
-rw-r--r--libavformat/lxfdec.c34
-rw-r--r--libavformat/m4vdec.c2
-rw-r--r--libavformat/matroska.c130
-rw-r--r--libavformat/matroska.h2
-rw-r--r--libavformat/matroskadec.c76
-rw-r--r--libavformat/matroskaenc.c54
-rw-r--r--libavformat/md5enc.c8
-rw-r--r--libavformat/microdvddec.c2
-rw-r--r--libavformat/microdvdenc.c4
-rw-r--r--libavformat/mkvtimestamp_v2.c4
-rw-r--r--libavformat/mm.c4
-rw-r--r--libavformat/mmf.c6
-rw-r--r--libavformat/mov.c138
-rw-r--r--libavformat/mov_chan.c40
-rw-r--r--libavformat/mov_chan.h2
-rw-r--r--libavformat/movenc.c224
-rw-r--r--libavformat/mp3dec.c2
-rw-r--r--libavformat/mp3enc.c10
-rw-r--r--libavformat/mpc.c2
-rw-r--r--libavformat/mpc8.c2
-rw-r--r--libavformat/mpeg.c42
-rw-r--r--libavformat/mpegenc.c26
-rw-r--r--libavformat/mpegts.c108
-rw-r--r--libavformat/mpegtsenc.c52
-rw-r--r--libavformat/mpegvideodec.c2
-rw-r--r--libavformat/mpjpeg.c4
-rw-r--r--libavformat/msnwc_tcp.c2
-rw-r--r--libavformat/mtv.c4
-rw-r--r--libavformat/mvi.c4
-rw-r--r--libavformat/mxf.c42
-rw-r--r--libavformat/mxfdec.c56
-rw-r--r--libavformat/mxfenc.c40
-rw-r--r--libavformat/mxg.c4
-rw-r--r--libavformat/ncdec.c2
-rw-r--r--libavformat/nsvdec.c46
-rw-r--r--libavformat/nullenc.c4
-rw-r--r--libavformat/nut.c162
-rw-r--r--libavformat/nutdec.c2
-rw-r--r--libavformat/nutenc.c18
-rw-r--r--libavformat/nuv.c8
-rw-r--r--libavformat/oggdec.c2
-rw-r--r--libavformat/oggenc.c34
-rw-r--r--libavformat/oggparsecelt.c2
-rw-r--r--libavformat/oggparsedirac.c6
-rw-r--r--libavformat/oggparseflac.c4
-rw-r--r--libavformat/oggparseogm.c6
-rw-r--r--libavformat/oggparseopus.c2
-rw-r--r--libavformat/oggparsespeex.c2
-rw-r--r--libavformat/oggparsetheora.c2
-rw-r--r--libavformat/oggparsevorbis.c2
-rw-r--r--libavformat/oma.c8
-rw-r--r--libavformat/omaenc.c2
-rw-r--r--libavformat/paf.c4
-rw-r--r--libavformat/pcmdec.c40
-rw-r--r--libavformat/pcmenc.c42
-rw-r--r--libavformat/pmpdec.c10
-rw-r--r--libavformat/psxstr.c4
-rw-r--r--libavformat/pva.c4
-rw-r--r--libavformat/qcp.c2
-rw-r--r--libavformat/r3d.c4
-rw-r--r--libavformat/rawdec.c20
-rw-r--r--libavformat/rawenc.c76
-rw-r--r--libavformat/rawvideodec.c2
-rw-r--r--libavformat/rdt.c6
-rw-r--r--libavformat/realtextdec.c2
-rw-r--r--libavformat/riff.c758
-rw-r--r--libavformat/riff.h6
-rw-r--r--libavformat/rl2.c4
-rw-r--r--libavformat/rm.c30
-rw-r--r--libavformat/rmdec.c22
-rw-r--r--libavformat/rmenc.c10
-rw-r--r--libavformat/rpl.c18
-rw-r--r--libavformat/rso.c6
-rw-r--r--libavformat/rsodec.c4
-rw-r--r--libavformat/rsoenc.c6
-rw-r--r--libavformat/rtp.c66
-rw-r--r--libavformat/rtp.h4
-rw-r--r--libavformat/rtpdec.c30
-rw-r--r--libavformat/rtpdec.h2
-rw-r--r--libavformat/rtpdec_amr.c8
-rw-r--r--libavformat/rtpdec_asf.c2
-rw-r--r--libavformat/rtpdec_g726.c2
-rw-r--r--libavformat/rtpdec_h263.c4
-rw-r--r--libavformat/rtpdec_h263_rfc2190.c2
-rw-r--r--libavformat/rtpdec_h264.c4
-rw-r--r--libavformat/rtpdec_ilbc.c2
-rw-r--r--libavformat/rtpdec_latm.c2
-rw-r--r--libavformat/rtpdec_mpeg4.c6
-rw-r--r--libavformat/rtpdec_qcelp.c2
-rw-r--r--libavformat/rtpdec_qdm2.c10
-rw-r--r--libavformat/rtpdec_qt.c2
-rw-r--r--libavformat/rtpdec_svq3.c8
-rw-r--r--libavformat/rtpdec_vp8.c2
-rw-r--r--libavformat/rtpdec_xiph.c4
-rw-r--r--libavformat/rtpenc.c138
-rw-r--r--libavformat/rtsp.c2
-rw-r--r--libavformat/rtspenc.c4
-rw-r--r--libavformat/samidec.c2
-rw-r--r--libavformat/sapenc.c4
-rw-r--r--libavformat/sbgdec.c2
-rw-r--r--libavformat/sdp.c38
-rw-r--r--libavformat/segafilm.c34
-rw-r--r--libavformat/sierravmd.c4
-rw-r--r--libavformat/siff.c4
-rw-r--r--libavformat/smacker.c14
-rw-r--r--libavformat/smjpeg.c10
-rw-r--r--libavformat/smjpegenc.c4
-rw-r--r--libavformat/smush.c4
-rw-r--r--libavformat/sol.c20
-rw-r--r--libavformat/soxdec.c4
-rw-r--r--libavformat/soxenc.c10
-rw-r--r--libavformat/spdifdec.c28
-rw-r--r--libavformat/spdifenc.c20
-rw-r--r--libavformat/srtdec.c2
-rw-r--r--libavformat/srtenc.c8
-rw-r--r--libavformat/subviewerdec.c2
-rw-r--r--libavformat/swf.h18
-rw-r--r--libavformat/swfdec.c6
-rw-r--r--libavformat/swfenc.c30
-rw-r--r--libavformat/thp.c4
-rw-r--r--libavformat/tiertexseq.c4
-rw-r--r--libavformat/tmv.c4
-rw-r--r--libavformat/tta.c2
-rw-r--r--libavformat/tty.c2
-rw-r--r--libavformat/txd.c2
-rw-r--r--libavformat/utils.c128
-rw-r--r--libavformat/vc1test.c2
-rw-r--r--libavformat/vc1testenc.c6
-rw-r--r--libavformat/voc.c18
-rw-r--r--libavformat/vocdec.c6
-rw-r--r--libavformat/vocenc.c4
-rw-r--r--libavformat/vqf.c2
-rw-r--r--libavformat/wav.c14
-rw-r--r--libavformat/wc3movie.c4
-rw-r--r--libavformat/westwood_aud.c6
-rw-r--r--libavformat/westwood_vqa.c10
-rw-r--r--libavformat/wtv.c4
-rw-r--r--libavformat/wtvdec.c16
-rw-r--r--libavformat/wtvenc.c6
-rw-r--r--libavformat/wv.c2
-rw-r--r--libavformat/wvenc.c6
-rw-r--r--libavformat/xa.c2
-rw-r--r--libavformat/xmv.c4
-rw-r--r--libavformat/xwma.c2
-rw-r--r--libavformat/yop.c4
-rw-r--r--libavformat/yuv4mpeg.c8
-rw-r--r--mt-work/mplayer.diff2
-rw-r--r--tools/ismindex.c10
672 files changed, 4730 insertions, 4320 deletions
diff --git a/cmdutils.c b/cmdutils.c
index edeab93ed3..7d71d6569c 100644
--- a/cmdutils.c
+++ b/cmdutils.c
@@ -1094,7 +1094,7 @@ int check_stream_specifier(AVFormatContext *s, AVStream *st, const char *spec)
return ret;
}
-AVDictionary *filter_codec_opts(AVDictionary *opts, enum CodecID codec_id,
+AVDictionary *filter_codec_opts(AVDictionary *opts, enum AVCodecID codec_id,
AVFormatContext *s, AVStream *st, AVCodec *codec)
{
AVDictionary *ret = NULL;
diff --git a/cmdutils.h b/cmdutils.h
index 925df5014e..1d237b56aa 100644
--- a/cmdutils.h
+++ b/cmdutils.h
@@ -236,7 +236,7 @@ int check_stream_specifier(AVFormatContext *s, AVStream *st, const char *spec);
* If null, the default one is looked up according to the codec id.
* @return a pointer to the created dictionary
*/
-AVDictionary *filter_codec_opts(AVDictionary *opts, enum CodecID codec_id,
+AVDictionary *filter_codec_opts(AVDictionary *opts, enum AVCodecID codec_id,
AVFormatContext *s, AVStream *st, AVCodec *codec);
/**
diff --git a/doc/APIchanges b/doc/APIchanges
index a6b45c8d7c..f1f7633c01 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -70,6 +70,9 @@ API changes, most recent first:
2012-03-26 - a67d9cf - lavfi 2.66.100
Add avfilter_fill_frame_from_{audio_,}buffer_ref() functions.
+2012-08-xx - xxxxxxx - lavc 54.25 - avcodec.h
+ Rename CodecID to AVCodecID and all CODEC_ID_* to AV_CODEC_ID_*.
+
2012-08-03 - xxxxxxx - lavu 51.37.1 - cpu.h
lsws 2.1.1 - swscale.h
Rename AV_CPU_FLAG_MMX2 ---> AV_CPU_FLAG_MMXEXT.
diff --git a/doc/developer.texi b/doc/developer.texi
index d4013bcda0..964c9af4c1 100644
--- a/doc/developer.texi
+++ b/doc/developer.texi
@@ -393,7 +393,7 @@ send a reminder by email. Your patch should eventually be dealt with.
@item
Did you register it in @file{allcodecs.c} or @file{allformats.c}?
@item
- Did you add the CodecID to @file{avcodec.h}?
+ Did you add the AVCodecID to @file{avcodec.h}?
@item
If it has a fourCC, did you add it to @file{libavformat/riff.c},
even if it is only a decoder?
diff --git a/doc/examples/decoding_encoding.c b/doc/examples/decoding_encoding.c
index 4650f2babd..3576cc0f8b 100644
--- a/doc/examples/decoding_encoding.c
+++ b/doc/examples/decoding_encoding.c
@@ -57,7 +57,7 @@ static void audio_encode_example(const char *filename)
printf("Encode audio file %s\n", filename);
/* find the MP2 encoder */
- codec = avcodec_find_encoder(CODEC_ID_MP2);
+ codec = avcodec_find_encoder(AV_CODEC_ID_MP2);
if (!codec) {
fprintf(stderr, "codec not found\n");
exit(1);
@@ -128,7 +128,7 @@ static void audio_decode_example(const char *outfilename, const char *filename)
printf("Decode audio file %s\n", filename);
/* find the mpeg audio decoder */
- codec = avcodec_find_decoder(CODEC_ID_MP2);
+ codec = avcodec_find_decoder(AV_CODEC_ID_MP2);
if (!codec) {
fprintf(stderr, "codec not found\n");
exit(1);
@@ -242,7 +242,7 @@ static void video_encode_example(const char *filename, int codec_id)
c->max_b_frames=1;
c->pix_fmt = PIX_FMT_YUV420P;
- if(codec_id == CODEC_ID_H264)
+ if(codec_id == AV_CODEC_ID_H264)
av_opt_set(c->priv_data, "preset", "slow", 0);
/* open it */
@@ -354,7 +354,7 @@ static void video_decode_example(const char *outfilename, const char *filename)
printf("Decode video file %s\n", filename);
/* find the mpeg1 video decoder */
- codec = avcodec_find_decoder(CODEC_ID_MPEG1VIDEO);
+ codec = avcodec_find_decoder(AV_CODEC_ID_MPEG1VIDEO);
if (!codec) {
fprintf(stderr, "codec not found\n");
exit(1);
@@ -465,8 +465,8 @@ int main(int argc, char **argv)
audio_encode_example("/tmp/test.mp2");
audio_decode_example("/tmp/test.sw", "/tmp/test.mp2");
- video_encode_example("/tmp/test.h264", CODEC_ID_H264);
- video_encode_example("/tmp/test.mpg", CODEC_ID_MPEG1VIDEO);
+ video_encode_example("/tmp/test.h264", AV_CODEC_ID_H264);
+ video_encode_example("/tmp/test.mpg", AV_CODEC_ID_MPEG1VIDEO);
filename = "/tmp/test.mpg";
} else {
filename = argv[1];
diff --git a/doc/examples/muxing.c b/doc/examples/muxing.c
index 130c0184ce..3209bb89c8 100644
--- a/doc/examples/muxing.c
+++ b/doc/examples/muxing.c
@@ -58,7 +58,7 @@ static int audio_input_frame_size;
* add an audio output stream
*/
static AVStream *add_audio_stream(AVFormatContext *oc, AVCodec **codec,
- enum CodecID codec_id)
+ enum AVCodecID codec_id)
{
AVCodecContext *c;
AVStream *st;
@@ -183,7 +183,7 @@ static int frame_count, video_outbuf_size;
/* Add a video output stream. */
static AVStream *add_video_stream(AVFormatContext *oc, AVCodec **codec,
- enum CodecID codec_id)
+ enum AVCodecID codec_id)
{
AVCodecContext *c;
AVStream *st;
@@ -220,11 +220,11 @@ static AVStream *add_video_stream(AVFormatContext *oc, AVCodec **codec,
c->time_base.num = 1;
c->gop_size = 12; /* emit one intra frame every twelve frames at most */
c->pix_fmt = STREAM_PIX_FMT;
- if (c->codec_id == CODEC_ID_MPEG2VIDEO) {
+ if (c->codec_id == AV_CODEC_ID_MPEG2VIDEO) {
/* just for testing, we also add B frames */
c->max_b_frames = 2;
}
- if (c->codec_id == CODEC_ID_MPEG1VIDEO) {
+ if (c->codec_id == AV_CODEC_ID_MPEG1VIDEO) {
/* Needed to avoid using macroblocks in which some coeffs overflow.
* This does not happen with normal video, it just happens here as
* the motion of the chroma plane does not match the luma plane. */
@@ -445,10 +445,10 @@ int main(int argc, char **argv)
* and initialize the codecs. */
video_st = NULL;
audio_st = NULL;
- if (fmt->video_codec != CODEC_ID_NONE) {
+ if (fmt->video_codec != AV_CODEC_ID_NONE) {
video_st = add_video_stream(oc, &video_codec, fmt->video_codec);
}
- if (fmt->audio_codec != CODEC_ID_NONE) {
+ if (fmt->audio_codec != AV_CODEC_ID_NONE) {
audio_st = add_audio_stream(oc, &audio_codec, fmt->audio_codec);
}
diff --git a/ffmpeg.c b/ffmpeg.c
index ecf9aca7c4..ac428d5d1f 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -715,9 +715,9 @@ static enum PixelFormat choose_pixel_fmt(AVStream *st, AVCodec *codec, enum Pixe
int has_alpha= av_pix_fmt_descriptors[target].nb_components % 2 == 0;
enum PixelFormat best= PIX_FMT_NONE;
if (st->codec->strict_std_compliance <= FF_COMPLIANCE_UNOFFICIAL) {
- if (st->codec->codec_id == CODEC_ID_MJPEG) {
+ if (st->codec->codec_id == AV_CODEC_ID_MJPEG) {
p = (const enum PixelFormat[]) { PIX_FMT_YUVJ420P, PIX_FMT_YUVJ422P, PIX_FMT_YUV420P, PIX_FMT_YUV422P, PIX_FMT_NONE };
- } else if (st->codec->codec_id == CODEC_ID_LJPEG) {
+ } else if (st->codec->codec_id == AV_CODEC_ID_LJPEG) {
p = (const enum PixelFormat[]) { PIX_FMT_YUVJ420P, PIX_FMT_YUVJ422P, PIX_FMT_YUVJ444P, PIX_FMT_YUV420P,
PIX_FMT_YUV422P, PIX_FMT_YUV444P, PIX_FMT_BGRA, PIX_FMT_NONE };
}
@@ -763,9 +763,9 @@ static char *choose_pix_fmts(OutputStream *ost)
p = ost->enc->pix_fmts;
if (ost->st->codec->strict_std_compliance <= FF_COMPLIANCE_UNOFFICIAL) {
- if (ost->st->codec->codec_id == CODEC_ID_MJPEG) {
+ if (ost->st->codec->codec_id == AV_CODEC_ID_MJPEG) {
p = (const enum PixelFormat[]) { PIX_FMT_YUVJ420P, PIX_FMT_YUVJ422P, PIX_FMT_YUV420P, PIX_FMT_YUV422P, PIX_FMT_NONE };
- } else if (ost->st->codec->codec_id == CODEC_ID_LJPEG) {
+ } else if (ost->st->codec->codec_id == AV_CODEC_ID_LJPEG) {
p = (const enum PixelFormat[]) { PIX_FMT_YUVJ420P, PIX_FMT_YUVJ422P, PIX_FMT_YUVJ444P, PIX_FMT_YUV420P,
PIX_FMT_YUV422P, PIX_FMT_YUV444P, PIX_FMT_BGRA, PIX_FMT_NONE };
}
@@ -1842,7 +1842,7 @@ static void do_subtitle_out(AVFormatContext *s,
/* Note: DVB subtitle need one packet to draw them and one other
packet to clear them */
/* XXX: signal it in the codec context ? */
- if (enc->codec_id == CODEC_ID_DVB_SUBTITLE)
+ if (enc->codec_id == AV_CODEC_ID_DVB_SUBTITLE)
nb = 2;
else
nb = 1;
@@ -1872,7 +1872,7 @@ static void do_subtitle_out(AVFormatContext *s,
pkt.size = subtitle_out_size;
pkt.pts = av_rescale_q(sub->pts, AV_TIME_BASE_Q, ost->st->time_base);
pkt.duration = av_rescale_q(sub->end_display_time, (AVRational){ 1, 1000 }, ost->st->time_base);
- if (enc->codec_id == CODEC_ID_DVB_SUBTITLE) {
+ if (enc->codec_id == AV_CODEC_ID_DVB_SUBTITLE) {
/* XXX: the pts correction is handled here. Maybe handling
it in the codec would be better */
if (i == 0)
@@ -1964,7 +1964,7 @@ static void do_video_out(AVFormatContext *s,
return;
if (s->oformat->flags & AVFMT_RAWPICTURE &&
- enc->codec->id == CODEC_ID_RAWVIDEO) {
+ enc->codec->id == AV_CODEC_ID_RAWVIDEO) {
/* raw pictures are written as AVPicture structure to
avoid any copies. We support temporarily the older
method. */
@@ -2380,7 +2380,7 @@ static void flush_encoders(void)
if (ost->st->codec->codec_type == AVMEDIA_TYPE_AUDIO && enc->frame_size <= 1)
continue;
- if (ost->st->codec->codec_type == AVMEDIA_TYPE_VIDEO && (os->oformat->flags & AVFMT_RAWPICTURE) && enc->codec->id == CODEC_ID_RAWVIDEO)
+ if (ost->st->codec->codec_type == AVMEDIA_TYPE_VIDEO && (os->oformat->flags & AVFMT_RAWPICTURE) && enc->codec->id == AV_CODEC_ID_RAWVIDEO)
continue;
for (;;) {
@@ -2499,10 +2499,10 @@ static void do_streamcopy(InputStream *ist, OutputStream *ost, const AVPacket *p
opkt.flags = pkt->flags;
// FIXME remove the following 2 lines they shall be replaced by the bitstream filters
- if ( ost->st->codec->codec_id != CODEC_ID_H264
- && ost->st->codec->codec_id != CODEC_ID_MPEG1VIDEO
- && ost->st->codec->codec_id != CODEC_ID_MPEG2VIDEO
- && ost->st->codec->codec_id != CODEC_ID_VC1
+ if ( ost->st->codec->codec_id != AV_CODEC_ID_H264
+ && ost->st->codec->codec_id != AV_CODEC_ID_MPEG1VIDEO
+ && ost->st->codec->codec_id != AV_CODEC_ID_MPEG2VIDEO
+ && ost->st->codec->codec_id != AV_CODEC_ID_VC1
) {
if (av_parser_change(ist->st->parser, ost->st->codec, &opkt.data, &opkt.size, pkt->data, pkt->size, pkt->flags & AV_PKT_FLAG_KEY))
opkt.destruct = av_destruct_packet;
@@ -3205,9 +3205,9 @@ static int transcode_init(void)
codec->frame_size = icodec->frame_size;
codec->audio_service_type = icodec->audio_service_type;
codec->block_align = icodec->block_align;
- if((codec->block_align == 1 || codec->block_align == 1152) && codec->codec_id == CODEC_ID_MP3)
+ if((codec->block_align == 1 || codec->block_align == 1152) && codec->codec_id == AV_CODEC_ID_MP3)
codec->block_align= 0;
- if(codec->codec_id == CODEC_ID_AC3)
+ if(codec->codec_id == AV_CODEC_ID_AC3)
codec->block_align= 0;
break;
case AVMEDIA_TYPE_VIDEO:
@@ -4684,11 +4684,11 @@ static int opt_input_file(OptionsContext *o, const char *opt, const char *filena
av_dict_set(&format_opts, "pixel_format", o->frame_pix_fmts[o->nb_frame_pix_fmts - 1].u.str, 0);
ic->video_codec_id = video_codec_name ?
- find_codec_or_die(video_codec_name , AVMEDIA_TYPE_VIDEO , 0)->id : CODEC_ID_NONE;
+ find_codec_or_die(video_codec_name , AVMEDIA_TYPE_VIDEO , 0)->id : AV_CODEC_ID_NONE;
ic->audio_codec_id = audio_codec_name ?
- find_codec_or_die(audio_codec_name , AVMEDIA_TYPE_AUDIO , 0)->id : CODEC_ID_NONE;
+ find_codec_or_die(audio_codec_name , AVMEDIA_TYPE_AUDIO , 0)->id : AV_CODEC_ID_NONE;
ic->subtitle_codec_id= subtitle_codec_name ?
- find_codec_or_die(subtitle_codec_name, AVMEDIA_TYPE_SUBTITLE, 0)->id : CODEC_ID_NONE;
+ find_codec_or_die(subtitle_codec_name, AVMEDIA_TYPE_SUBTITLE, 0)->id : AV_CODEC_ID_NONE;
ic->flags |= AVFMT_FLAG_NONBLOCK;
ic->interrupt_callback = int_cb;
@@ -5398,7 +5398,7 @@ static void opt_output_file(void *optctx, const char *filename)
/* pick the "best" stream of each type */
/* video: highest resolution */
- if (!o->video_disable && oc->oformat->video_codec != CODEC_ID_NONE) {
+ if (!o->video_disable && oc->oformat->video_codec != AV_CODEC_ID_NONE) {
int area = 0, idx = -1;
for (i = 0; i < nb_input_streams; i++) {
ist = input_streams[i];
@@ -5413,7 +5413,7 @@ static void opt_output_file(void *optctx, const char *filename)
}
/* audio: most channels */
- if (!o->audio_disable && oc->oformat->audio_codec != CODEC_ID_NONE) {
+ if (!o->audio_disable && oc->oformat->audio_codec != AV_CODEC_ID_NONE) {
int channels = 0, idx = -1;
for (i = 0; i < nb_input_streams; i++) {
ist = input_streams[i];
@@ -5428,7 +5428,7 @@ static void opt_output_file(void *optctx, const char *filename)
}
/* subtitles: pick first */
- if (!o->subtitle_disable && (oc->oformat->subtitle_codec != CODEC_ID_NONE || subtitle_codec_name)) {
+ if (!o->subtitle_disable && (oc->oformat->subtitle_codec != AV_CODEC_ID_NONE || subtitle_codec_name)) {
for (i = 0; i < nb_input_streams; i++)
if (input_streams[i]->st->codec->codec_type == AVMEDIA_TYPE_SUBTITLE) {
new_subtitle_stream(o, oc, i);
diff --git a/ffprobe.c b/ffprobe.c
index af69792c1f..e1ad6a7beb 100644
--- a/ffprobe.c
+++ b/ffprobe.c
@@ -1923,7 +1923,7 @@ static int open_input_file(AVFormatContext **fmt_ctx_ptr, const char *filename)
AVStream *stream = fmt_ctx->streams[i];
AVCodec *codec;
- if (stream->codec->codec_id == CODEC_ID_PROBE) {
+ if (stream->codec->codec_id == AV_CODEC_ID_PROBE) {
av_log(NULL, AV_LOG_ERROR,
"Failed to probe codec for input stream %d\n",
stream->index);
@@ -1948,7 +1948,7 @@ static void close_input_file(AVFormatContext **ctx_ptr)
/* close decoder for each stream */
for (i = 0; i < fmt_ctx->nb_streams; i++)
- if (fmt_ctx->streams[i]->codec->codec_id != CODEC_ID_NONE)
+ if (fmt_ctx->streams[i]->codec->codec_id != AV_CODEC_ID_NONE)
avcodec_close(fmt_ctx->streams[i]->codec);
avformat_close_input(ctx_ptr);
diff --git a/ffserver.c b/ffserver.c
index 5f8272b544..a421e23ce3 100644
--- a/ffserver.c
+++ b/ffserver.c
@@ -3552,7 +3552,7 @@ static void extract_mpeg4_header(AVFormatContext *infile)
mpeg4_count = 0;
for(i=0;i<infile->nb_streams;i++) {
st = infile->streams[i];
- if (st->codec->codec_id == CODEC_ID_MPEG4 &&
+ if (st->codec->codec_id == AV_CODEC_ID_MPEG4 &&
st->codec->extradata_size == 0) {
mpeg4_count++;
}
@@ -3565,7 +3565,7 @@ static void extract_mpeg4_header(AVFormatContext *infile)
if (av_read_packet(infile, &pkt) < 0)
break;
st = infile->streams[pkt.stream_index];
- if (st->codec->codec_id == CODEC_ID_MPEG4 &&
+ if (st->codec->codec_id == AV_CODEC_ID_MPEG4 &&
st->codec->extradata_size == 0) {
av_freep(&st->codec->extradata);
/* fill extradata with the header */
@@ -3881,22 +3881,22 @@ static void add_codec(FFStream *stream, AVCodecContext *av)
memcpy(st->codec, av, sizeof(AVCodecContext));
}
-static enum CodecID opt_audio_codec(const char *arg)
+static enum AVCodecID opt_audio_codec(const char *arg)
{
AVCodec *p= avcodec_find_encoder_by_name(arg);
if (p == NULL || p->type != AVMEDIA_TYPE_AUDIO)
- return CODEC_ID_NONE;
+ return AV_CODEC_ID_NONE;
return p->id;
}
-static enum CodecID opt_video_codec(const char *arg)
+static enum AVCodecID opt_video_codec(const char *arg)
{
AVCodec *p= avcodec_find_encoder_by_name(arg);
if (p == NULL || p->type != AVMEDIA_TYPE_VIDEO)
- return CODEC_ID_NONE;
+ return AV_CODEC_ID_NONE;
return p->id;
}
@@ -3939,7 +3939,7 @@ static int ffserver_opt_default(const char *opt, const char *arg,
static int ffserver_opt_preset(const char *arg,
AVCodecContext *avctx, int type,
- enum CodecID *audio_id, enum CodecID *video_id)
+ enum AVCodecID *audio_id, enum AVCodecID *video_id)
{
FILE *f=NULL;
char filename[1000], tmp[1000], tmp2[1000], line[1000];
@@ -4021,7 +4021,7 @@ static int parse_ffconfig(const char *filename)
FFStream **last_stream, *stream, *redirect;
FFStream **last_feed, *feed, *s;
AVCodecContext audio_enc, video_enc;
- enum CodecID audio_id, video_id;
+ enum AVCodecID audio_id, video_id;
f = fopen(filename, "r");
if (!f) {
@@ -4038,8 +4038,8 @@ static int parse_ffconfig(const char *filename)
stream = NULL;
feed = NULL;
redirect = NULL;
- audio_id = CODEC_ID_NONE;
- video_id = CODEC_ID_NONE;
+ audio_id = AV_CODEC_ID_NONE;
+ video_id = AV_CODEC_ID_NONE;
#define ERROR(...) report_config_error(filename, line_num, &errors, __VA_ARGS__)
for(;;) {
@@ -4232,8 +4232,8 @@ static int parse_ffconfig(const char *filename)
avcodec_get_context_defaults3(&video_enc, NULL);
avcodec_get_context_defaults3(&audio_enc, NULL);
- audio_id = CODEC_ID_NONE;
- video_id = CODEC_ID_NONE;
+ audio_id = AV_CODEC_ID_NONE;
+ video_id = AV_CODEC_ID_NONE;
if (stream->fmt) {
audio_id = stream->fmt->audio_codec;
video_id = stream->fmt->video_codec;
@@ -4315,13 +4315,13 @@ static int parse_ffconfig(const char *filename)
} else if (!av_strcasecmp(cmd, "AudioCodec")) {
get_arg(arg, sizeof(arg), &p);
audio_id = opt_audio_codec(arg);
- if (audio_id == CODEC_ID_NONE) {
+ if (audio_id == AV_CODEC_ID_NONE) {
ERROR("Unknown AudioCodec: %s\n", arg);
}
} else if (!av_strcasecmp(cmd, "VideoCodec")) {
get_arg(arg, sizeof(arg), &p);
video_id = opt_video_codec(arg);
- if (video_id == CODEC_ID_NONE) {
+ if (video_id == AV_CODEC_ID_NONE) {
ERROR("Unknown VideoCodec: %s\n", arg);
}
} else if (!av_strcasecmp(cmd, "MaxTime")) {
@@ -4512,9 +4512,9 @@ static int parse_ffconfig(const char *filename)
if (stream)
video_enc.dark_masking = atof(arg);
} else if (!av_strcasecmp(cmd, "NoVideo")) {
- video_id = CODEC_ID_NONE;
+ video_id = AV_CODEC_ID_NONE;
} else if (!av_strcasecmp(cmd, "NoAudio")) {
- audio_id = CODEC_ID_NONE;
+ audio_id = AV_CODEC_ID_NONE;
} else if (!av_strcasecmp(cmd, "ACL")) {
parse_acl_row(stream, feed, NULL, p, filename, line_num);
} else if (!av_strcasecmp(cmd, "DynamicACL")) {
@@ -4552,12 +4552,12 @@ static int parse_ffconfig(const char *filename)
ERROR("No corresponding <Stream> for </Stream>\n");
} else {
if (stream->feed && stream->fmt && strcmp(stream->fmt->name, "ffm") != 0) {
- if (audio_id != CODEC_ID_NONE) {
+ if (audio_id != AV_CODEC_ID_NONE) {
audio_enc.codec_type = AVMEDIA_TYPE_AUDIO;
audio_enc.codec_id = audio_id;
add_codec(stream, &audio_enc);
}
- if (video_id != CODEC_ID_NONE) {
+ if (video_id != AV_CODEC_ID_NONE) {
video_enc.codec_type = AVMEDIA_TYPE_VIDEO;
video_enc.codec_id = video_id;
add_codec(stream, &video_enc);
diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c
index 05669c4221..9a45b1b33e 100644
--- a/libavcodec/4xm.c
+++ b/libavcodec/4xm.c
@@ -981,7 +981,7 @@ static av_cold int decode_end(AVCodecContext *avctx)
AVCodec ff_fourxm_decoder = {
.name = "4xm",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_4XM,
+ .id = AV_CODEC_ID_4XM,
.priv_data_size = sizeof(FourXContext),
.init = decode_init,
.close = decode_end,
diff --git a/libavcodec/8bps.c b/libavcodec/8bps.c
index 7951bd8db0..1dfd553673 100644
--- a/libavcodec/8bps.c
+++ b/libavcodec/8bps.c
@@ -220,7 +220,7 @@ static av_cold int decode_end(AVCodecContext *avctx)
AVCodec ff_eightbps_decoder = {
.name = "8bps",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_8BPS,
+ .id = AV_CODEC_ID_8BPS,
.priv_data_size = sizeof(EightBpsContext),
.init = decode_init,
.close = decode_end,
diff --git a/libavcodec/8svx.c b/libavcodec/8svx.c
index 8d6a6d692e..bf2b2787cd 100644
--- a/libavcodec/8svx.c
+++ b/libavcodec/8svx.c
@@ -191,10 +191,10 @@ static av_cold int eightsvx_decode_init(AVCodecContext *avctx)
}
switch (avctx->codec->id) {
- case CODEC_ID_8SVX_FIB: esc->table = fibonacci; break;
- case CODEC_ID_8SVX_EXP: esc->table = exponential; break;
- case CODEC_ID_PCM_S8_PLANAR:
- case CODEC_ID_8SVX_RAW: esc->table = NULL; break;
+ case AV_CODEC_ID_8SVX_FIB: esc->table = fibonacci; break;
+ case AV_CODEC_ID_8SVX_EXP: esc->table = exponential; break;
+ case AV_CODEC_ID_PCM_S8_PLANAR:
+ case AV_CODEC_ID_8SVX_RAW: esc->table = NULL; break;
default:
av_log(avctx, AV_LOG_ERROR, "Invalid codec id %d.\n", avctx->codec->id);
return AVERROR_INVALIDDATA;
@@ -222,7 +222,7 @@ static av_cold int eightsvx_decode_close(AVCodecContext *avctx)
AVCodec ff_eightsvx_fib_decoder = {
.name = "8svx_fib",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_8SVX_FIB,
+ .id = AV_CODEC_ID_8SVX_FIB,
.priv_data_size = sizeof (EightSvxContext),
.init = eightsvx_decode_init,
.decode = eightsvx_decode_frame,
@@ -235,7 +235,7 @@ AVCodec ff_eightsvx_fib_decoder = {
AVCodec ff_eightsvx_exp_decoder = {
.name = "8svx_exp",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_8SVX_EXP,
+ .id = AV_CODEC_ID_8SVX_EXP,
.priv_data_size = sizeof (EightSvxContext),
.init = eightsvx_decode_init,
.decode = eightsvx_decode_frame,
@@ -248,7 +248,7 @@ AVCodec ff_eightsvx_exp_decoder = {
AVCodec ff_pcm_s8_planar_decoder = {
.name = "pcm_s8_planar",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_PCM_S8_PLANAR,
+ .id = AV_CODEC_ID_PCM_S8_PLANAR,
.priv_data_size = sizeof(EightSvxContext),
.init = eightsvx_decode_init,
.close = eightsvx_decode_close,
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index bc6d430e4f..c32afe0953 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -6,6 +6,7 @@ FFLIBS = avutil
HEADERS = avcodec.h \
avfft.h \
dxva2.h \
+ old_codec_ids.h \
vaapi.h \
vda.h \
vdpau.h \
diff --git a/libavcodec/a64multienc.c b/libavcodec/a64multienc.c
index baa48466a3..a18697c86b 100644
--- a/libavcodec/a64multienc.c
+++ b/libavcodec/a64multienc.c
@@ -187,7 +187,7 @@ static av_cold int a64multi_init_encoder(AVCodecContext *avctx)
av_log(avctx, AV_LOG_INFO, "charset lifetime set to %d frame(s)\n", c->mc_lifetime);
c->mc_frame_counter = 0;
- c->mc_use_5col = avctx->codec->id == CODEC_ID_A64_MULTI5;
+ c->mc_use_5col = avctx->codec->id == AV_CODEC_ID_A64_MULTI5;
c->mc_pal_size = 4 + c->mc_use_5col;
/* precalc luma values for later use */
@@ -372,7 +372,7 @@ static int a64multi_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
AVCodec ff_a64multi_encoder = {
.name = "a64multi",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_A64_MULTI,
+ .id = AV_CODEC_ID_A64_MULTI,
.priv_data_size = sizeof(A64Context),
.init = a64multi_init_encoder,
.encode2 = a64multi_encode_frame,
@@ -386,7 +386,7 @@ AVCodec ff_a64multi_encoder = {
AVCodec ff_a64multi5_encoder = {
.name = "a64multi5",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_A64_MULTI5,
+ .id = AV_CODEC_ID_A64_MULTI5,
.priv_data_size = sizeof(A64Context),
.init = a64multi_init_encoder,
.encode2 = a64multi_encode_frame,
diff --git a/libavcodec/aac_ac3_parser.c b/libavcodec/aac_ac3_parser.c
index 7545c8553b..f6c4fb2605 100644
--- a/libavcodec/aac_ac3_parser.c
+++ b/libavcodec/aac_ac3_parser.c
@@ -78,7 +78,7 @@ get_next:
and total number of samples found in an AAC ADTS header are not
reliable. Bit rate is still accurate because the total frame duration in
seconds is still correct (as is the number of bits in the frame). */
- if (avctx->codec_id != CODEC_ID_AAC) {
+ if (avctx->codec_id != AV_CODEC_ID_AAC) {
avctx->sample_rate = s->sample_rate;
/* allow downmixing to stereo (or mono for AC-3) */
@@ -86,8 +86,8 @@ get_next:
avctx->request_channels < s->channels &&
(avctx->request_channels <= 2 ||
(avctx->request_channels == 1 &&
- (avctx->codec_id == CODEC_ID_AC3 ||
- avctx->codec_id == CODEC_ID_EAC3)))) {
+ (avctx->codec_id == AV_CODEC_ID_AC3 ||
+ avctx->codec_id == AV_CODEC_ID_EAC3)))) {
avctx->channels = avctx->request_channels;
} else {
avctx->channels = s->channels;
diff --git a/libavcodec/aac_ac3_parser.h b/libavcodec/aac_ac3_parser.h
index b1fb0cf59f..ca49d2fc2a 100644
--- a/libavcodec/aac_ac3_parser.h
+++ b/libavcodec/aac_ac3_parser.h
@@ -55,7 +55,7 @@ typedef struct AACAC3ParseContext {
uint64_t state;
int need_next_header;
- enum CodecID codec_id;
+ enum AVCodecID codec_id;
} AACAC3ParseContext;
int ff_aac_ac3_parse(AVCodecParserContext *s1,
diff --git a/libavcodec/aac_parser.c b/libavcodec/aac_parser.c
index a8ef2f35dd..ab6ca4e268 100644
--- a/libavcodec/aac_parser.c
+++ b/libavcodec/aac_parser.c
@@ -61,7 +61,7 @@ static av_cold int aac_parse_init(AVCodecParserContext *s1)
AVCodecParser ff_aac_parser = {
- .codec_ids = { CODEC_ID_AAC },
+ .codec_ids = { AV_CODEC_ID_AAC },
.priv_data_size = sizeof(AACAC3ParseContext),
.parser_init = aac_parse_init,
.parser_parse = ff_aac_ac3_parse,
diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c
index a71bae2887..909ecb173f 100644
--- a/libavcodec/aacdec.c
+++ b/libavcodec/aacdec.c
@@ -2887,7 +2887,7 @@ static av_cold int latm_decode_init(AVCodecContext *avctx)
AVCodec ff_aac_decoder = {
.name = "aac",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_AAC,
+ .id = AV_CODEC_ID_AAC,
.priv_data_size = sizeof(AACContext),
.init = aac_decode_init,
.close = aac_decode_close,
@@ -2909,7 +2909,7 @@ AVCodec ff_aac_decoder = {
AVCodec ff_aac_latm_decoder = {
.name = "aac_latm",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_AAC_LATM,
+ .id = AV_CODEC_ID_AAC_LATM,
.priv_data_size = sizeof(struct LATMContext),
.init = latm_decode_init,
.close = aac_decode_close,
diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c
index b002b8c305..1888f20ef2 100644
--- a/libavcodec/aacenc.c
+++ b/libavcodec/aacenc.c
@@ -819,7 +819,7 @@ static const AVClass aacenc_class = {
AVCodec ff_aac_encoder = {
.name = "aac",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_AAC,
+ .id = AV_CODEC_ID_AAC,
.priv_data_size = sizeof(AACEncContext),
.init = aac_encode_init,
.encode2 = aac_encode_frame,
diff --git a/libavcodec/aasc.c b/libavcodec/aasc.c
index db33eff5eb..bdb948ea7c 100644
--- a/libavcodec/aasc.c
+++ b/libavcodec/aasc.c
@@ -132,7 +132,7 @@ static av_cold int aasc_decode_end(AVCodecContext *avctx)
AVCodec ff_aasc_decoder = {
.name = "aasc",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_AASC,
+ .id = AV_CODEC_ID_AASC,
.priv_data_size = sizeof(AascContext),
.init = aasc_decode_init,
.close = aasc_decode_end,
diff --git a/libavcodec/ac3_parser.c b/libavcodec/ac3_parser.c
index 83cc4e0e36..8250a67678 100644
--- a/libavcodec/ac3_parser.c
+++ b/libavcodec/ac3_parser.c
@@ -167,9 +167,9 @@ static int ac3_sync(uint64_t state, AACAC3ParseContext *hdr_info,
if (hdr.bitstream_mode == 0x7 && hdr.channels > 1)
hdr_info->service_type = AV_AUDIO_SERVICE_TYPE_KARAOKE;
if(hdr.bitstream_id>10)
- hdr_info->codec_id = CODEC_ID_EAC3;
- else if (hdr_info->codec_id == CODEC_ID_NONE)
- hdr_info->codec_id = CODEC_ID_AC3;
+ hdr_info->codec_id = AV_CODEC_ID_EAC3;
+ else if (hdr_info->codec_id == AV_CODEC_ID_NONE)
+ hdr_info->codec_id = AV_CODEC_ID_AC3;
*need_next_header = (hdr.frame_type != EAC3_FRAME_TYPE_AC3_CONVERT);
*new_frame_start = (hdr.frame_type != EAC3_FRAME_TYPE_DEPENDENT);
@@ -186,7 +186,7 @@ static av_cold int ac3_parse_init(AVCodecParserContext *s1)
AVCodecParser ff_ac3_parser = {
- .codec_ids = { CODEC_ID_AC3, CODEC_ID_EAC3 },
+ .codec_ids = { AV_CODEC_ID_AC3, AV_CODEC_ID_EAC3 },
.priv_data_size = sizeof(AACAC3ParseContext),
.parser_init = ac3_parse_init,
.parser_parse = ff_aac_ac3_parse,
diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c
index 2cd07c3534..09f87cde70 100644
--- a/libavcodec/ac3dec.c
+++ b/libavcodec/ac3dec.c
@@ -1477,7 +1477,7 @@ static const AVClass ac3_decoder_class = {
AVCodec ff_ac3_decoder = {
.name = "ac3",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_AC3,
+ .id = AV_CODEC_ID_AC3,
.priv_data_size = sizeof (AC3DecodeContext),
.init = ac3_decode_init,
.close = ac3_decode_end,
@@ -1501,7 +1501,7 @@ static const AVClass eac3_decoder_class = {
AVCodec ff_eac3_decoder = {
.name = "eac3",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_EAC3,
+ .id = AV_CODEC_ID_EAC3,
.priv_data_size = sizeof (AC3DecodeContext),
.init = ac3_decode_init,
.close = ac3_decode_end,
diff --git a/libavcodec/ac3enc.c b/libavcodec/ac3enc.c
index 05cdddafe6..e5dea46275 100644
--- a/libavcodec/ac3enc.c
+++ b/libavcodec/ac3enc.c
@@ -2427,7 +2427,7 @@ av_cold int ff_ac3_encode_init(AVCodecContext *avctx)
s->avctx = avctx;
- s->eac3 = avctx->codec_id == CODEC_ID_EAC3;
+ s->eac3 = avctx->codec_id == AV_CODEC_ID_EAC3;
ff_ac3_common_init();
diff --git a/libavcodec/ac3enc_fixed.c b/libavcodec/ac3enc_fixed.c
index 8293ecd34d..fa109f9791 100644
--- a/libavcodec/ac3enc_fixed.c
+++ b/libavcodec/ac3enc_fixed.c
@@ -155,7 +155,7 @@ static av_cold int ac3_fixed_encode_init(AVCodecContext *avctx)
AVCodec ff_ac3_fixed_encoder = {
.name = "ac3_fixed",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_AC3,
+ .id = AV_CODEC_ID_AC3,
.priv_data_size = sizeof(AC3EncodeContext),
.init = ac3_fixed_encode_init,
.encode2 = ff_ac3_fixed_encode_frame,
diff --git a/libavcodec/ac3enc_float.c b/libavcodec/ac3enc_float.c
index ff324b2bed..5afe0fe2ab 100644
--- a/libavcodec/ac3enc_float.c
+++ b/libavcodec/ac3enc_float.c
@@ -153,7 +153,7 @@ static CoefType calc_cpl_coord(CoefSumType energy_ch, CoefSumType energy_cpl)
AVCodec ff_ac3_encoder = {
.name = "ac3",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_AC3,
+ .id = AV_CODEC_ID_AC3,
.priv_data_size = sizeof(AC3EncodeContext),
.init = ff_ac3_encode_init,
.encode2 = ff_ac3_float_encode_frame,
diff --git a/libavcodec/adpcm.c b/libavcodec/adpcm.c
index b86168acb8..c779f8b572 100644
--- a/libavcodec/adpcm.c
+++ b/libavcodec/adpcm.c
@@ -96,13 +96,13 @@ static av_cold int adpcm_decode_init(AVCodecContext * avctx)
unsigned int max_channels = 2;
switch(avctx->codec->id) {
- case CODEC_ID_ADPCM_EA:
+ case AV_CODEC_ID_ADPCM_EA:
min_channels = 2;
break;
- case CODEC_ID_ADPCM_EA_R1:
- case CODEC_ID_ADPCM_EA_R2:
- case CODEC_ID_ADPCM_EA_R3:
- case CODEC_ID_ADPCM_EA_XAS:
+ case AV_CODEC_ID_ADPCM_EA_R1:
+ case AV_CODEC_ID_ADPCM_EA_R2:
+ case AV_CODEC_ID_ADPCM_EA_R3:
+ case AV_CODEC_ID_ADPCM_EA_XAS:
max_channels = 6;
break;
}
@@ -112,22 +112,22 @@ static av_cold int adpcm_decode_init(AVCodecContext * avctx)
}
switch(avctx->codec->id) {
- case CODEC_ID_ADPCM_CT:
+ case AV_CODEC_ID_ADPCM_CT:
c->status[0].step = c->status[1].step = 511;
break;
- case CODEC_ID_ADPCM_IMA_WAV:
+ case AV_CODEC_ID_ADPCM_IMA_WAV:
if (avctx->bits_per_coded_sample != 4) {
av_log(avctx, AV_LOG_ERROR, "Only 4-bit ADPCM IMA WAV files are supported\n");
return -1;
}
break;
- case CODEC_ID_ADPCM_IMA_APC:
+ case AV_CODEC_ID_ADPCM_IMA_APC:
if (avctx->extradata && avctx->extradata_size >= 8) {
c->status[0].predictor = AV_RL32(avctx->extradata);
c->status[1].predictor = AV_RL32(avctx->extradata + 4);
}
break;
- case CODEC_ID_ADPCM_IMA_WS:
+ case AV_CODEC_ID_ADPCM_IMA_WS:
if (avctx->extradata && avctx->extradata_size >= 2)
c->vqa_version = AV_RL16(avctx->extradata);
break;
@@ -423,22 +423,22 @@ static int get_nb_samples(AVCodecContext *avctx, GetByteContext *gb,
switch (avctx->codec->id) {
/* constant, only check buf_size */
- case CODEC_ID_ADPCM_EA_XAS:
+ case AV_CODEC_ID_ADPCM_EA_XAS:
if (buf_size < 76 * ch)
return 0;
nb_samples = 128;
break;
- case CODEC_ID_ADPCM_IMA_QT:
+ case AV_CODEC_ID_ADPCM_IMA_QT:
if (buf_size < 34 * ch)
return 0;
nb_samples = 64;
break;
/* simple 4-bit adpcm */
- case CODEC_ID_ADPCM_CT:
- case CODEC_ID_ADPCM_IMA_APC:
- case CODEC_ID_ADPCM_IMA_EA_SEAD:
- case CODEC_ID_ADPCM_IMA_WS:
- case CODEC_ID_ADPCM_YAMAHA:
+ case AV_CODEC_ID_ADPCM_CT:
+ case AV_CODEC_ID_ADPCM_IMA_APC:
+ case AV_CODEC_ID_ADPCM_IMA_EA_SEAD:
+ case AV_CODEC_ID_ADPCM_IMA_WS:
+ case AV_CODEC_ID_ADPCM_YAMAHA:
nb_samples = buf_size * 2 / ch;
break;
}
@@ -448,46 +448,46 @@ static int get_nb_samples(AVCodecContext *avctx, GetByteContext *gb,
/* simple 4-bit adpcm, with header */
header_size = 0;
switch (avctx->codec->id) {
- case CODEC_ID_ADPCM_4XM:
- case CODEC_ID_ADPCM_IMA_ISS: header_size = 4 * ch; break;
- case CODEC_ID_ADPCM_IMA_AMV: header_size = 8; break;
- case CODEC_ID_ADPCM_IMA_SMJPEG: header_size = 4; break;
+ case AV_CODEC_ID_ADPCM_4XM:
+ case AV_CODEC_ID_ADPCM_IMA_ISS: header_size = 4 * ch; break;
+ case AV_CODEC_ID_ADPCM_IMA_AMV: header_size = 8; break;
+ case AV_CODEC_ID_ADPCM_IMA_SMJPEG: header_size = 4; break;
}
if (header_size > 0)
return (buf_size - header_size) * 2 / ch;
/* more complex formats */
switch (avctx->codec->id) {
- case CODEC_ID_ADPCM_EA:
+ case AV_CODEC_ID_ADPCM_EA:
has_coded_samples = 1;
*coded_samples = bytestream2_get_le32(gb);
*coded_samples -= *coded_samples % 28;
nb_samples = (buf_size - 12) / 30 * 28;
break;
- case CODEC_ID_ADPCM_IMA_EA_EACS:
+ case AV_CODEC_ID_ADPCM_IMA_EA_EACS:
has_coded_samples = 1;
*coded_samples = bytestream2_get_le32(gb);
nb_samples = (buf_size - (4 + 8 * ch)) * 2 / ch;
break;
- case CODEC_ID_ADPCM_EA_MAXIS_XA:
+ case AV_CODEC_ID_ADPCM_EA_MAXIS_XA:
nb_samples = (buf_size - ch) / ch * 2;
break;
- case CODEC_ID_ADPCM_EA_R1:
- case CODEC_ID_ADPCM_EA_R2:
- case CODEC_ID_ADPCM_EA_R3:
+ case AV_CODEC_ID_ADPCM_EA_R1:
+ case AV_CODEC_ID_ADPCM_EA_R2:
+ case AV_CODEC_ID_ADPCM_EA_R3:
/* maximum number of samples */
/* has internal offsets and a per-frame switch to signal raw 16-bit */
has_coded_samples = 1;
switch (avctx->codec->id) {
- case CODEC_ID_ADPCM_EA_R1:
+ case AV_CODEC_ID_ADPCM_EA_R1:
header_size = 4 + 9 * ch;
*coded_samples = bytestream2_get_le32(gb);
break;
- case CODEC_ID_ADPCM_EA_R2:
+ case AV_CODEC_ID_ADPCM_EA_R2:
header_size = 4 + 5 * ch;
*coded_samples = bytestream2_get_le32(gb);
break;
- case CODEC_ID_ADPCM_EA_R3:
+ case AV_CODEC_ID_ADPCM_EA_R3:
header_size = 4 + 5 * ch;
*coded_samples = bytestream2_get_be32(gb);
break;
@@ -496,35 +496,35 @@ static int get_nb_samples(AVCodecContext *avctx, GetByteContext *gb,
nb_samples = (buf_size - header_size) * 2 / ch;
nb_samples -= nb_samples % 28;
break;
- case CODEC_ID_ADPCM_IMA_DK3:
+ case AV_CODEC_ID_ADPCM_IMA_DK3:
if (avctx->block_align > 0)
buf_size = FFMIN(buf_size, avctx->block_align);
nb_samples = ((buf_size - 16) * 2 / 3 * 4) / ch;
break;
- case CODEC_ID_ADPCM_IMA_DK4:
+ case AV_CODEC_ID_ADPCM_IMA_DK4:
if (avctx->block_align > 0)
buf_size = FFMIN(buf_size, avctx->block_align);
nb_samples = 1 + (buf_size - 4 * ch) * 2 / ch;
break;
- case CODEC_ID_ADPCM_IMA_WAV:
+ case AV_CODEC_ID_ADPCM_IMA_WAV:
if (avctx->block_align > 0)
buf_size = FFMIN(buf_size, avctx->block_align);
nb_samples = 1 + (buf_size - 4 * ch) / (4 * ch) * 8;
break;
- case CODEC_ID_ADPCM_MS:
+ case AV_CODEC_ID_ADPCM_MS:
if (avctx->block_align > 0)
buf_size = FFMIN(buf_size, avctx->block_align);
nb_samples = 2 + (buf_size - 7 * ch) * 2 / ch;
break;
- case CODEC_ID_ADPCM_SBPRO_2:
- case CODEC_ID_ADPCM_SBPRO_3:
- case CODEC_ID_ADPCM_SBPRO_4:
+ case AV_CODEC_ID_ADPCM_SBPRO_2:
+ case AV_CODEC_ID_ADPCM_SBPRO_3:
+ case AV_CODEC_ID_ADPCM_SBPRO_4:
{
int samples_per_byte;
switch (avctx->codec->id) {
- case CODEC_ID_ADPCM_SBPRO_2: samples_per_byte = 4; break;
- case CODEC_ID_ADPCM_SBPRO_3: samples_per_byte = 3; break;
- case CODEC_ID_ADPCM_SBPRO_4: samples_per_byte = 2; break;
+ case AV_CODEC_ID_ADPCM_SBPRO_2: samples_per_byte = 4; break;
+ case AV_CODEC_ID_ADPCM_SBPRO_3: samples_per_byte = 3; break;
+ case AV_CODEC_ID_ADPCM_SBPRO_4: samples_per_byte = 2; break;
}
if (!s->status[0].step_index) {
nb_samples++;
@@ -533,7 +533,7 @@ static int get_nb_samples(AVCodecContext *avctx, GetByteContext *gb,
nb_samples += buf_size * samples_per_byte / ch;
break;
}
- case CODEC_ID_ADPCM_SWF:
+ case AV_CODEC_ID_ADPCM_SWF:
{
int buf_bits = buf_size * 8 - 2;
int nbits = (bytestream2_get_byte(gb) >> 6) + 2;
@@ -546,14 +546,14 @@ static int get_nb_samples(AVCodecContext *avctx, GetByteContext *gb,
nb_samples += 1 + (bits_left - block_hdr_size) / (nbits * ch);
break;
}
- case CODEC_ID_ADPCM_THP:
+ case AV_CODEC_ID_ADPCM_THP:
has_coded_samples = 1;
bytestream2_skip(gb, 4); // channel size
*coded_samples = bytestream2_get_be32(gb);
*coded_samples -= *coded_samples % 14;
nb_samples = (buf_size - 80) / (8 * ch) * 14;
break;
- case CODEC_ID_ADPCM_XA:
+ case AV_CODEC_ID_ADPCM_XA:
nb_samples = (buf_size / 128) * 224 / ch;
break;
}
@@ -605,7 +605,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
st = avctx->channels == 2 ? 1 : 0;
switch(avctx->codec->id) {
- case CODEC_ID_ADPCM_IMA_QT:
+ case AV_CODEC_ID_ADPCM_IMA_QT:
/* In QuickTime, IMA is encoded by chunks of 34 bytes (=64 samples).
Channel data is interleaved per-chunk. */
for (channel = 0; channel < avctx->channels; channel++) {
@@ -648,7 +648,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
}
}
break;
- case CODEC_ID_ADPCM_IMA_WAV:
+ case AV_CODEC_ID_ADPCM_IMA_WAV:
for(i=0; i<avctx->channels; i++){
cs = &(c->status[i]);
cs->predictor = *samples++ = sign_extend(bytestream2_get_le16u(&gb), 16);
@@ -676,7 +676,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
samples += 7 * avctx->channels;
}
break;
- case CODEC_ID_ADPCM_4XM:
+ case AV_CODEC_ID_ADPCM_4XM:
for (i = 0; i < avctx->channels; i++)
c->status[i].predictor = sign_extend(bytestream2_get_le16u(&gb), 16);
@@ -701,7 +701,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
}
}
break;
- case CODEC_ID_ADPCM_MS:
+ case AV_CODEC_ID_ADPCM_MS:
{
int block_predictor;
@@ -744,7 +744,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
}
break;
}
- case CODEC_ID_ADPCM_IMA_DK4:
+ case AV_CODEC_ID_ADPCM_IMA_DK4:
for (channel = 0; channel < avctx->channels; channel++) {
cs = &c->status[channel];
cs->predictor = *samples++ = sign_extend(bytestream2_get_le16u(&gb), 16);
@@ -761,7 +761,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
*samples++ = adpcm_ima_expand_nibble(&c->status[st], v & 0x0F, 3);
}
break;
- case CODEC_ID_ADPCM_IMA_DK3:
+ case AV_CODEC_ID_ADPCM_IMA_DK3:
{
int last_byte = 0;
int nibble;
@@ -822,7 +822,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
}
break;
}
- case CODEC_ID_ADPCM_IMA_ISS:
+ case AV_CODEC_ID_ADPCM_IMA_ISS:
for (channel = 0; channel < avctx->channels; channel++) {
cs = &c->status[channel];
cs->predictor = sign_extend(bytestream2_get_le16u(&gb), 16);
@@ -849,14 +849,14 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
*samples++ = adpcm_ima_expand_nibble(&c->status[st], v2, 3);
}
break;
- case CODEC_ID_ADPCM_IMA_APC:
+ case AV_CODEC_ID_ADPCM_IMA_APC:
while (bytestream2_get_bytes_left(&gb) > 0) {
int v = bytestream2_get_byteu(&gb);
*samples++ = adpcm_ima_expand_nibble(&c->status[0], v >> 4 , 3);
*samples++ = adpcm_ima_expand_nibble(&c->status[st], v & 0x0F, 3);
}
break;
- case CODEC_ID_ADPCM_IMA_WS:
+ case AV_CODEC_ID_ADPCM_IMA_WS:
if (c->vqa_version == 3) {
for (channel = 0; channel < avctx->channels; channel++) {
int16_t *smp = samples + channel;
@@ -881,7 +881,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
}
bytestream2_seek(&gb, 0, SEEK_END);
break;
- case CODEC_ID_ADPCM_XA:
+ case AV_CODEC_ID_ADPCM_XA:
while (bytestream2_get_bytes_left(&gb) >= 128) {
if ((ret = xa_decode(avctx, samples, buf + bytestream2_tell(&gb), &c->status[0],
&c->status[1], avctx->channels)) < 0)
@@ -890,7 +890,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
samples += 28 * 8;
}
break;
- case CODEC_ID_ADPCM_IMA_EA_EACS:
+ case AV_CODEC_ID_ADPCM_IMA_EA_EACS:
for (i=0; i<=st; i++) {
c->status[i].step_index = bytestream2_get_le32u(&gb);
if (c->status[i].step_index > 88u) {
@@ -908,14 +908,14 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
*samples++ = adpcm_ima_expand_nibble(&c->status[st], byte & 0x0F, 3);
}
break;
- case CODEC_ID_ADPCM_IMA_EA_SEAD:
+ case AV_CODEC_ID_ADPCM_IMA_EA_SEAD:
for (n = nb_samples >> (1 - st); n > 0; n--) {
int byte = bytestream2_get_byteu(&gb);
*samples++ = adpcm_ima_expand_nibble(&c->status[0], byte >> 4, 6);
*samples++ = adpcm_ima_expand_nibble(&c->status[st], byte & 0x0F, 6);
}
break;
- case CODEC_ID_ADPCM_EA:
+ case AV_CODEC_ID_ADPCM_EA:
{
int previous_left_sample, previous_right_sample;
int current_left_sample, current_right_sample;
@@ -970,7 +970,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
break;
}
- case CODEC_ID_ADPCM_EA_MAXIS_XA:
+ case AV_CODEC_ID_ADPCM_EA_MAXIS_XA:
{
int coeff[2][2], shift[2];
@@ -1000,14 +1000,14 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
bytestream2_seek(&gb, 0, SEEK_END);
break;
}
- case CODEC_ID_ADPCM_EA_R1:
- case CODEC_ID_ADPCM_EA_R2:
- case CODEC_ID_ADPCM_EA_R3: {
+ case AV_CODEC_ID_ADPCM_EA_R1:
+ case AV_CODEC_ID_ADPCM_EA_R2:
+ case AV_CODEC_ID_ADPCM_EA_R3: {
/* channel numbering
2chan: 0=fl, 1=fr
4chan: 0=fl, 1=rl, 2=fr, 3=rr
6chan: 0=fl, 1=c, 2=fr, 3=rl, 4=rr, 5=sub */
- const int big_endian = avctx->codec->id == CODEC_ID_ADPCM_EA_R3;
+ const int big_endian = avctx->codec->id == AV_CODEC_ID_ADPCM_EA_R3;
int previous_sample, current_sample, next_sample;
int coeff1, coeff2;
int shift;
@@ -1025,7 +1025,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
bytestream2_seek(&gb, offsets[channel], SEEK_SET);
samplesC = samples + channel;
- if (avctx->codec->id == CODEC_ID_ADPCM_EA_R1) {
+ if (avctx->codec->id == AV_CODEC_ID_ADPCM_EA_R1) {
current_sample = sign_extend(bytestream2_get_le16(&gb), 16);
previous_sample = sign_extend(bytestream2_get_le16(&gb), 16);
} else {
@@ -1074,7 +1074,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
count = FFMAX(count, count1);
}
- if (avctx->codec->id != CODEC_ID_ADPCM_EA_R1) {
+ if (avctx->codec->id != AV_CODEC_ID_ADPCM_EA_R1) {
c->status[channel].predictor = current_sample;
c->status[channel].prev_sample = previous_sample;
}
@@ -1084,7 +1084,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
bytestream2_seek(&gb, 0, SEEK_END);
break;
}
- case CODEC_ID_ADPCM_EA_XAS:
+ case AV_CODEC_ID_ADPCM_EA_XAS:
for (channel=0; channel<avctx->channels; channel++) {
int coeff[2][4], shift[4];
short *s2, *s = &samples[channel];
@@ -1113,9 +1113,9 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
}
}
break;
- case CODEC_ID_ADPCM_IMA_AMV:
- case CODEC_ID_ADPCM_IMA_SMJPEG:
- if (avctx->codec->id == CODEC_ID_ADPCM_IMA_AMV) {
+ case AV_CODEC_ID_ADPCM_IMA_AMV:
+ case AV_CODEC_ID_ADPCM_IMA_SMJPEG:
+ if (avctx->codec->id == AV_CODEC_ID_ADPCM_IMA_AMV) {
c->status[0].predictor = sign_extend(bytestream2_get_le16u(&gb), 16);
c->status[0].step_index = bytestream2_get_le16u(&gb);
bytestream2_skipu(&gb, 4);
@@ -1133,7 +1133,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
for (n = nb_samples >> (1 - st); n > 0; n--) {
int hi, lo, v = bytestream2_get_byteu(&gb);
- if (avctx->codec->id == CODEC_ID_ADPCM_IMA_AMV) {
+ if (avctx->codec->id == AV_CODEC_ID_ADPCM_IMA_AMV) {
hi = v & 0x0F;
lo = v >> 4;
} else {
@@ -1145,16 +1145,16 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
*samples++ = adpcm_ima_expand_nibble(&c->status[0], hi, 3);
}
break;
- case CODEC_ID_ADPCM_CT:
+ case AV_CODEC_ID_ADPCM_CT:
for (n = nb_samples >> (1 - st); n > 0; n--) {
int v = bytestream2_get_byteu(&gb);
*samples++ = adpcm_ct_expand_nibble(&c->status[0 ], v >> 4 );
*samples++ = adpcm_ct_expand_nibble(&c->status[st], v & 0x0F);
}
break;
- case CODEC_ID_ADPCM_SBPRO_4:
- case CODEC_ID_ADPCM_SBPRO_3:
- case CODEC_ID_ADPCM_SBPRO_2:
+ case AV_CODEC_ID_ADPCM_SBPRO_4:
+ case AV_CODEC_ID_ADPCM_SBPRO_3:
+ case AV_CODEC_ID_ADPCM_SBPRO_2:
if (!c->status[0].step_index) {
/* the first byte is a raw sample */
*samples++ = 128 * (bytestream2_get_byteu(&gb) - 0x80);
@@ -1163,7 +1163,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
c->status[0].step_index = 1;
nb_samples--;
}
- if (avctx->codec->id == CODEC_ID_ADPCM_SBPRO_4) {
+ if (avctx->codec->id == AV_CODEC_ID_ADPCM_SBPRO_4) {
for (n = nb_samples >> (1 - st); n > 0; n--) {
int byte = bytestream2_get_byteu(&gb);
*samples++ = adpcm_sbpro_expand_nibble(&c->status[0],
@@ -1171,7 +1171,7 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
*samples++ = adpcm_sbpro_expand_nibble(&c->status[st],
byte & 0x0F, 4, 0);
}
- } else if (avctx->codec->id == CODEC_ID_ADPCM_SBPRO_3) {
+ } else if (avctx->codec->id == AV_CODEC_ID_ADPCM_SBPRO_3) {
for (n = nb_samples / 3; n > 0; n--) {
int byte = bytestream2_get_byteu(&gb);
*samples++ = adpcm_sbpro_expand_nibble(&c->status[0],
@@ -1195,18 +1195,18 @@ static int adpcm_decode_frame(AVCodecContext *avctx, void *data,
}
}
break;
- case CODEC_ID_ADPCM_SWF:
+ case AV_CODEC_ID_ADPCM_SWF:
adpcm_swf_decode(avctx, buf, buf_size, samples);
bytestream2_seek(&gb, 0, SEEK_END);
break;
- case CODEC_ID_ADPCM_YAMAHA:
+ case AV_CODEC_ID_ADPCM_YAMAHA:
for (n = nb_samples >> (1 - st); n > 0; n--) {
int v = bytestream2_get_byteu(&gb);
*samples++ = adpcm_yamaha_expand_nibble(&c->status[0 ], v & 0x0F);
*samples++ = adpcm_yamaha_expand_nibble(&c->status[st], v >> 4 );
}
break;
- case CODEC_ID_ADPCM_THP:
+ case AV_CODEC_ID_ADPCM_THP:
{
int table[2][16];
int prev[2][2];
@@ -1282,30 +1282,30 @@ AVCodec ff_ ## name_ ## _decoder = { \
}
/* Note: Do not forget to add new entries to the Makefile as well. */
-ADPCM_DECODER(CODEC_ID_ADPCM_4XM, adpcm_4xm, "ADPCM 4X Movie");
-ADPCM_DECODER(CODEC_ID_ADPCM_CT, adpcm_ct, "ADPCM Creative Technology");
-ADPCM_DECODER(CODEC_ID_ADPCM_EA, adpcm_ea, "ADPCM Electronic Arts");
-ADPCM_DECODER(CODEC_ID_ADPCM_EA_MAXIS_XA, adpcm_ea_maxis_xa, "ADPCM Electronic Arts Maxis CDROM XA");
-ADPCM_DECODER(CODEC_ID_ADPCM_EA_R1, adpcm_ea_r1, "ADPCM Electronic Arts R1");
-ADPCM_DECODER(CODEC_ID_ADPCM_EA_R2, adpcm_ea_r2, "ADPCM Electronic Arts R2");
-ADPCM_DECODER(CODEC_ID_ADPCM_EA_R3, adpcm_ea_r3, "ADPCM Electronic Arts R3");
-ADPCM_DECODER(CODEC_ID_ADPCM_EA_XAS, adpcm_ea_xas, "ADPCM Electronic Arts XAS");
-ADPCM_DECODER(CODEC_ID_ADPCM_IMA_AMV, adpcm_ima_amv, "ADPCM IMA AMV");
-ADPCM_DECODER(CODEC_ID_ADPCM_IMA_APC, adpcm_ima_apc, "ADPCM IMA CRYO APC");
-ADPCM_DECODER(CODEC_ID_ADPCM_IMA_DK3, adpcm_ima_dk3, "ADPCM IMA Duck DK3");
-ADPCM_DECODER(CODEC_ID_ADPCM_IMA_DK4, adpcm_ima_dk4, "ADPCM IMA Duck DK4");
-ADPCM_DECODER(CODEC_ID_ADPCM_IMA_EA_EACS, adpcm_ima_ea_eacs, "ADPCM IMA Electronic Arts EACS");
-ADPCM_DECODER(CODEC_ID_ADPCM_IMA_EA_SEAD, adpcm_ima_ea_sead, "ADPCM IMA Electronic Arts SEAD");
-ADPCM_DECODER(CODEC_ID_ADPCM_IMA_ISS, adpcm_ima_iss, "ADPCM IMA Funcom ISS");
-ADPCM_DECODER(CODEC_ID_ADPCM_IMA_QT, adpcm_ima_qt, "ADPCM IMA QuickTime");
-ADPCM_DECODER(CODEC_ID_ADPCM_IMA_SMJPEG, adpcm_ima_smjpeg, "ADPCM IMA Loki SDL MJPEG");
-ADPCM_DECODER(CODEC_ID_ADPCM_IMA_WAV, adpcm_ima_wav, "ADPCM IMA WAV");
-ADPCM_DECODER(CODEC_ID_ADPCM_IMA_WS, adpcm_ima_ws, "ADPCM IMA Westwood");
-ADPCM_DECODER(CODEC_ID_ADPCM_MS, adpcm_ms, "ADPCM Microsoft");
-ADPCM_DECODER(CODEC_ID_ADPCM_SBPRO_2, adpcm_sbpro_2, "ADPCM Sound Blaster Pro 2-bit");
-ADPCM_DECODER(CODEC_ID_ADPCM_SBPRO_3, adpcm_sbpro_3, "ADPCM Sound Blaster Pro 2.6-bit");
-ADPCM_DECODER(CODEC_ID_ADPCM_SBPRO_4, adpcm_sbpro_4, "ADPCM Sound Blaster Pro 4-bit");
-ADPCM_DECODER(CODEC_ID_ADPCM_SWF, adpcm_swf, "ADPCM Shockwave Flash");
-ADPCM_DECODER(CODEC_ID_ADPCM_THP, adpcm_thp, "ADPCM Nintendo Gamecube THP");
-ADPCM_DECODER(CODEC_ID_ADPCM_XA, adpcm_xa, "ADPCM CDROM XA");
-ADPCM_DECODER(CODEC_ID_ADPCM_YAMAHA, adpcm_yamaha, "ADPCM Yamaha");
+ADPCM_DECODER(AV_CODEC_ID_ADPCM_4XM, adpcm_4xm, "ADPCM 4X Movie");
+ADPCM_DECODER(AV_CODEC_ID_ADPCM_CT, adpcm_ct, "ADPCM Creative Technology");
+ADPCM_DECODER(AV_CODEC_ID_ADPCM_EA, adpcm_ea, "ADPCM Electronic Arts");
+ADPCM_DECODER(AV_CODEC_ID_ADPCM_EA_MAXIS_XA, adpcm_ea_maxis_xa, "ADPCM Electronic Arts Maxis CDROM XA");
+ADPCM_DECODER(AV_CODEC_ID_ADPCM_EA_R1, adpcm_ea_r1, "ADPCM Electronic Arts R1");
+ADPCM_DECODER(AV_CODEC_ID_ADPCM_EA_R2, adpcm_ea_r2, "ADPCM Electronic Arts R2");
+ADPCM_DECODER(AV_CODEC_ID_ADPCM_EA_R3, adpcm_ea_r3, "ADPCM Electronic Arts R3");
+ADPCM_DECODER(AV_CODEC_ID_ADPCM_EA_XAS, adpcm_ea_xas, "ADPCM Electronic Arts XAS");
+ADPCM_DECODER(AV_CODEC_ID_ADPCM_IMA_AMV, adpcm_ima_amv, "ADPCM IMA AMV");
+ADPCM_DECODER(AV_CODEC_ID_ADPCM_IMA_APC, adpcm_ima_apc, "ADPCM IMA CRYO APC");
+ADPCM_DECODER(AV_CODEC_ID_ADPCM_IMA_DK3, adpcm_ima_dk3, "ADPCM IMA Duck DK3");
+ADPCM_DECODER(AV_CODEC_ID_ADPCM_IMA_DK4, adpcm_ima_dk4, "ADPCM IMA Duck DK4");
+ADPCM_DECODER(AV_CODEC_ID_ADPCM_IMA_EA_EACS, adpcm_ima_ea_eacs, "ADPCM IMA Electronic Arts EACS");
+ADPCM_DECODER(AV_CODEC_ID_ADPCM_IMA_EA_SEAD, adpcm_ima_ea_sead, "ADPCM IMA Electronic Arts SEAD");
+ADPCM_DECODER(AV_CODEC_ID_ADPCM_IMA_ISS, adpcm_ima_iss, "ADPCM IMA Funcom ISS");
+ADPCM_DECODER(AV_CODEC_ID_ADPCM_IMA_QT, adpcm_ima_qt, "ADPCM IMA QuickTime");
+ADPCM_DECODER(AV_CODEC_ID_ADPCM_IMA_SMJPEG, adpcm_ima_smjpeg, "ADPCM IMA Loki SDL MJPEG");
+ADPCM_DECODER(AV_CODEC_ID_ADPCM_IMA_WAV, adpcm_ima_wav, "ADPCM IMA WAV");
+ADPCM_DECODER(AV_CODEC_ID_ADPCM_IMA_WS, adpcm_ima_ws, "ADPCM IMA Westwood");
+ADPCM_DECODER(AV_CODEC_ID_ADPCM_MS, adpcm_ms, "ADPCM Microsoft");
+ADPCM_DECODER(AV_CODEC_ID_ADPCM_SBPRO_2, adpcm_sbpro_2, "ADPCM Sound Blaster Pro 2-bit");
+ADPCM_DECODER(AV_CODEC_ID_ADPCM_SBPRO_3, adpcm_sbpro_3, "ADPCM Sound Blaster Pro 2.6-bit");
+ADPCM_DECODER(AV_CODEC_ID_ADPCM_SBPRO_4, adpcm_sbpro_4, "ADPCM Sound Blaster Pro 4-bit");
+ADPCM_DECODER(AV_CODEC_ID_ADPCM_SWF, adpcm_swf, "ADPCM Shockwave Flash");
+ADPCM_DECODER(AV_CODEC_ID_ADPCM_THP, adpcm_thp, "ADPCM Nintendo Gamecube THP");
+ADPCM_DECODER(AV_CODEC_ID_ADPCM_XA, adpcm_xa, "ADPCM CDROM XA");
+ADPCM_DECODER(AV_CODEC_ID_ADPCM_YAMAHA, adpcm_yamaha, "ADPCM Yamaha");
diff --git a/libavcodec/adpcmenc.c b/libavcodec/adpcmenc.c
index 4a0023231e..3af81cbc21 100644
--- a/libavcodec/adpcmenc.c
+++ b/libavcodec/adpcmenc.c
@@ -94,7 +94,7 @@ static av_cold int adpcm_encode_init(AVCodecContext *avctx)
avctx->bits_per_coded_sample = av_get_bits_per_sample(avctx->codec->id);
switch (avctx->codec->id) {
- case CODEC_ID_ADPCM_IMA_WAV:
+ case AV_CODEC_ID_ADPCM_IMA_WAV:
/* each 16 bits sample gives one nibble
and we have 4 bytes per channel overhead */
avctx->frame_size = (BLKSIZE - 4 * avctx->channels) * 8 /
@@ -104,11 +104,11 @@ static av_cold int adpcm_encode_init(AVCodecContext *avctx)
avctx->block_align = BLKSIZE;
avctx->bits_per_coded_sample = 4;
break;
- case CODEC_ID_ADPCM_IMA_QT:
+ case AV_CODEC_ID_ADPCM_IMA_QT:
avctx->frame_size = 64;
avctx->block_align = 34 * avctx->channels;
break;
- case CODEC_ID_ADPCM_MS:
+ case AV_CODEC_ID_ADPCM_MS:
/* each 16 bits sample gives one nibble
and we have 7 bytes per channel overhead */
avctx->frame_size = (BLKSIZE - 7 * avctx->channels) * 2 / avctx->channels + 2;
@@ -125,11 +125,11 @@ static av_cold int adpcm_encode_init(AVCodecContext *avctx)
bytestream_put_le16(&extradata, ff_adpcm_AdaptCoeff2[i] * 4);
}
break;
- case CODEC_ID_ADPCM_YAMAHA:
+ case AV_CODEC_ID_ADPCM_YAMAHA:
avctx->frame_size = BLKSIZE * 2 / avctx->channels;
avctx->block_align = BLKSIZE;
break;
- case CODEC_ID_ADPCM_SWF:
+ case AV_CODEC_ID_ADPCM_SWF:
if (avctx->sample_rate != 11025 &&
avctx->sample_rate != 22050 &&
avctx->sample_rate != 44100) {
@@ -297,13 +297,13 @@ static void adpcm_compress_trellis(AVCodecContext *avctx,
nodes[0]->step = c->step_index;
nodes[0]->sample1 = c->sample1;
nodes[0]->sample2 = c->sample2;
- if (version == CODEC_ID_ADPCM_IMA_WAV ||
- version == CODEC_ID_ADPCM_IMA_QT ||
- version == CODEC_ID_ADPCM_SWF)
+ if (version == AV_CODEC_ID_ADPCM_IMA_WAV ||
+ version == AV_CODEC_ID_ADPCM_IMA_QT ||
+ version == AV_CODEC_ID_ADPCM_SWF)
nodes[0]->sample1 = c->prev_sample;
- if (version == CODEC_ID_ADPCM_MS)
+ if (version == AV_CODEC_ID_ADPCM_MS)
nodes[0]->step = c->idelta;
- if (version == CODEC_ID_ADPCM_YAMAHA) {
+ if (version == AV_CODEC_ID_ADPCM_YAMAHA) {
if (c->step == 0) {
nodes[0]->step = 127;
nodes[0]->sample1 = 0;
@@ -325,7 +325,7 @@ static void adpcm_compress_trellis(AVCodecContext *avctx,
const int range = (j < frontier / 2) ? 1 : 0;
const int step = nodes[j]->step;
int nidx;
- if (version == CODEC_ID_ADPCM_MS) {
+ if (version == AV_CODEC_ID_ADPCM_MS) {
const int predictor = ((nodes[j]->sample1 * c->coeff1) +
(nodes[j]->sample2 * c->coeff2)) / 64;
const int div = (sample - predictor) / step;
@@ -401,9 +401,9 @@ static void adpcm_compress_trellis(AVCodecContext *avctx,
STORE_NODE(ms, FFMAX(16,
(ff_adpcm_AdaptationTable[nibble] * step) >> 8));
}
- } else if (version == CODEC_ID_ADPCM_IMA_WAV ||
- version == CODEC_ID_ADPCM_IMA_QT ||
- version == CODEC_ID_ADPCM_SWF) {
+ } else if (version == AV_CODEC_ID_ADPCM_IMA_WAV ||
+ version == AV_CODEC_ID_ADPCM_IMA_QT ||
+ version == AV_CODEC_ID_ADPCM_SWF) {
#define LOOP_NODES(NAME, STEP_TABLE, STEP_INDEX)\
const int predictor = nodes[j]->sample1;\
const int div = (sample - predictor) * 4 / STEP_TABLE;\
@@ -422,7 +422,7 @@ static void adpcm_compress_trellis(AVCodecContext *avctx,
}
LOOP_NODES(ima, ff_adpcm_step_table[step],
av_clip(step + ff_adpcm_index_table[nibble], 0, 88));
- } else { //CODEC_ID_ADPCM_YAMAHA
+ } else { //AV_CODEC_ID_ADPCM_YAMAHA
LOOP_NODES(yamaha, step,
av_clip((step * ff_adpcm_yamaha_indexscale[nibble]) >> 8,
127, 24567));
@@ -490,7 +490,7 @@ static int adpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
samples = (const int16_t *)frame->data[0];
st = avctx->channels == 2;
- if (avctx->codec_id == CODEC_ID_ADPCM_SWF)
+ if (avctx->codec_id == AV_CODEC_ID_ADPCM_SWF)
pkt_size = (2 + avctx->channels * (22 + 4 * (frame->nb_samples - 1)) + 7) / 8;
else
pkt_size = avctx->block_align;
@@ -499,7 +499,7 @@ static int adpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
dst = avpkt->data;
switch(avctx->codec->id) {
- case CODEC_ID_ADPCM_IMA_WAV:
+ case AV_CODEC_ID_ADPCM_IMA_WAV:
n = frame->nb_samples / 8;
c->status[0].prev_sample = samples[0];
/* c->status[0].step_index = 0;
@@ -564,7 +564,7 @@ static int adpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
}
}
break;
- case CODEC_ID_ADPCM_IMA_QT:
+ case AV_CODEC_ID_ADPCM_IMA_QT:
{
int ch, i;
PutBitContext pb;
@@ -594,7 +594,7 @@ static int adpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
flush_put_bits(&pb);
break;
}
- case CODEC_ID_ADPCM_SWF:
+ case AV_CODEC_ID_ADPCM_SWF:
{
int i;
PutBitContext pb;
@@ -638,7 +638,7 @@ static int adpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
flush_put_bits(&pb);
break;
}
- case CODEC_ID_ADPCM_MS:
+ case AV_CODEC_ID_ADPCM_MS:
for (i = 0; i < avctx->channels; i++) {
int predictor = 0;
*dst++ = predictor;
@@ -682,7 +682,7 @@ static int adpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
}
}
break;
- case CODEC_ID_ADPCM_YAMAHA:
+ case AV_CODEC_ID_ADPCM_YAMAHA:
n = frame->nb_samples / 2;
if (avctx->trellis > 0) {
FF_ALLOC_OR_GOTO(avctx, buf, 2 * n * 2, error);
@@ -734,8 +734,8 @@ AVCodec ff_ ## name_ ## _encoder = { \
.long_name = NULL_IF_CONFIG_SMALL(long_name_), \
}
-ADPCM_ENCODER(CODEC_ID_ADPCM_IMA_QT, adpcm_ima_qt, "ADPCM IMA QuickTime");
-ADPCM_ENCODER(CODEC_ID_ADPCM_IMA_WAV, adpcm_ima_wav, "ADPCM IMA WAV");
-ADPCM_ENCODER(CODEC_ID_ADPCM_MS, adpcm_ms, "ADPCM Microsoft");
-ADPCM_ENCODER(CODEC_ID_ADPCM_SWF, adpcm_swf, "ADPCM Shockwave Flash");
-ADPCM_ENCODER(CODEC_ID_ADPCM_YAMAHA, adpcm_yamaha, "ADPCM Yamaha");
+ADPCM_ENCODER(AV_CODEC_ID_ADPCM_IMA_QT, adpcm_ima_qt, "ADPCM IMA QuickTime");
+ADPCM_ENCODER(AV_CODEC_ID_ADPCM_IMA_WAV, adpcm_ima_wav, "ADPCM IMA WAV");
+ADPCM_ENCODER(AV_CODEC_ID_ADPCM_MS, adpcm_ms, "ADPCM Microsoft");
+ADPCM_ENCODER(AV_CODEC_ID_ADPCM_SWF, adpcm_swf, "ADPCM Shockwave Flash");
+ADPCM_ENCODER(AV_CODEC_ID_ADPCM_YAMAHA, adpcm_yamaha, "ADPCM Yamaha");
diff --git a/libavcodec/adx_parser.c b/libavcodec/adx_parser.c
index 8dc87fcc58..706e242c82 100644
--- a/libavcodec/adx_parser.c
+++ b/libavcodec/adx_parser.c
@@ -89,7 +89,7 @@ static int adx_parse(AVCodecParserContext *s1,
}
AVCodecParser ff_adx_parser = {
- .codec_ids = { CODEC_ID_ADPCM_ADX },
+ .codec_ids = { AV_CODEC_ID_ADPCM_ADX },
.priv_data_size = sizeof(ADXParseContext),
.parser_parse = adx_parse,
.parser_close = ff_parse_close,
diff --git a/libavcodec/adxdec.c b/libavcodec/adxdec.c
index 630b79599b..0ac9bce1e4 100644
--- a/libavcodec/adxdec.c
+++ b/libavcodec/adxdec.c
@@ -176,7 +176,7 @@ static void adx_decode_flush(AVCodecContext *avctx)
AVCodec ff_adpcm_adx_decoder = {
.name = "adpcm_adx",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_ADPCM_ADX,
+ .id = AV_CODEC_ID_ADPCM_ADX,
.priv_data_size = sizeof(ADXContext),
.init = adx_decode_init,
.decode = adx_decode_frame,
diff --git a/libavcodec/adxenc.c b/libavcodec/adxenc.c
index bcb8967266..8514a0c9b1 100644
--- a/libavcodec/adxenc.c
+++ b/libavcodec/adxenc.c
@@ -164,7 +164,7 @@ static int adx_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
AVCodec ff_adpcm_adx_encoder = {
.name = "adpcm_adx",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_ADPCM_ADX,
+ .id = AV_CODEC_ID_ADPCM_ADX,
.priv_data_size = sizeof(ADXContext),
.init = adx_encode_init,
.encode2 = adx_encode_frame,
diff --git a/libavcodec/alac.c b/libavcodec/alac.c
index d41c9d95a4..6d047960cd 100644
--- a/libavcodec/alac.c
+++ b/libavcodec/alac.c
@@ -652,7 +652,7 @@ static av_cold int alac_decode_init(AVCodecContext * avctx)
AVCodec ff_alac_decoder = {
.name = "alac",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_ALAC,
+ .id = AV_CODEC_ID_ALAC,
.priv_data_size = sizeof(ALACContext),
.init = alac_decode_init,
.close = alac_decode_close,
diff --git a/libavcodec/alacenc.c b/libavcodec/alacenc.c
index 0194e2fecc..8b2b513cd7 100644
--- a/libavcodec/alacenc.c
+++ b/libavcodec/alacenc.c
@@ -574,7 +574,7 @@ static int alac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
AVCodec ff_alac_encoder = {
.name = "alac",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_ALAC,
+ .id = AV_CODEC_ID_ALAC,
.priv_data_size = sizeof(AlacEncodeContext),
.init = alac_encode_init,
.encode2 = alac_encode_frame,
diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c
index e5208fc2bf..672fcba286 100644
--- a/libavcodec/alsdec.c
+++ b/libavcodec/alsdec.c
@@ -1754,7 +1754,7 @@ static av_cold void flush(AVCodecContext *avctx)
AVCodec ff_als_decoder = {
.name = "als",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_MP4ALS,
+ .id = AV_CODEC_ID_MP4ALS,
.priv_data_size = sizeof(ALSDecContext),
.init = decode_init,
.close = decode_end,
diff --git a/libavcodec/amrnbdec.c b/libavcodec/amrnbdec.c
index c791110dc7..04c921c05b 100644
--- a/libavcodec/amrnbdec.c
+++ b/libavcodec/amrnbdec.c
@@ -1075,7 +1075,7 @@ static int amrnb_decode_frame(AVCodecContext *avctx, void *data,
AVCodec ff_amrnb_decoder = {
.name = "amrnb",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_AMR_NB,
+ .id = AV_CODEC_ID_AMR_NB,
.priv_data_size = sizeof(AMRContext),
.init = amrnb_decode_init,
.decode = amrnb_decode_frame,
diff --git a/libavcodec/amrwbdec.c b/libavcodec/amrwbdec.c
index afd8d64b1b..ec3bc6500e 100644
--- a/libavcodec/amrwbdec.c
+++ b/libavcodec/amrwbdec.c
@@ -1257,7 +1257,7 @@ static int amrwb_decode_frame(AVCodecContext *avctx, void *data,
AVCodec ff_amrwb_decoder = {
.name = "amrwb",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_AMR_WB,
+ .id = AV_CODEC_ID_AMR_WB,
.priv_data_size = sizeof(AMRWBContext),
.init = amrwb_decode_init,
.decode = amrwb_decode_frame,
diff --git a/libavcodec/anm.c b/libavcodec/anm.c
index 7fdfc94d0f..a077367500 100644
--- a/libavcodec/anm.c
+++ b/libavcodec/anm.c
@@ -187,7 +187,7 @@ static av_cold int decode_end(AVCodecContext *avctx)
AVCodec ff_anm_decoder = {
.name = "anm",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_ANM,
+ .id = AV_CODEC_ID_ANM,
.priv_data_size = sizeof(AnmContext),
.init = decode_init,
.close = decode_end,
diff --git a/libavcodec/ansi.c b/libavcodec/ansi.c
index 1128d6f94c..bc7dbe7a06 100644
--- a/libavcodec/ansi.c
+++ b/libavcodec/ansi.c
@@ -428,7 +428,7 @@ static av_cold int decode_close(AVCodecContext *avctx)
AVCodec ff_ansi_decoder = {
.name = "ansi",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_ANSI,
+ .id = AV_CODEC_ID_ANSI,
.priv_data_size = sizeof(AnsiContext),
.init = decode_init,
.close = decode_close,
diff --git a/libavcodec/apedec.c b/libavcodec/apedec.c
index c0064208ad..a79891e82b 100644
--- a/libavcodec/apedec.c
+++ b/libavcodec/apedec.c
@@ -987,7 +987,7 @@ static const AVClass ape_decoder_class = {
AVCodec ff_ape_decoder = {
.name = "ape",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_APE,
+ .id = AV_CODEC_ID_APE,
.priv_data_size = sizeof(APEContext),
.init = ape_decode_init,
.close = ape_decode_close,
diff --git a/libavcodec/arm/h264pred_init_arm.c b/libavcodec/arm/h264pred_init_arm.c
index fd2cdc0838..bd2ed0a5df 100644
--- a/libavcodec/arm/h264pred_init_arm.c
+++ b/libavcodec/arm/h264pred_init_arm.c
@@ -53,10 +53,10 @@ static void ff_h264_pred_init_neon(H264PredContext *h, int codec_id, const int b
if(chroma_format_idc == 1){
h->pred8x8[VERT_PRED8x8 ] = ff_pred8x8_vert_neon;
h->pred8x8[HOR_PRED8x8 ] = ff_pred8x8_hor_neon;
- if (codec_id != CODEC_ID_VP8)
+ if (codec_id != AV_CODEC_ID_VP8)
h->pred8x8[PLANE_PRED8x8] = ff_pred8x8_plane_neon;
h->pred8x8[DC_128_PRED8x8 ] = ff_pred8x8_128_dc_neon;
- if (codec_id != CODEC_ID_RV40 && codec_id != CODEC_ID_VP8) {
+ if (codec_id != AV_CODEC_ID_RV40 && codec_id != AV_CODEC_ID_VP8) {
h->pred8x8[DC_PRED8x8 ] = ff_pred8x8_dc_neon;
h->pred8x8[LEFT_DC_PRED8x8] = ff_pred8x8_left_dc_neon;
h->pred8x8[TOP_DC_PRED8x8 ] = ff_pred8x8_top_dc_neon;
@@ -73,7 +73,7 @@ static void ff_h264_pred_init_neon(H264PredContext *h, int codec_id, const int b
h->pred16x16[LEFT_DC_PRED8x8] = ff_pred16x16_left_dc_neon;
h->pred16x16[TOP_DC_PRED8x8 ] = ff_pred16x16_top_dc_neon;
h->pred16x16[DC_128_PRED8x8 ] = ff_pred16x16_128_dc_neon;
- if (codec_id != CODEC_ID_SVQ3 && codec_id != CODEC_ID_RV40 && codec_id != CODEC_ID_VP8)
+ if (codec_id != AV_CODEC_ID_SVQ3 && codec_id != AV_CODEC_ID_RV40 && codec_id != AV_CODEC_ID_VP8)
h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_plane_neon;
#endif // HAVE_NEON
}
diff --git a/libavcodec/arm/vp56dsp_init_arm.c b/libavcodec/arm/vp56dsp_init_arm.c
index ab227ce3af..13046535d9 100644
--- a/libavcodec/arm/vp56dsp_init_arm.c
+++ b/libavcodec/arm/vp56dsp_init_arm.c
@@ -27,11 +27,11 @@
void ff_vp6_edge_filter_hor_neon(uint8_t *yuv, int stride, int t);
void ff_vp6_edge_filter_ver_neon(uint8_t *yuv, int stride, int t);
-void ff_vp56dsp_init_arm(VP56DSPContext *s, enum CodecID codec)
+void ff_vp56dsp_init_arm(VP56DSPContext *s, enum AVCodecID codec)
{
int cpu_flags = av_get_cpu_flags();
- if (codec != CODEC_ID_VP5 && have_neon(cpu_flags)) {
+ if (codec != AV_CODEC_ID_VP5 && have_neon(cpu_flags)) {
s->edge_filter_hor = ff_vp6_edge_filter_hor_neon;
s->edge_filter_ver = ff_vp6_edge_filter_ver_neon;
}
diff --git a/libavcodec/assdec.c b/libavcodec/assdec.c
index fc5ba14b4b..9709247c2d 100644
--- a/libavcodec/assdec.c
+++ b/libavcodec/assdec.c
@@ -70,7 +70,7 @@ AVCodec ff_ass_decoder = {
.name = "ass",
.long_name = NULL_IF_CONFIG_SMALL("SSA (SubStation Alpha) subtitle"),
.type = AVMEDIA_TYPE_SUBTITLE,
- .id = CODEC_ID_SSA,
+ .id = AV_CODEC_ID_SSA,
.init = ass_decode_init,
.decode = ass_decode_frame,
.close = ass_decode_close,
diff --git a/libavcodec/assenc.c b/libavcodec/assenc.c
index 87a8dd62c0..d4a53da76b 100644
--- a/libavcodec/assenc.c
+++ b/libavcodec/assenc.c
@@ -61,7 +61,7 @@ AVCodec ff_ass_encoder = {
.name = "ass",
.long_name = NULL_IF_CONFIG_SMALL("SSA (SubStation Alpha) subtitle"),
.type = AVMEDIA_TYPE_SUBTITLE,
- .id = CODEC_ID_SSA,
+ .id = AV_CODEC_ID_SSA,
.init = ass_encode_init,
.encode = ass_encode_frame,
};
diff --git a/libavcodec/asv1.c b/libavcodec/asv1.c
index 5c36459f18..51b924a5fb 100644
--- a/libavcodec/asv1.c
+++ b/libavcodec/asv1.c
@@ -309,7 +309,7 @@ static inline int decode_mb(ASV1Context *a, DCTELEM block[6][64]){
a->dsp.clear_blocks(block[0]);
- if(a->avctx->codec_id == CODEC_ID_ASV1){
+ if(a->avctx->codec_id == AV_CODEC_ID_ASV1){
for(i=0; i<6; i++){
if( asv1_decode_block(a, block[i]) < 0)
return -1;
@@ -333,7 +333,7 @@ static inline int encode_mb(ASV1Context *a, DCTELEM block[6][64]){
return -1;
}
- if(a->avctx->codec_id == CODEC_ID_ASV1){
+ if(a->avctx->codec_id == AV_CODEC_ID_ASV1){
for(i=0; i<6; i++)
asv1_encode_block(a, block[i]);
}else{
@@ -413,7 +413,7 @@ static int decode_frame(AVCodecContext *avctx,
if (!a->bitstream_buffer)
return AVERROR(ENOMEM);
- if(avctx->codec_id == CODEC_ID_ASV1)
+ if(avctx->codec_id == AV_CODEC_ID_ASV1)
a->dsp.bswap_buf((uint32_t*)a->bitstream_buffer, (const uint32_t*)buf, buf_size/4);
else{
int i;
@@ -509,7 +509,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
size= put_bits_count(&a->pb)/32;
- if(avctx->codec_id == CODEC_ID_ASV1)
+ if(avctx->codec_id == AV_CODEC_ID_ASV1)
a->dsp.bswap_buf((uint32_t*)pkt->data, (uint32_t*)pkt->data, size);
else{
int i;
@@ -543,7 +543,7 @@ static av_cold int decode_init(AVCodecContext *avctx){
ASV1Context * const a = avctx->priv_data;
AVFrame *p= &a->picture;
int i;
- const int scale= avctx->codec_id == CODEC_ID_ASV1 ? 1 : 2;
+ const int scale= avctx->codec_id == AV_CODEC_ID_ASV1 ? 1 : 2;
common_init(avctx);
init_vlcs(a);
@@ -552,7 +552,7 @@ static av_cold int decode_init(AVCodecContext *avctx){
if(avctx->extradata_size < 1 || (a->inv_qscale= avctx->extradata[0]) == 0){
av_log(avctx, AV_LOG_ERROR, "illegal qscale 0\n");
- if(avctx->codec_id == CODEC_ID_ASV1)
+ if(avctx->codec_id == AV_CODEC_ID_ASV1)
a->inv_qscale= 6;
else
a->inv_qscale= 10;
@@ -576,7 +576,7 @@ static av_cold int decode_init(AVCodecContext *avctx){
static av_cold int encode_init(AVCodecContext *avctx){
ASV1Context * const a = avctx->priv_data;
int i;
- const int scale= avctx->codec_id == CODEC_ID_ASV1 ? 1 : 2;
+ const int scale= avctx->codec_id == AV_CODEC_ID_ASV1 ? 1 : 2;
common_init(avctx);
@@ -615,7 +615,7 @@ static av_cold int decode_end(AVCodecContext *avctx){
AVCodec ff_asv1_decoder = {
.name = "asv1",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_ASV1,
+ .id = AV_CODEC_ID_ASV1,
.priv_data_size = sizeof(ASV1Context),
.init = decode_init,
.close = decode_end,
@@ -629,7 +629,7 @@ AVCodec ff_asv1_decoder = {
AVCodec ff_asv2_decoder = {
.name = "asv2",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_ASV2,
+ .id = AV_CODEC_ID_ASV2,
.priv_data_size = sizeof(ASV1Context),
.init = decode_init,
.close = decode_end,
@@ -643,7 +643,7 @@ AVCodec ff_asv2_decoder = {
AVCodec ff_asv1_encoder = {
.name = "asv1",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_ASV1,
+ .id = AV_CODEC_ID_ASV1,
.priv_data_size = sizeof(ASV1Context),
.init = encode_init,
.encode2 = encode_frame,
@@ -656,7 +656,7 @@ AVCodec ff_asv1_encoder = {
AVCodec ff_asv2_encoder = {
.name = "asv2",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_ASV2,
+ .id = AV_CODEC_ID_ASV2,
.priv_data_size = sizeof(ASV1Context),
.init = encode_init,
.encode2 = encode_frame,
diff --git a/libavcodec/atrac1.c b/libavcodec/atrac1.c
index cd14ac02ab..669035d15d 100644
--- a/libavcodec/atrac1.c
+++ b/libavcodec/atrac1.c
@@ -403,7 +403,7 @@ static av_cold int atrac1_decode_init(AVCodecContext *avctx)
AVCodec ff_atrac1_decoder = {
.name = "atrac1",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_ATRAC1,
+ .id = AV_CODEC_ID_ATRAC1,
.priv_data_size = sizeof(AT1Ctx),
.init = atrac1_decode_init,
.close = atrac1_decode_end,
diff --git a/libavcodec/atrac3.c b/libavcodec/atrac3.c
index 7bc344c196..0912043331 100644
--- a/libavcodec/atrac3.c
+++ b/libavcodec/atrac3.c
@@ -1068,7 +1068,7 @@ AVCodec ff_atrac3_decoder =
{
.name = "atrac3",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_ATRAC3,
+ .id = AV_CODEC_ID_ATRAC3,
.priv_data_size = sizeof(ATRAC3Context),
.init = atrac3_decode_init,
.close = atrac3_decode_close,
diff --git a/libavcodec/aura.c b/libavcodec/aura.c
index de9546a1cf..e16232c6e3 100644
--- a/libavcodec/aura.c
+++ b/libavcodec/aura.c
@@ -126,7 +126,7 @@ static av_cold int aura_decode_end(AVCodecContext *avctx)
AVCodec ff_aura2_decoder = {
.name = "aura2",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_AURA2,
+ .id = AV_CODEC_ID_AURA2,
.priv_data_size = sizeof(AuraDecodeContext),
.init = aura_decode_init,
.close = aura_decode_end,
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index cd933fd7cb..d148d699c5 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -77,6 +77,10 @@
* @{
*/
+#if FF_API_CODEC_ID
+#include "old_codec_ids.h"
+#endif
+
/**
* Identify the syntax and semantics of the bitstream.
* The principle is roughly:
@@ -90,371 +94,371 @@
* 2. Give it a value which when taken as ASCII is recognized uniquely by a human as this specific codec.
* This ensures that 2 forks can independently add CodecIDs without producing conflicts.
*/
-enum CodecID {
- CODEC_ID_NONE,
+enum AVCodecID {
+ AV_CODEC_ID_NONE,
/* video codecs */
- CODEC_ID_MPEG1VIDEO,
- CODEC_ID_MPEG2VIDEO, ///< preferred ID for MPEG-1/2 video decoding
- CODEC_ID_MPEG2VIDEO_XVMC,
- CODEC_ID_H261,
- CODEC_ID_H263,
- CODEC_ID_RV10,
- CODEC_ID_RV20,
- CODEC_ID_MJPEG,
- CODEC_ID_MJPEGB,
- CODEC_ID_LJPEG,
- CODEC_ID_SP5X,
- CODEC_ID_JPEGLS,
- CODEC_ID_MPEG4,
- CODEC_ID_RAWVIDEO,
- CODEC_ID_MSMPEG4V1,
- CODEC_ID_MSMPEG4V2,
- CODEC_ID_MSMPEG4V3,
- CODEC_ID_WMV1,
- CODEC_ID_WMV2,
- CODEC_ID_H263P,
- CODEC_ID_H263I,
- CODEC_ID_FLV1,
- CODEC_ID_SVQ1,
- CODEC_ID_SVQ3,
- CODEC_ID_DVVIDEO,
- CODEC_ID_HUFFYUV,
- CODEC_ID_CYUV,
- CODEC_ID_H264,
- CODEC_ID_INDEO3,
- CODEC_ID_VP3,
- CODEC_ID_THEORA,
- CODEC_ID_ASV1,
- CODEC_ID_ASV2,
- CODEC_ID_FFV1,
- CODEC_ID_4XM,
- CODEC_ID_VCR1,
- CODEC_ID_CLJR,
- CODEC_ID_MDEC,
- CODEC_ID_ROQ,
- CODEC_ID_INTERPLAY_VIDEO,
- CODEC_ID_XAN_WC3,
- CODEC_ID_XAN_WC4,
- CODEC_ID_RPZA,
- CODEC_ID_CINEPAK,
- CODEC_ID_WS_VQA,
- CODEC_ID_MSRLE,
- CODEC_ID_MSVIDEO1,
- CODEC_ID_IDCIN,
- CODEC_ID_8BPS,
- CODEC_ID_SMC,
- CODEC_ID_FLIC,
- CODEC_ID_TRUEMOTION1,
- CODEC_ID_VMDVIDEO,
- CODEC_ID_MSZH,
- CODEC_ID_ZLIB,
- CODEC_ID_QTRLE,
- CODEC_ID_SNOW,
- CODEC_ID_TSCC,
- CODEC_ID_ULTI,
- CODEC_ID_QDRAW,
- CODEC_ID_VIXL,
- CODEC_ID_QPEG,
- CODEC_ID_PNG,
- CODEC_ID_PPM,
- CODEC_ID_PBM,
- CODEC_ID_PGM,
- CODEC_ID_PGMYUV,
- CODEC_ID_PAM,
- CODEC_ID_FFVHUFF,
- CODEC_ID_RV30,
- CODEC_ID_RV40,
- CODEC_ID_VC1,
- CODEC_ID_WMV3,
- CODEC_ID_LOCO,
- CODEC_ID_WNV1,
- CODEC_ID_AASC,
- CODEC_ID_INDEO2,
- CODEC_ID_FRAPS,
- CODEC_ID_TRUEMOTION2,
- CODEC_ID_BMP,
- CODEC_ID_CSCD,
- CODEC_ID_MMVIDEO,
- CODEC_ID_ZMBV,
- CODEC_ID_AVS,
- CODEC_ID_SMACKVIDEO,
- CODEC_ID_NUV,
- CODEC_ID_KMVC,
- CODEC_ID_FLASHSV,
- CODEC_ID_CAVS,
- CODEC_ID_JPEG2000,
- CODEC_ID_VMNC,
- CODEC_ID_VP5,
- CODEC_ID_VP6,
- CODEC_ID_VP6F,
- CODEC_ID_TARGA,
- CODEC_ID_DSICINVIDEO,
- CODEC_ID_TIERTEXSEQVIDEO,
- CODEC_ID_TIFF,
- CODEC_ID_GIF,
- CODEC_ID_DXA,
- CODEC_ID_DNXHD,
- CODEC_ID_THP,
- CODEC_ID_SGI,
- CODEC_ID_C93,
- CODEC_ID_BETHSOFTVID,
- CODEC_ID_PTX,
- CODEC_ID_TXD,
- CODEC_ID_VP6A,
- CODEC_ID_AMV,
- CODEC_ID_VB,
- CODEC_ID_PCX,
- CODEC_ID_SUNRAST,
- CODEC_ID_INDEO4,
- CODEC_ID_INDEO5,
- CODEC_ID_MIMIC,
- CODEC_ID_RL2,
- CODEC_ID_ESCAPE124,
- CODEC_ID_DIRAC,
- CODEC_ID_BFI,
- CODEC_ID_CMV,
- CODEC_ID_MOTIONPIXELS,
- CODEC_ID_TGV,
- CODEC_ID_TGQ,
- CODEC_ID_TQI,
- CODEC_ID_AURA,
- CODEC_ID_AURA2,
- CODEC_ID_V210X,
- CODEC_ID_TMV,
- CODEC_ID_V210,
- CODEC_ID_DPX,
- CODEC_ID_MAD,
- CODEC_ID_FRWU,
- CODEC_ID_FLASHSV2,
- CODEC_ID_CDGRAPHICS,
- CODEC_ID_R210,
- CODEC_ID_ANM,
- CODEC_ID_BINKVIDEO,
- CODEC_ID_IFF_ILBM,
- CODEC_ID_IFF_BYTERUN1,
- CODEC_ID_KGV1,
- CODEC_ID_YOP,
- CODEC_ID_VP8,
- CODEC_ID_PICTOR,
- CODEC_ID_ANSI,
- CODEC_ID_A64_MULTI,
- CODEC_ID_A64_MULTI5,
- CODEC_ID_R10K,
- CODEC_ID_MXPEG,
- CODEC_ID_LAGARITH,
- CODEC_ID_PRORES,
- CODEC_ID_JV,
- CODEC_ID_DFA,
- CODEC_ID_WMV3IMAGE,
- CODEC_ID_VC1IMAGE,
- CODEC_ID_UTVIDEO,
- CODEC_ID_BMV_VIDEO,
- CODEC_ID_VBLE,
- CODEC_ID_DXTORY,
- CODEC_ID_V410,
- CODEC_ID_XWD,
- CODEC_ID_CDXL,
- CODEC_ID_XBM,
- CODEC_ID_ZEROCODEC,
- CODEC_ID_MSS1,
- CODEC_ID_MSA1,
- CODEC_ID_TSCC2,
- CODEC_ID_MTS2,
- CODEC_ID_CLLC,
- CODEC_ID_Y41P = MKBETAG('Y','4','1','P'),
- CODEC_ID_ESCAPE130 = MKBETAG('E','1','3','0'),
- CODEC_ID_EXR = MKBETAG('0','E','X','R'),
- CODEC_ID_AVRP = MKBETAG('A','V','R','P'),
-
- CODEC_ID_G2M = MKBETAG( 0 ,'G','2','M'),
- CODEC_ID_AVUI = MKBETAG('A','V','U','I'),
- CODEC_ID_AYUV = MKBETAG('A','Y','U','V'),
- CODEC_ID_V308 = MKBETAG('V','3','0','8'),
- CODEC_ID_V408 = MKBETAG('V','4','0','8'),
- CODEC_ID_YUV4 = MKBETAG('Y','U','V','4'),
- CODEC_ID_SANM = MKBETAG('S','A','N','M'),
- CODEC_ID_PAF_VIDEO = MKBETAG('P','A','F','V'),
+ AV_CODEC_ID_MPEG1VIDEO,
+ AV_CODEC_ID_MPEG2VIDEO, ///< preferred ID for MPEG-1/2 video decoding
+ AV_CODEC_ID_MPEG2VIDEO_XVMC,
+ AV_CODEC_ID_H261,
+ AV_CODEC_ID_H263,
+ AV_CODEC_ID_RV10,
+ AV_CODEC_ID_RV20,
+ AV_CODEC_ID_MJPEG,
+ AV_CODEC_ID_MJPEGB,
+ AV_CODEC_ID_LJPEG,
+ AV_CODEC_ID_SP5X,
+ AV_CODEC_ID_JPEGLS,
+ AV_CODEC_ID_MPEG4,
+ AV_CODEC_ID_RAWVIDEO,
+ AV_CODEC_ID_MSMPEG4V1,
+ AV_CODEC_ID_MSMPEG4V2,
+ AV_CODEC_ID_MSMPEG4V3,
+ AV_CODEC_ID_WMV1,
+ AV_CODEC_ID_WMV2,
+ AV_CODEC_ID_H263P,
+ AV_CODEC_ID_H263I,
+ AV_CODEC_ID_FLV1,
+ AV_CODEC_ID_SVQ1,
+ AV_CODEC_ID_SVQ3,
+ AV_CODEC_ID_DVVIDEO,
+ AV_CODEC_ID_HUFFYUV,
+ AV_CODEC_ID_CYUV,
+ AV_CODEC_ID_H264,
+ AV_CODEC_ID_INDEO3,
+ AV_CODEC_ID_VP3,
+ AV_CODEC_ID_THEORA,
+ AV_CODEC_ID_ASV1,
+ AV_CODEC_ID_ASV2,
+ AV_CODEC_ID_FFV1,
+ AV_CODEC_ID_4XM,
+ AV_CODEC_ID_VCR1,
+ AV_CODEC_ID_CLJR,
+ AV_CODEC_ID_MDEC,
+ AV_CODEC_ID_ROQ,
+ AV_CODEC_ID_INTERPLAY_VIDEO,
+ AV_CODEC_ID_XAN_WC3,
+ AV_CODEC_ID_XAN_WC4,
+ AV_CODEC_ID_RPZA,
+ AV_CODEC_ID_CINEPAK,
+ AV_CODEC_ID_WS_VQA,
+ AV_CODEC_ID_MSRLE,
+ AV_CODEC_ID_MSVIDEO1,
+ AV_CODEC_ID_IDCIN,
+ AV_CODEC_ID_8BPS,
+ AV_CODEC_ID_SMC,
+ AV_CODEC_ID_FLIC,
+ AV_CODEC_ID_TRUEMOTION1,
+ AV_CODEC_ID_VMDVIDEO,
+ AV_CODEC_ID_MSZH,
+ AV_CODEC_ID_ZLIB,
+ AV_CODEC_ID_QTRLE,
+ AV_CODEC_ID_SNOW,
+ AV_CODEC_ID_TSCC,
+ AV_CODEC_ID_ULTI,
+ AV_CODEC_ID_QDRAW,
+ AV_CODEC_ID_VIXL,
+ AV_CODEC_ID_QPEG,
+ AV_CODEC_ID_PNG,
+ AV_CODEC_ID_PPM,
+ AV_CODEC_ID_PBM,
+ AV_CODEC_ID_PGM,
+ AV_CODEC_ID_PGMYUV,
+ AV_CODEC_ID_PAM,
+ AV_CODEC_ID_FFVHUFF,
+ AV_CODEC_ID_RV30,
+ AV_CODEC_ID_RV40,
+ AV_CODEC_ID_VC1,
+ AV_CODEC_ID_WMV3,
+ AV_CODEC_ID_LOCO,
+ AV_CODEC_ID_WNV1,
+ AV_CODEC_ID_AASC,
+ AV_CODEC_ID_INDEO2,
+ AV_CODEC_ID_FRAPS,
+ AV_CODEC_ID_TRUEMOTION2,
+ AV_CODEC_ID_BMP,
+ AV_CODEC_ID_CSCD,
+ AV_CODEC_ID_MMVIDEO,
+ AV_CODEC_ID_ZMBV,
+ AV_CODEC_ID_AVS,
+ AV_CODEC_ID_SMACKVIDEO,
+ AV_CODEC_ID_NUV,
+ AV_CODEC_ID_KMVC,
+ AV_CODEC_ID_FLASHSV,
+ AV_CODEC_ID_CAVS,
+ AV_CODEC_ID_JPEG2000,
+ AV_CODEC_ID_VMNC,
+ AV_CODEC_ID_VP5,
+ AV_CODEC_ID_VP6,
+ AV_CODEC_ID_VP6F,
+ AV_CODEC_ID_TARGA,
+ AV_CODEC_ID_DSICINVIDEO,
+ AV_CODEC_ID_TIERTEXSEQVIDEO,
+ AV_CODEC_ID_TIFF,
+ AV_CODEC_ID_GIF,
+ AV_CODEC_ID_DXA,
+ AV_CODEC_ID_DNXHD,
+ AV_CODEC_ID_THP,
+ AV_CODEC_ID_SGI,
+ AV_CODEC_ID_C93,
+ AV_CODEC_ID_BETHSOFTVID,
+ AV_CODEC_ID_PTX,
+ AV_CODEC_ID_TXD,
+ AV_CODEC_ID_VP6A,
+ AV_CODEC_ID_AMV,
+ AV_CODEC_ID_VB,
+ AV_CODEC_ID_PCX,
+ AV_CODEC_ID_SUNRAST,
+ AV_CODEC_ID_INDEO4,
+ AV_CODEC_ID_INDEO5,
+ AV_CODEC_ID_MIMIC,
+ AV_CODEC_ID_RL2,
+ AV_CODEC_ID_ESCAPE124,
+ AV_CODEC_ID_DIRAC,
+ AV_CODEC_ID_BFI,
+ AV_CODEC_ID_CMV,
+ AV_CODEC_ID_MOTIONPIXELS,
+ AV_CODEC_ID_TGV,
+ AV_CODEC_ID_TGQ,
+ AV_CODEC_ID_TQI,
+ AV_CODEC_ID_AURA,
+ AV_CODEC_ID_AURA2,
+ AV_CODEC_ID_V210X,
+ AV_CODEC_ID_TMV,
+ AV_CODEC_ID_V210,
+ AV_CODEC_ID_DPX,
+ AV_CODEC_ID_MAD,
+ AV_CODEC_ID_FRWU,
+ AV_CODEC_ID_FLASHSV2,
+ AV_CODEC_ID_CDGRAPHICS,
+ AV_CODEC_ID_R210,
+ AV_CODEC_ID_ANM,
+ AV_CODEC_ID_BINKVIDEO,
+ AV_CODEC_ID_IFF_ILBM,
+ AV_CODEC_ID_IFF_BYTERUN1,
+ AV_CODEC_ID_KGV1,
+ AV_CODEC_ID_YOP,
+ AV_CODEC_ID_VP8,
+ AV_CODEC_ID_PICTOR,
+ AV_CODEC_ID_ANSI,
+ AV_CODEC_ID_A64_MULTI,
+ AV_CODEC_ID_A64_MULTI5,
+ AV_CODEC_ID_R10K,
+ AV_CODEC_ID_MXPEG,
+ AV_CODEC_ID_LAGARITH,
+ AV_CODEC_ID_PRORES,
+ AV_CODEC_ID_JV,
+ AV_CODEC_ID_DFA,
+ AV_CODEC_ID_WMV3IMAGE,
+ AV_CODEC_ID_VC1IMAGE,
+ AV_CODEC_ID_UTVIDEO,
+ AV_CODEC_ID_BMV_VIDEO,
+ AV_CODEC_ID_VBLE,
+ AV_CODEC_ID_DXTORY,
+ AV_CODEC_ID_V410,
+ AV_CODEC_ID_XWD,
+ AV_CODEC_ID_CDXL,
+ AV_CODEC_ID_XBM,
+ AV_CODEC_ID_ZEROCODEC,
+ AV_CODEC_ID_MSS1,
+ AV_CODEC_ID_MSA1,
+ AV_CODEC_ID_TSCC2,
+ AV_CODEC_ID_MTS2,
+ AV_CODEC_ID_CLLC,
+ AV_CODEC_ID_Y41P = MKBETAG('Y','4','1','P'),
+ AV_CODEC_ID_ESCAPE130 = MKBETAG('E','1','3','0'),
+ AV_CODEC_ID_EXR = MKBETAG('0','E','X','R'),
+ AV_CODEC_ID_AVRP = MKBETAG('A','V','R','P'),
+
+ AV_CODEC_ID_G2M = MKBETAG( 0 ,'G','2','M'),
+ AV_CODEC_ID_AVUI = MKBETAG('A','V','U','I'),
+ AV_CODEC_ID_AYUV = MKBETAG('A','Y','U','V'),
+ AV_CODEC_ID_V308 = MKBETAG('V','3','0','8'),
+ AV_CODEC_ID_V408 = MKBETAG('V','4','0','8'),
+ AV_CODEC_ID_YUV4 = MKBETAG('Y','U','V','4'),
+ AV_CODEC_ID_SANM = MKBETAG('S','A','N','M'),
+ AV_CODEC_ID_PAF_VIDEO = MKBETAG('P','A','F','V'),
/* various PCM "codecs" */
- CODEC_ID_FIRST_AUDIO = 0x10000, ///< A dummy id pointing at the start of audio codecs
- CODEC_ID_PCM_S16LE = 0x10000,
- CODEC_ID_PCM_S16BE,
- CODEC_ID_PCM_U16LE,
- CODEC_ID_PCM_U16BE,
- CODEC_ID_PCM_S8,
- CODEC_ID_PCM_U8,
- CODEC_ID_PCM_MULAW,
- CODEC_ID_PCM_ALAW,
- CODEC_ID_PCM_S32LE,
- CODEC_ID_PCM_S32BE,
- CODEC_ID_PCM_U32LE,
- CODEC_ID_PCM_U32BE,
- CODEC_ID_PCM_S24LE,
- CODEC_ID_PCM_S24BE,
- CODEC_ID_PCM_U24LE,
- CODEC_ID_PCM_U24BE,
- CODEC_ID_PCM_S24DAUD,
- CODEC_ID_PCM_ZORK,
- CODEC_ID_PCM_S16LE_PLANAR,
- CODEC_ID_PCM_DVD,
- CODEC_ID_PCM_F32BE,
- CODEC_ID_PCM_F32LE,
- CODEC_ID_PCM_F64BE,
- CODEC_ID_PCM_F64LE,
- CODEC_ID_PCM_BLURAY,
- CODEC_ID_PCM_LXF,
- CODEC_ID_S302M,
- CODEC_ID_PCM_S8_PLANAR,
+ AV_CODEC_ID_FIRST_AUDIO = 0x10000, ///< A dummy id pointing at the start of audio codecs
+ AV_CODEC_ID_PCM_S16LE = 0x10000,
+ AV_CODEC_ID_PCM_S16BE,
+ AV_CODEC_ID_PCM_U16LE,
+ AV_CODEC_ID_PCM_U16BE,
+ AV_CODEC_ID_PCM_S8,
+ AV_CODEC_ID_PCM_U8,
+ AV_CODEC_ID_PCM_MULAW,
+ AV_CODEC_ID_PCM_ALAW,
+ AV_CODEC_ID_PCM_S32LE,
+ AV_CODEC_ID_PCM_S32BE,
+ AV_CODEC_ID_PCM_U32LE,
+ AV_CODEC_ID_PCM_U32BE,
+ AV_CODEC_ID_PCM_S24LE,
+ AV_CODEC_ID_PCM_S24BE,
+ AV_CODEC_ID_PCM_U24LE,
+ AV_CODEC_ID_PCM_U24BE,
+ AV_CODEC_ID_PCM_S24DAUD,
+ AV_CODEC_ID_PCM_ZORK,
+ AV_CODEC_ID_PCM_S16LE_PLANAR,
+ AV_CODEC_ID_PCM_DVD,
+ AV_CODEC_ID_PCM_F32BE,
+ AV_CODEC_ID_PCM_F32LE,
+ AV_CODEC_ID_PCM_F64BE,
+ AV_CODEC_ID_PCM_F64LE,
+ AV_CODEC_ID_PCM_BLURAY,
+ AV_CODEC_ID_PCM_LXF,
+ AV_CODEC_ID_S302M,
+ AV_CODEC_ID_PCM_S8_PLANAR,
/* various ADPCM codecs */
- CODEC_ID_ADPCM_IMA_QT = 0x11000,
- CODEC_ID_ADPCM_IMA_WAV,
- CODEC_ID_ADPCM_IMA_DK3,
- CODEC_ID_ADPCM_IMA_DK4,
- CODEC_ID_ADPCM_IMA_WS,
- CODEC_ID_ADPCM_IMA_SMJPEG,
- CODEC_ID_ADPCM_MS,
- CODEC_ID_ADPCM_4XM,
- CODEC_ID_ADPCM_XA,
- CODEC_ID_ADPCM_ADX,
- CODEC_ID_ADPCM_EA,
- CODEC_ID_ADPCM_G726,
- CODEC_ID_ADPCM_CT,
- CODEC_ID_ADPCM_SWF,
- CODEC_ID_ADPCM_YAMAHA,
- CODEC_ID_ADPCM_SBPRO_4,
- CODEC_ID_ADPCM_SBPRO_3,
- CODEC_ID_ADPCM_SBPRO_2,
- CODEC_ID_ADPCM_THP,
- CODEC_ID_ADPCM_IMA_AMV,
- CODEC_ID_ADPCM_EA_R1,
- CODEC_ID_ADPCM_EA_R3,
- CODEC_ID_ADPCM_EA_R2,
- CODEC_ID_ADPCM_IMA_EA_SEAD,
- CODEC_ID_ADPCM_IMA_EA_EACS,
- CODEC_ID_ADPCM_EA_XAS,
- CODEC_ID_ADPCM_EA_MAXIS_XA,
- CODEC_ID_ADPCM_IMA_ISS,
- CODEC_ID_ADPCM_G722,
- CODEC_ID_ADPCM_IMA_APC,
- CODEC_ID_VIMA = MKBETAG('V','I','M','A'),
+ AV_CODEC_ID_ADPCM_IMA_QT = 0x11000,
+ AV_CODEC_ID_ADPCM_IMA_WAV,
+ AV_CODEC_ID_ADPCM_IMA_DK3,
+ AV_CODEC_ID_ADPCM_IMA_DK4,
+ AV_CODEC_ID_ADPCM_IMA_WS,
+ AV_CODEC_ID_ADPCM_IMA_SMJPEG,
+ AV_CODEC_ID_ADPCM_MS,
+ AV_CODEC_ID_ADPCM_4XM,
+ AV_CODEC_ID_ADPCM_XA,
+ AV_CODEC_ID_ADPCM_ADX,
+ AV_CODEC_ID_ADPCM_EA,
+ AV_CODEC_ID_ADPCM_G726,
+ AV_CODEC_ID_ADPCM_CT,
+ AV_CODEC_ID_ADPCM_SWF,
+ AV_CODEC_ID_ADPCM_YAMAHA,
+ AV_CODEC_ID_ADPCM_SBPRO_4,
+ AV_CODEC_ID_ADPCM_SBPRO_3,
+ AV_CODEC_ID_ADPCM_SBPRO_2,
+ AV_CODEC_ID_ADPCM_THP,
+ AV_CODEC_ID_ADPCM_IMA_AMV,
+ AV_CODEC_ID_ADPCM_EA_R1,
+ AV_CODEC_ID_ADPCM_EA_R3,
+ AV_CODEC_ID_ADPCM_EA_R2,
+ AV_CODEC_ID_ADPCM_IMA_EA_SEAD,
+ AV_CODEC_ID_ADPCM_IMA_EA_EACS,
+ AV_CODEC_ID_ADPCM_EA_XAS,
+ AV_CODEC_ID_ADPCM_EA_MAXIS_XA,
+ AV_CODEC_ID_ADPCM_IMA_ISS,
+ AV_CODEC_ID_ADPCM_G722,
+ AV_CODEC_ID_ADPCM_IMA_APC,
+ AV_CODEC_ID_VIMA = MKBETAG('V','I','M','A'),
/* AMR */
- CODEC_ID_AMR_NB = 0x12000,
- CODEC_ID_AMR_WB,
+ AV_CODEC_ID_AMR_NB = 0x12000,
+ AV_CODEC_ID_AMR_WB,
/* RealAudio codecs*/
- CODEC_ID_RA_144 = 0x13000,
- CODEC_ID_RA_288,
+ AV_CODEC_ID_RA_144 = 0x13000,
+ AV_CODEC_ID_RA_288,
/* various DPCM codecs */
- CODEC_ID_ROQ_DPCM = 0x14000,
- CODEC_ID_INTERPLAY_DPCM,
- CODEC_ID_XAN_DPCM,
- CODEC_ID_SOL_DPCM,
+ AV_CODEC_ID_ROQ_DPCM = 0x14000,
+ AV_CODEC_ID_INTERPLAY_DPCM,
+ AV_CODEC_ID_XAN_DPCM,
+ AV_CODEC_ID_SOL_DPCM,
/* audio codecs */
- CODEC_ID_MP2 = 0x15000,
- CODEC_ID_MP3, ///< preferred ID for decoding MPEG audio layer 1, 2 or 3
- CODEC_ID_AAC,
- CODEC_ID_AC3,
- CODEC_ID_DTS,
- CODEC_ID_VORBIS,
- CODEC_ID_DVAUDIO,
- CODEC_ID_WMAV1,
- CODEC_ID_WMAV2,
- CODEC_ID_MACE3,
- CODEC_ID_MACE6,
- CODEC_ID_VMDAUDIO,
- CODEC_ID_FLAC,
- CODEC_ID_MP3ADU,
- CODEC_ID_MP3ON4,
- CODEC_ID_SHORTEN,
- CODEC_ID_ALAC,
- CODEC_ID_WESTWOOD_SND1,
- CODEC_ID_GSM, ///< as in Berlin toast format
- CODEC_ID_QDM2,
- CODEC_ID_COOK,
- CODEC_ID_TRUESPEECH,
- CODEC_ID_TTA,
- CODEC_ID_SMACKAUDIO,
- CODEC_ID_QCELP,
- CODEC_ID_WAVPACK,
- CODEC_ID_DSICINAUDIO,
- CODEC_ID_IMC,
- CODEC_ID_MUSEPACK7,
- CODEC_ID_MLP,
- CODEC_ID_GSM_MS, /* as found in WAV */
- CODEC_ID_ATRAC3,
- CODEC_ID_VOXWARE,
- CODEC_ID_APE,
- CODEC_ID_NELLYMOSER,
- CODEC_ID_MUSEPACK8,
- CODEC_ID_SPEEX,
- CODEC_ID_WMAVOICE,
- CODEC_ID_WMAPRO,
- CODEC_ID_WMALOSSLESS,
- CODEC_ID_ATRAC3P,
- CODEC_ID_EAC3,
- CODEC_ID_SIPR,
- CODEC_ID_MP1,
- CODEC_ID_TWINVQ,
- CODEC_ID_TRUEHD,
- CODEC_ID_MP4ALS,
- CODEC_ID_ATRAC1,
- CODEC_ID_BINKAUDIO_RDFT,
- CODEC_ID_BINKAUDIO_DCT,
- CODEC_ID_AAC_LATM,
- CODEC_ID_QDMC,
- CODEC_ID_CELT,
- CODEC_ID_G723_1,
- CODEC_ID_G729,
- CODEC_ID_8SVX_EXP,
- CODEC_ID_8SVX_FIB,
- CODEC_ID_BMV_AUDIO,
- CODEC_ID_RALF,
- CODEC_ID_IAC,
- CODEC_ID_ILBC,
- CODEC_ID_FFWAVESYNTH = MKBETAG('F','F','W','S'),
- CODEC_ID_8SVX_RAW = MKBETAG('8','S','V','X'),
- CODEC_ID_SONIC = MKBETAG('S','O','N','C'),
- CODEC_ID_SONIC_LS = MKBETAG('S','O','N','L'),
- CODEC_ID_PAF_AUDIO = MKBETAG('P','A','F','A'),
- CODEC_ID_OPUS = MKBETAG('O','P','U','S'),
+ AV_CODEC_ID_MP2 = 0x15000,
+ AV_CODEC_ID_MP3, ///< preferred ID for decoding MPEG audio layer 1, 2 or 3
+ AV_CODEC_ID_AAC,
+ AV_CODEC_ID_AC3,
+ AV_CODEC_ID_DTS,
+ AV_CODEC_ID_VORBIS,
+ AV_CODEC_ID_DVAUDIO,
+ AV_CODEC_ID_WMAV1,
+ AV_CODEC_ID_WMAV2,
+ AV_CODEC_ID_MACE3,
+ AV_CODEC_ID_MACE6,
+ AV_CODEC_ID_VMDAUDIO,
+ AV_CODEC_ID_FLAC,
+ AV_CODEC_ID_MP3ADU,
+ AV_CODEC_ID_MP3ON4,
+ AV_CODEC_ID_SHORTEN,
+ AV_CODEC_ID_ALAC,
+ AV_CODEC_ID_WESTWOOD_SND1,
+ AV_CODEC_ID_GSM, ///< as in Berlin toast format
+ AV_CODEC_ID_QDM2,
+ AV_CODEC_ID_COOK,
+ AV_CODEC_ID_TRUESPEECH,
+ AV_CODEC_ID_TTA,
+ AV_CODEC_ID_SMACKAUDIO,
+ AV_CODEC_ID_QCELP,
+ AV_CODEC_ID_WAVPACK,
+ AV_CODEC_ID_DSICINAUDIO,
+ AV_CODEC_ID_IMC,
+ AV_CODEC_ID_MUSEPACK7,
+ AV_CODEC_ID_MLP,
+ AV_CODEC_ID_GSM_MS, /* as found in WAV */
+ AV_CODEC_ID_ATRAC3,
+ AV_CODEC_ID_VOXWARE,
+ AV_CODEC_ID_APE,
+ AV_CODEC_ID_NELLYMOSER,
+ AV_CODEC_ID_MUSEPACK8,
+ AV_CODEC_ID_SPEEX,
+ AV_CODEC_ID_WMAVOICE,
+ AV_CODEC_ID_WMAPRO,
+ AV_CODEC_ID_WMALOSSLESS,
+ AV_CODEC_ID_ATRAC3P,
+ AV_CODEC_ID_EAC3,
+ AV_CODEC_ID_SIPR,
+ AV_CODEC_ID_MP1,
+ AV_CODEC_ID_TWINVQ,
+ AV_CODEC_ID_TRUEHD,
+ AV_CODEC_ID_MP4ALS,
+ AV_CODEC_ID_ATRAC1,
+ AV_CODEC_ID_BINKAUDIO_RDFT,
+ AV_CODEC_ID_BINKAUDIO_DCT,
+ AV_CODEC_ID_AAC_LATM,
+ AV_CODEC_ID_QDMC,
+ AV_CODEC_ID_CELT,
+ AV_CODEC_ID_G723_1,
+ AV_CODEC_ID_G729,
+ AV_CODEC_ID_8SVX_EXP,
+ AV_CODEC_ID_8SVX_FIB,
+ AV_CODEC_ID_BMV_AUDIO,
+ AV_CODEC_ID_RALF,
+ AV_CODEC_ID_IAC,
+ AV_CODEC_ID_ILBC,
+ AV_CODEC_ID_FFWAVESYNTH = MKBETAG('F','F','W','S'),
+ AV_CODEC_ID_8SVX_RAW = MKBETAG('8','S','V','X'),
+ AV_CODEC_ID_SONIC = MKBETAG('S','O','N','C'),
+ AV_CODEC_ID_SONIC_LS = MKBETAG('S','O','N','L'),
+ AV_CODEC_ID_PAF_AUDIO = MKBETAG('P','A','F','A'),
+ AV_CODEC_ID_OPUS = MKBETAG('O','P','U','S'),
/* subtitle codecs */
- CODEC_ID_FIRST_SUBTITLE = 0x17000, ///< A dummy ID pointing at the start of subtitle codecs.
- CODEC_ID_DVD_SUBTITLE = 0x17000,
- CODEC_ID_DVB_SUBTITLE,
- CODEC_ID_TEXT, ///< raw UTF-8 text
- CODEC_ID_XSUB,
- CODEC_ID_SSA,
- CODEC_ID_MOV_TEXT,
- CODEC_ID_HDMV_PGS_SUBTITLE,
- CODEC_ID_DVB_TELETEXT,
- CODEC_ID_SRT,
- CODEC_ID_MICRODVD = MKBETAG('m','D','V','D'),
- CODEC_ID_EIA_608 = MKBETAG('c','6','0','8'),
- CODEC_ID_JACOSUB = MKBETAG('J','S','U','B'),
- CODEC_ID_SAMI = MKBETAG('S','A','M','I'),
- CODEC_ID_REALTEXT = MKBETAG('R','T','X','T'),
- CODEC_ID_SUBVIEWER = MKBETAG('S','u','b','V'),
+ AV_CODEC_ID_FIRST_SUBTITLE = 0x17000, ///< A dummy ID pointing at the start of subtitle codecs.
+ AV_CODEC_ID_DVD_SUBTITLE = 0x17000,
+ AV_CODEC_ID_DVB_SUBTITLE,
+ AV_CODEC_ID_TEXT, ///< raw UTF-8 text
+ AV_CODEC_ID_XSUB,
+ AV_CODEC_ID_SSA,
+ AV_CODEC_ID_MOV_TEXT,
+ AV_CODEC_ID_HDMV_PGS_SUBTITLE,
+ AV_CODEC_ID_DVB_TELETEXT,
+ AV_CODEC_ID_SRT,
+ AV_CODEC_ID_MICRODVD = MKBETAG('m','D','V','D'),
+ AV_CODEC_ID_EIA_608 = MKBETAG('c','6','0','8'),
+ AV_CODEC_ID_JACOSUB = MKBETAG('J','S','U','B'),
+ AV_CODEC_ID_SAMI = MKBETAG('S','A','M','I'),
+ AV_CODEC_ID_REALTEXT = MKBETAG('R','T','X','T'),
+ AV_CODEC_ID_SUBVIEWER = MKBETAG('S','u','b','V'),
/* other specific kind of codecs (generally used for attachments) */
- CODEC_ID_FIRST_UNKNOWN = 0x18000, ///< A dummy ID pointing at the start of various fake codecs.
- CODEC_ID_TTF = 0x18000,
- CODEC_ID_BINTEXT = MKBETAG('B','T','X','T'),
- CODEC_ID_XBIN = MKBETAG('X','B','I','N'),
- CODEC_ID_IDF = MKBETAG( 0 ,'I','D','F'),
+ AV_CODEC_ID_FIRST_UNKNOWN = 0x18000, ///< A dummy ID pointing at the start of various fake codecs.
+ AV_CODEC_ID_TTF = 0x18000,
+ AV_CODEC_ID_BINTEXT = MKBETAG('B','T','X','T'),
+ AV_CODEC_ID_XBIN = MKBETAG('X','B','I','N'),
+ AV_CODEC_ID_IDF = MKBETAG( 0 ,'I','D','F'),
- CODEC_ID_PROBE = 0x19000, ///< codec_id is not known (like CODEC_ID_NONE) but lavf should attempt to identify it
+ AV_CODEC_ID_PROBE = 0x19000, ///< codec_id is not known (like AV_CODEC_ID_NONE) but lavf should attempt to identify it
- CODEC_ID_MPEG2TS = 0x20000, /**< _FAKE_ codec to indicate a raw MPEG-2 TS
+ AV_CODEC_ID_MPEG2TS = 0x20000, /**< _FAKE_ codec to indicate a raw MPEG-2 TS
* stream (only used by libavformat) */
- CODEC_ID_MPEG4SYSTEMS = 0x20001, /**< _FAKE_ codec to indicate a MPEG-4 Systems
+ AV_CODEC_ID_MPEG4SYSTEMS = 0x20001, /**< _FAKE_ codec to indicate a MPEG-4 Systems
* stream (only used by libavformat) */
- CODEC_ID_FFMETADATA = 0x21000, ///< Dummy codec for streams containing only metadata information.
+ AV_CODEC_ID_FFMETADATA = 0x21000, ///< Dummy codec for streams containing only metadata information.
};
#if FF_API_OLD_DECODE_AUDIO
@@ -1402,7 +1406,7 @@ typedef struct AVCodecContext {
enum AVMediaType codec_type; /* see AVMEDIA_TYPE_xxx */
struct AVCodec *codec;
char codec_name[32];
- enum CodecID codec_id; /* see CODEC_ID_xxx */
+ enum AVCodecID codec_id; /* see AV_CODEC_ID_xxx */
/**
* fourcc (LSB first, so "ABCD" -> ('D'<<24) + ('C'<<16) + ('B'<<8) + 'A').
@@ -3037,7 +3041,7 @@ typedef struct AVCodec {
*/
const char *long_name;
enum AVMediaType type;
- enum CodecID id;
+ enum AVCodecID id;
/**
* Codec capabilities.
* see CODEC_CAP_*
@@ -3135,9 +3139,9 @@ typedef struct AVHWAccel {
/**
* Codec implemented by the hardware accelerator.
*
- * See CODEC_ID_xxx
+ * See AV_CODEC_ID_xxx
*/
- enum CodecID id;
+ enum AVCodecID id;
/**
* Supported pixel format.
@@ -3453,7 +3457,7 @@ void avcodec_get_frame_defaults(AVFrame *pic);
*
* @code
* avcodec_register_all();
- * codec = avcodec_find_decoder(CODEC_ID_H264);
+ * codec = avcodec_find_decoder(AV_CODEC_ID_H264);
* if (!codec)
* exit(1);
*
@@ -3487,7 +3491,7 @@ int avcodec_open(AVCodecContext *avctx, AVCodec *codec);
* @code
* avcodec_register_all();
* av_dict_set(&opts, "b", "2.5M", 0);
- * codec = avcodec_find_decoder(CODEC_ID_H264);
+ * codec = avcodec_find_decoder(AV_CODEC_ID_H264);
* if (!codec)
* exit(1);
*
@@ -3648,10 +3652,10 @@ int av_packet_split_side_data(AVPacket *pkt);
/**
* Find a registered decoder with a matching codec ID.
*
- * @param id CodecID of the requested decoder
+ * @param id AVCodecID of the requested decoder
* @return A decoder if one was found, NULL otherwise.
*/
-AVCodec *avcodec_find_decoder(enum CodecID id);
+AVCodec *avcodec_find_decoder(enum AVCodecID id);
/**
* Find a registered decoder with the specified name.
@@ -4071,10 +4075,10 @@ void av_parser_close(AVCodecParserContext *s);
/**
* Find a registered encoder with a matching codec ID.
*
- * @param id CodecID of the requested encoder
+ * @param id AVCodecID of the requested encoder
* @return An encoder if one was found, NULL otherwise.
*/
-AVCodec *avcodec_find_encoder(enum CodecID id);
+AVCodec *avcodec_find_encoder(enum AVCodecID id);
/**
* Find a registered encoder with the specified name.
@@ -4593,15 +4597,15 @@ void avcodec_default_free_buffers(AVCodecContext *s);
* @param[in] codec_id the codec
* @return Number of bits per sample or zero if unknown for the given codec.
*/
-int av_get_bits_per_sample(enum CodecID codec_id);
+int av_get_bits_per_sample(enum AVCodecID codec_id);
/**
* Return the PCM codec associated with a sample format.
* @param be endianness, 0 for little, 1 for big,
* -1 (or anything else) for native
- * @return CODEC_ID_PCM_* or CODEC_ID_NONE
+ * @return AV_CODEC_ID_PCM_* or AV_CODEC_ID_NONE
*/
-enum CodecID av_get_pcm_codec(enum AVSampleFormat fmt, int be);
+enum AVCodecID av_get_pcm_codec(enum AVSampleFormat fmt, int be);
/**
* Return codec bits per sample.
@@ -4611,7 +4615,7 @@ enum CodecID av_get_pcm_codec(enum AVSampleFormat fmt, int be);
* @param[in] codec_id the codec
* @return Number of bits per sample or zero if unknown for the given codec.
*/
-int av_get_exact_bits_per_sample(enum CodecID codec_id);
+int av_get_exact_bits_per_sample(enum AVCodecID codec_id);
/**
* Return audio frame duration.
@@ -4765,13 +4769,13 @@ int av_lockmgr_register(int (*cb)(void **mutex, enum AVLockOp op));
/**
* Get the type of the given codec.
*/
-enum AVMediaType avcodec_get_type(enum CodecID codec_id);
+enum AVMediaType avcodec_get_type(enum AVCodecID codec_id);
/**
* Get the name of a codec.
* @return a static string identifying the codec; never NULL
*/
-const char *avcodec_get_name(enum CodecID id);
+const char *avcodec_get_name(enum AVCodecID id);
/**
* @return a positive value if s is open (i.e. avcodec_open2() was called on it
diff --git a/libavcodec/avs.c b/libavcodec/avs.c
index 801e1bcd78..76e8a9aae7 100644
--- a/libavcodec/avs.c
+++ b/libavcodec/avs.c
@@ -178,7 +178,7 @@ static av_cold int avs_decode_end(AVCodecContext *avctx)
AVCodec ff_avs_decoder = {
.name = "avs",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_AVS,
+ .id = AV_CODEC_ID_AVS,
.priv_data_size = sizeof(AvsContext),
.init = avs_decode_init,
.decode = avs_decode_frame,
diff --git a/libavcodec/avuidec.c b/libavcodec/avuidec.c
index 41f6d9f497..ba07a58f28 100644
--- a/libavcodec/avuidec.c
+++ b/libavcodec/avuidec.c
@@ -146,7 +146,7 @@ static av_cold int avui_decode_close(AVCodecContext *avctx)
AVCodec ff_avui_decoder = {
.name = "avui",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_AVUI,
+ .id = AV_CODEC_ID_AVUI,
.init = avui_decode_init,
.decode = avui_decode_frame,
.close = avui_decode_close,
diff --git a/libavcodec/avuienc.c b/libavcodec/avuienc.c
index 30f94b2dea..686e52cfbf 100644
--- a/libavcodec/avuienc.c
+++ b/libavcodec/avuienc.c
@@ -103,7 +103,7 @@ static av_cold int avui_encode_close(AVCodecContext *avctx)
AVCodec ff_avui_encoder = {
.name = "avui",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_AVUI,
+ .id = AV_CODEC_ID_AVUI,
.init = avui_encode_init,
.encode2 = avui_encode_frame,
.close = avui_encode_close,
diff --git a/libavcodec/bethsoftvideo.c b/libavcodec/bethsoftvideo.c
index 21e7a93648..39a0047e3f 100644
--- a/libavcodec/bethsoftvideo.c
+++ b/libavcodec/bethsoftvideo.c
@@ -155,7 +155,7 @@ static av_cold int bethsoftvid_decode_end(AVCodecContext *avctx)
AVCodec ff_bethsoftvid_decoder = {
.name = "bethsoftvid",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_BETHSOFTVID,
+ .id = AV_CODEC_ID_BETHSOFTVID,
.priv_data_size = sizeof(BethsoftvidContext),
.init = bethsoftvid_decode_init,
.close = bethsoftvid_decode_end,
diff --git a/libavcodec/bfi.c b/libavcodec/bfi.c
index a47269aae2..fc5523eab1 100644
--- a/libavcodec/bfi.c
+++ b/libavcodec/bfi.c
@@ -185,7 +185,7 @@ static av_cold int bfi_decode_close(AVCodecContext *avctx)
AVCodec ff_bfi_decoder = {
.name = "bfi",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_BFI,
+ .id = AV_CODEC_ID_BFI,
.priv_data_size = sizeof(BFIContext),
.init = bfi_decode_init,
.close = bfi_decode_close,
diff --git a/libavcodec/bink.c b/libavcodec/bink.c
index 4ad2e6fd76..9990700797 100644
--- a/libavcodec/bink.c
+++ b/libavcodec/bink.c
@@ -1335,7 +1335,7 @@ static av_cold int decode_end(AVCodecContext *avctx)
AVCodec ff_bink_decoder = {
.name = "binkvideo",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_BINKVIDEO,
+ .id = AV_CODEC_ID_BINKVIDEO,
.priv_data_size = sizeof(BinkContext),
.init = decode_init,
.close = decode_end,
diff --git a/libavcodec/binkaudio.c b/libavcodec/binkaudio.c
index 591c6ab598..662c6f29d6 100644
--- a/libavcodec/binkaudio.c
+++ b/libavcodec/binkaudio.c
@@ -98,7 +98,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
s->version_b = avctx->extradata_size >= 4 && avctx->extradata[3] == 'b';
- if (avctx->codec->id == CODEC_ID_BINKAUDIO_RDFT) {
+ if (avctx->codec->id == AV_CODEC_ID_BINKAUDIO_RDFT) {
// audio is already interleaved for the RDFT format variant
sample_rate *= avctx->channels;
s->channels = 1;
@@ -141,7 +141,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
s->prev_ptr[i] = s->coeffs_ptr[i] + s->frame_len - s->overlap_len;
}
- if (CONFIG_BINKAUDIO_RDFT_DECODER && avctx->codec->id == CODEC_ID_BINKAUDIO_RDFT)
+ if (CONFIG_BINKAUDIO_RDFT_DECODER && avctx->codec->id == AV_CODEC_ID_BINKAUDIO_RDFT)
ff_rdft_init(&s->trans.rdft, frame_len_bits, DFT_C2R);
else if (CONFIG_BINKAUDIO_DCT_DECODER)
ff_dct_init(&s->trans.dct, frame_len_bits, DCT_III);
@@ -293,7 +293,7 @@ static av_cold int decode_end(AVCodecContext *avctx)
BinkAudioContext * s = avctx->priv_data;
av_freep(&s->bands);
av_freep(&s->packet_buffer);
- if (CONFIG_BINKAUDIO_RDFT_DECODER && avctx->codec->id == CODEC_ID_BINKAUDIO_RDFT)
+ if (CONFIG_BINKAUDIO_RDFT_DECODER && avctx->codec->id == AV_CODEC_ID_BINKAUDIO_RDFT)
ff_rdft_end(&s->trans.rdft);
else if (CONFIG_BINKAUDIO_DCT_DECODER)
ff_dct_end(&s->trans.dct);
@@ -346,7 +346,7 @@ static int decode_frame(AVCodecContext *avctx, void *data,
}
samples = (int16_t *)s->frame.data[0];
- if (decode_block(s, samples, avctx->codec->id == CODEC_ID_BINKAUDIO_DCT)) {
+ if (decode_block(s, samples, avctx->codec->id == AV_CODEC_ID_BINKAUDIO_DCT)) {
av_log(avctx, AV_LOG_ERROR, "Incomplete packet\n");
return AVERROR_INVALIDDATA;
}
@@ -361,7 +361,7 @@ static int decode_frame(AVCodecContext *avctx, void *data,
AVCodec ff_binkaudio_rdft_decoder = {
.name = "binkaudio_rdft",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_BINKAUDIO_RDFT,
+ .id = AV_CODEC_ID_BINKAUDIO_RDFT,
.priv_data_size = sizeof(BinkAudioContext),
.init = decode_init,
.close = decode_end,
@@ -373,7 +373,7 @@ AVCodec ff_binkaudio_rdft_decoder = {
AVCodec ff_binkaudio_dct_decoder = {
.name = "binkaudio_dct",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_BINKAUDIO_DCT,
+ .id = AV_CODEC_ID_BINKAUDIO_DCT,
.priv_data_size = sizeof(BinkAudioContext),
.init = decode_init,
.close = decode_end,
diff --git a/libavcodec/bintext.c b/libavcodec/bintext.c
index d0b6cc07da..06742c1d9f 100644
--- a/libavcodec/bintext.c
+++ b/libavcodec/bintext.c
@@ -148,7 +148,7 @@ static int decode_frame(AVCodecContext *avctx,
s->frame.palette_has_changed = 1;
memcpy(s->frame.data[1], s->palette, 16 * 4);
- if (avctx->codec_id == CODEC_ID_XBIN) {
+ if (avctx->codec_id == AV_CODEC_ID_XBIN) {
while (buf + 2 < buf_end) {
int i,c,a;
int type = *buf >> 6;
@@ -179,7 +179,7 @@ static int decode_frame(AVCodecContext *avctx,
break;
}
}
- } else if (avctx->codec_id == CODEC_ID_IDF) {
+ } else if (avctx->codec_id == AV_CODEC_ID_IDF) {
while (buf + 2 < buf_end) {
if (AV_RL16(buf) == 1) {
int i;
@@ -219,7 +219,7 @@ static av_cold int decode_end(AVCodecContext *avctx)
AVCodec ff_bintext_decoder = {
.name = "bintext",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_BINTEXT,
+ .id = AV_CODEC_ID_BINTEXT,
.priv_data_size = sizeof(XbinContext),
.init = decode_init,
.close = decode_end,
@@ -232,7 +232,7 @@ AVCodec ff_bintext_decoder = {
AVCodec ff_xbin_decoder = {
.name = "xbin",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_XBIN,
+ .id = AV_CODEC_ID_XBIN,
.priv_data_size = sizeof(XbinContext),
.init = decode_init,
.close = decode_end,
@@ -245,7 +245,7 @@ AVCodec ff_xbin_decoder = {
AVCodec ff_idf_decoder = {
.name = "idf",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_IDF,
+ .id = AV_CODEC_ID_IDF,
.priv_data_size = sizeof(XbinContext),
.init = decode_init,
.close = decode_end,
diff --git a/libavcodec/bmp.c b/libavcodec/bmp.c
index 91e0829029..e97038c5fe 100644
--- a/libavcodec/bmp.c
+++ b/libavcodec/bmp.c
@@ -352,7 +352,7 @@ static av_cold int bmp_decode_end(AVCodecContext *avctx)
AVCodec ff_bmp_decoder = {
.name = "bmp",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_BMP,
+ .id = AV_CODEC_ID_BMP,
.priv_data_size = sizeof(BMPContext),
.init = bmp_decode_init,
.close = bmp_decode_end,
diff --git a/libavcodec/bmp_parser.c b/libavcodec/bmp_parser.c
index d9d14e447e..06ed367b38 100644
--- a/libavcodec/bmp_parser.c
+++ b/libavcodec/bmp_parser.c
@@ -84,7 +84,7 @@ flush:
}
AVCodecParser ff_bmp_parser = {
- .codec_ids = { CODEC_ID_BMP },
+ .codec_ids = { AV_CODEC_ID_BMP },
.priv_data_size = sizeof(BMPParseContext),
.parser_parse = bmp_parse,
.parser_close = ff_parse_close,
diff --git a/libavcodec/bmpenc.c b/libavcodec/bmpenc.c
index 2c60d16deb..3d329d177a 100644
--- a/libavcodec/bmpenc.c
+++ b/libavcodec/bmpenc.c
@@ -168,7 +168,7 @@ static int bmp_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
AVCodec ff_bmp_encoder = {
.name = "bmp",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_BMP,
+ .id = AV_CODEC_ID_BMP,
.priv_data_size = sizeof(BMPContext),
.init = bmp_encode_init,
.encode2 = bmp_encode_frame,
diff --git a/libavcodec/bmv.c b/libavcodec/bmv.c
index 065cbaefdc..b2d42cc5d2 100644
--- a/libavcodec/bmv.c
+++ b/libavcodec/bmv.c
@@ -364,7 +364,7 @@ static int bmv_aud_decode_frame(AVCodecContext *avctx, void *data,
AVCodec ff_bmv_video_decoder = {
.name = "bmv_video",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_BMV_VIDEO,
+ .id = AV_CODEC_ID_BMV_VIDEO,
.priv_data_size = sizeof(BMVDecContext),
.init = decode_init,
.close = decode_end,
@@ -376,7 +376,7 @@ AVCodec ff_bmv_video_decoder = {
AVCodec ff_bmv_audio_decoder = {
.name = "bmv_audio",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_BMV_AUDIO,
+ .id = AV_CODEC_ID_BMV_AUDIO,
.priv_data_size = sizeof(BMVAudioDecContext),
.init = bmv_aud_decode_init,
.decode = bmv_aud_decode_frame,
diff --git a/libavcodec/c93.c b/libavcodec/c93.c
index 876b4786d9..89f5933c96 100644
--- a/libavcodec/c93.c
+++ b/libavcodec/c93.c
@@ -251,7 +251,7 @@ static int decode_frame(AVCodecContext *avctx, void *data,
AVCodec ff_c93_decoder = {
.name = "c93",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_C93,
+ .id = AV_CODEC_ID_C93,
.priv_data_size = sizeof(C93DecoderContext),
.init = decode_init,
.close = decode_end,
diff --git a/libavcodec/cavs_parser.c b/libavcodec/cavs_parser.c
index eb0e406017..6067a39826 100644
--- a/libavcodec/cavs_parser.c
+++ b/libavcodec/cavs_parser.c
@@ -98,7 +98,7 @@ static int cavsvideo_parse(AVCodecParserContext *s,
}
AVCodecParser ff_cavsvideo_parser = {
- .codec_ids = { CODEC_ID_CAVS },
+ .codec_ids = { AV_CODEC_ID_CAVS },
.priv_data_size = sizeof(ParseContext),
.parser_parse = cavsvideo_parse,
.parser_close = ff_parse_close,
diff --git a/libavcodec/cavsdec.c b/libavcodec/cavsdec.c
index 9212e474ea..2131cd447f 100644
--- a/libavcodec/cavsdec.c
+++ b/libavcodec/cavsdec.c
@@ -733,7 +733,7 @@ static int cavs_decode_frame(AVCodecContext * avctx,void *data, int *data_size,
AVCodec ff_cavs_decoder = {
.name = "cavs",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_CAVS,
+ .id = AV_CODEC_ID_CAVS,
.priv_data_size = sizeof(AVSContext),
.init = ff_cavs_init,
.close = ff_cavs_end,
diff --git a/libavcodec/cdgraphics.c b/libavcodec/cdgraphics.c
index d7b85100ae..8638dca931 100644
--- a/libavcodec/cdgraphics.c
+++ b/libavcodec/cdgraphics.c
@@ -374,7 +374,7 @@ static av_cold int cdg_decode_end(AVCodecContext *avctx)
AVCodec ff_cdgraphics_decoder = {
.name = "cdgraphics",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_CDGRAPHICS,
+ .id = AV_CODEC_ID_CDGRAPHICS,
.priv_data_size = sizeof(CDGraphicsContext),
.init = cdg_decode_init,
.close = cdg_decode_end,
diff --git a/libavcodec/cdxl.c b/libavcodec/cdxl.c
index 5c3fbc8612..ad830ce193 100644
--- a/libavcodec/cdxl.c
+++ b/libavcodec/cdxl.c
@@ -302,7 +302,7 @@ static av_cold int cdxl_decode_end(AVCodecContext *avctx)
AVCodec ff_cdxl_decoder = {
.name = "cdxl",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_CDXL,
+ .id = AV_CODEC_ID_CDXL,
.priv_data_size = sizeof(CDXLVideoContext),
.init = cdxl_decode_init,
.close = cdxl_decode_end,
diff --git a/libavcodec/cinepak.c b/libavcodec/cinepak.c
index 2d4f58cd4a..586449849b 100644
--- a/libavcodec/cinepak.c
+++ b/libavcodec/cinepak.c
@@ -475,7 +475,7 @@ static av_cold int cinepak_decode_end(AVCodecContext *avctx)
AVCodec ff_cinepak_decoder = {
.name = "cinepak",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_CINEPAK,
+ .id = AV_CODEC_ID_CINEPAK,
.priv_data_size = sizeof(CinepakContext),
.init = cinepak_decode_init,
.close = cinepak_decode_end,
diff --git a/libavcodec/cljr.c b/libavcodec/cljr.c
index 4e70ccd13f..1187f2bca0 100644
--- a/libavcodec/cljr.c
+++ b/libavcodec/cljr.c
@@ -122,7 +122,7 @@ static av_cold int decode_end(AVCodecContext *avctx)
AVCodec ff_cljr_decoder = {
.name = "cljr",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_CLJR,
+ .id = AV_CODEC_ID_CLJR,
.priv_data_size = sizeof(CLJRContext),
.init = decode_init,
.close = decode_end,
@@ -199,7 +199,7 @@ static const AVClass class = {
AVCodec ff_cljr_encoder = {
.name = "cljr",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_CLJR,
+ .id = AV_CODEC_ID_CLJR,
.priv_data_size = sizeof(CLJRContext),
.init = common_init,
.encode2 = encode_frame,
diff --git a/libavcodec/cllc.c b/libavcodec/cllc.c
index d128d7ae94..d444713a0f 100644
--- a/libavcodec/cllc.c
+++ b/libavcodec/cllc.c
@@ -274,7 +274,7 @@ static av_cold int cllc_decode_init(AVCodecContext *avctx)
AVCodec ff_cllc_decoder = {
.name = "cllc",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_CLLC,
+ .id = AV_CODEC_ID_CLLC,
.priv_data_size = sizeof(CLLCContext),
.init = cllc_decode_init,
.decode = cllc_decode_frame,
diff --git a/libavcodec/codec_names.sh b/libavcodec/codec_names.sh
index 0e499c9c49..44ccb45afe 100755
--- a/libavcodec/codec_names.sh
+++ b/libavcodec/codec_names.sh
@@ -41,7 +41,7 @@ parse_config_h () {
define_codecid () {
id="$1"
- n=${1#CODEC_ID_}
+ n=${1#AV_CODEC_ID_}
add_line "case ${id}:"
eval "c=\${CONFIG_${n}_DECODER}:\${CONFIG_${n}_ENCODER}"
case "$c" in
@@ -62,8 +62,8 @@ parse_enum_codecid () {
while read line; do
case "$line" in
"};") break;;
- *CODEC_ID_FIRST*=*) ;;
- CODEC_ID_*) define_codecid ${line%%[=,]*};;
+ *AV_CODEC_ID_FIRST*=*) ;;
+ AV_CODEC_ID_*) define_codecid ${line%%[=,]*};;
esac
done
}
@@ -71,7 +71,7 @@ parse_enum_codecid () {
parse_avcodec_h () {
while read line; do
case "$line" in
- "enum CodecID {") parse_enum_codecid; break;;
+ "enum AVCodecID {") parse_enum_codecid; break;;
esac
done
}
diff --git a/libavcodec/cook.c b/libavcodec/cook.c
index d27530caf9..19c48ed633 100644
--- a/libavcodec/cook.c
+++ b/libavcodec/cook.c
@@ -1313,7 +1313,7 @@ static av_cold int cook_decode_init(AVCodecContext *avctx)
AVCodec ff_cook_decoder = {
.name = "cook",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_COOK,
+ .id = AV_CODEC_ID_COOK,
.priv_data_size = sizeof(COOKContext),
.init = cook_decode_init,
.close = cook_decode_close,
diff --git a/libavcodec/cook_parser.c b/libavcodec/cook_parser.c
index c16f7c8a5f..f140e90461 100644
--- a/libavcodec/cook_parser.c
+++ b/libavcodec/cook_parser.c
@@ -53,7 +53,7 @@ static int cook_parse(AVCodecParserContext *s1, AVCodecContext *avctx,
}
AVCodecParser ff_cook_parser = {
- .codec_ids = { CODEC_ID_COOK },
+ .codec_ids = { AV_CODEC_ID_COOK },
.priv_data_size = sizeof(CookParseContext),
.parser_parse = cook_parse,
};
diff --git a/libavcodec/crystalhd.c b/libavcodec/crystalhd.c
index 47439aef94..afa5cb4263 100644
--- a/libavcodec/crystalhd.c
+++ b/libavcodec/crystalhd.c
@@ -166,17 +166,17 @@ static const AVOption options[] = {
static inline BC_MEDIA_SUBTYPE id2subtype(CHDContext *priv, enum CodecID id)
{
switch (id) {
- case CODEC_ID_MPEG4:
+ case AV_CODEC_ID_MPEG4:
return BC_MSUBTYPE_DIVX;
- case CODEC_ID_MSMPEG4V3:
+ case AV_CODEC_ID_MSMPEG4V3:
return BC_MSUBTYPE_DIVX311;
- case CODEC_ID_MPEG2VIDEO:
+ case AV_CODEC_ID_MPEG2VIDEO:
return BC_MSUBTYPE_MPEG2VIDEO;
- case CODEC_ID_VC1:
+ case AV_CODEC_ID_VC1:
return BC_MSUBTYPE_VC1;
- case CODEC_ID_WMV3:
+ case AV_CODEC_ID_WMV3:
return BC_MSUBTYPE_WMV3;
- case CODEC_ID_H264:
+ case AV_CODEC_ID_H264:
return priv->is_nal ? BC_MSUBTYPE_AVC1 : BC_MSUBTYPE_H264;
default:
return BC_MSUBTYPE_INVALID;
@@ -515,7 +515,7 @@ static av_cold int init(AVCodecContext *avctx)
goto fail;
}
- if (avctx->codec->id == CODEC_ID_H264) {
+ if (avctx->codec->id == AV_CODEC_ID_H264) {
priv->parser = av_parser_init(avctx->codec->id);
if (!priv->parser)
av_log(avctx, AV_LOG_WARNING,
@@ -604,7 +604,7 @@ static inline CopyRet copy_frame(AVCodecContext *avctx,
* picture or if there is a corruption in the stream. (In either
* case a 0 will be returned for the next picture number)
*/
- trust_interlaced = avctx->codec->id != CODEC_ID_H264 ||
+ trust_interlaced = avctx->codec->id != AV_CODEC_ID_H264 ||
!(output->PicInfo.flags & VDEC_FLAG_UNKNOWN_SRC) ||
priv->need_second_field ||
(decoder_status.picNumFlags & ~0x40000000) ==
@@ -812,7 +812,7 @@ static inline CopyRet receive_frame(AVCodecContext *avctx,
priv->last_picture = output.PicInfo.picture_number - 1;
}
- if (avctx->codec->id == CODEC_ID_MPEG4 &&
+ if (avctx->codec->id == AV_CODEC_ID_MPEG4 &&
output.PicInfo.timeStamp == 0 && priv->bframe_bug) {
av_log(avctx, AV_LOG_VERBOSE,
"CrystalHD: Not returning packed frame twice.\n");
@@ -1091,7 +1091,7 @@ static AVClass h264_class = {
AVCodec ff_h264_crystalhd_decoder = {
.name = "h264_crystalhd",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_H264,
+ .id = AV_CODEC_ID_H264,
.priv_data_size = sizeof(CHDContext),
.init = init,
.close = uninit,
@@ -1115,7 +1115,7 @@ static AVClass mpeg2_class = {
AVCodec ff_mpeg2_crystalhd_decoder = {
.name = "mpeg2_crystalhd",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_MPEG2VIDEO,
+ .id = AV_CODEC_ID_MPEG2VIDEO,
.priv_data_size = sizeof(CHDContext),
.init = init,
.close = uninit,
@@ -1139,7 +1139,7 @@ static AVClass mpeg4_class = {
AVCodec ff_mpeg4_crystalhd_decoder = {
.name = "mpeg4_crystalhd",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_MPEG4,
+ .id = AV_CODEC_ID_MPEG4,
.priv_data_size = sizeof(CHDContext),
.init = init,
.close = uninit,
@@ -1163,7 +1163,7 @@ static AVClass msmpeg4_class = {
AVCodec ff_msmpeg4_crystalhd_decoder = {
.name = "msmpeg4_crystalhd",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_MSMPEG4V3,
+ .id = AV_CODEC_ID_MSMPEG4V3,
.priv_data_size = sizeof(CHDContext),
.init = init,
.close = uninit,
@@ -1187,7 +1187,7 @@ static AVClass vc1_class = {
AVCodec ff_vc1_crystalhd_decoder = {
.name = "vc1_crystalhd",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_VC1,
+ .id = AV_CODEC_ID_VC1,
.priv_data_size = sizeof(CHDContext),
.init = init,
.close = uninit,
@@ -1211,7 +1211,7 @@ static AVClass wmv3_class = {
AVCodec ff_wmv3_crystalhd_decoder = {
.name = "wmv3_crystalhd",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_WMV3,
+ .id = AV_CODEC_ID_WMV3,
.priv_data_size = sizeof(CHDContext),
.init = init,
.close = uninit,
diff --git a/libavcodec/cscd.c b/libavcodec/cscd.c
index b0b4893ca1..67851a2231 100644
--- a/libavcodec/cscd.c
+++ b/libavcodec/cscd.c
@@ -161,7 +161,7 @@ static av_cold int decode_end(AVCodecContext *avctx) {
AVCodec ff_cscd_decoder = {
.name = "camstudio",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_CSCD,
+ .id = AV_CODEC_ID_CSCD,
.priv_data_size = sizeof(CamStudioContext),
.init = decode_init,
.close = decode_end,
diff --git a/libavcodec/cyuv.c b/libavcodec/cyuv.c
index a23c561188..9936b22583 100644
--- a/libavcodec/cyuv.c
+++ b/libavcodec/cyuv.c
@@ -83,7 +83,7 @@ static int cyuv_decode_frame(AVCodecContext *avctx,
unsigned char cur_byte;
int pixel_groups;
- if (avctx->codec_id == CODEC_ID_AURA) {
+ if (avctx->codec_id == AV_CODEC_ID_AURA) {
y_table = u_table;
u_table = v_table;
}
@@ -182,7 +182,7 @@ static av_cold int cyuv_decode_end(AVCodecContext *avctx)
AVCodec ff_aura_decoder = {
.name = "aura",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_AURA,
+ .id = AV_CODEC_ID_AURA,
.priv_data_size = sizeof(CyuvDecodeContext),
.init = cyuv_decode_init,
.close = cyuv_decode_end,
@@ -196,7 +196,7 @@ AVCodec ff_aura_decoder = {
AVCodec ff_cyuv_decoder = {
.name = "cyuv",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_CYUV,
+ .id = AV_CODEC_ID_CYUV,
.priv_data_size = sizeof(CyuvDecodeContext),
.init = cyuv_decode_init,
.close = cyuv_decode_end,
diff --git a/libavcodec/dca_parser.c b/libavcodec/dca_parser.c
index 62bcf2bd5a..5ccaaccf11 100644
--- a/libavcodec/dca_parser.c
+++ b/libavcodec/dca_parser.c
@@ -201,7 +201,7 @@ static int dca_parse(AVCodecParserContext * s,
}
AVCodecParser ff_dca_parser = {
- .codec_ids = { CODEC_ID_DTS },
+ .codec_ids = { AV_CODEC_ID_DTS },
.priv_data_size = sizeof(DCAParseContext),
.parser_init = dca_parse_init,
.parser_parse = dca_parse,
diff --git a/libavcodec/dcadec.c b/libavcodec/dcadec.c
index 9d75926103..a6ca1ee357 100644
--- a/libavcodec/dcadec.c
+++ b/libavcodec/dcadec.c
@@ -2493,7 +2493,7 @@ static const AVProfile profiles[] = {
AVCodec ff_dca_decoder = {
.name = "dca",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_DTS,
+ .id = AV_CODEC_ID_DTS,
.priv_data_size = sizeof(DCAContext),
.init = dca_decode_init,
.decode = dca_decode_frame,
diff --git a/libavcodec/dcaenc.c b/libavcodec/dcaenc.c
index fd00b4f0b1..104fd87cda 100644
--- a/libavcodec/dcaenc.c
+++ b/libavcodec/dcaenc.c
@@ -592,7 +592,7 @@ static int encode_init(AVCodecContext *avctx)
AVCodec ff_dca_encoder = {
.name = "dca",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_DTS,
+ .id = AV_CODEC_ID_DTS,
.priv_data_size = sizeof(DCAContext),
.init = encode_init,
.encode2 = encode_frame,
diff --git a/libavcodec/dfa.c b/libavcodec/dfa.c
index 2f8e4f122d..18aaffaa09 100644
--- a/libavcodec/dfa.c
+++ b/libavcodec/dfa.c
@@ -381,7 +381,7 @@ static av_cold int dfa_decode_end(AVCodecContext *avctx)
AVCodec ff_dfa_decoder = {
.name = "dfa",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_DFA,
+ .id = AV_CODEC_ID_DFA,
.priv_data_size = sizeof(DfaContext),
.init = dfa_decode_init,
.close = dfa_decode_end,
diff --git a/libavcodec/dirac_parser.c b/libavcodec/dirac_parser.c
index 94af768432..60b2ee1f88 100644
--- a/libavcodec/dirac_parser.c
+++ b/libavcodec/dirac_parser.c
@@ -248,7 +248,7 @@ static void dirac_parse_close(AVCodecParserContext *s)
}
AVCodecParser ff_dirac_parser = {
- .codec_ids = { CODEC_ID_DIRAC },
+ .codec_ids = { AV_CODEC_ID_DIRAC },
.priv_data_size = sizeof(DiracParseContext),
.parser_parse = dirac_parse,
.parser_close = dirac_parse_close,
diff --git a/libavcodec/diracdec.c b/libavcodec/diracdec.c
index 9db0eda1be..13d9e478b5 100644
--- a/libavcodec/diracdec.c
+++ b/libavcodec/diracdec.c
@@ -1916,7 +1916,7 @@ static int dirac_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
AVCodec ff_dirac_decoder = {
.name = "dirac",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_DIRAC,
+ .id = AV_CODEC_ID_DIRAC,
.priv_data_size = sizeof(DiracContext),
.init = dirac_decode_init,
.close = dirac_decode_end,
diff --git a/libavcodec/dnxhd_parser.c b/libavcodec/dnxhd_parser.c
index d2076c5161..6e030e4212 100644
--- a/libavcodec/dnxhd_parser.c
+++ b/libavcodec/dnxhd_parser.c
@@ -109,7 +109,7 @@ static int dnxhd_parse(AVCodecParserContext *s,
}
AVCodecParser ff_dnxhd_parser = {
- .codec_ids = { CODEC_ID_DNXHD },
+ .codec_ids = { AV_CODEC_ID_DNXHD },
.priv_data_size = sizeof(DNXHDParserContext),
.parser_parse = dnxhd_parse,
.parser_close = ff_parse_close,
diff --git a/libavcodec/dnxhddec.c b/libavcodec/dnxhddec.c
index 4b2338001c..ea2074b66b 100644
--- a/libavcodec/dnxhddec.c
+++ b/libavcodec/dnxhddec.c
@@ -427,7 +427,7 @@ static av_cold int dnxhd_decode_close(AVCodecContext *avctx)
AVCodec ff_dnxhd_decoder = {
.name = "dnxhd",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_DNXHD,
+ .id = AV_CODEC_ID_DNXHD,
.priv_data_size = sizeof(DNXHDContext),
.init = dnxhd_decode_init,
.close = dnxhd_decode_close,
diff --git a/libavcodec/dnxhdenc.c b/libavcodec/dnxhdenc.c
index fde98d2ba2..df5a32c0d4 100644
--- a/libavcodec/dnxhdenc.c
+++ b/libavcodec/dnxhdenc.c
@@ -1008,7 +1008,7 @@ static const AVCodecDefault dnxhd_defaults[] = {
AVCodec ff_dnxhd_encoder = {
.name = "dnxhd",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_DNXHD,
+ .id = AV_CODEC_ID_DNXHD,
.priv_data_size = sizeof(DNXHDEncContext),
.init = dnxhd_encode_init,
.encode2 = dnxhd_encode_picture,
diff --git a/libavcodec/dpcm.c b/libavcodec/dpcm.c
index b7e620a3e0..a7c9bb1911 100644
--- a/libavcodec/dpcm.c
+++ b/libavcodec/dpcm.c
@@ -128,7 +128,7 @@ static av_cold int dpcm_decode_init(AVCodecContext *avctx)
switch(avctx->codec->id) {
- case CODEC_ID_ROQ_DPCM:
+ case AV_CODEC_ID_ROQ_DPCM:
/* initialize square table */
for (i = 0; i < 128; i++) {
int16_t square = i * i;
@@ -137,7 +137,7 @@ static av_cold int dpcm_decode_init(AVCodecContext *avctx)
}
break;
- case CODEC_ID_SOL_DPCM:
+ case AV_CODEC_ID_SOL_DPCM:
switch(avctx->codec_tag){
case 1:
s->sol_table = sol_table_old;
@@ -159,7 +159,7 @@ static av_cold int dpcm_decode_init(AVCodecContext *avctx)
break;
}
- if (avctx->codec->id == CODEC_ID_SOL_DPCM && avctx->codec_tag != 3)
+ if (avctx->codec->id == AV_CODEC_ID_SOL_DPCM && avctx->codec_tag != 3)
avctx->sample_fmt = AV_SAMPLE_FMT_U8;
else
avctx->sample_fmt = AV_SAMPLE_FMT_S16;
@@ -189,16 +189,16 @@ static int dpcm_decode_frame(AVCodecContext *avctx, void *data,
/* calculate output size */
switch(avctx->codec->id) {
- case CODEC_ID_ROQ_DPCM:
+ case AV_CODEC_ID_ROQ_DPCM:
out = buf_size - 8;
break;
- case CODEC_ID_INTERPLAY_DPCM:
+ case AV_CODEC_ID_INTERPLAY_DPCM:
out = buf_size - 6 - s->channels;
break;
- case CODEC_ID_XAN_DPCM:
+ case AV_CODEC_ID_XAN_DPCM:
out = buf_size - 2 * s->channels;
break;
- case CODEC_ID_SOL_DPCM:
+ case AV_CODEC_ID_SOL_DPCM:
if (avctx->codec_tag != 3)
out = buf_size * 2;
else
@@ -224,7 +224,7 @@ static int dpcm_decode_frame(AVCodecContext *avctx, void *data,
switch(avctx->codec->id) {
- case CODEC_ID_ROQ_DPCM:
+ case AV_CODEC_ID_ROQ_DPCM:
bytestream2_skipu(&gb, 6);
if (stereo) {
@@ -245,7 +245,7 @@ static int dpcm_decode_frame(AVCodecContext *avctx, void *data,
}
break;
- case CODEC_ID_INTERPLAY_DPCM:
+ case AV_CODEC_ID_INTERPLAY_DPCM:
bytestream2_skipu(&gb, 6); /* skip over the stream mask and stream length */
for (ch = 0; ch < s->channels; ch++) {
@@ -264,7 +264,7 @@ static int dpcm_decode_frame(AVCodecContext *avctx, void *data,
}
break;
- case CODEC_ID_XAN_DPCM:
+ case AV_CODEC_ID_XAN_DPCM:
{
int shift[2] = { 4, 4 };
@@ -297,7 +297,7 @@ static int dpcm_decode_frame(AVCodecContext *avctx, void *data,
}
break;
}
- case CODEC_ID_SOL_DPCM:
+ case AV_CODEC_ID_SOL_DPCM:
if (avctx->codec_tag != 3) {
uint8_t *output_samples_u8 = s->frame.data[0],
*samples_end_u8 = output_samples_u8 + out;
@@ -344,7 +344,7 @@ AVCodec ff_ ## name_ ## _decoder = { \
.long_name = NULL_IF_CONFIG_SMALL(long_name_), \
}
-DPCM_DECODER(CODEC_ID_INTERPLAY_DPCM, interplay_dpcm, "DPCM Interplay");
-DPCM_DECODER(CODEC_ID_ROQ_DPCM, roq_dpcm, "DPCM id RoQ");
-DPCM_DECODER(CODEC_ID_SOL_DPCM, sol_dpcm, "DPCM Sol");
-DPCM_DECODER(CODEC_ID_XAN_DPCM, xan_dpcm, "DPCM Xan");
+DPCM_DECODER(AV_CODEC_ID_INTERPLAY_DPCM, interplay_dpcm, "DPCM Interplay");
+DPCM_DECODER(AV_CODEC_ID_ROQ_DPCM, roq_dpcm, "DPCM id RoQ");
+DPCM_DECODER(AV_CODEC_ID_SOL_DPCM, sol_dpcm, "DPCM Sol");
+DPCM_DECODER(AV_CODEC_ID_XAN_DPCM, xan_dpcm, "DPCM Xan");
diff --git a/libavcodec/dpx.c b/libavcodec/dpx.c
index 791e66af7b..5e35005776 100644
--- a/libavcodec/dpx.c
+++ b/libavcodec/dpx.c
@@ -243,7 +243,7 @@ static av_cold int decode_end(AVCodecContext *avctx)
AVCodec ff_dpx_decoder = {
.name = "dpx",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_DPX,
+ .id = AV_CODEC_ID_DPX,
.priv_data_size = sizeof(DPXContext),
.init = decode_init,
.close = decode_end,
diff --git a/libavcodec/dpxenc.c b/libavcodec/dpxenc.c
index 6e06a09c74..021a05c28a 100644
--- a/libavcodec/dpxenc.c
+++ b/libavcodec/dpxenc.c
@@ -178,7 +178,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
AVCodec ff_dpx_encoder = {
.name = "dpx",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_DPX,
+ .id = AV_CODEC_ID_DPX,
.priv_data_size = sizeof(DPXContext),
.init = encode_init,
.encode2 = encode_frame,
diff --git a/libavcodec/dsicinav.c b/libavcodec/dsicinav.c
index b77d374e34..bd585c395d 100644
--- a/libavcodec/dsicinav.c
+++ b/libavcodec/dsicinav.c
@@ -381,7 +381,7 @@ static int cinaudio_decode_frame(AVCodecContext *avctx, void *data,
AVCodec ff_dsicinvideo_decoder = {
.name = "dsicinvideo",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_DSICINVIDEO,
+ .id = AV_CODEC_ID_DSICINVIDEO,
.priv_data_size = sizeof(CinVideoContext),
.init = cinvideo_decode_init,
.close = cinvideo_decode_end,
@@ -393,7 +393,7 @@ AVCodec ff_dsicinvideo_decoder = {
AVCodec ff_dsicinaudio_decoder = {
.name = "dsicinaudio",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_DSICINAUDIO,
+ .id = AV_CODEC_ID_DSICINAUDIO,
.priv_data_size = sizeof(CinAudioContext),
.init = cinaudio_decode_init,
.decode = cinaudio_decode_frame,
diff --git a/libavcodec/dv.c b/libavcodec/dv.c
index 4ea3099cd9..13af692fe0 100644
--- a/libavcodec/dv.c
+++ b/libavcodec/dv.c
@@ -987,7 +987,7 @@ static int dvvideo_encode_frame(AVCodecContext *c, AVPacket *pkt,
AVCodec ff_dvvideo_encoder = {
.name = "dvvideo",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_DVVIDEO,
+ .id = AV_CODEC_ID_DVVIDEO,
.priv_data_size = sizeof(DVVideoContext),
.init = dvvideo_init_encoder,
.encode2 = dvvideo_encode_frame,
diff --git a/libavcodec/dvbsub.c b/libavcodec/dvbsub.c
index ab6420c79e..8a688d09f1 100644
--- a/libavcodec/dvbsub.c
+++ b/libavcodec/dvbsub.c
@@ -464,7 +464,7 @@ static int dvbsub_encode(AVCodecContext *avctx,
AVCodec ff_dvbsub_encoder = {
.name = "dvbsub",
.type = AVMEDIA_TYPE_SUBTITLE,
- .id = CODEC_ID_DVB_SUBTITLE,
+ .id = AV_CODEC_ID_DVB_SUBTITLE,
.priv_data_size = sizeof(DVBSubtitleContext),
.encode = dvbsub_encode,
.long_name = NULL_IF_CONFIG_SMALL("DVB subtitles"),
diff --git a/libavcodec/dvbsub_parser.c b/libavcodec/dvbsub_parser.c
index b2a9883eac..5274fd65e7 100644
--- a/libavcodec/dvbsub_parser.c
+++ b/libavcodec/dvbsub_parser.c
@@ -172,7 +172,7 @@ static av_cold void dvbsub_parse_close(AVCodecParserContext *s)
}
AVCodecParser ff_dvbsub_parser = {
- .codec_ids = { CODEC_ID_DVB_SUBTITLE },
+ .codec_ids = { AV_CODEC_ID_DVB_SUBTITLE },
.priv_data_size = sizeof(DVBSubParseContext),
.parser_init = dvbsub_parse_init,
.parser_parse = dvbsub_parse,
diff --git a/libavcodec/dvbsubdec.c b/libavcodec/dvbsubdec.c
index 28426d1b96..ef90f73c1a 100644
--- a/libavcodec/dvbsubdec.c
+++ b/libavcodec/dvbsubdec.c
@@ -1533,7 +1533,7 @@ static int dvbsub_decode(AVCodecContext *avctx,
AVCodec ff_dvbsub_decoder = {
.name = "dvbsub",
.type = AVMEDIA_TYPE_SUBTITLE,
- .id = CODEC_ID_DVB_SUBTITLE,
+ .id = AV_CODEC_ID_DVB_SUBTITLE,
.priv_data_size = sizeof(DVBSubContext),
.init = dvbsub_init_decoder,
.close = dvbsub_close_decoder,
diff --git a/libavcodec/dvdec.c b/libavcodec/dvdec.c
index 917c8adefb..6a7424444b 100644
--- a/libavcodec/dvdec.c
+++ b/libavcodec/dvdec.c
@@ -377,7 +377,7 @@ static int dvvideo_close(AVCodecContext *c)
AVCodec ff_dvvideo_decoder = {
.name = "dvvideo",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_DVVIDEO,
+ .id = AV_CODEC_ID_DVVIDEO,
.priv_data_size = sizeof(DVVideoContext),
.init = ff_dvvideo_init,
.close = dvvideo_close,
diff --git a/libavcodec/dvdsub_parser.c b/libavcodec/dvdsub_parser.c
index a98b8e7daa..c441dad586 100644
--- a/libavcodec/dvdsub_parser.c
+++ b/libavcodec/dvdsub_parser.c
@@ -77,7 +77,7 @@ static av_cold void dvdsub_parse_close(AVCodecParserContext *s)
}
AVCodecParser ff_dvdsub_parser = {
- .codec_ids = { CODEC_ID_DVD_SUBTITLE },
+ .codec_ids = { AV_CODEC_ID_DVD_SUBTITLE },
.priv_data_size = sizeof(DVDSubParseContext),
.parser_init = dvdsub_parse_init,
.parser_parse = dvdsub_parse,
diff --git a/libavcodec/dvdsubdec.c b/libavcodec/dvdsubdec.c
index ec86b259ce..3eba2dfce9 100644
--- a/libavcodec/dvdsubdec.c
+++ b/libavcodec/dvdsubdec.c
@@ -561,7 +561,7 @@ static int dvdsub_init(AVCodecContext *avctx)
AVCodec ff_dvdsub_decoder = {
.name = "dvdsub",
.type = AVMEDIA_TYPE_SUBTITLE,
- .id = CODEC_ID_DVD_SUBTITLE,
+ .id = AV_CODEC_ID_DVD_SUBTITLE,
.priv_data_size = sizeof(DVDSubContext),
.init = dvdsub_init,
.decode = dvdsub_decode,
diff --git a/libavcodec/dvdsubenc.c b/libavcodec/dvdsubenc.c
index 543fe61329..60089a1248 100644
--- a/libavcodec/dvdsubenc.c
+++ b/libavcodec/dvdsubenc.c
@@ -217,7 +217,7 @@ static int dvdsub_encode(AVCodecContext *avctx,
AVCodec ff_dvdsub_encoder = {
.name = "dvdsub",
.type = AVMEDIA_TYPE_SUBTITLE,
- .id = CODEC_ID_DVD_SUBTITLE,
+ .id = AV_CODEC_ID_DVD_SUBTITLE,
.encode = dvdsub_encode,
.long_name = NULL_IF_CONFIG_SMALL("DVD subtitles"),
};
diff --git a/libavcodec/dxa.c b/libavcodec/dxa.c
index 5e25ab7439..79d3eb3b0e 100644
--- a/libavcodec/dxa.c
+++ b/libavcodec/dxa.c
@@ -321,7 +321,7 @@ static av_cold int decode_end(AVCodecContext *avctx)
AVCodec ff_dxa_decoder = {
.name = "dxa",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_DXA,
+ .id = AV_CODEC_ID_DXA,
.priv_data_size = sizeof(DxaDecContext),
.init = decode_init,
.close = decode_end,
diff --git a/libavcodec/dxtory.c b/libavcodec/dxtory.c
index 5f67fbdbef..d11b942ff8 100644
--- a/libavcodec/dxtory.c
+++ b/libavcodec/dxtory.c
@@ -101,7 +101,7 @@ AVCodec ff_dxtory_decoder = {
.name = "dxtory",
.long_name = NULL_IF_CONFIG_SMALL("Dxtory"),
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_DXTORY,
+ .id = AV_CODEC_ID_DXTORY,
.init = decode_init,
.close = decode_close,
.decode = decode_frame,
diff --git a/libavcodec/dxva2_h264.c b/libavcodec/dxva2_h264.c
index c36ac60037..fdd8980d0f 100644
--- a/libavcodec/dxva2_h264.c
+++ b/libavcodec/dxva2_h264.c
@@ -442,7 +442,7 @@ static int end_frame(AVCodecContext *avctx)
AVHWAccel ff_h264_dxva2_hwaccel = {
.name = "h264_dxva2",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_H264,
+ .id = AV_CODEC_ID_H264,
.pix_fmt = PIX_FMT_DXVA2_VLD,
.start_frame = start_frame,
.decode_slice = decode_slice,
diff --git a/libavcodec/dxva2_mpeg2.c b/libavcodec/dxva2_mpeg2.c
index 2e48d28246..dc9b103a71 100644
--- a/libavcodec/dxva2_mpeg2.c
+++ b/libavcodec/dxva2_mpeg2.c
@@ -263,7 +263,7 @@ static int end_frame(AVCodecContext *avctx)
AVHWAccel ff_mpeg2_dxva2_hwaccel = {
.name = "mpeg2_dxva2",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_MPEG2VIDEO,
+ .id = AV_CODEC_ID_MPEG2VIDEO,
.pix_fmt = PIX_FMT_DXVA2_VLD,
.start_frame = start_frame,
.decode_slice = decode_slice,
diff --git a/libavcodec/dxva2_vc1.c b/libavcodec/dxva2_vc1.c
index 11433bbb07..a6891d31cd 100644
--- a/libavcodec/dxva2_vc1.c
+++ b/libavcodec/dxva2_vc1.c
@@ -167,7 +167,7 @@ static int commit_bitstream_and_slice_buffer(AVCodecContext *avctx,
DXVA_SliceInfo *slice = &ctx_pic->si;
static const uint8_t start_code[] = { 0, 0, 1, 0x0d };
- const unsigned start_code_size = avctx->codec_id == CODEC_ID_VC1 ? sizeof(start_code) : 0;
+ const unsigned start_code_size = avctx->codec_id == AV_CODEC_ID_VC1 ? sizeof(start_code) : 0;
const unsigned slice_size = slice->dwSliceBitsInBuffer / 8;
const unsigned padding = 128 - ((start_code_size + slice_size) & 127);
const unsigned data_size = start_code_size + slice_size + padding;
@@ -237,7 +237,7 @@ static int decode_slice(AVCodecContext *avctx,
if (ctx_pic->bitstream_size > 0)
return -1;
- if (avctx->codec_id == CODEC_ID_VC1 &&
+ if (avctx->codec_id == AV_CODEC_ID_VC1 &&
size >= 4 && IS_MARKER(AV_RB32(buffer))) {
buffer += 4;
size -= 4;
@@ -268,7 +268,7 @@ static int end_frame(AVCodecContext *avctx)
AVHWAccel ff_wmv3_dxva2_hwaccel = {
.name = "wmv3_dxva2",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_WMV3,
+ .id = AV_CODEC_ID_WMV3,
.pix_fmt = PIX_FMT_DXVA2_VLD,
.start_frame = start_frame,
.decode_slice = decode_slice,
@@ -280,7 +280,7 @@ AVHWAccel ff_wmv3_dxva2_hwaccel = {
AVHWAccel ff_vc1_dxva2_hwaccel = {
.name = "vc1_dxva2",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_VC1,
+ .id = AV_CODEC_ID_VC1,
.pix_fmt = PIX_FMT_DXVA2_VLD,
.start_frame = start_frame,
.decode_slice = decode_slice,
diff --git a/libavcodec/eac3enc.c b/libavcodec/eac3enc.c
index e11b29c161..c5ac6d1516 100644
--- a/libavcodec/eac3enc.c
+++ b/libavcodec/eac3enc.c
@@ -253,7 +253,7 @@ void ff_eac3_output_frame_header(AC3EncodeContext *s)
AVCodec ff_eac3_encoder = {
.name = "eac3",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_EAC3,
+ .id = AV_CODEC_ID_EAC3,
.priv_data_size = sizeof(AC3EncodeContext),
.init = ff_ac3_encode_init,
.encode2 = ff_ac3_float_encode_frame,
diff --git a/libavcodec/eacmv.c b/libavcodec/eacmv.c
index 324961d749..76680a87ce 100644
--- a/libavcodec/eacmv.c
+++ b/libavcodec/eacmv.c
@@ -221,7 +221,7 @@ static av_cold int cmv_decode_end(AVCodecContext *avctx){
AVCodec ff_eacmv_decoder = {
.name = "eacmv",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_CMV,
+ .id = AV_CODEC_ID_CMV,
.priv_data_size = sizeof(CmvContext),
.init = cmv_decode_init,
.close = cmv_decode_end,
diff --git a/libavcodec/eamad.c b/libavcodec/eamad.c
index 87efcd4468..b3382406cd 100644
--- a/libavcodec/eamad.c
+++ b/libavcodec/eamad.c
@@ -310,7 +310,7 @@ static av_cold int decode_end(AVCodecContext *avctx)
AVCodec ff_eamad_decoder = {
.name = "eamad",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_MAD,
+ .id = AV_CODEC_ID_MAD,
.priv_data_size = sizeof(MadContext),
.init = decode_init,
.close = decode_end,
diff --git a/libavcodec/eatgq.c b/libavcodec/eatgq.c
index 7326af388a..ab2a398ad2 100644
--- a/libavcodec/eatgq.c
+++ b/libavcodec/eatgq.c
@@ -242,7 +242,7 @@ static av_cold int tgq_decode_end(AVCodecContext *avctx){
AVCodec ff_eatgq_decoder = {
.name = "eatgq",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_TGQ,
+ .id = AV_CODEC_ID_TGQ,
.priv_data_size = sizeof(TgqContext),
.init = tgq_decode_init,
.close = tgq_decode_end,
diff --git a/libavcodec/eatgv.c b/libavcodec/eatgv.c
index 3b19d703f9..5ca8cf5e53 100644
--- a/libavcodec/eatgv.c
+++ b/libavcodec/eatgv.c
@@ -352,7 +352,7 @@ static av_cold int tgv_decode_end(AVCodecContext *avctx)
AVCodec ff_eatgv_decoder = {
.name = "eatgv",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_TGV,
+ .id = AV_CODEC_ID_TGV,
.priv_data_size = sizeof(TgvContext),
.init = tgv_decode_init,
.close = tgv_decode_end,
diff --git a/libavcodec/eatqi.c b/libavcodec/eatqi.c
index 6ca4e51ecd..7610acd79c 100644
--- a/libavcodec/eatqi.c
+++ b/libavcodec/eatqi.c
@@ -155,7 +155,7 @@ static av_cold int tqi_decode_end(AVCodecContext *avctx)
AVCodec ff_eatqi_decoder = {
.name = "eatqi",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_TQI,
+ .id = AV_CODEC_ID_TQI,
.priv_data_size = sizeof(TqiContext),
.init = tqi_decode_init,
.close = tqi_decode_end,
diff --git a/libavcodec/error_resilience.c b/libavcodec/error_resilience.c
index 7fc68905e2..28cc08fd1b 100644
--- a/libavcodec/error_resilience.c
+++ b/libavcodec/error_resilience.c
@@ -51,7 +51,7 @@ static void decode_mb(MpegEncContext *s, int ref)
s->dest[1] += (16 >> s->chroma_x_shift) - 8;
s->dest[2] += (16 >> s->chroma_x_shift) - 8;
- if (CONFIG_H264_DECODER && s->codec_id == CODEC_ID_H264) {
+ if (CONFIG_H264_DECODER && s->codec_id == AV_CODEC_ID_H264) {
H264Context *h = (void*)s;
h->mb_xy = s->mb_x + s->mb_y * s->mb_stride;
memset(h->non_zero_count_cache, 0, sizeof(h->non_zero_count_cache));
@@ -86,7 +86,7 @@ static void decode_mb(MpegEncContext *s, int ref)
*/
static void set_mv_strides(MpegEncContext *s, int *mv_step, int *stride)
{
- if (s->codec_id == CODEC_ID_H264) {
+ if (s->codec_id == AV_CODEC_ID_H264) {
H264Context *h = (void*)s;
av_assert0(s->quarter_sample);
*mv_step = 4;
@@ -617,7 +617,7 @@ skip_mean_and_median:
pred_count++;
if (!fixed[mb_xy] && 0) {
- if (s->avctx->codec_id == CODEC_ID_H264) {
+ if (s->avctx->codec_id == AV_CODEC_ID_H264) {
// FIXME
} else {
ff_thread_await_progress(&s->last_picture_ptr->f,
@@ -748,7 +748,7 @@ static int is_intra_more_likely(MpegEncContext *s)
undamaged_count++;
}
- if (s->codec_id == CODEC_ID_H264) {
+ if (s->codec_id == AV_CODEC_ID_H264) {
H264Context *h = (void*) s;
if (h->list_count <= 0 || h->ref_count[0] <= 0 ||
!h->ref_list[0][0].f.data[0])
@@ -788,7 +788,7 @@ static int is_intra_more_likely(MpegEncContext *s)
uint8_t *last_mb_ptr = s->last_picture.f.data[0] +
mb_x * 16 + mb_y * 16 * s->linesize;
- if (s->avctx->codec_id == CODEC_ID_H264) {
+ if (s->avctx->codec_id == AV_CODEC_ID_H264) {
// FIXME
} else {
ff_thread_await_progress(&s->last_picture_ptr->f,
@@ -1172,7 +1172,7 @@ void ff_er_frame_end(MpegEncContext *s)
int time_pp = s->pp_time;
int time_pb = s->pb_time;
- if (s->avctx->codec_id == CODEC_ID_H264) {
+ if (s->avctx->codec_id == AV_CODEC_ID_H264) {
// FIXME
} else {
ff_thread_await_progress(&s->next_picture_ptr->f, mb_y, 0);
diff --git a/libavcodec/escape124.c b/libavcodec/escape124.c
index 283a5d644a..12569c1270 100644
--- a/libavcodec/escape124.c
+++ b/libavcodec/escape124.c
@@ -368,7 +368,7 @@ static int escape124_decode_frame(AVCodecContext *avctx,
AVCodec ff_escape124_decoder = {
.name = "escape124",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_ESCAPE124,
+ .id = AV_CODEC_ID_ESCAPE124,
.priv_data_size = sizeof(Escape124Context),
.init = escape124_decode_init,
.close = escape124_decode_close,
diff --git a/libavcodec/escape130.c b/libavcodec/escape130.c
index a590f89f41..47e7f11d6c 100644
--- a/libavcodec/escape130.c
+++ b/libavcodec/escape130.c
@@ -309,7 +309,7 @@ static int escape130_decode_frame(AVCodecContext *avctx,
AVCodec ff_escape130_decoder = {
.name = "escape130",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_ESCAPE130,
+ .id = AV_CODEC_ID_ESCAPE130,
.priv_data_size = sizeof(Escape130Context),
.init = escape130_decode_init,
.close = escape130_decode_close,
diff --git a/libavcodec/exr.c b/libavcodec/exr.c
index b5c68de8d4..8a6c8c7062 100644
--- a/libavcodec/exr.c
+++ b/libavcodec/exr.c
@@ -662,7 +662,7 @@ static av_cold int decode_end(AVCodecContext *avctx)
AVCodec ff_exr_decoder = {
.name = "exr",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_EXR,
+ .id = AV_CODEC_ID_EXR,
.priv_data_size = sizeof(EXRContext),
.init = decode_init,
.close = decode_end,
diff --git a/libavcodec/ffv1.c b/libavcodec/ffv1.c
index f00e2477ae..5547661776 100644
--- a/libavcodec/ffv1.c
+++ b/libavcodec/ffv1.c
@@ -2083,7 +2083,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
AVCodec ff_ffv1_decoder = {
.name = "ffv1",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_FFV1,
+ .id = AV_CODEC_ID_FFV1,
.priv_data_size = sizeof(FFV1Context),
.init = decode_init,
.close = common_end,
@@ -2117,7 +2117,7 @@ static const AVCodecDefault ffv1_defaults[] = {
AVCodec ff_ffv1_encoder = {
.name = "ffv1",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_FFV1,
+ .id = AV_CODEC_ID_FFV1,
.priv_data_size = sizeof(FFV1Context),
.init = encode_init,
.encode2 = encode_frame,
diff --git a/libavcodec/ffwavesynth.c b/libavcodec/ffwavesynth.c
index d18dd91452..c63b90ff29 100644
--- a/libavcodec/ffwavesynth.c
+++ b/libavcodec/ffwavesynth.c
@@ -472,7 +472,7 @@ static av_cold int wavesynth_close(AVCodecContext *avc)
AVCodec ff_ffwavesynth_decoder = {
.name = "wavesynth",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_FFWAVESYNTH,
+ .id = AV_CODEC_ID_FFWAVESYNTH,
.priv_data_size = sizeof(struct wavesynth_context),
.init = wavesynth_init,
.close = wavesynth_close,
diff --git a/libavcodec/flac_parser.c b/libavcodec/flac_parser.c
index 3d2b88262f..17b96e2c6b 100644
--- a/libavcodec/flac_parser.c
+++ b/libavcodec/flac_parser.c
@@ -675,7 +675,7 @@ static void flac_parse_close(AVCodecParserContext *c)
}
AVCodecParser ff_flac_parser = {
- .codec_ids = { CODEC_ID_FLAC },
+ .codec_ids = { AV_CODEC_ID_FLAC },
.priv_data_size = sizeof(FLACParseContext),
.parser_init = flac_parse_init,
.parser_parse = flac_parse,
diff --git a/libavcodec/flacdec.c b/libavcodec/flacdec.c
index ffcc253c0d..9563b7f9ca 100644
--- a/libavcodec/flacdec.c
+++ b/libavcodec/flacdec.c
@@ -559,7 +559,7 @@ static av_cold int flac_decode_close(AVCodecContext *avctx)
AVCodec ff_flac_decoder = {
.name = "flac",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_FLAC,
+ .id = AV_CODEC_ID_FLAC,
.priv_data_size = sizeof(FLACContext),
.init = flac_decode_init,
.close = flac_decode_close,
diff --git a/libavcodec/flacenc.c b/libavcodec/flacenc.c
index a54e857ad1..06213d086b 100644
--- a/libavcodec/flacenc.c
+++ b/libavcodec/flacenc.c
@@ -1325,7 +1325,7 @@ static const AVClass flac_encoder_class = {
AVCodec ff_flac_encoder = {
.name = "flac",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_FLAC,
+ .id = AV_CODEC_ID_FLAC,
.priv_data_size = sizeof(FlacEncodeContext),
.init = flac_encode_init,
.encode2 = flac_encode_frame,
diff --git a/libavcodec/flashsv.c b/libavcodec/flashsv.c
index 0e5543d09f..1d94efdb83 100644
--- a/libavcodec/flashsv.c
+++ b/libavcodec/flashsv.c
@@ -456,7 +456,7 @@ static av_cold int flashsv_decode_end(AVCodecContext *avctx)
AVCodec ff_flashsv_decoder = {
.name = "flashsv",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_FLASHSV,
+ .id = AV_CODEC_ID_FLASHSV,
.priv_data_size = sizeof(FlashSVContext),
.init = flashsv_decode_init,
.close = flashsv_decode_end,
@@ -519,7 +519,7 @@ static av_cold int flashsv2_decode_end(AVCodecContext *avctx)
AVCodec ff_flashsv2_decoder = {
.name = "flashsv2",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_FLASHSV2,
+ .id = AV_CODEC_ID_FLASHSV2,
.priv_data_size = sizeof(FlashSVContext),
.init = flashsv2_decode_init,
.close = flashsv2_decode_end,
diff --git a/libavcodec/flashsv2enc.c b/libavcodec/flashsv2enc.c
index 7502707966..d678aa7fb6 100644
--- a/libavcodec/flashsv2enc.c
+++ b/libavcodec/flashsv2enc.c
@@ -907,7 +907,7 @@ static av_cold int flashsv2_encode_end(AVCodecContext * avctx)
AVCodec ff_flashsv2_encoder = {
.name = "flashsv2",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_FLASHSV2,
+ .id = AV_CODEC_ID_FLASHSV2,
.priv_data_size = sizeof(FlashSV2Context),
.init = flashsv2_encode_init,
.encode2 = flashsv2_encode_frame,
diff --git a/libavcodec/flashsvenc.c b/libavcodec/flashsvenc.c
index 7c9746c77b..867c65e6f6 100644
--- a/libavcodec/flashsvenc.c
+++ b/libavcodec/flashsvenc.c
@@ -278,7 +278,7 @@ static av_cold int flashsv_encode_end(AVCodecContext *avctx)
AVCodec ff_flashsv_encoder = {
.name = "flashsv",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_FLASHSV,
+ .id = AV_CODEC_ID_FLASHSV,
.priv_data_size = sizeof(FlashSVContext),
.init = flashsv_encode_init,
.encode2 = flashsv_encode_frame,
diff --git a/libavcodec/flicvideo.c b/libavcodec/flicvideo.c
index 43774d5ded..81ae360f72 100644
--- a/libavcodec/flicvideo.c
+++ b/libavcodec/flicvideo.c
@@ -802,7 +802,7 @@ static av_cold int flic_decode_end(AVCodecContext *avctx)
AVCodec ff_flic_decoder = {
.name = "flic",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_FLIC,
+ .id = AV_CODEC_ID_FLIC,
.priv_data_size = sizeof(FlicDecodeContext),
.init = flic_decode_init,
.close = flic_decode_end,
diff --git a/libavcodec/flvdec.c b/libavcodec/flvdec.c
index ce7ae2c2c3..bc6ee9a6a7 100644
--- a/libavcodec/flvdec.c
+++ b/libavcodec/flvdec.c
@@ -121,7 +121,7 @@ int ff_flv_decode_picture_header(MpegEncContext *s)
AVCodec ff_flv_decoder = {
.name = "flv",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_FLV1,
+ .id = AV_CODEC_ID_FLV1,
.priv_data_size = sizeof(MpegEncContext),
.init = ff_h263_decode_init,
.close = ff_h263_decode_end,
diff --git a/libavcodec/flvenc.c b/libavcodec/flvenc.c
index 397ca86ee3..acd81b3676 100644
--- a/libavcodec/flvenc.c
+++ b/libavcodec/flvenc.c
@@ -89,7 +89,7 @@ FF_MPV_GENERIC_CLASS(flv)
AVCodec ff_flv_encoder = {
.name = "flv",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_FLV1,
+ .id = AV_CODEC_ID_FLV1,
.priv_data_size = sizeof(MpegEncContext),
.init = ff_MPV_encode_init,
.encode2 = ff_MPV_encode_picture,
diff --git a/libavcodec/fraps.c b/libavcodec/fraps.c
index 1cf4062a21..af4e3215e3 100644
--- a/libavcodec/fraps.c
+++ b/libavcodec/fraps.c
@@ -316,7 +316,7 @@ static av_cold int decode_end(AVCodecContext *avctx)
AVCodec ff_fraps_decoder = {
.name = "fraps",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_FRAPS,
+ .id = AV_CODEC_ID_FRAPS,
.priv_data_size = sizeof(FrapsContext),
.init = decode_init,
.close = decode_end,
diff --git a/libavcodec/frwu.c b/libavcodec/frwu.c
index 4c79713450..10b80f7a7d 100644
--- a/libavcodec/frwu.c
+++ b/libavcodec/frwu.c
@@ -115,7 +115,7 @@ static av_cold int decode_close(AVCodecContext *avctx)
AVCodec ff_frwu_decoder = {
.name = "frwu",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_FRWU,
+ .id = AV_CODEC_ID_FRWU,
.init = decode_init,
.close = decode_close,
.decode = decode_frame,
diff --git a/libavcodec/g722dec.c b/libavcodec/g722dec.c
index 72bb0ef3c7..0c08e074a9 100644
--- a/libavcodec/g722dec.c
+++ b/libavcodec/g722dec.c
@@ -144,7 +144,7 @@ static int g722_decode_frame(AVCodecContext *avctx, void *data,
AVCodec ff_adpcm_g722_decoder = {
.name = "g722",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_ADPCM_G722,
+ .id = AV_CODEC_ID_ADPCM_G722,
.priv_data_size = sizeof(G722Context),
.init = g722_decode_init,
.decode = g722_decode_frame,
diff --git a/libavcodec/g722enc.c b/libavcodec/g722enc.c
index 92643bb02a..da4d0a7a82 100644
--- a/libavcodec/g722enc.c
+++ b/libavcodec/g722enc.c
@@ -392,7 +392,7 @@ static int g722_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
AVCodec ff_adpcm_g722_encoder = {
.name = "g722",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_ADPCM_G722,
+ .id = AV_CODEC_ID_ADPCM_G722,
.priv_data_size = sizeof(G722Context),
.init = g722_encode_init,
.close = g722_encode_close,
diff --git a/libavcodec/g723_1.c b/libavcodec/g723_1.c
index 155dcc7399..2b59711ed1 100644
--- a/libavcodec/g723_1.c
+++ b/libavcodec/g723_1.c
@@ -1142,7 +1142,7 @@ static const AVClass g723_1dec_class = {
AVCodec ff_g723_1_decoder = {
.name = "g723_1",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_G723_1,
+ .id = AV_CODEC_ID_G723_1,
.priv_data_size = sizeof(G723_1_Context),
.init = g723_1_decode_init,
.decode = g723_1_decode_frame,
@@ -2277,7 +2277,7 @@ static int g723_1_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
AVCodec ff_g723_1_encoder = {
.name = "g723_1",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_G723_1,
+ .id = AV_CODEC_ID_G723_1,
.priv_data_size = sizeof(G723_1_Context),
.init = g723_1_encode_init,
.encode2 = g723_1_encode_frame,
diff --git a/libavcodec/g726.c b/libavcodec/g726.c
index b6bb88613c..a28da6ea7a 100644
--- a/libavcodec/g726.c
+++ b/libavcodec/g726.c
@@ -397,7 +397,7 @@ static const AVCodecDefault defaults[] = {
AVCodec ff_adpcm_g726_encoder = {
.name = "g726",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_ADPCM_G726,
+ .id = AV_CODEC_ID_ADPCM_G726,
.priv_data_size = sizeof(G726Context),
.init = g726_encode_init,
.encode2 = g726_encode_frame,
@@ -489,7 +489,7 @@ static void g726_decode_flush(AVCodecContext *avctx)
AVCodec ff_adpcm_g726_decoder = {
.name = "g726",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_ADPCM_G726,
+ .id = AV_CODEC_ID_ADPCM_G726,
.priv_data_size = sizeof(G726Context),
.init = g726_decode_init,
.decode = g726_decode_frame,
diff --git a/libavcodec/g729dec.c b/libavcodec/g729dec.c
index f394184d52..7c12b0eb39 100644
--- a/libavcodec/g729dec.c
+++ b/libavcodec/g729dec.c
@@ -717,7 +717,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr,
AVCodec ff_g729_decoder = {
.name = "g729",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_G729,
+ .id = AV_CODEC_ID_G729,
.priv_data_size = sizeof(G729Context),
.init = decoder_init,
.decode = decode_frame,
diff --git a/libavcodec/gif.c b/libavcodec/gif.c
index 5cb635df1f..85760026b6 100644
--- a/libavcodec/gif.c
+++ b/libavcodec/gif.c
@@ -199,7 +199,7 @@ static int gif_encode_close(AVCodecContext *avctx)
AVCodec ff_gif_encoder = {
.name = "gif",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_GIF,
+ .id = AV_CODEC_ID_GIF,
.priv_data_size = sizeof(GIFContext),
.init = gif_encode_init,
.encode2 = gif_encode_frame,
diff --git a/libavcodec/gifdec.c b/libavcodec/gifdec.c
index b95d5d1cdf..046ed19470 100644
--- a/libavcodec/gifdec.c
+++ b/libavcodec/gifdec.c
@@ -328,7 +328,7 @@ static av_cold int gif_decode_close(AVCodecContext *avctx)
AVCodec ff_gif_decoder = {
.name = "gif",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_GIF,
+ .id = AV_CODEC_ID_GIF,
.priv_data_size = sizeof(GifState),
.init = gif_decode_init,
.close = gif_decode_close,
diff --git a/libavcodec/gsm_parser.c b/libavcodec/gsm_parser.c
index 89afe80ef0..1d381fc109 100644
--- a/libavcodec/gsm_parser.c
+++ b/libavcodec/gsm_parser.c
@@ -45,11 +45,11 @@ static int gsm_parse(AVCodecParserContext *s1, AVCodecContext *avctx,
if (!s->block_size) {
switch (avctx->codec_id) {
- case CODEC_ID_GSM:
+ case AV_CODEC_ID_GSM:
s->block_size = GSM_BLOCK_SIZE;
s->duration = GSM_FRAME_SIZE;
break;
- case CODEC_ID_GSM_MS:
+ case AV_CODEC_ID_GSM_MS:
s->block_size = GSM_MS_BLOCK_SIZE;
s->duration = GSM_FRAME_SIZE * 2;
break;
@@ -82,7 +82,7 @@ static int gsm_parse(AVCodecParserContext *s1, AVCodecContext *avctx,
}
AVCodecParser ff_gsm_parser = {
- .codec_ids = { CODEC_ID_GSM, CODEC_ID_GSM_MS },
+ .codec_ids = { AV_CODEC_ID_GSM, AV_CODEC_ID_GSM_MS },
.priv_data_size = sizeof(GSMParseContext),
.parser_parse = gsm_parse,
.parser_close = ff_parse_close,
diff --git a/libavcodec/gsmdec.c b/libavcodec/gsmdec.c
index 1bf3f33913..fc042fbd7b 100644
--- a/libavcodec/gsmdec.c
+++ b/libavcodec/gsmdec.c
@@ -40,11 +40,11 @@ static av_cold int gsm_init(AVCodecContext *avctx)
avctx->sample_fmt = AV_SAMPLE_FMT_S16;
switch (avctx->codec_id) {
- case CODEC_ID_GSM:
+ case AV_CODEC_ID_GSM:
avctx->frame_size = GSM_FRAME_SIZE;
avctx->block_align = GSM_BLOCK_SIZE;
break;
- case CODEC_ID_GSM_MS:
+ case AV_CODEC_ID_GSM_MS:
avctx->frame_size = 2 * GSM_FRAME_SIZE;
avctx->block_align = GSM_MS_BLOCK_SIZE;
}
@@ -79,7 +79,7 @@ static int gsm_decode_frame(AVCodecContext *avctx, void *data,
samples = (int16_t *)s->frame.data[0];
switch (avctx->codec_id) {
- case CODEC_ID_GSM:
+ case AV_CODEC_ID_GSM:
init_get_bits(&gb, buf, buf_size * 8);
if (get_bits(&gb, 4) != 0xd)
av_log(avctx, AV_LOG_WARNING, "Missing GSM magic!\n");
@@ -87,7 +87,7 @@ static int gsm_decode_frame(AVCodecContext *avctx, void *data,
if (res < 0)
return res;
break;
- case CODEC_ID_GSM_MS:
+ case AV_CODEC_ID_GSM_MS:
res = ff_msgsm_decode_block(avctx, samples, buf);
if (res < 0)
return res;
@@ -109,7 +109,7 @@ static void gsm_flush(AVCodecContext *avctx)
AVCodec ff_gsm_decoder = {
.name = "gsm",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_GSM,
+ .id = AV_CODEC_ID_GSM,
.priv_data_size = sizeof(GSMContext),
.init = gsm_init,
.decode = gsm_decode_frame,
@@ -122,7 +122,7 @@ AVCodec ff_gsm_decoder = {
AVCodec ff_gsm_ms_decoder = {
.name = "gsm_ms",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_GSM_MS,
+ .id = AV_CODEC_ID_GSM_MS,
.priv_data_size = sizeof(GSMContext),
.init = gsm_init,
.decode = gsm_decode_frame,
diff --git a/libavcodec/h261_parser.c b/libavcodec/h261_parser.c
index 9eedeea03a..753687ade1 100644
--- a/libavcodec/h261_parser.c
+++ b/libavcodec/h261_parser.c
@@ -86,7 +86,7 @@ static int h261_parse(AVCodecParserContext *s,
}
AVCodecParser ff_h261_parser = {
- .codec_ids = { CODEC_ID_H261 },
+ .codec_ids = { AV_CODEC_ID_H261 },
.priv_data_size = sizeof(ParseContext),
.parser_parse = h261_parse,
.parser_close = ff_parse_close,
diff --git a/libavcodec/h261dec.c b/libavcodec/h261dec.c
index 031d77c144..6be02ae269 100644
--- a/libavcodec/h261dec.c
+++ b/libavcodec/h261dec.c
@@ -653,7 +653,7 @@ static av_cold int h261_decode_end(AVCodecContext *avctx)
AVCodec ff_h261_decoder = {
.name = "h261",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_H261,
+ .id = AV_CODEC_ID_H261,
.priv_data_size = sizeof(H261Context),
.init = h261_decode_init,
.close = h261_decode_end,
diff --git a/libavcodec/h261enc.c b/libavcodec/h261enc.c
index 8ebabe0560..a14da0d8fa 100644
--- a/libavcodec/h261enc.c
+++ b/libavcodec/h261enc.c
@@ -327,7 +327,7 @@ FF_MPV_GENERIC_CLASS(h261)
AVCodec ff_h261_encoder = {
.name = "h261",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_H261,
+ .id = AV_CODEC_ID_H261,
.priv_data_size = sizeof(H261Context),
.init = ff_MPV_encode_init,
.encode2 = ff_MPV_encode_picture,
diff --git a/libavcodec/h263_parser.c b/libavcodec/h263_parser.c
index 9a1ba39d11..2e7d4930c3 100644
--- a/libavcodec/h263_parser.c
+++ b/libavcodec/h263_parser.c
@@ -88,7 +88,7 @@ static int h263_parse(AVCodecParserContext *s,
}
AVCodecParser ff_h263_parser = {
- .codec_ids = { CODEC_ID_H263 },
+ .codec_ids = { AV_CODEC_ID_H263 },
.priv_data_size = sizeof(ParseContext),
.parser_parse = h263_parse,
.parser_close = ff_parse_close,
diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c
index b0b2baa8ed..3566c11414 100644
--- a/libavcodec/h263dec.c
+++ b/libavcodec/h263dec.c
@@ -65,44 +65,44 @@ av_cold int ff_h263_decode_init(AVCodecContext *avctx)
/* select sub codec */
switch(avctx->codec->id) {
- case CODEC_ID_H263:
- case CODEC_ID_H263P:
+ case AV_CODEC_ID_H263:
+ case AV_CODEC_ID_H263P:
s->unrestricted_mv= 0;
avctx->chroma_sample_location = AVCHROMA_LOC_CENTER;
break;
- case CODEC_ID_MPEG4:
+ case AV_CODEC_ID_MPEG4:
break;
- case CODEC_ID_MSMPEG4V1:
+ case AV_CODEC_ID_MSMPEG4V1:
s->h263_pred = 1;
s->msmpeg4_version=1;
break;
- case CODEC_ID_MSMPEG4V2:
+ case AV_CODEC_ID_MSMPEG4V2:
s->h263_pred = 1;
s->msmpeg4_version=2;
break;
- case CODEC_ID_MSMPEG4V3:
+ case AV_CODEC_ID_MSMPEG4V3:
s->h263_pred = 1;
s->msmpeg4_version=3;
break;
- case CODEC_ID_WMV1:
+ case AV_CODEC_ID_WMV1:
s->h263_pred = 1;
s->msmpeg4_version=4;
break;
- case CODEC_ID_WMV2:
+ case AV_CODEC_ID_WMV2:
s->h263_pred = 1;
s->msmpeg4_version=5;
break;
- case CODEC_ID_VC1:
- case CODEC_ID_WMV3:
- case CODEC_ID_VC1IMAGE:
- case CODEC_ID_WMV3IMAGE:
+ case AV_CODEC_ID_VC1:
+ case AV_CODEC_ID_WMV3:
+ case AV_CODEC_ID_VC1IMAGE:
+ case AV_CODEC_ID_WMV3IMAGE:
s->h263_pred = 1;
s->msmpeg4_version=6;
avctx->chroma_sample_location = AVCHROMA_LOC_LEFT;
break;
- case CODEC_ID_H263I:
+ case AV_CODEC_ID_H263I:
break;
- case CODEC_ID_FLV1:
+ case AV_CODEC_ID_FLV1:
s->h263_flv = 1;
break;
default:
@@ -112,7 +112,7 @@ av_cold int ff_h263_decode_init(AVCodecContext *avctx)
avctx->hwaccel= ff_find_hwaccel(avctx->codec->id, avctx->pix_fmt);
/* for h263, we allocate the images after having read the header */
- if (avctx->codec->id != CODEC_ID_H263 && avctx->codec->id != CODEC_ID_H263P && avctx->codec->id != CODEC_ID_MPEG4)
+ if (avctx->codec->id != AV_CODEC_ID_H263 && avctx->codec->id != AV_CODEC_ID_H263P && avctx->codec->id != AV_CODEC_ID_MPEG4)
if (ff_MPV_common_init(s) < 0)
return -1;
@@ -171,7 +171,7 @@ static int decode_slice(MpegEncContext *s){
if(s->partitioned_frame){
const int qscale= s->qscale;
- if(CONFIG_MPEG4_DECODER && s->codec_id==CODEC_ID_MPEG4){
+ if(CONFIG_MPEG4_DECODER && s->codec_id==AV_CODEC_ID_MPEG4){
if(ff_mpeg4_decode_partitions(s) < 0)
return -1;
}
@@ -263,7 +263,7 @@ static int decode_slice(MpegEncContext *s){
assert(s->mb_x==0 && s->mb_y==s->mb_height);
- if(s->codec_id==CODEC_ID_MPEG4
+ if(s->codec_id==AV_CODEC_ID_MPEG4
&& (s->workaround_bugs&FF_BUG_AUTODETECT)
&& get_bits_left(&s->gb) >= 48
&& show_bits(&s->gb, 24)==0x4010
@@ -271,7 +271,7 @@ static int decode_slice(MpegEncContext *s){
s->padding_bug_score+=32;
/* try to detect the padding bug */
- if( s->codec_id==CODEC_ID_MPEG4
+ if( s->codec_id==AV_CODEC_ID_MPEG4
&& (s->workaround_bugs&FF_BUG_AUTODETECT)
&& get_bits_left(&s->gb) >=0
&& get_bits_left(&s->gb) < 137
@@ -370,11 +370,11 @@ uint64_t time= rdtsc();
if(s->flags&CODEC_FLAG_TRUNCATED){
int next;
- if(CONFIG_MPEG4_DECODER && s->codec_id==CODEC_ID_MPEG4){
+ if(CONFIG_MPEG4_DECODER && s->codec_id==AV_CODEC_ID_MPEG4){
next= ff_mpeg4_find_frame_end(&s->parse_context, buf, buf_size);
- }else if(CONFIG_H263_DECODER && s->codec_id==CODEC_ID_H263){
+ }else if(CONFIG_H263_DECODER && s->codec_id==AV_CODEC_ID_H263){
next= ff_h263_find_frame_end(&s->parse_context, buf, buf_size);
- }else if(CONFIG_H263P_DECODER && s->codec_id==CODEC_ID_H263P){
+ }else if(CONFIG_H263P_DECODER && s->codec_id==AV_CODEC_ID_H263P){
next= ff_h263_find_frame_end(&s->parse_context, buf, buf_size);
}else{
av_log(s->avctx, AV_LOG_ERROR, "this codec does not support truncated bitstreams\n");
@@ -433,7 +433,7 @@ retry:
ret = ff_mpeg4_decode_picture_header(s, &gb);
}
ret = ff_mpeg4_decode_picture_header(s, &s->gb);
- } else if (CONFIG_H263I_DECODER && s->codec_id == CODEC_ID_H263I) {
+ } else if (CONFIG_H263I_DECODER && s->codec_id == AV_CODEC_ID_H263I) {
ret = ff_intel_h263_decode_picture_header(s);
} else if (CONFIG_FLV_DECODER && s->h263_flv) {
ret = ff_flv_decode_picture_header(s);
@@ -558,7 +558,7 @@ retry:
* Let us hope this at least works.
*/
if( s->resync_marker==0 && s->data_partitioning==0 && s->divx_version==-1
- && s->codec_id==CODEC_ID_MPEG4 && s->vo_type==0)
+ && s->codec_id==AV_CODEC_ID_MPEG4 && s->vo_type==0)
s->workaround_bugs|= FF_BUG_NO_PADDING;
if(s->lavc_build<4609U) //FIXME not sure about the version num but a 4609 file seems ok
@@ -588,7 +588,7 @@ retry:
s->divx_packed ? "p" : "");
#if HAVE_MMX
- if (s->codec_id == CODEC_ID_MPEG4 && s->xvid_build>=0 && avctx->idct_algo == FF_IDCT_AUTO && (av_get_cpu_flags() & AV_CPU_FLAG_MMX)) {
+ if (s->codec_id == AV_CODEC_ID_MPEG4 && s->xvid_build>=0 && avctx->idct_algo == FF_IDCT_AUTO && (av_get_cpu_flags() & AV_CPU_FLAG_MMX)) {
avctx->idct_algo= FF_IDCT_XVIDMMX;
ff_dct_common_init(s);
}
@@ -614,7 +614,7 @@ retry:
goto retry;
}
- if((s->codec_id==CODEC_ID_H263 || s->codec_id==CODEC_ID_H263P || s->codec_id == CODEC_ID_H263I))
+ if((s->codec_id==AV_CODEC_ID_H263 || s->codec_id==AV_CODEC_ID_H263P || s->codec_id == AV_CODEC_ID_H263I))
s->gob_index = ff_h263_get_gob_height(s);
// for skipping the frame
@@ -702,7 +702,7 @@ retry:
assert(s->bitstream_buffer_size==0);
frame_end:
/* divx 5.01+ bistream reorder stuff */
- if(s->codec_id==CODEC_ID_MPEG4 && s->divx_packed){
+ if(s->codec_id==AV_CODEC_ID_MPEG4 && s->divx_packed){
int current_pos= s->gb.buffer == s->bitstream_buffer ? 0 : (get_bits_count(&s->gb)>>3);
int startcode_found=0;
@@ -761,7 +761,7 @@ av_log(avctx, AV_LOG_DEBUG, "%"PRId64"\n", rdtsc()-time);
AVCodec ff_h263_decoder = {
.name = "h263",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_H263,
+ .id = AV_CODEC_ID_H263,
.priv_data_size = sizeof(MpegEncContext),
.init = ff_h263_decode_init,
.close = ff_h263_decode_end,
@@ -777,7 +777,7 @@ AVCodec ff_h263_decoder = {
AVCodec ff_h263p_decoder = {
.name = "h263p",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_H263P,
+ .id = AV_CODEC_ID_H263P,
.priv_data_size = sizeof(MpegEncContext),
.init = ff_h263_decode_init,
.close = ff_h263_decode_end,
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 54f23a124b..c07d10afa8 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -1095,7 +1095,7 @@ av_cold int ff_h264_decode_init(AVCodecContext *avctx)
h->prev_frame_num = -1;
h->x264_build = -1;
ff_h264_reset_sei(h);
- if (avctx->codec_id == CODEC_ID_H264) {
+ if (avctx->codec_id == AV_CODEC_ID_H264) {
if (avctx->ticks_per_frame == 1)
s->avctx->time_base.den *= 2;
avctx->ticks_per_frame = 2;
@@ -1324,7 +1324,7 @@ int ff_h264_frame_start(H264Context *h)
* SVQ3 as well as most other codecs have only last/next/current and thus
* get released even with set reference, besides SVQ3 and others do not
* mark frames as reference later "naturally". */
- if (s->codec_id != CODEC_ID_SVQ3)
+ if (s->codec_id != AV_CODEC_ID_SVQ3)
s->current_picture_ptr->f.reference = 0;
s->current_picture_ptr->field_poc[0] =
@@ -3519,7 +3519,7 @@ static int decode_slice(struct AVCodecContext *avctx, void *arg)
s->mb_skip_run = -1;
h->is_complex = FRAME_MBAFF || s->picture_structure != PICT_FRAME ||
- s->codec_id != CODEC_ID_H264 ||
+ s->codec_id != AV_CODEC_ID_H264 ||
(CONFIG_GRAY && (s->flags & CODEC_FLAG_GRAY));
if (h->pps.cabac) {
@@ -4206,7 +4206,7 @@ static const AVClass h264_vdpau_class = {
AVCodec ff_h264_decoder = {
.name = "h264",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_H264,
+ .id = AV_CODEC_ID_H264,
.priv_data_size = sizeof(H264Context),
.init = ff_h264_decode_init,
.close = h264_decode_end,
@@ -4226,7 +4226,7 @@ AVCodec ff_h264_decoder = {
AVCodec ff_h264_vdpau_decoder = {
.name = "h264_vdpau",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_H264,
+ .id = AV_CODEC_ID_H264,
.priv_data_size = sizeof(H264Context),
.init = ff_h264_decode_init,
.close = h264_decode_end,
diff --git a/libavcodec/h264_mb_template.c b/libavcodec/h264_mb_template.c
index d82562bac3..b02f5664c8 100644
--- a/libavcodec/h264_mb_template.c
+++ b/libavcodec/h264_mb_template.c
@@ -51,7 +51,7 @@ static av_noinline void FUNC(hl_decode_mb)(H264Context *h)
int *block_offset = &h->block_offset[0];
const int transform_bypass = !SIMPLE && (s->qscale == 0 && h->sps.transform_bypass);
/* is_h264 should always be true if SVQ3 is disabled. */
- const int is_h264 = !CONFIG_SVQ3_DECODER || SIMPLE || s->codec_id == CODEC_ID_H264;
+ const int is_h264 = !CONFIG_SVQ3_DECODER || SIMPLE || s->codec_id == AV_CODEC_ID_H264;
void (*idct_add)(uint8_t *dst, DCTELEM *block, int stride);
const int block_h = 16 >> s->chroma_y_shift;
const int chroma422 = CHROMA422;
diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c
index 6a7acdcb28..d042edcc7f 100644
--- a/libavcodec/h264_parser.c
+++ b/libavcodec/h264_parser.c
@@ -390,7 +390,7 @@ static int init(AVCodecParserContext *s)
}
AVCodecParser ff_h264_parser = {
- .codec_ids = { CODEC_ID_H264 },
+ .codec_ids = { AV_CODEC_ID_H264 },
.priv_data_size = sizeof(H264Context),
.parser_init = init,
.parser_parse = h264_parse,
diff --git a/libavcodec/h264pred.c b/libavcodec/h264pred.c
index a9d454aeaf..2d8b9a4b83 100644
--- a/libavcodec/h264pred.c
+++ b/libavcodec/h264pred.c
@@ -380,8 +380,8 @@ void ff_h264_pred_init(H264PredContext *h, int codec_id, const int bit_depth, co
#define FUNCD(a) a ## _c
#define H264_PRED(depth) \
- if(codec_id != CODEC_ID_RV40){\
- if(codec_id == CODEC_ID_VP8) {\
+ if(codec_id != AV_CODEC_ID_RV40){\
+ if(codec_id == AV_CODEC_ID_VP8) {\
h->pred4x4[VERT_PRED ]= FUNCD(pred4x4_vertical_vp8);\
h->pred4x4[HOR_PRED ]= FUNCD(pred4x4_horizontal_vp8);\
} else {\
@@ -389,19 +389,19 @@ void ff_h264_pred_init(H264PredContext *h, int codec_id, const int bit_depth, co
h->pred4x4[HOR_PRED ]= FUNCC(pred4x4_horizontal , depth);\
}\
h->pred4x4[DC_PRED ]= FUNCC(pred4x4_dc , depth);\
- if(codec_id == CODEC_ID_SVQ3)\
+ if(codec_id == AV_CODEC_ID_SVQ3)\
h->pred4x4[DIAG_DOWN_LEFT_PRED ]= FUNCD(pred4x4_down_left_svq3);\
else\
h->pred4x4[DIAG_DOWN_LEFT_PRED ]= FUNCC(pred4x4_down_left , depth);\
h->pred4x4[DIAG_DOWN_RIGHT_PRED]= FUNCC(pred4x4_down_right , depth);\
h->pred4x4[VERT_RIGHT_PRED ]= FUNCC(pred4x4_vertical_right , depth);\
h->pred4x4[HOR_DOWN_PRED ]= FUNCC(pred4x4_horizontal_down , depth);\
- if (codec_id == CODEC_ID_VP8) {\
+ if (codec_id == AV_CODEC_ID_VP8) {\
h->pred4x4[VERT_LEFT_PRED ]= FUNCD(pred4x4_vertical_left_vp8);\
} else\
h->pred4x4[VERT_LEFT_PRED ]= FUNCC(pred4x4_vertical_left , depth);\
h->pred4x4[HOR_UP_PRED ]= FUNCC(pred4x4_horizontal_up , depth);\
- if(codec_id != CODEC_ID_VP8) {\
+ if(codec_id != AV_CODEC_ID_VP8) {\
h->pred4x4[LEFT_DC_PRED ]= FUNCC(pred4x4_left_dc , depth);\
h->pred4x4[TOP_DC_PRED ]= FUNCC(pred4x4_top_dc , depth);\
h->pred4x4[DC_128_PRED ]= FUNCC(pred4x4_128_dc , depth);\
@@ -450,7 +450,7 @@ void ff_h264_pred_init(H264PredContext *h, int codec_id, const int bit_depth, co
h->pred8x8[VERT_PRED8x8 ]= FUNCC(pred8x16_vertical , depth);\
h->pred8x8[HOR_PRED8x8 ]= FUNCC(pred8x16_horizontal , depth);\
}\
- if (codec_id != CODEC_ID_VP8) {\
+ if (codec_id != AV_CODEC_ID_VP8) {\
if (chroma_format_idc == 1) {\
h->pred8x8[PLANE_PRED8x8]= FUNCC(pred8x8_plane , depth);\
} else {\
@@ -458,7 +458,7 @@ void ff_h264_pred_init(H264PredContext *h, int codec_id, const int bit_depth, co
}\
} else\
h->pred8x8[PLANE_PRED8x8]= FUNCD(pred8x8_tm_vp8);\
- if(codec_id != CODEC_ID_RV40 && codec_id != CODEC_ID_VP8){\
+ if(codec_id != AV_CODEC_ID_RV40 && codec_id != AV_CODEC_ID_VP8){\
if (chroma_format_idc == 1) {\
h->pred8x8[DC_PRED8x8 ]= FUNCC(pred8x8_dc , depth);\
h->pred8x8[LEFT_DC_PRED8x8]= FUNCC(pred8x8_left_dc , depth);\
@@ -480,7 +480,7 @@ void ff_h264_pred_init(H264PredContext *h, int codec_id, const int bit_depth, co
h->pred8x8[DC_PRED8x8 ]= FUNCD(pred8x8_dc_rv40);\
h->pred8x8[LEFT_DC_PRED8x8]= FUNCD(pred8x8_left_dc_rv40);\
h->pred8x8[TOP_DC_PRED8x8 ]= FUNCD(pred8x8_top_dc_rv40);\
- if (codec_id == CODEC_ID_VP8) {\
+ if (codec_id == AV_CODEC_ID_VP8) {\
h->pred8x8[DC_127_PRED8x8]= FUNCC(pred8x8_127_dc , depth);\
h->pred8x8[DC_129_PRED8x8]= FUNCC(pred8x8_129_dc , depth);\
}\
@@ -495,13 +495,13 @@ void ff_h264_pred_init(H264PredContext *h, int codec_id, const int bit_depth, co
h->pred16x16[VERT_PRED8x8 ]= FUNCC(pred16x16_vertical , depth);\
h->pred16x16[HOR_PRED8x8 ]= FUNCC(pred16x16_horizontal , depth);\
switch(codec_id){\
- case CODEC_ID_SVQ3:\
+ case AV_CODEC_ID_SVQ3:\
h->pred16x16[PLANE_PRED8x8 ]= FUNCD(pred16x16_plane_svq3);\
break;\
- case CODEC_ID_RV40:\
+ case AV_CODEC_ID_RV40:\
h->pred16x16[PLANE_PRED8x8 ]= FUNCD(pred16x16_plane_rv40);\
break;\
- case CODEC_ID_VP8:\
+ case AV_CODEC_ID_VP8:\
h->pred16x16[PLANE_PRED8x8 ]= FUNCD(pred16x16_tm_vp8);\
h->pred16x16[DC_127_PRED8x8]= FUNCC(pred16x16_127_dc , depth);\
h->pred16x16[DC_129_PRED8x8]= FUNCC(pred16x16_129_dc , depth);\
diff --git a/libavcodec/huffyuv.c b/libavcodec/huffyuv.c
index 4470f45c4e..da242a982b 100644
--- a/libavcodec/huffyuv.c
+++ b/libavcodec/huffyuv.c
@@ -649,7 +649,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
}
}else s->context= 0;
- if(avctx->codec->id==CODEC_ID_HUFFYUV){
+ if(avctx->codec->id==AV_CODEC_ID_HUFFYUV){
if(avctx->pix_fmt==PIX_FMT_YUV420P){
av_log(avctx, AV_LOG_ERROR, "Error: YV12 is not supported by huffyuv; use vcodec=ffvhuff or format=422p\n");
return -1;
@@ -1513,7 +1513,7 @@ static av_cold int encode_end(AVCodecContext *avctx)
AVCodec ff_huffyuv_decoder = {
.name = "huffyuv",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_HUFFYUV,
+ .id = AV_CODEC_ID_HUFFYUV,
.priv_data_size = sizeof(HYuvContext),
.init = decode_init,
.close = decode_end,
@@ -1529,7 +1529,7 @@ AVCodec ff_huffyuv_decoder = {
AVCodec ff_ffvhuff_decoder = {
.name = "ffvhuff",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_FFVHUFF,
+ .id = AV_CODEC_ID_FFVHUFF,
.priv_data_size = sizeof(HYuvContext),
.init = decode_init,
.close = decode_end,
@@ -1545,7 +1545,7 @@ AVCodec ff_ffvhuff_decoder = {
AVCodec ff_huffyuv_encoder = {
.name = "huffyuv",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_HUFFYUV,
+ .id = AV_CODEC_ID_HUFFYUV,
.priv_data_size = sizeof(HYuvContext),
.init = encode_init,
.encode2 = encode_frame,
@@ -1561,7 +1561,7 @@ AVCodec ff_huffyuv_encoder = {
AVCodec ff_ffvhuff_encoder = {
.name = "ffvhuff",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_FFVHUFF,
+ .id = AV_CODEC_ID_FFVHUFF,
.priv_data_size = sizeof(HYuvContext),
.init = encode_init,
.encode2 = encode_frame,
diff --git a/libavcodec/idcinvideo.c b/libavcodec/idcinvideo.c
index 6a8b2c756e..0decd0f731 100644
--- a/libavcodec/idcinvideo.c
+++ b/libavcodec/idcinvideo.c
@@ -257,7 +257,7 @@ static av_cold int idcin_decode_end(AVCodecContext *avctx)
AVCodec ff_idcin_decoder = {
.name = "idcinvideo",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_IDCIN,
+ .id = AV_CODEC_ID_IDCIN,
.priv_data_size = sizeof(IdcinContext),
.init = idcin_decode_init,
.close = idcin_decode_end,
diff --git a/libavcodec/iff.c b/libavcodec/iff.c
index a3241f6ea2..2c4ea8f8e6 100644
--- a/libavcodec/iff.c
+++ b/libavcodec/iff.c
@@ -692,7 +692,7 @@ static av_cold int decode_end(AVCodecContext *avctx)
AVCodec ff_iff_ilbm_decoder = {
.name = "iff_ilbm",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_IFF_ILBM,
+ .id = AV_CODEC_ID_IFF_ILBM,
.priv_data_size = sizeof(IffContext),
.init = decode_init,
.close = decode_end,
@@ -705,7 +705,7 @@ AVCodec ff_iff_ilbm_decoder = {
AVCodec ff_iff_byterun1_decoder = {
.name = "iff_byterun1",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_IFF_BYTERUN1,
+ .id = AV_CODEC_ID_IFF_BYTERUN1,
.priv_data_size = sizeof(IffContext),
.init = decode_init,
.close = decode_end,
diff --git a/libavcodec/imc.c b/libavcodec/imc.c
index 184c0c7263..76e23865d4 100644
--- a/libavcodec/imc.c
+++ b/libavcodec/imc.c
@@ -175,8 +175,8 @@ static av_cold int imc_decode_init(AVCodecContext *avctx)
IMCContext *q = avctx->priv_data;
double r1, r2;
- if ((avctx->codec_id == CODEC_ID_IMC && avctx->channels != 1)
- || (avctx->codec_id == CODEC_ID_IAC && avctx->channels > 2)) {
+ if ((avctx->codec_id == AV_CODEC_ID_IMC && avctx->channels != 1)
+ || (avctx->codec_id == AV_CODEC_ID_IAC && avctx->channels > 2)) {
av_log_ask_for_sample(avctx, "Number of channels is not supported\n");
return AVERROR_PATCHWELCOME;
}
@@ -227,7 +227,7 @@ static av_cold int imc_decode_init(AVCodecContext *avctx)
}
}
- if (avctx->codec_id == CODEC_ID_IAC) {
+ if (avctx->codec_id == AV_CODEC_ID_IAC) {
iac_generate_tabs(q, avctx->sample_rate);
} else {
memcpy(q->cyclTab, cyclTab, sizeof(cyclTab));
@@ -841,7 +841,7 @@ static int imc_decode_block(AVCodecContext *avctx, IMCContext *q, int ch)
}
}
}
- if (avctx->codec_id == CODEC_ID_IAC) {
+ if (avctx->codec_id == AV_CODEC_ID_IAC) {
bitscount += !!chctx->bandWidthT[BANDS - 1];
if (!(stream_format_code & 0x2))
bitscount += 16;
@@ -990,7 +990,7 @@ static av_cold int imc_decode_close(AVCodecContext * avctx)
AVCodec ff_imc_decoder = {
.name = "imc",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_IMC,
+ .id = AV_CODEC_ID_IMC,
.priv_data_size = sizeof(IMCContext),
.init = imc_decode_init,
.close = imc_decode_close,
@@ -1003,7 +1003,7 @@ AVCodec ff_imc_decoder = {
AVCodec ff_iac_decoder = {
.name = "iac",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_IAC,
+ .id = AV_CODEC_ID_IAC,
.priv_data_size = sizeof(IMCContext),
.init = imc_decode_init,
.close = imc_decode_close,
diff --git a/libavcodec/imx_dump_header_bsf.c b/libavcodec/imx_dump_header_bsf.c
index 8119809faa..9f276bc76e 100644
--- a/libavcodec/imx_dump_header_bsf.c
+++ b/libavcodec/imx_dump_header_bsf.c
@@ -37,7 +37,7 @@ static int imx_dump_header(AVBitStreamFilterContext *bsfc, AVCodecContext *avctx
static const uint8_t imx_header[16] = { 0x06,0x0e,0x2b,0x34,0x01,0x02,0x01,0x01,0x0d,0x01,0x03,0x01,0x05,0x01,0x01,0x00 };
uint8_t *poutbufp;
- if (avctx->codec_id != CODEC_ID_MPEG2VIDEO) {
+ if (avctx->codec_id != AV_CODEC_ID_MPEG2VIDEO) {
av_log(avctx, AV_LOG_ERROR, "imx bitstream filter only applies to mpeg2video codec\n");
return 0;
}
diff --git a/libavcodec/indeo2.c b/libavcodec/indeo2.c
index e8c0a7f07b..3f8ed42399 100644
--- a/libavcodec/indeo2.c
+++ b/libavcodec/indeo2.c
@@ -231,7 +231,7 @@ static av_cold int ir2_decode_end(AVCodecContext *avctx){
AVCodec ff_indeo2_decoder = {
.name = "indeo2",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_INDEO2,
+ .id = AV_CODEC_ID_INDEO2,
.priv_data_size = sizeof(Ir2Context),
.init = ir2_decode_init,
.close = ir2_decode_end,
diff --git a/libavcodec/indeo3.c b/libavcodec/indeo3.c
index 83eef6479b..dd9ab684fe 100644
--- a/libavcodec/indeo3.c
+++ b/libavcodec/indeo3.c
@@ -1124,7 +1124,7 @@ static av_cold int decode_close(AVCodecContext *avctx)
AVCodec ff_indeo3_decoder = {
.name = "indeo3",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_INDEO3,
+ .id = AV_CODEC_ID_INDEO3,
.priv_data_size = sizeof(Indeo3DecodeContext),
.init = decode_init,
.close = decode_close,
diff --git a/libavcodec/indeo4.c b/libavcodec/indeo4.c
index 117263b829..d1f62b774a 100644
--- a/libavcodec/indeo4.c
+++ b/libavcodec/indeo4.c
@@ -639,7 +639,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
AVCodec ff_indeo4_decoder = {
.name = "indeo4",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_INDEO4,
+ .id = AV_CODEC_ID_INDEO4,
.priv_data_size = sizeof(IVI45DecContext),
.init = decode_init,
.close = ff_ivi_decode_close,
diff --git a/libavcodec/indeo5.c b/libavcodec/indeo5.c
index e989690644..0ba6e486f9 100644
--- a/libavcodec/indeo5.c
+++ b/libavcodec/indeo5.c
@@ -666,7 +666,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
AVCodec ff_indeo5_decoder = {
.name = "indeo5",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_INDEO5,
+ .id = AV_CODEC_ID_INDEO5,
.priv_data_size = sizeof(IVI45DecContext),
.init = decode_init,
.close = ff_ivi_decode_close,
diff --git a/libavcodec/intelh263dec.c b/libavcodec/intelh263dec.c
index d7808fb339..ac2695e0f4 100644
--- a/libavcodec/intelh263dec.c
+++ b/libavcodec/intelh263dec.c
@@ -127,7 +127,7 @@ int ff_intel_h263_decode_picture_header(MpegEncContext *s)
AVCodec ff_h263i_decoder = {
.name = "h263i",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_H263I,
+ .id = AV_CODEC_ID_H263I,
.priv_data_size = sizeof(MpegEncContext),
.init = ff_h263_decode_init,
.close = ff_h263_decode_end,
diff --git a/libavcodec/internal.h b/libavcodec/internal.h
index 272aea9487..f0114dc200 100644
--- a/libavcodec/internal.h
+++ b/libavcodec/internal.h
@@ -109,7 +109,7 @@ int ff_is_hwaccel_pix_fmt(enum PixelFormat pix_fmt);
* @param pix_fmt the pixel format to match
* @return the hardware accelerated codec, or NULL if none was found.
*/
-AVHWAccel *ff_find_hwaccel(enum CodecID codec_id, enum PixelFormat pix_fmt);
+AVHWAccel *ff_find_hwaccel(enum AVCodecID codec_id, enum PixelFormat pix_fmt);
/**
* Return the index into tab at which {a,b} match elements {[0],[1]} of tab.
diff --git a/libavcodec/interplayvideo.c b/libavcodec/interplayvideo.c
index 76adad9156..3063b8e1c5 100644
--- a/libavcodec/interplayvideo.c
+++ b/libavcodec/interplayvideo.c
@@ -1021,7 +1021,7 @@ static av_cold int ipvideo_decode_end(AVCodecContext *avctx)
AVCodec ff_interplay_video_decoder = {
.name = "interplayvideo",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_INTERPLAY_VIDEO,
+ .id = AV_CODEC_ID_INTERPLAY_VIDEO,
.priv_data_size = sizeof(IpvideoContext),
.init = ipvideo_decode_init,
.close = ipvideo_decode_end,
diff --git a/libavcodec/ituh263dec.c b/libavcodec/ituh263dec.c
index 16e8e5165e..68dee70f6f 100644
--- a/libavcodec/ituh263dec.c
+++ b/libavcodec/ituh263dec.c
@@ -229,14 +229,14 @@ const uint8_t *ff_h263_find_resync_marker(const uint8_t *av_restrict p, const ui
int ff_h263_resync(MpegEncContext *s){
int left, pos, ret;
- if(s->codec_id==CODEC_ID_MPEG4){
+ if(s->codec_id==AV_CODEC_ID_MPEG4){
skip_bits1(&s->gb);
align_get_bits(&s->gb);
}
if(show_bits(&s->gb, 16)==0){
pos= get_bits_count(&s->gb);
- if(CONFIG_MPEG4_DECODER && s->codec_id==CODEC_ID_MPEG4)
+ if(CONFIG_MPEG4_DECODER && s->codec_id==AV_CODEC_ID_MPEG4)
ret= ff_mpeg4_decode_video_packet_header(s);
else
ret= h263_decode_gob_header(s);
@@ -253,7 +253,7 @@ int ff_h263_resync(MpegEncContext *s){
GetBitContext bak= s->gb;
pos= get_bits_count(&s->gb);
- if(CONFIG_MPEG4_DECODER && s->codec_id==CODEC_ID_MPEG4)
+ if(CONFIG_MPEG4_DECODER && s->codec_id==AV_CODEC_ID_MPEG4)
ret= ff_mpeg4_decode_video_packet_header(s);
else
ret= h263_decode_gob_header(s);
@@ -457,7 +457,7 @@ static int h263_decode_block(MpegEncContext * s, DCTELEM * block,
}
} else if (s->mb_intra) {
/* DC coef */
- if(s->codec_id == CODEC_ID_RV10){
+ if(s->codec_id == AV_CODEC_ID_RV10){
#if CONFIG_RV10_DECODER
if (s->rv10_version == 3 && s->pict_type == AV_PICTURE_TYPE_I) {
int component, diff;
@@ -516,7 +516,7 @@ retry:
run = get_bits(&s->gb, 6);
level = (int8_t)get_bits(&s->gb, 8);
if(level == -128){
- if (s->codec_id == CODEC_ID_RV10) {
+ if (s->codec_id == AV_CODEC_ID_RV10) {
/* XXX: should patch encoder too */
level = get_sbits(&s->gb, 12);
}else{
diff --git a/libavcodec/ituh263enc.c b/libavcodec/ituh263enc.c
index d75c9471d5..3eb198f2ce 100644
--- a/libavcodec/ituh263enc.c
+++ b/libavcodec/ituh263enc.c
@@ -285,7 +285,7 @@ void ff_clean_h263_qscales(MpegEncContext *s){
qscale_table[ s->mb_index2xy[i] ]= qscale_table[ s->mb_index2xy[i+1] ]+2;
}
- if(s->codec_id != CODEC_ID_H263P){
+ if(s->codec_id != AV_CODEC_ID_H263P){
for(i=1; i<s->mb_num; i++){
int mb_xy= s->mb_index2xy[i];
@@ -792,10 +792,10 @@ void ff_h263_encode_init(MpegEncContext *s)
// use fcodes >1 only for mpeg4 & h263 & h263p FIXME
switch(s->codec_id){
- case CODEC_ID_MPEG4:
+ case AV_CODEC_ID_MPEG4:
s->fcode_tab= fcode_tab;
break;
- case CODEC_ID_H263P:
+ case AV_CODEC_ID_H263P:
if(s->umvplus)
s->fcode_tab= umv_fcode_tab;
if(s->modified_quant){
@@ -807,7 +807,7 @@ void ff_h263_encode_init(MpegEncContext *s)
}
break;
//Note for mpeg4 & h263 the dc-scale table will be set per frame as needed later
- case CODEC_ID_FLV1:
+ case AV_CODEC_ID_FLV1:
if (s->h263_flv > 1) {
s->min_qcoeff= -1023;
s->max_qcoeff= 1023;
diff --git a/libavcodec/ivi_common.c b/libavcodec/ivi_common.c
index b84148cb7b..98e3e25b93 100644
--- a/libavcodec/ivi_common.c
+++ b/libavcodec/ivi_common.c
@@ -792,7 +792,7 @@ int ff_ivi_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
/* If the bidirectional mode is enabled, next I and the following P frame will */
/* be sent together. Unfortunately the approach below seems to be the only way */
/* to handle the B-frames mode. That's exactly the same Intel decoders do. */
- if (avctx->codec_id == CODEC_ID_INDEO4 && ctx->frame_type == 0/*FRAMETYPE_INTRA*/) {
+ if (avctx->codec_id == AV_CODEC_ID_INDEO4 && ctx->frame_type == 0/*FRAMETYPE_INTRA*/) {
while (get_bits(&ctx->gb, 8)); // skip version string
skip_bits_long(&ctx->gb, 64); // skip padding, TODO: implement correct 8-bytes alignment
if (get_bits_left(&ctx->gb) > 18 && show_bits(&ctx->gb, 18) == 0x3FFF8)
@@ -813,7 +813,7 @@ int ff_ivi_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
}
if (ctx->is_scalable) {
- if (avctx->codec_id == CODEC_ID_INDEO4)
+ if (avctx->codec_id == AV_CODEC_ID_INDEO4)
ff_ivi_recompose_haar(&ctx->planes[0], ctx->frame.data[0], ctx->frame.linesize[0], 4);
else
ff_ivi_recompose53 (&ctx->planes[0], ctx->frame.data[0], ctx->frame.linesize[0], 4);
@@ -846,7 +846,7 @@ av_cold int ff_ivi_decode_close(AVCodecContext *avctx)
avctx->release_buffer(avctx, &ctx->frame);
#if IVI4_STREAM_ANALYSER
- if (avctx->codec_id == CODEC_ID_INDEO4) {
+ if (avctx->codec_id == AV_CODEC_ID_INDEO4) {
if (ctx->is_scalable)
av_log(avctx, AV_LOG_ERROR, "This video uses scalability mode!\n");
if (ctx->uses_tiling)
diff --git a/libavcodec/j2kdec.c b/libavcodec/j2kdec.c
index 39e07c33c4..b3ba8fc0c9 100644
--- a/libavcodec/j2kdec.c
+++ b/libavcodec/j2kdec.c
@@ -1093,7 +1093,7 @@ static av_cold int decode_end(AVCodecContext *avctx)
AVCodec ff_jpeg2000_decoder = {
.name = "j2k",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_JPEG2000,
+ .id = AV_CODEC_ID_JPEG2000,
.priv_data_size = sizeof(J2kDecoderContext),
.init = j2kdec_init,
.close = decode_end,
diff --git a/libavcodec/j2kenc.c b/libavcodec/j2kenc.c
index cabd621789..6e4ae16032 100644
--- a/libavcodec/j2kenc.c
+++ b/libavcodec/j2kenc.c
@@ -1045,7 +1045,7 @@ static int j2kenc_destroy(AVCodecContext *avctx)
AVCodec ff_jpeg2000_encoder = {
.name = "j2k",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_JPEG2000,
+ .id = AV_CODEC_ID_JPEG2000,
.priv_data_size = sizeof(J2kEncoderContext),
.init = j2kenc_init,
.encode2 = encode_frame,
diff --git a/libavcodec/jacosubdec.c b/libavcodec/jacosubdec.c
index 90ce5df227..b64fac8a75 100644
--- a/libavcodec/jacosubdec.c
+++ b/libavcodec/jacosubdec.c
@@ -199,7 +199,7 @@ AVCodec ff_jacosub_decoder = {
.name = "jacosub",
.long_name = NULL_IF_CONFIG_SMALL("JACOsub subtitle"),
.type = AVMEDIA_TYPE_SUBTITLE,
- .id = CODEC_ID_JACOSUB,
+ .id = AV_CODEC_ID_JACOSUB,
.init = ff_ass_subtitle_header_default,
.decode = jacosub_decode_frame,
};
diff --git a/libavcodec/jpeglsdec.c b/libavcodec/jpeglsdec.c
index e0f6e88aa6..879922a0e0 100644
--- a/libavcodec/jpeglsdec.c
+++ b/libavcodec/jpeglsdec.c
@@ -369,7 +369,7 @@ int ff_jpegls_decode_picture(MJpegDecodeContext *s, int near, int point_transfor
AVCodec ff_jpegls_decoder = {
.name = "jpegls",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_JPEGLS,
+ .id = AV_CODEC_ID_JPEGLS,
.priv_data_size = sizeof(MJpegDecodeContext),
.init = ff_mjpeg_decode_init,
.close = ff_mjpeg_decode_end,
diff --git a/libavcodec/jpeglsenc.c b/libavcodec/jpeglsenc.c
index dc2ff03a62..938ce88a00 100644
--- a/libavcodec/jpeglsenc.c
+++ b/libavcodec/jpeglsenc.c
@@ -395,7 +395,7 @@ static av_cold int encode_init_ls(AVCodecContext *ctx) {
AVCodec ff_jpegls_encoder = {
.name = "jpegls",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_JPEGLS,
+ .id = AV_CODEC_ID_JPEGLS,
.priv_data_size = sizeof(JpeglsContext),
.init = encode_init_ls,
.encode2 = encode_picture_ls,
diff --git a/libavcodec/jvdec.c b/libavcodec/jvdec.c
index f2a874409c..81345f29ea 100644
--- a/libavcodec/jvdec.c
+++ b/libavcodec/jvdec.c
@@ -211,7 +211,7 @@ AVCodec ff_jv_decoder = {
.name = "jv",
.long_name = NULL_IF_CONFIG_SMALL("Bitmap Brothers JV video"),
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_JV,
+ .id = AV_CODEC_ID_JV,
.priv_data_size = sizeof(JvContext),
.init = decode_init,
.close = decode_close,
diff --git a/libavcodec/kgv1dec.c b/libavcodec/kgv1dec.c
index 47c3648398..5c7e1539df 100644
--- a/libavcodec/kgv1dec.c
+++ b/libavcodec/kgv1dec.c
@@ -183,7 +183,7 @@ static av_cold int decode_end(AVCodecContext *avctx)
AVCodec ff_kgv1_decoder = {
.name = "kgv1",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_KGV1,
+ .id = AV_CODEC_ID_KGV1,
.priv_data_size = sizeof(KgvContext),
.init = decode_init,
.close = decode_end,
diff --git a/libavcodec/kmvc.c b/libavcodec/kmvc.c
index a476fac7ac..cde410e5e1 100644
--- a/libavcodec/kmvc.c
+++ b/libavcodec/kmvc.c
@@ -440,7 +440,7 @@ static av_cold int decode_end(AVCodecContext * avctx)
AVCodec ff_kmvc_decoder = {
.name = "kmvc",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_KMVC,
+ .id = AV_CODEC_ID_KMVC,
.priv_data_size = sizeof(KmvcContext),
.init = decode_init,
.close = decode_end,
diff --git a/libavcodec/lagarith.c b/libavcodec/lagarith.c
index 7047e62e6c..9178f9294a 100644
--- a/libavcodec/lagarith.c
+++ b/libavcodec/lagarith.c
@@ -700,7 +700,7 @@ static av_cold int lag_decode_end(AVCodecContext *avctx)
AVCodec ff_lagarith_decoder = {
.name = "lagarith",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_LAGARITH,
+ .id = AV_CODEC_ID_LAGARITH,
.priv_data_size = sizeof(LagarithContext),
.init = lag_decode_init,
.close = lag_decode_end,
diff --git a/libavcodec/latm_parser.c b/libavcodec/latm_parser.c
index 92cb7031ec..3820f58d69 100644
--- a/libavcodec/latm_parser.c
+++ b/libavcodec/latm_parser.c
@@ -105,7 +105,7 @@ static int latm_parse(AVCodecParserContext *s1, AVCodecContext *avctx,
}
AVCodecParser ff_aac_latm_parser = {
- .codec_ids = { CODEC_ID_AAC_LATM },
+ .codec_ids = { AV_CODEC_ID_AAC_LATM },
.priv_data_size = sizeof(LATMParseContext),
.parser_parse = latm_parse,
.parser_close = ff_parse_close
diff --git a/libavcodec/lcldec.c b/libavcodec/lcldec.c
index 65feb1a104..f180373eae 100644
--- a/libavcodec/lcldec.c
+++ b/libavcodec/lcldec.c
@@ -195,7 +195,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
/* Decompress frame */
switch (avctx->codec_id) {
- case CODEC_ID_MSZH:
+ case AV_CODEC_ID_MSZH:
switch (c->compression) {
case COMP_MSZH:
if (c->flags & FLAG_MULTITHREAD) {
@@ -258,7 +258,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
}
break;
#if CONFIG_ZLIB_DECODER
- case CODEC_ID_ZLIB:
+ case AV_CODEC_ID_ZLIB:
/* Using the original dll with normal compression (-1) and RGB format
* gives a file with ZLIB fourcc, but frame is really uncompressed.
* To be sure that's true check also frame size */
@@ -296,7 +296,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
/* Apply PNG filter */
- if (avctx->codec_id == CODEC_ID_ZLIB && (c->flags & FLAG_PNGFILTER)) {
+ if (avctx->codec_id == AV_CODEC_ID_ZLIB && (c->flags & FLAG_PNGFILTER)) {
switch (c->imgtype) {
case IMGTYPE_YUV111:
case IMGTYPE_RGB24:
@@ -492,8 +492,8 @@ static av_cold int decode_init(AVCodecContext *avctx)
}
/* Check codec type */
- if ((avctx->codec_id == CODEC_ID_MSZH && avctx->extradata[7] != CODEC_MSZH) ||
- (avctx->codec_id == CODEC_ID_ZLIB && avctx->extradata[7] != CODEC_ZLIB)) {
+ if ((avctx->codec_id == AV_CODEC_ID_MSZH && avctx->extradata[7] != CODEC_MSZH) ||
+ (avctx->codec_id == AV_CODEC_ID_ZLIB && avctx->extradata[7] != CODEC_ZLIB)) {
av_log(avctx, AV_LOG_ERROR, "Codec id and codec type mismatch. This should not happen.\n");
}
@@ -543,7 +543,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
/* Detect compression method */
c->compression = (int8_t)avctx->extradata[5];
switch (avctx->codec_id) {
- case CODEC_ID_MSZH:
+ case AV_CODEC_ID_MSZH:
switch (c->compression) {
case COMP_MSZH:
av_log(avctx, AV_LOG_DEBUG, "Compression enabled.\n");
@@ -558,7 +558,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
}
break;
#if CONFIG_ZLIB_DECODER
- case CODEC_ID_ZLIB:
+ case AV_CODEC_ID_ZLIB:
switch (c->compression) {
case COMP_ZLIB_HISPEED:
av_log(avctx, AV_LOG_DEBUG, "High speed compression.\n");
@@ -597,14 +597,14 @@ static av_cold int decode_init(AVCodecContext *avctx)
av_log(avctx, AV_LOG_DEBUG, "Multithread encoder flag set.\n");
if (c->flags & FLAG_NULLFRAME)
av_log(avctx, AV_LOG_DEBUG, "Nullframe insertion flag set.\n");
- if (avctx->codec_id == CODEC_ID_ZLIB && (c->flags & FLAG_PNGFILTER))
+ if (avctx->codec_id == AV_CODEC_ID_ZLIB && (c->flags & FLAG_PNGFILTER))
av_log(avctx, AV_LOG_DEBUG, "PNG filter flag set.\n");
if (c->flags & FLAGMASK_UNUSED)
av_log(avctx, AV_LOG_ERROR, "Unknown flag set (%d).\n", c->flags);
/* If needed init zlib */
#if CONFIG_ZLIB_DECODER
- if (avctx->codec_id == CODEC_ID_ZLIB) {
+ if (avctx->codec_id == AV_CODEC_ID_ZLIB) {
int zret;
c->zstream.zalloc = Z_NULL;
c->zstream.zfree = Z_NULL;
@@ -634,7 +634,7 @@ static av_cold int decode_end(AVCodecContext *avctx)
if (c->pic.data[0])
avctx->release_buffer(avctx, &c->pic);
#if CONFIG_ZLIB_DECODER
- if (avctx->codec_id == CODEC_ID_ZLIB)
+ if (avctx->codec_id == AV_CODEC_ID_ZLIB)
inflateEnd(&c->zstream);
#endif
@@ -645,7 +645,7 @@ static av_cold int decode_end(AVCodecContext *avctx)
AVCodec ff_mszh_decoder = {
.name = "mszh",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_MSZH,
+ .id = AV_CODEC_ID_MSZH,
.priv_data_size = sizeof(LclDecContext),
.init = decode_init,
.close = decode_end,
@@ -659,7 +659,7 @@ AVCodec ff_mszh_decoder = {
AVCodec ff_zlib_decoder = {
.name = "zlib",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_ZLIB,
+ .id = AV_CODEC_ID_ZLIB,
.priv_data_size = sizeof(LclDecContext),
.init = decode_init,
.close = decode_end,
diff --git a/libavcodec/lclenc.c b/libavcodec/lclenc.c
index 25706f6897..56b88b5707 100644
--- a/libavcodec/lclenc.c
+++ b/libavcodec/lclenc.c
@@ -184,7 +184,7 @@ static av_cold int encode_end(AVCodecContext *avctx)
AVCodec ff_zlib_encoder = {
.name = "zlib",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_ZLIB,
+ .id = AV_CODEC_ID_ZLIB,
.priv_data_size = sizeof(LclEncContext),
.init = encode_init,
.encode2 = encode_frame,
diff --git a/libavcodec/libaacplus.c b/libavcodec/libaacplus.c
index 4384d4e2fb..7872fecf4a 100644
--- a/libavcodec/libaacplus.c
+++ b/libavcodec/libaacplus.c
@@ -132,7 +132,7 @@ static av_cold int aacPlus_encode_close(AVCodecContext *avctx)
AVCodec ff_libaacplus_encoder = {
.name = "libaacplus",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_AAC,
+ .id = AV_CODEC_ID_AAC,
.priv_data_size = sizeof(aacPlusAudioContext),
.init = aacPlus_encode_init,
.encode2 = aacPlus_encode_frame,
diff --git a/libavcodec/libcelt_dec.c b/libavcodec/libcelt_dec.c
index ffc608f234..18b7a5e92c 100644
--- a/libavcodec/libcelt_dec.c
+++ b/libavcodec/libcelt_dec.c
@@ -135,7 +135,7 @@ static int libcelt_dec_decode(AVCodecContext *c, void *frame,
AVCodec ff_libcelt_decoder = {
.name = "libcelt",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_CELT,
+ .id = AV_CODEC_ID_CELT,
.priv_data_size = sizeof(struct libcelt_context),
.init = libcelt_dec_init,
.close = libcelt_dec_close,
diff --git a/libavcodec/libfaac.c b/libavcodec/libfaac.c
index 77b0cca00e..69d362190b 100644
--- a/libavcodec/libfaac.c
+++ b/libavcodec/libfaac.c
@@ -237,7 +237,7 @@ static const uint64_t faac_channel_layouts[] = {
AVCodec ff_libfaac_encoder = {
.name = "libfaac",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_AAC,
+ .id = AV_CODEC_ID_AAC,
.priv_data_size = sizeof(FaacAudioContext),
.init = Faac_encode_init,
.encode2 = Faac_encode_frame,
diff --git a/libavcodec/libfdk-aacenc.c b/libavcodec/libfdk-aacenc.c
index cb42b5b0cf..4219dbf700 100644
--- a/libavcodec/libfdk-aacenc.c
+++ b/libavcodec/libfdk-aacenc.c
@@ -393,7 +393,7 @@ static const uint64_t aac_channel_layout[] = {
AVCodec ff_libfdk_aac_encoder = {
.name = "libfdk_aac",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_AAC,
+ .id = AV_CODEC_ID_AAC,
.priv_data_size = sizeof(AACContext),
.init = aac_encode_init,
.encode2 = aac_encode_frame,
diff --git a/libavcodec/libgsm.c b/libavcodec/libgsm.c
index b2ed15be68..9c8635a910 100644
--- a/libavcodec/libgsm.c
+++ b/libavcodec/libgsm.c
@@ -69,11 +69,11 @@ static av_cold int libgsm_encode_init(AVCodecContext *avctx) {
goto error;
switch(avctx->codec_id) {
- case CODEC_ID_GSM:
+ case AV_CODEC_ID_GSM:
avctx->frame_size = GSM_FRAME_SIZE;
avctx->block_align = GSM_BLOCK_SIZE;
break;
- case CODEC_ID_GSM_MS: {
+ case AV_CODEC_ID_GSM_MS: {
int one = 1;
gsm_option(avctx->priv_data, GSM_OPT_WAV49, &one);
avctx->frame_size = 2*GSM_FRAME_SIZE;
@@ -104,10 +104,10 @@ static int libgsm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
return ret;
switch(avctx->codec_id) {
- case CODEC_ID_GSM:
+ case AV_CODEC_ID_GSM:
gsm_encode(state, samples, avpkt->data);
break;
- case CODEC_ID_GSM_MS:
+ case AV_CODEC_ID_GSM_MS:
gsm_encode(state, samples, avpkt->data);
gsm_encode(state, samples + GSM_FRAME_SIZE, avpkt->data + 32);
}
@@ -121,7 +121,7 @@ static int libgsm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
AVCodec ff_libgsm_encoder = {
.name = "libgsm",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_GSM,
+ .id = AV_CODEC_ID_GSM,
.init = libgsm_encode_init,
.encode2 = libgsm_encode_frame,
.close = libgsm_encode_close,
@@ -134,7 +134,7 @@ AVCodec ff_libgsm_encoder = {
AVCodec ff_libgsm_ms_encoder = {
.name = "libgsm_ms",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_GSM_MS,
+ .id = AV_CODEC_ID_GSM_MS,
.init = libgsm_encode_init,
.encode2 = libgsm_encode_frame,
.close = libgsm_encode_close,
@@ -169,11 +169,11 @@ static av_cold int libgsm_decode_init(AVCodecContext *avctx) {
s->state = gsm_create();
switch(avctx->codec_id) {
- case CODEC_ID_GSM:
+ case AV_CODEC_ID_GSM:
avctx->frame_size = GSM_FRAME_SIZE;
avctx->block_align = GSM_BLOCK_SIZE;
break;
- case CODEC_ID_GSM_MS: {
+ case AV_CODEC_ID_GSM_MS: {
int one = 1;
gsm_option(s->state, GSM_OPT_WAV49, &one);
avctx->frame_size = 2 * GSM_FRAME_SIZE;
@@ -236,7 +236,7 @@ static void libgsm_flush(AVCodecContext *avctx) {
gsm_destroy(s->state);
s->state = gsm_create();
- if (avctx->codec_id == CODEC_ID_GSM_MS)
+ if (avctx->codec_id == AV_CODEC_ID_GSM_MS)
gsm_option(s->state, GSM_OPT_WAV49, &one);
}
@@ -244,7 +244,7 @@ static void libgsm_flush(AVCodecContext *avctx) {
AVCodec ff_libgsm_decoder = {
.name = "libgsm",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_GSM,
+ .id = AV_CODEC_ID_GSM,
.priv_data_size = sizeof(LibGSMDecodeContext),
.init = libgsm_decode_init,
.close = libgsm_decode_close,
@@ -258,7 +258,7 @@ AVCodec ff_libgsm_decoder = {
AVCodec ff_libgsm_ms_decoder = {
.name = "libgsm_ms",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_GSM_MS,
+ .id = AV_CODEC_ID_GSM_MS,
.priv_data_size = sizeof(LibGSMDecodeContext),
.init = libgsm_decode_init,
.close = libgsm_decode_close,
diff --git a/libavcodec/libilbc.c b/libavcodec/libilbc.c
index 384dcb9c8f..80f1ac5688 100644
--- a/libavcodec/libilbc.c
+++ b/libavcodec/libilbc.c
@@ -109,7 +109,7 @@ static int ilbc_decode_frame(AVCodecContext *avctx, void *data,
AVCodec ff_libilbc_decoder = {
.name = "libilbc",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_ILBC,
+ .id = AV_CODEC_ID_ILBC,
.priv_data_size = sizeof(ILBCDecContext),
.init = ilbc_decode_init,
.decode = ilbc_decode_frame,
@@ -202,7 +202,7 @@ static const AVCodecDefault ilbc_encode_defaults[] = {
AVCodec ff_libilbc_encoder = {
.name = "libilbc",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_ILBC,
+ .id = AV_CODEC_ID_ILBC,
.priv_data_size = sizeof(ILBCEncContext),
.init = ilbc_encode_init,
.encode2 = ilbc_encode_frame,
diff --git a/libavcodec/libmp3lame.c b/libavcodec/libmp3lame.c
index 5019287560..6c159e235e 100644
--- a/libavcodec/libmp3lame.c
+++ b/libavcodec/libmp3lame.c
@@ -292,7 +292,7 @@ static const int libmp3lame_sample_rates[] = {
AVCodec ff_libmp3lame_encoder = {
.name = "libmp3lame",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_MP3,
+ .id = AV_CODEC_ID_MP3,
.priv_data_size = sizeof(LAMEContext),
.init = mp3lame_encode_init,
.encode2 = mp3lame_encode_frame,
diff --git a/libavcodec/libopencore-amr.c b/libavcodec/libopencore-amr.c
index fc00841936..cf325d03ae 100644
--- a/libavcodec/libopencore-amr.c
+++ b/libavcodec/libopencore-amr.c
@@ -27,7 +27,7 @@
static void amr_decode_fix_avctx(AVCodecContext *avctx)
{
- const int is_amr_wb = 1 + (avctx->codec_id == CODEC_ID_AMR_WB);
+ const int is_amr_wb = 1 + (avctx->codec_id == AV_CODEC_ID_AMR_WB);
if (!avctx->sample_rate)
avctx->sample_rate = 8000 * is_amr_wb;
@@ -174,7 +174,7 @@ static int amr_nb_decode_frame(AVCodecContext *avctx, void *data,
AVCodec ff_libopencore_amrnb_decoder = {
.name = "libopencore_amrnb",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_AMR_NB,
+ .id = AV_CODEC_ID_AMR_NB,
.priv_data_size = sizeof(AMRContext),
.init = amr_nb_decode_init,
.close = amr_nb_decode_close,
@@ -289,7 +289,7 @@ static int amr_nb_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
AVCodec ff_libopencore_amrnb_encoder = {
.name = "libopencore_amrnb",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_AMR_NB,
+ .id = AV_CODEC_ID_AMR_NB,
.priv_data_size = sizeof(AMRContext),
.init = amr_nb_encode_init,
.encode2 = amr_nb_encode_frame,
@@ -378,7 +378,7 @@ static int amr_wb_decode_close(AVCodecContext *avctx)
AVCodec ff_libopencore_amrwb_decoder = {
.name = "libopencore_amrwb",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_AMR_WB,
+ .id = AV_CODEC_ID_AMR_WB,
.priv_data_size = sizeof(AMRWBContext),
.init = amr_wb_decode_init,
.close = amr_wb_decode_close,
diff --git a/libavcodec/libopenjpegdec.c b/libavcodec/libopenjpegdec.c
index a74686353b..911ef6c973 100644
--- a/libavcodec/libopenjpegdec.c
+++ b/libavcodec/libopenjpegdec.c
@@ -409,7 +409,7 @@ static const AVClass class = {
AVCodec ff_libopenjpeg_decoder = {
.name = "libopenjpeg",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_JPEG2000,
+ .id = AV_CODEC_ID_JPEG2000,
.priv_data_size = sizeof(LibOpenJPEGContext),
.init = libopenjpeg_decode_init,
.close = libopenjpeg_decode_close,
diff --git a/libavcodec/libopenjpegenc.c b/libavcodec/libopenjpegenc.c
index d47d382797..0388fc5131 100644
--- a/libavcodec/libopenjpegenc.c
+++ b/libavcodec/libopenjpegenc.c
@@ -472,7 +472,7 @@ static const AVClass class = {
AVCodec ff_libopenjpeg_encoder = {
.name = "libopenjpeg",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_JPEG2000,
+ .id = AV_CODEC_ID_JPEG2000,
.priv_data_size = sizeof(LibOpenJPEGContext),
.init = libopenjpeg_encode_init,
.encode2 = libopenjpeg_encode_frame,
diff --git a/libavcodec/libopus_dec.c b/libavcodec/libopus_dec.c
index 01e8c00c85..a5c6b41385 100644
--- a/libavcodec/libopus_dec.c
+++ b/libavcodec/libopus_dec.c
@@ -210,7 +210,7 @@ static void libopus_dec_flush(AVCodecContext *avc)
AVCodec ff_libopus_decoder = {
.name = "libopus",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_OPUS,
+ .id = AV_CODEC_ID_OPUS,
.priv_data_size = sizeof(struct libopus_context),
.init = libopus_dec_init,
.close = libopus_dec_close,
diff --git a/libavcodec/libschroedingerdec.c b/libavcodec/libschroedingerdec.c
index 5aa9c95062..f0536b9d4d 100644
--- a/libavcodec/libschroedingerdec.c
+++ b/libavcodec/libschroedingerdec.c
@@ -381,7 +381,7 @@ static void libschroedinger_flush(AVCodecContext *avccontext)
AVCodec ff_libschroedinger_decoder = {
.name = "libschroedinger",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_DIRAC,
+ .id = AV_CODEC_ID_DIRAC,
.priv_data_size = sizeof(SchroDecoderParams),
.init = libschroedinger_decode_init,
.close = libschroedinger_decode_close,
diff --git a/libavcodec/libschroedingerenc.c b/libavcodec/libschroedingerenc.c
index 7ae3888680..447661c3e4 100644
--- a/libavcodec/libschroedingerenc.c
+++ b/libavcodec/libschroedingerenc.c
@@ -437,7 +437,7 @@ static int libschroedinger_encode_close(AVCodecContext *avccontext)
AVCodec ff_libschroedinger_encoder = {
.name = "libschroedinger",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_DIRAC,
+ .id = AV_CODEC_ID_DIRAC,
.priv_data_size = sizeof(SchroEncoderParams),
.init = libschroedinger_encode_init,
.encode2 = libschroedinger_encode_frame,
diff --git a/libavcodec/libspeexdec.c b/libavcodec/libspeexdec.c
index 9940f24fdc..2140377841 100644
--- a/libavcodec/libspeexdec.c
+++ b/libavcodec/libspeexdec.c
@@ -161,7 +161,7 @@ static av_cold void libspeex_decode_flush(AVCodecContext *avctx)
AVCodec ff_libspeex_decoder = {
.name = "libspeex",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_SPEEX,
+ .id = AV_CODEC_ID_SPEEX,
.priv_data_size = sizeof(LibSpeexContext),
.init = libspeex_decode_init,
.close = libspeex_decode_close,
diff --git a/libavcodec/libspeexenc.c b/libavcodec/libspeexenc.c
index 898625c855..fd08b4d3c6 100644
--- a/libavcodec/libspeexenc.c
+++ b/libavcodec/libspeexenc.c
@@ -326,7 +326,7 @@ static const AVCodecDefault defaults[] = {
AVCodec ff_libspeex_encoder = {
.name = "libspeex",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_SPEEX,
+ .id = AV_CODEC_ID_SPEEX,
.priv_data_size = sizeof(LibSpeexEncContext),
.init = encode_init,
.encode2 = encode_frame,
diff --git a/libavcodec/libstagefright.cpp b/libavcodec/libstagefright.cpp
index 6b9c245809..cdea8e41e7 100644
--- a/libavcodec/libstagefright.cpp
+++ b/libavcodec/libstagefright.cpp
@@ -574,7 +574,7 @@ AVCodec ff_libstagefright_h264_decoder = {
"libstagefright_h264",
NULL_IF_CONFIG_SMALL("libstagefright H.264"),
AVMEDIA_TYPE_VIDEO,
- CODEC_ID_H264,
+ AV_CODEC_ID_H264,
CODEC_CAP_DELAY,
NULL, //supported_framerates
NULL, //pix_fmts
diff --git a/libavcodec/libtheoraenc.c b/libavcodec/libtheoraenc.c
index 45712d48c2..13a4d3516b 100644
--- a/libavcodec/libtheoraenc.c
+++ b/libavcodec/libtheoraenc.c
@@ -361,7 +361,7 @@ static av_cold int encode_close(AVCodecContext* avc_context)
AVCodec ff_libtheora_encoder = {
.name = "libtheora",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_THEORA,
+ .id = AV_CODEC_ID_THEORA,
.priv_data_size = sizeof(TheoraContext),
.init = encode_init,
.close = encode_close,
diff --git a/libavcodec/libtwolame.c b/libavcodec/libtwolame.c
index 72344510fa..7cdd72ee11 100644
--- a/libavcodec/libtwolame.c
+++ b/libavcodec/libtwolame.c
@@ -176,7 +176,7 @@ static const AVClass libtwolame_class = {
AVCodec ff_libtwolame_encoder = {
.name = "libtwolame",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_MP3,
+ .id = AV_CODEC_ID_MP3,
.priv_data_size = sizeof(TWOLAMEContext),
.init = twolame_encode_init,
.encode2 = twolame_encode_frame,
diff --git a/libavcodec/libutvideodec.cpp b/libavcodec/libutvideodec.cpp
index 443a77ea9d..4f5b91f02e 100644
--- a/libavcodec/libutvideodec.cpp
+++ b/libavcodec/libutvideodec.cpp
@@ -175,7 +175,7 @@ AVCodec ff_libutvideo_decoder = {
"libutvideo",
NULL_IF_CONFIG_SMALL("Ut Video"),
AVMEDIA_TYPE_VIDEO,
- CODEC_ID_UTVIDEO,
+ AV_CODEC_ID_UTVIDEO,
0, //capabilities
NULL, //supported_framerates
NULL, //pix_fmts
diff --git a/libavcodec/libutvideoenc.cpp b/libavcodec/libutvideoenc.cpp
index 9ddd0c1962..989339a279 100644
--- a/libavcodec/libutvideoenc.cpp
+++ b/libavcodec/libutvideoenc.cpp
@@ -211,7 +211,7 @@ AVCodec ff_libutvideo_encoder = {
"libutvideo",
NULL_IF_CONFIG_SMALL("Ut Video"),
AVMEDIA_TYPE_VIDEO,
- CODEC_ID_UTVIDEO,
+ AV_CODEC_ID_UTVIDEO,
CODEC_CAP_AUTO_THREADS | CODEC_CAP_LOSSLESS,
NULL, /* supported_framerates */
(const enum PixelFormat[]) {
diff --git a/libavcodec/libvo-aacenc.c b/libavcodec/libvo-aacenc.c
index cdd606813b..3b7aca7386 100644
--- a/libavcodec/libvo-aacenc.c
+++ b/libavcodec/libvo-aacenc.c
@@ -188,7 +188,7 @@ static int aac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
AVCodec ff_libvo_aacenc_encoder = {
.name = "libvo_aacenc",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_AAC,
+ .id = AV_CODEC_ID_AAC,
.priv_data_size = sizeof(AACContext),
.init = aac_encode_init,
.encode2 = aac_encode_frame,
diff --git a/libavcodec/libvo-amrwbenc.c b/libavcodec/libvo-amrwbenc.c
index c1026869c5..a2f0288536 100644
--- a/libavcodec/libvo-amrwbenc.c
+++ b/libavcodec/libvo-amrwbenc.c
@@ -141,7 +141,7 @@ static int amr_wb_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
AVCodec ff_libvo_amrwbenc_encoder = {
.name = "libvo_amrwbenc",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_AMR_WB,
+ .id = AV_CODEC_ID_AMR_WB,
.priv_data_size = sizeof(AMRWBContext),
.init = amr_wb_encode_init,
.encode2 = amr_wb_encode_frame,
diff --git a/libavcodec/libvorbisdec.c b/libavcodec/libvorbisdec.c
index b9e5fe1232..e86c668eb9 100644
--- a/libavcodec/libvorbisdec.c
+++ b/libavcodec/libvorbisdec.c
@@ -190,7 +190,7 @@ static int oggvorbis_decode_close(AVCodecContext *avccontext) {
AVCodec ff_libvorbis_decoder = {
.name = "libvorbis",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_VORBIS,
+ .id = AV_CODEC_ID_VORBIS,
.priv_data_size = sizeof(OggVorbisDecContext),
.init = oggvorbis_decode_init,
.decode = oggvorbis_decode_frame,
diff --git a/libavcodec/libvorbisenc.c b/libavcodec/libvorbisenc.c
index a1fb72839b..76a912d439 100644
--- a/libavcodec/libvorbisenc.c
+++ b/libavcodec/libvorbisenc.c
@@ -375,7 +375,7 @@ static int oggvorbis_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
AVCodec ff_libvorbis_encoder = {
.name = "libvorbis",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_VORBIS,
+ .id = AV_CODEC_ID_VORBIS,
.priv_data_size = sizeof(OggVorbisEncContext),
.init = oggvorbis_encode_init,
.encode2 = oggvorbis_encode_frame,
diff --git a/libavcodec/libvpxdec.c b/libavcodec/libvpxdec.c
index 84e5ac8e65..fcacd77fd0 100644
--- a/libavcodec/libvpxdec.c
+++ b/libavcodec/libvpxdec.c
@@ -114,7 +114,7 @@ static av_cold int vp8_free(AVCodecContext *avctx)
AVCodec ff_libvpx_decoder = {
.name = "libvpx",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_VP8,
+ .id = AV_CODEC_ID_VP8,
.priv_data_size = sizeof(VP8Context),
.init = vp8_init,
.close = vp8_free,
diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c
index ade7f41b1f..756a543b9d 100644
--- a/libavcodec/libvpxenc.c
+++ b/libavcodec/libvpxenc.c
@@ -602,7 +602,7 @@ static const AVCodecDefault defaults[] = {
AVCodec ff_libvpx_encoder = {
.name = "libvpx",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_VP8,
+ .id = AV_CODEC_ID_VP8,
.priv_data_size = sizeof(VP8Context),
.init = vp8_init,
.encode2 = vp8_encode,
diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index 84e4935146..d5af74dfa8 100644
--- a/libavcodec/libx264.c
+++ b/libavcodec/libx264.c
@@ -654,7 +654,7 @@ static const AVCodecDefault x264_defaults[] = {
AVCodec ff_libx264_encoder = {
.name = "libx264",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_H264,
+ .id = AV_CODEC_ID_H264,
.priv_data_size = sizeof(X264Context),
.init = X264_init,
.encode2 = X264_frame,
@@ -669,7 +669,7 @@ AVCodec ff_libx264_encoder = {
AVCodec ff_libx264rgb_encoder = {
.name = "libx264rgb",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_H264,
+ .id = AV_CODEC_ID_H264,
.priv_data_size = sizeof(X264Context),
.init = X264_init,
.encode2 = X264_frame,
diff --git a/libavcodec/libxavs.c b/libavcodec/libxavs.c
index 1d1deac340..2efd8e44cc 100644
--- a/libavcodec/libxavs.c
+++ b/libavcodec/libxavs.c
@@ -417,7 +417,7 @@ static const AVCodecDefault xavs_defaults[] = {
AVCodec ff_libxavs_encoder = {
.name = "libxavs",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_CAVS,
+ .id = AV_CODEC_ID_CAVS,
.priv_data_size = sizeof(XavsContext),
.init = XAVS_init,
.encode2 = XAVS_frame,
diff --git a/libavcodec/libxvid.c b/libavcodec/libxvid.c
index 4b4f7824b1..a76dfc187d 100644
--- a/libavcodec/libxvid.c
+++ b/libavcodec/libxvid.c
@@ -594,7 +594,7 @@ static av_cold int xvid_encode_init(AVCodecContext *avctx) {
if( xvid_flags & CODEC_FLAG_GLOBAL_HEADER ) {
/* In this case, we are claiming to be MPEG4 */
x->quicktime_format = 1;
- avctx->codec_id = CODEC_ID_MPEG4;
+ avctx->codec_id = AV_CODEC_ID_MPEG4;
} else {
/* We are claiming to be Xvid */
x->quicktime_format = 0;
@@ -778,7 +778,7 @@ static av_cold int xvid_encode_close(AVCodecContext *avctx) {
AVCodec ff_libxvid_encoder = {
.name = "libxvid",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_MPEG4,
+ .id = AV_CODEC_ID_MPEG4,
.priv_data_size = sizeof(struct xvid_context),
.init = xvid_encode_init,
.encode2 = xvid_encode_frame,
diff --git a/libavcodec/ljpegenc.c b/libavcodec/ljpegenc.c
index 5e64acbc9a..aa6abe9888 100644
--- a/libavcodec/ljpegenc.c
+++ b/libavcodec/ljpegenc.c
@@ -214,7 +214,7 @@ static int encode_picture_lossless(AVCodecContext *avctx, AVPacket *pkt,
AVCodec ff_ljpeg_encoder = { //FIXME avoid MPV_* lossless JPEG should not need them
.name = "ljpeg",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_LJPEG,
+ .id = AV_CODEC_ID_LJPEG,
.priv_data_size = sizeof(MpegEncContext),
.init = ff_MPV_encode_init,
.encode2 = encode_picture_lossless,
diff --git a/libavcodec/loco.c b/libavcodec/loco.c
index b4f8ad4424..3b22b66859 100644
--- a/libavcodec/loco.c
+++ b/libavcodec/loco.c
@@ -298,7 +298,7 @@ static av_cold int decode_end(AVCodecContext *avctx){
AVCodec ff_loco_decoder = {
.name = "loco",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_LOCO,
+ .id = AV_CODEC_ID_LOCO,
.priv_data_size = sizeof(LOCOContext),
.init = decode_init,
.close = decode_end,
diff --git a/libavcodec/mace.c b/libavcodec/mace.c
index dd721d24b5..8ebb6bf19d 100644
--- a/libavcodec/mace.c
+++ b/libavcodec/mace.c
@@ -249,7 +249,7 @@ static int mace_decode_frame(AVCodecContext *avctx, void *data,
int16_t *samples;
MACEContext *ctx = avctx->priv_data;
int i, j, k, l, ret;
- int is_mace3 = (avctx->codec_id == CODEC_ID_MACE3);
+ int is_mace3 = (avctx->codec_id == AV_CODEC_ID_MACE3);
/* get output buffer */
ctx->frame.nb_samples = 3 * (buf_size << (1 - is_mace3)) / avctx->channels;
@@ -292,7 +292,7 @@ static int mace_decode_frame(AVCodecContext *avctx, void *data,
AVCodec ff_mace3_decoder = {
.name = "mace3",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_MACE3,
+ .id = AV_CODEC_ID_MACE3,
.priv_data_size = sizeof(MACEContext),
.init = mace_decode_init,
.decode = mace_decode_frame,
@@ -303,7 +303,7 @@ AVCodec ff_mace3_decoder = {
AVCodec ff_mace6_decoder = {
.name = "mace6",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_MACE6,
+ .id = AV_CODEC_ID_MACE6,
.priv_data_size = sizeof(MACEContext),
.init = mace_decode_init,
.decode = mace_decode_frame,
diff --git a/libavcodec/mdec.c b/libavcodec/mdec.c
index 69715b1e9e..4d9ee4d552 100644
--- a/libavcodec/mdec.c
+++ b/libavcodec/mdec.c
@@ -269,7 +269,7 @@ static av_cold int decode_end(AVCodecContext *avctx){
AVCodec ff_mdec_decoder = {
.name = "mdec",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_MDEC,
+ .id = AV_CODEC_ID_MDEC,
.priv_data_size = sizeof(MDECContext),
.init = decode_init,
.close = decode_end,
diff --git a/libavcodec/microdvddec.c b/libavcodec/microdvddec.c
index 27645cccb1..e08cc312c0 100644
--- a/libavcodec/microdvddec.c
+++ b/libavcodec/microdvddec.c
@@ -363,7 +363,7 @@ AVCodec ff_microdvd_decoder = {
.name = "microdvd",
.long_name = NULL_IF_CONFIG_SMALL("MicroDVD subtitle"),
.type = AVMEDIA_TYPE_SUBTITLE,
- .id = CODEC_ID_MICRODVD,
+ .id = AV_CODEC_ID_MICRODVD,
.init = microdvd_init,
.decode = microdvd_decode_frame,
};
diff --git a/libavcodec/mimic.c b/libavcodec/mimic.c
index 942b81be20..93d0bbcb5e 100644
--- a/libavcodec/mimic.c
+++ b/libavcodec/mimic.c
@@ -422,7 +422,7 @@ static av_cold int mimic_decode_end(AVCodecContext *avctx)
AVCodec ff_mimic_decoder = {
.name = "mimic",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_MIMIC,
+ .id = AV_CODEC_ID_MIMIC,
.priv_data_size = sizeof(MimicContext),
.init = mimic_decode_init,
.close = mimic_decode_end,
diff --git a/libavcodec/mjpeg_parser.c b/libavcodec/mjpeg_parser.c
index 40841c3b37..e548b00f40 100644
--- a/libavcodec/mjpeg_parser.c
+++ b/libavcodec/mjpeg_parser.c
@@ -127,7 +127,7 @@ static int jpeg_parse(AVCodecParserContext *s,
AVCodecParser ff_mjpeg_parser = {
- .codec_ids = { CODEC_ID_MJPEG },
+ .codec_ids = { AV_CODEC_ID_MJPEG },
.priv_data_size = sizeof(MJPEGParserContext),
.parser_parse = jpeg_parse,
.parser_close = ff_parse_close,
diff --git a/libavcodec/mjpega_dump_header_bsf.c b/libavcodec/mjpega_dump_header_bsf.c
index 2e86fd4ef3..9de6ac3f8a 100644
--- a/libavcodec/mjpega_dump_header_bsf.c
+++ b/libavcodec/mjpega_dump_header_bsf.c
@@ -38,7 +38,7 @@ static int mjpega_dump_header(AVBitStreamFilterContext *bsfc, AVCodecContext *av
unsigned dqt = 0, dht = 0, sof0 = 0;
int i;
- if (avctx->codec_id != CODEC_ID_MJPEG) {
+ if (avctx->codec_id != AV_CODEC_ID_MJPEG) {
av_log(avctx, AV_LOG_ERROR, "mjpega bitstream filter only applies to mjpeg codec\n");
return 0;
}
diff --git a/libavcodec/mjpegbdec.c b/libavcodec/mjpegbdec.c
index c457b98081..77f23f237f 100644
--- a/libavcodec/mjpegbdec.c
+++ b/libavcodec/mjpegbdec.c
@@ -155,7 +155,7 @@ read_header:
AVCodec ff_mjpegb_decoder = {
.name = "mjpegb",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_MJPEGB,
+ .id = AV_CODEC_ID_MJPEGB,
.priv_data_size = sizeof(MJpegDecodeContext),
.init = ff_mjpeg_decode_init,
.close = ff_mjpeg_decode_end,
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 9aa6113b1f..37e5fd6b23 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -112,7 +112,7 @@ av_cold int ff_mjpeg_decode_init(AVCodecContext *avctx)
s->interlace_polarity = 1; /* bottom field first */
av_log(avctx, AV_LOG_DEBUG, "bottom field first\n");
}
- if (avctx->codec->id == CODEC_ID_AMV)
+ if (avctx->codec->id == AV_CODEC_ID_AMV)
s->flipped = 1;
return 0;
@@ -1064,7 +1064,7 @@ static int mjpeg_decode_scan(MJpegDecodeContext *s, int nb_components, int Ah,
if (s->restart_interval) {
s->restart_count--;
- if(s->restart_count == 0 && s->avctx->codec_id == CODEC_ID_THP){
+ if(s->restart_count == 0 && s->avctx->codec_id == AV_CODEC_ID_THP){
align_get_bits(&s->gb);
for (i = 0; i < nb_components; i++) /* reset dc */
s->last_dc[i] = 1024;
@@ -1509,7 +1509,7 @@ int ff_mjpeg_find_marker(MJpegDecodeContext *s,
uint8_t x = *(src++);
*(dst++) = x;
- if (s->avctx->codec_id != CODEC_ID_THP) {
+ if (s->avctx->codec_id != AV_CODEC_ID_THP) {
if (x == 0xff) {
while (src < buf_end && x == 0xff)
x = *(src++);
@@ -1820,7 +1820,7 @@ static const AVClass mjpegdec_class = {
AVCodec ff_mjpeg_decoder = {
.name = "mjpeg",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_MJPEG,
+ .id = AV_CODEC_ID_MJPEG,
.priv_data_size = sizeof(MJpegDecodeContext),
.init = ff_mjpeg_decode_init,
.close = ff_mjpeg_decode_end,
@@ -1835,7 +1835,7 @@ AVCodec ff_mjpeg_decoder = {
AVCodec ff_thp_decoder = {
.name = "thp",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_THP,
+ .id = AV_CODEC_ID_THP,
.priv_data_size = sizeof(MJpegDecodeContext),
.init = ff_mjpeg_decode_init,
.close = ff_mjpeg_decode_end,
diff --git a/libavcodec/mjpegenc.c b/libavcodec/mjpegenc.c
index 385a361f24..0ff2e63b4e 100644
--- a/libavcodec/mjpegenc.c
+++ b/libavcodec/mjpegenc.c
@@ -204,21 +204,21 @@ static void jpeg_put_comments(MpegEncContext *s)
void ff_mjpeg_encode_picture_header(MpegEncContext *s)
{
- const int lossless= s->avctx->codec_id != CODEC_ID_MJPEG;
+ const int lossless= s->avctx->codec_id != AV_CODEC_ID_MJPEG;
int i;
put_marker(&s->pb, SOI);
// hack for AMV mjpeg format
- if(s->avctx->codec_id == CODEC_ID_AMV) goto end;
+ if(s->avctx->codec_id == AV_CODEC_ID_AMV) goto end;
jpeg_put_comments(s);
jpeg_table_header(s);
switch(s->avctx->codec_id){
- case CODEC_ID_MJPEG: put_marker(&s->pb, SOF0 ); break;
- case CODEC_ID_LJPEG: put_marker(&s->pb, SOF3 ); break;
+ case AV_CODEC_ID_MJPEG: put_marker(&s->pb, SOF0 ); break;
+ case AV_CODEC_ID_LJPEG: put_marker(&s->pb, SOF3 ); break;
default: av_assert0(0);
}
@@ -282,8 +282,8 @@ void ff_mjpeg_encode_picture_header(MpegEncContext *s)
put_bits(&s->pb, 8, lossless ? s->avctx->prediction_method+1 : 0); /* Ss (not used) */
switch(s->avctx->codec_id){
- case CODEC_ID_MJPEG: put_bits(&s->pb, 8, 63); break; /* Se (not used) */
- case CODEC_ID_LJPEG: put_bits(&s->pb, 8, 0); break; /* not used */
+ case AV_CODEC_ID_MJPEG: put_bits(&s->pb, 8, 63); break; /* Se (not used) */
+ case AV_CODEC_ID_LJPEG: put_bits(&s->pb, 8, 0); break; /* not used */
default: av_assert0(0);
}
@@ -499,7 +499,7 @@ static int amv_encode_picture(AVCodecContext *avctx, AVPacket *pkt,
AVCodec ff_mjpeg_encoder = {
.name = "mjpeg",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_MJPEG,
+ .id = AV_CODEC_ID_MJPEG,
.priv_data_size = sizeof(MpegEncContext),
.init = ff_MPV_encode_init,
.encode2 = ff_MPV_encode_picture,
@@ -515,7 +515,7 @@ AVCodec ff_mjpeg_encoder = {
AVCodec ff_amv_encoder = {
.name = "amv",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_AMV,
+ .id = AV_CODEC_ID_AMV,
.priv_data_size = sizeof(MpegEncContext),
.init = ff_MPV_encode_init,
.encode2 = amv_encode_picture,
diff --git a/libavcodec/mlp_parser.c b/libavcodec/mlp_parser.c
index 184f926854..7d1d5dac84 100644
--- a/libavcodec/mlp_parser.c
+++ b/libavcodec/mlp_parser.c
@@ -349,7 +349,7 @@ lost_sync:
}
AVCodecParser ff_mlp_parser = {
- .codec_ids = { CODEC_ID_MLP, CODEC_ID_TRUEHD },
+ .codec_ids = { AV_CODEC_ID_MLP, AV_CODEC_ID_TRUEHD },
.priv_data_size = sizeof(MLPParseContext),
.parser_init = mlp_init,
.parser_parse = mlp_parse,
diff --git a/libavcodec/mlpdec.c b/libavcodec/mlpdec.c
index 24a6d8deb4..423872cede 100644
--- a/libavcodec/mlpdec.c
+++ b/libavcodec/mlpdec.c
@@ -297,7 +297,7 @@ static int read_major_sync(MLPDecodeContext *m, GetBitContext *gb)
if (mh.num_substreams == 0)
return AVERROR_INVALIDDATA;
- if (m->avctx->codec_id == CODEC_ID_MLP && mh.num_substreams > 2) {
+ if (m->avctx->codec_id == AV_CODEC_ID_MLP && mh.num_substreams > 2) {
av_log(m->avctx, AV_LOG_ERROR, "MLP only supports up to 2 substreams.\n");
return AVERROR_INVALIDDATA;
}
@@ -363,7 +363,7 @@ static int read_restart_header(MLPDecodeContext *m, GetBitContext *gbp,
uint8_t checksum;
uint8_t lossless_check;
int start_count = get_bits_count(gbp);
- const int max_matrix_channel = m->avctx->codec_id == CODEC_ID_MLP
+ const int max_matrix_channel = m->avctx->codec_id == AV_CODEC_ID_MLP
? MAX_MATRIX_CHANNEL_MLP
: MAX_MATRIX_CHANNEL_TRUEHD;
int max_channel, min_channel, matrix_channel;
@@ -378,7 +378,7 @@ static int read_restart_header(MLPDecodeContext *m, GetBitContext *gbp,
s->noise_type = get_bits1(gbp);
- if (m->avctx->codec_id == CODEC_ID_MLP && s->noise_type) {
+ if (m->avctx->codec_id == AV_CODEC_ID_MLP && s->noise_type) {
av_log(m->avctx, AV_LOG_ERROR, "MLP must have 0x31ea sync word.\n");
return AVERROR_INVALIDDATA;
}
@@ -462,7 +462,7 @@ static int read_restart_header(MLPDecodeContext *m, GetBitContext *gbp,
s->ch_assign[ch_assign] = ch;
}
- if (m->avctx->codec_id == CODEC_ID_MLP && m->needs_reordering) {
+ if (m->avctx->codec_id == AV_CODEC_ID_MLP && m->needs_reordering) {
if (m->avctx->channel_layout == (AV_CH_LAYOUT_QUAD|AV_CH_LOW_FREQUENCY) ||
m->avctx->channel_layout == AV_CH_LAYOUT_5POINT0_BACK) {
int i = s->ch_assign[4];
@@ -474,12 +474,12 @@ static int read_restart_header(MLPDecodeContext *m, GetBitContext *gbp,
FFSWAP(int, s->ch_assign[3], s->ch_assign[5]);
}
}
- if (m->avctx->codec_id == CODEC_ID_TRUEHD &&
+ if (m->avctx->codec_id == AV_CODEC_ID_TRUEHD &&
(m->avctx->channel_layout == AV_CH_LAYOUT_7POINT1 ||
m->avctx->channel_layout == AV_CH_LAYOUT_7POINT1_WIDE)) {
FFSWAP(int, s->ch_assign[4], s->ch_assign[6]);
FFSWAP(int, s->ch_assign[5], s->ch_assign[7]);
- } else if (m->avctx->codec_id == CODEC_ID_TRUEHD &&
+ } else if (m->avctx->codec_id == AV_CODEC_ID_TRUEHD &&
(m->avctx->channel_layout == AV_CH_LAYOUT_6POINT1 ||
m->avctx->channel_layout == (AV_CH_LAYOUT_6POINT1 | AV_CH_TOP_CENTER) ||
m->avctx->channel_layout == (AV_CH_LAYOUT_6POINT1 | AV_CH_TOP_FRONT_CENTER))) {
@@ -604,7 +604,7 @@ static int read_matrix_params(MLPDecodeContext *m, unsigned int substr, GetBitCo
{
SubStream *s = &m->substream[substr];
unsigned int mat, ch;
- const int max_primitive_matrices = m->avctx->codec_id == CODEC_ID_MLP
+ const int max_primitive_matrices = m->avctx->codec_id == AV_CODEC_ID_MLP
? MAX_MATRICES_MLP
: MAX_MATRICES_TRUEHD;
@@ -1059,7 +1059,7 @@ static int read_access_unit(AVCodecContext *avctx, void* data,
substr_header_size += 2;
if (extraword_present) {
- if (m->avctx->codec_id == CODEC_ID_MLP) {
+ if (m->avctx->codec_id == AV_CODEC_ID_MLP) {
av_log(m->avctx, AV_LOG_ERROR, "There must be no extraword for MLP.\n");
goto error;
}
@@ -1148,9 +1148,9 @@ static int read_access_unit(AVCodecContext *avctx, void* data,
return AVERROR_INVALIDDATA;
shorten_by = get_bits(&gb, 16);
- if (m->avctx->codec_id == CODEC_ID_TRUEHD && shorten_by & 0x2000)
+ if (m->avctx->codec_id == AV_CODEC_ID_TRUEHD && shorten_by & 0x2000)
s->blockpos -= FFMIN(shorten_by & 0x1FFF, s->blockpos);
- else if (m->avctx->codec_id == CODEC_ID_MLP && shorten_by != 0xD234)
+ else if (m->avctx->codec_id == AV_CODEC_ID_MLP && shorten_by != 0xD234)
return AVERROR_INVALIDDATA;
if (substr == m->max_decoded_substream)
@@ -1203,7 +1203,7 @@ error:
AVCodec ff_mlp_decoder = {
.name = "mlp",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_MLP,
+ .id = AV_CODEC_ID_MLP,
.priv_data_size = sizeof(MLPDecodeContext),
.init = mlp_decode_init,
.decode = read_access_unit,
@@ -1215,7 +1215,7 @@ AVCodec ff_mlp_decoder = {
AVCodec ff_truehd_decoder = {
.name = "truehd",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_TRUEHD,
+ .id = AV_CODEC_ID_TRUEHD,
.priv_data_size = sizeof(MLPDecodeContext),
.init = mlp_decode_init,
.decode = read_access_unit,
diff --git a/libavcodec/mmvideo.c b/libavcodec/mmvideo.c
index c79099471b..3fc8f9f598 100644
--- a/libavcodec/mmvideo.c
+++ b/libavcodec/mmvideo.c
@@ -229,7 +229,7 @@ static av_cold int mm_decode_end(AVCodecContext *avctx)
AVCodec ff_mmvideo_decoder = {
.name = "mmvideo",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_MMVIDEO,
+ .id = AV_CODEC_ID_MMVIDEO,
.priv_data_size = sizeof(MmContext),
.init = mm_decode_init,
.close = mm_decode_end,
diff --git a/libavcodec/motion_est.c b/libavcodec/motion_est.c
index 2708a1e467..2d0b602ece 100644
--- a/libavcodec/motion_est.c
+++ b/libavcodec/motion_est.c
@@ -305,7 +305,7 @@ int ff_init_me(MpegEncContext *s){
return -1;
}
//special case of snow is needed because snow uses its own iterative ME code
- if(s->me_method!=ME_ZERO && s->me_method!=ME_EPZS && s->me_method!=ME_X1 && s->avctx->codec_id != CODEC_ID_SNOW){
+ if(s->me_method!=ME_ZERO && s->me_method!=ME_EPZS && s->me_method!=ME_X1 && s->avctx->codec_id != AV_CODEC_ID_SNOW){
av_log(s->avctx, AV_LOG_ERROR, "me_method is only allowed to be set to zero and epzs; for hex,umh,full and others see dia_size\n");
return -1;
}
@@ -356,7 +356,7 @@ int ff_init_me(MpegEncContext *s){
/* 8x8 fullpel search would need a 4x4 chroma compare, which we do
* not have yet, and even if we had, the motion estimation code
* does not expect it. */
- if(s->codec_id != CODEC_ID_SNOW){
+ if(s->codec_id != AV_CODEC_ID_SNOW){
if((c->avctx->me_cmp&FF_CMP_CHROMA)/* && !s->dsp.me_cmp[2]*/){
s->dsp.me_cmp[2]= zero_cmp;
}
@@ -367,7 +367,7 @@ int ff_init_me(MpegEncContext *s){
c->hpel_put[2][2]= c->hpel_put[2][3]= zero_hpel;
}
- if(s->codec_id == CODEC_ID_H261){
+ if(s->codec_id == AV_CODEC_ID_H261){
c->sub_motion_search= no_sub_motion_search;
}
@@ -1675,7 +1675,7 @@ void ff_estimate_b_frame_motion(MpegEncContext * s,
c->skip=0;
- if (s->codec_id == CODEC_ID_MPEG4 && s->next_picture.f.mbskip_table[xy]) {
+ if (s->codec_id == AV_CODEC_ID_MPEG4 && s->next_picture.f.mbskip_table[xy]) {
int score= direct_search(s, mb_x, mb_y); //FIXME just check 0,0
score= ((unsigned)(score*score + 128*256))>>16;
@@ -1737,7 +1737,7 @@ void ff_estimate_b_frame_motion(MpegEncContext * s,
}
}
- if (s->codec_id == CODEC_ID_MPEG4)
+ if (s->codec_id == AV_CODEC_ID_MPEG4)
dmin= direct_search(s, mb_x, mb_y);
else
dmin= INT_MAX;
@@ -1808,7 +1808,7 @@ void ff_estimate_b_frame_motion(MpegEncContext * s,
}
//FIXME something smarter
if(dmin>256*256*16) type&= ~CANDIDATE_MB_TYPE_DIRECT; //do not try direct mode if it is invalid for this MB
- if(s->codec_id == CODEC_ID_MPEG4 && type&CANDIDATE_MB_TYPE_DIRECT && s->flags&CODEC_FLAG_MV0 && *(uint32_t*)s->b_direct_mv_table[xy])
+ if(s->codec_id == AV_CODEC_ID_MPEG4 && type&CANDIDATE_MB_TYPE_DIRECT && s->flags&CODEC_FLAG_MV0 && *(uint32_t*)s->b_direct_mv_table[xy])
type |= CANDIDATE_MB_TYPE_DIRECT0;
}
@@ -1827,7 +1827,7 @@ int ff_get_best_fcode(MpegEncContext * s, int16_t (*mv_table)[2], int type)
if(s->msmpeg4_version)
range= FFMIN(range, 16);
- else if(s->codec_id == CODEC_ID_MPEG2VIDEO && s->avctx->strict_std_compliance >= FF_COMPLIANCE_NORMAL)
+ else if(s->codec_id == AV_CODEC_ID_MPEG2VIDEO && s->avctx->strict_std_compliance >= FF_COMPLIANCE_NORMAL)
range= FFMIN(range, 256);
for(i=0; i<8; i++) score[i]= s->mb_num*(8-i);
@@ -1885,7 +1885,7 @@ void ff_fix_long_p_mvs(MpegEncContext * s)
range = (((s->out_format == FMT_MPEG1 || s->msmpeg4_version) ? 8 : 16) << f_code);
assert(range <= 16 || !s->msmpeg4_version);
- assert(range <=256 || !(s->codec_id == CODEC_ID_MPEG2VIDEO && s->avctx->strict_std_compliance >= FF_COMPLIANCE_NORMAL));
+ assert(range <=256 || !(s->codec_id == AV_CODEC_ID_MPEG2VIDEO && s->avctx->strict_std_compliance >= FF_COMPLIANCE_NORMAL));
if(c->avctx->me_range && range > c->avctx->me_range) range= c->avctx->me_range;
diff --git a/libavcodec/motionpixels.c b/libavcodec/motionpixels.c
index fc8d440973..7b6853e2a8 100644
--- a/libavcodec/motionpixels.c
+++ b/libavcodec/motionpixels.c
@@ -323,7 +323,7 @@ static av_cold int mp_decode_end(AVCodecContext *avctx)
AVCodec ff_motionpixels_decoder = {
.name = "motionpixels",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_MOTIONPIXELS,
+ .id = AV_CODEC_ID_MOTIONPIXELS,
.priv_data_size = sizeof(MotionPixelsContext),
.init = mp_decode_init,
.close = mp_decode_end,
diff --git a/libavcodec/movtextdec.c b/libavcodec/movtextdec.c
index b34523d358..52668e2ff7 100644
--- a/libavcodec/movtextdec.c
+++ b/libavcodec/movtextdec.c
@@ -100,7 +100,7 @@ AVCodec ff_movtext_decoder = {
.name = "mov_text",
.long_name = NULL_IF_CONFIG_SMALL("3GPP Timed Text subtitle"),
.type = AVMEDIA_TYPE_SUBTITLE,
- .id = CODEC_ID_MOV_TEXT,
+ .id = AV_CODEC_ID_MOV_TEXT,
.init = mov_text_init,
.decode = mov_text_decode_frame,
};
diff --git a/libavcodec/movtextenc.c b/libavcodec/movtextenc.c
index d98f499f3c..3f73f8b4bd 100644
--- a/libavcodec/movtextenc.c
+++ b/libavcodec/movtextenc.c
@@ -154,7 +154,7 @@ AVCodec ff_movtext_encoder = {
.name = "mov_text",
.long_name = NULL_IF_CONFIG_SMALL("3GPP Timed Text subtitle"),
.type = AVMEDIA_TYPE_SUBTITLE,
- .id = CODEC_ID_MOV_TEXT,
+ .id = AV_CODEC_ID_MOV_TEXT,
.priv_data_size = sizeof(MovTextContext),
.init = mov_text_encode_init,
.encode = mov_text_encode_frame,
diff --git a/libavcodec/mpc7.c b/libavcodec/mpc7.c
index 95836354cd..cab4eee03d 100644
--- a/libavcodec/mpc7.c
+++ b/libavcodec/mpc7.c
@@ -334,7 +334,7 @@ static av_cold int mpc7_decode_close(AVCodecContext *avctx)
AVCodec ff_mpc7_decoder = {
.name = "mpc7",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_MUSEPACK7,
+ .id = AV_CODEC_ID_MUSEPACK7,
.priv_data_size = sizeof(MPCContext),
.init = mpc7_decode_init,
.close = mpc7_decode_close,
diff --git a/libavcodec/mpc8.c b/libavcodec/mpc8.c
index cb952ca039..7a075e3c15 100644
--- a/libavcodec/mpc8.c
+++ b/libavcodec/mpc8.c
@@ -437,7 +437,7 @@ static av_cold void mpc8_decode_flush(AVCodecContext *avctx)
AVCodec ff_mpc8_decoder = {
.name = "mpc8",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_MUSEPACK8,
+ .id = AV_CODEC_ID_MUSEPACK8,
.priv_data_size = sizeof(MPCContext),
.init = mpc8_decode_init,
.decode = mpc8_decode_frame,
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c
index c00011f774..1bf857e5f4 100644
--- a/libavcodec/mpeg12.c
+++ b/libavcodec/mpeg12.c
@@ -838,7 +838,7 @@ static int mpeg_decode_mb(MpegEncContext *s, DCTELEM block[12][64])
}
}
- if (s->codec_id == CODEC_ID_MPEG2VIDEO) {
+ if (s->codec_id == AV_CODEC_ID_MPEG2VIDEO) {
if (s->flags2 & CODEC_FLAG2_FAST) {
for (i = 0; i < 6; i++) {
mpeg2_fast_decode_block_intra(s, *s->pblocks[i], i);
@@ -1056,7 +1056,7 @@ static int mpeg_decode_mb(MpegEncContext *s, DCTELEM block[12][64])
}
}
- if (s->codec_id == CODEC_ID_MPEG2VIDEO) {
+ if (s->codec_id == AV_CODEC_ID_MPEG2VIDEO) {
if (s->flags2 & CODEC_FLAG2_FAST) {
for (i = 0; i < 6; i++) {
if (cbp & 32) {
@@ -1136,7 +1136,7 @@ static av_cold int mpeg_decode_init(AVCodecContext *avctx)
s->repeat_field = 0;
s->mpeg_enc_ctx.codec_id = avctx->codec->id;
avctx->color_range = AVCOL_RANGE_MPEG;
- if (avctx->codec->id == CODEC_ID_MPEG1VIDEO)
+ if (avctx->codec->id == AV_CODEC_ID_MPEG1VIDEO)
avctx->chroma_sample_location = AVCHROMA_LOC_CENTER;
else
avctx->chroma_sample_location = AVCHROMA_LOC_LEFT;
@@ -1219,7 +1219,7 @@ static enum PixelFormat mpeg_get_pixelformat(AVCodecContext *avctx)
if(s->chroma_format < 2) {
enum PixelFormat res;
res = avctx->get_format(avctx,
- avctx->codec_id == CODEC_ID_MPEG1VIDEO ?
+ avctx->codec_id == AV_CODEC_ID_MPEG1VIDEO ?
mpeg1_hwaccel_pixfmt_list_420 :
mpeg2_hwaccel_pixfmt_list_420);
if (res != PIX_FMT_XVMC_MPEG2_IDCT && res != PIX_FMT_XVMC_MPEG2_MC) {
@@ -1273,7 +1273,7 @@ static int mpeg_decode_postinit(AVCodecContext *avctx)
* that behave like P-frames. */
avctx->has_b_frames = !s->low_delay;
- if (avctx->codec_id == CODEC_ID_MPEG1VIDEO) {
+ if (avctx->codec_id == AV_CODEC_ID_MPEG1VIDEO) {
//MPEG-1 fps
avctx->time_base.den = avpriv_frame_rate_tab[s->frame_rate_index].num;
avctx->time_base.num = avpriv_frame_rate_tab[s->frame_rate_index].den;
@@ -1417,7 +1417,7 @@ static void mpeg_decode_sequence_extension(Mpeg1Context *s1)
s1->frame_rate_ext.den = get_bits(&s->gb, 5) + 1;
av_dlog(s->avctx, "sequence extension\n");
- s->codec_id = s->avctx->codec_id = CODEC_ID_MPEG2VIDEO;
+ s->codec_id = s->avctx->codec_id = AV_CODEC_ID_MPEG2VIDEO;
if (s->avctx->debug & FF_DEBUG_PICT_INFO)
av_log(s->avctx, AV_LOG_DEBUG, "profile: %d, level: %d vbv buffer: %d, bitrate:%d\n",
@@ -1660,7 +1660,7 @@ static int mpeg_decode_slice(MpegEncContext *s, int mb_y,
av_assert0(mb_y < s->mb_height);
init_get_bits(&s->gb, *buf, buf_size * 8);
- if(s->codec_id != CODEC_ID_MPEG1VIDEO && s->mb_height > 2800/16)
+ if(s->codec_id != AV_CODEC_ID_MPEG1VIDEO && s->mb_height > 2800/16)
skip_bits(&s->gb, 3);
ff_mpeg1_clean_buffers(s);
@@ -1902,7 +1902,7 @@ static int slice_decode_thread(AVCodecContext *c, void *arg)
start_code = -1;
buf = avpriv_mpv_find_start_code(buf, s->gb.buffer_end, &start_code);
mb_y= start_code - SLICE_MIN_START_CODE;
- if(s->codec_id != CODEC_ID_MPEG1VIDEO && s->mb_height > 2800/16)
+ if(s->codec_id != AV_CODEC_ID_MPEG1VIDEO && s->mb_height > 2800/16)
mb_y += (*buf&0xE0)<<2;
mb_y <<= field_pic;
if (s->picture_structure == PICT_BOTTOM_FIELD)
@@ -2028,7 +2028,7 @@ static int mpeg1_decode_sequence(AVCodecContext *avctx,
s->first_field = 0;
s->frame_pred_frame_dct = 1;
s->chroma_format = 1;
- s->codec_id = s->avctx->codec_id = CODEC_ID_MPEG1VIDEO;
+ s->codec_id = s->avctx->codec_id = AV_CODEC_ID_MPEG1VIDEO;
s->out_format = FMT_MPEG1;
s->swap_uv = 0; // AFAIK VCR2 does not have SEQ_HEADER
if (s->flags & CODEC_FLAG_LOW_DELAY)
@@ -2086,11 +2086,11 @@ static int vcr2_init_sequence(AVCodecContext *avctx)
s->frame_pred_frame_dct = 1;
s->chroma_format = 1;
if (s->codec_tag == AV_RL32("BW10")) {
- s->codec_id = s->avctx->codec_id = CODEC_ID_MPEG1VIDEO;
+ s->codec_id = s->avctx->codec_id = AV_CODEC_ID_MPEG1VIDEO;
} else {
exchange_uv(s); // common init reset pblocks, so we swap them here
s->swap_uv = 1; // in case of xvmc we need to swap uv for each MB
- s->codec_id = s->avctx->codec_id = CODEC_ID_MPEG2VIDEO;
+ s->codec_id = s->avctx->codec_id = AV_CODEC_ID_MPEG2VIDEO;
}
s1->save_width = s->width;
s1->save_height = s->height;
@@ -2452,7 +2452,7 @@ static int decode_chunks(AVCodecContext *avctx,
const int field_pic = s2->picture_structure != PICT_FRAME;
int mb_y = start_code - SLICE_MIN_START_CODE;
last_code = SLICE_MIN_START_CODE;
- if(s2->codec_id != CODEC_ID_MPEG1VIDEO && s2->mb_height > 2800/16)
+ if(s2->codec_id != AV_CODEC_ID_MPEG1VIDEO && s2->mb_height > 2800/16)
mb_y += (*buf_ptr&0xE0)<<2;
mb_y <<= field_pic;
@@ -2485,7 +2485,7 @@ static int decode_chunks(AVCodecContext *avctx,
if (!s->mpeg_enc_ctx_allocated)
break;
- if (s2->codec_id == CODEC_ID_MPEG2VIDEO) {
+ if (s2->codec_id == AV_CODEC_ID_MPEG2VIDEO) {
if (mb_y < avctx->skip_top || mb_y >= s2->mb_height - avctx->skip_bottom)
break;
}
@@ -2583,7 +2583,7 @@ static const AVProfile mpeg2_video_profiles[] = {
AVCodec ff_mpeg1video_decoder = {
.name = "mpeg1video",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_MPEG1VIDEO,
+ .id = AV_CODEC_ID_MPEG1VIDEO,
.priv_data_size = sizeof(Mpeg1Context),
.init = mpeg_decode_init,
.close = mpeg_decode_end,
@@ -2600,7 +2600,7 @@ AVCodec ff_mpeg1video_decoder = {
AVCodec ff_mpeg2video_decoder = {
.name = "mpeg2video",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_MPEG2VIDEO,
+ .id = AV_CODEC_ID_MPEG2VIDEO,
.priv_data_size = sizeof(Mpeg1Context),
.init = mpeg_decode_init,
.close = mpeg_decode_end,
@@ -2618,7 +2618,7 @@ AVCodec ff_mpeg2video_decoder = {
AVCodec ff_mpegvideo_decoder = {
.name = "mpegvideo",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_MPEG2VIDEO,
+ .id = AV_CODEC_ID_MPEG2VIDEO,
.priv_data_size = sizeof(Mpeg1Context),
.init = mpeg_decode_init,
.close = mpeg_decode_end,
@@ -2650,7 +2650,7 @@ static av_cold int mpeg_mc_decode_init(AVCodecContext *avctx)
AVCodec ff_mpeg_xvmc_decoder = {
.name = "mpegvideo_xvmc",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_MPEG2VIDEO_XVMC,
+ .id = AV_CODEC_ID_MPEG2VIDEO_XVMC,
.priv_data_size = sizeof(Mpeg1Context),
.init = mpeg_mc_decode_init,
.close = mpeg_decode_end,
@@ -2667,7 +2667,7 @@ AVCodec ff_mpeg_xvmc_decoder = {
AVCodec ff_mpeg_vdpau_decoder = {
.name = "mpegvideo_vdpau",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_MPEG2VIDEO,
+ .id = AV_CODEC_ID_MPEG2VIDEO,
.priv_data_size = sizeof(Mpeg1Context),
.init = mpeg_decode_init,
.close = mpeg_decode_end,
@@ -2683,7 +2683,7 @@ AVCodec ff_mpeg_vdpau_decoder = {
AVCodec ff_mpeg1_vdpau_decoder = {
.name = "mpeg1video_vdpau",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_MPEG1VIDEO,
+ .id = AV_CODEC_ID_MPEG1VIDEO,
.priv_data_size = sizeof(Mpeg1Context),
.init = mpeg_decode_init,
.close = mpeg_decode_end,
diff --git a/libavcodec/mpeg12enc.c b/libavcodec/mpeg12enc.c
index 9536d64a41..2766fbf59a 100644
--- a/libavcodec/mpeg12enc.c
+++ b/libavcodec/mpeg12enc.c
@@ -219,7 +219,7 @@ static void mpeg1_encode_sequence_header(MpegEncContext *s)
for(i=1; i<15; i++){
float error= aspect_ratio;
- if(s->codec_id == CODEC_ID_MPEG1VIDEO || i <=1)
+ if(s->codec_id == AV_CODEC_ID_MPEG1VIDEO || i <=1)
error-= 1.0/ff_mpeg1_aspect[i];
else
error-= av_q2d(ff_mpeg2_aspect[i])*s->height/s->width;
@@ -237,7 +237,7 @@ static void mpeg1_encode_sequence_header(MpegEncContext *s)
if(s->avctx->rc_max_rate){
v = (s->avctx->rc_max_rate + 399) / 400;
- if (v > 0x3ffff && s->codec_id == CODEC_ID_MPEG1VIDEO)
+ if (v > 0x3ffff && s->codec_id == AV_CODEC_ID_MPEG1VIDEO)
v = 0x3ffff;
}else{
v= 0x3FFFF;
@@ -262,14 +262,14 @@ static void mpeg1_encode_sequence_header(MpegEncContext *s)
s->avctx->me_range && s->avctx->me_range < 128 &&
vbv_buffer_size <= 20 &&
v <= 1856000/400 &&
- s->codec_id == CODEC_ID_MPEG1VIDEO;
+ s->codec_id == AV_CODEC_ID_MPEG1VIDEO;
put_bits(&s->pb, 1, constraint_parameter_flag);
ff_write_quant_matrix(&s->pb, s->avctx->intra_matrix);
ff_write_quant_matrix(&s->pb, s->avctx->inter_matrix);
- if(s->codec_id == CODEC_ID_MPEG2VIDEO){
+ if(s->codec_id == AV_CODEC_ID_MPEG2VIDEO){
put_header(s, EXT_START_CODE);
put_bits(&s->pb, 4, 1); //seq ext
@@ -331,7 +331,7 @@ static av_always_inline void put_qscale(MpegEncContext *s)
}
void ff_mpeg1_encode_slice_header(MpegEncContext *s){
- if (s->codec_id == CODEC_ID_MPEG2VIDEO && s->height > 2800) {
+ if (s->codec_id == AV_CODEC_ID_MPEG2VIDEO && s->height > 2800) {
put_header(s, SLICE_MIN_START_CODE + (s->mb_y & 127));
put_bits(&s->pb, 3, s->mb_y >> 7); /* slice_vertical_position_extension */
} else {
@@ -360,7 +360,7 @@ void ff_mpeg1_encode_picture_header(MpegEncContext *s, int picture_number)
// RAL: Forward f_code also needed for B frames
if (s->pict_type == AV_PICTURE_TYPE_P || s->pict_type == AV_PICTURE_TYPE_B) {
put_bits(&s->pb, 1, 0); /* half pel coordinates */
- if(s->codec_id == CODEC_ID_MPEG1VIDEO)
+ if(s->codec_id == AV_CODEC_ID_MPEG1VIDEO)
put_bits(&s->pb, 3, s->f_code); /* forward_f_code */
else
put_bits(&s->pb, 3, 7); /* forward_f_code */
@@ -369,7 +369,7 @@ void ff_mpeg1_encode_picture_header(MpegEncContext *s, int picture_number)
// RAL: Backward f_code necessary for B frames
if (s->pict_type == AV_PICTURE_TYPE_B) {
put_bits(&s->pb, 1, 0); /* half pel coordinates */
- if(s->codec_id == CODEC_ID_MPEG1VIDEO)
+ if(s->codec_id == AV_CODEC_ID_MPEG1VIDEO)
put_bits(&s->pb, 3, s->b_code); /* backward_f_code */
else
put_bits(&s->pb, 3, 7); /* backward_f_code */
@@ -378,7 +378,7 @@ void ff_mpeg1_encode_picture_header(MpegEncContext *s, int picture_number)
put_bits(&s->pb, 1, 0); /* extra bit picture */
s->frame_pred_frame_dct = 1;
- if(s->codec_id == CODEC_ID_MPEG2VIDEO){
+ if(s->codec_id == AV_CODEC_ID_MPEG2VIDEO){
put_header(s, EXT_START_CODE);
put_bits(&s->pb, 4, 8); //pic ext
if (s->pict_type == AV_PICTURE_TYPE_P || s->pict_type == AV_PICTURE_TYPE_B) {
@@ -459,7 +459,7 @@ static av_always_inline void mpeg1_encode_mb_internal(MpegEncContext *s,
}
if (cbp == 0 && !first_mb && s->mv_type == MV_TYPE_16X16 &&
- (mb_x != s->mb_width - 1 || (mb_y != s->mb_height - 1 && s->codec_id == CODEC_ID_MPEG1VIDEO)) &&
+ (mb_x != s->mb_width - 1 || (mb_y != s->mb_height - 1 && s->codec_id == AV_CODEC_ID_MPEG1VIDEO)) &&
((s->pict_type == AV_PICTURE_TYPE_P && (motion_x | motion_y) == 0) ||
(s->pict_type == AV_PICTURE_TYPE_B && s->mv_dir == s->last_mv_dir && (((s->mv_dir & MV_DIR_FORWARD) ? ((s->mv[0][0][0] - s->last_mv[0][0][0])|(s->mv[0][0][1] - s->last_mv[0][0][1])) : 0) |
((s->mv_dir & MV_DIR_BACKWARD) ? ((s->mv[1][0][0] - s->last_mv[1][0][0])|(s->mv[1][0][1] - s->last_mv[1][0][1])) : 0)) == 0))) {
@@ -793,7 +793,7 @@ void ff_mpeg1_encode_init(MpegEncContext *s)
}
s->me.mv_penalty= mv_penalty;
s->fcode_tab= fcode_tab;
- if(s->codec_id == CODEC_ID_MPEG1VIDEO){
+ if(s->codec_id == AV_CODEC_ID_MPEG1VIDEO){
s->min_qcoeff=-255;
s->max_qcoeff= 255;
}else{
@@ -907,7 +907,7 @@ static void mpeg1_encode_block(MpegEncContext *s,
put_bits(&s->pb, table_vlc[111][1], table_vlc[111][0]);
/* escape: only clip in this case */
put_bits(&s->pb, 6, run);
- if(s->codec_id == CODEC_ID_MPEG1VIDEO){
+ if(s->codec_id == AV_CODEC_ID_MPEG1VIDEO){
if (alevel < 128) {
put_sbits(&s->pb, 8, level);
} else {
@@ -964,7 +964,7 @@ mpeg12_class(2)
AVCodec ff_mpeg1video_encoder = {
.name = "mpeg1video",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_MPEG1VIDEO,
+ .id = AV_CODEC_ID_MPEG1VIDEO,
.priv_data_size = sizeof(MpegEncContext),
.init = encode_init,
.encode2 = ff_MPV_encode_picture,
@@ -980,7 +980,7 @@ AVCodec ff_mpeg1video_encoder = {
AVCodec ff_mpeg2video_encoder = {
.name = "mpeg2video",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_MPEG2VIDEO,
+ .id = AV_CODEC_ID_MPEG2VIDEO,
.priv_data_size = sizeof(MpegEncContext),
.init = encode_init,
.encode2 = ff_MPV_encode_picture,
diff --git a/libavcodec/mpeg4video_parser.c b/libavcodec/mpeg4video_parser.c
index f987330100..d6094404e7 100644
--- a/libavcodec/mpeg4video_parser.c
+++ b/libavcodec/mpeg4video_parser.c
@@ -143,7 +143,7 @@ static int mpeg4video_parse(AVCodecParserContext *s,
AVCodecParser ff_mpeg4video_parser = {
- .codec_ids = { CODEC_ID_MPEG4 },
+ .codec_ids = { AV_CODEC_ID_MPEG4 },
.priv_data_size = sizeof(struct Mp4vParseContext),
.parser_init = mpeg4video_parse_init,
.parser_parse = mpeg4video_parse,
diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c
index cecba506c4..aac1ca129e 100644
--- a/libavcodec/mpeg4videodec.c
+++ b/libavcodec/mpeg4videodec.c
@@ -1490,7 +1490,7 @@ intra:
end:
/* per-MB end of slice check */
- if(s->codec_id==CODEC_ID_MPEG4){
+ if(s->codec_id==AV_CODEC_ID_MPEG4){
int next= mpeg4_is_resync(s);
if(next) {
if (s->mb_x + s->mb_y*s->mb_width + 1 > next && (s->avctx->err_recognition & AV_EF_AGGRESSIVE)) {
@@ -2338,7 +2338,7 @@ static const AVClass mpeg4_vdpau_class = {
AVCodec ff_mpeg4_decoder = {
.name = "mpeg4",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_MPEG4,
+ .id = AV_CODEC_ID_MPEG4,
.priv_data_size = sizeof(MpegEncContext),
.init = decode_init,
.close = ff_h263_decode_end,
@@ -2360,7 +2360,7 @@ AVCodec ff_mpeg4_decoder = {
AVCodec ff_mpeg4_vdpau_decoder = {
.name = "mpeg4_vdpau",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_MPEG4,
+ .id = AV_CODEC_ID_MPEG4,
.priv_data_size = sizeof(MpegEncContext),
.init = decode_init,
.close = ff_h263_decode_end,
diff --git a/libavcodec/mpeg4videoenc.c b/libavcodec/mpeg4videoenc.c
index cbf84b720e..7e95e56dce 100644
--- a/libavcodec/mpeg4videoenc.c
+++ b/libavcodec/mpeg4videoenc.c
@@ -1346,7 +1346,7 @@ static const AVClass mpeg4enc_class = {
AVCodec ff_mpeg4_encoder = {
.name = "mpeg4",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_MPEG4,
+ .id = AV_CODEC_ID_MPEG4,
.priv_data_size = sizeof(MpegEncContext),
.init = encode_init,
.encode2 = ff_MPV_encode_picture,
diff --git a/libavcodec/mpegaudio_parser.c b/libavcodec/mpegaudio_parser.c
index 18c224f76c..2d61975d2a 100644
--- a/libavcodec/mpegaudio_parser.c
+++ b/libavcodec/mpegaudio_parser.c
@@ -101,7 +101,7 @@ static int mpegaudio_parse(AVCodecParserContext *s1,
AVCodecParser ff_mpegaudio_parser = {
- .codec_ids = { CODEC_ID_MP1, CODEC_ID_MP2, CODEC_ID_MP3 },
+ .codec_ids = { AV_CODEC_ID_MP1, AV_CODEC_ID_MP2, AV_CODEC_ID_MP3 },
.priv_data_size = sizeof(MpegAudioParseContext),
.parser_parse = mpegaudio_parse,
.parser_close = ff_parse_close,
diff --git a/libavcodec/mpegaudiodec.c b/libavcodec/mpegaudiodec.c
index bcdbc5f819..d24b35dbfd 100644
--- a/libavcodec/mpegaudiodec.c
+++ b/libavcodec/mpegaudiodec.c
@@ -441,7 +441,7 @@ static av_cold int decode_init(AVCodecContext * avctx)
avctx->sample_fmt= OUT_FMT;
s->err_recognition = avctx->err_recognition;
- if (avctx->codec_id == CODEC_ID_MP3ADU)
+ if (avctx->codec_id == AV_CODEC_ID_MP3ADU)
s->adu_mode = 1;
avcodec_get_frame_defaults(&s->frame);
@@ -2009,7 +2009,7 @@ static int decode_frame_mp3on4(AVCodecContext *avctx, void *data,
AVCodec ff_mp1_decoder = {
.name = "mp1",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_MP1,
+ .id = AV_CODEC_ID_MP1,
.priv_data_size = sizeof(MPADecodeContext),
.init = decode_init,
.decode = decode_frame,
@@ -2022,7 +2022,7 @@ AVCodec ff_mp1_decoder = {
AVCodec ff_mp2_decoder = {
.name = "mp2",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_MP2,
+ .id = AV_CODEC_ID_MP2,
.priv_data_size = sizeof(MPADecodeContext),
.init = decode_init,
.decode = decode_frame,
@@ -2035,7 +2035,7 @@ AVCodec ff_mp2_decoder = {
AVCodec ff_mp3_decoder = {
.name = "mp3",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_MP3,
+ .id = AV_CODEC_ID_MP3,
.priv_data_size = sizeof(MPADecodeContext),
.init = decode_init,
.decode = decode_frame,
@@ -2048,7 +2048,7 @@ AVCodec ff_mp3_decoder = {
AVCodec ff_mp3adu_decoder = {
.name = "mp3adu",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_MP3ADU,
+ .id = AV_CODEC_ID_MP3ADU,
.priv_data_size = sizeof(MPADecodeContext),
.init = decode_init,
.decode = decode_frame_adu,
@@ -2061,7 +2061,7 @@ AVCodec ff_mp3adu_decoder = {
AVCodec ff_mp3on4_decoder = {
.name = "mp3on4",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_MP3ON4,
+ .id = AV_CODEC_ID_MP3ON4,
.priv_data_size = sizeof(MP3On4DecodeContext),
.init = decode_init_mp3on4,
.close = decode_close_mp3on4,
diff --git a/libavcodec/mpegaudiodec_float.c b/libavcodec/mpegaudiodec_float.c
index 083bd97f5a..e26a0a9ad9 100644
--- a/libavcodec/mpegaudiodec_float.c
+++ b/libavcodec/mpegaudiodec_float.c
@@ -26,7 +26,7 @@
AVCodec ff_mp1float_decoder = {
.name = "mp1float",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_MP1,
+ .id = AV_CODEC_ID_MP1,
.priv_data_size = sizeof(MPADecodeContext),
.init = decode_init,
.decode = decode_frame,
@@ -39,7 +39,7 @@ AVCodec ff_mp1float_decoder = {
AVCodec ff_mp2float_decoder = {
.name = "mp2float",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_MP2,
+ .id = AV_CODEC_ID_MP2,
.priv_data_size = sizeof(MPADecodeContext),
.init = decode_init,
.decode = decode_frame,
@@ -52,7 +52,7 @@ AVCodec ff_mp2float_decoder = {
AVCodec ff_mp3float_decoder = {
.name = "mp3float",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_MP3,
+ .id = AV_CODEC_ID_MP3,
.priv_data_size = sizeof(MPADecodeContext),
.init = decode_init,
.decode = decode_frame,
@@ -65,7 +65,7 @@ AVCodec ff_mp3float_decoder = {
AVCodec ff_mp3adufloat_decoder = {
.name = "mp3adufloat",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_MP3ADU,
+ .id = AV_CODEC_ID_MP3ADU,
.priv_data_size = sizeof(MPADecodeContext),
.init = decode_init,
.decode = decode_frame_adu,
@@ -78,7 +78,7 @@ AVCodec ff_mp3adufloat_decoder = {
AVCodec ff_mp3on4float_decoder = {
.name = "mp3on4float",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_MP3ON4,
+ .id = AV_CODEC_ID_MP3ON4,
.priv_data_size = sizeof(MP3On4DecodeContext),
.init = decode_init_mp3on4,
.close = decode_close_mp3on4,
diff --git a/libavcodec/mpegaudiodecheader.c b/libavcodec/mpegaudiodecheader.c
index b00d804d0e..7841b30e30 100644
--- a/libavcodec/mpegaudiodecheader.c
+++ b/libavcodec/mpegaudiodecheader.c
@@ -122,16 +122,16 @@ int avpriv_mpa_decode_header(AVCodecContext *avctx, uint32_t head, int *sample_r
switch(s->layer) {
case 1:
- avctx->codec_id = CODEC_ID_MP1;
+ avctx->codec_id = AV_CODEC_ID_MP1;
*frame_size = 384;
break;
case 2:
- avctx->codec_id = CODEC_ID_MP2;
+ avctx->codec_id = AV_CODEC_ID_MP2;
*frame_size = 1152;
break;
default:
case 3:
- avctx->codec_id = CODEC_ID_MP3;
+ avctx->codec_id = AV_CODEC_ID_MP3;
if (s->lsf)
*frame_size = 576;
else
diff --git a/libavcodec/mpegaudioenc.c b/libavcodec/mpegaudioenc.c
index ea9e55ac98..585ef44f87 100644
--- a/libavcodec/mpegaudioenc.c
+++ b/libavcodec/mpegaudioenc.c
@@ -782,7 +782,7 @@ static const AVCodecDefault mp2_defaults[] = {
AVCodec ff_mp2_encoder = {
.name = "mp2",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_MP2,
+ .id = AV_CODEC_ID_MP2,
.priv_data_size = sizeof(MpegAudioContext),
.init = MPA_encode_init,
.encode2 = MPA_encode_frame,
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index bd9b913a34..97bc46b052 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -230,7 +230,7 @@ static void free_frame_buffer(MpegEncContext *s, Picture *pic)
/* Windows Media Image codecs allocate internal buffers with different
* dimensions; ignore user defined callbacks for these
*/
- if (s->codec_id != CODEC_ID_WMV3IMAGE && s->codec_id != CODEC_ID_VC1IMAGE)
+ if (s->codec_id != AV_CODEC_ID_WMV3IMAGE && s->codec_id != AV_CODEC_ID_VC1IMAGE)
ff_thread_release_buffer(s->avctx, &pic->f);
else
avcodec_default_release_buffer(s->avctx, &pic->f);
@@ -255,7 +255,7 @@ static int alloc_frame_buffer(MpegEncContext *s, Picture *pic)
}
}
- if (s->codec_id != CODEC_ID_WMV3IMAGE && s->codec_id != CODEC_ID_VC1IMAGE)
+ if (s->codec_id != AV_CODEC_ID_WMV3IMAGE && s->codec_id != AV_CODEC_ID_VC1IMAGE)
r = ff_thread_get_buffer(s->avctx, &pic->f);
else
r = avcodec_default_get_buffer(s->avctx, &pic->f);
@@ -665,9 +665,9 @@ av_cold int ff_MPV_common_init(MpegEncContext *s)
if (s->encoding && s->avctx->slices)
nb_slices = s->avctx->slices;
- if (s->codec_id == CODEC_ID_MPEG2VIDEO && !s->progressive_sequence)
+ if (s->codec_id == AV_CODEC_ID_MPEG2VIDEO && !s->progressive_sequence)
s->mb_height = (s->height + 31) / 32 * 2;
- else if (s->codec_id != CODEC_ID_H264)
+ else if (s->codec_id != AV_CODEC_ID_H264)
s->mb_height = (s->height + 15) / 16;
if (s->avctx->pix_fmt == PIX_FMT_NONE) {
@@ -793,7 +793,7 @@ av_cold int ff_MPV_common_init(MpegEncContext *s)
FF_ALLOCZ_OR_GOTO(s->avctx, s->error_status_table,
mb_array_size * sizeof(uint8_t), fail);
- if(s->codec_id==CODEC_ID_MPEG4 || (s->flags & CODEC_FLAG_INTERLACED_ME)){
+ if(s->codec_id==AV_CODEC_ID_MPEG4 || (s->flags & CODEC_FLAG_INTERLACED_ME)){
/* interlaced direct mode decoding tables */
for (i = 0; i < 2; i++) {
int j, k;
@@ -1147,7 +1147,7 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
}
/* mark & release old frames */
- if (s->out_format != FMT_H264 || s->codec_id == CODEC_ID_SVQ3) {
+ if (s->out_format != FMT_H264 || s->codec_id == AV_CODEC_ID_SVQ3) {
if (s->pict_type != AV_PICTURE_TYPE_B && s->last_picture_ptr &&
s->last_picture_ptr != s->next_picture_ptr &&
s->last_picture_ptr->f.data[0]) {
@@ -1189,7 +1189,7 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
pic->f.reference = 0;
if (!s->dropable) {
- if (s->codec_id == CODEC_ID_H264)
+ if (s->codec_id == AV_CODEC_ID_H264)
pic->f.reference = s->picture_structure;
else if (s->pict_type != AV_PICTURE_TYPE_B)
pic->f.reference = 3;
@@ -1203,8 +1203,8 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
s->current_picture_ptr = pic;
// FIXME use only the vars from current_pic
s->current_picture_ptr->f.top_field_first = s->top_field_first;
- if (s->codec_id == CODEC_ID_MPEG1VIDEO ||
- s->codec_id == CODEC_ID_MPEG2VIDEO) {
+ if (s->codec_id == AV_CODEC_ID_MPEG1VIDEO ||
+ s->codec_id == AV_CODEC_ID_MPEG2VIDEO) {
if (s->picture_structure != PICT_FRAME)
s->current_picture_ptr->f.top_field_first =
(s->picture_structure == PICT_TOP_FIELD) == s->first_field;
@@ -1233,7 +1233,7 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
s->current_picture_ptr ? s->current_picture_ptr->f.data[0] : NULL,
s->pict_type, s->dropable); */
- if (s->codec_id != CODEC_ID_H264) {
+ if (s->codec_id != AV_CODEC_ID_H264) {
if ((s->last_picture_ptr == NULL ||
s->last_picture_ptr->f.data[0] == NULL) &&
(s->pict_type != AV_PICTURE_TYPE_I ||
@@ -1256,7 +1256,7 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
return -1;
}
- if(s->codec_id == CODEC_ID_FLV1 || s->codec_id == CODEC_ID_H263){
+ if(s->codec_id == AV_CODEC_ID_FLV1 || s->codec_id == AV_CODEC_ID_H263){
for(i=0; i<avctx->height; i++)
memset(s->last_picture_ptr->f.data[0] + s->last_picture_ptr->f.linesize[0]*i, 16, avctx->width);
}
@@ -1290,7 +1290,7 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
ff_copy_picture(&s->next_picture, s->next_picture_ptr);
if (HAVE_THREADS && (avctx->active_thread_type & FF_THREAD_FRAME) &&
- (s->out_format != FMT_H264 || s->codec_id == CODEC_ID_SVQ3)) {
+ (s->out_format != FMT_H264 || s->codec_id == AV_CODEC_ID_SVQ3)) {
if (s->next_picture_ptr)
s->next_picture_ptr->owner2 = s;
if (s->last_picture_ptr)
@@ -1318,7 +1318,7 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
/* set dequantizer, we can't do it during init as
* it might change for mpeg4 and we can't do it in the header
* decode as init is not called for mpeg4 there yet */
- if (s->mpeg_quant || s->codec_id == CODEC_ID_MPEG2VIDEO) {
+ if (s->mpeg_quant || s->codec_id == AV_CODEC_ID_MPEG2VIDEO) {
s->dct_unquantize_intra = s->dct_unquantize_mpeg2_intra;
s->dct_unquantize_inter = s->dct_unquantize_mpeg2_inter;
} else if (s->out_format == FMT_H263 || s->out_format == FMT_H261) {
@@ -1407,7 +1407,7 @@ void ff_MPV_frame_end(MpegEncContext *s)
#endif
s->avctx->coded_frame = &s->current_picture_ptr->f;
- if (s->codec_id != CODEC_ID_H264 && s->current_picture.f.reference) {
+ if (s->codec_id != AV_CODEC_ID_H264 && s->current_picture.f.reference) {
ff_thread_report_progress(&s->current_picture_ptr->f, INT_MAX, 0);
}
}
@@ -1590,7 +1590,7 @@ void ff_print_debug_info(MpegEncContext *s, AVFrame *pict)
const int height = s->avctx->height;
const int mv_sample_log2 = 4 - pict->motion_subsample_log2;
const int mv_stride = (s->mb_width << mv_sample_log2) +
- (s->codec_id == CODEC_ID_H264 ? 0 : 1);
+ (s->codec_id == AV_CODEC_ID_H264 ? 0 : 1);
s->low_delay = 0; // needed to see the vectors without trashing the buffers
avcodec_get_chroma_sub_sample(s->avctx->pix_fmt,
@@ -1781,7 +1781,7 @@ void ff_print_debug_info(MpegEncContext *s, AVFrame *pict)
}
if (IS_INTERLACED(mb_type) &&
- s->codec_id == CODEC_ID_H264) {
+ s->codec_id == AV_CODEC_ID_H264) {
// hmm
}
}
@@ -2407,8 +2407,8 @@ void MPV_decode_mb_internal(MpegEncContext *s, DCTELEM block[12][64],
}
/* add dct residue */
- if(s->encoding || !( s->msmpeg4_version || s->codec_id==CODEC_ID_MPEG1VIDEO || s->codec_id==CODEC_ID_MPEG2VIDEO
- || (s->codec_id==CODEC_ID_MPEG4 && !s->mpeg_quant))){
+ if(s->encoding || !( s->msmpeg4_version || s->codec_id==AV_CODEC_ID_MPEG1VIDEO || s->codec_id==AV_CODEC_ID_MPEG2VIDEO
+ || (s->codec_id==AV_CODEC_ID_MPEG4 && !s->mpeg_quant))){
add_dequant_dct(s, block[0], 0, dest_y , dct_linesize, s->qscale);
add_dequant_dct(s, block[1], 1, dest_y + block_size, dct_linesize, s->qscale);
add_dequant_dct(s, block[2], 2, dest_y + dct_offset , dct_linesize, s->qscale);
@@ -2427,7 +2427,7 @@ void MPV_decode_mb_internal(MpegEncContext *s, DCTELEM block[12][64],
add_dequant_dct(s, block[7], 7, dest_cr + dct_offset, dct_linesize, s->chroma_qscale);
}
}
- } else if(is_mpeg12 || (s->codec_id != CODEC_ID_WMV2)){
+ } else if(is_mpeg12 || (s->codec_id != AV_CODEC_ID_WMV2)){
add_dct(s, block[0], 0, dest_y , dct_linesize);
add_dct(s, block[1], 1, dest_y + block_size, dct_linesize);
add_dct(s, block[2], 2, dest_y + dct_offset , dct_linesize);
@@ -2460,7 +2460,7 @@ void MPV_decode_mb_internal(MpegEncContext *s, DCTELEM block[12][64],
}
} else {
/* dct only in intra block */
- if(s->encoding || !(s->codec_id==CODEC_ID_MPEG1VIDEO || s->codec_id==CODEC_ID_MPEG2VIDEO)){
+ if(s->encoding || !(s->codec_id==AV_CODEC_ID_MPEG1VIDEO || s->codec_id==AV_CODEC_ID_MPEG2VIDEO)){
put_dct(s, block[0], 0, dest_y , dct_linesize, s->qscale);
put_dct(s, block[1], 1, dest_y + block_size, dct_linesize, s->qscale);
put_dct(s, block[2], 2, dest_y + dct_offset , dct_linesize, s->qscale);
diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h
index 89160d2412..38fce9f73c 100644
--- a/libavcodec/mpegvideo.h
+++ b/libavcodec/mpegvideo.h
@@ -218,7 +218,7 @@ typedef struct MpegEncContext {
int h263_plus; ///< h263 plus headers
int h263_flv; ///< use flv h263 header
- enum CodecID codec_id; /* see CODEC_ID_xxx */
+ enum AVCodecID codec_id; /* see AV_CODEC_ID_xxx */
int fixed_qscale; ///< fixed qscale if non zero
int encoding; ///< true if we are encoding (vs decoding)
int flags; ///< AVCodecContext.flags (HQ, MV4, ...)
diff --git a/libavcodec/mpegvideo_common.h b/libavcodec/mpegvideo_common.h
index 9f7d0601b7..67087c889a 100644
--- a/libavcodec/mpegvideo_common.h
+++ b/libavcodec/mpegvideo_common.h
@@ -303,8 +303,8 @@ if(s->quarter_sample)
if( (unsigned)src_x > FFMAX(s->h_edge_pos - (motion_x&1) - 16, 0)
|| (unsigned)src_y > FFMAX( v_edge_pos - (motion_y&1) - h , 0)){
- if(is_mpeg12 || s->codec_id == CODEC_ID_MPEG2VIDEO ||
- s->codec_id == CODEC_ID_MPEG1VIDEO){
+ if(is_mpeg12 || s->codec_id == AV_CODEC_ID_MPEG2VIDEO ||
+ s->codec_id == AV_CODEC_ID_MPEG1VIDEO){
av_log(s->avctx,AV_LOG_DEBUG,
"MPEG motion vector out of boundary (%d %d)\n", src_x, src_y);
return;
@@ -720,7 +720,7 @@ static av_always_inline void MPV_motion_internal(MpegEncContext *s,
ref_picture, pix_op, qpix_op,
s->mv[dir][0][0], s->mv[dir][0][1], 16);
} else if (!is_mpeg12 && (CONFIG_WMV2_DECODER || CONFIG_WMV2_ENCODER) &&
- s->mspel && s->codec_id == CODEC_ID_WMV2) {
+ s->mspel && s->codec_id == AV_CODEC_ID_WMV2) {
ff_mspel_motion(s, dest_y, dest_cb, dest_cr,
ref_picture, pix_op,
s->mv[dir][0][0], s->mv[dir][0][1], 16);
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index d1117de14b..e34d56c288 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -278,7 +278,7 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx)
MPV_encode_defaults(s);
switch (avctx->codec_id) {
- case CODEC_ID_MPEG2VIDEO:
+ case AV_CODEC_ID_MPEG2VIDEO:
if (avctx->pix_fmt != PIX_FMT_YUV420P &&
avctx->pix_fmt != PIX_FMT_YUV422P) {
av_log(avctx, AV_LOG_ERROR,
@@ -286,7 +286,7 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx)
return -1;
}
break;
- case CODEC_ID_LJPEG:
+ case AV_CODEC_ID_LJPEG:
if (avctx->pix_fmt != PIX_FMT_YUVJ420P &&
avctx->pix_fmt != PIX_FMT_YUVJ422P &&
avctx->pix_fmt != PIX_FMT_YUVJ444P &&
@@ -301,8 +301,8 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx)
return -1;
}
break;
- case CODEC_ID_MJPEG:
- case CODEC_ID_AMV:
+ case AV_CODEC_ID_MJPEG:
+ case AV_CODEC_ID_AMV:
if (avctx->pix_fmt != PIX_FMT_YUVJ420P &&
avctx->pix_fmt != PIX_FMT_YUVJ422P &&
((avctx->pix_fmt != PIX_FMT_YUV420P &&
@@ -433,8 +433,8 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx)
if (s->avctx->rc_max_rate &&
s->avctx->rc_min_rate == s->avctx->rc_max_rate &&
- (s->codec_id == CODEC_ID_MPEG1VIDEO ||
- s->codec_id == CODEC_ID_MPEG2VIDEO) &&
+ (s->codec_id == AV_CODEC_ID_MPEG1VIDEO ||
+ s->codec_id == AV_CODEC_ID_MPEG2VIDEO) &&
90000LL * (avctx->rc_buffer_size - 1) >
s->avctx->rc_max_rate * 0xFFFFLL) {
av_log(avctx, AV_LOG_INFO,
@@ -442,9 +442,9 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx)
"specified vbv buffer is too large for the given bitrate!\n");
}
- if ((s->flags & CODEC_FLAG_4MV) && s->codec_id != CODEC_ID_MPEG4 &&
- s->codec_id != CODEC_ID_H263 && s->codec_id != CODEC_ID_H263P &&
- s->codec_id != CODEC_ID_FLV1) {
+ if ((s->flags & CODEC_FLAG_4MV) && s->codec_id != AV_CODEC_ID_MPEG4 &&
+ s->codec_id != AV_CODEC_ID_H263 && s->codec_id != AV_CODEC_ID_H263P &&
+ s->codec_id != AV_CODEC_ID_FLV1) {
av_log(avctx, AV_LOG_ERROR, "4MV not supported by codec\n");
return -1;
}
@@ -455,22 +455,22 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx)
return -1;
}
- if (s->quarter_sample && s->codec_id != CODEC_ID_MPEG4) {
+ if (s->quarter_sample && s->codec_id != AV_CODEC_ID_MPEG4) {
av_log(avctx, AV_LOG_ERROR, "qpel not supported by codec\n");
return -1;
}
if (s->max_b_frames &&
- s->codec_id != CODEC_ID_MPEG4 &&
- s->codec_id != CODEC_ID_MPEG1VIDEO &&
- s->codec_id != CODEC_ID_MPEG2VIDEO) {
+ s->codec_id != AV_CODEC_ID_MPEG4 &&
+ s->codec_id != AV_CODEC_ID_MPEG1VIDEO &&
+ s->codec_id != AV_CODEC_ID_MPEG2VIDEO) {
av_log(avctx, AV_LOG_ERROR, "b frames not supported by codec\n");
return -1;
}
- if ((s->codec_id == CODEC_ID_MPEG4 ||
- s->codec_id == CODEC_ID_H263 ||
- s->codec_id == CODEC_ID_H263P) &&
+ if ((s->codec_id == AV_CODEC_ID_MPEG4 ||
+ s->codec_id == AV_CODEC_ID_H263 ||
+ s->codec_id == AV_CODEC_ID_H263P) &&
(avctx->sample_aspect_ratio.num > 255 ||
avctx->sample_aspect_ratio.den > 255)) {
av_log(avctx, AV_LOG_WARNING,
@@ -480,50 +480,50 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx)
avctx->sample_aspect_ratio.num, avctx->sample_aspect_ratio.den, 255);
}
- if ((s->codec_id == CODEC_ID_H263 ||
- s->codec_id == CODEC_ID_H263P) &&
+ if ((s->codec_id == AV_CODEC_ID_H263 ||
+ s->codec_id == AV_CODEC_ID_H263P) &&
(avctx->width > 2048 ||
avctx->height > 1152 )) {
av_log(avctx, AV_LOG_ERROR, "H.263 does not support resolutions above 2048x1152\n");
return -1;
}
- if ((s->codec_id == CODEC_ID_H263 ||
- s->codec_id == CODEC_ID_H263P) &&
+ if ((s->codec_id == AV_CODEC_ID_H263 ||
+ s->codec_id == AV_CODEC_ID_H263P) &&
((avctx->width &3) ||
(avctx->height&3) )) {
av_log(avctx, AV_LOG_ERROR, "w/h must be a multiple of 4\n");
return -1;
}
- if (s->codec_id == CODEC_ID_MPEG1VIDEO &&
+ if (s->codec_id == AV_CODEC_ID_MPEG1VIDEO &&
(avctx->width > 4095 ||
avctx->height > 4095 )) {
av_log(avctx, AV_LOG_ERROR, "MPEG-1 does not support resolutions above 4095x4095\n");
return -1;
}
- if (s->codec_id == CODEC_ID_MPEG2VIDEO &&
+ if (s->codec_id == AV_CODEC_ID_MPEG2VIDEO &&
(avctx->width > 16383 ||
avctx->height > 16383 )) {
av_log(avctx, AV_LOG_ERROR, "MPEG-2 does not support resolutions above 16383x16383\n");
return -1;
}
- if ((s->codec_id == CODEC_ID_WMV1 ||
- s->codec_id == CODEC_ID_WMV2) &&
+ if ((s->codec_id == AV_CODEC_ID_WMV1 ||
+ s->codec_id == AV_CODEC_ID_WMV2) &&
avctx->width & 1) {
av_log(avctx, AV_LOG_ERROR, "width must be multiple of 2\n");
return -1;
}
if ((s->flags & (CODEC_FLAG_INTERLACED_DCT | CODEC_FLAG_INTERLACED_ME)) &&
- s->codec_id != CODEC_ID_MPEG4 && s->codec_id != CODEC_ID_MPEG2VIDEO) {
+ s->codec_id != AV_CODEC_ID_MPEG4 && s->codec_id != AV_CODEC_ID_MPEG2VIDEO) {
av_log(avctx, AV_LOG_ERROR, "interlacing not supported by codec\n");
return -1;
}
// FIXME mpeg2 uses that too
- if (s->mpeg_quant && s->codec_id != CODEC_ID_MPEG4) {
+ if (s->mpeg_quant && s->codec_id != AV_CODEC_ID_MPEG4) {
av_log(avctx, AV_LOG_ERROR,
"mpeg2 style quantization not supported by codec\n");
return -1;
@@ -554,7 +554,7 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx)
}
if (s->flags & CODEC_FLAG_LOW_DELAY) {
- if (s->codec_id != CODEC_ID_MPEG2VIDEO) {
+ if (s->codec_id != AV_CODEC_ID_MPEG2VIDEO) {
av_log(avctx, AV_LOG_ERROR,
"low delay forcing is only available for mpeg2\n");
return -1;
@@ -575,11 +575,11 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx)
}
if (s->avctx->thread_count > 1 &&
- s->codec_id != CODEC_ID_MPEG4 &&
- s->codec_id != CODEC_ID_MPEG1VIDEO &&
- s->codec_id != CODEC_ID_MPEG2VIDEO &&
- s->codec_id != CODEC_ID_MJPEG &&
- (s->codec_id != CODEC_ID_H263P)) {
+ s->codec_id != AV_CODEC_ID_MPEG4 &&
+ s->codec_id != AV_CODEC_ID_MPEG1VIDEO &&
+ s->codec_id != AV_CODEC_ID_MPEG2VIDEO &&
+ s->codec_id != AV_CODEC_ID_MJPEG &&
+ (s->codec_id != AV_CODEC_ID_H263P)) {
av_log(avctx, AV_LOG_ERROR,
"multi threaded encoding not supported by codec\n");
return -1;
@@ -626,7 +626,7 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx)
//return -1;
}
- if (s->mpeg_quant || s->codec_id == CODEC_ID_MPEG1VIDEO || s->codec_id == CODEC_ID_MPEG2VIDEO || s->codec_id == CODEC_ID_MJPEG || s->codec_id==CODEC_ID_AMV) {
+ if (s->mpeg_quant || s->codec_id == AV_CODEC_ID_MPEG1VIDEO || s->codec_id == AV_CODEC_ID_MPEG2VIDEO || s->codec_id == AV_CODEC_ID_MJPEG || s->codec_id==AV_CODEC_ID_AMV) {
// (a + x * 3 / 8) / x
s->intra_quant_bias = 3 << (QUANT_BIAS_SHIFT - 3);
s->inter_quant_bias = 0;
@@ -646,7 +646,7 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx)
avcodec_get_chroma_sub_sample(avctx->pix_fmt, &chroma_h_shift,
&chroma_v_shift);
- if (avctx->codec_id == CODEC_ID_MPEG4 &&
+ if (avctx->codec_id == AV_CODEC_ID_MPEG4 &&
s->avctx->time_base.den > (1 << 16) - 1) {
av_log(avctx, AV_LOG_ERROR,
"timebase %d/%d not supported by MPEG 4 standard, "
@@ -667,23 +667,23 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx)
#endif
switch (avctx->codec->id) {
- case CODEC_ID_MPEG1VIDEO:
+ case AV_CODEC_ID_MPEG1VIDEO:
s->out_format = FMT_MPEG1;
s->low_delay = !!(s->flags & CODEC_FLAG_LOW_DELAY);
avctx->delay = s->low_delay ? 0 : (s->max_b_frames + 1);
break;
- case CODEC_ID_MPEG2VIDEO:
+ case AV_CODEC_ID_MPEG2VIDEO:
s->out_format = FMT_MPEG1;
s->low_delay = !!(s->flags & CODEC_FLAG_LOW_DELAY);
avctx->delay = s->low_delay ? 0 : (s->max_b_frames + 1);
s->rtp_mode = 1;
break;
- case CODEC_ID_LJPEG:
- case CODEC_ID_MJPEG:
- case CODEC_ID_AMV:
+ case AV_CODEC_ID_LJPEG:
+ case AV_CODEC_ID_MJPEG:
+ case AV_CODEC_ID_AMV:
s->out_format = FMT_MJPEG;
s->intra_only = 1; /* force intra only for jpeg */
- if (avctx->codec->id == CODEC_ID_LJPEG &&
+ if (avctx->codec->id == AV_CODEC_ID_LJPEG &&
(avctx->pix_fmt == PIX_FMT_BGR0
|| s->avctx->pix_fmt == PIX_FMT_BGRA
|| s->avctx->pix_fmt == PIX_FMT_BGR24)) {
@@ -704,7 +704,7 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx)
avctx->delay = 0;
s->low_delay = 1;
break;
- case CODEC_ID_H261:
+ case AV_CODEC_ID_H261:
if (!CONFIG_H261_ENCODER)
return -1;
if (ff_h261_get_picture_format(s->width, s->height) < 0) {
@@ -718,7 +718,7 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx)
avctx->delay = 0;
s->low_delay = 1;
break;
- case CODEC_ID_H263:
+ case AV_CODEC_ID_H263:
if (!CONFIG_H263_ENCODER)
return -1;
if (ff_match_2uint16(ff_h263_format, FF_ARRAY_ELEMS(ff_h263_format),
@@ -734,7 +734,7 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx)
avctx->delay = 0;
s->low_delay = 1;
break;
- case CODEC_ID_H263P:
+ case AV_CODEC_ID_H263P:
s->out_format = FMT_H263;
s->h263_plus = 1;
/* Fx */
@@ -748,7 +748,7 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx)
avctx->delay = 0;
s->low_delay = 1;
break;
- case CODEC_ID_FLV1:
+ case AV_CODEC_ID_FLV1:
s->out_format = FMT_H263;
s->h263_flv = 2; /* format = 1; 11-bit codes */
s->unrestricted_mv = 1;
@@ -756,12 +756,12 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx)
avctx->delay = 0;
s->low_delay = 1;
break;
- case CODEC_ID_RV10:
+ case AV_CODEC_ID_RV10:
s->out_format = FMT_H263;
avctx->delay = 0;
s->low_delay = 1;
break;
- case CODEC_ID_RV20:
+ case AV_CODEC_ID_RV20:
s->out_format = FMT_H263;
avctx->delay = 0;
s->low_delay = 1;
@@ -771,14 +771,14 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx)
s->loop_filter = 1;
s->unrestricted_mv = 0;
break;
- case CODEC_ID_MPEG4:
+ case AV_CODEC_ID_MPEG4:
s->out_format = FMT_H263;
s->h263_pred = 1;
s->unrestricted_mv = 1;
s->low_delay = s->max_b_frames ? 0 : 1;
avctx->delay = s->low_delay ? 0 : (s->max_b_frames + 1);
break;
- case CODEC_ID_MSMPEG4V2:
+ case AV_CODEC_ID_MSMPEG4V2:
s->out_format = FMT_H263;
s->h263_pred = 1;
s->unrestricted_mv = 1;
@@ -786,7 +786,7 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx)
avctx->delay = 0;
s->low_delay = 1;
break;
- case CODEC_ID_MSMPEG4V3:
+ case AV_CODEC_ID_MSMPEG4V3:
s->out_format = FMT_H263;
s->h263_pred = 1;
s->unrestricted_mv = 1;
@@ -795,7 +795,7 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx)
avctx->delay = 0;
s->low_delay = 1;
break;
- case CODEC_ID_WMV1:
+ case AV_CODEC_ID_WMV1:
s->out_format = FMT_H263;
s->h263_pred = 1;
s->unrestricted_mv = 1;
@@ -804,7 +804,7 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx)
avctx->delay = 0;
s->low_delay = 1;
break;
- case CODEC_ID_WMV2:
+ case AV_CODEC_ID_WMV2:
s->out_format = FMT_H263;
s->h263_pred = 1;
s->unrestricted_mv = 1;
@@ -859,7 +859,7 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx)
/* init q matrix */
for (i = 0; i < 64; i++) {
int j = s->dsp.idct_permutation[i];
- if (CONFIG_MPEG4_ENCODER && s->codec_id == CODEC_ID_MPEG4 &&
+ if (CONFIG_MPEG4_ENCODER && s->codec_id == AV_CODEC_ID_MPEG4 &&
s->mpeg_quant) {
s->intra_matrix[j] = ff_mpeg4_default_intra_matrix[i];
s->inter_matrix[j] = ff_mpeg4_default_non_intra_matrix[i];
@@ -1049,7 +1049,7 @@ static int load_input_picture(MpegEncContext *s, AVFrame *pic_arg)
uint8_t *src = pic_arg->data[i];
uint8_t *dst = pic->data[i];
- if(s->codec_id == CODEC_ID_AMV && !(s->avctx->flags & CODEC_FLAG_EMU_EDGE)){
+ if(s->codec_id == AV_CODEC_ID_AMV && !(s->avctx->flags & CODEC_FLAG_EMU_EDGE)){
h= ((s->height+15)/16*16)>>v_shift;
}
@@ -1525,8 +1525,8 @@ vbv_retry:
// done in encode_picture() so we must undo it
if (s->pict_type == AV_PICTURE_TYPE_P) {
if (s->flipflop_rounding ||
- s->codec_id == CODEC_ID_H263P ||
- s->codec_id == CODEC_ID_MPEG4)
+ s->codec_id == AV_CODEC_ID_H263P ||
+ s->codec_id == AV_CODEC_ID_MPEG4)
s->no_rounding ^= 1;
}
if (s->pict_type != AV_PICTURE_TYPE_B) {
@@ -1568,13 +1568,13 @@ vbv_retry:
}
switch (s->codec_id) {
- case CODEC_ID_MPEG1VIDEO:
- case CODEC_ID_MPEG2VIDEO:
+ case AV_CODEC_ID_MPEG1VIDEO:
+ case AV_CODEC_ID_MPEG2VIDEO:
while (stuffing_count--) {
put_bits(&s->pb, 8, 0);
}
break;
- case CODEC_ID_MPEG4:
+ case AV_CODEC_ID_MPEG4:
put_bits(&s->pb, 16, 0);
put_bits(&s->pb, 16, 0x1C3);
stuffing_count -= 4;
@@ -1795,7 +1795,7 @@ static av_always_inline void encode_mb_internal(MpegEncContext *s,
if (s->out_format == FMT_H263) {
s->dquant = av_clip(s->dquant, -2, 2);
- if (s->codec_id == CODEC_ID_MPEG4) {
+ if (s->codec_id == AV_CODEC_ID_MPEG4) {
if (!s->mb_intra) {
if (s->pict_type == AV_PICTURE_TYPE_B) {
if (s->dquant & 1 || s->mv_dir & MV_DIRECT)
@@ -1820,7 +1820,7 @@ static av_always_inline void encode_mb_internal(MpegEncContext *s,
ptr_cr = s->new_picture.f.data[2] +
(mb_y * mb_block_height * wrap_c) + mb_x * 8;
- if((mb_x*16+16 > s->width || mb_y*16+16 > s->height) && s->codec_id != CODEC_ID_AMV){
+ if((mb_x*16+16 > s->width || mb_y*16+16 > s->height) && s->codec_id != AV_CODEC_ID_AMV){
uint8_t *ebuf = s->edge_emu_buffer + 32;
s->dsp.emulated_edge_mc(ebuf, ptr_y, wrap_y, 16, 16, mb_x * 16,
mb_y * 16, s->width, s->height);
@@ -2085,39 +2085,39 @@ static av_always_inline void encode_mb_internal(MpegEncContext *s,
/* huffman encode */
switch(s->codec_id){ //FIXME funct ptr could be slightly faster
- case CODEC_ID_MPEG1VIDEO:
- case CODEC_ID_MPEG2VIDEO:
+ case AV_CODEC_ID_MPEG1VIDEO:
+ case AV_CODEC_ID_MPEG2VIDEO:
if (CONFIG_MPEG1VIDEO_ENCODER || CONFIG_MPEG2VIDEO_ENCODER)
ff_mpeg1_encode_mb(s, s->block, motion_x, motion_y);
break;
- case CODEC_ID_MPEG4:
+ case AV_CODEC_ID_MPEG4:
if (CONFIG_MPEG4_ENCODER)
ff_mpeg4_encode_mb(s, s->block, motion_x, motion_y);
break;
- case CODEC_ID_MSMPEG4V2:
- case CODEC_ID_MSMPEG4V3:
- case CODEC_ID_WMV1:
+ case AV_CODEC_ID_MSMPEG4V2:
+ case AV_CODEC_ID_MSMPEG4V3:
+ case AV_CODEC_ID_WMV1:
if (CONFIG_MSMPEG4_ENCODER)
ff_msmpeg4_encode_mb(s, s->block, motion_x, motion_y);
break;
- case CODEC_ID_WMV2:
+ case AV_CODEC_ID_WMV2:
if (CONFIG_WMV2_ENCODER)
ff_wmv2_encode_mb(s, s->block, motion_x, motion_y);
break;
- case CODEC_ID_H261:
+ case AV_CODEC_ID_H261:
if (CONFIG_H261_ENCODER)
ff_h261_encode_mb(s, s->block, motion_x, motion_y);
break;
- case CODEC_ID_H263:
- case CODEC_ID_H263P:
- case CODEC_ID_FLV1:
- case CODEC_ID_RV10:
- case CODEC_ID_RV20:
+ case AV_CODEC_ID_H263:
+ case AV_CODEC_ID_H263P:
+ case AV_CODEC_ID_FLV1:
+ case AV_CODEC_ID_RV10:
+ case AV_CODEC_ID_RV20:
if (CONFIG_H263_ENCODER)
ff_h263_encode_mb(s, s->block, motion_x, motion_y);
break;
- case CODEC_ID_MJPEG:
- case CODEC_ID_AMV:
+ case AV_CODEC_ID_MJPEG:
+ case AV_CODEC_ID_AMV:
if (CONFIG_MJPEG_ENCODER)
ff_mjpeg_encode_mb(s, s->block);
break;
@@ -2365,7 +2365,7 @@ static int mb_var_thread(AVCodecContext *c, void *arg){
}
static void write_slice_end(MpegEncContext *s){
- if(CONFIG_MPEG4_ENCODER && s->codec_id==CODEC_ID_MPEG4){
+ if(CONFIG_MPEG4_ENCODER && s->codec_id==AV_CODEC_ID_MPEG4){
if(s->partitioned_frame){
ff_mpeg4_merge_partitions(s);
}
@@ -2462,7 +2462,7 @@ static int encode_thread(AVCodecContext *c, void *arg){
s->current_picture.f.error[i] = 0;
}
- if(s->codec_id==CODEC_ID_AMV){
+ if(s->codec_id==AV_CODEC_ID_AMV){
s->last_dc[0] = 128*8/13;
s->last_dc[1] = 128*8/14;
s->last_dc[2] = 128*8/14;
@@ -2473,13 +2473,13 @@ static int encode_thread(AVCodecContext *c, void *arg){
s->last_mv_dir = 0;
switch(s->codec_id){
- case CODEC_ID_H263:
- case CODEC_ID_H263P:
- case CODEC_ID_FLV1:
+ case AV_CODEC_ID_H263:
+ case AV_CODEC_ID_H263P:
+ case AV_CODEC_ID_FLV1:
if (CONFIG_H263_ENCODER)
s->gob_index = ff_h263_get_gob_height(s);
break;
- case CODEC_ID_MPEG4:
+ case AV_CODEC_ID_MPEG4:
if(CONFIG_MPEG4_ENCODER && s->partitioned_frame)
ff_mpeg4_init_partitions(s);
break;
@@ -2520,7 +2520,7 @@ static int encode_thread(AVCodecContext *c, void *arg){
s->mb_y = mb_y; // moved into loop, can get changed by H.261
ff_update_block_index(s);
- if(CONFIG_H261_ENCODER && s->codec_id == CODEC_ID_H261){
+ if(CONFIG_H261_ENCODER && s->codec_id == AV_CODEC_ID_H261){
ff_h261_reorder_mb_index(s);
xy= s->mb_y*s->mb_stride + s->mb_x;
mb_type= s->mb_type[xy];
@@ -2537,17 +2537,17 @@ static int encode_thread(AVCodecContext *c, void *arg){
if(s->start_mb_y == mb_y && mb_y > 0 && mb_x==0) is_gob_start=1;
switch(s->codec_id){
- case CODEC_ID_H263:
- case CODEC_ID_H263P:
+ case AV_CODEC_ID_H263:
+ case AV_CODEC_ID_H263P:
if(!s->h263_slice_structured)
if(s->mb_x || s->mb_y%s->gob_index) is_gob_start=0;
break;
- case CODEC_ID_MPEG2VIDEO:
+ case AV_CODEC_ID_MPEG2VIDEO:
if(s->mb_x==0 && s->mb_y!=0) is_gob_start=1;
- case CODEC_ID_MPEG1VIDEO:
+ case AV_CODEC_ID_MPEG1VIDEO:
if(s->mb_skip_run) is_gob_start=0;
break;
- case CODEC_ID_MJPEG:
+ case AV_CODEC_ID_MJPEG:
if(s->mb_x==0 && s->mb_y!=0) is_gob_start=1;
break;
}
@@ -2555,7 +2555,7 @@ static int encode_thread(AVCodecContext *c, void *arg){
if(is_gob_start){
if(s->start_mb_y != mb_y || mb_x!=0){
write_slice_end(s);
- if(CONFIG_MPEG4_ENCODER && s->codec_id==CODEC_ID_MPEG4 && s->partitioned_frame){
+ if(CONFIG_MPEG4_ENCODER && s->codec_id==AV_CODEC_ID_MPEG4 && s->partitioned_frame){
ff_mpeg4_init_partitions(s);
}
}
@@ -2580,21 +2580,21 @@ static int encode_thread(AVCodecContext *c, void *arg){
update_mb_info(s, 1);
switch(s->codec_id){
- case CODEC_ID_MPEG4:
+ case AV_CODEC_ID_MPEG4:
if (CONFIG_MPEG4_ENCODER) {
ff_mpeg4_encode_video_packet_header(s);
ff_mpeg4_clean_buffers(s);
}
break;
- case CODEC_ID_MPEG1VIDEO:
- case CODEC_ID_MPEG2VIDEO:
+ case AV_CODEC_ID_MPEG1VIDEO:
+ case AV_CODEC_ID_MPEG2VIDEO:
if (CONFIG_MPEG1VIDEO_ENCODER || CONFIG_MPEG2VIDEO_ENCODER) {
ff_mpeg1_encode_slice_header(s);
ff_mpeg1_clean_buffers(s);
}
break;
- case CODEC_ID_H263:
- case CODEC_ID_H263P:
+ case AV_CODEC_ID_H263:
+ case AV_CODEC_ID_H263P:
if (CONFIG_H263_ENCODER)
ff_h263_encode_gob_header(s, mb_y);
break;
@@ -3116,13 +3116,13 @@ static int estimate_qp(MpegEncContext *s, int dry_run){
if(s->adaptive_quant){
switch(s->codec_id){
- case CODEC_ID_MPEG4:
+ case AV_CODEC_ID_MPEG4:
if (CONFIG_MPEG4_ENCODER)
ff_clean_mpeg4_qscales(s);
break;
- case CODEC_ID_H263:
- case CODEC_ID_H263P:
- case CODEC_ID_FLV1:
+ case AV_CODEC_ID_H263:
+ case AV_CODEC_ID_H263P:
+ case AV_CODEC_ID_FLV1:
if (CONFIG_H263_ENCODER)
ff_clean_h263_qscales(s);
break;
@@ -3168,9 +3168,9 @@ static int encode_picture(MpegEncContext *s, int picture_number)
/* we need to initialize some time vars before we can encode b-frames */
// RAL: Condition added for MPEG1VIDEO
- if (s->codec_id == CODEC_ID_MPEG1VIDEO || s->codec_id == CODEC_ID_MPEG2VIDEO || (s->h263_pred && !s->msmpeg4_version))
+ if (s->codec_id == AV_CODEC_ID_MPEG1VIDEO || s->codec_id == AV_CODEC_ID_MPEG2VIDEO || (s->h263_pred && !s->msmpeg4_version))
set_frame_distances(s);
- if(CONFIG_MPEG4_ENCODER && s->codec_id == CODEC_ID_MPEG4)
+ if(CONFIG_MPEG4_ENCODER && s->codec_id == AV_CODEC_ID_MPEG4)
ff_set_mpeg4_time(s);
s->me.scene_change_score=0;
@@ -3181,7 +3181,7 @@ static int encode_picture(MpegEncContext *s, int picture_number)
if(s->msmpeg4_version >= 3) s->no_rounding=1;
else s->no_rounding=0;
}else if(s->pict_type!=AV_PICTURE_TYPE_B){
- if(s->flipflop_rounding || s->codec_id == CODEC_ID_H263P || s->codec_id == CODEC_ID_MPEG4)
+ if(s->flipflop_rounding || s->codec_id == AV_CODEC_ID_H263P || s->codec_id == AV_CODEC_ID_MPEG4)
s->no_rounding ^= 1;
}
@@ -3197,7 +3197,7 @@ static int encode_picture(MpegEncContext *s, int picture_number)
update_qscale(s);
}
- if(s->codec_id != CODEC_ID_AMV){
+ if(s->codec_id != AV_CODEC_ID_AMV){
if(s->q_chroma_intra_matrix != s->q_intra_matrix ) av_freep(&s->q_chroma_intra_matrix);
if(s->q_chroma_intra_matrix16 != s->q_intra_matrix16) av_freep(&s->q_chroma_intra_matrix16);
s->q_chroma_intra_matrix = s->q_intra_matrix;
@@ -3322,7 +3322,7 @@ static int encode_picture(MpegEncContext *s, int picture_number)
s->intra_matrix, s->intra_quant_bias, 8, 8, 1);
s->qscale= 8;
}
- if(s->codec_id == CODEC_ID_AMV){
+ if(s->codec_id == AV_CODEC_ID_AMV){
static const uint8_t y[32]={13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13};
static const uint8_t c[32]={14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14};
for(i=1;i<64;i++){
@@ -3362,17 +3362,17 @@ static int encode_picture(MpegEncContext *s, int picture_number)
ff_h261_encode_picture_header(s, picture_number);
break;
case FMT_H263:
- if (CONFIG_WMV2_ENCODER && s->codec_id == CODEC_ID_WMV2)
+ if (CONFIG_WMV2_ENCODER && s->codec_id == AV_CODEC_ID_WMV2)
ff_wmv2_encode_picture_header(s, picture_number);
else if (CONFIG_MSMPEG4_ENCODER && s->msmpeg4_version)
ff_msmpeg4_encode_picture_header(s, picture_number);
else if (CONFIG_MPEG4_ENCODER && s->h263_pred)
ff_mpeg4_encode_picture_header(s, picture_number);
- else if (CONFIG_RV10_ENCODER && s->codec_id == CODEC_ID_RV10)
+ else if (CONFIG_RV10_ENCODER && s->codec_id == AV_CODEC_ID_RV10)
ff_rv10_encode_picture_header(s, picture_number);
- else if (CONFIG_RV20_ENCODER && s->codec_id == CODEC_ID_RV20)
+ else if (CONFIG_RV20_ENCODER && s->codec_id == AV_CODEC_ID_RV20)
ff_rv20_encode_picture_header(s, picture_number);
- else if (CONFIG_FLV_ENCODER && s->codec_id == CODEC_ID_FLV1)
+ else if (CONFIG_FLV_ENCODER && s->codec_id == AV_CODEC_ID_FLV1)
ff_flv_encode_picture_header(s, picture_number);
else if (CONFIG_H263_ENCODER)
ff_h263_encode_picture_header(s, picture_number);
@@ -4211,7 +4211,7 @@ static const AVClass h263_class = {
AVCodec ff_h263_encoder = {
.name = "h263",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_H263,
+ .id = AV_CODEC_ID_H263,
.priv_data_size = sizeof(MpegEncContext),
.init = ff_MPV_encode_init,
.encode2 = ff_MPV_encode_picture,
@@ -4239,7 +4239,7 @@ static const AVClass h263p_class = {
AVCodec ff_h263p_encoder = {
.name = "h263p",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_H263P,
+ .id = AV_CODEC_ID_H263P,
.priv_data_size = sizeof(MpegEncContext),
.init = ff_MPV_encode_init,
.encode2 = ff_MPV_encode_picture,
@@ -4255,7 +4255,7 @@ FF_MPV_GENERIC_CLASS(msmpeg4v2)
AVCodec ff_msmpeg4v2_encoder = {
.name = "msmpeg4v2",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_MSMPEG4V2,
+ .id = AV_CODEC_ID_MSMPEG4V2,
.priv_data_size = sizeof(MpegEncContext),
.init = ff_MPV_encode_init,
.encode2 = ff_MPV_encode_picture,
@@ -4270,7 +4270,7 @@ FF_MPV_GENERIC_CLASS(msmpeg4v3)
AVCodec ff_msmpeg4v3_encoder = {
.name = "msmpeg4",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_MSMPEG4V3,
+ .id = AV_CODEC_ID_MSMPEG4V3,
.priv_data_size = sizeof(MpegEncContext),
.init = ff_MPV_encode_init,
.encode2 = ff_MPV_encode_picture,
@@ -4285,7 +4285,7 @@ FF_MPV_GENERIC_CLASS(wmv1)
AVCodec ff_wmv1_encoder = {
.name = "wmv1",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_WMV1,
+ .id = AV_CODEC_ID_WMV1,
.priv_data_size = sizeof(MpegEncContext),
.init = ff_MPV_encode_init,
.encode2 = ff_MPV_encode_picture,
diff --git a/libavcodec/mpegvideo_parser.c b/libavcodec/mpegvideo_parser.c
index 5658cdeb36..a9ed81b33b 100644
--- a/libavcodec/mpegvideo_parser.c
+++ b/libavcodec/mpegvideo_parser.c
@@ -68,7 +68,7 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s,
pc->frame_rate.den = avctx->time_base.den = avpriv_frame_rate_tab[frame_rate_index].num;
pc->frame_rate.num = avctx->time_base.num = avpriv_frame_rate_tab[frame_rate_index].den;
avctx->bit_rate = ((buf[4]<<10) | (buf[5]<<2) | (buf[6]>>6))*400;
- avctx->codec_id = CODEC_ID_MPEG1VIDEO;
+ avctx->codec_id = AV_CODEC_ID_MPEG1VIDEO;
}
break;
case EXT_START_CODE:
@@ -92,7 +92,7 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s,
avcodec_set_dimensions(avctx, pc->width, pc->height);
avctx->time_base.den = pc->frame_rate.den * (frame_rate_ext_n + 1) * 2;
avctx->time_base.num = pc->frame_rate.num * (frame_rate_ext_d + 1);
- avctx->codec_id = CODEC_ID_MPEG2VIDEO;
+ avctx->codec_id = AV_CODEC_ID_MPEG2VIDEO;
}
break;
case 0x8: /* picture coding extension */
@@ -189,7 +189,7 @@ static int mpegvideo_parse_init(AVCodecParserContext *s)
}
AVCodecParser ff_mpegvideo_parser = {
- .codec_ids = { CODEC_ID_MPEG1VIDEO, CODEC_ID_MPEG2VIDEO },
+ .codec_ids = { AV_CODEC_ID_MPEG1VIDEO, AV_CODEC_ID_MPEG2VIDEO },
.priv_data_size = sizeof(struct MpvParseContext),
.parser_init = mpegvideo_parse_init,
.parser_parse = mpegvideo_parse,
diff --git a/libavcodec/msmpeg4.c b/libavcodec/msmpeg4.c
index c0f49dad76..71df53c823 100644
--- a/libavcodec/msmpeg4.c
+++ b/libavcodec/msmpeg4.c
@@ -1210,7 +1210,7 @@ int ff_msmpeg4_decode_motion(MpegEncContext * s,
AVCodec ff_msmpeg4v1_decoder = {
.name = "msmpeg4v1",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_MSMPEG4V1,
+ .id = AV_CODEC_ID_MSMPEG4V1,
.priv_data_size = sizeof(MpegEncContext),
.init = ff_msmpeg4_decode_init,
.close = ff_h263_decode_end,
@@ -1224,7 +1224,7 @@ AVCodec ff_msmpeg4v1_decoder = {
AVCodec ff_msmpeg4v2_decoder = {
.name = "msmpeg4v2",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_MSMPEG4V2,
+ .id = AV_CODEC_ID_MSMPEG4V2,
.priv_data_size = sizeof(MpegEncContext),
.init = ff_msmpeg4_decode_init,
.close = ff_h263_decode_end,
@@ -1238,7 +1238,7 @@ AVCodec ff_msmpeg4v2_decoder = {
AVCodec ff_msmpeg4v3_decoder = {
.name = "msmpeg4",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_MSMPEG4V3,
+ .id = AV_CODEC_ID_MSMPEG4V3,
.priv_data_size = sizeof(MpegEncContext),
.init = ff_msmpeg4_decode_init,
.close = ff_h263_decode_end,
@@ -1252,7 +1252,7 @@ AVCodec ff_msmpeg4v3_decoder = {
AVCodec ff_wmv1_decoder = {
.name = "wmv1",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_WMV1,
+ .id = AV_CODEC_ID_WMV1,
.priv_data_size = sizeof(MpegEncContext),
.init = ff_msmpeg4_decode_init,
.close = ff_h263_decode_end,
diff --git a/libavcodec/msrle.c b/libavcodec/msrle.c
index db76648a1c..2a9d95ad70 100644
--- a/libavcodec/msrle.c
+++ b/libavcodec/msrle.c
@@ -158,7 +158,7 @@ static av_cold int msrle_decode_end(AVCodecContext *avctx)
AVCodec ff_msrle_decoder = {
.name = "msrle",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_MSRLE,
+ .id = AV_CODEC_ID_MSRLE,
.priv_data_size = sizeof(MsrleContext),
.init = msrle_decode_init,
.close = msrle_decode_end,
diff --git a/libavcodec/mss1.c b/libavcodec/mss1.c
index 4be7a1febf..d2699a4477 100644
--- a/libavcodec/mss1.c
+++ b/libavcodec/mss1.c
@@ -841,7 +841,7 @@ static av_cold int mss1_decode_end(AVCodecContext *avctx)
AVCodec ff_mss1_decoder = {
.name = "mss1",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_MSS1,
+ .id = AV_CODEC_ID_MSS1,
.priv_data_size = sizeof(MSS1Context),
.init = mss1_decode_init,
.close = mss1_decode_end,
diff --git a/libavcodec/mss3.c b/libavcodec/mss3.c
index 6fbaef9552..17957731a9 100644
--- a/libavcodec/mss3.c
+++ b/libavcodec/mss3.c
@@ -859,7 +859,7 @@ static av_cold int mss3_decode_end(AVCodecContext *avctx)
AVCodec ff_msa1_decoder = {
.name = "msa1",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_MSA1,
+ .id = AV_CODEC_ID_MSA1,
.priv_data_size = sizeof(MSS3Context),
.init = mss3_decode_init,
.close = mss3_decode_end,
diff --git a/libavcodec/mss4.c b/libavcodec/mss4.c
index 6d19b8fac8..bee9764bf0 100644
--- a/libavcodec/mss4.c
+++ b/libavcodec/mss4.c
@@ -672,7 +672,7 @@ static av_cold int mss4_decode_end(AVCodecContext *avctx)
AVCodec ff_mts2_decoder = {
.name = "mts2",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_MTS2,
+ .id = AV_CODEC_ID_MTS2,
.priv_data_size = sizeof(MSS4Context),
.init = mss4_decode_init,
.close = mss4_decode_end,
diff --git a/libavcodec/msvideo1.c b/libavcodec/msvideo1.c
index a0a796521e..07c52e3565 100644
--- a/libavcodec/msvideo1.c
+++ b/libavcodec/msvideo1.c
@@ -337,7 +337,7 @@ static av_cold int msvideo1_decode_end(AVCodecContext *avctx)
AVCodec ff_msvideo1_decoder = {
.name = "msvideo1",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_MSVIDEO1,
+ .id = AV_CODEC_ID_MSVIDEO1,
.priv_data_size = sizeof(Msvideo1Context),
.init = msvideo1_decode_init,
.close = msvideo1_decode_end,
diff --git a/libavcodec/msvideo1enc.c b/libavcodec/msvideo1enc.c
index 96fbea27de..852939bbe3 100644
--- a/libavcodec/msvideo1enc.c
+++ b/libavcodec/msvideo1enc.c
@@ -301,7 +301,7 @@ static av_cold int encode_end(AVCodecContext *avctx)
AVCodec ff_msvideo1_encoder = {
.name = "msvideo1",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_MSVIDEO1,
+ .id = AV_CODEC_ID_MSVIDEO1,
.priv_data_size = sizeof(Msvideo1EncContext),
.init = encode_init,
.encode2 = encode_frame,
diff --git a/libavcodec/mxpegdec.c b/libavcodec/mxpegdec.c
index bc9d654a2e..c1e151211f 100644
--- a/libavcodec/mxpegdec.c
+++ b/libavcodec/mxpegdec.c
@@ -333,7 +333,7 @@ AVCodec ff_mxpeg_decoder = {
.name = "mxpeg",
.long_name = NULL_IF_CONFIG_SMALL("Mobotix MxPEG video"),
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_MXPEG,
+ .id = AV_CODEC_ID_MXPEG,
.priv_data_size = sizeof(MXpegDecodeContext),
.init = mxpeg_decode_init,
.close = mxpeg_decode_end,
diff --git a/libavcodec/nellymoserdec.c b/libavcodec/nellymoserdec.c
index 8aad104ae4..20ab8f84cb 100644
--- a/libavcodec/nellymoserdec.c
+++ b/libavcodec/nellymoserdec.c
@@ -221,7 +221,7 @@ static av_cold int decode_end(AVCodecContext * avctx) {
AVCodec ff_nellymoser_decoder = {
.name = "nellymoser",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_NELLYMOSER,
+ .id = AV_CODEC_ID_NELLYMOSER,
.priv_data_size = sizeof(NellyMoserDecodeContext),
.init = decode_init,
.close = decode_end,
diff --git a/libavcodec/nellymoserenc.c b/libavcodec/nellymoserenc.c
index e3bae11706..2b96d47580 100644
--- a/libavcodec/nellymoserenc.c
+++ b/libavcodec/nellymoserenc.c
@@ -419,7 +419,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
AVCodec ff_nellymoser_encoder = {
.name = "nellymoser",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_NELLYMOSER,
+ .id = AV_CODEC_ID_NELLYMOSER,
.priv_data_size = sizeof(NellyMoserEncodeContext),
.init = encode_init,
.encode2 = encode_frame,
diff --git a/libavcodec/nuv.c b/libavcodec/nuv.c
index 0475e31b35..7e70aac375 100644
--- a/libavcodec/nuv.c
+++ b/libavcodec/nuv.c
@@ -323,7 +323,7 @@ static av_cold int decode_end(AVCodecContext *avctx)
AVCodec ff_nuv_decoder = {
.name = "nuv",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_NUV,
+ .id = AV_CODEC_ID_NUV,
.priv_data_size = sizeof(NuvContext),
.init = decode_init,
.close = decode_end,
diff --git a/libavcodec/old_codec_ids.h b/libavcodec/old_codec_ids.h
new file mode 100644
index 0000000000..a163205cb0
--- /dev/null
+++ b/libavcodec/old_codec_ids.h
@@ -0,0 +1,399 @@
+/*
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVCODEC_OLD_CODEC_IDS_H
+#define AVCODEC_OLD_CODEC_IDS_H
+
+#include "libavutil/attributes.h"
+
+/*
+ * This header exists to prevent new codec IDs from being accidentally added to
+ * the deprecated list.
+ * Do not include it directly. It will be removed on next major bump
+ *
+ * Do not add new items to this list. Use the AVCodecID enum instead.
+ */
+
+enum CodecID {
+ CODEC_ID_NONE,
+
+ /* video codecs */
+ CODEC_ID_MPEG1VIDEO,
+ CODEC_ID_MPEG2VIDEO, ///< preferred ID for MPEG-1/2 video decoding
+ CODEC_ID_MPEG2VIDEO_XVMC,
+ CODEC_ID_H261,
+ CODEC_ID_H263,
+ CODEC_ID_RV10,
+ CODEC_ID_RV20,
+ CODEC_ID_MJPEG,
+ CODEC_ID_MJPEGB,
+ CODEC_ID_LJPEG,
+ CODEC_ID_SP5X,
+ CODEC_ID_JPEGLS,
+ CODEC_ID_MPEG4,
+ CODEC_ID_RAWVIDEO,
+ CODEC_ID_MSMPEG4V1,
+ CODEC_ID_MSMPEG4V2,
+ CODEC_ID_MSMPEG4V3,
+ CODEC_ID_WMV1,
+ CODEC_ID_WMV2,
+ CODEC_ID_H263P,
+ CODEC_ID_H263I,
+ CODEC_ID_FLV1,
+ CODEC_ID_SVQ1,
+ CODEC_ID_SVQ3,
+ CODEC_ID_DVVIDEO,
+ CODEC_ID_HUFFYUV,
+ CODEC_ID_CYUV,
+ CODEC_ID_H264,
+ CODEC_ID_INDEO3,
+ CODEC_ID_VP3,
+ CODEC_ID_THEORA,
+ CODEC_ID_ASV1,
+ CODEC_ID_ASV2,
+ CODEC_ID_FFV1,
+ CODEC_ID_4XM,
+ CODEC_ID_VCR1,
+ CODEC_ID_CLJR,
+ CODEC_ID_MDEC,
+ CODEC_ID_ROQ,
+ CODEC_ID_INTERPLAY_VIDEO,
+ CODEC_ID_XAN_WC3,
+ CODEC_ID_XAN_WC4,
+ CODEC_ID_RPZA,
+ CODEC_ID_CINEPAK,
+ CODEC_ID_WS_VQA,
+ CODEC_ID_MSRLE,
+ CODEC_ID_MSVIDEO1,
+ CODEC_ID_IDCIN,
+ CODEC_ID_8BPS,
+ CODEC_ID_SMC,
+ CODEC_ID_FLIC,
+ CODEC_ID_TRUEMOTION1,
+ CODEC_ID_VMDVIDEO,
+ CODEC_ID_MSZH,
+ CODEC_ID_ZLIB,
+ CODEC_ID_QTRLE,
+ CODEC_ID_SNOW,
+ CODEC_ID_TSCC,
+ CODEC_ID_ULTI,
+ CODEC_ID_QDRAW,
+ CODEC_ID_VIXL,
+ CODEC_ID_QPEG,
+ CODEC_ID_PNG,
+ CODEC_ID_PPM,
+ CODEC_ID_PBM,
+ CODEC_ID_PGM,
+ CODEC_ID_PGMYUV,
+ CODEC_ID_PAM,
+ CODEC_ID_FFVHUFF,
+ CODEC_ID_RV30,
+ CODEC_ID_RV40,
+ CODEC_ID_VC1,
+ CODEC_ID_WMV3,
+ CODEC_ID_LOCO,
+ CODEC_ID_WNV1,
+ CODEC_ID_AASC,
+ CODEC_ID_INDEO2,
+ CODEC_ID_FRAPS,
+ CODEC_ID_TRUEMOTION2,
+ CODEC_ID_BMP,
+ CODEC_ID_CSCD,
+ CODEC_ID_MMVIDEO,
+ CODEC_ID_ZMBV,
+ CODEC_ID_AVS,
+ CODEC_ID_SMACKVIDEO,
+ CODEC_ID_NUV,
+ CODEC_ID_KMVC,
+ CODEC_ID_FLASHSV,
+ CODEC_ID_CAVS,
+ CODEC_ID_JPEG2000,
+ CODEC_ID_VMNC,
+ CODEC_ID_VP5,
+ CODEC_ID_VP6,
+ CODEC_ID_VP6F,
+ CODEC_ID_TARGA,
+ CODEC_ID_DSICINVIDEO,
+ CODEC_ID_TIERTEXSEQVIDEO,
+ CODEC_ID_TIFF,
+ CODEC_ID_GIF,
+ CODEC_ID_DXA,
+ CODEC_ID_DNXHD,
+ CODEC_ID_THP,
+ CODEC_ID_SGI,
+ CODEC_ID_C93,
+ CODEC_ID_BETHSOFTVID,
+ CODEC_ID_PTX,
+ CODEC_ID_TXD,
+ CODEC_ID_VP6A,
+ CODEC_ID_AMV,
+ CODEC_ID_VB,
+ CODEC_ID_PCX,
+ CODEC_ID_SUNRAST,
+ CODEC_ID_INDEO4,
+ CODEC_ID_INDEO5,
+ CODEC_ID_MIMIC,
+ CODEC_ID_RL2,
+ CODEC_ID_ESCAPE124,
+ CODEC_ID_DIRAC,
+ CODEC_ID_BFI,
+ CODEC_ID_CMV,
+ CODEC_ID_MOTIONPIXELS,
+ CODEC_ID_TGV,
+ CODEC_ID_TGQ,
+ CODEC_ID_TQI,
+ CODEC_ID_AURA,
+ CODEC_ID_AURA2,
+ CODEC_ID_V210X,
+ CODEC_ID_TMV,
+ CODEC_ID_V210,
+ CODEC_ID_DPX,
+ CODEC_ID_MAD,
+ CODEC_ID_FRWU,
+ CODEC_ID_FLASHSV2,
+ CODEC_ID_CDGRAPHICS,
+ CODEC_ID_R210,
+ CODEC_ID_ANM,
+ CODEC_ID_BINKVIDEO,
+ CODEC_ID_IFF_ILBM,
+ CODEC_ID_IFF_BYTERUN1,
+ CODEC_ID_KGV1,
+ CODEC_ID_YOP,
+ CODEC_ID_VP8,
+ CODEC_ID_PICTOR,
+ CODEC_ID_ANSI,
+ CODEC_ID_A64_MULTI,
+ CODEC_ID_A64_MULTI5,
+ CODEC_ID_R10K,
+ CODEC_ID_MXPEG,
+ CODEC_ID_LAGARITH,
+ CODEC_ID_PRORES,
+ CODEC_ID_JV,
+ CODEC_ID_DFA,
+ CODEC_ID_WMV3IMAGE,
+ CODEC_ID_VC1IMAGE,
+ CODEC_ID_UTVIDEO,
+ CODEC_ID_BMV_VIDEO,
+ CODEC_ID_VBLE,
+ CODEC_ID_DXTORY,
+ CODEC_ID_V410,
+ CODEC_ID_XWD,
+ CODEC_ID_CDXL,
+ CODEC_ID_XBM,
+ CODEC_ID_ZEROCODEC,
+ CODEC_ID_MSS1,
+ CODEC_ID_MSA1,
+ CODEC_ID_TSCC2,
+ CODEC_ID_MTS2,
+ CODEC_ID_CLLC,
+ CODEC_ID_Y41P = MKBETAG('Y','4','1','P'),
+ CODEC_ID_ESCAPE130 = MKBETAG('E','1','3','0'),
+ CODEC_ID_EXR = MKBETAG('0','E','X','R'),
+ CODEC_ID_AVRP = MKBETAG('A','V','R','P'),
+
+ CODEC_ID_G2M = MKBETAG( 0 ,'G','2','M'),
+ CODEC_ID_AVUI = MKBETAG('A','V','U','I'),
+ CODEC_ID_AYUV = MKBETAG('A','Y','U','V'),
+ CODEC_ID_V308 = MKBETAG('V','3','0','8'),
+ CODEC_ID_V408 = MKBETAG('V','4','0','8'),
+ CODEC_ID_YUV4 = MKBETAG('Y','U','V','4'),
+ CODEC_ID_SANM = MKBETAG('S','A','N','M'),
+ CODEC_ID_PAF_VIDEO = MKBETAG('P','A','F','V'),
+
+ /* various PCM "codecs" */
+ CODEC_ID_FIRST_AUDIO = 0x10000, ///< A dummy id pointing at the start of audio codecs
+ CODEC_ID_PCM_S16LE = 0x10000,
+ CODEC_ID_PCM_S16BE,
+ CODEC_ID_PCM_U16LE,
+ CODEC_ID_PCM_U16BE,
+ CODEC_ID_PCM_S8,
+ CODEC_ID_PCM_U8,
+ CODEC_ID_PCM_MULAW,
+ CODEC_ID_PCM_ALAW,
+ CODEC_ID_PCM_S32LE,
+ CODEC_ID_PCM_S32BE,
+ CODEC_ID_PCM_U32LE,
+ CODEC_ID_PCM_U32BE,
+ CODEC_ID_PCM_S24LE,
+ CODEC_ID_PCM_S24BE,
+ CODEC_ID_PCM_U24LE,
+ CODEC_ID_PCM_U24BE,
+ CODEC_ID_PCM_S24DAUD,
+ CODEC_ID_PCM_ZORK,
+ CODEC_ID_PCM_S16LE_PLANAR,
+ CODEC_ID_PCM_DVD,
+ CODEC_ID_PCM_F32BE,
+ CODEC_ID_PCM_F32LE,
+ CODEC_ID_PCM_F64BE,
+ CODEC_ID_PCM_F64LE,
+ CODEC_ID_PCM_BLURAY,
+ CODEC_ID_PCM_LXF,
+ CODEC_ID_S302M,
+ CODEC_ID_PCM_S8_PLANAR,
+
+ /* various ADPCM codecs */
+ CODEC_ID_ADPCM_IMA_QT = 0x11000,
+ CODEC_ID_ADPCM_IMA_WAV,
+ CODEC_ID_ADPCM_IMA_DK3,
+ CODEC_ID_ADPCM_IMA_DK4,
+ CODEC_ID_ADPCM_IMA_WS,
+ CODEC_ID_ADPCM_IMA_SMJPEG,
+ CODEC_ID_ADPCM_MS,
+ CODEC_ID_ADPCM_4XM,
+ CODEC_ID_ADPCM_XA,
+ CODEC_ID_ADPCM_ADX,
+ CODEC_ID_ADPCM_EA,
+ CODEC_ID_ADPCM_G726,
+ CODEC_ID_ADPCM_CT,
+ CODEC_ID_ADPCM_SWF,
+ CODEC_ID_ADPCM_YAMAHA,
+ CODEC_ID_ADPCM_SBPRO_4,
+ CODEC_ID_ADPCM_SBPRO_3,
+ CODEC_ID_ADPCM_SBPRO_2,
+ CODEC_ID_ADPCM_THP,
+ CODEC_ID_ADPCM_IMA_AMV,
+ CODEC_ID_ADPCM_EA_R1,
+ CODEC_ID_ADPCM_EA_R3,
+ CODEC_ID_ADPCM_EA_R2,
+ CODEC_ID_ADPCM_IMA_EA_SEAD,
+ CODEC_ID_ADPCM_IMA_EA_EACS,
+ CODEC_ID_ADPCM_EA_XAS,
+ CODEC_ID_ADPCM_EA_MAXIS_XA,
+ CODEC_ID_ADPCM_IMA_ISS,
+ CODEC_ID_ADPCM_G722,
+ CODEC_ID_ADPCM_IMA_APC,
+ CODEC_ID_VIMA = MKBETAG('V','I','M','A'),
+
+ /* AMR */
+ CODEC_ID_AMR_NB = 0x12000,
+ CODEC_ID_AMR_WB,
+
+ /* RealAudio codecs*/
+ CODEC_ID_RA_144 = 0x13000,
+ CODEC_ID_RA_288,
+
+ /* various DPCM codecs */
+ CODEC_ID_ROQ_DPCM = 0x14000,
+ CODEC_ID_INTERPLAY_DPCM,
+ CODEC_ID_XAN_DPCM,
+ CODEC_ID_SOL_DPCM,
+
+ /* audio codecs */
+ CODEC_ID_MP2 = 0x15000,
+ CODEC_ID_MP3, ///< preferred ID for decoding MPEG audio layer 1, 2 or 3
+ CODEC_ID_AAC,
+ CODEC_ID_AC3,
+ CODEC_ID_DTS,
+ CODEC_ID_VORBIS,
+ CODEC_ID_DVAUDIO,
+ CODEC_ID_WMAV1,
+ CODEC_ID_WMAV2,
+ CODEC_ID_MACE3,
+ CODEC_ID_MACE6,
+ CODEC_ID_VMDAUDIO,
+ CODEC_ID_FLAC,
+ CODEC_ID_MP3ADU,
+ CODEC_ID_MP3ON4,
+ CODEC_ID_SHORTEN,
+ CODEC_ID_ALAC,
+ CODEC_ID_WESTWOOD_SND1,
+ CODEC_ID_GSM, ///< as in Berlin toast format
+ CODEC_ID_QDM2,
+ CODEC_ID_COOK,
+ CODEC_ID_TRUESPEECH,
+ CODEC_ID_TTA,
+ CODEC_ID_SMACKAUDIO,
+ CODEC_ID_QCELP,
+ CODEC_ID_WAVPACK,
+ CODEC_ID_DSICINAUDIO,
+ CODEC_ID_IMC,
+ CODEC_ID_MUSEPACK7,
+ CODEC_ID_MLP,
+ CODEC_ID_GSM_MS, /* as found in WAV */
+ CODEC_ID_ATRAC3,
+ CODEC_ID_VOXWARE,
+ CODEC_ID_APE,
+ CODEC_ID_NELLYMOSER,
+ CODEC_ID_MUSEPACK8,
+ CODEC_ID_SPEEX,
+ CODEC_ID_WMAVOICE,
+ CODEC_ID_WMAPRO,
+ CODEC_ID_WMALOSSLESS,
+ CODEC_ID_ATRAC3P,
+ CODEC_ID_EAC3,
+ CODEC_ID_SIPR,
+ CODEC_ID_MP1,
+ CODEC_ID_TWINVQ,
+ CODEC_ID_TRUEHD,
+ CODEC_ID_MP4ALS,
+ CODEC_ID_ATRAC1,
+ CODEC_ID_BINKAUDIO_RDFT,
+ CODEC_ID_BINKAUDIO_DCT,
+ CODEC_ID_AAC_LATM,
+ CODEC_ID_QDMC,
+ CODEC_ID_CELT,
+ CODEC_ID_G723_1,
+ CODEC_ID_G729,
+ CODEC_ID_8SVX_EXP,
+ CODEC_ID_8SVX_FIB,
+ CODEC_ID_BMV_AUDIO,
+ CODEC_ID_RALF,
+ CODEC_ID_IAC,
+ CODEC_ID_ILBC,
+ CODEC_ID_FFWAVESYNTH = MKBETAG('F','F','W','S'),
+ CODEC_ID_8SVX_RAW = MKBETAG('8','S','V','X'),
+ CODEC_ID_SONIC = MKBETAG('S','O','N','C'),
+ CODEC_ID_SONIC_LS = MKBETAG('S','O','N','L'),
+ CODEC_ID_PAF_AUDIO = MKBETAG('P','A','F','A'),
+ CODEC_ID_OPUS = MKBETAG('O','P','U','S'),
+
+ /* subtitle codecs */
+ CODEC_ID_FIRST_SUBTITLE = 0x17000, ///< A dummy ID pointing at the start of subtitle codecs.
+ CODEC_ID_DVD_SUBTITLE = 0x17000,
+ CODEC_ID_DVB_SUBTITLE,
+ CODEC_ID_TEXT, ///< raw UTF-8 text
+ CODEC_ID_XSUB,
+ CODEC_ID_SSA,
+ CODEC_ID_MOV_TEXT,
+ CODEC_ID_HDMV_PGS_SUBTITLE,
+ CODEC_ID_DVB_TELETEXT,
+ CODEC_ID_SRT,
+ CODEC_ID_MICRODVD = MKBETAG('m','D','V','D'),
+ CODEC_ID_EIA_608 = MKBETAG('c','6','0','8'),
+ CODEC_ID_JACOSUB = MKBETAG('J','S','U','B'),
+ CODEC_ID_SAMI = MKBETAG('S','A','M','I'),
+ CODEC_ID_REALTEXT = MKBETAG('R','T','X','T'),
+ CODEC_ID_SUBVIEWER = MKBETAG('S','u','b','V'),
+
+ /* other specific kind of codecs (generally used for attachments) */
+ CODEC_ID_FIRST_UNKNOWN = 0x18000, ///< A dummy ID pointing at the start of various fake codecs.
+ CODEC_ID_TTF = 0x18000,
+ CODEC_ID_BINTEXT = MKBETAG('B','T','X','T'),
+ CODEC_ID_XBIN = MKBETAG('X','B','I','N'),
+ CODEC_ID_IDF = MKBETAG( 0 ,'I','D','F'),
+
+ CODEC_ID_PROBE = 0x19000, ///< codec_id is not known (like CODEC_ID_NONE) but lavf should attempt to identify it
+
+ CODEC_ID_MPEG2TS = 0x20000, /**< _FAKE_ codec to indicate a raw MPEG-2 TS
+ * stream (only used by libavformat) */
+ CODEC_ID_MPEG4SYSTEMS = 0x20001, /**< _FAKE_ codec to indicate a MPEG-4 Systems
+ * stream (only used by libavformat) */
+ CODEC_ID_FFMETADATA = 0x21000, ///< Dummy codec for streams containing only metadata information.
+} attribute_deprecated;
+
+#endif /* AVCODEC_OLD_CODEC_IDS_H */
diff --git a/libavcodec/paf.c b/libavcodec/paf.c
index 5428883454..8b3c46f66b 100644
--- a/libavcodec/paf.c
+++ b/libavcodec/paf.c
@@ -431,7 +431,7 @@ static int paf_aud_decode(AVCodecContext *avctx, void *data,
AVCodec ff_paf_video_decoder = {
.name = "paf_video",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_PAF_VIDEO,
+ .id = AV_CODEC_ID_PAF_VIDEO,
.priv_data_size = sizeof(PAFVideoDecContext),
.init = paf_vid_init,
.close = paf_vid_close,
@@ -443,7 +443,7 @@ AVCodec ff_paf_video_decoder = {
AVCodec ff_paf_audio_decoder = {
.name = "paf_audio",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_PAF_AUDIO,
+ .id = AV_CODEC_ID_PAF_AUDIO,
.priv_data_size = sizeof(PAFAudioDecContext),
.init = paf_aud_init,
.decode = paf_aud_decode,
diff --git a/libavcodec/pamenc.c b/libavcodec/pamenc.c
index 930fdd6912..a43aa55ffb 100644
--- a/libavcodec/pamenc.c
+++ b/libavcodec/pamenc.c
@@ -132,7 +132,7 @@ static int pam_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
AVCodec ff_pam_encoder = {
.name = "pam",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_PAM,
+ .id = AV_CODEC_ID_PAM,
.priv_data_size = sizeof(PNMContext),
.init = ff_pnm_init,
.encode2 = pam_encode_frame,
diff --git a/libavcodec/parser.c b/libavcodec/parser.c
index 9d1d2aba94..f081945d26 100644
--- a/libavcodec/parser.c
+++ b/libavcodec/parser.c
@@ -41,7 +41,7 @@ AVCodecParserContext *av_parser_init(int codec_id)
AVCodecParser *parser;
int ret;
- if(codec_id == CODEC_ID_NONE)
+ if(codec_id == AV_CODEC_ID_NONE)
return NULL;
for(parser = av_first_parser; parser != NULL; parser = parser->next) {
diff --git a/libavcodec/pcm-mpeg.c b/libavcodec/pcm-mpeg.c
index 832f301c35..032bdae861 100644
--- a/libavcodec/pcm-mpeg.c
+++ b/libavcodec/pcm-mpeg.c
@@ -318,7 +318,7 @@ static int pcm_bluray_decode_frame(AVCodecContext *avctx, void *data,
AVCodec ff_pcm_bluray_decoder = {
.name = "pcm_bluray",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_PCM_BLURAY,
+ .id = AV_CODEC_ID_PCM_BLURAY,
.priv_data_size = sizeof(PCMBRDecode),
.init = pcm_bluray_decode_init,
.decode = pcm_bluray_decode_frame,
diff --git a/libavcodec/pcm.c b/libavcodec/pcm.c
index 826267fdb2..cc94a5e247 100644
--- a/libavcodec/pcm.c
+++ b/libavcodec/pcm.c
@@ -36,10 +36,10 @@ static av_cold int pcm_encode_init(AVCodecContext *avctx)
{
avctx->frame_size = 0;
switch (avctx->codec->id) {
- case CODEC_ID_PCM_ALAW:
+ case AV_CODEC_ID_PCM_ALAW:
pcm_alaw_tableinit();
break;
- case CODEC_ID_PCM_MULAW:
+ case AV_CODEC_ID_PCM_MULAW:
pcm_ulaw_tableinit();
break;
default:
@@ -102,25 +102,25 @@ static int pcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
dst = avpkt->data;
switch (avctx->codec->id) {
- case CODEC_ID_PCM_U32LE:
+ case AV_CODEC_ID_PCM_U32LE:
ENCODE(uint32_t, le32, samples, dst, n, 0, 0x80000000)
break;
- case CODEC_ID_PCM_U32BE:
+ case AV_CODEC_ID_PCM_U32BE:
ENCODE(uint32_t, be32, samples, dst, n, 0, 0x80000000)
break;
- case CODEC_ID_PCM_S24LE:
+ case AV_CODEC_ID_PCM_S24LE:
ENCODE(int32_t, le24, samples, dst, n, 8, 0)
break;
- case CODEC_ID_PCM_S24BE:
+ case AV_CODEC_ID_PCM_S24BE:
ENCODE(int32_t, be24, samples, dst, n, 8, 0)
break;
- case CODEC_ID_PCM_U24LE:
+ case AV_CODEC_ID_PCM_U24LE:
ENCODE(uint32_t, le24, samples, dst, n, 8, 0x800000)
break;
- case CODEC_ID_PCM_U24BE:
+ case AV_CODEC_ID_PCM_U24BE:
ENCODE(uint32_t, be24, samples, dst, n, 8, 0x800000)
break;
- case CODEC_ID_PCM_S24DAUD:
+ case AV_CODEC_ID_PCM_S24DAUD:
for (; n > 0; n--) {
uint32_t tmp = av_reverse[(*samples >> 8) & 0xff] +
(av_reverse[*samples & 0xff] << 8);
@@ -129,13 +129,13 @@ static int pcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
samples++;
}
break;
- case CODEC_ID_PCM_U16LE:
+ case AV_CODEC_ID_PCM_U16LE:
ENCODE(uint16_t, le16, samples, dst, n, 0, 0x8000)
break;
- case CODEC_ID_PCM_U16BE:
+ case AV_CODEC_ID_PCM_U16BE:
ENCODE(uint16_t, be16, samples, dst, n, 0, 0x8000)
break;
- case CODEC_ID_PCM_S8:
+ case AV_CODEC_ID_PCM_S8:
srcu8 = frame->data[0];
for (; n > 0; n--) {
v = *srcu8++;
@@ -143,47 +143,47 @@ static int pcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
}
break;
#if HAVE_BIGENDIAN
- case CODEC_ID_PCM_F64LE:
+ case AV_CODEC_ID_PCM_F64LE:
ENCODE(int64_t, le64, samples, dst, n, 0, 0)
break;
- case CODEC_ID_PCM_S32LE:
- case CODEC_ID_PCM_F32LE:
+ case AV_CODEC_ID_PCM_S32LE:
+ case AV_CODEC_ID_PCM_F32LE:
ENCODE(int32_t, le32, samples, dst, n, 0, 0)
break;
- case CODEC_ID_PCM_S16LE:
+ case AV_CODEC_ID_PCM_S16LE:
ENCODE(int16_t, le16, samples, dst, n, 0, 0)
break;
- case CODEC_ID_PCM_F64BE:
- case CODEC_ID_PCM_F32BE:
- case CODEC_ID_PCM_S32BE:
- case CODEC_ID_PCM_S16BE:
+ case AV_CODEC_ID_PCM_F64BE:
+ case AV_CODEC_ID_PCM_F32BE:
+ case AV_CODEC_ID_PCM_S32BE:
+ case AV_CODEC_ID_PCM_S16BE:
#else
- case CODEC_ID_PCM_F64BE:
+ case AV_CODEC_ID_PCM_F64BE:
ENCODE(int64_t, be64, samples, dst, n, 0, 0)
break;
- case CODEC_ID_PCM_F32BE:
- case CODEC_ID_PCM_S32BE:
+ case AV_CODEC_ID_PCM_F32BE:
+ case AV_CODEC_ID_PCM_S32BE:
ENCODE(int32_t, be32, samples, dst, n, 0, 0)
break;
- case CODEC_ID_PCM_S16BE:
+ case AV_CODEC_ID_PCM_S16BE:
ENCODE(int16_t, be16, samples, dst, n, 0, 0)
break;
- case CODEC_ID_PCM_F64LE:
- case CODEC_ID_PCM_F32LE:
- case CODEC_ID_PCM_S32LE:
- case CODEC_ID_PCM_S16LE:
+ case AV_CODEC_ID_PCM_F64LE:
+ case AV_CODEC_ID_PCM_F32LE:
+ case AV_CODEC_ID_PCM_S32LE:
+ case AV_CODEC_ID_PCM_S16LE:
#endif /* HAVE_BIGENDIAN */
- case CODEC_ID_PCM_U8:
+ case AV_CODEC_ID_PCM_U8:
memcpy(dst, samples, n * sample_size);
dst += n * sample_size;
break;
- case CODEC_ID_PCM_ALAW:
+ case AV_CODEC_ID_PCM_ALAW:
for (; n > 0; n--) {
v = *samples++;
*dst++ = linear_to_alaw[(v + 32768) >> 2];
}
break;
- case CODEC_ID_PCM_MULAW:
+ case AV_CODEC_ID_PCM_MULAW:
for (; n > 0; n--) {
v = *samples++;
*dst++ = linear_to_ulaw[(v + 32768) >> 2];
@@ -213,11 +213,11 @@ static av_cold int pcm_decode_init(AVCodecContext *avctx)
}
switch (avctx->codec->id) {
- case CODEC_ID_PCM_ALAW:
+ case AV_CODEC_ID_PCM_ALAW:
for (i = 0; i < 256; i++)
s->table[i] = alaw2linear(i);
break;
- case CODEC_ID_PCM_MULAW:
+ case AV_CODEC_ID_PCM_MULAW:
for (i = 0; i < 256; i++)
s->table[i] = ulaw2linear(i);
break;
@@ -265,9 +265,9 @@ static int pcm_decode_frame(AVCodecContext *avctx, void *data,
sample_size = av_get_bits_per_sample(avctx->codec_id) / 8;
- /* av_get_bits_per_sample returns 0 for CODEC_ID_PCM_DVD */
+ /* av_get_bits_per_sample returns 0 for AV_CODEC_ID_PCM_DVD */
samples_per_block = 1;
- if (CODEC_ID_PCM_DVD == avctx->codec_id) {
+ if (AV_CODEC_ID_PCM_DVD == avctx->codec_id) {
if (avctx->bits_per_coded_sample != 20 &&
avctx->bits_per_coded_sample != 24) {
av_log(avctx, AV_LOG_ERROR,
@@ -278,7 +278,7 @@ static int pcm_decode_frame(AVCodecContext *avctx, void *data,
/* 2 samples are interleaved per block in PCM_DVD */
samples_per_block = 2;
sample_size = avctx->bits_per_coded_sample * 2 / 8;
- } else if (avctx->codec_id == CODEC_ID_PCM_LXF) {
+ } else if (avctx->codec_id == AV_CODEC_ID_PCM_LXF) {
/* we process 40-bit blocks per channel for LXF */
samples_per_block = 2;
sample_size = 5;
@@ -312,25 +312,25 @@ static int pcm_decode_frame(AVCodecContext *avctx, void *data,
samples = s->frame.data[0];
switch (avctx->codec->id) {
- case CODEC_ID_PCM_U32LE:
+ case AV_CODEC_ID_PCM_U32LE:
DECODE(32, le32, src, samples, n, 0, 0x80000000)
break;
- case CODEC_ID_PCM_U32BE:
+ case AV_CODEC_ID_PCM_U32BE:
DECODE(32, be32, src, samples, n, 0, 0x80000000)
break;
- case CODEC_ID_PCM_S24LE:
+ case AV_CODEC_ID_PCM_S24LE:
DECODE(32, le24, src, samples, n, 8, 0)
break;
- case CODEC_ID_PCM_S24BE:
+ case AV_CODEC_ID_PCM_S24BE:
DECODE(32, be24, src, samples, n, 8, 0)
break;
- case CODEC_ID_PCM_U24LE:
+ case AV_CODEC_ID_PCM_U24LE:
DECODE(32, le24, src, samples, n, 8, 0x800000)
break;
- case CODEC_ID_PCM_U24BE:
+ case AV_CODEC_ID_PCM_U24BE:
DECODE(32, be24, src, samples, n, 8, 0x800000)
break;
- case CODEC_ID_PCM_S24DAUD:
+ case AV_CODEC_ID_PCM_S24DAUD:
for (; n > 0; n--) {
uint32_t v = bytestream_get_be24(&src);
v >>= 4; // sync flags are here
@@ -339,7 +339,7 @@ static int pcm_decode_frame(AVCodecContext *avctx, void *data,
samples += 2;
}
break;
- case CODEC_ID_PCM_S16LE_PLANAR:
+ case AV_CODEC_ID_PCM_S16LE_PLANAR:
{
int i;
n /= avctx->channels;
@@ -352,51 +352,51 @@ static int pcm_decode_frame(AVCodecContext *avctx, void *data,
}
break;
}
- case CODEC_ID_PCM_U16LE:
+ case AV_CODEC_ID_PCM_U16LE:
DECODE(16, le16, src, samples, n, 0, 0x8000)
break;
- case CODEC_ID_PCM_U16BE:
+ case AV_CODEC_ID_PCM_U16BE:
DECODE(16, be16, src, samples, n, 0, 0x8000)
break;
- case CODEC_ID_PCM_S8:
+ case AV_CODEC_ID_PCM_S8:
for (; n > 0; n--)
*samples++ = *src++ + 128;
break;
#if HAVE_BIGENDIAN
- case CODEC_ID_PCM_F64LE:
+ case AV_CODEC_ID_PCM_F64LE:
DECODE(64, le64, src, samples, n, 0, 0)
break;
- case CODEC_ID_PCM_S32LE:
- case CODEC_ID_PCM_F32LE:
+ case AV_CODEC_ID_PCM_S32LE:
+ case AV_CODEC_ID_PCM_F32LE:
DECODE(32, le32, src, samples, n, 0, 0)
break;
- case CODEC_ID_PCM_S16LE:
+ case AV_CODEC_ID_PCM_S16LE:
DECODE(16, le16, src, samples, n, 0, 0)
break;
- case CODEC_ID_PCM_F64BE:
- case CODEC_ID_PCM_F32BE:
- case CODEC_ID_PCM_S32BE:
- case CODEC_ID_PCM_S16BE:
+ case AV_CODEC_ID_PCM_F64BE:
+ case AV_CODEC_ID_PCM_F32BE:
+ case AV_CODEC_ID_PCM_S32BE:
+ case AV_CODEC_ID_PCM_S16BE:
#else
- case CODEC_ID_PCM_F64BE:
+ case AV_CODEC_ID_PCM_F64BE:
DECODE(64, be64, src, samples, n, 0, 0)
break;
- case CODEC_ID_PCM_F32BE:
- case CODEC_ID_PCM_S32BE:
+ case AV_CODEC_ID_PCM_F32BE:
+ case AV_CODEC_ID_PCM_S32BE:
DECODE(32, be32, src, samples, n, 0, 0)
break;
- case CODEC_ID_PCM_S16BE:
+ case AV_CODEC_ID_PCM_S16BE:
DECODE(16, be16, src, samples, n, 0, 0)
break;
- case CODEC_ID_PCM_F64LE:
- case CODEC_ID_PCM_F32LE:
- case CODEC_ID_PCM_S32LE:
- case CODEC_ID_PCM_S16LE:
+ case AV_CODEC_ID_PCM_F64LE:
+ case AV_CODEC_ID_PCM_F32LE:
+ case AV_CODEC_ID_PCM_S32LE:
+ case AV_CODEC_ID_PCM_S16LE:
#endif /* HAVE_BIGENDIAN */
- case CODEC_ID_PCM_U8:
+ case AV_CODEC_ID_PCM_U8:
memcpy(samples, src, n * sample_size);
break;
- case CODEC_ID_PCM_ZORK:
+ case AV_CODEC_ID_PCM_ZORK:
for (; n > 0; n--) {
int v = *src++;
if (v < 128)
@@ -404,14 +404,14 @@ static int pcm_decode_frame(AVCodecContext *avctx, void *data,
*samples++ = v;
}
break;
- case CODEC_ID_PCM_ALAW:
- case CODEC_ID_PCM_MULAW:
+ case AV_CODEC_ID_PCM_ALAW:
+ case AV_CODEC_ID_PCM_MULAW:
for (; n > 0; n--) {
AV_WN16A(samples, s->table[*src++]);
samples += 2;
}
break;
- case CODEC_ID_PCM_DVD:
+ case AV_CODEC_ID_PCM_DVD:
{
const uint8_t *src8;
dst_int32_t = (int32_t *)s->frame.data[0];
@@ -442,7 +442,7 @@ static int pcm_decode_frame(AVCodecContext *avctx, void *data,
}
break;
}
- case CODEC_ID_PCM_LXF:
+ case AV_CODEC_ID_PCM_LXF:
{
int i;
n /= avctx->channels;
@@ -518,29 +518,29 @@ AVCodec ff_ ## name_ ## _decoder = { \
PCM_DECODER(id, sample_fmt_, name, long_name_)
/* Note: Do not forget to add new entries to the Makefile as well. */
-PCM_CODEC (CODEC_ID_PCM_ALAW, AV_SAMPLE_FMT_S16, pcm_alaw, "PCM A-law / G.711 A-law");
-PCM_DECODER(CODEC_ID_PCM_DVD, AV_SAMPLE_FMT_S32, pcm_dvd, "PCM signed 20|24-bit big-endian");
-PCM_CODEC (CODEC_ID_PCM_F32BE, AV_SAMPLE_FMT_FLT, pcm_f32be, "PCM 32-bit floating point big-endian");
-PCM_CODEC (CODEC_ID_PCM_F32LE, AV_SAMPLE_FMT_FLT, pcm_f32le, "PCM 32-bit floating point little-endian");
-PCM_CODEC (CODEC_ID_PCM_F64BE, AV_SAMPLE_FMT_DBL, pcm_f64be, "PCM 64-bit floating point big-endian");
-PCM_CODEC (CODEC_ID_PCM_F64LE, AV_SAMPLE_FMT_DBL, pcm_f64le, "PCM 64-bit floating point little-endian");
-PCM_DECODER(CODEC_ID_PCM_LXF, AV_SAMPLE_FMT_S32P,pcm_lxf, "PCM signed 20-bit little-endian planar");
-PCM_CODEC (CODEC_ID_PCM_MULAW, AV_SAMPLE_FMT_S16, pcm_mulaw, "PCM mu-law / G.711 mu-law");
-PCM_CODEC (CODEC_ID_PCM_S8, AV_SAMPLE_FMT_U8, pcm_s8, "PCM signed 8-bit");
-PCM_CODEC (CODEC_ID_PCM_S16BE, AV_SAMPLE_FMT_S16, pcm_s16be, "PCM signed 16-bit big-endian");
-PCM_CODEC (CODEC_ID_PCM_S16LE, AV_SAMPLE_FMT_S16, pcm_s16le, "PCM signed 16-bit little-endian");
-PCM_DECODER(CODEC_ID_PCM_S16LE_PLANAR, AV_SAMPLE_FMT_S16P,pcm_s16le_planar, "PCM 16-bit little-endian planar");
-PCM_CODEC (CODEC_ID_PCM_S24BE, AV_SAMPLE_FMT_S32, pcm_s24be, "PCM signed 24-bit big-endian");
-PCM_CODEC (CODEC_ID_PCM_S24DAUD, AV_SAMPLE_FMT_S16, pcm_s24daud, "PCM D-Cinema audio signed 24-bit");
-PCM_CODEC (CODEC_ID_PCM_S24LE, AV_SAMPLE_FMT_S32, pcm_s24le, "PCM signed 24-bit little-endian");
-PCM_CODEC (CODEC_ID_PCM_S32BE, AV_SAMPLE_FMT_S32, pcm_s32be, "PCM signed 32-bit big-endian");
-PCM_CODEC (CODEC_ID_PCM_S32LE, AV_SAMPLE_FMT_S32, pcm_s32le, "PCM signed 32-bit little-endian");
-PCM_CODEC (CODEC_ID_PCM_U8, AV_SAMPLE_FMT_U8, pcm_u8, "PCM unsigned 8-bit");
-PCM_CODEC (CODEC_ID_PCM_U16BE, AV_SAMPLE_FMT_S16, pcm_u16be, "PCM unsigned 16-bit big-endian");
-PCM_CODEC (CODEC_ID_PCM_U16LE, AV_SAMPLE_FMT_S16, pcm_u16le, "PCM unsigned 16-bit little-endian");
-PCM_CODEC (CODEC_ID_PCM_U24BE, AV_SAMPLE_FMT_S32, pcm_u24be, "PCM unsigned 24-bit big-endian");
-PCM_CODEC (CODEC_ID_PCM_U24LE, AV_SAMPLE_FMT_S32, pcm_u24le, "PCM unsigned 24-bit little-endian");
-PCM_CODEC (CODEC_ID_PCM_U32BE, AV_SAMPLE_FMT_S32, pcm_u32be, "PCM unsigned 32-bit big-endian");
-PCM_CODEC (CODEC_ID_PCM_U32LE, AV_SAMPLE_FMT_S32, pcm_u32le, "PCM unsigned 32-bit little-endian");
-PCM_DECODER(CODEC_ID_PCM_ZORK, AV_SAMPLE_FMT_U8, pcm_zork, "PCM Zork");
+PCM_CODEC (AV_CODEC_ID_PCM_ALAW, AV_SAMPLE_FMT_S16, pcm_alaw, "PCM A-law / G.711 A-law");
+PCM_DECODER(AV_CODEC_ID_PCM_DVD, AV_SAMPLE_FMT_S32, pcm_dvd, "PCM signed 20|24-bit big-endian");
+PCM_CODEC (AV_CODEC_ID_PCM_F32BE, AV_SAMPLE_FMT_FLT, pcm_f32be, "PCM 32-bit floating point big-endian");
+PCM_CODEC (AV_CODEC_ID_PCM_F32LE, AV_SAMPLE_FMT_FLT, pcm_f32le, "PCM 32-bit floating point little-endian");
+PCM_CODEC (AV_CODEC_ID_PCM_F64BE, AV_SAMPLE_FMT_DBL, pcm_f64be, "PCM 64-bit floating point big-endian");
+PCM_CODEC (AV_CODEC_ID_PCM_F64LE, AV_SAMPLE_FMT_DBL, pcm_f64le, "PCM 64-bit floating point little-endian");
+PCM_DECODER(AV_CODEC_ID_PCM_LXF, AV_SAMPLE_FMT_S32P,pcm_lxf, "PCM signed 20-bit little-endian planar");
+PCM_CODEC (AV_CODEC_ID_PCM_MULAW, AV_SAMPLE_FMT_S16, pcm_mulaw, "PCM mu-law / G.711 mu-law");
+PCM_CODEC (AV_CODEC_ID_PCM_S8, AV_SAMPLE_FMT_U8, pcm_s8, "PCM signed 8-bit");
+PCM_CODEC (AV_CODEC_ID_PCM_S16BE, AV_SAMPLE_FMT_S16, pcm_s16be, "PCM signed 16-bit big-endian");
+PCM_CODEC (AV_CODEC_ID_PCM_S16LE, AV_SAMPLE_FMT_S16, pcm_s16le, "PCM signed 16-bit little-endian");
+PCM_DECODER(AV_CODEC_ID_PCM_S16LE_PLANAR, AV_SAMPLE_FMT_S16P,pcm_s16le_planar, "PCM 16-bit little-endian planar");
+PCM_CODEC (AV_CODEC_ID_PCM_S24BE, AV_SAMPLE_FMT_S32, pcm_s24be, "PCM signed 24-bit big-endian");
+PCM_CODEC (AV_CODEC_ID_PCM_S24DAUD, AV_SAMPLE_FMT_S16, pcm_s24daud, "PCM D-Cinema audio signed 24-bit");
+PCM_CODEC (AV_CODEC_ID_PCM_S24LE, AV_SAMPLE_FMT_S32, pcm_s24le, "PCM signed 24-bit little-endian");
+PCM_CODEC (AV_CODEC_ID_PCM_S32BE, AV_SAMPLE_FMT_S32, pcm_s32be, "PCM signed 32-bit big-endian");
+PCM_CODEC (AV_CODEC_ID_PCM_S32LE, AV_SAMPLE_FMT_S32, pcm_s32le, "PCM signed 32-bit little-endian");
+PCM_CODEC (AV_CODEC_ID_PCM_U8, AV_SAMPLE_FMT_U8, pcm_u8, "PCM unsigned 8-bit");
+PCM_CODEC (AV_CODEC_ID_PCM_U16BE, AV_SAMPLE_FMT_S16, pcm_u16be, "PCM unsigned 16-bit big-endian");
+PCM_CODEC (AV_CODEC_ID_PCM_U16LE, AV_SAMPLE_FMT_S16, pcm_u16le, "PCM unsigned 16-bit little-endian");
+PCM_CODEC (AV_CODEC_ID_PCM_U24BE, AV_SAMPLE_FMT_S32, pcm_u24be, "PCM unsigned 24-bit big-endian");
+PCM_CODEC (AV_CODEC_ID_PCM_U24LE, AV_SAMPLE_FMT_S32, pcm_u24le, "PCM unsigned 24-bit little-endian");
+PCM_CODEC (AV_CODEC_ID_PCM_U32BE, AV_SAMPLE_FMT_S32, pcm_u32be, "PCM unsigned 32-bit big-endian");
+PCM_CODEC (AV_CODEC_ID_PCM_U32LE, AV_SAMPLE_FMT_S32, pcm_u32le, "PCM unsigned 32-bit little-endian");
+PCM_DECODER(AV_CODEC_ID_PCM_ZORK, AV_SAMPLE_FMT_U8, pcm_zork, "PCM Zork");
diff --git a/libavcodec/pcx.c b/libavcodec/pcx.c
index 0db924a950..1833f6d204 100644
--- a/libavcodec/pcx.c
+++ b/libavcodec/pcx.c
@@ -253,7 +253,7 @@ static av_cold int pcx_end(AVCodecContext *avctx) {
AVCodec ff_pcx_decoder = {
.name = "pcx",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_PCX,
+ .id = AV_CODEC_ID_PCX,
.priv_data_size = sizeof(PCXContext),
.init = pcx_init,
.close = pcx_end,
diff --git a/libavcodec/pcxenc.c b/libavcodec/pcxenc.c
index 5edb2623b1..63c7d23ddc 100644
--- a/libavcodec/pcxenc.c
+++ b/libavcodec/pcxenc.c
@@ -210,7 +210,7 @@ static int pcx_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
AVCodec ff_pcx_encoder = {
.name = "pcx",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_PCX,
+ .id = AV_CODEC_ID_PCX,
.priv_data_size = sizeof(PCXContext),
.init = pcx_encode_init,
.encode2 = pcx_encode_frame,
diff --git a/libavcodec/pgssubdec.c b/libavcodec/pgssubdec.c
index 4fb1e7dc8a..acbc92fa3b 100644
--- a/libavcodec/pgssubdec.c
+++ b/libavcodec/pgssubdec.c
@@ -525,7 +525,7 @@ static const AVClass pgsdec_class = {
AVCodec ff_pgssub_decoder = {
.name = "pgssub",
.type = AVMEDIA_TYPE_SUBTITLE,
- .id = CODEC_ID_HDMV_PGS_SUBTITLE,
+ .id = AV_CODEC_ID_HDMV_PGS_SUBTITLE,
.priv_data_size = sizeof(PGSSubContext),
.init = init_decoder,
.close = close_decoder,
diff --git a/libavcodec/pictordec.c b/libavcodec/pictordec.c
index 71780379fa..5d1e6eeca4 100644
--- a/libavcodec/pictordec.c
+++ b/libavcodec/pictordec.c
@@ -264,7 +264,7 @@ static av_cold int decode_end(AVCodecContext *avctx)
AVCodec ff_pictor_decoder = {
.name = "pictor",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_PICTOR,
+ .id = AV_CODEC_ID_PICTOR,
.priv_data_size = sizeof(PicContext),
.init = decode_init,
.close = decode_end,
diff --git a/libavcodec/png_parser.c b/libavcodec/png_parser.c
index 877b894e4d..6f153d91d6 100644
--- a/libavcodec/png_parser.c
+++ b/libavcodec/png_parser.c
@@ -113,7 +113,7 @@ flush:
}
AVCodecParser ff_png_parser = {
- .codec_ids = { CODEC_ID_PNG },
+ .codec_ids = { AV_CODEC_ID_PNG },
.priv_data_size = sizeof(PNGParseContext),
.parser_parse = png_parse,
.parser_close = ff_parse_close,
diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c
index 5bfe07ba5d..67225bb7af 100644
--- a/libavcodec/pngdec.c
+++ b/libavcodec/pngdec.c
@@ -741,7 +741,7 @@ static av_cold int png_dec_end(AVCodecContext *avctx)
AVCodec ff_png_decoder = {
.name = "png",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_PNG,
+ .id = AV_CODEC_ID_PNG,
.priv_data_size = sizeof(PNGDecContext),
.init = png_dec_init,
.close = png_dec_end,
diff --git a/libavcodec/pngenc.c b/libavcodec/pngenc.c
index a29d3c95cf..20b3d51619 100644
--- a/libavcodec/pngenc.c
+++ b/libavcodec/pngenc.c
@@ -446,7 +446,7 @@ static av_cold int png_enc_init(AVCodecContext *avctx){
AVCodec ff_png_encoder = {
.name = "png",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_PNG,
+ .id = AV_CODEC_ID_PNG,
.priv_data_size = sizeof(PNGEncContext),
.init = png_enc_init,
.encode2 = encode_frame,
diff --git a/libavcodec/pnm.c b/libavcodec/pnm.c
index 8c0f21887f..d1f39ca2bd 100644
--- a/libavcodec/pnm.c
+++ b/libavcodec/pnm.c
@@ -67,7 +67,7 @@ int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext * const s)
if (s->type==1 || s->type==4) {
avctx->pix_fmt = PIX_FMT_MONOWHITE;
} else if (s->type==2 || s->type==5) {
- if (avctx->codec_id == CODEC_ID_PGMYUV)
+ if (avctx->codec_id == AV_CODEC_ID_PGMYUV)
avctx->pix_fmt = PIX_FMT_YUV420P;
else
avctx->pix_fmt = PIX_FMT_GRAY8;
diff --git a/libavcodec/pnm_parser.c b/libavcodec/pnm_parser.c
index 658469ed32..2a9e3e1cba 100644
--- a/libavcodec/pnm_parser.c
+++ b/libavcodec/pnm_parser.c
@@ -84,8 +84,8 @@ retry:
}
AVCodecParser ff_pnm_parser = {
- .codec_ids = { CODEC_ID_PGM, CODEC_ID_PGMYUV, CODEC_ID_PPM,
- CODEC_ID_PBM, CODEC_ID_PAM },
+ .codec_ids = { AV_CODEC_ID_PGM, AV_CODEC_ID_PGMYUV, AV_CODEC_ID_PPM,
+ AV_CODEC_ID_PBM, AV_CODEC_ID_PAM },
.priv_data_size = sizeof(ParseContext),
.parser_parse = pnm_parse,
.parser_close = ff_parse_close,
diff --git a/libavcodec/pnmdec.c b/libavcodec/pnmdec.c
index c49b019b17..13d5763b54 100644
--- a/libavcodec/pnmdec.c
+++ b/libavcodec/pnmdec.c
@@ -195,7 +195,7 @@ static int pnm_decode_frame(AVCodecContext *avctx, void *data,
AVCodec ff_pgm_decoder = {
.name = "pgm",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_PGM,
+ .id = AV_CODEC_ID_PGM,
.priv_data_size = sizeof(PNMContext),
.init = ff_pnm_init,
.close = ff_pnm_end,
@@ -209,7 +209,7 @@ AVCodec ff_pgm_decoder = {
AVCodec ff_pgmyuv_decoder = {
.name = "pgmyuv",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_PGMYUV,
+ .id = AV_CODEC_ID_PGMYUV,
.priv_data_size = sizeof(PNMContext),
.init = ff_pnm_init,
.close = ff_pnm_end,
@@ -223,7 +223,7 @@ AVCodec ff_pgmyuv_decoder = {
AVCodec ff_ppm_decoder = {
.name = "ppm",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_PPM,
+ .id = AV_CODEC_ID_PPM,
.priv_data_size = sizeof(PNMContext),
.init = ff_pnm_init,
.close = ff_pnm_end,
@@ -237,7 +237,7 @@ AVCodec ff_ppm_decoder = {
AVCodec ff_pbm_decoder = {
.name = "pbm",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_PBM,
+ .id = AV_CODEC_ID_PBM,
.priv_data_size = sizeof(PNMContext),
.init = ff_pnm_init,
.close = ff_pnm_end,
@@ -251,7 +251,7 @@ AVCodec ff_pbm_decoder = {
AVCodec ff_pam_decoder = {
.name = "pam",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_PAM,
+ .id = AV_CODEC_ID_PAM,
.priv_data_size = sizeof(PNMContext),
.init = ff_pnm_init,
.close = ff_pnm_end,
diff --git a/libavcodec/pnmenc.c b/libavcodec/pnmenc.c
index 76e78e1a7b..00d82f5a62 100644
--- a/libavcodec/pnmenc.c
+++ b/libavcodec/pnmenc.c
@@ -123,7 +123,7 @@ static int pnm_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
AVCodec ff_pgm_encoder = {
.name = "pgm",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_PGM,
+ .id = AV_CODEC_ID_PGM,
.priv_data_size = sizeof(PNMContext),
.init = ff_pnm_init,
.encode2 = pnm_encode_frame,
@@ -138,7 +138,7 @@ AVCodec ff_pgm_encoder = {
AVCodec ff_pgmyuv_encoder = {
.name = "pgmyuv",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_PGMYUV,
+ .id = AV_CODEC_ID_PGMYUV,
.priv_data_size = sizeof(PNMContext),
.init = ff_pnm_init,
.encode2 = pnm_encode_frame,
@@ -151,7 +151,7 @@ AVCodec ff_pgmyuv_encoder = {
AVCodec ff_ppm_encoder = {
.name = "ppm",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_PPM,
+ .id = AV_CODEC_ID_PPM,
.priv_data_size = sizeof(PNMContext),
.init = ff_pnm_init,
.encode2 = pnm_encode_frame,
@@ -166,7 +166,7 @@ AVCodec ff_ppm_encoder = {
AVCodec ff_pbm_encoder = {
.name = "pbm",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_PBM,
+ .id = AV_CODEC_ID_PBM,
.priv_data_size = sizeof(PNMContext),
.init = ff_pnm_init,
.encode2 = pnm_encode_frame,
diff --git a/libavcodec/proresdec2.c b/libavcodec/proresdec2.c
index b48259a3cd..0e32a97b16 100644
--- a/libavcodec/proresdec2.c
+++ b/libavcodec/proresdec2.c
@@ -584,7 +584,7 @@ static av_cold int decode_close(AVCodecContext *avctx)
AVCodec ff_prores_decoder = {
.name = "prores",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_PRORES,
+ .id = AV_CODEC_ID_PRORES,
.priv_data_size = sizeof(ProresContext),
.init = decode_init,
.close = decode_close,
diff --git a/libavcodec/proresdec_lgpl.c b/libavcodec/proresdec_lgpl.c
index e358d7f9cb..e672ad228c 100644
--- a/libavcodec/proresdec_lgpl.c
+++ b/libavcodec/proresdec_lgpl.c
@@ -663,7 +663,7 @@ static av_cold int decode_close(AVCodecContext *avctx)
AVCodec ff_prores_lgpl_decoder = {
.name = "prores_lgpl",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_PRORES,
+ .id = AV_CODEC_ID_PRORES,
.priv_data_size = sizeof(ProresContext),
.init = decode_init,
.close = decode_close,
diff --git a/libavcodec/proresenc_anatoliy.c b/libavcodec/proresenc_anatoliy.c
index 2a1b45753b..d151ae52cb 100644
--- a/libavcodec/proresenc_anatoliy.c
+++ b/libavcodec/proresenc_anatoliy.c
@@ -599,7 +599,7 @@ static av_cold int prores_encode_close(AVCodecContext *avctx)
AVCodec ff_prores_anatoliy_encoder = {
.name = "prores_anatoliy",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_PRORES,
+ .id = AV_CODEC_ID_PRORES,
.priv_data_size = sizeof(ProresContext),
.init = prores_encode_init,
.close = prores_encode_close,
@@ -612,7 +612,7 @@ AVCodec ff_prores_anatoliy_encoder = {
AVCodec ff_prores_encoder = {
.name = "prores",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_PRORES,
+ .id = AV_CODEC_ID_PRORES,
.priv_data_size = sizeof(ProresContext),
.init = prores_encode_init,
.close = prores_encode_close,
diff --git a/libavcodec/proresenc_kostya.c b/libavcodec/proresenc_kostya.c
index 638098cd3d..bffc2e7d65 100644
--- a/libavcodec/proresenc_kostya.c
+++ b/libavcodec/proresenc_kostya.c
@@ -1018,7 +1018,7 @@ static const AVClass proresenc_class = {
AVCodec ff_prores_kostya_encoder = {
.name = "prores_kostya",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_PRORES,
+ .id = AV_CODEC_ID_PRORES,
.priv_data_size = sizeof(ProresContext),
.init = encode_init,
.close = encode_close,
diff --git a/libavcodec/psymodel.c b/libavcodec/psymodel.c
index bdd2509f35..cc1da5018a 100644
--- a/libavcodec/psymodel.c
+++ b/libavcodec/psymodel.c
@@ -51,7 +51,7 @@ av_cold int ff_psy_init(FFPsyContext *ctx, AVCodecContext *avctx, int num_lens,
}
switch (ctx->avctx->codec_id) {
- case CODEC_ID_AAC:
+ case AV_CODEC_ID_AAC:
ctx->model = &ff_aac_psy_model;
break;
}
@@ -100,7 +100,7 @@ av_cold struct FFPsyPreprocessContext* ff_psy_preprocess_init(AVCodecContext *av
if (avctx->cutoff > 0)
cutoff_coeff = 2.0 * avctx->cutoff / avctx->sample_rate;
- if (!cutoff_coeff && avctx->codec_id == CODEC_ID_AAC)
+ if (!cutoff_coeff && avctx->codec_id == AV_CODEC_ID_AAC)
cutoff_coeff = 2.0 * AAC_CUTOFF(avctx) / avctx->sample_rate;
if (cutoff_coeff)
diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c
index 8006ae7479..0d97998f13 100644
--- a/libavcodec/pthread.c
+++ b/libavcodec/pthread.c
@@ -384,7 +384,7 @@ static attribute_align_arg void *frame_worker_thread(void *arg)
pthread_mutex_lock(&p->progress_mutex);
for (i = 0; i < MAX_BUFFERS; i++)
- if (p->progress_used[i] && (p->got_frame || p->result<0 || avctx->codec_id != CODEC_ID_H264)) {
+ if (p->progress_used[i] && (p->got_frame || p->result<0 || avctx->codec_id != AV_CODEC_ID_H264)) {
p->progress[i][0] = INT_MAX;
p->progress[i][1] = INT_MAX;
}
diff --git a/libavcodec/ptx.c b/libavcodec/ptx.c
index 6b8dbd329d..b49b9065de 100644
--- a/libavcodec/ptx.c
+++ b/libavcodec/ptx.c
@@ -113,7 +113,7 @@ static av_cold int ptx_end(AVCodecContext *avctx) {
AVCodec ff_ptx_decoder = {
.name = "ptx",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_PTX,
+ .id = AV_CODEC_ID_PTX,
.priv_data_size = sizeof(PTXContext),
.init = ptx_init,
.close = ptx_end,
diff --git a/libavcodec/qcelpdec.c b/libavcodec/qcelpdec.c
index ac5c289c3d..e96f2f2239 100644
--- a/libavcodec/qcelpdec.c
+++ b/libavcodec/qcelpdec.c
@@ -793,7 +793,7 @@ erasure:
AVCodec ff_qcelp_decoder = {
.name = "qcelp",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_QCELP,
+ .id = AV_CODEC_ID_QCELP,
.init = qcelp_decode_init,
.decode = qcelp_decode_frame,
.capabilities = CODEC_CAP_DR1,
diff --git a/libavcodec/qdm2.c b/libavcodec/qdm2.c
index c739a43c4c..dd13c6ecc9 100644
--- a/libavcodec/qdm2.c
+++ b/libavcodec/qdm2.c
@@ -1992,7 +1992,7 @@ AVCodec ff_qdm2_decoder =
{
.name = "qdm2",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_QDM2,
+ .id = AV_CODEC_ID_QDM2,
.priv_data_size = sizeof(QDM2Context),
.init = qdm2_decode_init,
.close = qdm2_decode_close,
diff --git a/libavcodec/qdrw.c b/libavcodec/qdrw.c
index 23b9efdd06..0bea69c755 100644
--- a/libavcodec/qdrw.c
+++ b/libavcodec/qdrw.c
@@ -166,7 +166,7 @@ static av_cold int decode_end(AVCodecContext *avctx){
AVCodec ff_qdraw_decoder = {
.name = "qdraw",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_QDRAW,
+ .id = AV_CODEC_ID_QDRAW,
.priv_data_size = sizeof(QdrawContext),
.init = decode_init,
.close = decode_end,
diff --git a/libavcodec/qpeg.c b/libavcodec/qpeg.c
index 34143e3419..751d6ce796 100644
--- a/libavcodec/qpeg.c
+++ b/libavcodec/qpeg.c
@@ -328,7 +328,7 @@ static av_cold int decode_end(AVCodecContext *avctx){
AVCodec ff_qpeg_decoder = {
.name = "qpeg",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_QPEG,
+ .id = AV_CODEC_ID_QPEG,
.priv_data_size = sizeof(QpegContext),
.init = decode_init,
.close = decode_end,
diff --git a/libavcodec/qtrle.c b/libavcodec/qtrle.c
index c7efc0c0fd..a8fe38a7e8 100644
--- a/libavcodec/qtrle.c
+++ b/libavcodec/qtrle.c
@@ -518,7 +518,7 @@ static av_cold int qtrle_decode_end(AVCodecContext *avctx)
AVCodec ff_qtrle_decoder = {
.name = "qtrle",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_QTRLE,
+ .id = AV_CODEC_ID_QTRLE,
.priv_data_size = sizeof(QtrleContext),
.init = qtrle_decode_init,
.close = qtrle_decode_end,
diff --git a/libavcodec/qtrleenc.c b/libavcodec/qtrleenc.c
index 822e41899d..2fb9c1c928 100644
--- a/libavcodec/qtrleenc.c
+++ b/libavcodec/qtrleenc.c
@@ -350,7 +350,7 @@ static av_cold int qtrle_encode_end(AVCodecContext *avctx)
AVCodec ff_qtrle_encoder = {
.name = "qtrle",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_QTRLE,
+ .id = AV_CODEC_ID_QTRLE,
.priv_data_size = sizeof(QtrleEncContext),
.init = qtrle_encode_init,
.encode2 = qtrle_encode_frame,
diff --git a/libavcodec/r210dec.c b/libavcodec/r210dec.c
index 07dc5886b8..ac99522b88 100644
--- a/libavcodec/r210dec.c
+++ b/libavcodec/r210dec.c
@@ -42,7 +42,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
AVFrame *pic = avctx->coded_frame;
const uint32_t *src = (const uint32_t *)avpkt->data;
int aligned_width = FFALIGN(avctx->width,
- avctx->codec_id == CODEC_ID_R10K ? 1 : 64);
+ avctx->codec_id == AV_CODEC_ID_R10K ? 1 : 64);
uint8_t *dst_line;
if (pic->data[0])
@@ -66,12 +66,12 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
for (w = 0; w < avctx->width; w++) {
uint32_t pixel;
uint16_t r, g, b;
- if (avctx->codec_id==CODEC_ID_AVRP) {
+ if (avctx->codec_id==AV_CODEC_ID_AVRP) {
pixel = av_le2ne32(*src++);
} else {
pixel = av_be2ne32(*src++);
}
- if (avctx->codec_id==CODEC_ID_R210) {
+ if (avctx->codec_id==AV_CODEC_ID_R210) {
b = pixel << 6;
g = (pixel >> 4) & 0xffc0;
r = (pixel >> 14) & 0xffc0;
@@ -108,7 +108,7 @@ static av_cold int decode_close(AVCodecContext *avctx)
AVCodec ff_r210_decoder = {
.name = "r210",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_R210,
+ .id = AV_CODEC_ID_R210,
.init = decode_init,
.close = decode_close,
.decode = decode_frame,
@@ -120,7 +120,7 @@ AVCodec ff_r210_decoder = {
AVCodec ff_r10k_decoder = {
.name = "r10k",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_R10K,
+ .id = AV_CODEC_ID_R10K,
.init = decode_init,
.close = decode_close,
.decode = decode_frame,
@@ -132,7 +132,7 @@ AVCodec ff_r10k_decoder = {
AVCodec ff_avrp_decoder = {
.name = "avrp",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_AVRP,
+ .id = AV_CODEC_ID_AVRP,
.init = decode_init,
.close = decode_close,
.decode = decode_frame,
diff --git a/libavcodec/r210enc.c b/libavcodec/r210enc.c
index 0a7dd332ba..9e209fdd0b 100644
--- a/libavcodec/r210enc.c
+++ b/libavcodec/r210enc.c
@@ -39,7 +39,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
{
int i, j, ret;
int aligned_width = FFALIGN(avctx->width,
- avctx->codec_id == CODEC_ID_R10K ? 1 : 64);
+ avctx->codec_id == AV_CODEC_ID_R10K ? 1 : 64);
int pad = (aligned_width - avctx->width) * 4;
uint8_t *src_line;
uint8_t *dst;
@@ -60,11 +60,11 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
uint16_t r = *src++ >> 6;
uint16_t g = *src++ >> 6;
uint16_t b = *src++ >> 4;
- if (avctx->codec_id == CODEC_ID_R210)
+ if (avctx->codec_id == AV_CODEC_ID_R210)
pixel = (r << 20) | (g << 10) | b >> 2;
else
pixel = (r << 22) | (g << 12) | b;
- if (avctx->codec_id == CODEC_ID_AVRP)
+ if (avctx->codec_id == AV_CODEC_ID_AVRP)
bytestream_put_le32(&dst, pixel);
else
bytestream_put_be32(&dst, pixel);
@@ -90,7 +90,7 @@ static av_cold int encode_close(AVCodecContext *avctx)
AVCodec ff_r210_encoder = {
.name = "r210",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_R210,
+ .id = AV_CODEC_ID_R210,
.init = encode_init,
.encode2 = encode_frame,
.close = encode_close,
@@ -102,7 +102,7 @@ AVCodec ff_r210_encoder = {
AVCodec ff_r10k_encoder = {
.name = "r10k",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_R10K,
+ .id = AV_CODEC_ID_R10K,
.init = encode_init,
.encode2 = encode_frame,
.close = encode_close,
@@ -114,7 +114,7 @@ AVCodec ff_r10k_encoder = {
AVCodec ff_avrp_encoder = {
.name = "avrp",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_AVRP,
+ .id = AV_CODEC_ID_AVRP,
.init = encode_init,
.encode2 = encode_frame,
.close = encode_close,
diff --git a/libavcodec/ra144dec.c b/libavcodec/ra144dec.c
index 428f788733..9d44776d2e 100644
--- a/libavcodec/ra144dec.c
+++ b/libavcodec/ra144dec.c
@@ -129,7 +129,7 @@ static int ra144_decode_frame(AVCodecContext * avctx, void *data,
AVCodec ff_ra_144_decoder = {
.name = "real_144",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_RA_144,
+ .id = AV_CODEC_ID_RA_144,
.priv_data_size = sizeof(RA144Context),
.init = ra144_decode_init,
.decode = ra144_decode_frame,
diff --git a/libavcodec/ra144enc.c b/libavcodec/ra144enc.c
index 6c08a70cd2..ceae878039 100644
--- a/libavcodec/ra144enc.c
+++ b/libavcodec/ra144enc.c
@@ -555,7 +555,7 @@ static int ra144_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
AVCodec ff_ra_144_encoder = {
.name = "real_144",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_RA_144,
+ .id = AV_CODEC_ID_RA_144,
.priv_data_size = sizeof(RA144Context),
.init = ra144_encode_init,
.encode2 = ra144_encode_frame,
diff --git a/libavcodec/ra288.c b/libavcodec/ra288.c
index ca10565a2e..d75a5b4550 100644
--- a/libavcodec/ra288.c
+++ b/libavcodec/ra288.c
@@ -224,7 +224,7 @@ static int ra288_decode_frame(AVCodecContext * avctx, void *data,
AVCodec ff_ra_288_decoder = {
.name = "real_288",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_RA_288,
+ .id = AV_CODEC_ID_RA_288,
.priv_data_size = sizeof(RA288Context),
.init = ra288_decode_init,
.decode = ra288_decode_frame,
diff --git a/libavcodec/ralf.c b/libavcodec/ralf.c
index a75fe73168..6866f79609 100644
--- a/libavcodec/ralf.c
+++ b/libavcodec/ralf.c
@@ -525,7 +525,7 @@ static void decode_flush(AVCodecContext *avctx)
AVCodec ff_ralf_decoder = {
.name = "ralf",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_RALF,
+ .id = AV_CODEC_ID_RALF,
.priv_data_size = sizeof(RALFContext),
.init = decode_init,
.close = decode_close,
diff --git a/libavcodec/ratecontrol.c b/libavcodec/ratecontrol.c
index 197c807ef2..a693ec4ca0 100644
--- a/libavcodec/ratecontrol.c
+++ b/libavcodec/ratecontrol.c
@@ -292,7 +292,7 @@ int ff_vbv_update(MpegEncContext *s, int frame_size){
if(rcc->buffer_index > buffer_size){
int stuffing= ceil((rcc->buffer_index - buffer_size)/8);
- if(stuffing < 4 && s->codec_id == CODEC_ID_MPEG4)
+ if(stuffing < 4 && s->codec_id == AV_CODEC_ID_MPEG4)
stuffing=4;
rcc->buffer_index -= 8*stuffing;
diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c
index cabc8c4b4b..e7c83032a0 100644
--- a/libavcodec/rawdec.c
+++ b/libavcodec/rawdec.c
@@ -272,7 +272,7 @@ static av_cold int raw_close_decoder(AVCodecContext *avctx)
AVCodec ff_rawvideo_decoder = {
.name = "rawvideo",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_RAWVIDEO,
+ .id = AV_CODEC_ID_RAWVIDEO,
.priv_data_size = sizeof(RawVideoContext),
.init = raw_init_decoder,
.close = raw_close_decoder,
diff --git a/libavcodec/rawenc.c b/libavcodec/rawenc.c
index 44a3421de1..d03049aea8 100644
--- a/libavcodec/rawenc.c
+++ b/libavcodec/rawenc.c
@@ -69,7 +69,7 @@ static int raw_encode(AVCodecContext *avctx, AVPacket *pkt,
AVCodec ff_rawvideo_encoder = {
.name = "rawvideo",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_RAWVIDEO,
+ .id = AV_CODEC_ID_RAWVIDEO,
.priv_data_size = sizeof(AVFrame),
.init = raw_init_encoder,
.encode2 = raw_encode,
diff --git a/libavcodec/realtextdec.c b/libavcodec/realtextdec.c
index 01f8b28613..102e0d924f 100644
--- a/libavcodec/realtextdec.c
+++ b/libavcodec/realtextdec.c
@@ -77,7 +77,7 @@ AVCodec ff_realtext_decoder = {
.name = "realtext",
.long_name = NULL_IF_CONFIG_SMALL("RealText subtitle"),
.type = AVMEDIA_TYPE_SUBTITLE,
- .id = CODEC_ID_REALTEXT,
+ .id = AV_CODEC_ID_REALTEXT,
.decode = realtext_decode_frame,
.init = ff_ass_subtitle_header_default,
};
diff --git a/libavcodec/rl2.c b/libavcodec/rl2.c
index b91d9d62d4..f30cb01c1d 100644
--- a/libavcodec/rl2.c
+++ b/libavcodec/rl2.c
@@ -222,7 +222,7 @@ static av_cold int rl2_decode_end(AVCodecContext *avctx)
AVCodec ff_rl2_decoder = {
.name = "rl2",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_RL2,
+ .id = AV_CODEC_ID_RL2,
.priv_data_size = sizeof(Rl2Context),
.init = rl2_decode_init,
.close = rl2_decode_end,
diff --git a/libavcodec/roqaudioenc.c b/libavcodec/roqaudioenc.c
index ddc4a89419..0129051ad4 100644
--- a/libavcodec/roqaudioenc.c
+++ b/libavcodec/roqaudioenc.c
@@ -203,7 +203,7 @@ static int roq_dpcm_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
AVCodec ff_roq_dpcm_encoder = {
.name = "roq_dpcm",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_ROQ_DPCM,
+ .id = AV_CODEC_ID_ROQ_DPCM,
.priv_data_size = sizeof(ROQDPCMContext),
.init = roq_dpcm_encode_init,
.encode2 = roq_dpcm_encode_frame,
diff --git a/libavcodec/roqvideodec.c b/libavcodec/roqvideodec.c
index 9adfd5dc43..f6bf67d3b1 100644
--- a/libavcodec/roqvideodec.c
+++ b/libavcodec/roqvideodec.c
@@ -231,7 +231,7 @@ static av_cold int roq_decode_end(AVCodecContext *avctx)
AVCodec ff_roq_decoder = {
.name = "roqvideo",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_ROQ,
+ .id = AV_CODEC_ID_ROQ,
.priv_data_size = sizeof(RoqContext),
.init = roq_decode_init,
.close = roq_decode_end,
diff --git a/libavcodec/roqvideoenc.c b/libavcodec/roqvideoenc.c
index 0a481e50a1..eee00466fb 100644
--- a/libavcodec/roqvideoenc.c
+++ b/libavcodec/roqvideoenc.c
@@ -1073,7 +1073,7 @@ static int roq_encode_end(AVCodecContext *avctx)
AVCodec ff_roq_encoder = {
.name = "roqvideo",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_ROQ,
+ .id = AV_CODEC_ID_ROQ,
.priv_data_size = sizeof(RoqContext),
.init = roq_encode_init,
.encode2 = roq_encode_frame,
diff --git a/libavcodec/rpza.c b/libavcodec/rpza.c
index d83f4578a3..3944e10463 100644
--- a/libavcodec/rpza.c
+++ b/libavcodec/rpza.c
@@ -283,7 +283,7 @@ static av_cold int rpza_decode_end(AVCodecContext *avctx)
AVCodec ff_rpza_decoder = {
.name = "rpza",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_RPZA,
+ .id = AV_CODEC_ID_RPZA,
.priv_data_size = sizeof(RpzaContext),
.init = rpza_decode_init,
.close = rpza_decode_end,
diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c
index 056c8b5fcc..c50727f1ca 100644
--- a/libavcodec/rv10.c
+++ b/libavcodec/rv10.c
@@ -536,7 +536,7 @@ static int rv10_decode_packet(AVCodecContext *avctx,
active_bits_size = buf_size * 8;
init_get_bits(&s->gb, buf, FFMAX(buf_size, buf_size2) * 8);
- if(s->codec_id ==CODEC_ID_RV10)
+ if(s->codec_id ==AV_CODEC_ID_RV10)
mb_count = rv10_decode_picture_header(s);
else
mb_count = rv20_decode_picture_header(rv);
@@ -577,7 +577,7 @@ static int rv10_decode_packet(AVCodecContext *avctx,
av_dlog(avctx, "qscale=%d\n", s->qscale);
/* default quantization values */
- if(s->codec_id== CODEC_ID_RV10){
+ if(s->codec_id== AV_CODEC_ID_RV10){
if(s->mb_y==0) s->first_slice_line=1;
}else{
s->first_slice_line=1;
@@ -749,7 +749,7 @@ static int rv10_decode_frame(AVCodecContext *avctx,
AVCodec ff_rv10_decoder = {
.name = "rv10",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_RV10,
+ .id = AV_CODEC_ID_RV10,
.priv_data_size = sizeof(RVDecContext),
.init = rv10_decode_init,
.close = rv10_decode_end,
@@ -763,7 +763,7 @@ AVCodec ff_rv10_decoder = {
AVCodec ff_rv20_decoder = {
.name = "rv20",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_RV20,
+ .id = AV_CODEC_ID_RV20,
.priv_data_size = sizeof(RVDecContext),
.init = rv10_decode_init,
.close = rv10_decode_end,
diff --git a/libavcodec/rv10enc.c b/libavcodec/rv10enc.c
index 4dcf7faf73..7a2045ae1e 100644
--- a/libavcodec/rv10enc.c
+++ b/libavcodec/rv10enc.c
@@ -61,7 +61,7 @@ FF_MPV_GENERIC_CLASS(rv10)
AVCodec ff_rv10_encoder = {
.name = "rv10",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_RV10,
+ .id = AV_CODEC_ID_RV10,
.priv_data_size = sizeof(MpegEncContext),
.init = ff_MPV_encode_init,
.encode2 = ff_MPV_encode_picture,
diff --git a/libavcodec/rv20enc.c b/libavcodec/rv20enc.c
index 3fb58c7015..2d21818806 100644
--- a/libavcodec/rv20enc.c
+++ b/libavcodec/rv20enc.c
@@ -62,7 +62,7 @@ FF_MPV_GENERIC_CLASS(rv20)
AVCodec ff_rv20_encoder = {
.name = "rv20",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_RV20,
+ .id = AV_CODEC_ID_RV20,
.priv_data_size = sizeof(MpegEncContext),
.init = ff_MPV_encode_init,
.encode2 = ff_MPV_encode_picture,
diff --git a/libavcodec/rv30.c b/libavcodec/rv30.c
index fdeaa58f2a..b033d1c425 100644
--- a/libavcodec/rv30.c
+++ b/libavcodec/rv30.c
@@ -274,7 +274,7 @@ static av_cold int rv30_decode_init(AVCodecContext *avctx)
AVCodec ff_rv30_decoder = {
.name = "rv30",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_RV30,
+ .id = AV_CODEC_ID_RV30,
.priv_data_size = sizeof(RV34DecContext),
.init = rv30_decode_init,
.close = ff_rv34_decode_end,
diff --git a/libavcodec/rv34.c b/libavcodec/rv34.c
index 62619b3203..da3aa682c9 100644
--- a/libavcodec/rv34.c
+++ b/libavcodec/rv34.c
@@ -1490,14 +1490,14 @@ av_cold int ff_rv34_decode_init(AVCodecContext *avctx)
if ((ret = ff_MPV_common_init(s)) < 0)
return ret;
- ff_h264_pred_init(&r->h, CODEC_ID_RV40, 8, 1);
+ ff_h264_pred_init(&r->h, AV_CODEC_ID_RV40, 8, 1);
#if CONFIG_RV30_DECODER
- if (avctx->codec_id == CODEC_ID_RV30)
+ if (avctx->codec_id == AV_CODEC_ID_RV30)
ff_rv30dsp_init(&r->rdsp, &r->s.dsp);
#endif
#if CONFIG_RV40_DECODER
- if (avctx->codec_id == CODEC_ID_RV40)
+ if (avctx->codec_id == AV_CODEC_ID_RV40)
ff_rv40dsp_init(&r->rdsp, &r->s.dsp);
#endif
diff --git a/libavcodec/rv34_parser.c b/libavcodec/rv34_parser.c
index 9672f26182..8af74431c0 100644
--- a/libavcodec/rv34_parser.c
+++ b/libavcodec/rv34_parser.c
@@ -52,7 +52,7 @@ static int rv34_parse(AVCodecParserContext *s,
}
hdr = AV_RB32(buf + 9 + *buf * 8);
- if (avctx->codec_id == CODEC_ID_RV30) {
+ if (avctx->codec_id == AV_CODEC_ID_RV30) {
type = (hdr >> 27) & 3;
pts = (hdr >> 7) & 0x1FFF;
} else {
@@ -78,7 +78,7 @@ static int rv34_parse(AVCodecParserContext *s,
#if CONFIG_RV30_PARSER
AVCodecParser ff_rv30_parser = {
- .codec_ids = { CODEC_ID_RV30 },
+ .codec_ids = { AV_CODEC_ID_RV30 },
.priv_data_size = sizeof(RV34ParseContext),
.parser_parse = rv34_parse,
};
@@ -86,7 +86,7 @@ AVCodecParser ff_rv30_parser = {
#if CONFIG_RV40_PARSER
AVCodecParser ff_rv40_parser = {
- .codec_ids = { CODEC_ID_RV40 },
+ .codec_ids = { AV_CODEC_ID_RV40 },
.priv_data_size = sizeof(RV34ParseContext),
.parser_parse = rv34_parse,
};
diff --git a/libavcodec/rv40.c b/libavcodec/rv40.c
index a0940b32e1..ff0ef91a5c 100644
--- a/libavcodec/rv40.c
+++ b/libavcodec/rv40.c
@@ -565,7 +565,7 @@ static av_cold int rv40_decode_init(AVCodecContext *avctx)
AVCodec ff_rv40_decoder = {
.name = "rv40",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_RV40,
+ .id = AV_CODEC_ID_RV40,
.priv_data_size = sizeof(RV34DecContext),
.init = rv40_decode_init,
.close = ff_rv34_decode_end,
diff --git a/libavcodec/s302m.c b/libavcodec/s302m.c
index a6f207c4f6..e0ae7bffbc 100644
--- a/libavcodec/s302m.c
+++ b/libavcodec/s302m.c
@@ -169,7 +169,7 @@ static int s302m_decode_init(AVCodecContext *avctx)
AVCodec ff_s302m_decoder = {
.name = "s302m",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_S302M,
+ .id = AV_CODEC_ID_S302M,
.priv_data_size = sizeof(S302MDecodeContext),
.init = s302m_decode_init,
.decode = s302m_decode_frame,
diff --git a/libavcodec/samidec.c b/libavcodec/samidec.c
index 1852959e08..c04b8a336e 100644
--- a/libavcodec/samidec.c
+++ b/libavcodec/samidec.c
@@ -150,7 +150,7 @@ AVCodec ff_sami_decoder = {
.name = "sami",
.long_name = NULL_IF_CONFIG_SMALL("SAMI subtitle"),
.type = AVMEDIA_TYPE_SUBTITLE,
- .id = CODEC_ID_SAMI,
+ .id = AV_CODEC_ID_SAMI,
.priv_data_size = sizeof(SAMIContext),
.init = sami_init,
.close = sami_close,
diff --git a/libavcodec/sanm.c b/libavcodec/sanm.c
index 2a0fb77a71..3736bd74ec 100644
--- a/libavcodec/sanm.c
+++ b/libavcodec/sanm.c
@@ -1272,7 +1272,7 @@ static int decode_frame(AVCodecContext *avctx, void *data,
AVCodec ff_sanm_decoder = {
.name = "sanm",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_SANM,
+ .id = AV_CODEC_ID_SANM,
.priv_data_size = sizeof(SANMVideoContext),
.init = decode_init,
.close = decode_end,
diff --git a/libavcodec/sgidec.c b/libavcodec/sgidec.c
index 88450b94ab..5741945dd2 100644
--- a/libavcodec/sgidec.c
+++ b/libavcodec/sgidec.c
@@ -261,7 +261,7 @@ static av_cold int sgi_end(AVCodecContext *avctx)
AVCodec ff_sgi_decoder = {
.name = "sgi",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_SGI,
+ .id = AV_CODEC_ID_SGI,
.priv_data_size = sizeof(SgiState),
.init = sgi_init,
.close = sgi_end,
diff --git a/libavcodec/sgienc.c b/libavcodec/sgienc.c
index 8bb0aba1af..77b471b986 100644
--- a/libavcodec/sgienc.c
+++ b/libavcodec/sgienc.c
@@ -213,7 +213,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
AVCodec ff_sgi_encoder = {
.name = "sgi",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_SGI,
+ .id = AV_CODEC_ID_SGI,
.priv_data_size = sizeof(SgiContext),
.init = encode_init,
.encode2 = encode_frame,
diff --git a/libavcodec/shorten.c b/libavcodec/shorten.c
index b47e1a69f1..d04011e468 100644
--- a/libavcodec/shorten.c
+++ b/libavcodec/shorten.c
@@ -648,7 +648,7 @@ static av_cold int shorten_decode_close(AVCodecContext *avctx)
AVCodec ff_shorten_decoder = {
.name = "shorten",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_SHORTEN,
+ .id = AV_CODEC_ID_SHORTEN,
.priv_data_size = sizeof(ShortenContext),
.init = shorten_decode_init,
.close = shorten_decode_close,
diff --git a/libavcodec/sipr.c b/libavcodec/sipr.c
index 62e9e3439c..b3951b46f3 100644
--- a/libavcodec/sipr.c
+++ b/libavcodec/sipr.c
@@ -564,7 +564,7 @@ static int sipr_decode_frame(AVCodecContext *avctx, void *data,
AVCodec ff_sipr_decoder = {
.name = "sipr",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_SIPR,
+ .id = AV_CODEC_ID_SIPR,
.priv_data_size = sizeof(SiprContext),
.init = sipr_decoder_init,
.decode = sipr_decode_frame,
diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c
index 0736e33130..4913625e37 100644
--- a/libavcodec/smacker.c
+++ b/libavcodec/smacker.c
@@ -762,7 +762,7 @@ static int smka_decode_frame(AVCodecContext *avctx, void *data,
AVCodec ff_smacker_decoder = {
.name = "smackvid",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_SMACKVIDEO,
+ .id = AV_CODEC_ID_SMACKVIDEO,
.priv_data_size = sizeof(SmackVContext),
.init = decode_init,
.close = decode_end,
@@ -774,7 +774,7 @@ AVCodec ff_smacker_decoder = {
AVCodec ff_smackaud_decoder = {
.name = "smackaud",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_SMACKAUDIO,
+ .id = AV_CODEC_ID_SMACKAUDIO,
.priv_data_size = sizeof(SmackerAudioContext),
.init = smka_decode_init,
.decode = smka_decode_frame,
diff --git a/libavcodec/smc.c b/libavcodec/smc.c
index 2348f7fecf..37b7409584 100644
--- a/libavcodec/smc.c
+++ b/libavcodec/smc.c
@@ -468,7 +468,7 @@ static av_cold int smc_decode_end(AVCodecContext *avctx)
AVCodec ff_smc_decoder = {
.name = "smc",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_SMC,
+ .id = AV_CODEC_ID_SMC,
.priv_data_size = sizeof(SmcContext),
.init = smc_decode_init,
.close = smc_decode_end,
diff --git a/libavcodec/snowdec.c b/libavcodec/snowdec.c
index f3d4656332..b4799d976c 100644
--- a/libavcodec/snowdec.c
+++ b/libavcodec/snowdec.c
@@ -575,7 +575,7 @@ static av_cold int decode_end(AVCodecContext *avctx)
AVCodec ff_snow_decoder = {
.name = "snow",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_SNOW,
+ .id = AV_CODEC_ID_SNOW,
.priv_data_size = sizeof(SnowContext),
.init = decode_init,
.close = decode_end,
diff --git a/libavcodec/snowenc.c b/libavcodec/snowenc.c
index e9dbb421ba..0944a700b1 100644
--- a/libavcodec/snowenc.c
+++ b/libavcodec/snowenc.c
@@ -1941,7 +1941,7 @@ static const AVClass snowenc_class = {
AVCodec ff_snow_encoder = {
.name = "snow",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_SNOW,
+ .id = AV_CODEC_ID_SNOW,
.priv_data_size = sizeof(SnowContext),
.init = encode_init,
.encode2 = encode_frame,
diff --git a/libavcodec/sonic.c b/libavcodec/sonic.c
index d42b07de06..6319a56eba 100644
--- a/libavcodec/sonic.c
+++ b/libavcodec/sonic.c
@@ -513,7 +513,7 @@ static av_cold int sonic_encode_init(AVCodecContext *avctx)
if (avctx->channels == 2)
s->decorrelation = MID_SIDE;
- if (avctx->codec->id == CODEC_ID_SONIC_LS)
+ if (avctx->codec->id == AV_CODEC_ID_SONIC_LS)
{
s->lossless = 1;
s->num_taps = 32;
@@ -955,7 +955,7 @@ static int sonic_decode_frame(AVCodecContext *avctx,
AVCodec ff_sonic_decoder = {
.name = "sonic",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_SONIC,
+ .id = AV_CODEC_ID_SONIC,
.priv_data_size = sizeof(SonicContext),
.init = sonic_decode_init,
.close = sonic_decode_close,
@@ -969,7 +969,7 @@ AVCodec ff_sonic_decoder = {
AVCodec ff_sonic_encoder = {
.name = "sonic",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_SONIC,
+ .id = AV_CODEC_ID_SONIC,
.priv_data_size = sizeof(SonicContext),
.init = sonic_encode_init,
.encode = sonic_encode_frame,
@@ -983,7 +983,7 @@ AVCodec ff_sonic_encoder = {
AVCodec ff_sonic_ls_encoder = {
.name = "sonicls",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_SONIC_LS,
+ .id = AV_CODEC_ID_SONIC_LS,
.priv_data_size = sizeof(SonicContext),
.init = sonic_encode_init,
.encode = sonic_encode_frame,
diff --git a/libavcodec/sp5xdec.c b/libavcodec/sp5xdec.c
index d3efa65674..8715c8db9d 100644
--- a/libavcodec/sp5xdec.c
+++ b/libavcodec/sp5xdec.c
@@ -68,7 +68,7 @@ static int sp5x_decode_frame(AVCodecContext *avctx,
memcpy(recoded+j, &sp5x_data_sos[0], sizeof(sp5x_data_sos));
j += sizeof(sp5x_data_sos);
- if(avctx->codec_id==CODEC_ID_AMV)
+ if(avctx->codec_id==AV_CODEC_ID_AMV)
for (i = 2; i < buf_size-2 && j < buf_size+1024-2; i++)
recoded[j++] = buf[i];
else
@@ -97,7 +97,7 @@ static int sp5x_decode_frame(AVCodecContext *avctx,
AVCodec ff_sp5x_decoder = {
.name = "sp5x",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_SP5X,
+ .id = AV_CODEC_ID_SP5X,
.priv_data_size = sizeof(MJpegDecodeContext),
.init = ff_mjpeg_decode_init,
.close = ff_mjpeg_decode_end,
@@ -111,7 +111,7 @@ AVCodec ff_sp5x_decoder = {
AVCodec ff_amv_decoder = {
.name = "amv",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_AMV,
+ .id = AV_CODEC_ID_AMV,
.priv_data_size = sizeof(MJpegDecodeContext),
.init = ff_mjpeg_decode_init,
.close = ff_mjpeg_decode_end,
diff --git a/libavcodec/srtdec.c b/libavcodec/srtdec.c
index ed6909bcca..13e4f9c7e3 100644
--- a/libavcodec/srtdec.c
+++ b/libavcodec/srtdec.c
@@ -233,7 +233,7 @@ AVCodec ff_srt_decoder = {
.name = "srt",
.long_name = NULL_IF_CONFIG_SMALL("SubRip subtitle"),
.type = AVMEDIA_TYPE_SUBTITLE,
- .id = CODEC_ID_SRT,
+ .id = AV_CODEC_ID_SRT,
.init = ff_ass_subtitle_header_default,
.decode = srt_decode_frame,
};
diff --git a/libavcodec/srtenc.c b/libavcodec/srtenc.c
index 56d3397828..9e152c70c7 100644
--- a/libavcodec/srtenc.c
+++ b/libavcodec/srtenc.c
@@ -293,7 +293,7 @@ AVCodec ff_srt_encoder = {
.name = "srt",
.long_name = NULL_IF_CONFIG_SMALL("SubRip subtitle"),
.type = AVMEDIA_TYPE_SUBTITLE,
- .id = CODEC_ID_SRT,
+ .id = AV_CODEC_ID_SRT,
.priv_data_size = sizeof(SRTContext),
.init = srt_encode_init,
.encode = srt_encode_frame,
diff --git a/libavcodec/subviewerdec.c b/libavcodec/subviewerdec.c
index 8a9f642703..0e8be90e78 100644
--- a/libavcodec/subviewerdec.c
+++ b/libavcodec/subviewerdec.c
@@ -72,7 +72,7 @@ AVCodec ff_subviewer_decoder = {
.name = "subviewer",
.long_name = NULL_IF_CONFIG_SMALL("SubViewer subtitle"),
.type = AVMEDIA_TYPE_SUBTITLE,
- .id = CODEC_ID_SUBVIEWER,
+ .id = AV_CODEC_ID_SUBVIEWER,
.decode = subviewer_decode_frame,
.init = ff_ass_subtitle_header_default,
};
diff --git a/libavcodec/sunrast.c b/libavcodec/sunrast.c
index b302307370..a8c0151cd4 100644
--- a/libavcodec/sunrast.c
+++ b/libavcodec/sunrast.c
@@ -237,7 +237,7 @@ static av_cold int sunrast_end(AVCodecContext *avctx) {
AVCodec ff_sunrast_decoder = {
.name = "sunrast",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_SUNRAST,
+ .id = AV_CODEC_ID_SUNRAST,
.priv_data_size = sizeof(SUNRASTContext),
.init = sunrast_init,
.close = sunrast_end,
diff --git a/libavcodec/sunrastenc.c b/libavcodec/sunrastenc.c
index 5961a06960..e8caa25ae1 100644
--- a/libavcodec/sunrastenc.c
+++ b/libavcodec/sunrastenc.c
@@ -210,7 +210,7 @@ static const AVCodecDefault sunrast_defaults[] = {
AVCodec ff_sunrast_encoder = {
.name = "sunrast",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_SUNRAST,
+ .id = AV_CODEC_ID_SUNRAST,
.priv_data_size = sizeof(SUNRASTContext),
.init = sunrast_encode_init,
.encode2 = sunrast_encode_frame,
diff --git a/libavcodec/svq1dec.c b/libavcodec/svq1dec.c
index c36f9fe435..3b8dc1b852 100644
--- a/libavcodec/svq1dec.c
+++ b/libavcodec/svq1dec.c
@@ -815,7 +815,7 @@ static av_cold int svq1_decode_end(AVCodecContext *avctx)
AVCodec ff_svq1_decoder = {
.name = "svq1",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_SVQ1,
+ .id = AV_CODEC_ID_SVQ1,
.priv_data_size = sizeof(MpegEncContext),
.init = svq1_decode_init,
.close = svq1_decode_end,
diff --git a/libavcodec/svq1enc.c b/libavcodec/svq1enc.c
index 951f803d9b..edd3507227 100644
--- a/libavcodec/svq1enc.c
+++ b/libavcodec/svq1enc.c
@@ -582,7 +582,7 @@ static av_cold int svq1_encode_end(AVCodecContext *avctx)
AVCodec ff_svq1_encoder = {
.name = "svq1",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_SVQ1,
+ .id = AV_CODEC_ID_SVQ1,
.priv_data_size = sizeof(SVQ1Context),
.init = svq1_encode_init,
.encode2 = svq1_encode_frame,
diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c
index c35138b8bc..9342935ded 100644
--- a/libavcodec/svq3.c
+++ b/libavcodec/svq3.c
@@ -1134,7 +1134,7 @@ static int svq3_decode_end(AVCodecContext *avctx)
AVCodec ff_svq3_decoder = {
.name = "svq3",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_SVQ3,
+ .id = AV_CODEC_ID_SVQ3,
.priv_data_size = sizeof(SVQ3Context),
.init = svq3_decode_init,
.close = svq3_decode_end,
diff --git a/libavcodec/targa.c b/libavcodec/targa.c
index d3740be5ef..339d7c43a3 100644
--- a/libavcodec/targa.c
+++ b/libavcodec/targa.c
@@ -293,7 +293,7 @@ static av_cold int targa_end(AVCodecContext *avctx){
AVCodec ff_targa_decoder = {
.name = "targa",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_TARGA,
+ .id = AV_CODEC_ID_TARGA,
.priv_data_size = sizeof(TargaContext),
.init = targa_init,
.close = targa_end,
diff --git a/libavcodec/targaenc.c b/libavcodec/targaenc.c
index a6879e359d..89356b05b9 100644
--- a/libavcodec/targaenc.c
+++ b/libavcodec/targaenc.c
@@ -175,7 +175,7 @@ static av_cold int targa_encode_init(AVCodecContext *avctx)
AVCodec ff_targa_encoder = {
.name = "targa",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_TARGA,
+ .id = AV_CODEC_ID_TARGA,
.priv_data_size = sizeof(TargaContext),
.init = targa_encode_init,
.encode2 = targa_encode_frame,
diff --git a/libavcodec/tiertexseqv.c b/libavcodec/tiertexseqv.c
index cf37a52768..75a985da83 100644
--- a/libavcodec/tiertexseqv.c
+++ b/libavcodec/tiertexseqv.c
@@ -260,7 +260,7 @@ static av_cold int seqvideo_decode_end(AVCodecContext *avctx)
AVCodec ff_tiertexseqvideo_decoder = {
.name = "tiertexseqvideo",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_TIERTEXSEQVIDEO,
+ .id = AV_CODEC_ID_TIERTEXSEQVIDEO,
.priv_data_size = sizeof(SeqVideoContext),
.init = seqvideo_decode_init,
.close = seqvideo_decode_end,
diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c
index 47c86453c0..65081b32ff 100644
--- a/libavcodec/tiff.c
+++ b/libavcodec/tiff.c
@@ -1171,7 +1171,7 @@ static av_cold int tiff_end(AVCodecContext *avctx)
AVCodec ff_tiff_decoder = {
.name = "tiff",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_TIFF,
+ .id = AV_CODEC_ID_TIFF,
.priv_data_size = sizeof(TiffContext),
.init = tiff_init,
.close = tiff_end,
diff --git a/libavcodec/tiffenc.c b/libavcodec/tiffenc.c
index fa13c7273e..3f2a0b6daa 100644
--- a/libavcodec/tiffenc.c
+++ b/libavcodec/tiffenc.c
@@ -510,7 +510,7 @@ static const AVClass tiffenc_class = {
AVCodec ff_tiff_encoder = {
.name = "tiff",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_TIFF,
+ .id = AV_CODEC_ID_TIFF,
.priv_data_size = sizeof(TiffEncoderContext),
.init = encode_init,
.encode2 = encode_frame,
diff --git a/libavcodec/tmv.c b/libavcodec/tmv.c
index 7eb9b6903a..438518f32f 100644
--- a/libavcodec/tmv.c
+++ b/libavcodec/tmv.c
@@ -103,7 +103,7 @@ static av_cold int tmv_decode_close(AVCodecContext *avctx)
AVCodec ff_tmv_decoder = {
.name = "tmv",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_TMV,
+ .id = AV_CODEC_ID_TMV,
.priv_data_size = sizeof(TMVContext),
.init = tmv_decode_init,
.close = tmv_decode_close,
diff --git a/libavcodec/truemotion1.c b/libavcodec/truemotion1.c
index b4687f193a..15a5aaaee3 100644
--- a/libavcodec/truemotion1.c
+++ b/libavcodec/truemotion1.c
@@ -903,7 +903,7 @@ static av_cold int truemotion1_decode_end(AVCodecContext *avctx)
AVCodec ff_truemotion1_decoder = {
.name = "truemotion1",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_TRUEMOTION1,
+ .id = AV_CODEC_ID_TRUEMOTION1,
.priv_data_size = sizeof(TrueMotion1Context),
.init = truemotion1_decode_init,
.close = truemotion1_decode_end,
diff --git a/libavcodec/truemotion2.c b/libavcodec/truemotion2.c
index f5222d8b8a..5d7a3a443a 100644
--- a/libavcodec/truemotion2.c
+++ b/libavcodec/truemotion2.c
@@ -971,7 +971,7 @@ static av_cold int decode_end(AVCodecContext *avctx){
AVCodec ff_truemotion2_decoder = {
.name = "truemotion2",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_TRUEMOTION2,
+ .id = AV_CODEC_ID_TRUEMOTION2,
.priv_data_size = sizeof(TM2Context),
.init = decode_init,
.close = decode_end,
diff --git a/libavcodec/truespeech.c b/libavcodec/truespeech.c
index 6c5447e1de..6a446b4e1d 100644
--- a/libavcodec/truespeech.c
+++ b/libavcodec/truespeech.c
@@ -360,7 +360,7 @@ static int truespeech_decode_frame(AVCodecContext *avctx, void *data,
AVCodec ff_truespeech_decoder = {
.name = "truespeech",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_TRUESPEECH,
+ .id = AV_CODEC_ID_TRUESPEECH,
.priv_data_size = sizeof(TSContext),
.init = truespeech_decode_init,
.decode = truespeech_decode_frame,
diff --git a/libavcodec/tscc.c b/libavcodec/tscc.c
index fcfa85b707..5573d28edd 100644
--- a/libavcodec/tscc.c
+++ b/libavcodec/tscc.c
@@ -206,7 +206,7 @@ static av_cold int decode_end(AVCodecContext *avctx)
AVCodec ff_tscc_decoder = {
.name = "camtasia",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_TSCC,
+ .id = AV_CODEC_ID_TSCC,
.priv_data_size = sizeof(CamtasiaContext),
.init = decode_init,
.close = decode_end,
diff --git a/libavcodec/tscc2.c b/libavcodec/tscc2.c
index 5e2fd02745..d1dd8fd33f 100644
--- a/libavcodec/tscc2.c
+++ b/libavcodec/tscc2.c
@@ -372,7 +372,7 @@ static av_cold int tscc2_decode_end(AVCodecContext *avctx)
AVCodec ff_tscc2_decoder = {
.name = "tscc2",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_TSCC2,
+ .id = AV_CODEC_ID_TSCC2,
.priv_data_size = sizeof(TSCC2Context),
.init = tscc2_decode_init,
.close = tscc2_decode_end,
diff --git a/libavcodec/tta.c b/libavcodec/tta.c
index 51731706e8..f03578344c 100644
--- a/libavcodec/tta.c
+++ b/libavcodec/tta.c
@@ -468,7 +468,7 @@ static av_cold int tta_decode_close(AVCodecContext *avctx) {
AVCodec ff_tta_decoder = {
.name = "tta",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_TTA,
+ .id = AV_CODEC_ID_TTA,
.priv_data_size = sizeof(TTAContext),
.init = tta_decode_init,
.close = tta_decode_close,
diff --git a/libavcodec/twinvq.c b/libavcodec/twinvq.c
index 071017da2a..070f498cae 100644
--- a/libavcodec/twinvq.c
+++ b/libavcodec/twinvq.c
@@ -1177,7 +1177,7 @@ static av_cold int twin_decode_init(AVCodecContext *avctx)
AVCodec ff_twinvq_decoder = {
.name = "twinvq",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_TWINVQ,
+ .id = AV_CODEC_ID_TWINVQ,
.priv_data_size = sizeof(TwinContext),
.init = twin_decode_init,
.close = twin_decode_close,
diff --git a/libavcodec/txd.c b/libavcodec/txd.c
index f931c71390..523e1e62ad 100644
--- a/libavcodec/txd.c
+++ b/libavcodec/txd.c
@@ -164,7 +164,7 @@ static av_cold int txd_end(AVCodecContext *avctx) {
AVCodec ff_txd_decoder = {
.name = "txd",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_TXD,
+ .id = AV_CODEC_ID_TXD,
.priv_data_size = sizeof(TXDContext),
.init = txd_init,
.close = txd_end,
diff --git a/libavcodec/ulti.c b/libavcodec/ulti.c
index 52a6a861bf..6e2da8b1af 100644
--- a/libavcodec/ulti.c
+++ b/libavcodec/ulti.c
@@ -421,7 +421,7 @@ err:
AVCodec ff_ulti_decoder = {
.name = "ultimotion",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_ULTI,
+ .id = AV_CODEC_ID_ULTI,
.priv_data_size = sizeof(UltimotionDecodeContext),
.init = ulti_decode_init,
.close = ulti_decode_end,
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 529d3ab6d0..d9ad10f021 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -234,25 +234,25 @@ void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height,
h_align=8;
break;
case PIX_FMT_YUV410P:
- if(s->codec_id == CODEC_ID_SVQ1){
+ if(s->codec_id == AV_CODEC_ID_SVQ1){
w_align=64;
h_align=64;
}
case PIX_FMT_RGB555:
- if(s->codec_id == CODEC_ID_RPZA){
+ if(s->codec_id == AV_CODEC_ID_RPZA){
w_align=4;
h_align=4;
}
case PIX_FMT_PAL8:
case PIX_FMT_BGR8:
case PIX_FMT_RGB8:
- if(s->codec_id == CODEC_ID_SMC){
+ if(s->codec_id == AV_CODEC_ID_SMC){
w_align=4;
h_align=4;
}
break;
case PIX_FMT_BGR24:
- if((s->codec_id == CODEC_ID_MSZH) || (s->codec_id == CODEC_ID_ZLIB)){
+ if((s->codec_id == AV_CODEC_ID_MSZH) || (s->codec_id == AV_CODEC_ID_ZLIB)){
w_align=4;
h_align=4;
}
@@ -263,13 +263,13 @@ void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height,
break;
}
- if(s->codec_id == CODEC_ID_IFF_ILBM || s->codec_id == CODEC_ID_IFF_BYTERUN1){
+ if(s->codec_id == AV_CODEC_ID_IFF_ILBM || s->codec_id == AV_CODEC_ID_IFF_BYTERUN1){
w_align= FFMAX(w_align, 8);
}
*width = FFALIGN(*width , w_align);
*height= FFALIGN(*height, h_align);
- if(s->codec_id == CODEC_ID_H264 || s->lowres)
+ if(s->codec_id == AV_CODEC_ID_H264 || s->lowres)
*height+=2; // some of the optimized chroma MC reads one line too much
// which is also done in mpeg decoders with lowres > 0
@@ -822,7 +822,7 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, AVCodec *codec, AVD
}
//We only call avcodec_set_dimensions() for non h264 codecs so as not to overwrite previously setup dimensions
- if(!( avctx->coded_width && avctx->coded_height && avctx->width && avctx->height && avctx->codec_id == CODEC_ID_H264)){
+ if(!( avctx->coded_width && avctx->coded_height && avctx->width && avctx->height && avctx->codec_id == AV_CODEC_ID_H264)){
if(avctx->coded_width && avctx->coded_height)
avcodec_set_dimensions(avctx, avctx->coded_width, avctx->coded_height);
else if(avctx->width && avctx->height)
@@ -849,7 +849,7 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, AVCodec *codec, AVD
avctx->codec = codec;
if ((avctx->codec_type == AVMEDIA_TYPE_UNKNOWN || avctx->codec_type == codec->type) &&
- avctx->codec_id == CODEC_ID_NONE) {
+ avctx->codec_id == AV_CODEC_ID_NONE) {
avctx->codec_type = codec->type;
avctx->codec_id = codec->id;
}
@@ -910,7 +910,7 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, AVCodec *codec, AVD
if (avctx->pix_fmt == avctx->codec->pix_fmts[i])
break;
if (avctx->codec->pix_fmts[i] == PIX_FMT_NONE
- && !((avctx->codec_id == CODEC_ID_MJPEG || avctx->codec_id == CODEC_ID_LJPEG)
+ && !((avctx->codec_id == AV_CODEC_ID_MJPEG || avctx->codec_id == AV_CODEC_ID_LJPEG)
&& avctx->strict_std_compliance <= FF_COMPLIANCE_UNOFFICIAL)) {
av_log(avctx, AV_LOG_ERROR, "Specified pix_fmt is not supported\n");
ret = AVERROR(EINVAL);
@@ -1771,17 +1771,17 @@ av_cold int avcodec_close(AVCodecContext *avctx)
return 0;
}
-static enum CodecID remap_deprecated_codec_id(enum CodecID id)
+static enum AVCodecID remap_deprecated_codec_id(enum AVCodecID id)
{
switch(id){
//This is for future deprecatec codec ids, its empty since
//last major bump but will fill up again over time, please don't remove it
-// case CODEC_ID_UTVIDEO_DEPRECATED: return CODEC_ID_UTVIDEO;
+// case AV_CODEC_ID_UTVIDEO_DEPRECATED: return AV_CODEC_ID_UTVIDEO;
default : return id;
}
}
-AVCodec *avcodec_find_encoder(enum CodecID id)
+AVCodec *avcodec_find_encoder(enum AVCodecID id)
{
AVCodec *p, *experimental=NULL;
p = first_avcodec;
@@ -1812,7 +1812,7 @@ AVCodec *avcodec_find_encoder_by_name(const char *name)
return NULL;
}
-AVCodec *avcodec_find_decoder(enum CodecID id)
+AVCodec *avcodec_find_decoder(enum AVCodecID id)
{
AVCodec *p, *experimental=NULL;
p = first_avcodec;
@@ -1843,7 +1843,7 @@ AVCodec *avcodec_find_decoder_by_name(const char *name)
return NULL;
}
-const char *avcodec_get_name(enum CodecID id)
+const char *avcodec_get_name(enum AVCodecID id)
{
AVCodec *codec;
@@ -1994,11 +1994,11 @@ const char *av_get_profile_name(const AVCodec *codec, int profile)
unsigned avcodec_version( void )
{
-// av_assert0(CODEC_ID_V410==164);
- av_assert0(CODEC_ID_PCM_S8_PLANAR==65563);
- av_assert0(CODEC_ID_ADPCM_G722==69660);
-// av_assert0(CODEC_ID_BMV_AUDIO==86071);
- av_assert0(CODEC_ID_SRT==94216);
+// av_assert0(AV_CODEC_ID_V410==164);
+ av_assert0(AV_CODEC_ID_PCM_S8_PLANAR==65563);
+ av_assert0(AV_CODEC_ID_ADPCM_G722==69660);
+// av_assert0(AV_CODEC_ID_BMV_AUDIO==86071);
+ av_assert0(AV_CODEC_ID_SRT==94216);
av_assert0(LIBAVCODEC_VERSION_MICRO >= 100);
return LIBAVCODEC_VERSION_INT;
@@ -2080,82 +2080,82 @@ void avcodec_default_free_buffers(AVCodecContext *avctx)
}
}
-int av_get_exact_bits_per_sample(enum CodecID codec_id)
+int av_get_exact_bits_per_sample(enum AVCodecID codec_id)
{
switch(codec_id){
- case CODEC_ID_ADPCM_CT:
- case CODEC_ID_ADPCM_IMA_APC:
- case CODEC_ID_ADPCM_IMA_EA_SEAD:
- case CODEC_ID_ADPCM_IMA_WS:
- case CODEC_ID_ADPCM_G722:
- case CODEC_ID_ADPCM_YAMAHA:
+ case AV_CODEC_ID_ADPCM_CT:
+ case AV_CODEC_ID_ADPCM_IMA_APC:
+ case AV_CODEC_ID_ADPCM_IMA_EA_SEAD:
+ case AV_CODEC_ID_ADPCM_IMA_WS:
+ case AV_CODEC_ID_ADPCM_G722:
+ case AV_CODEC_ID_ADPCM_YAMAHA:
return 4;
- case CODEC_ID_PCM_ALAW:
- case CODEC_ID_PCM_MULAW:
- case CODEC_ID_PCM_S8:
- case CODEC_ID_PCM_U8:
- case CODEC_ID_PCM_ZORK:
+ case AV_CODEC_ID_PCM_ALAW:
+ case AV_CODEC_ID_PCM_MULAW:
+ case AV_CODEC_ID_PCM_S8:
+ case AV_CODEC_ID_PCM_U8:
+ case AV_CODEC_ID_PCM_ZORK:
return 8;
- case CODEC_ID_PCM_S16BE:
- case CODEC_ID_PCM_S16LE:
- case CODEC_ID_PCM_S16LE_PLANAR:
- case CODEC_ID_PCM_U16BE:
- case CODEC_ID_PCM_U16LE:
+ case AV_CODEC_ID_PCM_S16BE:
+ case AV_CODEC_ID_PCM_S16LE:
+ case AV_CODEC_ID_PCM_S16LE_PLANAR:
+ case AV_CODEC_ID_PCM_U16BE:
+ case AV_CODEC_ID_PCM_U16LE:
return 16;
- case CODEC_ID_PCM_S24DAUD:
- case CODEC_ID_PCM_S24BE:
- case CODEC_ID_PCM_S24LE:
- case CODEC_ID_PCM_U24BE:
- case CODEC_ID_PCM_U24LE:
+ case AV_CODEC_ID_PCM_S24DAUD:
+ case AV_CODEC_ID_PCM_S24BE:
+ case AV_CODEC_ID_PCM_S24LE:
+ case AV_CODEC_ID_PCM_U24BE:
+ case AV_CODEC_ID_PCM_U24LE:
return 24;
- case CODEC_ID_PCM_S32BE:
- case CODEC_ID_PCM_S32LE:
- case CODEC_ID_PCM_U32BE:
- case CODEC_ID_PCM_U32LE:
- case CODEC_ID_PCM_F32BE:
- case CODEC_ID_PCM_F32LE:
+ case AV_CODEC_ID_PCM_S32BE:
+ case AV_CODEC_ID_PCM_S32LE:
+ case AV_CODEC_ID_PCM_U32BE:
+ case AV_CODEC_ID_PCM_U32LE:
+ case AV_CODEC_ID_PCM_F32BE:
+ case AV_CODEC_ID_PCM_F32LE:
return 32;
- case CODEC_ID_PCM_F64BE:
- case CODEC_ID_PCM_F64LE:
+ case AV_CODEC_ID_PCM_F64BE:
+ case AV_CODEC_ID_PCM_F64LE:
return 64;
default:
return 0;
}
}
-enum CodecID av_get_pcm_codec(enum AVSampleFormat fmt, int be)
+enum AVCodecID av_get_pcm_codec(enum AVSampleFormat fmt, int be)
{
- static const enum CodecID map[AV_SAMPLE_FMT_NB][2] = {
- [AV_SAMPLE_FMT_U8 ] = { CODEC_ID_PCM_U8, CODEC_ID_PCM_U8 },
- [AV_SAMPLE_FMT_S16 ] = { CODEC_ID_PCM_S16LE, CODEC_ID_PCM_S16BE },
- [AV_SAMPLE_FMT_S32 ] = { CODEC_ID_PCM_S32LE, CODEC_ID_PCM_S32BE },
- [AV_SAMPLE_FMT_FLT ] = { CODEC_ID_PCM_F32LE, CODEC_ID_PCM_F32BE },
- [AV_SAMPLE_FMT_DBL ] = { CODEC_ID_PCM_F64LE, CODEC_ID_PCM_F64BE },
- [AV_SAMPLE_FMT_U8P ] = { CODEC_ID_PCM_U8, CODEC_ID_PCM_U8 },
- [AV_SAMPLE_FMT_S16P] = { CODEC_ID_PCM_S16LE, CODEC_ID_PCM_S16BE },
- [AV_SAMPLE_FMT_S32P] = { CODEC_ID_PCM_S32LE, CODEC_ID_PCM_S32BE },
- [AV_SAMPLE_FMT_FLTP] = { CODEC_ID_PCM_F32LE, CODEC_ID_PCM_F32BE },
- [AV_SAMPLE_FMT_DBLP] = { CODEC_ID_PCM_F64LE, CODEC_ID_PCM_F64BE },
+ static const enum AVCodecID map[AV_SAMPLE_FMT_NB][2] = {
+ [AV_SAMPLE_FMT_U8 ] = { AV_CODEC_ID_PCM_U8, AV_CODEC_ID_PCM_U8 },
+ [AV_SAMPLE_FMT_S16 ] = { AV_CODEC_ID_PCM_S16LE, AV_CODEC_ID_PCM_S16BE },
+ [AV_SAMPLE_FMT_S32 ] = { AV_CODEC_ID_PCM_S32LE, AV_CODEC_ID_PCM_S32BE },
+ [AV_SAMPLE_FMT_FLT ] = { AV_CODEC_ID_PCM_F32LE, AV_CODEC_ID_PCM_F32BE },
+ [AV_SAMPLE_FMT_DBL ] = { AV_CODEC_ID_PCM_F64LE, AV_CODEC_ID_PCM_F64BE },
+ [AV_SAMPLE_FMT_U8P ] = { AV_CODEC_ID_PCM_U8, AV_CODEC_ID_PCM_U8 },
+ [AV_SAMPLE_FMT_S16P] = { AV_CODEC_ID_PCM_S16LE, AV_CODEC_ID_PCM_S16BE },
+ [AV_SAMPLE_FMT_S32P] = { AV_CODEC_ID_PCM_S32LE, AV_CODEC_ID_PCM_S32BE },
+ [AV_SAMPLE_FMT_FLTP] = { AV_CODEC_ID_PCM_F32LE, AV_CODEC_ID_PCM_F32BE },
+ [AV_SAMPLE_FMT_DBLP] = { AV_CODEC_ID_PCM_F64LE, AV_CODEC_ID_PCM_F64BE },
};
if (fmt < 0 || fmt >= AV_SAMPLE_FMT_NB)
- return CODEC_ID_NONE;
+ return AV_CODEC_ID_NONE;
if (be < 0 || be > 1)
be = AV_NE(1, 0);
return map[fmt][be];
}
-int av_get_bits_per_sample(enum CodecID codec_id)
+int av_get_bits_per_sample(enum AVCodecID codec_id)
{
switch (codec_id) {
- case CODEC_ID_ADPCM_SBPRO_2:
+ case AV_CODEC_ID_ADPCM_SBPRO_2:
return 2;
- case CODEC_ID_ADPCM_SBPRO_3:
+ case AV_CODEC_ID_ADPCM_SBPRO_3:
return 3;
- case CODEC_ID_ADPCM_SBPRO_4:
- case CODEC_ID_ADPCM_IMA_WAV:
- case CODEC_ID_ADPCM_IMA_QT:
- case CODEC_ID_ADPCM_SWF:
- case CODEC_ID_ADPCM_MS:
+ case AV_CODEC_ID_ADPCM_SBPRO_4:
+ case AV_CODEC_ID_ADPCM_IMA_WAV:
+ case AV_CODEC_ID_ADPCM_IMA_QT:
+ case AV_CODEC_ID_ADPCM_SWF:
+ case AV_CODEC_ID_ADPCM_MS:
return 4;
default:
return av_get_exact_bits_per_sample(codec_id);
@@ -2180,47 +2180,47 @@ int av_get_audio_frame_duration(AVCodecContext *avctx, int frame_bytes)
/* codecs with a fixed packet duration */
switch (id) {
- case CODEC_ID_ADPCM_ADX: return 32;
- case CODEC_ID_ADPCM_IMA_QT: return 64;
- case CODEC_ID_ADPCM_EA_XAS: return 128;
- case CODEC_ID_AMR_NB:
- case CODEC_ID_GSM:
- case CODEC_ID_QCELP:
- case CODEC_ID_RA_144:
- case CODEC_ID_RA_288: return 160;
- case CODEC_ID_IMC: return 256;
- case CODEC_ID_AMR_WB:
- case CODEC_ID_GSM_MS: return 320;
- case CODEC_ID_MP1: return 384;
- case CODEC_ID_ATRAC1: return 512;
- case CODEC_ID_ATRAC3: return 1024;
- case CODEC_ID_MP2:
- case CODEC_ID_MUSEPACK7: return 1152;
- case CODEC_ID_AC3: return 1536;
+ case AV_CODEC_ID_ADPCM_ADX: return 32;
+ case AV_CODEC_ID_ADPCM_IMA_QT: return 64;
+ case AV_CODEC_ID_ADPCM_EA_XAS: return 128;
+ case AV_CODEC_ID_AMR_NB:
+ case AV_CODEC_ID_GSM:
+ case AV_CODEC_ID_QCELP:
+ case AV_CODEC_ID_RA_144:
+ case AV_CODEC_ID_RA_288: return 160;
+ case AV_CODEC_ID_IMC: return 256;
+ case AV_CODEC_ID_AMR_WB:
+ case AV_CODEC_ID_GSM_MS: return 320;
+ case AV_CODEC_ID_MP1: return 384;
+ case AV_CODEC_ID_ATRAC1: return 512;
+ case AV_CODEC_ID_ATRAC3: return 1024;
+ case AV_CODEC_ID_MP2:
+ case AV_CODEC_ID_MUSEPACK7: return 1152;
+ case AV_CODEC_ID_AC3: return 1536;
}
if (sr > 0) {
/* calc from sample rate */
- if (id == CODEC_ID_TTA)
+ if (id == AV_CODEC_ID_TTA)
return 256 * sr / 245;
if (ch > 0) {
/* calc from sample rate and channels */
- if (id == CODEC_ID_BINKAUDIO_DCT)
+ if (id == AV_CODEC_ID_BINKAUDIO_DCT)
return (480 << (sr / 22050)) / ch;
}
}
if (ba > 0) {
/* calc from block_align */
- if (id == CODEC_ID_SIPR) {
+ if (id == AV_CODEC_ID_SIPR) {
switch (ba) {
case 20: return 160;
case 19: return 144;
case 29: return 288;
case 37: return 480;
}
- } else if (id == CODEC_ID_ILBC) {
+ } else if (id == AV_CODEC_ID_ILBC) {
switch (ba) {
case 38: return 160;
case 50: return 240;
@@ -2230,46 +2230,46 @@ int av_get_audio_frame_duration(AVCodecContext *avctx, int frame_bytes)
if (frame_bytes > 0) {
/* calc from frame_bytes only */
- if (id == CODEC_ID_TRUESPEECH)
+ if (id == AV_CODEC_ID_TRUESPEECH)
return 240 * (frame_bytes / 32);
- if (id == CODEC_ID_NELLYMOSER)
+ if (id == AV_CODEC_ID_NELLYMOSER)
return 256 * (frame_bytes / 64);
if (bps > 0) {
/* calc from frame_bytes and bits_per_coded_sample */
- if (id == CODEC_ID_ADPCM_G726)
+ if (id == AV_CODEC_ID_ADPCM_G726)
return frame_bytes * 8 / bps;
}
if (ch > 0) {
/* calc from frame_bytes and channels */
switch (id) {
- case CODEC_ID_ADPCM_4XM:
- case CODEC_ID_ADPCM_IMA_ISS:
+ case AV_CODEC_ID_ADPCM_4XM:
+ case AV_CODEC_ID_ADPCM_IMA_ISS:
return (frame_bytes - 4 * ch) * 2 / ch;
- case CODEC_ID_ADPCM_IMA_SMJPEG:
+ case AV_CODEC_ID_ADPCM_IMA_SMJPEG:
return (frame_bytes - 4) * 2 / ch;
- case CODEC_ID_ADPCM_IMA_AMV:
+ case AV_CODEC_ID_ADPCM_IMA_AMV:
return (frame_bytes - 8) * 2 / ch;
- case CODEC_ID_ADPCM_XA:
+ case AV_CODEC_ID_ADPCM_XA:
return (frame_bytes / 128) * 224 / ch;
- case CODEC_ID_INTERPLAY_DPCM:
+ case AV_CODEC_ID_INTERPLAY_DPCM:
return (frame_bytes - 6 - ch) / ch;
- case CODEC_ID_ROQ_DPCM:
+ case AV_CODEC_ID_ROQ_DPCM:
return (frame_bytes - 8) / ch;
- case CODEC_ID_XAN_DPCM:
+ case AV_CODEC_ID_XAN_DPCM:
return (frame_bytes - 2 * ch) / ch;
- case CODEC_ID_MACE3:
+ case AV_CODEC_ID_MACE3:
return 3 * frame_bytes / ch;
- case CODEC_ID_MACE6:
+ case AV_CODEC_ID_MACE6:
return 6 * frame_bytes / ch;
- case CODEC_ID_PCM_LXF:
+ case AV_CODEC_ID_PCM_LXF:
return 2 * (frame_bytes / (5 * ch));
}
if (tag) {
/* calc from frame_bytes, channels, and codec_tag */
- if (id == CODEC_ID_SOL_DPCM) {
+ if (id == AV_CODEC_ID_SOL_DPCM) {
if (tag == 3)
return frame_bytes / ch;
else
@@ -2281,13 +2281,13 @@ int av_get_audio_frame_duration(AVCodecContext *avctx, int frame_bytes)
/* calc from frame_bytes, channels, and block_align */
int blocks = frame_bytes / ba;
switch (avctx->codec_id) {
- case CODEC_ID_ADPCM_IMA_WAV:
+ case AV_CODEC_ID_ADPCM_IMA_WAV:
return blocks * (1 + (ba - 4 * ch) / (4 * ch) * 8);
- case CODEC_ID_ADPCM_IMA_DK3:
+ case AV_CODEC_ID_ADPCM_IMA_DK3:
return blocks * (((ba - 16) * 2 / 3 * 4) / ch);
- case CODEC_ID_ADPCM_IMA_DK4:
+ case AV_CODEC_ID_ADPCM_IMA_DK4:
return blocks * (1 + (ba - 4 * ch) * 2 / ch);
- case CODEC_ID_ADPCM_MS:
+ case AV_CODEC_ID_ADPCM_MS:
return blocks * (2 + (ba - 7 * ch) * 2 / ch);
}
}
@@ -2295,15 +2295,15 @@ int av_get_audio_frame_duration(AVCodecContext *avctx, int frame_bytes)
if (bps > 0) {
/* calc from frame_bytes, channels, and bits_per_coded_sample */
switch (avctx->codec_id) {
- case CODEC_ID_PCM_DVD:
+ case AV_CODEC_ID_PCM_DVD:
if(bps<4)
return 0;
return 2 * (frame_bytes / ((bps * 2 / 8) * ch));
- case CODEC_ID_PCM_BLURAY:
+ case AV_CODEC_ID_PCM_BLURAY:
if(bps<4)
return 0;
return frame_bytes / ((FFALIGN(ch, 2) * bps) / 8);
- case CODEC_ID_S302M:
+ case AV_CODEC_ID_S302M:
return 2 * (frame_bytes / ((bps + 4) / 4)) / ch;
}
}
@@ -2380,7 +2380,7 @@ AVHWAccel *av_hwaccel_next(AVHWAccel *hwaccel)
return hwaccel ? hwaccel->next : first_hwaccel;
}
-AVHWAccel *ff_find_hwaccel(enum CodecID codec_id, enum PixelFormat pix_fmt)
+AVHWAccel *ff_find_hwaccel(enum AVCodecID codec_id, enum PixelFormat pix_fmt)
{
AVHWAccel *hwaccel=NULL;
@@ -2473,7 +2473,7 @@ int ff_thread_can_start_frame(AVCodecContext *avctx)
#endif
-enum AVMediaType avcodec_get_type(enum CodecID codec_id)
+enum AVMediaType avcodec_get_type(enum AVCodecID codec_id)
{
AVCodec *c= avcodec_find_decoder(codec_id);
if(!c)
@@ -2481,13 +2481,13 @@ enum AVMediaType avcodec_get_type(enum CodecID codec_id)
if(c)
return c->type;
- if (codec_id <= CODEC_ID_NONE)
+ if (codec_id <= AV_CODEC_ID_NONE)
return AVMEDIA_TYPE_UNKNOWN;
- else if (codec_id < CODEC_ID_FIRST_AUDIO)
+ else if (codec_id < AV_CODEC_ID_FIRST_AUDIO)
return AVMEDIA_TYPE_VIDEO;
- else if (codec_id < CODEC_ID_FIRST_SUBTITLE)
+ else if (codec_id < AV_CODEC_ID_FIRST_SUBTITLE)
return AVMEDIA_TYPE_AUDIO;
- else if (codec_id < CODEC_ID_FIRST_UNKNOWN)
+ else if (codec_id < AV_CODEC_ID_FIRST_UNKNOWN)
return AVMEDIA_TYPE_SUBTITLE;
return AVMEDIA_TYPE_UNKNOWN;
diff --git a/libavcodec/utvideo.c b/libavcodec/utvideo.c
index ac4438ddf7..6d56f0575c 100644
--- a/libavcodec/utvideo.c
+++ b/libavcodec/utvideo.c
@@ -579,7 +579,7 @@ static av_cold int decode_end(AVCodecContext *avctx)
AVCodec ff_utvideo_decoder = {
.name = "utvideo",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_UTVIDEO,
+ .id = AV_CODEC_ID_UTVIDEO,
.priv_data_size = sizeof(UtvideoContext),
.init = decode_init,
.close = decode_end,
diff --git a/libavcodec/v210dec.c b/libavcodec/v210dec.c
index 453390322d..dfad3069c8 100644
--- a/libavcodec/v210dec.c
+++ b/libavcodec/v210dec.c
@@ -184,7 +184,7 @@ static const AVClass v210dec_class = {
AVCodec ff_v210_decoder = {
.name = "v210",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_V210,
+ .id = AV_CODEC_ID_V210,
.priv_data_size = sizeof(V210DecContext),
.init = decode_init,
.close = decode_close,
diff --git a/libavcodec/v210enc.c b/libavcodec/v210enc.c
index 72d9a4e78c..34b772ff4a 100644
--- a/libavcodec/v210enc.c
+++ b/libavcodec/v210enc.c
@@ -117,7 +117,7 @@ static av_cold int encode_close(AVCodecContext *avctx)
AVCodec ff_v210_encoder = {
.name = "v210",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_V210,
+ .id = AV_CODEC_ID_V210,
.init = encode_init,
.encode2 = encode_frame,
.close = encode_close,
diff --git a/libavcodec/v210x.c b/libavcodec/v210x.c
index 7b6c59e897..bf37426ecd 100644
--- a/libavcodec/v210x.c
+++ b/libavcodec/v210x.c
@@ -137,7 +137,7 @@ static av_cold int decode_close(AVCodecContext *avctx)
AVCodec ff_v210x_decoder = {
.name = "v210x",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_V210X,
+ .id = AV_CODEC_ID_V210X,
.init = decode_init,
.close = decode_close,
.decode = decode_frame,
diff --git a/libavcodec/v308dec.c b/libavcodec/v308dec.c
index a24ccf4384..796518f5c5 100644
--- a/libavcodec/v308dec.c
+++ b/libavcodec/v308dec.c
@@ -99,7 +99,7 @@ static av_cold int v308_decode_close(AVCodecContext *avctx)
AVCodec ff_v308_decoder = {
.name = "v308",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_V308,
+ .id = AV_CODEC_ID_V308,
.init = v308_decode_init,
.decode = v308_decode_frame,
.close = v308_decode_close,
diff --git a/libavcodec/v308enc.c b/libavcodec/v308enc.c
index d5c5fb02c2..3c98da70ea 100644
--- a/libavcodec/v308enc.c
+++ b/libavcodec/v308enc.c
@@ -86,7 +86,7 @@ static av_cold int v308_encode_close(AVCodecContext *avctx)
AVCodec ff_v308_encoder = {
.name = "v308",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_V308,
+ .id = AV_CODEC_ID_V308,
.init = v308_encode_init,
.encode2 = v308_encode_frame,
.close = v308_encode_close,
diff --git a/libavcodec/v408dec.c b/libavcodec/v408dec.c
index 0f9bc9157f..01a5064a2a 100644
--- a/libavcodec/v408dec.c
+++ b/libavcodec/v408dec.c
@@ -68,7 +68,7 @@ static int v408_decode_frame(AVCodecContext *avctx, void *data,
for (i = 0; i < avctx->height; i++) {
for (j = 0; j < avctx->width; j++) {
- if (avctx->codec_id==CODEC_ID_AYUV) {
+ if (avctx->codec_id==AV_CODEC_ID_AYUV) {
v[j] = *src++;
u[j] = *src++;
y[j] = *src++;
@@ -107,7 +107,7 @@ static av_cold int v408_decode_close(AVCodecContext *avctx)
AVCodec ff_ayuv_decoder = {
.name = "ayuv",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_AYUV,
+ .id = AV_CODEC_ID_AYUV,
.init = v408_decode_init,
.decode = v408_decode_frame,
.close = v408_decode_close,
@@ -119,7 +119,7 @@ AVCodec ff_ayuv_decoder = {
AVCodec ff_v408_decoder = {
.name = "v408",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_V408,
+ .id = AV_CODEC_ID_V408,
.init = v408_decode_init,
.decode = v408_decode_frame,
.close = v408_decode_close,
diff --git a/libavcodec/v408enc.c b/libavcodec/v408enc.c
index 878180793c..27944bcba5 100644
--- a/libavcodec/v408enc.c
+++ b/libavcodec/v408enc.c
@@ -58,7 +58,7 @@ static int v408_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
for (i = 0; i < avctx->height; i++) {
for (j = 0; j < avctx->width; j++) {
- if (avctx->codec_id==CODEC_ID_AYUV) {
+ if (avctx->codec_id==AV_CODEC_ID_AYUV) {
*dst++ = v[j];
*dst++ = u[j];
*dst++ = y[j];
@@ -92,7 +92,7 @@ static av_cold int v408_encode_close(AVCodecContext *avctx)
AVCodec ff_ayuv_encoder = {
.name = "ayuv",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_AYUV,
+ .id = AV_CODEC_ID_AYUV,
.init = v408_encode_init,
.encode2 = v408_encode_frame,
.close = v408_encode_close,
@@ -104,7 +104,7 @@ AVCodec ff_ayuv_encoder = {
AVCodec ff_v408_encoder = {
.name = "v408",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_V408,
+ .id = AV_CODEC_ID_V408,
.init = v408_encode_init,
.encode2 = v408_encode_frame,
.close = v408_encode_close,
diff --git a/libavcodec/v410dec.c b/libavcodec/v410dec.c
index ba75ec417a..1608ae5b30 100644
--- a/libavcodec/v410dec.c
+++ b/libavcodec/v410dec.c
@@ -113,7 +113,7 @@ static av_cold int v410_decode_close(AVCodecContext *avctx)
AVCodec ff_v410_decoder = {
.name = "v410",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_V410,
+ .id = AV_CODEC_ID_V410,
.init = v410_decode_init,
.decode = v410_decode_frame,
.close = v410_decode_close,
diff --git a/libavcodec/v410enc.c b/libavcodec/v410enc.c
index 1d4699bd77..9531104597 100644
--- a/libavcodec/v410enc.c
+++ b/libavcodec/v410enc.c
@@ -89,7 +89,7 @@ static av_cold int v410_encode_close(AVCodecContext *avctx)
AVCodec ff_v410_encoder = {
.name = "v410",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_V410,
+ .id = AV_CODEC_ID_V410,
.init = v410_encode_init,
.encode2 = v410_encode_frame,
.close = v410_encode_close,
diff --git a/libavcodec/vaapi_h264.c b/libavcodec/vaapi_h264.c
index 753deaf5ca..38fc0dac8b 100644
--- a/libavcodec/vaapi_h264.c
+++ b/libavcodec/vaapi_h264.c
@@ -340,7 +340,7 @@ static int decode_slice(AVCodecContext *avctx,
AVHWAccel ff_h264_vaapi_hwaccel = {
.name = "h264_vaapi",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_H264,
+ .id = AV_CODEC_ID_H264,
.pix_fmt = PIX_FMT_VAAPI_VLD,
.start_frame = start_frame,
.end_frame = end_frame,
diff --git a/libavcodec/vaapi_mpeg2.c b/libavcodec/vaapi_mpeg2.c
index e6ff764f61..455f68e445 100644
--- a/libavcodec/vaapi_mpeg2.c
+++ b/libavcodec/vaapi_mpeg2.c
@@ -141,7 +141,7 @@ static int vaapi_mpeg2_decode_slice(AVCodecContext *avctx, const uint8_t *buffer
AVHWAccel ff_mpeg2_vaapi_hwaccel = {
.name = "mpeg2_vaapi",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_MPEG2VIDEO,
+ .id = AV_CODEC_ID_MPEG2VIDEO,
.pix_fmt = PIX_FMT_VAAPI_VLD,
.start_frame = vaapi_mpeg2_start_frame,
.end_frame = vaapi_mpeg2_end_frame,
diff --git a/libavcodec/vaapi_mpeg4.c b/libavcodec/vaapi_mpeg4.c
index 946095320b..f019661dab 100644
--- a/libavcodec/vaapi_mpeg4.c
+++ b/libavcodec/vaapi_mpeg4.c
@@ -60,7 +60,7 @@ static int vaapi_mpeg4_start_frame(AVCodecContext *avctx, av_unused const uint8_
pic_param->forward_reference_picture = VA_INVALID_ID;
pic_param->backward_reference_picture = VA_INVALID_ID;
pic_param->vol_fields.value = 0; /* reset all bits */
- pic_param->vol_fields.bits.short_video_header = avctx->codec->id == CODEC_ID_H263;
+ pic_param->vol_fields.bits.short_video_header = avctx->codec->id == AV_CODEC_ID_H263;
pic_param->vol_fields.bits.chroma_format = CHROMA_420;
pic_param->vol_fields.bits.interlaced = !s->progressive_sequence;
pic_param->vol_fields.bits.obmc_disable = 1;
@@ -132,7 +132,7 @@ static int vaapi_mpeg4_decode_slice(AVCodecContext *avctx, const uint8_t *buffer
* a single slice param. So fake macroblock_number for FFmpeg so
* that we don't call vaapi_mpeg4_decode_slice() again
*/
- if (avctx->codec->id == CODEC_ID_H263)
+ if (avctx->codec->id == AV_CODEC_ID_H263)
size = s->gb.buffer_end - buffer;
/* Fill in VASliceParameterBufferMPEG4 */
@@ -143,7 +143,7 @@ static int vaapi_mpeg4_decode_slice(AVCodecContext *avctx, const uint8_t *buffer
slice_param->macroblock_number = s->mb_y * s->mb_width + s->mb_x;
slice_param->quant_scale = s->qscale;
- if (avctx->codec->id == CODEC_ID_H263)
+ if (avctx->codec->id == AV_CODEC_ID_H263)
s->mb_y = s->mb_height;
return 0;
@@ -153,7 +153,7 @@ static int vaapi_mpeg4_decode_slice(AVCodecContext *avctx, const uint8_t *buffer
AVHWAccel ff_mpeg4_vaapi_hwaccel = {
.name = "mpeg4_vaapi",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_MPEG4,
+ .id = AV_CODEC_ID_MPEG4,
.pix_fmt = PIX_FMT_VAAPI_VLD,
.start_frame = vaapi_mpeg4_start_frame,
.end_frame = vaapi_mpeg4_end_frame,
@@ -165,7 +165,7 @@ AVHWAccel ff_mpeg4_vaapi_hwaccel = {
AVHWAccel ff_h263_vaapi_hwaccel = {
.name = "h263_vaapi",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_H263,
+ .id = AV_CODEC_ID_H263,
.pix_fmt = PIX_FMT_VAAPI_VLD,
.start_frame = vaapi_mpeg4_start_frame,
.end_frame = vaapi_mpeg4_end_frame,
diff --git a/libavcodec/vaapi_vc1.c b/libavcodec/vaapi_vc1.c
index 35fda572d3..e5d5626d82 100644
--- a/libavcodec/vaapi_vc1.c
+++ b/libavcodec/vaapi_vc1.c
@@ -326,7 +326,7 @@ static int vaapi_vc1_decode_slice(AVCodecContext *avctx, const uint8_t *buffer,
av_dlog(avctx, "vaapi_vc1_decode_slice(): buffer %p, size %d\n", buffer, size);
/* Current bit buffer is beyond any marker for VC-1, so skip it */
- if (avctx->codec_id == CODEC_ID_VC1 && IS_MARKER(AV_RB32(buffer))) {
+ if (avctx->codec_id == AV_CODEC_ID_VC1 && IS_MARKER(AV_RB32(buffer))) {
buffer += 4;
size -= 4;
}
@@ -344,7 +344,7 @@ static int vaapi_vc1_decode_slice(AVCodecContext *avctx, const uint8_t *buffer,
AVHWAccel ff_wmv3_vaapi_hwaccel = {
.name = "wmv3_vaapi",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_WMV3,
+ .id = AV_CODEC_ID_WMV3,
.pix_fmt = PIX_FMT_VAAPI_VLD,
.start_frame = vaapi_vc1_start_frame,
.end_frame = vaapi_vc1_end_frame,
@@ -355,7 +355,7 @@ AVHWAccel ff_wmv3_vaapi_hwaccel = {
AVHWAccel ff_vc1_vaapi_hwaccel = {
.name = "vc1_vaapi",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_VC1,
+ .id = AV_CODEC_ID_VC1,
.pix_fmt = PIX_FMT_VAAPI_VLD,
.start_frame = vaapi_vc1_start_frame,
.end_frame = vaapi_vc1_end_frame,
diff --git a/libavcodec/vb.c b/libavcodec/vb.c
index 8219e84bed..a71741d7f6 100644
--- a/libavcodec/vb.c
+++ b/libavcodec/vb.c
@@ -274,7 +274,7 @@ static av_cold int decode_end(AVCodecContext *avctx)
AVCodec ff_vb_decoder = {
.name = "vb",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_VB,
+ .id = AV_CODEC_ID_VB,
.priv_data_size = sizeof(VBDecContext),
.init = decode_init,
.close = decode_end,
diff --git a/libavcodec/vble.c b/libavcodec/vble.c
index 43c7d55d9c..63a08d72b6 100644
--- a/libavcodec/vble.c
+++ b/libavcodec/vble.c
@@ -218,7 +218,7 @@ static av_cold int vble_decode_init(AVCodecContext *avctx)
AVCodec ff_vble_decoder = {
.name = "vble",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_VBLE,
+ .id = AV_CODEC_ID_VBLE,
.priv_data_size = sizeof(VBLEContext),
.init = vble_decode_init,
.close = vble_decode_close,
diff --git a/libavcodec/vc1_parser.c b/libavcodec/vc1_parser.c
index a2a0d4a507..53af61c5da 100644
--- a/libavcodec/vc1_parser.c
+++ b/libavcodec/vc1_parser.c
@@ -192,7 +192,7 @@ static int vc1_parse_init(AVCodecParserContext *s)
}
AVCodecParser ff_vc1_parser = {
- .codec_ids = { CODEC_ID_VC1 },
+ .codec_ids = { AV_CODEC_ID_VC1 },
.priv_data_size = sizeof(VC1ParseContext),
.parser_init = vc1_parse_init,
.parser_parse = vc1_parse,
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index 8929a72107..ba5ab56764 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -4892,7 +4892,7 @@ static void vc1_parse_sprites(VC1Context *v, GetBitContext* gb, SpriteData* sd)
av_log(avctx, AV_LOG_DEBUG, "Effect flag set\n");
if (get_bits_count(gb) >= gb->size_in_bits +
- (avctx->codec_id == CODEC_ID_WMV3IMAGE ? 64 : 0))
+ (avctx->codec_id == AV_CODEC_ID_WMV3IMAGE ? 64 : 0))
av_log(avctx, AV_LOG_ERROR, "Buffer overrun\n");
if (get_bits_count(gb) < gb->size_in_bits - 8)
av_log(avctx, AV_LOG_WARNING, "Buffer not fully read\n");
@@ -5101,7 +5101,7 @@ static av_cold int vc1_decode_init_alloc_tables(VC1Context *v)
ff_intrax8_common_init(&v->x8,s);
- if (s->avctx->codec_id == CODEC_ID_WMV3IMAGE || s->avctx->codec_id == CODEC_ID_VC1IMAGE) {
+ if (s->avctx->codec_id == AV_CODEC_ID_WMV3IMAGE || s->avctx->codec_id == AV_CODEC_ID_VC1IMAGE) {
for (i = 0; i < 4; i++)
if (!(v->sr_rows[i >> 1][i & 1] = av_malloc(v->output_width))) return -1;
}
@@ -5148,7 +5148,7 @@ static av_cold int vc1_decode_init(AVCodecContext *avctx)
return -1;
ff_vc1dsp_init(&v->vc1dsp);
- if (avctx->codec_id == CODEC_ID_WMV3 || avctx->codec_id == CODEC_ID_WMV3IMAGE) {
+ if (avctx->codec_id == AV_CODEC_ID_WMV3 || avctx->codec_id == AV_CODEC_ID_WMV3IMAGE) {
int count = 0;
// looks like WMV3 has a sequence header stored in the extradata
@@ -5242,7 +5242,7 @@ static av_cold int vc1_decode_init(AVCodecContext *avctx)
v->top_blk_sh = 0;
}
- if (avctx->codec_id == CODEC_ID_WMV3IMAGE || avctx->codec_id == CODEC_ID_VC1IMAGE) {
+ if (avctx->codec_id == AV_CODEC_ID_WMV3IMAGE || avctx->codec_id == AV_CODEC_ID_VC1IMAGE) {
v->sprite_width = avctx->coded_width;
v->sprite_height = avctx->coded_height;
@@ -5266,7 +5266,7 @@ static av_cold int vc1_decode_end(AVCodecContext *avctx)
VC1Context *v = avctx->priv_data;
int i;
- if ((avctx->codec_id == CODEC_ID_WMV3IMAGE || avctx->codec_id == CODEC_ID_VC1IMAGE)
+ if ((avctx->codec_id == AV_CODEC_ID_WMV3IMAGE || avctx->codec_id == AV_CODEC_ID_VC1IMAGE)
&& v->sprite_output_frame.data[0])
avctx->release_buffer(avctx, &v->sprite_output_frame);
for (i = 0; i < 4; i++)
@@ -5339,7 +5339,7 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data,
}
//for advanced profile we may need to parse and unescape data
- if (avctx->codec_id == CODEC_ID_VC1 || avctx->codec_id == CODEC_ID_VC1IMAGE) {
+ if (avctx->codec_id == AV_CODEC_ID_VC1 || avctx->codec_id == AV_CODEC_ID_VC1IMAGE) {
int buf_size2 = 0;
buf2 = av_mallocz(buf_size + FF_INPUT_BUFFER_PADDING_SIZE);
@@ -5435,11 +5435,11 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data,
if (v->res_sprite) {
v->new_sprite = !get_bits1(&s->gb);
v->two_sprites = get_bits1(&s->gb);
- /* res_sprite means a Windows Media Image stream, CODEC_ID_*IMAGE means
+ /* res_sprite means a Windows Media Image stream, AV_CODEC_ID_*IMAGE means
we're using the sprite compositor. These are intentionally kept separate
so you can get the raw sprites by using the wmv3 decoder for WMVP or
the vc1 one for WVP2 */
- if (avctx->codec_id == CODEC_ID_WMV3IMAGE || avctx->codec_id == CODEC_ID_VC1IMAGE) {
+ if (avctx->codec_id == AV_CODEC_ID_WMV3IMAGE || avctx->codec_id == AV_CODEC_ID_VC1IMAGE) {
if (v->new_sprite) {
// switch AVCodecContext parameters to those of the sprites
avctx->width = avctx->coded_width = v->sprite_width;
@@ -5489,7 +5489,7 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data,
}
}
- if ((avctx->codec_id == CODEC_ID_WMV3IMAGE || avctx->codec_id == CODEC_ID_VC1IMAGE)
+ if ((avctx->codec_id == AV_CODEC_ID_WMV3IMAGE || avctx->codec_id == AV_CODEC_ID_VC1IMAGE)
&& s->pict_type != AV_PICTURE_TYPE_I) {
av_log(v->s.avctx, AV_LOG_ERROR, "Sprite decoder: expected I-frame\n");
goto err;
@@ -5636,7 +5636,7 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data,
ff_MPV_frame_end(s);
- if (avctx->codec_id == CODEC_ID_WMV3IMAGE || avctx->codec_id == CODEC_ID_VC1IMAGE) {
+ if (avctx->codec_id == AV_CODEC_ID_WMV3IMAGE || avctx->codec_id == AV_CODEC_ID_VC1IMAGE) {
image:
avctx->width = avctx->coded_width = v->output_width;
avctx->height = avctx->coded_height = v->output_height;
@@ -5687,7 +5687,7 @@ static const AVProfile profiles[] = {
AVCodec ff_vc1_decoder = {
.name = "vc1",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_VC1,
+ .id = AV_CODEC_ID_VC1,
.priv_data_size = sizeof(VC1Context),
.init = vc1_decode_init,
.close = vc1_decode_end,
@@ -5702,7 +5702,7 @@ AVCodec ff_vc1_decoder = {
AVCodec ff_wmv3_decoder = {
.name = "wmv3",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_WMV3,
+ .id = AV_CODEC_ID_WMV3,
.priv_data_size = sizeof(VC1Context),
.init = vc1_decode_init,
.close = vc1_decode_end,
@@ -5718,7 +5718,7 @@ AVCodec ff_wmv3_decoder = {
AVCodec ff_wmv3_vdpau_decoder = {
.name = "wmv3_vdpau",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_WMV3,
+ .id = AV_CODEC_ID_WMV3,
.priv_data_size = sizeof(VC1Context),
.init = vc1_decode_init,
.close = vc1_decode_end,
@@ -5734,7 +5734,7 @@ AVCodec ff_wmv3_vdpau_decoder = {
AVCodec ff_vc1_vdpau_decoder = {
.name = "vc1_vdpau",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_VC1,
+ .id = AV_CODEC_ID_VC1,
.priv_data_size = sizeof(VC1Context),
.init = vc1_decode_init,
.close = vc1_decode_end,
@@ -5750,7 +5750,7 @@ AVCodec ff_vc1_vdpau_decoder = {
AVCodec ff_wmv3image_decoder = {
.name = "wmv3image",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_WMV3IMAGE,
+ .id = AV_CODEC_ID_WMV3IMAGE,
.priv_data_size = sizeof(VC1Context),
.init = vc1_decode_init,
.close = vc1_decode_end,
@@ -5766,7 +5766,7 @@ AVCodec ff_wmv3image_decoder = {
AVCodec ff_vc1image_decoder = {
.name = "vc1image",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_VC1IMAGE,
+ .id = AV_CODEC_ID_VC1IMAGE,
.priv_data_size = sizeof(VC1Context),
.init = vc1_decode_init,
.close = vc1_decode_end,
diff --git a/libavcodec/vcr1.c b/libavcodec/vcr1.c
index a5e1bc6577..5403c1be64 100644
--- a/libavcodec/vcr1.c
+++ b/libavcodec/vcr1.c
@@ -145,7 +145,7 @@ static int vcr1_decode_frame(AVCodecContext *avctx, void *data,
AVCodec ff_vcr1_decoder = {
.name = "vcr1",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_VCR1,
+ .id = AV_CODEC_ID_VCR1,
.priv_data_size = sizeof(VCR1Context),
.init = vcr1_decode_init,
.close = vcr1_decode_end,
@@ -185,7 +185,7 @@ static int vcr1_encode_frame(AVCodecContext *avctx, unsigned char *buf,
AVCodec ff_vcr1_encoder = {
.name = "vcr1",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_VCR1,
+ .id = AV_CODEC_ID_VCR1,
.priv_data_size = sizeof(VCR1Context),
.init = vcr1_common_init,
.encode = vcr1_encode_frame,
diff --git a/libavcodec/vda_h264.c b/libavcodec/vda_h264.c
index 254268f558..a4a4c903fd 100644
--- a/libavcodec/vda_h264.c
+++ b/libavcodec/vda_h264.c
@@ -84,7 +84,7 @@ static int end_frame(AVCodecContext *avctx)
AVHWAccel ff_h264_vda_hwaccel = {
.name = "h264_vda",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_H264,
+ .id = AV_CODEC_ID_H264,
.pix_fmt = PIX_FMT_VDA_VLD,
.start_frame = start_frame,
.decode_slice = decode_slice,
diff --git a/libavcodec/vdpau.c b/libavcodec/vdpau.c
index ce5103a6af..da9ae9ddfb 100644
--- a/libavcodec/vdpau.c
+++ b/libavcodec/vdpau.c
@@ -340,7 +340,7 @@ void ff_vdpau_mpeg4_decode_picture(MpegEncContext *s, const uint8_t *buf,
render->info.mpeg4.interlaced = !s->progressive_sequence;
render->info.mpeg4.quant_type = s->mpeg_quant;
render->info.mpeg4.quarter_sample = s->quarter_sample;
- render->info.mpeg4.short_video_header = s->avctx->codec->id == CODEC_ID_H263;
+ render->info.mpeg4.short_video_header = s->avctx->codec->id == AV_CODEC_ID_H263;
render->info.mpeg4.rounding_control = s->no_rounding;
render->info.mpeg4.alternate_vertical_scan_flag = s->alternate_scan;
render->info.mpeg4.top_field_first = s->top_field_first;
@@ -389,7 +389,7 @@ static int vdpau_mpeg2_end_frame(AVCodecContext *avctx)
AVHWAccel ff_mpeg1_vdpau_hwaccel = {
.name = "mpeg1_vdpau",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_MPEG1VIDEO,
+ .id = AV_CODEC_ID_MPEG1VIDEO,
.pix_fmt = PIX_FMT_VDPAU_MPEG1,
.start_frame = vdpau_mpeg2_start_frame,
.end_frame = vdpau_mpeg2_end_frame,
@@ -399,7 +399,7 @@ AVHWAccel ff_mpeg1_vdpau_hwaccel = {
AVHWAccel ff_mpeg2_vdpau_hwaccel = {
.name = "mpeg2_vdpau",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_MPEG2VIDEO,
+ .id = AV_CODEC_ID_MPEG2VIDEO,
.pix_fmt = PIX_FMT_VDPAU_MPEG2,
.start_frame = vdpau_mpeg2_start_frame,
.end_frame = vdpau_mpeg2_end_frame,
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 1f2af62246..8f07291b51 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -27,7 +27,7 @@
*/
#define LIBAVCODEC_VERSION_MAJOR 54
-#define LIBAVCODEC_VERSION_MINOR 50
+#define LIBAVCODEC_VERSION_MINOR 51
#define LIBAVCODEC_VERSION_MICRO 100
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
@@ -86,5 +86,8 @@
#ifndef FF_API_FIND_BEST_PIX_FMT
#define FF_API_FIND_BEST_PIX_FMT (LIBAVCODEC_VERSION_MAJOR < 55)
#endif
+#ifndef FF_API_CODEC_ID
+#define FF_API_CODEC_ID (LIBAVCODEC_VERSION_MAJOR < 55)
+#endif
#endif /* AVCODEC_VERSION_H */
diff --git a/libavcodec/vima.c b/libavcodec/vima.c
index 7c9a22bfe7..ceebb7691d 100644
--- a/libavcodec/vima.c
+++ b/libavcodec/vima.c
@@ -227,7 +227,7 @@ static int decode_frame(AVCodecContext *avctx, void *data,
AVCodec ff_vima_decoder = {
.name = "vima",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_VIMA,
+ .id = AV_CODEC_ID_VIMA,
.priv_data_size = sizeof(VimaContext),
.init = decode_init,
.decode = decode_frame,
diff --git a/libavcodec/vmdav.c b/libavcodec/vmdav.c
index f7c6c19b49..b7a0b8ad51 100644
--- a/libavcodec/vmdav.c
+++ b/libavcodec/vmdav.c
@@ -645,7 +645,7 @@ static int vmdaudio_decode_frame(AVCodecContext *avctx, void *data,
AVCodec ff_vmdvideo_decoder = {
.name = "vmdvideo",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_VMDVIDEO,
+ .id = AV_CODEC_ID_VMDVIDEO,
.priv_data_size = sizeof(VmdVideoContext),
.init = vmdvideo_decode_init,
.close = vmdvideo_decode_end,
@@ -657,7 +657,7 @@ AVCodec ff_vmdvideo_decoder = {
AVCodec ff_vmdaudio_decoder = {
.name = "vmdaudio",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_VMDAUDIO,
+ .id = AV_CODEC_ID_VMDAUDIO,
.priv_data_size = sizeof(VmdAudioContext),
.init = vmdaudio_decode_init,
.decode = vmdaudio_decode_frame,
diff --git a/libavcodec/vmnc.c b/libavcodec/vmnc.c
index 5eb8372ed3..4082e02698 100644
--- a/libavcodec/vmnc.c
+++ b/libavcodec/vmnc.c
@@ -513,7 +513,7 @@ static av_cold int decode_end(AVCodecContext *avctx)
AVCodec ff_vmnc_decoder = {
.name = "vmnc",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_VMNC,
+ .id = AV_CODEC_ID_VMNC,
.priv_data_size = sizeof(VmncContext),
.init = decode_init,
.close = decode_end,
diff --git a/libavcodec/vorbis_parser.c b/libavcodec/vorbis_parser.c
index c35bafe10e..6979d6fa8f 100644
--- a/libavcodec/vorbis_parser.c
+++ b/libavcodec/vorbis_parser.c
@@ -263,7 +263,7 @@ end:
}
AVCodecParser ff_vorbis_parser = {
- .codec_ids = { CODEC_ID_VORBIS },
+ .codec_ids = { AV_CODEC_ID_VORBIS },
.priv_data_size = sizeof(VorbisParseContext),
.parser_parse = vorbis_parse,
};
diff --git a/libavcodec/vorbisdec.c b/libavcodec/vorbisdec.c
index 34ba7ba903..f83355f8db 100644
--- a/libavcodec/vorbisdec.c
+++ b/libavcodec/vorbisdec.c
@@ -1732,7 +1732,7 @@ static av_cold void vorbis_decode_flush(AVCodecContext *avccontext)
AVCodec ff_vorbis_decoder = {
.name = "vorbis",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_VORBIS,
+ .id = AV_CODEC_ID_VORBIS,
.priv_data_size = sizeof(vorbis_context),
.init = vorbis_decode_init,
.close = vorbis_decode_close,
diff --git a/libavcodec/vorbisenc.c b/libavcodec/vorbisenc.c
index 7a053c2acc..b53fd371f2 100644
--- a/libavcodec/vorbisenc.c
+++ b/libavcodec/vorbisenc.c
@@ -1206,7 +1206,7 @@ error:
AVCodec ff_vorbis_encoder = {
.name = "vorbis",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_VORBIS,
+ .id = AV_CODEC_ID_VORBIS,
.priv_data_size = sizeof(vorbis_enc_context),
.init = vorbis_encode_init,
.encode2 = vorbis_encode_frame,
diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c
index a3bfd74666..0f112c22aa 100644
--- a/libavcodec/vp3.c
+++ b/libavcodec/vp3.c
@@ -1667,7 +1667,7 @@ static av_cold int vp3_decode_init(AVCodecContext *avctx)
s->avctx = avctx;
s->width = FFALIGN(avctx->width, 16);
s->height = FFALIGN(avctx->height, 16);
- if (avctx->codec_id != CODEC_ID_THEORA)
+ if (avctx->codec_id != AV_CODEC_ID_THEORA)
avctx->pix_fmt = PIX_FMT_YUV420P;
avctx->chroma_sample_location = AVCHROMA_LOC_CENTER;
ff_dsputil_init(&s->dsp, avctx);
@@ -2374,7 +2374,7 @@ static av_cold int theora_decode_init(AVCodecContext *avctx)
AVCodec ff_theora_decoder = {
.name = "theora",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_THEORA,
+ .id = AV_CODEC_ID_THEORA,
.priv_data_size = sizeof(Vp3DecodeContext),
.init = theora_decode_init,
.close = vp3_decode_end,
@@ -2391,7 +2391,7 @@ AVCodec ff_theora_decoder = {
AVCodec ff_vp3_decoder = {
.name = "vp3",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_VP3,
+ .id = AV_CODEC_ID_VP3,
.priv_data_size = sizeof(Vp3DecodeContext),
.init = vp3_decode_init,
.close = vp3_decode_end,
diff --git a/libavcodec/vp3_parser.c b/libavcodec/vp3_parser.c
index c2e8518c55..ce15309356 100644
--- a/libavcodec/vp3_parser.c
+++ b/libavcodec/vp3_parser.c
@@ -25,7 +25,7 @@ static int parse(AVCodecParserContext *s,
const uint8_t **poutbuf, int *poutbuf_size,
const uint8_t *buf, int buf_size)
{
- if(avctx->codec_id == CODEC_ID_THEORA)
+ if(avctx->codec_id == AV_CODEC_ID_THEORA)
s->pict_type= (buf[0]&0x40) ? AV_PICTURE_TYPE_P : AV_PICTURE_TYPE_I;
else
s->pict_type= (buf[0]&0x80) ? AV_PICTURE_TYPE_P : AV_PICTURE_TYPE_I;
@@ -36,7 +36,7 @@ static int parse(AVCodecParserContext *s,
}
AVCodecParser ff_vp3_parser = {
- .codec_ids = { CODEC_ID_THEORA, CODEC_ID_VP3, CODEC_ID_VP6,
- CODEC_ID_VP6F, CODEC_ID_VP6A },
+ .codec_ids = { AV_CODEC_ID_THEORA, AV_CODEC_ID_VP3, AV_CODEC_ID_VP6,
+ AV_CODEC_ID_VP6F, AV_CODEC_ID_VP6A },
.parser_parse = parse,
};
diff --git a/libavcodec/vp5.c b/libavcodec/vp5.c
index f3a0017d15..9f74784492 100644
--- a/libavcodec/vp5.c
+++ b/libavcodec/vp5.c
@@ -281,7 +281,7 @@ static av_cold int vp5_decode_init(AVCodecContext *avctx)
AVCodec ff_vp5_decoder = {
.name = "vp5",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_VP5,
+ .id = AV_CODEC_ID_VP5,
.priv_data_size = sizeof(VP56Context),
.init = vp5_decode_init,
.close = ff_vp56_free,
diff --git a/libavcodec/vp56.c b/libavcodec/vp56.c
index f98d22c1cb..f3f7eca566 100644
--- a/libavcodec/vp56.c
+++ b/libavcodec/vp56.c
@@ -196,7 +196,7 @@ static void vp56_decode_4mv(VP56Context *s, int row, int col)
s->macroblocks[row * s->mb_width + col].mv = s->mv[3];
/* chroma vectors are average luma vectors */
- if (s->avctx->codec->id == CODEC_ID_VP5) {
+ if (s->avctx->codec->id == AV_CODEC_ID_VP5) {
s->mv[4].x = s->mv[5].x = RSHIFT(mv.x,2);
s->mv[4].y = s->mv[5].y = RSHIFT(mv.y,2);
} else {
@@ -281,7 +281,7 @@ static void vp56_add_predictors_dc(VP56Context *s, VP56Frame ref_frame)
dc += ab->dc_coeff;
count++;
}
- if (s->avctx->codec->id == CODEC_ID_VP5)
+ if (s->avctx->codec->id == AV_CODEC_ID_VP5)
for (i=0; i<2; i++)
if (count < 2 && ref_frame == ab[-1+2*i].ref_frame) {
dc += ab[-1+2*i].dc_coeff;
diff --git a/libavcodec/vp56dsp.c b/libavcodec/vp56dsp.c
index c629343a8b..9ab8a89411 100644
--- a/libavcodec/vp56dsp.c
+++ b/libavcodec/vp56dsp.c
@@ -74,9 +74,9 @@ VP56_EDGE_FILTER(vp5, ver, stride, 1)
VP56_EDGE_FILTER(vp6, hor, 1, stride)
VP56_EDGE_FILTER(vp6, ver, stride, 1)
-void ff_vp56dsp_init(VP56DSPContext *s, enum CodecID codec)
+void ff_vp56dsp_init(VP56DSPContext *s, enum AVCodecID codec)
{
- if (codec == CODEC_ID_VP5) {
+ if (codec == AV_CODEC_ID_VP5) {
s->edge_filter_hor = vp5_edge_filter_hor;
s->edge_filter_ver = vp5_edge_filter_ver;
} else {
diff --git a/libavcodec/vp56dsp.h b/libavcodec/vp56dsp.h
index 74a9cb5309..51e8c16480 100644
--- a/libavcodec/vp56dsp.h
+++ b/libavcodec/vp56dsp.h
@@ -35,8 +35,8 @@ typedef struct VP56DSPContext {
void ff_vp6_filter_diag4_c(uint8_t *dst, uint8_t *src, int stride,
const int16_t *h_weights, const int16_t *v_weights);
-void ff_vp56dsp_init(VP56DSPContext *s, enum CodecID codec);
-void ff_vp56dsp_init_arm(VP56DSPContext *s, enum CodecID codec);
-void ff_vp56dsp_init_x86(VP56DSPContext* c, enum CodecID codec);
+void ff_vp56dsp_init(VP56DSPContext *s, enum AVCodecID codec);
+void ff_vp56dsp_init_arm(VP56DSPContext *s, enum AVCodecID codec);
+void ff_vp56dsp_init_x86(VP56DSPContext* c, enum AVCodecID codec);
#endif /* AVCODEC_VP56DSP_H */
diff --git a/libavcodec/vp6.c b/libavcodec/vp6.c
index 6c88d02bc0..34361e88e5 100644
--- a/libavcodec/vp6.c
+++ b/libavcodec/vp6.c
@@ -594,8 +594,8 @@ static av_cold int vp6_decode_init(AVCodecContext *avctx)
{
VP56Context *s = avctx->priv_data;
- ff_vp56_init(avctx, avctx->codec->id == CODEC_ID_VP6,
- avctx->codec->id == CODEC_ID_VP6A);
+ ff_vp56_init(avctx, avctx->codec->id == AV_CODEC_ID_VP6,
+ avctx->codec->id == AV_CODEC_ID_VP6A);
s->vp56_coord_div = vp6_coord_div;
s->parse_vector_adjustment = vp6_parse_vector_adjustment;
s->filter = vp6_filter;
@@ -627,7 +627,7 @@ static av_cold int vp6_decode_free(AVCodecContext *avctx)
AVCodec ff_vp6_decoder = {
.name = "vp6",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_VP6,
+ .id = AV_CODEC_ID_VP6,
.priv_data_size = sizeof(VP56Context),
.init = vp6_decode_init,
.close = vp6_decode_free,
@@ -640,7 +640,7 @@ AVCodec ff_vp6_decoder = {
AVCodec ff_vp6f_decoder = {
.name = "vp6f",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_VP6F,
+ .id = AV_CODEC_ID_VP6F,
.priv_data_size = sizeof(VP56Context),
.init = vp6_decode_init,
.close = vp6_decode_free,
@@ -653,7 +653,7 @@ AVCodec ff_vp6f_decoder = {
AVCodec ff_vp6a_decoder = {
.name = "vp6a",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_VP6A,
+ .id = AV_CODEC_ID_VP6A,
.priv_data_size = sizeof(VP56Context),
.init = vp6_decode_init,
.close = vp6_decode_free,
diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c
index c86bad8966..c0587a5c18 100644
--- a/libavcodec/vp8.c
+++ b/libavcodec/vp8.c
@@ -2020,7 +2020,7 @@ static av_cold int vp8_decode_init(AVCodecContext *avctx)
avctx->pix_fmt = PIX_FMT_YUV420P;
ff_dsputil_init(&s->dsp, avctx);
- ff_h264_pred_init(&s->hpc, CODEC_ID_VP8, 8, 1);
+ ff_h264_pred_init(&s->hpc, AV_CODEC_ID_VP8, 8, 1);
ff_vp8dsp_init(&s->vp8dsp);
return 0;
@@ -2074,7 +2074,7 @@ static int vp8_decode_update_thread_context(AVCodecContext *dst, const AVCodecCo
AVCodec ff_vp8_decoder = {
.name = "vp8",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_VP8,
+ .id = AV_CODEC_ID_VP8,
.priv_data_size = sizeof(VP8Context),
.init = vp8_decode_init,
.close = vp8_decode_free,
diff --git a/libavcodec/vp8_parser.c b/libavcodec/vp8_parser.c
index 6e154ded25..096961fec1 100644
--- a/libavcodec/vp8_parser.c
+++ b/libavcodec/vp8_parser.c
@@ -33,6 +33,6 @@ static int parse(AVCodecParserContext *s,
}
AVCodecParser ff_vp8_parser = {
- .codec_ids = { CODEC_ID_VP8 },
+ .codec_ids = { AV_CODEC_ID_VP8 },
.parser_parse = parse,
};
diff --git a/libavcodec/vqavideo.c b/libavcodec/vqavideo.c
index 4bc367f72b..e4bad00ca1 100644
--- a/libavcodec/vqavideo.c
+++ b/libavcodec/vqavideo.c
@@ -630,7 +630,7 @@ static av_cold int vqa_decode_end(AVCodecContext *avctx)
AVCodec ff_vqa_decoder = {
.name = "vqavideo",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_WS_VQA,
+ .id = AV_CODEC_ID_WS_VQA,
.priv_data_size = sizeof(VqaContext),
.init = vqa_decode_init,
.close = vqa_decode_end,
diff --git a/libavcodec/wavpack.c b/libavcodec/wavpack.c
index 08c75edcb6..ef4fc4f10d 100644
--- a/libavcodec/wavpack.c
+++ b/libavcodec/wavpack.c
@@ -1249,7 +1249,7 @@ static int wavpack_decode_frame(AVCodecContext *avctx, void *data,
AVCodec ff_wavpack_decoder = {
.name = "wavpack",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_WAVPACK,
+ .id = AV_CODEC_ID_WAVPACK,
.priv_data_size = sizeof(WavpackContext),
.init = wavpack_decode_init,
.close = wavpack_decode_end,
diff --git a/libavcodec/wma.c b/libavcodec/wma.c
index 7c8aa3070f..d5e66e25b3 100644
--- a/libavcodec/wma.c
+++ b/libavcodec/wma.c
@@ -90,7 +90,7 @@ int ff_wma_init(AVCodecContext *avctx, int flags2)
ff_dsputil_init(&s->dsp, avctx);
ff_fmt_convert_init(&s->fmt_conv, avctx);
- if (avctx->codec->id == CODEC_ID_WMAV1) {
+ if (avctx->codec->id == AV_CODEC_ID_WMAV1) {
s->version = 1;
} else {
s->version = 2;
diff --git a/libavcodec/wmadec.c b/libavcodec/wmadec.c
index fbf8dfe04d..39e50a4ffd 100644
--- a/libavcodec/wmadec.c
+++ b/libavcodec/wmadec.c
@@ -90,9 +90,9 @@ static int wma_decode_init(AVCodecContext * avctx)
/* extract flag infos */
flags2 = 0;
extradata = avctx->extradata;
- if (avctx->codec->id == CODEC_ID_WMAV1 && avctx->extradata_size >= 4) {
+ if (avctx->codec->id == AV_CODEC_ID_WMAV1 && avctx->extradata_size >= 4) {
flags2 = AV_RL16(extradata+2);
- } else if (avctx->codec->id == CODEC_ID_WMAV2 && avctx->extradata_size >= 6) {
+ } else if (avctx->codec->id == AV_CODEC_ID_WMAV2 && avctx->extradata_size >= 6) {
flags2 = AV_RL16(extradata+4);
}
// for(i=0; i<avctx->extradata_size; i++)
@@ -102,7 +102,7 @@ static int wma_decode_init(AVCodecContext * avctx)
s->use_bit_reservoir = flags2 & 0x0002;
s->use_variable_block_len = flags2 & 0x0004;
- if(avctx->codec->id == CODEC_ID_WMAV2 && avctx->extradata_size >= 8){
+ if(avctx->codec->id == AV_CODEC_ID_WMAV2 && avctx->extradata_size >= 8){
if(AV_RL16(extradata+4)==0xd && s->use_variable_block_len){
av_log(avctx, AV_LOG_WARNING, "Disabling use_variable_block_len, if this fails contact the ffmpeg developers and send us the file\n");
s->use_variable_block_len= 0; // this fixes issue1503
@@ -953,7 +953,7 @@ static av_cold void flush(AVCodecContext *avctx)
AVCodec ff_wmav1_decoder = {
.name = "wmav1",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_WMAV1,
+ .id = AV_CODEC_ID_WMAV1,
.priv_data_size = sizeof(WMACodecContext),
.init = wma_decode_init,
.close = ff_wma_end,
@@ -967,7 +967,7 @@ AVCodec ff_wmav1_decoder = {
AVCodec ff_wmav2_decoder = {
.name = "wmav2",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_WMAV2,
+ .id = AV_CODEC_ID_WMAV2,
.priv_data_size = sizeof(WMACodecContext),
.init = wma_decode_init,
.close = ff_wma_end,
diff --git a/libavcodec/wmaenc.c b/libavcodec/wmaenc.c
index 18dd283d37..c803ba2a7d 100644
--- a/libavcodec/wmaenc.c
+++ b/libavcodec/wmaenc.c
@@ -53,12 +53,12 @@ static int encode_init(AVCodecContext * avctx){
/* extract flag infos */
flags1 = 0;
flags2 = 1;
- if (avctx->codec->id == CODEC_ID_WMAV1) {
+ if (avctx->codec->id == AV_CODEC_ID_WMAV1) {
extradata= av_malloc(4);
avctx->extradata_size= 4;
AV_WL16(extradata, flags1);
AV_WL16(extradata+2, flags2);
- } else if (avctx->codec->id == CODEC_ID_WMAV2) {
+ } else if (avctx->codec->id == AV_CODEC_ID_WMAV2) {
extradata= av_mallocz(10);
avctx->extradata_size= 10;
AV_WL32(extradata, flags1);
@@ -400,7 +400,7 @@ static int encode_superframe(AVCodecContext *avctx, AVPacket *avpkt,
AVCodec ff_wmav1_encoder = {
.name = "wmav1",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_WMAV1,
+ .id = AV_CODEC_ID_WMAV1,
.priv_data_size = sizeof(WMACodecContext),
.init = encode_init,
.encode2 = encode_superframe,
@@ -414,7 +414,7 @@ AVCodec ff_wmav1_encoder = {
AVCodec ff_wmav2_encoder = {
.name = "wmav2",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_WMAV2,
+ .id = AV_CODEC_ID_WMAV2,
.priv_data_size = sizeof(WMACodecContext),
.init = encode_init,
.encode2 = encode_superframe,
diff --git a/libavcodec/wmalosslessdec.c b/libavcodec/wmalosslessdec.c
index dabd093bf4..493147b5f5 100644
--- a/libavcodec/wmalosslessdec.c
+++ b/libavcodec/wmalosslessdec.c
@@ -1289,7 +1289,7 @@ static void flush(AVCodecContext *avctx)
AVCodec ff_wmalossless_decoder = {
.name = "wmalossless",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_WMALOSSLESS,
+ .id = AV_CODEC_ID_WMALOSSLESS,
.priv_data_size = sizeof(WmallDecodeCtx),
.init = decode_init,
.decode = decode_packet,
diff --git a/libavcodec/wmaprodec.c b/libavcodec/wmaprodec.c
index 788c8fa3e7..b70e1f5380 100644
--- a/libavcodec/wmaprodec.c
+++ b/libavcodec/wmaprodec.c
@@ -1635,7 +1635,7 @@ static void flush(AVCodecContext *avctx)
AVCodec ff_wmapro_decoder = {
.name = "wmapro",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_WMAPRO,
+ .id = AV_CODEC_ID_WMAPRO,
.priv_data_size = sizeof(WMAProDecodeCtx),
.init = decode_init,
.close = decode_end,
diff --git a/libavcodec/wmavoice.c b/libavcodec/wmavoice.c
index 6acfe1e8ce..c61b223793 100644
--- a/libavcodec/wmavoice.c
+++ b/libavcodec/wmavoice.c
@@ -2046,7 +2046,7 @@ static av_cold void wmavoice_flush(AVCodecContext *ctx)
AVCodec ff_wmavoice_decoder = {
.name = "wmavoice",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_WMAVOICE,
+ .id = AV_CODEC_ID_WMAVOICE,
.priv_data_size = sizeof(WMAVoiceContext),
.init = wmavoice_decode_init,
.close = wmavoice_decode_end,
diff --git a/libavcodec/wmv2dec.c b/libavcodec/wmv2dec.c
index 6b34734b8a..6217bbad7a 100644
--- a/libavcodec/wmv2dec.c
+++ b/libavcodec/wmv2dec.c
@@ -473,7 +473,7 @@ static av_cold int wmv2_decode_end(AVCodecContext *avctx)
AVCodec ff_wmv2_decoder = {
.name = "wmv2",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_WMV2,
+ .id = AV_CODEC_ID_WMV2,
.priv_data_size = sizeof(Wmv2Context),
.init = wmv2_decode_init,
.close = wmv2_decode_end,
diff --git a/libavcodec/wmv2enc.c b/libavcodec/wmv2enc.c
index d83723d746..e696d69c3b 100644
--- a/libavcodec/wmv2enc.c
+++ b/libavcodec/wmv2enc.c
@@ -214,7 +214,7 @@ void ff_wmv2_encode_mb(MpegEncContext * s,
AVCodec ff_wmv2_encoder = {
.name = "wmv2",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_WMV2,
+ .id = AV_CODEC_ID_WMV2,
.priv_data_size = sizeof(Wmv2Context),
.init = wmv2_encode_init,
.encode2 = ff_MPV_encode_picture,
diff --git a/libavcodec/wnv1.c b/libavcodec/wnv1.c
index 62e9b992a4..e7a8240433 100644
--- a/libavcodec/wnv1.c
+++ b/libavcodec/wnv1.c
@@ -165,7 +165,7 @@ static av_cold int decode_end(AVCodecContext *avctx){
AVCodec ff_wnv1_decoder = {
.name = "wnv1",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_WNV1,
+ .id = AV_CODEC_ID_WNV1,
.priv_data_size = sizeof(WNV1Context),
.init = decode_init,
.close = decode_end,
diff --git a/libavcodec/ws-snd1.c b/libavcodec/ws-snd1.c
index 82186fd17c..e148a6ee92 100644
--- a/libavcodec/ws-snd1.c
+++ b/libavcodec/ws-snd1.c
@@ -185,7 +185,7 @@ static int ws_snd_decode_frame(AVCodecContext *avctx, void *data,
AVCodec ff_ws_snd1_decoder = {
.name = "ws_snd1",
.type = AVMEDIA_TYPE_AUDIO,
- .id = CODEC_ID_WESTWOOD_SND1,
+ .id = AV_CODEC_ID_WESTWOOD_SND1,
.priv_data_size = sizeof(WSSndContext),
.init = ws_snd_decode_init,
.decode = ws_snd_decode_frame,
diff --git a/libavcodec/x86/dsputil_mmx.c b/libavcodec/x86/dsputil_mmx.c
index f4ed7565e7..6317f5dd7b 100644
--- a/libavcodec/x86/dsputil_mmx.c
+++ b/libavcodec/x86/dsputil_mmx.c
@@ -2786,8 +2786,8 @@ static void dsputil_init_mmx2(DSPContext *c, AVCodecContext *avctx,
}
}
- if (CONFIG_VP3_DECODER && (avctx->codec_id == CODEC_ID_VP3 ||
- avctx->codec_id == CODEC_ID_THEORA)) {
+ if (CONFIG_VP3_DECODER && (avctx->codec_id == AV_CODEC_ID_VP3 ||
+ avctx->codec_id == AV_CODEC_ID_THEORA)) {
c->put_no_rnd_pixels_tab[1][1] = put_no_rnd_pixels8_x2_exact_mmx2;
c->put_no_rnd_pixels_tab[1][2] = put_no_rnd_pixels8_y2_exact_mmx2;
}
@@ -2894,8 +2894,8 @@ static void dsputil_init_3dnow(DSPContext *c, AVCodecContext *avctx,
}
}
- if (CONFIG_VP3_DECODER && (avctx->codec_id == CODEC_ID_VP3 ||
- avctx->codec_id == CODEC_ID_THEORA)) {
+ if (CONFIG_VP3_DECODER && (avctx->codec_id == AV_CODEC_ID_VP3 ||
+ avctx->codec_id == AV_CODEC_ID_THEORA)) {
c->put_no_rnd_pixels_tab[1][1] = put_no_rnd_pixels8_x2_exact_3dnow;
c->put_no_rnd_pixels_tab[1][2] = put_no_rnd_pixels8_y2_exact_3dnow;
}
diff --git a/libavcodec/x86/h264_intrapred_init.c b/libavcodec/x86/h264_intrapred_init.c
index 59ab3ea27e..3d4701df2e 100644
--- a/libavcodec/x86/h264_intrapred_init.c
+++ b/libavcodec/x86/h264_intrapred_init.c
@@ -180,17 +180,17 @@ void ff_h264_pred_init_x86(H264PredContext *h, int codec_id, const int bit_depth
h->pred8x8 [VERT_PRED8x8 ] = ff_pred8x8_vertical_mmx;
h->pred8x8 [HOR_PRED8x8 ] = ff_pred8x8_horizontal_mmx;
}
- if (codec_id == CODEC_ID_VP8) {
+ if (codec_id == AV_CODEC_ID_VP8) {
h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_tm_vp8_mmx;
h->pred8x8 [PLANE_PRED8x8 ] = ff_pred8x8_tm_vp8_mmx;
h->pred4x4 [TM_VP8_PRED ] = ff_pred4x4_tm_vp8_mmx;
} else {
if (chroma_format_idc == 1)
h->pred8x8 [PLANE_PRED8x8] = ff_pred8x8_plane_mmx;
- if (codec_id == CODEC_ID_SVQ3) {
+ if (codec_id == AV_CODEC_ID_SVQ3) {
if (mm_flags & AV_CPU_FLAG_CMOV)
h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_svq3_mmx;
- } else if (codec_id == CODEC_ID_RV40) {
+ } else if (codec_id == AV_CODEC_ID_RV40) {
h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_rv40_mmx;
} else {
h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_h264_mmx;
@@ -216,22 +216,22 @@ void ff_h264_pred_init_x86(H264PredContext *h, int codec_id, const int bit_depth
h->pred4x4 [VERT_RIGHT_PRED ] = ff_pred4x4_vertical_right_mmxext;
h->pred4x4 [HOR_DOWN_PRED ] = ff_pred4x4_horizontal_down_mmxext;
h->pred4x4 [DC_PRED ] = ff_pred4x4_dc_mmxext;
- if (codec_id == CODEC_ID_VP8 || codec_id == CODEC_ID_H264) {
+ if (codec_id == AV_CODEC_ID_VP8 || codec_id == AV_CODEC_ID_H264) {
h->pred4x4 [DIAG_DOWN_LEFT_PRED] = ff_pred4x4_down_left_mmxext;
}
- if (codec_id == CODEC_ID_SVQ3 || codec_id == CODEC_ID_H264) {
+ if (codec_id == AV_CODEC_ID_SVQ3 || codec_id == AV_CODEC_ID_H264) {
h->pred4x4 [VERT_LEFT_PRED ] = ff_pred4x4_vertical_left_mmxext;
}
- if (codec_id != CODEC_ID_RV40) {
+ if (codec_id != AV_CODEC_ID_RV40) {
h->pred4x4 [HOR_UP_PRED ] = ff_pred4x4_horizontal_up_mmxext;
}
- if (codec_id == CODEC_ID_SVQ3 || codec_id == CODEC_ID_H264) {
+ if (codec_id == AV_CODEC_ID_SVQ3 || codec_id == AV_CODEC_ID_H264) {
if (chroma_format_idc == 1) {
h->pred8x8[TOP_DC_PRED8x8 ] = ff_pred8x8_top_dc_mmxext;
h->pred8x8[DC_PRED8x8 ] = ff_pred8x8_dc_mmxext;
}
}
- if (codec_id == CODEC_ID_VP8) {
+ if (codec_id == AV_CODEC_ID_VP8) {
h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_tm_vp8_mmx2;
h->pred8x8 [DC_PRED8x8 ] = ff_pred8x8_dc_rv40_mmxext;
h->pred8x8 [PLANE_PRED8x8 ] = ff_pred8x8_tm_vp8_mmx2;
@@ -240,9 +240,9 @@ void ff_h264_pred_init_x86(H264PredContext *h, int codec_id, const int bit_depth
} else {
if (chroma_format_idc == 1)
h->pred8x8 [PLANE_PRED8x8] = ff_pred8x8_plane_mmx2;
- if (codec_id == CODEC_ID_SVQ3) {
+ if (codec_id == AV_CODEC_ID_SVQ3) {
h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_plane_svq3_mmx2;
- } else if (codec_id == CODEC_ID_RV40) {
+ } else if (codec_id == AV_CODEC_ID_RV40) {
h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_plane_rv40_mmx2;
} else {
h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_plane_h264_mmx2;
@@ -261,15 +261,15 @@ void ff_h264_pred_init_x86(H264PredContext *h, int codec_id, const int bit_depth
h->pred8x8l [VERT_RIGHT_PRED ] = ff_pred8x8l_vertical_right_sse2;
h->pred8x8l [VERT_LEFT_PRED ] = ff_pred8x8l_vertical_left_sse2;
h->pred8x8l [HOR_DOWN_PRED ] = ff_pred8x8l_horizontal_down_sse2;
- if (codec_id == CODEC_ID_VP8) {
+ if (codec_id == AV_CODEC_ID_VP8) {
h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_tm_vp8_sse2;
h->pred8x8 [PLANE_PRED8x8 ] = ff_pred8x8_tm_vp8_sse2;
} else {
if (chroma_format_idc == 1)
h->pred8x8 [PLANE_PRED8x8] = ff_pred8x8_plane_sse2;
- if (codec_id == CODEC_ID_SVQ3) {
+ if (codec_id == AV_CODEC_ID_SVQ3) {
h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_svq3_sse2;
- } else if (codec_id == CODEC_ID_RV40) {
+ } else if (codec_id == AV_CODEC_ID_RV40) {
h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_rv40_sse2;
} else {
h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_h264_sse2;
@@ -292,15 +292,15 @@ void ff_h264_pred_init_x86(H264PredContext *h, int codec_id, const int bit_depth
h->pred8x8l [VERT_LEFT_PRED ] = ff_pred8x8l_vertical_left_ssse3;
h->pred8x8l [HOR_UP_PRED ] = ff_pred8x8l_horizontal_up_ssse3;
h->pred8x8l [HOR_DOWN_PRED ] = ff_pred8x8l_horizontal_down_ssse3;
- if (codec_id == CODEC_ID_VP8) {
+ if (codec_id == AV_CODEC_ID_VP8) {
h->pred8x8 [PLANE_PRED8x8 ] = ff_pred8x8_tm_vp8_ssse3;
h->pred4x4 [TM_VP8_PRED ] = ff_pred4x4_tm_vp8_ssse3;
} else {
if (chroma_format_idc == 1)
h->pred8x8 [PLANE_PRED8x8] = ff_pred8x8_plane_ssse3;
- if (codec_id == CODEC_ID_SVQ3) {
+ if (codec_id == AV_CODEC_ID_SVQ3) {
h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_svq3_ssse3;
- } else if (codec_id == CODEC_ID_RV40) {
+ } else if (codec_id == AV_CODEC_ID_RV40) {
h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_rv40_ssse3;
} else {
h->pred16x16[PLANE_PRED8x8] = ff_pred16x16_plane_h264_ssse3;
diff --git a/libavcodec/x86/motion_est_mmx.c b/libavcodec/x86/motion_est_mmx.c
index 1d3545a5e8..e48a7fd398 100644
--- a/libavcodec/x86/motion_est_mmx.c
+++ b/libavcodec/x86/motion_est_mmx.c
@@ -460,7 +460,7 @@ void ff_dsputil_init_pix_mmx(DSPContext* c, AVCodecContext *avctx)
c->pix_abs[1][3] = sad8_xy2_mmx2;
}
}
- if ((mm_flags & AV_CPU_FLAG_SSE2) && !(mm_flags & AV_CPU_FLAG_3DNOW) && avctx->codec_id != CODEC_ID_SNOW) {
+ if ((mm_flags & AV_CPU_FLAG_SSE2) && !(mm_flags & AV_CPU_FLAG_3DNOW) && avctx->codec_id != AV_CODEC_ID_SNOW) {
c->sad[0]= sad16_sse2;
}
#endif /* HAVE_INLINE_ASM */
diff --git a/libavcodec/x86/vp56dsp_init.c b/libavcodec/x86/vp56dsp_init.c
index 9108aa446d..83e29e15ee 100644
--- a/libavcodec/x86/vp56dsp_init.c
+++ b/libavcodec/x86/vp56dsp_init.c
@@ -30,12 +30,12 @@ void ff_vp6_filter_diag4_mmx(uint8_t *dst, uint8_t *src, int stride,
void ff_vp6_filter_diag4_sse2(uint8_t *dst, uint8_t *src, int stride,
const int16_t *h_weights,const int16_t *v_weights);
-av_cold void ff_vp56dsp_init_x86(VP56DSPContext* c, enum CodecID codec)
+av_cold void ff_vp56dsp_init_x86(VP56DSPContext* c, enum AVCodecID codec)
{
#if HAVE_YASM
int mm_flags = av_get_cpu_flags();
- if (CONFIG_VP6_DECODER && codec == CODEC_ID_VP6) {
+ if (CONFIG_VP6_DECODER && codec == AV_CODEC_ID_VP6) {
#if ARCH_X86_32
if (mm_flags & AV_CPU_FLAG_MMX) {
c->vp6_filter_diag4 = ff_vp6_filter_diag4_mmx;
diff --git a/libavcodec/xan.c b/libavcodec/xan.c
index b39290aedf..703ee9ea5d 100644
--- a/libavcodec/xan.c
+++ b/libavcodec/xan.c
@@ -507,7 +507,7 @@ static int xan_decode_frame(AVCodecContext *avctx,
int ret, buf_size = avpkt->size;
XanContext *s = avctx->priv_data;
- if (avctx->codec->id == CODEC_ID_XAN_WC3) {
+ if (avctx->codec->id == AV_CODEC_ID_XAN_WC3) {
const uint8_t *buf_end = buf + buf_size;
int tag = 0;
while (buf_end - buf > 8 && tag != VGA__TAG) {
@@ -623,7 +623,7 @@ static av_cold int xan_decode_end(AVCodecContext *avctx)
AVCodec ff_xan_wc3_decoder = {
.name = "xan_wc3",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_XAN_WC3,
+ .id = AV_CODEC_ID_XAN_WC3,
.priv_data_size = sizeof(XanContext),
.init = xan_decode_init,
.close = xan_decode_end,
diff --git a/libavcodec/xbmdec.c b/libavcodec/xbmdec.c
index b3e4cf2f89..626e8de040 100644
--- a/libavcodec/xbmdec.c
+++ b/libavcodec/xbmdec.c
@@ -128,7 +128,7 @@ static av_cold int xbm_decode_close(AVCodecContext *avctx)
AVCodec ff_xbm_decoder = {
.name = "xbm",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_XBM,
+ .id = AV_CODEC_ID_XBM,
.init = xbm_decode_init,
.close = xbm_decode_close,
.decode = xbm_decode_frame,
diff --git a/libavcodec/xbmenc.c b/libavcodec/xbmenc.c
index 00fe57d0a1..bcdfb2d986 100644
--- a/libavcodec/xbmenc.c
+++ b/libavcodec/xbmenc.c
@@ -74,7 +74,7 @@ static av_cold int xbm_encode_close(AVCodecContext *avctx)
AVCodec ff_xbm_encoder = {
.name = "xbm",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_XBM,
+ .id = AV_CODEC_ID_XBM,
.init = xbm_encode_init,
.encode2 = xbm_encode_frame,
.close = xbm_encode_close,
diff --git a/libavcodec/xl.c b/libavcodec/xl.c
index 0c85e22fc0..11db4982bb 100644
--- a/libavcodec/xl.c
+++ b/libavcodec/xl.c
@@ -153,7 +153,7 @@ static av_cold int decode_end(AVCodecContext *avctx){
AVCodec ff_xl_decoder = {
.name = "xl",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_VIXL,
+ .id = AV_CODEC_ID_VIXL,
.priv_data_size = sizeof(VideoXLContext),
.init = decode_init,
.close = decode_end,
diff --git a/libavcodec/xsubdec.c b/libavcodec/xsubdec.c
index 7169486cd0..903cf1290b 100644
--- a/libavcodec/xsubdec.c
+++ b/libavcodec/xsubdec.c
@@ -138,7 +138,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
AVCodec ff_xsub_decoder = {
.name = "xsub",
.type = AVMEDIA_TYPE_SUBTITLE,
- .id = CODEC_ID_XSUB,
+ .id = AV_CODEC_ID_XSUB,
.init = decode_init,
.decode = decode_frame,
.long_name = NULL_IF_CONFIG_SMALL("XSUB"),
diff --git a/libavcodec/xsubenc.c b/libavcodec/xsubenc.c
index 4245f45bac..210a9bfa75 100644
--- a/libavcodec/xsubenc.c
+++ b/libavcodec/xsubenc.c
@@ -213,7 +213,7 @@ static av_cold int xsub_encoder_init(AVCodecContext *avctx)
AVCodec ff_xsub_encoder = {
.name = "xsub",
.type = AVMEDIA_TYPE_SUBTITLE,
- .id = CODEC_ID_XSUB,
+ .id = AV_CODEC_ID_XSUB,
.init = xsub_encoder_init,
.encode = xsub_encode,
.long_name = NULL_IF_CONFIG_SMALL("DivX subtitles (XSUB)"),
diff --git a/libavcodec/xwddec.c b/libavcodec/xwddec.c
index 2c11cd7d4e..ea7da84e78 100644
--- a/libavcodec/xwddec.c
+++ b/libavcodec/xwddec.c
@@ -263,7 +263,7 @@ static av_cold int xwd_decode_close(AVCodecContext *avctx)
AVCodec ff_xwd_decoder = {
.name = "xwd",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_XWD,
+ .id = AV_CODEC_ID_XWD,
.init = xwd_decode_init,
.close = xwd_decode_close,
.decode = xwd_decode_frame,
diff --git a/libavcodec/xwdenc.c b/libavcodec/xwdenc.c
index afe6ff4050..e6ddfbb9dd 100644
--- a/libavcodec/xwdenc.c
+++ b/libavcodec/xwdenc.c
@@ -225,7 +225,7 @@ static av_cold int xwd_encode_close(AVCodecContext *avctx)
AVCodec ff_xwd_encoder = {
.name = "xwd",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_XWD,
+ .id = AV_CODEC_ID_XWD,
.init = xwd_encode_init,
.encode2 = xwd_encode_frame,
.close = xwd_encode_close,
diff --git a/libavcodec/xxan.c b/libavcodec/xxan.c
index 92a6cc95be..08372eeb43 100644
--- a/libavcodec/xxan.c
+++ b/libavcodec/xxan.c
@@ -421,7 +421,7 @@ static av_cold int xan_decode_end(AVCodecContext *avctx)
AVCodec ff_xan_wc4_decoder = {
.name = "xan_wc4",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_XAN_WC4,
+ .id = AV_CODEC_ID_XAN_WC4,
.priv_data_size = sizeof(XanContext),
.init = xan_decode_init,
.close = xan_decode_end,
diff --git a/libavcodec/y41pdec.c b/libavcodec/y41pdec.c
index e66546b0fa..97bcc990e8 100644
--- a/libavcodec/y41pdec.c
+++ b/libavcodec/y41pdec.c
@@ -107,7 +107,7 @@ static av_cold int y41p_decode_close(AVCodecContext *avctx)
AVCodec ff_y41p_decoder = {
.name = "y41p",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_Y41P,
+ .id = AV_CODEC_ID_Y41P,
.init = y41p_decode_init,
.decode = y41p_decode_frame,
.close = y41p_decode_close,
diff --git a/libavcodec/y41penc.c b/libavcodec/y41penc.c
index aafae8ee8d..b8ebfbcb95 100644
--- a/libavcodec/y41penc.c
+++ b/libavcodec/y41penc.c
@@ -93,7 +93,7 @@ static av_cold int y41p_encode_close(AVCodecContext *avctx)
AVCodec ff_y41p_encoder = {
.name = "y41p",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_Y41P,
+ .id = AV_CODEC_ID_Y41P,
.init = y41p_encode_init,
.encode2 = y41p_encode_frame,
.close = y41p_encode_close,
diff --git a/libavcodec/yop.c b/libavcodec/yop.c
index 42059e1c5a..070ba76c62 100644
--- a/libavcodec/yop.c
+++ b/libavcodec/yop.c
@@ -268,7 +268,7 @@ static int yop_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
AVCodec ff_yop_decoder = {
.name = "yop",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_YOP,
+ .id = AV_CODEC_ID_YOP,
.priv_data_size = sizeof(YopDecContext),
.init = yop_decode_init,
.close = yop_decode_close,
diff --git a/libavcodec/yuv4dec.c b/libavcodec/yuv4dec.c
index 996caaf718..07696692eb 100644
--- a/libavcodec/yuv4dec.c
+++ b/libavcodec/yuv4dec.c
@@ -100,7 +100,7 @@ static av_cold int yuv4_decode_close(AVCodecContext *avctx)
AVCodec ff_yuv4_decoder = {
.name = "yuv4",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_YUV4,
+ .id = AV_CODEC_ID_YUV4,
.init = yuv4_decode_init,
.decode = yuv4_decode_frame,
.close = yuv4_decode_close,
diff --git a/libavcodec/yuv4enc.c b/libavcodec/yuv4enc.c
index 102e410ff7..8185d06185 100644
--- a/libavcodec/yuv4enc.c
+++ b/libavcodec/yuv4enc.c
@@ -83,7 +83,7 @@ static av_cold int yuv4_encode_close(AVCodecContext *avctx)
AVCodec ff_yuv4_encoder = {
.name = "yuv4",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_YUV4,
+ .id = AV_CODEC_ID_YUV4,
.init = yuv4_encode_init,
.encode2 = yuv4_encode_frame,
.close = yuv4_encode_close,
diff --git a/libavcodec/zerocodec.c b/libavcodec/zerocodec.c
index cfbd16f147..c8c2453a56 100644
--- a/libavcodec/zerocodec.c
+++ b/libavcodec/zerocodec.c
@@ -157,7 +157,7 @@ static av_cold int zerocodec_decode_init(AVCodecContext *avctx)
AVCodec ff_zerocodec_decoder = {
.type = AVMEDIA_TYPE_VIDEO,
.name = "zerocodec",
- .id = CODEC_ID_ZEROCODEC,
+ .id = AV_CODEC_ID_ZEROCODEC,
.priv_data_size = sizeof(ZeroCodecContext),
.init = zerocodec_decode_init,
.decode = zerocodec_decode_frame,
diff --git a/libavcodec/zmbv.c b/libavcodec/zmbv.c
index 74212f2372..6ccee39855 100644
--- a/libavcodec/zmbv.c
+++ b/libavcodec/zmbv.c
@@ -673,7 +673,7 @@ static av_cold int decode_end(AVCodecContext *avctx)
AVCodec ff_zmbv_decoder = {
.name = "zmbv",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_ZMBV,
+ .id = AV_CODEC_ID_ZMBV,
.priv_data_size = sizeof(ZmbvContext),
.init = decode_init,
.close = decode_end,
diff --git a/libavcodec/zmbvenc.c b/libavcodec/zmbvenc.c
index 172fb11b65..117d25fb8f 100644
--- a/libavcodec/zmbvenc.c
+++ b/libavcodec/zmbvenc.c
@@ -337,7 +337,7 @@ static av_cold int encode_end(AVCodecContext *avctx)
AVCodec ff_zmbv_encoder = {
.name = "zmbv",
.type = AVMEDIA_TYPE_VIDEO,
- .id = CODEC_ID_ZMBV,
+ .id = AV_CODEC_ID_ZMBV,
.priv_data_size = sizeof(ZmbvEncContext),
.init = encode_init,
.encode2 = encode_frame,
diff --git a/libavdevice/alsa-audio-common.c b/libavdevice/alsa-audio-common.c
index cb7ba6654f..9da868ff6c 100644
--- a/libavdevice/alsa-audio-common.c
+++ b/libavdevice/alsa-audio-common.c
@@ -38,26 +38,26 @@
static av_cold snd_pcm_format_t codec_id_to_pcm_format(int codec_id)
{
switch(codec_id) {
- case CODEC_ID_PCM_F64LE: return SND_PCM_FORMAT_FLOAT64_LE;
- case CODEC_ID_PCM_F64BE: return SND_PCM_FORMAT_FLOAT64_BE;
- case CODEC_ID_PCM_F32LE: return SND_PCM_FORMAT_FLOAT_LE;
- case CODEC_ID_PCM_F32BE: return SND_PCM_FORMAT_FLOAT_BE;
- case CODEC_ID_PCM_S32LE: return SND_PCM_FORMAT_S32_LE;
- case CODEC_ID_PCM_S32BE: return SND_PCM_FORMAT_S32_BE;
- case CODEC_ID_PCM_U32LE: return SND_PCM_FORMAT_U32_LE;
- case CODEC_ID_PCM_U32BE: return SND_PCM_FORMAT_U32_BE;
- case CODEC_ID_PCM_S24LE: return SND_PCM_FORMAT_S24_3LE;
- case CODEC_ID_PCM_S24BE: return SND_PCM_FORMAT_S24_3BE;
- case CODEC_ID_PCM_U24LE: return SND_PCM_FORMAT_U24_3LE;
- case CODEC_ID_PCM_U24BE: return SND_PCM_FORMAT_U24_3BE;
- case CODEC_ID_PCM_S16LE: return SND_PCM_FORMAT_S16_LE;
- case CODEC_ID_PCM_S16BE: return SND_PCM_FORMAT_S16_BE;
- case CODEC_ID_PCM_U16LE: return SND_PCM_FORMAT_U16_LE;
- case CODEC_ID_PCM_U16BE: return SND_PCM_FORMAT_U16_BE;
- case CODEC_ID_PCM_S8: return SND_PCM_FORMAT_S8;
- case CODEC_ID_PCM_U8: return SND_PCM_FORMAT_U8;
- case CODEC_ID_PCM_MULAW: return SND_PCM_FORMAT_MU_LAW;
- case CODEC_ID_PCM_ALAW: return SND_PCM_FORMAT_A_LAW;
+ case AV_CODEC_ID_PCM_F64LE: return SND_PCM_FORMAT_FLOAT64_LE;
+ case AV_CODEC_ID_PCM_F64BE: return SND_PCM_FORMAT_FLOAT64_BE;
+ case AV_CODEC_ID_PCM_F32LE: return SND_PCM_FORMAT_FLOAT_LE;
+ case AV_CODEC_ID_PCM_F32BE: return SND_PCM_FORMAT_FLOAT_BE;
+ case AV_CODEC_ID_PCM_S32LE: return SND_PCM_FORMAT_S32_LE;
+ case AV_CODEC_ID_PCM_S32BE: return SND_PCM_FORMAT_S32_BE;
+ case AV_CODEC_ID_PCM_U32LE: return SND_PCM_FORMAT_U32_LE;
+ case AV_CODEC_ID_PCM_U32BE: return SND_PCM_FORMAT_U32_BE;
+ case AV_CODEC_ID_PCM_S24LE: return SND_PCM_FORMAT_S24_3LE;
+ case AV_CODEC_ID_PCM_S24BE: return SND_PCM_FORMAT_S24_3BE;
+ case AV_CODEC_ID_PCM_U24LE: return SND_PCM_FORMAT_U24_3LE;
+ case AV_CODEC_ID_PCM_U24BE: return SND_PCM_FORMAT_U24_3BE;
+ case AV_CODEC_ID_PCM_S16LE: return SND_PCM_FORMAT_S16_LE;
+ case AV_CODEC_ID_PCM_S16BE: return SND_PCM_FORMAT_S16_BE;
+ case AV_CODEC_ID_PCM_U16LE: return SND_PCM_FORMAT_U16_LE;
+ case AV_CODEC_ID_PCM_U16BE: return SND_PCM_FORMAT_U16_BE;
+ case AV_CODEC_ID_PCM_S8: return SND_PCM_FORMAT_S8;
+ case AV_CODEC_ID_PCM_U8: return SND_PCM_FORMAT_U8;
+ case AV_CODEC_ID_PCM_MULAW: return SND_PCM_FORMAT_MU_LAW;
+ case AV_CODEC_ID_PCM_ALAW: return SND_PCM_FORMAT_A_LAW;
default: return SND_PCM_FORMAT_UNKNOWN;
}
}
@@ -156,20 +156,20 @@ static av_cold int find_reorder_func(AlsaData *s, int codec_id, uint64_t layout,
return 0;
switch (codec_id) {
- case CODEC_ID_PCM_S8:
- case CODEC_ID_PCM_U8:
- case CODEC_ID_PCM_ALAW:
- case CODEC_ID_PCM_MULAW: format = FORMAT_I8; break;
- case CODEC_ID_PCM_S16LE:
- case CODEC_ID_PCM_S16BE:
- case CODEC_ID_PCM_U16LE:
- case CODEC_ID_PCM_U16BE: format = FORMAT_I16; break;
- case CODEC_ID_PCM_S32LE:
- case CODEC_ID_PCM_S32BE:
- case CODEC_ID_PCM_U32LE:
- case CODEC_ID_PCM_U32BE: format = FORMAT_I32; break;
- case CODEC_ID_PCM_F32LE:
- case CODEC_ID_PCM_F32BE: format = FORMAT_F32; break;
+ case AV_CODEC_ID_PCM_S8:
+ case AV_CODEC_ID_PCM_U8:
+ case AV_CODEC_ID_PCM_ALAW:
+ case AV_CODEC_ID_PCM_MULAW: format = FORMAT_I8; break;
+ case AV_CODEC_ID_PCM_S16LE:
+ case AV_CODEC_ID_PCM_S16BE:
+ case AV_CODEC_ID_PCM_U16LE:
+ case AV_CODEC_ID_PCM_U16BE: format = FORMAT_I16; break;
+ case AV_CODEC_ID_PCM_S32LE:
+ case AV_CODEC_ID_PCM_S32BE:
+ case AV_CODEC_ID_PCM_U32LE:
+ case AV_CODEC_ID_PCM_U32BE: format = FORMAT_I32; break;
+ case AV_CODEC_ID_PCM_F32LE:
+ case AV_CODEC_ID_PCM_F32BE: format = FORMAT_F32; break;
default: return AVERROR(ENOSYS);
}
@@ -185,7 +185,7 @@ static av_cold int find_reorder_func(AlsaData *s, int codec_id, uint64_t layout,
av_cold int ff_alsa_open(AVFormatContext *ctx, snd_pcm_stream_t mode,
unsigned int *sample_rate,
- int channels, enum CodecID *codec_id)
+ int channels, enum AVCodecID *codec_id)
{
AlsaData *s = ctx->priv_data;
const char *audio_device;
@@ -199,7 +199,7 @@ av_cold int ff_alsa_open(AVFormatContext *ctx, snd_pcm_stream_t mode,
if (ctx->filename[0] == 0) audio_device = "default";
else audio_device = ctx->filename;
- if (*codec_id == CODEC_ID_NONE)
+ if (*codec_id == AV_CODEC_ID_NONE)
*codec_id = DEFAULT_CODEC_ID;
format = codec_id_to_pcm_format(*codec_id);
if (format == SND_PCM_FORMAT_UNKNOWN) {
diff --git a/libavdevice/alsa-audio-dec.c b/libavdevice/alsa-audio-dec.c
index e0e0954430..0f182485ff 100644
--- a/libavdevice/alsa-audio-dec.c
+++ b/libavdevice/alsa-audio-dec.c
@@ -58,7 +58,7 @@ static av_cold int audio_read_header(AVFormatContext *s1)
AlsaData *s = s1->priv_data;
AVStream *st;
int ret;
- enum CodecID codec_id;
+ enum AVCodecID codec_id;
st = avformat_new_stream(s1, NULL);
if (!st) {
diff --git a/libavdevice/alsa-audio-enc.c b/libavdevice/alsa-audio-enc.c
index fd013160d6..403a44fcb0 100644
--- a/libavdevice/alsa-audio-enc.c
+++ b/libavdevice/alsa-audio-enc.c
@@ -48,7 +48,7 @@ static av_cold int audio_write_header(AVFormatContext *s1)
AlsaData *s = s1->priv_data;
AVStream *st;
unsigned int sample_rate;
- enum CodecID codec_id;
+ enum AVCodecID codec_id;
int res;
st = s1->streams[0];
@@ -119,7 +119,7 @@ AVOutputFormat ff_alsa_muxer = {
.long_name = NULL_IF_CONFIG_SMALL("ALSA audio output"),
.priv_data_size = sizeof(AlsaData),
.audio_codec = DEFAULT_CODEC_ID,
- .video_codec = CODEC_ID_NONE,
+ .video_codec = AV_CODEC_ID_NONE,
.write_header = audio_write_header,
.write_packet = audio_write_packet,
.write_trailer = ff_alsa_close,
diff --git a/libavdevice/alsa-audio.h b/libavdevice/alsa-audio.h
index 6719384d84..00acf9f3ee 100644
--- a/libavdevice/alsa-audio.h
+++ b/libavdevice/alsa-audio.h
@@ -39,7 +39,7 @@
/* XXX: we make the assumption that the soundcard accepts this format */
/* XXX: find better solution with "preinit" method, needed also in
other formats */
-#define DEFAULT_CODEC_ID AV_NE(CODEC_ID_PCM_S16BE, CODEC_ID_PCM_S16LE)
+#define DEFAULT_CODEC_ID AV_NE(AV_CODEC_ID_PCM_S16BE, AV_CODEC_ID_PCM_S16LE)
typedef void (*ff_reorder_func)(const void *, void *, int);
@@ -67,15 +67,15 @@ typedef struct {
* @param sample_rate in: requested sample rate;
* out: actually selected sample rate
* @param channels number of channels
- * @param codec_id in: requested CodecID or CODEC_ID_NONE;
- * out: actually selected CodecID, changed only if
- * CODEC_ID_NONE was requested
+ * @param codec_id in: requested AVCodecID or AV_CODEC_ID_NONE;
+ * out: actually selected AVCodecID, changed only if
+ * AV_CODEC_ID_NONE was requested
*
* @return 0 if OK, AVERROR_xxx on error
*/
int ff_alsa_open(AVFormatContext *s, snd_pcm_stream_t mode,
unsigned int *sample_rate,
- int channels, enum CodecID *codec_id);
+ int channels, enum AVCodecID *codec_id);
/**
* Close the ALSA PCM.
diff --git a/libavdevice/bktr.c b/libavdevice/bktr.c
index 4bb80a890a..58a6a7a205 100644
--- a/libavdevice/bktr.c
+++ b/libavdevice/bktr.c
@@ -274,7 +274,7 @@ static int grab_read_header(AVFormatContext *s1)
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
st->codec->pix_fmt = PIX_FMT_YUV420P;
- st->codec->codec_id = CODEC_ID_RAWVIDEO;
+ st->codec->codec_id = AV_CODEC_ID_RAWVIDEO;
st->codec->width = s->width;
st->codec->height = s->height;
st->codec->time_base.den = framerate.num;
diff --git a/libavdevice/caca.c b/libavdevice/caca.c
index 173a28bad9..bd5dde5f22 100644
--- a/libavdevice/caca.c
+++ b/libavdevice/caca.c
@@ -121,7 +121,7 @@ static int caca_write_header(AVFormatContext *s)
if ( s->nb_streams > 1
|| encctx->codec_type != AVMEDIA_TYPE_VIDEO
- || encctx->codec_id != CODEC_ID_RAWVIDEO) {
+ || encctx->codec_id != AV_CODEC_ID_RAWVIDEO) {
av_log(s, AV_LOG_ERROR, "Only supports one rawvideo stream\n");
return AVERROR(EINVAL);
}
@@ -230,8 +230,8 @@ AVOutputFormat ff_caca_muxer = {
.name = "caca",
.long_name = NULL_IF_CONFIG_SMALL("caca (color ASCII art) output device"),
.priv_data_size = sizeof(CACAContext),
- .audio_codec = CODEC_ID_NONE,
- .video_codec = CODEC_ID_RAWVIDEO,
+ .audio_codec = AV_CODEC_ID_NONE,
+ .video_codec = AV_CODEC_ID_RAWVIDEO,
.write_header = caca_write_header,
.write_packet = caca_write_packet,
.write_trailer = caca_write_trailer,
diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c
index 2a7cdd1aa6..be8b592e26 100644
--- a/libavdevice/dshow.c
+++ b/libavdevice/dshow.c
@@ -96,12 +96,12 @@ static enum CodecID dshow_codecid(DWORD biCompression)
{
switch(biCompression) {
case MKTAG('d', 'v', 's', 'd'):
- return CODEC_ID_DVVIDEO;
+ return AV_CODEC_ID_DVVIDEO;
case MKTAG('M', 'J', 'P', 'G'):
case MKTAG('m', 'j', 'p', 'g'):
- return CODEC_ID_MJPEG;
+ return AV_CODEC_ID_MJPEG;
}
- return CODEC_ID_NONE;
+ return AV_CODEC_ID_NONE;
}
static int
@@ -642,10 +642,10 @@ error:
static enum CodecID waveform_codec_id(enum AVSampleFormat sample_fmt)
{
switch (sample_fmt) {
- case AV_SAMPLE_FMT_U8: return CODEC_ID_PCM_U8;
- case AV_SAMPLE_FMT_S16: return CODEC_ID_PCM_S16LE;
- case AV_SAMPLE_FMT_S32: return CODEC_ID_PCM_S32LE;
- default: return CODEC_ID_NONE; /* Should never happen. */
+ case AV_SAMPLE_FMT_U8: return AV_CODEC_ID_PCM_U8;
+ case AV_SAMPLE_FMT_S16: return AV_CODEC_ID_PCM_S16LE;
+ case AV_SAMPLE_FMT_S32: return AV_CODEC_ID_PCM_S32LE;
+ default: return AV_CODEC_ID_NONE; /* Should never happen. */
}
}
@@ -706,7 +706,7 @@ dshow_add_device(AVFormatContext *avctx,
codec->pix_fmt = dshow_pixfmt(bih->biCompression, bih->biBitCount);
if (codec->pix_fmt == PIX_FMT_NONE) {
codec->codec_id = dshow_codecid(bih->biCompression);
- if (codec->codec_id == CODEC_ID_NONE) {
+ if (codec->codec_id == AV_CODEC_ID_NONE) {
av_log(avctx, AV_LOG_ERROR, "Unknown compression type. "
"Please report verbose (-v 9) debug information.\n");
dshow_read_close(avctx);
@@ -714,7 +714,7 @@ dshow_add_device(AVFormatContext *avctx,
}
codec->bits_per_coded_sample = bih->biBitCount;
} else {
- codec->codec_id = CODEC_ID_RAWVIDEO;
+ codec->codec_id = AV_CODEC_ID_RAWVIDEO;
if (bih->biCompression == BI_RGB || bih->biCompression == BI_BITFIELDS) {
codec->bits_per_coded_sample = bih->biBitCount;
codec->extradata = av_malloc(9 + FF_INPUT_BUFFER_PADDING_SIZE);
diff --git a/libavdevice/fbdev.c b/libavdevice/fbdev.c
index 6d6bff5d0a..d97749576d 100644
--- a/libavdevice/fbdev.c
+++ b/libavdevice/fbdev.c
@@ -160,7 +160,7 @@ static av_cold int fbdev_read_header(AVFormatContext *avctx)
}
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- st->codec->codec_id = CODEC_ID_RAWVIDEO;
+ st->codec->codec_id = AV_CODEC_ID_RAWVIDEO;
st->codec->width = fbdev->width;
st->codec->height = fbdev->height;
st->codec->pix_fmt = pix_fmt;
diff --git a/libavdevice/jack_audio.c b/libavdevice/jack_audio.c
index c9ef23e68a..59cabe3685 100644
--- a/libavdevice/jack_audio.c
+++ b/libavdevice/jack_audio.c
@@ -243,9 +243,9 @@ static int audio_read_header(AVFormatContext *context)
stream->codec->codec_type = AVMEDIA_TYPE_AUDIO;
#if HAVE_BIGENDIAN
- stream->codec->codec_id = CODEC_ID_PCM_F32BE;
+ stream->codec->codec_id = AV_CODEC_ID_PCM_F32BE;
#else
- stream->codec->codec_id = CODEC_ID_PCM_F32LE;
+ stream->codec->codec_id = AV_CODEC_ID_PCM_F32LE;
#endif
stream->codec->sample_rate = self->sample_rate;
stream->codec->channels = self->nports;
diff --git a/libavdevice/lavfi.c b/libavdevice/lavfi.c
index 65632e302d..20fa3e69b2 100644
--- a/libavdevice/lavfi.c
+++ b/libavdevice/lavfi.c
@@ -239,7 +239,7 @@ av_cold static int lavfi_read_header(AVFormatContext *avctx)
st->codec->codec_type = link->type;
avpriv_set_pts_info(st, 64, link->time_base.num, link->time_base.den);
if (link->type == AVMEDIA_TYPE_VIDEO) {
- st->codec->codec_id = CODEC_ID_RAWVIDEO;
+ st->codec->codec_id = AV_CODEC_ID_RAWVIDEO;
st->codec->pix_fmt = link->format;
st->codec->time_base = link->time_base;
st->codec->width = link->w;
@@ -253,7 +253,7 @@ av_cold static int lavfi_read_header(AVFormatContext *avctx)
st->codec->sample_rate = link->sample_rate;
st->codec->time_base = link->time_base;
st->codec->channel_layout = link->channel_layout;
- if (st->codec->codec_id == CODEC_ID_NONE)
+ if (st->codec->codec_id == AV_CODEC_ID_NONE)
av_log(avctx, AV_LOG_ERROR,
"Could not find PCM codec for sample format %s.\n",
av_get_sample_fmt_name(link->format));
diff --git a/libavdevice/libcdio.c b/libavdevice/libcdio.c
index c590995561..bcef7fbe21 100644
--- a/libavdevice/libcdio.c
+++ b/libavdevice/libcdio.c
@@ -83,9 +83,9 @@ static av_cold int read_header(AVFormatContext *ctx)
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
if (s->drive->bigendianp)
- st->codec->codec_id = CODEC_ID_PCM_S16BE;
+ st->codec->codec_id = AV_CODEC_ID_PCM_S16BE;
else
- st->codec->codec_id = CODEC_ID_PCM_S16LE;
+ st->codec->codec_id = AV_CODEC_ID_PCM_S16LE;
st->codec->sample_rate = 44100;
st->codec->channels = 2;
if (s->drive->audio_last_sector != CDIO_INVALID_LSN &&
diff --git a/libavdevice/libdc1394.c b/libavdevice/libdc1394.c
index f4c37cc214..e86a2ed800 100644
--- a/libavdevice/libdc1394.c
+++ b/libavdevice/libdc1394.c
@@ -168,7 +168,7 @@ static inline int dc1394_read_common(AVFormatContext *c,
}
avpriv_set_pts_info(vst, 64, 1, 1000);
vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- vst->codec->codec_id = CODEC_ID_RAWVIDEO;
+ vst->codec->codec_id = AV_CODEC_ID_RAWVIDEO;
vst->codec->time_base.den = framerate.num;
vst->codec->time_base.num = framerate.den;
vst->codec->width = fmt->width;
diff --git a/libavdevice/openal-dec.c b/libavdevice/openal-dec.c
index 2227d6350b..f927b260f7 100644
--- a/libavdevice/openal-dec.c
+++ b/libavdevice/openal-dec.c
@@ -62,10 +62,10 @@ typedef struct {
static inline al_format_info* get_al_format_info(ALCenum al_fmt)
{
static al_format_info info_table[] = {
- [AL_FORMAT_MONO8-LOWEST_AL_FORMAT] = {AL_FORMAT_MONO8, CODEC_ID_PCM_U8, 1},
- [AL_FORMAT_MONO16-LOWEST_AL_FORMAT] = {AL_FORMAT_MONO16, AV_NE (CODEC_ID_PCM_S16BE, CODEC_ID_PCM_S16LE), 1},
- [AL_FORMAT_STEREO8-LOWEST_AL_FORMAT] = {AL_FORMAT_STEREO8, CODEC_ID_PCM_U8, 2},
- [AL_FORMAT_STEREO16-LOWEST_AL_FORMAT] = {AL_FORMAT_STEREO16, AV_NE (CODEC_ID_PCM_S16BE, CODEC_ID_PCM_S16LE), 2},
+ [AL_FORMAT_MONO8-LOWEST_AL_FORMAT] = {AL_FORMAT_MONO8, AV_CODEC_ID_PCM_U8, 1},
+ [AL_FORMAT_MONO16-LOWEST_AL_FORMAT] = {AL_FORMAT_MONO16, AV_NE (AV_CODEC_ID_PCM_S16BE, AV_CODEC_ID_PCM_S16LE), 1},
+ [AL_FORMAT_STEREO8-LOWEST_AL_FORMAT] = {AL_FORMAT_STEREO8, AV_CODEC_ID_PCM_U8, 2},
+ [AL_FORMAT_STEREO16-LOWEST_AL_FORMAT] = {AL_FORMAT_STEREO16, AV_NE (AV_CODEC_ID_PCM_S16BE, AV_CODEC_ID_PCM_S16LE), 2},
};
return &info_table[al_fmt-LOWEST_AL_FORMAT];
diff --git a/libavdevice/oss_audio.c b/libavdevice/oss_audio.c
index f8843a37f9..7942bde264 100644
--- a/libavdevice/oss_audio.c
+++ b/libavdevice/oss_audio.c
@@ -49,7 +49,7 @@ typedef struct {
int sample_rate;
int channels;
int frame_size; /* in bytes ! */
- enum CodecID codec_id;
+ enum AVCodecID codec_id;
unsigned int flip_left : 1;
uint8_t buffer[AUDIO_BLOCK_SIZE];
int buffer_ptr;
@@ -104,10 +104,10 @@ static int audio_open(AVFormatContext *s1, int is_output, const char *audio_devi
switch(tmp) {
case AFMT_S16_LE:
- s->codec_id = CODEC_ID_PCM_S16LE;
+ s->codec_id = AV_CODEC_ID_PCM_S16LE;
break;
case AFMT_S16_BE:
- s->codec_id = CODEC_ID_PCM_S16BE;
+ s->codec_id = AV_CODEC_ID_PCM_S16BE;
break;
default:
av_log(s1, AV_LOG_ERROR, "Soundcard does not support 16 bit sample format\n");
@@ -314,8 +314,8 @@ AVOutputFormat ff_oss_muxer = {
/* XXX: we make the assumption that the soundcard accepts this format */
/* XXX: find better solution with "preinit" method, needed also in
other formats */
- .audio_codec = AV_NE(CODEC_ID_PCM_S16BE, CODEC_ID_PCM_S16LE),
- .video_codec = CODEC_ID_NONE,
+ .audio_codec = AV_NE(AV_CODEC_ID_PCM_S16BE, AV_CODEC_ID_PCM_S16LE),
+ .video_codec = AV_CODEC_ID_NONE,
.write_header = audio_write_header,
.write_packet = audio_write_packet,
.write_trailer = audio_write_trailer,
diff --git a/libavdevice/pulse.c b/libavdevice/pulse.c
index 044ec3178d..8179712b25 100644
--- a/libavdevice/pulse.c
+++ b/libavdevice/pulse.c
@@ -33,7 +33,7 @@
#include "libavformat/internal.h"
#include "libavutil/opt.h"
-#define DEFAULT_CODEC_ID AV_NE(CODEC_ID_PCM_S16BE, CODEC_ID_PCM_S16LE)
+#define DEFAULT_CODEC_ID AV_NE(AV_CODEC_ID_PCM_S16BE, AV_CODEC_ID_PCM_S16LE)
typedef struct PulseData {
AVClass *class;
@@ -51,17 +51,17 @@ typedef struct PulseData {
static pa_sample_format_t codec_id_to_pulse_format(int codec_id) {
switch (codec_id) {
- case CODEC_ID_PCM_U8: return PA_SAMPLE_U8;
- case CODEC_ID_PCM_ALAW: return PA_SAMPLE_ALAW;
- case CODEC_ID_PCM_MULAW: return PA_SAMPLE_ULAW;
- case CODEC_ID_PCM_S16LE: return PA_SAMPLE_S16LE;
- case CODEC_ID_PCM_S16BE: return PA_SAMPLE_S16BE;
- case CODEC_ID_PCM_F32LE: return PA_SAMPLE_FLOAT32LE;
- case CODEC_ID_PCM_F32BE: return PA_SAMPLE_FLOAT32BE;
- case CODEC_ID_PCM_S32LE: return PA_SAMPLE_S32LE;
- case CODEC_ID_PCM_S32BE: return PA_SAMPLE_S32BE;
- case CODEC_ID_PCM_S24LE: return PA_SAMPLE_S24LE;
- case CODEC_ID_PCM_S24BE: return PA_SAMPLE_S24BE;
+ case AV_CODEC_ID_PCM_U8: return PA_SAMPLE_U8;
+ case AV_CODEC_ID_PCM_ALAW: return PA_SAMPLE_ALAW;
+ case AV_CODEC_ID_PCM_MULAW: return PA_SAMPLE_ULAW;
+ case AV_CODEC_ID_PCM_S16LE: return PA_SAMPLE_S16LE;
+ case AV_CODEC_ID_PCM_S16BE: return PA_SAMPLE_S16BE;
+ case AV_CODEC_ID_PCM_F32LE: return PA_SAMPLE_FLOAT32LE;
+ case AV_CODEC_ID_PCM_F32BE: return PA_SAMPLE_FLOAT32BE;
+ case AV_CODEC_ID_PCM_S32LE: return PA_SAMPLE_S32LE;
+ case AV_CODEC_ID_PCM_S32BE: return PA_SAMPLE_S32BE;
+ case AV_CODEC_ID_PCM_S24LE: return PA_SAMPLE_S24LE;
+ case AV_CODEC_ID_PCM_S24BE: return PA_SAMPLE_S24BE;
default: return PA_SAMPLE_INVALID;
}
}
@@ -72,8 +72,8 @@ static av_cold int pulse_read_header(AVFormatContext *s)
AVStream *st;
char *device = NULL;
int ret;
- enum CodecID codec_id =
- s->audio_codec_id == CODEC_ID_NONE ? DEFAULT_CODEC_ID : s->audio_codec_id;
+ enum AVCodecID codec_id =
+ s->audio_codec_id == AV_CODEC_ID_NONE ? DEFAULT_CODEC_ID : s->audio_codec_id;
const pa_sample_spec ss = { codec_id_to_pulse_format(codec_id),
pd->sample_rate,
pd->channels };
diff --git a/libavdevice/sdl.c b/libavdevice/sdl.c
index 0ad610cda1..7783f66013 100644
--- a/libavdevice/sdl.c
+++ b/libavdevice/sdl.c
@@ -98,7 +98,7 @@ static int sdl_write_header(AVFormatContext *s)
if ( s->nb_streams > 1
|| encctx->codec_type != AVMEDIA_TYPE_VIDEO
- || encctx->codec_id != CODEC_ID_RAWVIDEO) {
+ || encctx->codec_id != AV_CODEC_ID_RAWVIDEO) {
av_log(s, AV_LOG_ERROR, "Only supports one rawvideo stream\n");
ret = AVERROR(EINVAL);
goto fail;
@@ -223,8 +223,8 @@ AVOutputFormat ff_sdl_muxer = {
.name = "sdl",
.long_name = NULL_IF_CONFIG_SMALL("SDL output device"),
.priv_data_size = sizeof(SDLContext),
- .audio_codec = CODEC_ID_NONE,
- .video_codec = CODEC_ID_RAWVIDEO,
+ .audio_codec = AV_CODEC_ID_NONE,
+ .video_codec = AV_CODEC_ID_RAWVIDEO,
.write_header = sdl_write_header,
.write_packet = sdl_write_packet,
.write_trailer = sdl_write_trailer,
diff --git a/libavdevice/sndio_common.c b/libavdevice/sndio_common.c
index 048e72e8a2..19f39be780 100644
--- a/libavdevice/sndio_common.c
+++ b/libavdevice/sndio_common.c
@@ -84,7 +84,7 @@ av_cold int ff_sndio_open(AVFormatContext *s1, int is_output,
}
}
- s->codec_id = par.le ? CODEC_ID_PCM_S16LE : CODEC_ID_PCM_S16BE;
+ s->codec_id = par.le ? AV_CODEC_ID_PCM_S16LE : AV_CODEC_ID_PCM_S16BE;
s->channels = is_output ? par.pchan : par.rchan;
s->sample_rate = par.rate;
s->bps = par.bps;
diff --git a/libavdevice/sndio_common.h b/libavdevice/sndio_common.h
index 12218b4b24..5111dc7a92 100644
--- a/libavdevice/sndio_common.h
+++ b/libavdevice/sndio_common.h
@@ -31,7 +31,7 @@
typedef struct {
AVClass *class;
struct sio_hdl *hdl;
- enum CodecID codec_id;
+ enum AVCodecID codec_id;
int64_t hwpos;
int64_t softpos;
uint8_t *buffer;
diff --git a/libavdevice/sndio_enc.c b/libavdevice/sndio_enc.c
index 9ad5cad08a..84d070e89c 100644
--- a/libavdevice/sndio_enc.c
+++ b/libavdevice/sndio_enc.c
@@ -83,8 +83,8 @@ AVOutputFormat ff_sndio_muxer = {
/* XXX: we make the assumption that the soundcard accepts this format */
/* XXX: find better solution with "preinit" method, needed also in
other formats */
- .audio_codec = AV_NE(CODEC_ID_PCM_S16BE, CODEC_ID_PCM_S16LE),
- .video_codec = CODEC_ID_NONE,
+ .audio_codec = AV_NE(AV_CODEC_ID_PCM_S16BE, AV_CODEC_ID_PCM_S16LE),
+ .video_codec = AV_CODEC_ID_NONE,
.write_header = audio_write_header,
.write_packet = audio_write_packet,
.write_trailer = audio_write_trailer,
diff --git a/libavdevice/v4l.c b/libavdevice/v4l.c
index 2d260726bf..63047f9220 100644
--- a/libavdevice/v4l.c
+++ b/libavdevice/v4l.c
@@ -241,7 +241,7 @@ static int grab_read_header(AVFormatContext *s1, AVFormatParameters *ap)
s->fd = video_fd;
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- st->codec->codec_id = CODEC_ID_RAWVIDEO;
+ st->codec->codec_id = AV_CODEC_ID_RAWVIDEO;
st->codec->width = s->video_win.width;
st->codec->height = s->video_win.height;
st->codec->time_base = s->time_base;
diff --git a/libavdevice/v4l2.c b/libavdevice/v4l2.c
index 2808e13ac3..867c363533 100644
--- a/libavdevice/v4l2.c
+++ b/libavdevice/v4l2.c
@@ -125,31 +125,31 @@ struct buff_data {
struct fmt_map {
enum PixelFormat ff_fmt;
- enum CodecID codec_id;
+ enum AVCodecID codec_id;
uint32_t v4l2_fmt;
};
static struct fmt_map fmt_conversion_table[] = {
//ff_fmt codec_id v4l2_fmt
- { PIX_FMT_YUV420P, CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YUV420 },
- { PIX_FMT_YUV420P, CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YVU420 },
- { PIX_FMT_YUV422P, CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YUV422P },
- { PIX_FMT_YUYV422, CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YUYV },
- { PIX_FMT_UYVY422, CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_UYVY },
- { PIX_FMT_YUV411P, CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YUV411P },
- { PIX_FMT_YUV410P, CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YUV410 },
- { PIX_FMT_RGB555LE,CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_RGB555 },
- { PIX_FMT_RGB555BE,CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_RGB555X },
- { PIX_FMT_RGB565LE,CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_RGB565 },
- { PIX_FMT_RGB565BE,CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_RGB565X },
- { PIX_FMT_BGR24, CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_BGR24 },
- { PIX_FMT_RGB24, CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_RGB24 },
- { PIX_FMT_BGR0, CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_BGR32 },
- { PIX_FMT_0RGB, CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_RGB32 },
- { PIX_FMT_GRAY8, CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_GREY },
- { PIX_FMT_NV12, CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_NV12 },
- { PIX_FMT_NONE, CODEC_ID_MJPEG, V4L2_PIX_FMT_MJPEG },
- { PIX_FMT_NONE, CODEC_ID_MJPEG, V4L2_PIX_FMT_JPEG },
+ { PIX_FMT_YUV420P, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YUV420 },
+ { PIX_FMT_YUV420P, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YVU420 },
+ { PIX_FMT_YUV422P, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YUV422P },
+ { PIX_FMT_YUYV422, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YUYV },
+ { PIX_FMT_UYVY422, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_UYVY },
+ { PIX_FMT_YUV411P, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YUV411P },
+ { PIX_FMT_YUV410P, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YUV410 },
+ { PIX_FMT_RGB555LE,AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_RGB555 },
+ { PIX_FMT_RGB555BE,AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_RGB555X },
+ { PIX_FMT_RGB565LE,AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_RGB565 },
+ { PIX_FMT_RGB565BE,AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_RGB565X },
+ { PIX_FMT_BGR24, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_BGR24 },
+ { PIX_FMT_RGB24, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_RGB24 },
+ { PIX_FMT_BGR0, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_BGR32 },
+ { PIX_FMT_0RGB, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_RGB32 },
+ { PIX_FMT_GRAY8, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_GREY },
+ { PIX_FMT_NV12, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_NV12 },
+ { PIX_FMT_NONE, AV_CODEC_ID_MJPEG, V4L2_PIX_FMT_MJPEG },
+ { PIX_FMT_NONE, AV_CODEC_ID_MJPEG, V4L2_PIX_FMT_JPEG },
};
static int device_open(AVFormatContext *ctx)
@@ -264,12 +264,12 @@ static int first_field(int fd)
return 1;
}
-static uint32_t fmt_ff2v4l(enum PixelFormat pix_fmt, enum CodecID codec_id)
+static uint32_t fmt_ff2v4l(enum PixelFormat pix_fmt, enum AVCodecID codec_id)
{
int i;
for (i = 0; i < FF_ARRAY_ELEMS(fmt_conversion_table); i++) {
- if ((codec_id == CODEC_ID_NONE ||
+ if ((codec_id == AV_CODEC_ID_NONE ||
fmt_conversion_table[i].codec_id == codec_id) &&
(pix_fmt == PIX_FMT_NONE ||
fmt_conversion_table[i].ff_fmt == pix_fmt)) {
@@ -280,7 +280,7 @@ static uint32_t fmt_ff2v4l(enum PixelFormat pix_fmt, enum CodecID codec_id)
return 0;
}
-static enum PixelFormat fmt_v4l2ff(uint32_t v4l2_fmt, enum CodecID codec_id)
+static enum PixelFormat fmt_v4l2ff(uint32_t v4l2_fmt, enum AVCodecID codec_id)
{
int i;
@@ -294,7 +294,7 @@ static enum PixelFormat fmt_v4l2ff(uint32_t v4l2_fmt, enum CodecID codec_id)
return PIX_FMT_NONE;
}
-static enum CodecID fmt_v4l2codec(uint32_t v4l2_fmt)
+static enum AVCodecID fmt_v4l2codec(uint32_t v4l2_fmt)
{
int i;
@@ -304,7 +304,7 @@ static enum CodecID fmt_v4l2codec(uint32_t v4l2_fmt)
}
}
- return CODEC_ID_NONE;
+ return AV_CODEC_ID_NONE;
}
#if HAVE_STRUCT_V4L2_FRMIVALENUM_DISCRETE
@@ -338,7 +338,7 @@ static void list_formats(AVFormatContext *ctx, int fd, int type)
struct v4l2_fmtdesc vfd = { .type = V4L2_BUF_TYPE_VIDEO_CAPTURE };
while(!ioctl(fd, VIDIOC_ENUM_FMT, &vfd)) {
- enum CodecID codec_id = fmt_v4l2codec(vfd.pixelformat);
+ enum AVCodecID codec_id = fmt_v4l2codec(vfd.pixelformat);
enum PixelFormat pix_fmt = fmt_v4l2ff(vfd.pixelformat, codec_id);
vfd.index++;
@@ -732,7 +732,7 @@ static uint32_t device_try_init(AVFormatContext *s1,
enum PixelFormat pix_fmt,
int *width,
int *height,
- enum CodecID *codec_id)
+ enum AVCodecID *codec_id)
{
uint32_t desired_format = fmt_ff2v4l(pix_fmt, s1->video_codec_id);
@@ -742,7 +742,7 @@ static uint32_t device_try_init(AVFormatContext *s1,
desired_format = 0;
for (i = 0; i<FF_ARRAY_ELEMS(fmt_conversion_table); i++) {
- if (s1->video_codec_id == CODEC_ID_NONE ||
+ if (s1->video_codec_id == AV_CODEC_ID_NONE ||
fmt_conversion_table[i].codec_id == s1->video_codec_id) {
desired_format = fmt_conversion_table[i].v4l2_fmt;
if (device_init(s1, width, height, desired_format) >= 0) {
@@ -755,7 +755,7 @@ static uint32_t device_try_init(AVFormatContext *s1,
if (desired_format != 0) {
*codec_id = fmt_v4l2codec(desired_format);
- av_assert0(*codec_id != CODEC_ID_NONE);
+ av_assert0(*codec_id != AV_CODEC_ID_NONE);
}
return desired_format;
@@ -767,7 +767,7 @@ static int v4l2_read_header(AVFormatContext *s1)
AVStream *st;
int res = 0;
uint32_t desired_format;
- enum CodecID codec_id;
+ enum AVCodecID codec_id;
enum PixelFormat pix_fmt = PIX_FMT_NONE;
st = avformat_new_stream(s1, NULL);
@@ -858,7 +858,7 @@ static int v4l2_read_header(AVFormatContext *s1)
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
st->codec->codec_id = codec_id;
- if (codec_id == CODEC_ID_RAWVIDEO)
+ if (codec_id == AV_CODEC_ID_RAWVIDEO)
st->codec->codec_tag =
avcodec_pix_fmt_to_codec_tag(st->codec->pix_fmt);
if (desired_format == V4L2_PIX_FMT_YVU420)
diff --git a/libavdevice/vfwcap.c b/libavdevice/vfwcap.c
index 2809c56702..3b348ffade 100644
--- a/libavdevice/vfwcap.c
+++ b/libavdevice/vfwcap.c
@@ -73,16 +73,16 @@ static enum PixelFormat vfw_pixfmt(DWORD biCompression, WORD biBitCount)
return PIX_FMT_NONE;
}
-static enum CodecID vfw_codecid(DWORD biCompression)
+static enum AVCodecID vfw_codecid(DWORD biCompression)
{
switch(biCompression) {
case MKTAG('d', 'v', 's', 'd'):
- return CODEC_ID_DVVIDEO;
+ return AV_CODEC_ID_DVVIDEO;
case MKTAG('M', 'J', 'P', 'G'):
case MKTAG('m', 'j', 'p', 'g'):
- return CODEC_ID_MJPEG;
+ return AV_CODEC_ID_MJPEG;
}
- return CODEC_ID_NONE;
+ return AV_CODEC_ID_NONE;
}
#define dstruct(pctx, sname, var, type) \
@@ -379,7 +379,7 @@ static int vfw_read_header(AVFormatContext *s)
codec->pix_fmt = vfw_pixfmt(biCompression, biBitCount);
if(codec->pix_fmt == PIX_FMT_NONE) {
codec->codec_id = vfw_codecid(biCompression);
- if(codec->codec_id == CODEC_ID_NONE) {
+ if(codec->codec_id == AV_CODEC_ID_NONE) {
av_log(s, AV_LOG_ERROR, "Unknown compression type. "
"Please report verbose (-v 9) debug information.\n");
vfw_read_close(s);
@@ -387,7 +387,7 @@ static int vfw_read_header(AVFormatContext *s)
}
codec->bits_per_coded_sample = biBitCount;
} else {
- codec->codec_id = CODEC_ID_RAWVIDEO;
+ codec->codec_id = AV_CODEC_ID_RAWVIDEO;
if(biCompression == BI_RGB) {
codec->bits_per_coded_sample = biBitCount;
codec->extradata = av_malloc(9 + FF_INPUT_BUFFER_PADDING_SIZE);
diff --git a/libavdevice/x11grab.c b/libavdevice/x11grab.c
index 566889cb16..633ac6a33e 100644
--- a/libavdevice/x11grab.c
+++ b/libavdevice/x11grab.c
@@ -310,7 +310,7 @@ x11grab_read_header(AVFormatContext *s1)
x11grab->use_shm = use_shm;
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- st->codec->codec_id = CODEC_ID_RAWVIDEO;
+ st->codec->codec_id = AV_CODEC_ID_RAWVIDEO;
st->codec->width = x11grab->width;
st->codec->height = x11grab->height;
st->codec->pix_fmt = input_pixfmt;
diff --git a/libavfilter/libmpcodecs/vf_mcdeint.c b/libavfilter/libmpcodecs/vf_mcdeint.c
index 326274bf2d..2679289f33 100644
--- a/libavfilter/libmpcodecs/vf_mcdeint.c
+++ b/libavfilter/libmpcodecs/vf_mcdeint.c
@@ -182,7 +182,7 @@ static int config(struct vf_instance *vf,
int width, int height, int d_width, int d_height,
unsigned int flags, unsigned int outfmt){
int i;
- AVCodec *enc= avcodec_find_encoder(CODEC_ID_SNOW);
+ AVCodec *enc= avcodec_find_encoder(AV_CODEC_ID_SNOW);
for(i=0; i<3; i++){
AVCodecContext *avctx_enc;
diff --git a/libavfilter/libmpcodecs/vf_uspp.c b/libavfilter/libmpcodecs/vf_uspp.c
index ca9b17aad1..cc9a3db8dd 100644
--- a/libavfilter/libmpcodecs/vf_uspp.c
+++ b/libavfilter/libmpcodecs/vf_uspp.c
@@ -209,7 +209,7 @@ static int config(struct vf_instance *vf,
int width, int height, int d_width, int d_height,
unsigned int flags, unsigned int outfmt){
int i;
- AVCodec *enc= avcodec_find_encoder(CODEC_ID_SNOW);
+ AVCodec *enc= avcodec_find_encoder(AV_CODEC_ID_SNOW);
for(i=0; i<3; i++){
int is_chroma= !!i;
diff --git a/libavformat/4xm.c b/libavformat/4xm.c
index 61fa886e70..0a003d4b8e 100644
--- a/libavformat/4xm.c
+++ b/libavformat/4xm.c
@@ -155,7 +155,7 @@ static int fourxm_read_header(AVFormatContext *s)
fourxm->video_stream_index = st->index;
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- st->codec->codec_id = CODEC_ID_4XM;
+ st->codec->codec_id = AV_CODEC_ID_4XM;
st->codec->extradata_size = 4;
st->codec->extradata = av_malloc(4);
AV_WL32(st->codec->extradata, AV_RL32(&header[i + 16]));
@@ -228,11 +228,11 @@ static int fourxm_read_header(AVFormatContext *s)
st->codec->bits_per_coded_sample;
st->codec->block_align = st->codec->channels * st->codec->bits_per_coded_sample;
if (fourxm->tracks[current_track].adpcm){
- st->codec->codec_id = CODEC_ID_ADPCM_4XM;
+ st->codec->codec_id = AV_CODEC_ID_ADPCM_4XM;
}else if (st->codec->bits_per_coded_sample == 8){
- st->codec->codec_id = CODEC_ID_PCM_U8;
+ st->codec->codec_id = AV_CODEC_ID_PCM_U8;
}else
- st->codec->codec_id = CODEC_ID_PCM_S16LE;
+ st->codec->codec_id = AV_CODEC_ID_PCM_S16LE;
}
}
diff --git a/libavformat/a64.c b/libavformat/a64.c
index 2cd24083a8..c1f6b67904 100644
--- a/libavformat/a64.c
+++ b/libavformat/a64.c
@@ -43,12 +43,12 @@ static int a64_write_header(struct AVFormatContext *s)
};
c->interleaved = 0;
switch (avctx->codec->id) {
- case CODEC_ID_A64_MULTI:
+ case AV_CODEC_ID_A64_MULTI:
header[2] = 0x00;
header[3] = AV_RB32(avctx->extradata+0);
header[4] = 2;
break;
- case CODEC_ID_A64_MULTI5:
+ case AV_CODEC_ID_A64_MULTI5:
header[2] = 0x01;
header[3] = AV_RB32(avctx->extradata+0);
header[4] = 3;
@@ -76,8 +76,8 @@ static int a64_write_packet(struct AVFormatContext *s, AVPacket *pkt)
/* fetch values from extradata */
switch (avctx->codec->id) {
- case CODEC_ID_A64_MULTI:
- case CODEC_ID_A64_MULTI5:
+ case AV_CODEC_ID_A64_MULTI:
+ case AV_CODEC_ID_A64_MULTI5:
if(c->interleaved) {
/* Write interleaved, means we insert chunks of the future charset before each current frame.
* Reason: if we load 1 charset + corresponding frames in one block on c64, we need to store
@@ -168,7 +168,7 @@ AVOutputFormat ff_a64_muxer = {
.long_name = NULL_IF_CONFIG_SMALL("a64 - video for Commodore 64"),
.extensions = "a64, A64",
.priv_data_size = sizeof (A64Context),
- .video_codec = CODEC_ID_A64_MULTI,
+ .video_codec = AV_CODEC_ID_A64_MULTI,
.write_header = a64_write_header,
.write_packet = a64_write_packet,
.write_trailer = a64_write_trailer,
diff --git a/libavformat/aacdec.c b/libavformat/aacdec.c
index 3289b0d3a6..e165959dab 100644
--- a/libavformat/aacdec.c
+++ b/libavformat/aacdec.c
@@ -90,5 +90,5 @@ AVInputFormat ff_aac_demuxer = {
.read_packet = ff_raw_read_partial_packet,
.flags = AVFMT_GENERIC_INDEX,
.extensions = "aac",
- .raw_codec_id = CODEC_ID_AAC,
+ .raw_codec_id = AV_CODEC_ID_AAC,
};
diff --git a/libavformat/ac3dec.c b/libavformat/ac3dec.c
index 3741ee44fc..74df0d2f44 100644
--- a/libavformat/ac3dec.c
+++ b/libavformat/ac3dec.c
@@ -24,13 +24,13 @@
#include "avformat.h"
#include "rawdec.h"
-static int ac3_eac3_probe(AVProbeData *p, enum CodecID expected_codec_id)
+static int ac3_eac3_probe(AVProbeData *p, enum AVCodecID expected_codec_id)
{
int max_frames, first_frames = 0, frames;
uint8_t *buf, *buf2, *end;
AC3HeaderInfo hdr;
GetBitContext gbc;
- enum CodecID codec_id = CODEC_ID_AC3;
+ enum AVCodecID codec_id = AV_CODEC_ID_AC3;
max_frames = 0;
buf = p->buf;
@@ -51,7 +51,7 @@ static int ac3_eac3_probe(AVProbeData *p, enum CodecID expected_codec_id)
av_crc(av_crc_get_table(AV_CRC_16_ANSI), 0, buf2 + 2, hdr.frame_size - 2))
break;
if (hdr.bitstream_id > 10)
- codec_id = CODEC_ID_EAC3;
+ codec_id = AV_CODEC_ID_EAC3;
buf2 += hdr.frame_size;
}
max_frames = FFMAX(max_frames, frames);
@@ -71,7 +71,7 @@ static int ac3_eac3_probe(AVProbeData *p, enum CodecID expected_codec_id)
#if CONFIG_AC3_DEMUXER
static int ac3_probe(AVProbeData *p)
{
- return ac3_eac3_probe(p, CODEC_ID_AC3);
+ return ac3_eac3_probe(p, AV_CODEC_ID_AC3);
}
AVInputFormat ff_ac3_demuxer = {
@@ -82,14 +82,14 @@ AVInputFormat ff_ac3_demuxer = {
.read_packet = ff_raw_read_partial_packet,
.flags= AVFMT_GENERIC_INDEX,
.extensions = "ac3",
- .raw_codec_id = CODEC_ID_AC3,
+ .raw_codec_id = AV_CODEC_ID_AC3,
};
#endif
#if CONFIG_EAC3_DEMUXER
static int eac3_probe(AVProbeData *p)
{
- return ac3_eac3_probe(p, CODEC_ID_EAC3);
+ return ac3_eac3_probe(p, AV_CODEC_ID_EAC3);
}
AVInputFormat ff_eac3_demuxer = {
@@ -100,6 +100,6 @@ AVInputFormat ff_eac3_demuxer = {
.read_packet = ff_raw_read_partial_packet,
.flags = AVFMT_GENERIC_INDEX,
.extensions = "eac3",
- .raw_codec_id = CODEC_ID_EAC3,
+ .raw_codec_id = AV_CODEC_ID_EAC3,
};
#endif
diff --git a/libavformat/act.c b/libavformat/act.c
index e47afc1d27..78f1d3bb9a 100644
--- a/libavformat/act.c
+++ b/libavformat/act.c
@@ -90,7 +90,7 @@ static int read_header(AVFormatContext *s)
st->codec->channels=1;
avpriv_set_pts_info(st, 64, 1, 100);
- st->codec->codec_id=CODEC_ID_G729;
+ st->codec->codec_id=AV_CODEC_ID_G729;
avio_seek(pb, 257, SEEK_SET);
msec=avio_rl16(pb);
diff --git a/libavformat/adtsenc.c b/libavformat/adtsenc.c
index 396cf8b856..14c72a8c63 100644
--- a/libavformat/adtsenc.c
+++ b/libavformat/adtsenc.c
@@ -169,8 +169,8 @@ AVOutputFormat ff_adts_muxer = {
.mime_type = "audio/aac",
.extensions = "aac,adts",
.priv_data_size = sizeof(ADTSContext),
- .audio_codec = CODEC_ID_AAC,
- .video_codec = CODEC_ID_NONE,
+ .audio_codec = AV_CODEC_ID_AAC,
+ .video_codec = AV_CODEC_ID_NONE,
.write_header = adts_write_header,
.write_packet = adts_write_packet,
};
diff --git a/libavformat/adxdec.c b/libavformat/adxdec.c
index 305c67431b..49e19307d5 100644
--- a/libavformat/adxdec.c
+++ b/libavformat/adxdec.c
@@ -108,6 +108,6 @@ AVInputFormat ff_adx_demuxer = {
.read_header = adx_read_header,
.read_packet = adx_read_packet,
.extensions = "adx",
- .raw_codec_id = CODEC_ID_ADPCM_ADX,
+ .raw_codec_id = AV_CODEC_ID_ADPCM_ADX,
.flags = AVFMT_GENERIC_INDEX,
};
diff --git a/libavformat/aea.c b/libavformat/aea.c
index c02942b598..6aa7ae321c 100644
--- a/libavformat/aea.c
+++ b/libavformat/aea.c
@@ -67,7 +67,7 @@ static int aea_read_header(AVFormatContext *s)
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- st->codec->codec_id = CODEC_ID_ATRAC1;
+ st->codec->codec_id = AV_CODEC_ID_ATRAC1;
st->codec->sample_rate = 44100;
st->codec->bit_rate = 292000;
diff --git a/libavformat/aiff.h b/libavformat/aiff.h
index d909bdd83e..6ece0e0ce3 100644
--- a/libavformat/aiff.h
+++ b/libavformat/aiff.h
@@ -31,24 +31,24 @@
#include "riff.h"
static const AVCodecTag ff_codec_aiff_tags[] = {
- { CODEC_ID_PCM_S16BE, MKTAG('N','O','N','E') },
- { CODEC_ID_PCM_S8, MKTAG('N','O','N','E') },
- { CODEC_ID_PCM_S24BE, MKTAG('N','O','N','E') },
- { CODEC_ID_PCM_S32BE, MKTAG('N','O','N','E') },
- { CODEC_ID_PCM_F32BE, MKTAG('f','l','3','2') },
- { CODEC_ID_PCM_F64BE, MKTAG('f','l','6','4') },
- { CODEC_ID_PCM_ALAW, MKTAG('a','l','a','w') },
- { CODEC_ID_PCM_MULAW, MKTAG('u','l','a','w') },
- { CODEC_ID_MACE3, MKTAG('M','A','C','3') },
- { CODEC_ID_MACE6, MKTAG('M','A','C','6') },
- { CODEC_ID_GSM, MKTAG('G','S','M',' ') },
- { CODEC_ID_ADPCM_G726, MKTAG('G','7','2','6') },
- { CODEC_ID_PCM_S16BE, MKTAG('t','w','o','s') },
- { CODEC_ID_PCM_S16LE, MKTAG('s','o','w','t') },
- { CODEC_ID_ADPCM_IMA_QT, MKTAG('i','m','a','4') },
- { CODEC_ID_QDM2, MKTAG('Q','D','M','2') },
- { CODEC_ID_QCELP, MKTAG('Q','c','l','p') },
- { CODEC_ID_NONE, 0 },
+ { AV_CODEC_ID_PCM_S16BE, MKTAG('N','O','N','E') },
+ { AV_CODEC_ID_PCM_S8, MKTAG('N','O','N','E') },
+ { AV_CODEC_ID_PCM_S24BE, MKTAG('N','O','N','E') },
+ { AV_CODEC_ID_PCM_S32BE, MKTAG('N','O','N','E') },
+ { AV_CODEC_ID_PCM_F32BE, MKTAG('f','l','3','2') },
+ { AV_CODEC_ID_PCM_F64BE, MKTAG('f','l','6','4') },
+ { AV_CODEC_ID_PCM_ALAW, MKTAG('a','l','a','w') },
+ { AV_CODEC_ID_PCM_MULAW, MKTAG('u','l','a','w') },
+ { AV_CODEC_ID_MACE3, MKTAG('M','A','C','3') },
+ { AV_CODEC_ID_MACE6, MKTAG('M','A','C','6') },
+ { AV_CODEC_ID_GSM, MKTAG('G','S','M',' ') },
+ { AV_CODEC_ID_ADPCM_G726, MKTAG('G','7','2','6') },
+ { AV_CODEC_ID_PCM_S16BE, MKTAG('t','w','o','s') },
+ { AV_CODEC_ID_PCM_S16LE, MKTAG('s','o','w','t') },
+ { AV_CODEC_ID_ADPCM_IMA_QT, MKTAG('i','m','a','4') },
+ { AV_CODEC_ID_QDM2, MKTAG('Q','D','M','2') },
+ { AV_CODEC_ID_QCELP, MKTAG('Q','c','l','p') },
+ { AV_CODEC_ID_NONE, 0 },
};
#endif /* AVFORMAT_AIFF_H */
diff --git a/libavformat/aiffdec.c b/libavformat/aiffdec.c
index f89ed93dd5..83fa9c3548 100644
--- a/libavformat/aiffdec.c
+++ b/libavformat/aiffdec.c
@@ -36,19 +36,19 @@ typedef struct {
int block_duration;
} AIFFInputContext;
-static enum CodecID aiff_codec_get_id(int bps)
+static enum AVCodecID aiff_codec_get_id(int bps)
{
if (bps <= 8)
- return CODEC_ID_PCM_S8;
+ return AV_CODEC_ID_PCM_S8;
if (bps <= 16)
- return CODEC_ID_PCM_S16BE;
+ return AV_CODEC_ID_PCM_S16BE;
if (bps <= 24)
- return CODEC_ID_PCM_S24BE;
+ return AV_CODEC_ID_PCM_S24BE;
if (bps <= 32)
- return CODEC_ID_PCM_S32BE;
+ return AV_CODEC_ID_PCM_S32BE;
/* bigger than 32 isn't allowed */
- return CODEC_ID_NONE;
+ return AV_CODEC_ID_NONE;
}
/* returns the size of the found tag */
@@ -120,32 +120,32 @@ static unsigned int get_aiff_header(AVFormatContext *s, int size,
size -= 4;
}
- if (version != AIFF_C_VERSION1 || codec->codec_id == CODEC_ID_PCM_S16BE) {
+ if (version != AIFF_C_VERSION1 || codec->codec_id == AV_CODEC_ID_PCM_S16BE) {
codec->codec_id = aiff_codec_get_id(codec->bits_per_coded_sample);
codec->bits_per_coded_sample = av_get_bits_per_sample(codec->codec_id);
aiff->block_duration = 1;
} else {
switch (codec->codec_id) {
- case CODEC_ID_PCM_F32BE:
- case CODEC_ID_PCM_F64BE:
- case CODEC_ID_PCM_S16LE:
- case CODEC_ID_PCM_ALAW:
- case CODEC_ID_PCM_MULAW:
+ case AV_CODEC_ID_PCM_F32BE:
+ case AV_CODEC_ID_PCM_F64BE:
+ case AV_CODEC_ID_PCM_S16LE:
+ case AV_CODEC_ID_PCM_ALAW:
+ case AV_CODEC_ID_PCM_MULAW:
aiff->block_duration = 1;
break;
- case CODEC_ID_ADPCM_IMA_QT:
+ case AV_CODEC_ID_ADPCM_IMA_QT:
codec->block_align = 34*codec->channels;
break;
- case CODEC_ID_MACE3:
+ case AV_CODEC_ID_MACE3:
codec->block_align = 2*codec->channels;
break;
- case CODEC_ID_MACE6:
+ case AV_CODEC_ID_MACE6:
codec->block_align = 1*codec->channels;
break;
- case CODEC_ID_GSM:
+ case AV_CODEC_ID_GSM:
codec->block_align = 33;
break;
- case CODEC_ID_QCELP:
+ case AV_CODEC_ID_QCELP:
codec->block_align = 35;
break;
default:
diff --git a/libavformat/aiffenc.c b/libavformat/aiffenc.c
index 3cc0fcccf1..8cdb2616c2 100644
--- a/libavformat/aiffenc.c
+++ b/libavformat/aiffenc.c
@@ -168,8 +168,8 @@ AVOutputFormat ff_aiff_muxer = {
.mime_type = "audio/aiff",
.extensions = "aif,aiff,afc,aifc",
.priv_data_size = sizeof(AIFFOutputContext),
- .audio_codec = CODEC_ID_PCM_S16BE,
- .video_codec = CODEC_ID_NONE,
+ .audio_codec = AV_CODEC_ID_PCM_S16BE,
+ .video_codec = AV_CODEC_ID_NONE,
.write_header = aiff_write_header,
.write_packet = aiff_write_packet,
.write_trailer = aiff_write_trailer,
diff --git a/libavformat/amr.c b/libavformat/amr.c
index 299dbc91fc..36ff9b036a 100644
--- a/libavformat/amr.c
+++ b/libavformat/amr.c
@@ -40,9 +40,9 @@ static int amr_write_header(AVFormatContext *s)
s->priv_data = NULL;
- if (enc->codec_id == CODEC_ID_AMR_NB) {
+ if (enc->codec_id == AV_CODEC_ID_AMR_NB) {
avio_write(pb, AMR_header, sizeof(AMR_header) - 1); /* magic number */
- } else if (enc->codec_id == CODEC_ID_AMR_WB) {
+ } else if (enc->codec_id == AV_CODEC_ID_AMR_WB) {
avio_write(pb, AMRWB_header, sizeof(AMRWB_header) - 1); /* magic number */
} else {
return -1;
@@ -90,11 +90,11 @@ static int amr_read_header(AVFormatContext *s)
}
st->codec->codec_tag = MKTAG('s', 'a', 'w', 'b');
- st->codec->codec_id = CODEC_ID_AMR_WB;
+ st->codec->codec_id = AV_CODEC_ID_AMR_WB;
st->codec->sample_rate = 16000;
} else {
st->codec->codec_tag = MKTAG('s', 'a', 'm', 'r');
- st->codec->codec_id = CODEC_ID_AMR_NB;
+ st->codec->codec_id = AV_CODEC_ID_AMR_NB;
st->codec->sample_rate = 8000;
}
st->codec->channels = 1;
@@ -118,13 +118,13 @@ static int amr_read_packet(AVFormatContext *s, AVPacket *pkt)
toc = avio_r8(s->pb);
mode = (toc >> 3) & 0x0F;
- if (enc->codec_id == CODEC_ID_AMR_NB) {
+ if (enc->codec_id == AV_CODEC_ID_AMR_NB) {
static const uint8_t packed_size[16] = {
12, 13, 15, 17, 19, 20, 26, 31, 5, 0, 0, 0, 0, 0, 0, 0
};
size = packed_size[mode] + 1;
- } else if (enc->codec_id == CODEC_ID_AMR_WB) {
+ } else if (enc->codec_id == AV_CODEC_ID_AMR_WB) {
static const uint8_t packed_size[16] = {
18, 24, 33, 37, 41, 47, 51, 59, 61, 6, 6, 0, 0, 0, 1, 1
};
@@ -143,7 +143,7 @@ static int amr_read_packet(AVFormatContext *s, AVPacket *pkt)
pkt->stream_index = 0;
pkt->pos = pos;
pkt->data[0] = toc;
- pkt->duration = enc->codec_id == CODEC_ID_AMR_NB ? 160 : 320;
+ pkt->duration = enc->codec_id == AV_CODEC_ID_AMR_NB ? 160 : 320;
read = avio_read(s->pb, pkt->data + 1, size - 1);
if (read != size - 1) {
@@ -171,8 +171,8 @@ AVOutputFormat ff_amr_muxer = {
.long_name = NULL_IF_CONFIG_SMALL("3GPP AMR"),
.mime_type = "audio/amr",
.extensions = "amr",
- .audio_codec = CODEC_ID_AMR_NB,
- .video_codec = CODEC_ID_NONE,
+ .audio_codec = AV_CODEC_ID_AMR_NB,
+ .video_codec = AV_CODEC_ID_NONE,
.write_header = amr_write_header,
.write_packet = amr_write_packet,
};
diff --git a/libavformat/anm.c b/libavformat/anm.c
index 3c8d570c8e..69a5ddab0f 100644
--- a/libavformat/anm.c
+++ b/libavformat/anm.c
@@ -101,7 +101,7 @@ static int read_header(AVFormatContext *s)
if (!st)
return AVERROR(ENOMEM);
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- st->codec->codec_id = CODEC_ID_ANM;
+ st->codec->codec_id = AV_CODEC_ID_ANM;
st->codec->codec_tag = 0; /* no fourcc */
st->codec->width = avio_rl16(pb);
st->codec->height = avio_rl16(pb);
diff --git a/libavformat/apc.c b/libavformat/apc.c
index c4774f1375..2ccf7946aa 100644
--- a/libavformat/apc.c
+++ b/libavformat/apc.c
@@ -44,7 +44,7 @@ static int apc_read_header(AVFormatContext *s)
return AVERROR(ENOMEM);
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- st->codec->codec_id = CODEC_ID_ADPCM_IMA_APC;
+ st->codec->codec_id = AV_CODEC_ID_ADPCM_IMA_APC;
avio_rl32(pb); /* number of samples */
st->codec->sample_rate = avio_rl32(pb);
diff --git a/libavformat/ape.c b/libavformat/ape.c
index 62c94780ec..547a9c01e6 100644
--- a/libavformat/ape.c
+++ b/libavformat/ape.c
@@ -327,7 +327,7 @@ static int ape_read_header(AVFormatContext * s)
total_blocks = (ape->totalframes == 0) ? 0 : ((ape->totalframes - 1) * ape->blocksperframe) + ape->finalframeblocks;
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- st->codec->codec_id = CODEC_ID_APE;
+ st->codec->codec_id = AV_CODEC_ID_APE;
st->codec->codec_tag = MKTAG('A', 'P', 'E', ' ');
st->codec->channels = ape->channels;
st->codec->sample_rate = ape->samplerate;
diff --git a/libavformat/apetag.c b/libavformat/apetag.c
index 7c87086a29..bf9918a0b3 100644
--- a/libavformat/apetag.c
+++ b/libavformat/apetag.c
@@ -55,7 +55,7 @@ static int ape_tag_read_field(AVFormatContext *s)
return -1;
if (flags & APE_TAG_FLAG_IS_BINARY) {
uint8_t filename[1024];
- enum CodecID id;
+ enum AVCodecID id;
AVStream *st = avformat_new_stream(s, NULL);
if (!st)
return AVERROR(ENOMEM);
@@ -68,7 +68,7 @@ static int ape_tag_read_field(AVFormatContext *s)
av_dict_set(&st->metadata, key, filename, 0);
- if ((id = ff_guess_image2_codec(filename)) != CODEC_ID_NONE) {
+ if ((id = ff_guess_image2_codec(filename)) != AV_CODEC_ID_NONE) {
AVPacket pkt;
int ret;
diff --git a/libavformat/asfdec.c b/libavformat/asfdec.c
index 25c7ae5d64..f274520cdc 100644
--- a/libavformat/asfdec.c
+++ b/libavformat/asfdec.c
@@ -170,7 +170,7 @@ static int asf_read_picture(AVFormatContext *s, int len)
{
AVPacket pkt = { 0 };
const CodecMime *mime = ff_id3v2_mime_tags;
- enum CodecID id = CODEC_ID_NONE;
+ enum AVCodecID id = AV_CODEC_ID_NONE;
char mimetype[64];
uint8_t *desc = NULL;
ASFStream *ast = NULL;
@@ -197,14 +197,14 @@ static int asf_read_picture(AVFormatContext *s, int len)
/* picture MIME type */
len -= avio_get_str16le(s->pb, len, mimetype, sizeof(mimetype));
- while (mime->id != CODEC_ID_NONE) {
+ while (mime->id != AV_CODEC_ID_NONE) {
if (!strncmp(mime->str, mimetype, sizeof(mimetype))) {
id = mime->id;
break;
}
mime++;
}
- if (id == CODEC_ID_NONE) {
+ if (id == AV_CODEC_ID_NONE) {
av_log(s, AV_LOG_ERROR, "Unknown attached picture mimetype: %s.\n",
mimetype);
return 0;
@@ -362,7 +362,7 @@ static int asf_read_stream_properties(AVFormatContext *s, int64_t size)
type = AVMEDIA_TYPE_VIDEO;
} else if (!ff_guidcmp(&g, &ff_asf_jfif_media)) {
type = AVMEDIA_TYPE_VIDEO;
- st->codec->codec_id = CODEC_ID_MJPEG;
+ st->codec->codec_id = AV_CODEC_ID_MJPEG;
} else if (!ff_guidcmp(&g, &ff_asf_command_stream)) {
type = AVMEDIA_TYPE_DATA;
} else if (!ff_guidcmp(&g, &ff_asf_ext_stream_embed_stream_header)) {
@@ -406,7 +406,7 @@ static int asf_read_stream_properties(AVFormatContext *s, int64_t size)
st->request_probe= 1;
st->codec->codec_tag = 0;
}
- if (st->codec->codec_id == CODEC_ID_AAC) {
+ if (st->codec->codec_id == AV_CODEC_ID_AAC) {
st->need_parsing = AVSTREAM_PARSE_NONE;
} else {
st->need_parsing = AVSTREAM_PARSE_FULL;
@@ -475,7 +475,7 @@ static int asf_read_stream_properties(AVFormatContext *s, int64_t size)
av_freep(&st->codec->extradata);
st->codec->extradata_size=0;
}
- if(st->codec->codec_id == CODEC_ID_H264)
+ if(st->codec->codec_id == AV_CODEC_ID_H264)
st->need_parsing = AVSTREAM_PARSE_FULL_ONCE;
}
pos2 = avio_tell(pb);
@@ -1147,7 +1147,7 @@ static int ff_asf_parse_packet(AVFormatContext *s, AVIOContext *pb, AVPacket *pk
/* test if whole packet is read */
if (asf_st->frag_offset == asf_st->pkt.size) {
//workaround for macroshit radio DVR-MS files
- if( s->streams[asf->stream_index]->codec->codec_id == CODEC_ID_MPEG2VIDEO
+ if( s->streams[asf->stream_index]->codec->codec_id == AV_CODEC_ID_MPEG2VIDEO
&& asf_st->pkt.size > 100){
int i;
for(i=0; i<asf_st->pkt.size && !asf_st->pkt.data[i]; i++);
diff --git a/libavformat/asfenc.c b/libavformat/asfenc.c
index 5b5b0b0d2f..79f21a37f7 100644
--- a/libavformat/asfenc.c
+++ b/libavformat/asfenc.c
@@ -218,10 +218,10 @@ typedef struct {
} ASFContext;
static const AVCodecTag codec_asf_bmp_tags[] = {
- { CODEC_ID_MPEG4, MKTAG('M', '4', 'S', '2') },
- { CODEC_ID_MPEG4, MKTAG('M', 'P', '4', 'S') },
- { CODEC_ID_MSMPEG4V3, MKTAG('M', 'P', '4', '3') },
- { CODEC_ID_NONE, 0 },
+ { AV_CODEC_ID_MPEG4, MKTAG('M', '4', 'S', '2') },
+ { AV_CODEC_ID_MPEG4, MKTAG('M', 'P', '4', 'S') },
+ { AV_CODEC_ID_MSMPEG4V3, MKTAG('M', 'P', '4', '3') },
+ { AV_CODEC_ID_NONE, 0 },
};
#define PREROLL_TIME 3100
@@ -448,7 +448,7 @@ static int asf_write_header1(AVFormatContext *s, int64_t file_size, int64_t data
}
/* ERROR Correction */
avio_w8(pb, 0x01);
- if(enc->codec_id == CODEC_ID_ADPCM_G726 || !enc->block_align){
+ if(enc->codec_id == AV_CODEC_ID_ADPCM_G726 || !enc->block_align){
avio_wl16(pb, 0x0190);
avio_wl16(pb, 0x0190);
}else{
@@ -491,7 +491,7 @@ static int asf_write_header1(AVFormatContext *s, int64_t file_size, int64_t data
else
avio_wl16(pb, -1);
- if(enc->codec_id == CODEC_ID_WMAV2)
+ if(enc->codec_id == AV_CODEC_ID_WMAV2)
desc = "Windows Media Audio V8";
else
desc = p ? p->name : enc->codec_name;
@@ -905,8 +905,8 @@ AVOutputFormat ff_asf_muxer = {
.mime_type = "video/x-ms-asf",
.extensions = "asf,wmv,wma",
.priv_data_size = sizeof(ASFContext),
- .audio_codec = CODEC_ID_WMAV2,
- .video_codec = CODEC_ID_MSMPEG4V3,
+ .audio_codec = AV_CODEC_ID_WMAV2,
+ .video_codec = AV_CODEC_ID_MSMPEG4V3,
.write_header = asf_write_header,
.write_packet = asf_write_packet,
.write_trailer = asf_write_trailer,
@@ -924,8 +924,8 @@ AVOutputFormat ff_asf_stream_muxer = {
.mime_type = "video/x-ms-asf",
.extensions = "asf,wmv,wma",
.priv_data_size = sizeof(ASFContext),
- .audio_codec = CODEC_ID_WMAV2,
- .video_codec = CODEC_ID_MSMPEG4V3,
+ .audio_codec = AV_CODEC_ID_WMAV2,
+ .video_codec = AV_CODEC_ID_MSMPEG4V3,
.write_header = asf_write_stream_header,
.write_packet = asf_write_packet,
.write_trailer = asf_write_trailer,
diff --git a/libavformat/assdec.c b/libavformat/assdec.c
index 6229857395..687869107c 100644
--- a/libavformat/assdec.c
+++ b/libavformat/assdec.c
@@ -88,7 +88,7 @@ static int read_header(AVFormatContext *s)
return -1;
avpriv_set_pts_info(st, 64, 1, 100);
st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;
- st->codec->codec_id= CODEC_ID_SSA;
+ st->codec->codec_id= AV_CODEC_ID_SSA;
header_remaining= INT_MAX;
dst[0] = &st->codec->extradata;
diff --git a/libavformat/assenc.c b/libavformat/assenc.c
index 73f6613209..2b683fbe7e 100644
--- a/libavformat/assenc.c
+++ b/libavformat/assenc.c
@@ -31,7 +31,7 @@ static int write_header(AVFormatContext *s)
AVCodecContext *avctx= s->streams[0]->codec;
uint8_t *last= NULL;
- if(s->nb_streams != 1 || avctx->codec_id != CODEC_ID_SSA){
+ if(s->nb_streams != 1 || avctx->codec_id != AV_CODEC_ID_SSA){
av_log(s, AV_LOG_ERROR, "Exactly one ASS/SSA stream is needed.\n");
return -1;
}
@@ -83,7 +83,7 @@ AVOutputFormat ff_ass_muxer = {
.mime_type = "text/x-ssa",
.extensions = "ass,ssa",
.priv_data_size = sizeof(ASSContext),
- .subtitle_codec = CODEC_ID_SSA,
+ .subtitle_codec = AV_CODEC_ID_SSA,
.write_header = write_header,
.write_packet = write_packet,
.write_trailer = write_trailer,
diff --git a/libavformat/au.c b/libavformat/au.c
index 69d93c6d90..b7654a417a 100644
--- a/libavformat/au.c
+++ b/libavformat/au.c
@@ -38,15 +38,15 @@
/* The libavcodec codecs we support, and the IDs they have in the file */
static const AVCodecTag codec_au_tags[] = {
- { CODEC_ID_PCM_MULAW, 1 },
- { CODEC_ID_PCM_S8, 2 },
- { CODEC_ID_PCM_S16BE, 3 },
- { CODEC_ID_PCM_S24BE, 4 },
- { CODEC_ID_PCM_S32BE, 5 },
- { CODEC_ID_PCM_F32BE, 6 },
- { CODEC_ID_PCM_F64BE, 7 },
- { CODEC_ID_PCM_ALAW, 27 },
- { CODEC_ID_NONE, 0 },
+ { AV_CODEC_ID_PCM_MULAW, 1 },
+ { AV_CODEC_ID_PCM_S8, 2 },
+ { AV_CODEC_ID_PCM_S16BE, 3 },
+ { AV_CODEC_ID_PCM_S24BE, 4 },
+ { AV_CODEC_ID_PCM_S32BE, 5 },
+ { AV_CODEC_ID_PCM_F32BE, 6 },
+ { AV_CODEC_ID_PCM_F64BE, 7 },
+ { AV_CODEC_ID_PCM_ALAW, 27 },
+ { AV_CODEC_ID_NONE, 0 },
};
#if CONFIG_AU_MUXER
@@ -124,7 +124,7 @@ static int au_read_header(AVFormatContext *s)
unsigned int tag;
AVIOContext *pb = s->pb;
unsigned int id, channels, rate;
- enum CodecID codec;
+ enum AVCodecID codec;
AVStream *st;
/* check ".snd" header */
@@ -210,8 +210,8 @@ AVOutputFormat ff_au_muxer = {
.long_name = NULL_IF_CONFIG_SMALL("Sun AU"),
.mime_type = "audio/basic",
.extensions = "au",
- .audio_codec = CODEC_ID_PCM_S16BE,
- .video_codec = CODEC_ID_NONE,
+ .audio_codec = AV_CODEC_ID_PCM_S16BE,
+ .video_codec = AV_CODEC_ID_NONE,
.write_header = au_write_header,
.write_packet = au_write_packet,
.write_trailer = au_write_trailer,
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index 58b02a6a80..150af3f988 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -381,9 +381,9 @@ typedef struct AVOutputFormat {
const char *mime_type;
const char *extensions; /**< comma-separated filename extensions */
/* output support */
- enum CodecID audio_codec; /**< default audio codec */
- enum CodecID video_codec; /**< default video codec */
- enum CodecID subtitle_codec; /**< default subtitle codec */
+ enum AVCodecID audio_codec; /**< default audio codec */
+ enum AVCodecID video_codec; /**< default video codec */
+ enum AVCodecID subtitle_codec; /**< default subtitle codec */
/**
* can use flags: AVFMT_NOFILE, AVFMT_NEEDNUMBER, AVFMT_RAWPICTURE,
* AVFMT_GLOBALHEADER, AVFMT_NOTIMESTAMPS, AVFMT_VARIABLE_FPS,
@@ -394,7 +394,7 @@ typedef struct AVOutputFormat {
/**
* List of supported codec_id-codec_tag pairs, ordered by "better
- * choice first". The arrays are all terminated by CODEC_ID_NONE.
+ * choice first". The arrays are all terminated by AV_CODEC_ID_NONE.
*/
const struct AVCodecTag * const *codec_tag;
@@ -435,7 +435,7 @@ typedef struct AVOutputFormat {
* @return 1 if the codec is supported, 0 if it is not.
* A negative number if unknown.
*/
- int (*query_codec)(enum CodecID id, int std_compliance);
+ int (*query_codec)(enum AVCodecID id, int std_compliance);
void (*get_output_timestamp)(struct AVFormatContext *s, int stream,
int64_t *dts, int64_t *wall);
@@ -993,19 +993,19 @@ typedef struct AVFormatContext {
* Forced video codec_id.
* Demuxing: Set by user.
*/
- enum CodecID video_codec_id;
+ enum AVCodecID video_codec_id;
/**
* Forced audio codec_id.
* Demuxing: Set by user.
*/
- enum CodecID audio_codec_id;
+ enum AVCodecID audio_codec_id;
/**
* Forced subtitle codec_id.
* Demuxing: Set by user.
*/
- enum CodecID subtitle_codec_id;
+ enum AVCodecID subtitle_codec_id;
/**
* Maximum amount of memory in bytes to use for the index of each stream.
@@ -1730,7 +1730,7 @@ AVOutputFormat *av_guess_format(const char *short_name,
/**
* Guess the codec ID based upon muxer and filename.
*/
-enum CodecID av_guess_codec(AVOutputFormat *fmt, const char *short_name,
+enum AVCodecID av_guess_codec(AVOutputFormat *fmt, const char *short_name,
const char *filename, const char *mime_type,
enum AVMediaType type);
@@ -1818,13 +1818,13 @@ void av_pkt_dump_log2(void *avcl, int level, AVPacket *pkt, int dump_payload,
AVStream *st);
/**
- * Get the CodecID for the given codec tag tag.
- * If no codec id is found returns CODEC_ID_NONE.
+ * Get the AVCodecID for the given codec tag tag.
+ * If no codec id is found returns AV_CODEC_ID_NONE.
*
* @param tags list of supported codec_id-codec_tag pairs, as stored
* in AVInputFormat.codec_tag and AVOutputFormat.codec_tag
*/
-enum CodecID av_codec_get_id(const struct AVCodecTag * const *tags, unsigned int tag);
+enum AVCodecID av_codec_get_id(const struct AVCodecTag * const *tags, unsigned int tag);
/**
* Get the codec tag for the given codec id id.
@@ -1833,7 +1833,7 @@ enum CodecID av_codec_get_id(const struct AVCodecTag * const *tags, unsigned int
* @param tags list of supported codec_id-codec_tag pairs, as stored
* in AVInputFormat.codec_tag and AVOutputFormat.codec_tag
*/
-unsigned int av_codec_get_tag(const struct AVCodecTag * const *tags, enum CodecID id);
+unsigned int av_codec_get_tag(const struct AVCodecTag * const *tags, enum AVCodecID id);
int av_find_default_stream_index(AVFormatContext *s);
@@ -1944,26 +1944,26 @@ int av_match_ext(const char *filename, const char *extensions);
* @return 1 if codec with ID codec_id can be stored in ofmt, 0 if it cannot.
* A negative number if this information is not available.
*/
-int avformat_query_codec(AVOutputFormat *ofmt, enum CodecID codec_id, int std_compliance);
+int avformat_query_codec(AVOutputFormat *ofmt, enum AVCodecID codec_id, int std_compliance);
/**
* @defgroup riff_fourcc RIFF FourCCs
* @{
- * Get the tables mapping RIFF FourCCs to libavcodec CodecIDs. The tables are
+ * Get the tables mapping RIFF FourCCs to libavcodec AVCodecIDs. The tables are
* meant to be passed to av_codec_get_id()/av_codec_get_tag() as in the
* following code:
* @code
* uint32_t tag = MKTAG('H', '2', '6', '4');
* const struct AVCodecTag *table[] = { avformat_get_riff_video_tags(), 0 };
- * enum CodecID id = av_codec_get_id(table, tag);
+ * enum AVCodecID id = av_codec_get_id(table, tag);
* @endcode
*/
/**
- * @return the table mapping RIFF FourCCs for video to libavcodec CodecID.
+ * @return the table mapping RIFF FourCCs for video to libavcodec AVCodecID.
*/
const struct AVCodecTag *avformat_get_riff_video_tags(void);
/**
- * @return the table mapping RIFF FourCCs for audio to CodecID.
+ * @return the table mapping RIFF FourCCs for audio to AVCodecID.
*/
const struct AVCodecTag *avformat_get_riff_audio_tags(void);
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index 0144b65f6f..d3bb8d85f9 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -588,7 +588,7 @@ static int avi_read_header(AVFormatContext *s)
st->codec->width=avih_width;
st->codec->height=avih_height;
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- st->codec->codec_id = CODEC_ID_AMV;
+ st->codec->codec_id = AV_CODEC_ID_AMV;
avio_skip(pb, size);
break;
}
@@ -597,7 +597,7 @@ static int avi_read_header(AVFormatContext *s)
if (tag1 == MKTAG('D', 'X', 'S', 'B') || tag1 == MKTAG('D','X','S','A')) {
st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;
st->codec->codec_tag = tag1;
- st->codec->codec_id = CODEC_ID_XSUB;
+ st->codec->codec_id = AV_CODEC_ID_XSUB;
break;
}
@@ -639,7 +639,7 @@ static int avi_read_header(AVFormatContext *s)
if(tag1 == MKTAG('A', 'V', 'R', 'n') &&
st->codec->extradata_size >= 31 &&
!memcmp(&st->codec->extradata[28], "1:1", 3))
- st->codec->codec_id = CODEC_ID_RAWVIDEO;
+ st->codec->codec_id = AV_CODEC_ID_RAWVIDEO;
if(st->codec->codec_tag==0 && st->codec->height > 0 && st->codec->extradata_size < 1U<<30){
st->codec->extradata_size+= 9;
@@ -668,17 +668,17 @@ static int avi_read_header(AVFormatContext *s)
/* ADTS header is in extradata, AAC without header must be
* stored as exact frames. Parser not needed and it will
* fail. */
- if (st->codec->codec_id == CODEC_ID_AAC && st->codec->extradata_size)
+ if (st->codec->codec_id == AV_CODEC_ID_AAC && st->codec->extradata_size)
st->need_parsing = AVSTREAM_PARSE_NONE;
/* AVI files with Xan DPCM audio (wrongly) declare PCM
* audio in the header but have Axan as stream_code_tag. */
if (st->codec->stream_codec_tag == AV_RL32("Axan")){
- st->codec->codec_id = CODEC_ID_XAN_DPCM;
+ st->codec->codec_id = AV_CODEC_ID_XAN_DPCM;
st->codec->codec_tag = 0;
ast->dshow_block_align = 0;
}
if (amv_file_format){
- st->codec->codec_id = CODEC_ID_ADPCM_IMA_AMV;
+ st->codec->codec_id = AV_CODEC_ID_ADPCM_IMA_AMV;
ast->dshow_block_align = 0;
}
break;
@@ -688,7 +688,7 @@ static int avi_read_header(AVFormatContext *s)
break;
default:
st->codec->codec_type = AVMEDIA_TYPE_DATA;
- st->codec->codec_id= CODEC_ID_NONE;
+ st->codec->codec_id= AV_CODEC_ID_NONE;
st->codec->codec_tag= 0;
avio_skip(pb, size);
break;
@@ -1186,7 +1186,7 @@ resync:
int i;
uint32_t state=-1;
for(i=0; i<FFMIN(size,256); i++){
- if(st->codec->codec_id == CODEC_ID_MPEG4){
+ if(st->codec->codec_id == AV_CODEC_ID_MPEG4){
if(state == 0x1B6){
key= !(pkt->data[i]&0xC0);
break;
diff --git a/libavformat/avienc.c b/libavformat/avienc.c
index 0a68aa7a50..ff25d792a8 100644
--- a/libavformat/avienc.c
+++ b/libavformat/avienc.c
@@ -235,7 +235,7 @@ static int avi_write_header(AVFormatContext *s)
case AVMEDIA_TYPE_SUBTITLE:
// XSUB subtitles behave like video tracks, other subtitles
// are not (yet) supported.
- if (stream->codec_id != CODEC_ID_XSUB) {
+ if (stream->codec_id != AV_CODEC_ID_XSUB) {
av_log(s, AV_LOG_ERROR, "Subtitle streams other than DivX XSUB are not supported by the AVI muxer.\n");
return AVERROR_PATCHWELCOME;
}
@@ -245,7 +245,7 @@ static int avi_write_header(AVFormatContext *s)
case AVMEDIA_TYPE_DATA : ffio_wfourcc(pb, "dats"); break;
}
if(stream->codec_type == AVMEDIA_TYPE_VIDEO ||
- stream->codec_id == CODEC_ID_XSUB)
+ stream->codec_id == AV_CODEC_ID_XSUB)
avio_wl32(pb, stream->codec_tag);
else
avio_wl32(pb, 1);
@@ -257,7 +257,7 @@ static int avi_write_header(AVFormatContext *s)
ff_parse_specific_params(stream, &au_byterate, &au_ssize, &au_scale);
avpriv_set_pts_info(s->streams[i], 64, au_scale, au_byterate);
- if(stream->codec_id == CODEC_ID_XSUB)
+ if(stream->codec_id == AV_CODEC_ID_XSUB)
au_scale = au_byterate = 0;
avio_wl32(pb, au_scale); /* scale */
@@ -290,7 +290,7 @@ static int avi_write_header(AVFormatContext *s)
case AVMEDIA_TYPE_SUBTITLE:
// XSUB subtitles behave like video tracks, other subtitles
// are not (yet) supported.
- if (stream->codec_id != CODEC_ID_XSUB) break;
+ if (stream->codec_id != AV_CODEC_ID_XSUB) break;
case AVMEDIA_TYPE_VIDEO:
ff_put_bmp_header(pb, stream, ff_codec_bmp_tags, 0);
break;
@@ -525,7 +525,7 @@ static int avi_write_packet(AVFormatContext *s, AVPacket *pkt)
int size= pkt->size;
// av_log(s, AV_LOG_DEBUG, "%"PRId64" %d %d\n", pkt->dts, avist->packet_count, stream_index);
- while(enc->block_align==0 && pkt->dts != AV_NOPTS_VALUE && pkt->dts > avist->packet_count && enc->codec_id != CODEC_ID_XSUB){
+ while(enc->block_align==0 && pkt->dts != AV_NOPTS_VALUE && pkt->dts > avist->packet_count && enc->codec_id != AV_CODEC_ID_XSUB){
AVPacket empty_packet;
if(pkt->dts - avist->packet_count > 60000){
@@ -624,7 +624,7 @@ static int avi_write_trailer(AVFormatContext *s)
if (nb_frames < avist->packet_count)
nb_frames = avist->packet_count;
} else {
- if (stream->codec_id == CODEC_ID_MP2 || stream->codec_id == CODEC_ID_MP3) {
+ if (stream->codec_id == AV_CODEC_ID_MP2 || stream->codec_id == AV_CODEC_ID_MP3) {
nb_frames += avist->packet_count;
}
}
@@ -654,8 +654,8 @@ AVOutputFormat ff_avi_muxer = {
.mime_type = "video/x-msvideo",
.extensions = "avi",
.priv_data_size = sizeof(AVIContext),
- .audio_codec = CONFIG_LIBMP3LAME ? CODEC_ID_MP3 : CODEC_ID_AC3,
- .video_codec = CODEC_ID_MPEG4,
+ .audio_codec = CONFIG_LIBMP3LAME ? AV_CODEC_ID_MP3 : AV_CODEC_ID_AC3,
+ .video_codec = AV_CODEC_ID_MPEG4,
.write_header = avi_write_header,
.write_packet = avi_write_packet,
.write_trailer = avi_write_trailer,
diff --git a/libavformat/avisynth.c b/libavformat/avisynth.c
index dcfaa27033..e5d9b7626f 100644
--- a/libavformat/avisynth.c
+++ b/libavformat/avisynth.c
@@ -133,7 +133,7 @@ static int avisynth_read_header(AVFormatContext *s)
st->codec->bit_rate = (uint64_t)stream->info.dwSampleSize * (uint64_t)stream->info.dwRate * 8 / (uint64_t)stream->info.dwScale;
st->codec->codec_tag = imgfmt.bmiHeader.biCompression;
st->codec->codec_id = ff_codec_get_id(ff_codec_bmp_tags, imgfmt.bmiHeader.biCompression);
- if (st->codec->codec_id == CODEC_ID_RAWVIDEO && imgfmt.bmiHeader.biCompression== BI_RGB) {
+ if (st->codec->codec_id == AV_CODEC_ID_RAWVIDEO && imgfmt.bmiHeader.biCompression== BI_RGB) {
st->codec->extradata = av_malloc(9 + FF_INPUT_BUFFER_PADDING_SIZE);
if (st->codec->extradata) {
st->codec->extradata_size = 9;
diff --git a/libavformat/avs.c b/libavformat/avs.c
index 124d43f33f..5a1eb2e675 100644
--- a/libavformat/avs.c
+++ b/libavformat/avs.c
@@ -183,7 +183,7 @@ static int avs_read_packet(AVFormatContext * s, AVPacket * pkt)
if (avs->st_video == NULL)
return AVERROR(ENOMEM);
avs->st_video->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- avs->st_video->codec->codec_id = CODEC_ID_AVS;
+ avs->st_video->codec->codec_id = AV_CODEC_ID_AVS;
avs->st_video->codec->width = avs->width;
avs->st_video->codec->height = avs->height;
avs->st_video->codec->bits_per_coded_sample=avs->bits_per_sample;
diff --git a/libavformat/bethsoftvid.c b/libavformat/bethsoftvid.c
index 77c45eefa1..1a83c797f7 100644
--- a/libavformat/bethsoftvid.c
+++ b/libavformat/bethsoftvid.c
@@ -112,7 +112,7 @@ static int read_frame(BVID_DemuxContext *vid, AVIOContext *pb, AVPacket *pkt,
}
avpriv_set_pts_info(st, 64, 185, vid->sample_rate);
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- st->codec->codec_id = CODEC_ID_BETHSOFTVID;
+ st->codec->codec_id = AV_CODEC_ID_BETHSOFTVID;
st->codec->width = vid->width;
st->codec->height = vid->height;
}
@@ -237,7 +237,7 @@ static int vid_read_packet(AVFormatContext *s,
return AVERROR(ENOMEM);
vid->audio_index = st->index;
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- st->codec->codec_id = CODEC_ID_PCM_U8;
+ st->codec->codec_id = AV_CODEC_ID_PCM_U8;
st->codec->channels = 1;
st->codec->bits_per_coded_sample = 8;
st->codec->sample_rate = vid->sample_rate;
diff --git a/libavformat/bfi.c b/libavformat/bfi.c
index 97fa8025e7..c03a1deb29 100644
--- a/libavformat/bfi.c
+++ b/libavformat/bfi.c
@@ -89,12 +89,12 @@ static int bfi_read_header(AVFormatContext * s)
/* Set up the video codec... */
avpriv_set_pts_info(vstream, 32, 1, fps);
vstream->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- vstream->codec->codec_id = CODEC_ID_BFI;
+ vstream->codec->codec_id = AV_CODEC_ID_BFI;
vstream->codec->pix_fmt = PIX_FMT_PAL8;
/* Set up the audio codec now... */
astream->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- astream->codec->codec_id = CODEC_ID_PCM_U8;
+ astream->codec->codec_id = AV_CODEC_ID_PCM_U8;
astream->codec->channels = 1;
astream->codec->bits_per_coded_sample = 8;
astream->codec->bit_rate =
diff --git a/libavformat/bink.c b/libavformat/bink.c
index 5eb22111f0..9c90480c8d 100644
--- a/libavformat/bink.c
+++ b/libavformat/bink.c
@@ -113,7 +113,7 @@ static int read_header(AVFormatContext *s)
avpriv_set_pts_info(vst, 64, fps_den, fps_num);
vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- vst->codec->codec_id = CODEC_ID_BINKVIDEO;
+ vst->codec->codec_id = AV_CODEC_ID_BINKVIDEO;
vst->codec->extradata = av_mallocz(4 + FF_INPUT_BUFFER_PADDING_SIZE);
if (!vst->codec->extradata)
return AVERROR(ENOMEM);
@@ -142,7 +142,7 @@ static int read_header(AVFormatContext *s)
avpriv_set_pts_info(ast, 64, 1, ast->codec->sample_rate);
flags = avio_rl16(pb);
ast->codec->codec_id = flags & BINK_AUD_USEDCT ?
- CODEC_ID_BINKAUDIO_DCT : CODEC_ID_BINKAUDIO_RDFT;
+ AV_CODEC_ID_BINKAUDIO_DCT : AV_CODEC_ID_BINKAUDIO_RDFT;
ast->codec->channels = flags & BINK_AUD_STEREO ? 2 : 1;
ast->codec->extradata = av_mallocz(4 + FF_INPUT_BUFFER_PADDING_SIZE);
if (!ast->codec->extradata)
diff --git a/libavformat/bintext.c b/libavformat/bintext.c
index 58db3cf71a..5ad30b3519 100644
--- a/libavformat/bintext.c
+++ b/libavformat/bintext.c
@@ -148,7 +148,7 @@ static int bintext_read_header(AVFormatContext *s)
AVStream *st = init_stream(s);
if (!st)
return AVERROR(ENOMEM);
- st->codec->codec_id = CODEC_ID_BINTEXT;
+ st->codec->codec_id = AV_CODEC_ID_BINTEXT;
st->codec->extradata_size = 2;
st->codec->extradata = av_malloc(st->codec->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
@@ -206,7 +206,7 @@ static int xbin_read_header(AVFormatContext *s)
st->codec->extradata_size += 48;
if ((flags & BINTEXT_FONT))
st->codec->extradata_size += fontheight * (flags & 0x10 ? 512 : 256);
- st->codec->codec_id = flags & 4 ? CODEC_ID_XBIN : CODEC_ID_BINTEXT;
+ st->codec->codec_id = flags & 4 ? AV_CODEC_ID_XBIN : AV_CODEC_ID_BINTEXT;
st->codec->extradata = av_malloc(st->codec->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
if (!st->codec->extradata)
@@ -239,7 +239,7 @@ static int adf_read_header(AVFormatContext *s)
st = init_stream(s);
if (!st)
return AVERROR(ENOMEM);
- st->codec->codec_id = CODEC_ID_BINTEXT;
+ st->codec->codec_id = AV_CODEC_ID_BINTEXT;
st->codec->extradata_size = 2 + 48 + 4096;
st->codec->extradata = av_malloc(st->codec->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
@@ -296,7 +296,7 @@ static int idf_read_header(AVFormatContext *s)
st = init_stream(s);
if (!st)
return AVERROR(ENOMEM);
- st->codec->codec_id = CODEC_ID_IDF;
+ st->codec->codec_id = AV_CODEC_ID_IDF;
st->codec->extradata_size = 2 + 48 + 4096;
st->codec->extradata = av_malloc(st->codec->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
diff --git a/libavformat/bit.c b/libavformat/bit.c
index b0931f429b..03c6152c5d 100644
--- a/libavformat/bit.c
+++ b/libavformat/bit.c
@@ -56,7 +56,7 @@ static int read_header(AVFormatContext *s)
return AVERROR(ENOMEM);
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- st->codec->codec_id=CODEC_ID_G729;
+ st->codec->codec_id=AV_CODEC_ID_G729;
st->codec->sample_rate=8000;
st->codec->block_align = 16;
st->codec->channels=1;
@@ -118,7 +118,7 @@ static int write_header(AVFormatContext *s)
{
AVCodecContext *enc = s->streams[0]->codec;
- enc->codec_id = CODEC_ID_G729;
+ enc->codec_id = AV_CODEC_ID_G729;
enc->channels = 1;
enc->bits_per_coded_sample = 16;
enc->block_align = (enc->bits_per_coded_sample * enc->channels) >> 3;
@@ -148,8 +148,8 @@ AVOutputFormat ff_bit_muxer = {
.long_name = NULL_IF_CONFIG_SMALL("G.729 BIT file format"),
.mime_type = "audio/bit",
.extensions = "bit",
- .audio_codec = CODEC_ID_G729,
- .video_codec = CODEC_ID_NONE,
+ .audio_codec = AV_CODEC_ID_G729,
+ .video_codec = AV_CODEC_ID_NONE,
.write_header = write_header,
.write_packet = write_packet,
};
diff --git a/libavformat/bmv.c b/libavformat/bmv.c
index 8c1eb787ce..474f4e3bc3 100644
--- a/libavformat/bmv.c
+++ b/libavformat/bmv.c
@@ -47,7 +47,7 @@ static int bmv_read_header(AVFormatContext *s)
if (!st)
return AVERROR(ENOMEM);
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- st->codec->codec_id = CODEC_ID_BMV_VIDEO;
+ st->codec->codec_id = AV_CODEC_ID_BMV_VIDEO;
st->codec->width = 640;
st->codec->height = 429;
st->codec->pix_fmt = PIX_FMT_PAL8;
@@ -56,7 +56,7 @@ static int bmv_read_header(AVFormatContext *s)
if (!ast)
return AVERROR(ENOMEM);
ast->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- ast->codec->codec_id = CODEC_ID_BMV_AUDIO;
+ ast->codec->codec_id = AV_CODEC_ID_BMV_AUDIO;
ast->codec->channels = 2;
ast->codec->sample_rate = 22050;
avpriv_set_pts_info(ast, 16, 1, 22050);
diff --git a/libavformat/c93.c b/libavformat/c93.c
index 5a044d9d3d..66516e9c39 100644
--- a/libavformat/c93.c
+++ b/libavformat/c93.c
@@ -84,7 +84,7 @@ static int read_header(AVFormatContext *s)
return AVERROR(ENOMEM);
video->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- video->codec->codec_id = CODEC_ID_C93;
+ video->codec->codec_id = AV_CODEC_ID_C93;
video->codec->width = 320;
video->codec->height = 192;
/* 4:3 320x200 with 8 empty lines */
diff --git a/libavformat/caf.c b/libavformat/caf.c
index 054533038f..5f490d82d6 100644
--- a/libavformat/caf.c
+++ b/libavformat/caf.c
@@ -32,34 +32,34 @@
* Known codec tags for CAF
*/
const AVCodecTag ff_codec_caf_tags[] = {
- { CODEC_ID_AAC, MKTAG('a','a','c',' ') },
- { CODEC_ID_AC3, MKTAG('a','c','-','3') },
- { CODEC_ID_ADPCM_IMA_QT, MKTAG('i','m','a','4') },
- { CODEC_ID_ADPCM_IMA_WAV, MKTAG('m','s', 0, 17 ) },
- { CODEC_ID_ADPCM_MS, MKTAG('m','s', 0, 2 ) },
- { CODEC_ID_ALAC, MKTAG('a','l','a','c') },
- { CODEC_ID_AMR_NB, MKTAG('s','a','m','r') },
+ { AV_CODEC_ID_AAC, MKTAG('a','a','c',' ') },
+ { AV_CODEC_ID_AC3, MKTAG('a','c','-','3') },
+ { AV_CODEC_ID_ADPCM_IMA_QT, MKTAG('i','m','a','4') },
+ { AV_CODEC_ID_ADPCM_IMA_WAV, MKTAG('m','s', 0, 17 ) },
+ { AV_CODEC_ID_ADPCM_MS, MKTAG('m','s', 0, 2 ) },
+ { AV_CODEC_ID_ALAC, MKTAG('a','l','a','c') },
+ { AV_CODEC_ID_AMR_NB, MKTAG('s','a','m','r') },
/* FIXME: use DV demuxer, as done in MOV */
- /*{ CODEC_ID_DVAUDIO, MKTAG('v','d','v','a') },*/
- /*{ CODEC_ID_DVAUDIO, MKTAG('d','v','c','a') },*/
- { CODEC_ID_GSM, MKTAG('a','g','s','m') },
- { CODEC_ID_GSM_MS, MKTAG('m','s', 0, '1') },
- { CODEC_ID_MACE3, MKTAG('M','A','C','3') },
- { CODEC_ID_MACE6, MKTAG('M','A','C','6') },
- { CODEC_ID_MP1, MKTAG('.','m','p','1') },
- { CODEC_ID_MP2, MKTAG('.','m','p','2') },
- { CODEC_ID_MP3, MKTAG('.','m','p','3') },
- { CODEC_ID_MP3, MKTAG('m','s', 0 ,'U') },
- { CODEC_ID_PCM_ALAW, MKTAG('a','l','a','w') },
- { CODEC_ID_PCM_MULAW, MKTAG('u','l','a','w') },
- { CODEC_ID_QCELP, MKTAG('Q','c','l','p') },
- { CODEC_ID_QDM2, MKTAG('Q','D','M','2') },
- { CODEC_ID_QDM2, MKTAG('Q','D','M','C') },
+ /*{ AV_CODEC_ID_DVAUDIO, MKTAG('v','d','v','a') },*/
+ /*{ AV_CODEC_ID_DVAUDIO, MKTAG('d','v','c','a') },*/
+ { AV_CODEC_ID_GSM, MKTAG('a','g','s','m') },
+ { AV_CODEC_ID_GSM_MS, MKTAG('m','s', 0, '1') },
+ { AV_CODEC_ID_MACE3, MKTAG('M','A','C','3') },
+ { AV_CODEC_ID_MACE6, MKTAG('M','A','C','6') },
+ { AV_CODEC_ID_MP1, MKTAG('.','m','p','1') },
+ { AV_CODEC_ID_MP2, MKTAG('.','m','p','2') },
+ { AV_CODEC_ID_MP3, MKTAG('.','m','p','3') },
+ { AV_CODEC_ID_MP3, MKTAG('m','s', 0 ,'U') },
+ { AV_CODEC_ID_PCM_ALAW, MKTAG('a','l','a','w') },
+ { AV_CODEC_ID_PCM_MULAW, MKTAG('u','l','a','w') },
+ { AV_CODEC_ID_QCELP, MKTAG('Q','c','l','p') },
+ { AV_CODEC_ID_QDM2, MKTAG('Q','D','M','2') },
+ { AV_CODEC_ID_QDM2, MKTAG('Q','D','M','C') },
/* currently unsupported codecs */
/*{ AC-3 over S/PDIF MKTAG('c','a','c','3') },*/
/*{ MPEG4CELP MKTAG('c','e','l','p') },*/
/*{ MPEG4HVXC MKTAG('h','v','x','c') },*/
/*{ MPEG4TwinVQ MKTAG('t','w','v','q') },*/
- { CODEC_ID_NONE, 0 },
+ { AV_CODEC_ID_NONE, 0 },
};
diff --git a/libavformat/cafdec.c b/libavformat/cafdec.c
index 2c967f0a69..f1682b0d34 100644
--- a/libavformat/cafdec.c
+++ b/libavformat/cafdec.c
@@ -103,7 +103,7 @@ static int read_kuki_chunk(AVFormatContext *s, int64_t size)
if (size < 0 || size > INT_MAX - FF_INPUT_BUFFER_PADDING_SIZE)
return -1;
- if (st->codec->codec_id == CODEC_ID_AAC) {
+ if (st->codec->codec_id == AV_CODEC_ID_AAC) {
/* The magic cookie format for AAC is an mp4 esds atom.
The lavc AAC decoder requires the data from the codec specific
description as extradata input. */
@@ -114,12 +114,12 @@ static int read_kuki_chunk(AVFormatContext *s, int64_t size)
ff_mov_read_esds(s, pb, atom);
skip = size - (avio_tell(pb) - strt);
if (skip < 0 || !st->codec->extradata ||
- st->codec->codec_id != CODEC_ID_AAC) {
+ st->codec->codec_id != AV_CODEC_ID_AAC) {
av_log(s, AV_LOG_ERROR, "invalid AAC magic cookie\n");
return AVERROR_INVALIDDATA;
}
avio_skip(pb, skip);
- } else if (st->codec->codec_id == CODEC_ID_ALAC) {
+ } else if (st->codec->codec_id == AV_CODEC_ID_ALAC) {
#define ALAC_PREAMBLE 12
#define ALAC_HEADER 36
#define ALAC_NEW_KUKI 24
diff --git a/libavformat/cafenc.c b/libavformat/cafenc.c
index c34705636d..4e51407fea 100644
--- a/libavformat/cafenc.c
+++ b/libavformat/cafenc.c
@@ -36,15 +36,15 @@ typedef struct {
static uint32_t codec_flags(enum CodecID codec_id) {
switch (codec_id) {
- case CODEC_ID_PCM_F32BE:
- case CODEC_ID_PCM_F64BE:
+ case AV_CODEC_ID_PCM_F32BE:
+ case AV_CODEC_ID_PCM_F64BE:
return 1; //< kCAFLinearPCMFormatFlagIsFloat
- case CODEC_ID_PCM_S16LE:
- case CODEC_ID_PCM_S24LE:
- case CODEC_ID_PCM_S32LE:
+ case AV_CODEC_ID_PCM_S16LE:
+ case AV_CODEC_ID_PCM_S24LE:
+ case AV_CODEC_ID_PCM_S32LE:
return 2; //< kCAFLinearPCMFormatFlagIsLittleEndian
- case CODEC_ID_PCM_F32LE:
- case CODEC_ID_PCM_F64LE:
+ case AV_CODEC_ID_PCM_F32LE:
+ case AV_CODEC_ID_PCM_F64LE:
return 3; //< kCAFLinearPCMFormatFlagIsFloat | kCAFLinearPCMFormatFlagIsLittleEndian
default:
return 0;
@@ -53,44 +53,44 @@ static uint32_t codec_flags(enum CodecID codec_id) {
static uint32_t samples_per_packet(enum CodecID codec_id, int channels) {
switch (codec_id) {
- case CODEC_ID_PCM_S8:
- case CODEC_ID_PCM_S16LE:
- case CODEC_ID_PCM_S16BE:
- case CODEC_ID_PCM_S24LE:
- case CODEC_ID_PCM_S24BE:
- case CODEC_ID_PCM_S32LE:
- case CODEC_ID_PCM_S32BE:
- case CODEC_ID_PCM_F32LE:
- case CODEC_ID_PCM_F32BE:
- case CODEC_ID_PCM_F64LE:
- case CODEC_ID_PCM_F64BE:
- case CODEC_ID_PCM_ALAW:
- case CODEC_ID_PCM_MULAW:
+ case AV_CODEC_ID_PCM_S8:
+ case AV_CODEC_ID_PCM_S16LE:
+ case AV_CODEC_ID_PCM_S16BE:
+ case AV_CODEC_ID_PCM_S24LE:
+ case AV_CODEC_ID_PCM_S24BE:
+ case AV_CODEC_ID_PCM_S32LE:
+ case AV_CODEC_ID_PCM_S32BE:
+ case AV_CODEC_ID_PCM_F32LE:
+ case AV_CODEC_ID_PCM_F32BE:
+ case AV_CODEC_ID_PCM_F64LE:
+ case AV_CODEC_ID_PCM_F64BE:
+ case AV_CODEC_ID_PCM_ALAW:
+ case AV_CODEC_ID_PCM_MULAW:
return 1;
- case CODEC_ID_MACE3:
- case CODEC_ID_MACE6:
+ case AV_CODEC_ID_MACE3:
+ case AV_CODEC_ID_MACE6:
return 6;
- case CODEC_ID_ADPCM_IMA_QT:
+ case AV_CODEC_ID_ADPCM_IMA_QT:
return 64;
- case CODEC_ID_AMR_NB:
- case CODEC_ID_GSM:
- case CODEC_ID_QCELP:
+ case AV_CODEC_ID_AMR_NB:
+ case AV_CODEC_ID_GSM:
+ case AV_CODEC_ID_QCELP:
return 160;
- case CODEC_ID_GSM_MS:
+ case AV_CODEC_ID_GSM_MS:
return 320;
- case CODEC_ID_MP1:
+ case AV_CODEC_ID_MP1:
return 384;
- case CODEC_ID_MP2:
- case CODEC_ID_MP3:
+ case AV_CODEC_ID_MP2:
+ case AV_CODEC_ID_MP3:
return 1152;
- case CODEC_ID_AC3:
+ case AV_CODEC_ID_AC3:
return 1536;
- case CODEC_ID_ALAC:
- case CODEC_ID_QDM2:
+ case AV_CODEC_ID_ALAC:
+ case AV_CODEC_ID_QDM2:
return 4096;
- case CODEC_ID_ADPCM_IMA_WAV:
+ case AV_CODEC_ID_ADPCM_IMA_WAV:
return (1024 - 4 * channels) * 8 / (4 * channels) + 1;
- case CODEC_ID_ADPCM_MS:
+ case AV_CODEC_ID_ADPCM_MS:
return (1024 - 7 * channels) * 2 / channels + 2;
default:
return 0;
@@ -105,26 +105,26 @@ static int caf_write_header(AVFormatContext *s)
unsigned int codec_tag = ff_codec_get_tag(ff_codec_caf_tags, enc->codec_id);
switch (enc->codec_id) {
- case CODEC_ID_AAC:
- case CODEC_ID_AC3:
+ case AV_CODEC_ID_AAC:
+ case AV_CODEC_ID_AC3:
av_log(s, AV_LOG_ERROR, "muxing codec currently unsupported\n");
return AVERROR_PATCHWELCOME;
}
switch (enc->codec_id) {
- case CODEC_ID_PCM_S8:
- case CODEC_ID_PCM_S16LE:
- case CODEC_ID_PCM_S16BE:
- case CODEC_ID_PCM_S24LE:
- case CODEC_ID_PCM_S24BE:
- case CODEC_ID_PCM_S32LE:
- case CODEC_ID_PCM_S32BE:
- case CODEC_ID_PCM_F32LE:
- case CODEC_ID_PCM_F32BE:
- case CODEC_ID_PCM_F64LE:
- case CODEC_ID_PCM_F64BE:
- case CODEC_ID_PCM_ALAW:
- case CODEC_ID_PCM_MULAW:
+ case AV_CODEC_ID_PCM_S8:
+ case AV_CODEC_ID_PCM_S16LE:
+ case AV_CODEC_ID_PCM_S16BE:
+ case AV_CODEC_ID_PCM_S24LE:
+ case AV_CODEC_ID_PCM_S24BE:
+ case AV_CODEC_ID_PCM_S32LE:
+ case AV_CODEC_ID_PCM_S32BE:
+ case AV_CODEC_ID_PCM_F32LE:
+ case AV_CODEC_ID_PCM_F32BE:
+ case AV_CODEC_ID_PCM_F64LE:
+ case AV_CODEC_ID_PCM_F64BE:
+ case AV_CODEC_ID_PCM_ALAW:
+ case AV_CODEC_ID_PCM_MULAW:
codec_tag = MKTAG('l','p','c','m');
}
@@ -158,12 +158,12 @@ static int caf_write_header(AVFormatContext *s)
ff_mov_write_chan(pb, enc->channel_layout);
}
- if (enc->codec_id == CODEC_ID_ALAC) {
+ if (enc->codec_id == AV_CODEC_ID_ALAC) {
ffio_wfourcc(pb, "kuki");
avio_wb64(pb, 12 + enc->extradata_size);
avio_write(pb, "\0\0\0\14frmaalac", 12);
avio_write(pb, enc->extradata, enc->extradata_size);
- } else if (enc->codec_id == CODEC_ID_AMR_NB) {
+ } else if (enc->codec_id == AV_CODEC_ID_AMR_NB) {
ffio_wfourcc(pb, "kuki");
avio_wb64(pb, 29);
avio_write(pb, "\0\0\0\14frmasamr", 12);
@@ -174,7 +174,7 @@ static int caf_write_header(AVFormatContext *s)
avio_wb16(pb, 0x81FF); /* Mode set (all modes for AMR_NB) */
avio_w8(pb, 0x00); /* Mode change period (no restriction) */
avio_w8(pb, 0x01); /* Frames per sample */
- } else if (enc->codec_id == CODEC_ID_QDM2) {
+ } else if (enc->codec_id == AV_CODEC_ID_QDM2) {
ffio_wfourcc(pb, "kuki");
avio_wb64(pb, enc->extradata_size);
avio_write(pb, enc->extradata, enc->extradata_size);
@@ -253,8 +253,8 @@ AVOutputFormat ff_caf_muxer = {
.mime_type = "audio/x-caf",
.extensions = "caf",
.priv_data_size = sizeof(CAFContext),
- .audio_codec = CODEC_ID_PCM_S16BE,
- .video_codec = CODEC_ID_NONE,
+ .audio_codec = AV_CODEC_ID_PCM_S16BE,
+ .video_codec = AV_CODEC_ID_NONE,
.write_header = caf_write_header,
.write_packet = caf_write_packet,
.write_trailer = caf_write_trailer,
diff --git a/libavformat/cavsvideodec.c b/libavformat/cavsvideodec.c
index a55438075f..c035128bcf 100644
--- a/libavformat/cavsvideodec.c
+++ b/libavformat/cavsvideodec.c
@@ -65,4 +65,4 @@ static int cavsvideo_probe(AVProbeData *p)
return 0;
}
-FF_DEF_RAWVIDEO_DEMUXER(cavsvideo, "raw Chinese AVS (Audio Video Standard)", cavsvideo_probe, NULL, CODEC_ID_CAVS)
+FF_DEF_RAWVIDEO_DEMUXER(cavsvideo, "raw Chinese AVS (Audio Video Standard)", cavsvideo_probe, NULL, AV_CODEC_ID_CAVS)
diff --git a/libavformat/cdg.c b/libavformat/cdg.c
index 256fc21873..2d40d3dc55 100644
--- a/libavformat/cdg.c
+++ b/libavformat/cdg.c
@@ -36,7 +36,7 @@ static int read_header(AVFormatContext *s)
return AVERROR(ENOMEM);
vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- vst->codec->codec_id = CODEC_ID_CDGRAPHICS;
+ vst->codec->codec_id = AV_CODEC_ID_CDGRAPHICS;
/// 75 sectors/sec * 4 packets/sector = 300 packets/sec
avpriv_set_pts_info(vst, 32, 1, 300);
diff --git a/libavformat/cdxl.c b/libavformat/cdxl.c
index 736ce3d634..21f63a5a8f 100644
--- a/libavformat/cdxl.c
+++ b/libavformat/cdxl.c
@@ -100,7 +100,7 @@ static int cdxl_read_packet(AVFormatContext *s, AVPacket *pkt)
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
st->codec->codec_tag = 0;
- st->codec->codec_id = CODEC_ID_PCM_S8;
+ st->codec->codec_id = AV_CODEC_ID_PCM_S8;
st->codec->channels = cdxl->header[1] & 0x10 ? 2 : 1;
st->codec->sample_rate = cdxl->sample_rate;
st->start_time = 0;
@@ -123,7 +123,7 @@ static int cdxl_read_packet(AVFormatContext *s, AVPacket *pkt)
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
st->codec->codec_tag = 0;
- st->codec->codec_id = CODEC_ID_CDXL;
+ st->codec->codec_id = AV_CODEC_ID_CDXL;
st->codec->width = width;
st->codec->height = height;
st->start_time = 0;
diff --git a/libavformat/crcenc.c b/libavformat/crcenc.c
index 210ef2c4dd..107e149eaa 100644
--- a/libavformat/crcenc.c
+++ b/libavformat/crcenc.c
@@ -58,8 +58,8 @@ AVOutputFormat ff_crc_muxer = {
.name = "crc",
.long_name = NULL_IF_CONFIG_SMALL("CRC testing"),
.priv_data_size = sizeof(CRCState),
- .audio_codec = CODEC_ID_PCM_S16LE,
- .video_codec = CODEC_ID_RAWVIDEO,
+ .audio_codec = AV_CODEC_ID_PCM_S16LE,
+ .video_codec = AV_CODEC_ID_RAWVIDEO,
.write_header = crc_write_header,
.write_packet = crc_write_packet,
.write_trailer = crc_write_trailer,
diff --git a/libavformat/daud.c b/libavformat/daud.c
index a25c0bff4c..bfbcf0a6b0 100644
--- a/libavformat/daud.c
+++ b/libavformat/daud.c
@@ -25,7 +25,7 @@ static int daud_header(AVFormatContext *s) {
if (!st)
return AVERROR(ENOMEM);
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- st->codec->codec_id = CODEC_ID_PCM_S24DAUD;
+ st->codec->codec_id = AV_CODEC_ID_PCM_S24DAUD;
st->codec->codec_tag = MKTAG('d', 'a', 'u', 'd');
st->codec->channels = 6;
st->codec->sample_rate = 96000;
@@ -84,8 +84,8 @@ AVOutputFormat ff_daud_muxer = {
.name = "daud",
.long_name = NULL_IF_CONFIG_SMALL("D-Cinema audio"),
.extensions = "302",
- .audio_codec = CODEC_ID_PCM_S24DAUD,
- .video_codec = CODEC_ID_NONE,
+ .audio_codec = AV_CODEC_ID_PCM_S24DAUD,
+ .video_codec = AV_CODEC_ID_NONE,
.write_header = daud_write_header,
.write_packet = daud_write_packet,
.flags = AVFMT_NOTIMESTAMPS,
diff --git a/libavformat/dfa.c b/libavformat/dfa.c
index fa342fa11f..8cf2f24fc8 100644
--- a/libavformat/dfa.c
+++ b/libavformat/dfa.c
@@ -50,7 +50,7 @@ static int dfa_read_header(AVFormatContext *s)
return AVERROR(ENOMEM);
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- st->codec->codec_id = CODEC_ID_DFA;
+ st->codec->codec_id = AV_CODEC_ID_DFA;
st->codec->width = avio_rl16(pb);
st->codec->height = avio_rl16(pb);
mspf = avio_rl32(pb);
diff --git a/libavformat/diracdec.c b/libavformat/diracdec.c
index 6afda533dc..6636ead30d 100644
--- a/libavformat/diracdec.c
+++ b/libavformat/diracdec.c
@@ -31,4 +31,4 @@ static int dirac_probe(AVProbeData *p)
return 0;
}
-FF_DEF_RAWVIDEO_DEMUXER(dirac, "raw Dirac", dirac_probe, NULL, CODEC_ID_DIRAC)
+FF_DEF_RAWVIDEO_DEMUXER(dirac, "raw Dirac", dirac_probe, NULL, AV_CODEC_ID_DIRAC)
diff --git a/libavformat/dnxhddec.c b/libavformat/dnxhddec.c
index f89782a880..e5c438197f 100644
--- a/libavformat/dnxhddec.c
+++ b/libavformat/dnxhddec.c
@@ -42,4 +42,4 @@ static int dnxhd_probe(AVProbeData *p)
return AVPROBE_SCORE_MAX;
}
-FF_DEF_RAWVIDEO_DEMUXER(dnxhd, "raw DNxHD (SMPTE VC-3)", dnxhd_probe, NULL, CODEC_ID_DNXHD)
+FF_DEF_RAWVIDEO_DEMUXER(dnxhd, "raw DNxHD (SMPTE VC-3)", dnxhd_probe, NULL, AV_CODEC_ID_DNXHD)
diff --git a/libavformat/dsicin.c b/libavformat/dsicin.c
index 5a97e75971..afc010a16f 100644
--- a/libavformat/dsicin.c
+++ b/libavformat/dsicin.c
@@ -116,7 +116,7 @@ static int cin_read_header(AVFormatContext *s)
avpriv_set_pts_info(st, 32, 1, 12);
cin->video_stream_index = st->index;
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- st->codec->codec_id = CODEC_ID_DSICINVIDEO;
+ st->codec->codec_id = AV_CODEC_ID_DSICINVIDEO;
st->codec->codec_tag = 0; /* no fourcc */
st->codec->width = hdr->video_frame_width;
st->codec->height = hdr->video_frame_height;
@@ -129,7 +129,7 @@ static int cin_read_header(AVFormatContext *s)
avpriv_set_pts_info(st, 32, 1, 22050);
cin->audio_stream_index = st->index;
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- st->codec->codec_id = CODEC_ID_DSICINAUDIO;
+ st->codec->codec_id = AV_CODEC_ID_DSICINAUDIO;
st->codec->codec_tag = 0; /* no tag */
st->codec->channels = 1;
st->codec->sample_rate = 22050;
diff --git a/libavformat/dtsdec.c b/libavformat/dtsdec.c
index 7f4173e0f3..5c05758327 100644
--- a/libavformat/dtsdec.c
+++ b/libavformat/dtsdec.c
@@ -73,5 +73,5 @@ AVInputFormat ff_dts_demuxer = {
.read_packet = ff_raw_read_partial_packet,
.flags = AVFMT_GENERIC_INDEX,
.extensions = "dts",
- .raw_codec_id = CODEC_ID_DTS,
+ .raw_codec_id = AV_CODEC_ID_DTS,
};
diff --git a/libavformat/dv.c b/libavformat/dv.c
index 7ea2d53b92..fff55ab255 100644
--- a/libavformat/dv.c
+++ b/libavformat/dv.c
@@ -242,7 +242,7 @@ static int dv_extract_audio_info(DVDemuxContext* c, uint8_t* frame)
break;
avpriv_set_pts_info(c->ast[i], 64, 1, 30000);
c->ast[i]->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- c->ast[i]->codec->codec_id = CODEC_ID_PCM_S16LE;
+ c->ast[i]->codec->codec_id = AV_CODEC_ID_PCM_S16LE;
av_init_packet(&c->audio_pkt[i]);
c->audio_pkt[i].size = 0;
@@ -323,7 +323,7 @@ DVDemuxContext* avpriv_dv_init_demux(AVFormatContext *s)
c->fctx = s;
c->vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- c->vst->codec->codec_id = CODEC_ID_DVVIDEO;
+ c->vst->codec->codec_id = AV_CODEC_ID_DVVIDEO;
c->vst->codec->bit_rate = 25000000;
c->vst->start_time = 0;
diff --git a/libavformat/dvenc.c b/libavformat/dvenc.c
index 880caeab72..518ae70ccc 100644
--- a/libavformat/dvenc.c
+++ b/libavformat/dvenc.c
@@ -304,10 +304,10 @@ static DVMuxContext* dv_init_mux(AVFormatContext* s)
}
/* Some checks -- DV format is very picky about its incoming streams */
- if (!vst || vst->codec->codec_id != CODEC_ID_DVVIDEO)
+ if (!vst || vst->codec->codec_id != AV_CODEC_ID_DVVIDEO)
goto bail_out;
for (i=0; i<c->n_ast; i++) {
- if (c->ast[i] && (c->ast[i]->codec->codec_id != CODEC_ID_PCM_S16LE ||
+ if (c->ast[i] && (c->ast[i]->codec->codec_id != AV_CODEC_ID_PCM_S16LE ||
c->ast[i]->codec->sample_rate != 48000 ||
c->ast[i]->codec->channels != 2))
goto bail_out;
@@ -410,8 +410,8 @@ AVOutputFormat ff_dv_muxer = {
.long_name = NULL_IF_CONFIG_SMALL("DV (Digital Video)"),
.extensions = "dv",
.priv_data_size = sizeof(DVMuxContext),
- .audio_codec = CODEC_ID_PCM_S16LE,
- .video_codec = CODEC_ID_DVVIDEO,
+ .audio_codec = AV_CODEC_ID_PCM_S16LE,
+ .video_codec = AV_CODEC_ID_DVVIDEO,
.write_header = dv_write_header,
.write_packet = dv_write_packet,
.write_trailer = dv_write_trailer,
diff --git a/libavformat/dxa.c b/libavformat/dxa.c
index 3d85193279..30d1e02068 100644
--- a/libavformat/dxa.c
+++ b/libavformat/dxa.c
@@ -126,7 +126,7 @@ static int dxa_read_header(AVFormatContext *s)
/* now we are ready: build format streams */
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- st->codec->codec_id = CODEC_ID_DXA;
+ st->codec->codec_id = AV_CODEC_ID_DXA;
st->codec->width = w;
st->codec->height = h;
av_reduce(&den, &num, den, num, (1UL<<31)-1);
diff --git a/libavformat/eacdata.c b/libavformat/eacdata.c
index 313cbe2aec..be31d007e0 100644
--- a/libavformat/eacdata.c
+++ b/libavformat/eacdata.c
@@ -72,7 +72,7 @@ static int cdata_read_header(AVFormatContext *s)
return AVERROR(ENOMEM);
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
st->codec->codec_tag = 0; /* no fourcc */
- st->codec->codec_id = CODEC_ID_ADPCM_EA_XAS;
+ st->codec->codec_id = AV_CODEC_ID_ADPCM_EA_XAS;
st->codec->channels = cdata->channels;
st->codec->channel_layout = channel_layout;
st->codec->sample_rate = sample_rate;
diff --git a/libavformat/electronicarts.c b/libavformat/electronicarts.c
index 3d51c70a64..c5533f2674 100644
--- a/libavformat/electronicarts.c
+++ b/libavformat/electronicarts.c
@@ -63,13 +63,13 @@
typedef struct EaDemuxContext {
int big_endian;
- enum CodecID video_codec;
+ enum AVCodecID video_codec;
AVRational time_base;
int width, height;
int nb_frames;
int video_stream_index;
- enum CodecID audio_codec;
+ enum AVCodecID audio_codec;
int audio_stream_index;
int bytes;
@@ -175,25 +175,25 @@ static int process_audio_header_elements(AVFormatContext *s)
}
switch (compression_type) {
- case 0: ea->audio_codec = CODEC_ID_PCM_S16LE; break;
- case 7: ea->audio_codec = CODEC_ID_ADPCM_EA; break;
+ case 0: ea->audio_codec = AV_CODEC_ID_PCM_S16LE; break;
+ case 7: ea->audio_codec = AV_CODEC_ID_ADPCM_EA; break;
case -1:
switch (revision) {
- case 1: ea->audio_codec = CODEC_ID_ADPCM_EA_R1; break;
- case 2: ea->audio_codec = CODEC_ID_ADPCM_EA_R2; break;
- case 3: ea->audio_codec = CODEC_ID_ADPCM_EA_R3; break;
+ case 1: ea->audio_codec = AV_CODEC_ID_ADPCM_EA_R1; break;
+ case 2: ea->audio_codec = AV_CODEC_ID_ADPCM_EA_R2; break;
+ case 3: ea->audio_codec = AV_CODEC_ID_ADPCM_EA_R3; break;
case -1: break;
default:
av_log(s, AV_LOG_ERROR, "unsupported stream type; revision=%i\n", revision);
return 0;
}
switch (revision2) {
- case 8: ea->audio_codec = CODEC_ID_PCM_S16LE_PLANAR; break;
- case 10: ea->audio_codec = CODEC_ID_ADPCM_EA_R2; break;
- case 16: ea->audio_codec = CODEC_ID_MP3; break;
+ case 8: ea->audio_codec = AV_CODEC_ID_PCM_S16LE_PLANAR; break;
+ case 10: ea->audio_codec = AV_CODEC_ID_ADPCM_EA_R2; break;
+ case 16: ea->audio_codec = AV_CODEC_ID_MP3; break;
case -1: break;
default:
- ea->audio_codec = CODEC_ID_NONE;
+ ea->audio_codec = AV_CODEC_ID_NONE;
av_log(s, AV_LOG_ERROR, "unsupported stream type; revision2=%i\n", revision2);
return 0;
}
@@ -228,12 +228,12 @@ static int process_audio_header_eacs(AVFormatContext *s)
switch (compression_type) {
case 0:
switch (ea->bytes) {
- case 1: ea->audio_codec = CODEC_ID_PCM_S8; break;
- case 2: ea->audio_codec = CODEC_ID_PCM_S16LE; break;
+ case 1: ea->audio_codec = AV_CODEC_ID_PCM_S8; break;
+ case 2: ea->audio_codec = AV_CODEC_ID_PCM_S16LE; break;
}
break;
- case 1: ea->audio_codec = CODEC_ID_PCM_MULAW; ea->bytes = 1; break;
- case 2: ea->audio_codec = CODEC_ID_ADPCM_IMA_EA_EACS; break;
+ case 1: ea->audio_codec = AV_CODEC_ID_PCM_MULAW; ea->bytes = 1; break;
+ case 2: ea->audio_codec = AV_CODEC_ID_ADPCM_IMA_EA_EACS; break;
default:
av_log (s, AV_LOG_ERROR, "unsupported stream type; audio compression_type=%i\n", compression_type);
}
@@ -253,7 +253,7 @@ static int process_audio_header_sead(AVFormatContext *s)
ea->sample_rate = avio_rl32(pb);
ea->bytes = avio_rl32(pb); /* 1=8-bit, 2=16-bit */
ea->num_channels = avio_rl32(pb);
- ea->audio_codec = CODEC_ID_ADPCM_IMA_EA_SEAD;
+ ea->audio_codec = AV_CODEC_ID_ADPCM_IMA_EA_SEAD;
return 1;
}
@@ -266,7 +266,7 @@ static int process_video_header_mdec(AVFormatContext *s)
ea->width = avio_rl16(pb);
ea->height = avio_rl16(pb);
ea->time_base = (AVRational){1,15};
- ea->video_codec = CODEC_ID_MDEC;
+ ea->video_codec = AV_CODEC_ID_MDEC;
return 1;
}
@@ -280,7 +280,7 @@ static int process_video_header_vp6(AVFormatContext *s)
avio_skip(pb, 4);
ea->time_base.den = avio_rl32(pb);
ea->time_base.num = avio_rl32(pb);
- ea->video_codec = CODEC_ID_VP6;
+ ea->video_codec = AV_CODEC_ID_VP6;
return 1;
}
@@ -294,7 +294,7 @@ static int process_video_header_cmv(AVFormatContext *s)
fps = avio_rl16(s->pb);
if (fps)
ea->time_base = (AVRational){1, fps};
- ea->video_codec = CODEC_ID_CMV;
+ ea->video_codec = AV_CODEC_ID_CMV;
return 0;
}
@@ -350,7 +350,7 @@ static int process_ea_header(AVFormatContext *s) {
break;
case kVGT_TAG:
- ea->video_codec = CODEC_ID_TGV;
+ ea->video_codec = AV_CODEC_ID_TGV;
break;
case mTCD_TAG :
@@ -358,20 +358,20 @@ static int process_ea_header(AVFormatContext *s) {
break;
case MPCh_TAG:
- ea->video_codec = CODEC_ID_MPEG2VIDEO;
+ ea->video_codec = AV_CODEC_ID_MPEG2VIDEO;
break;
case pQGT_TAG:
case TGQs_TAG:
- ea->video_codec = CODEC_ID_TGQ;
+ ea->video_codec = AV_CODEC_ID_TGQ;
break;
case pIQT_TAG:
- ea->video_codec = CODEC_ID_TQI;
+ ea->video_codec = AV_CODEC_ID_TQI;
break;
case MADk_TAG :
- ea->video_codec = CODEC_ID_MAD;
+ ea->video_codec = AV_CODEC_ID_MAD;
break;
case MVhd_TAG :
@@ -431,7 +431,7 @@ static int ea_read_header(AVFormatContext *s)
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
st->codec->codec_id = ea->video_codec;
// parsing is necessary to make FFmpeg generate correct timestamps
- if (st->codec->codec_id == CODEC_ID_MPEG2VIDEO)
+ if (st->codec->codec_id == AV_CODEC_ID_MPEG2VIDEO)
st->need_parsing = AVSTREAM_PARSE_HEADERS;
st->codec->codec_tag = 0; /* no fourcc */
st->codec->width = ea->width;
@@ -456,7 +456,7 @@ static int ea_read_header(AVFormatContext *s)
}
if (ea->bytes <= 0) {
av_log(s, AV_LOG_ERROR, "Invalid number of bytes per sample: %d\n", ea->bytes);
- ea->audio_codec = CODEC_ID_NONE;
+ ea->audio_codec = AV_CODEC_ID_NONE;
return 1;
}
@@ -515,8 +515,8 @@ static int ea_read_packet(AVFormatContext *s,
if (!ea->audio_codec) {
avio_skip(pb, chunk_size);
break;
- } else if (ea->audio_codec == CODEC_ID_PCM_S16LE_PLANAR ||
- ea->audio_codec == CODEC_ID_MP3) {
+ } else if (ea->audio_codec == AV_CODEC_ID_PCM_S16LE_PLANAR ||
+ ea->audio_codec == AV_CODEC_ID_MP3) {
num_samples = avio_rl32(pb);
avio_skip(pb, 8);
chunk_size -= 12;
@@ -532,20 +532,20 @@ static int ea_read_packet(AVFormatContext *s,
pkt->stream_index = ea->audio_stream_index;
switch (ea->audio_codec) {
- case CODEC_ID_ADPCM_EA:
- case CODEC_ID_ADPCM_EA_R1:
- case CODEC_ID_ADPCM_EA_R2:
- case CODEC_ID_ADPCM_IMA_EA_EACS:
+ case AV_CODEC_ID_ADPCM_EA:
+ case AV_CODEC_ID_ADPCM_EA_R1:
+ case AV_CODEC_ID_ADPCM_EA_R2:
+ case AV_CODEC_ID_ADPCM_IMA_EA_EACS:
pkt->duration = AV_RL32(pkt->data);
break;
- case CODEC_ID_ADPCM_EA_R3:
+ case AV_CODEC_ID_ADPCM_EA_R3:
pkt->duration = AV_RB32(pkt->data);
break;
- case CODEC_ID_ADPCM_IMA_EA_SEAD:
+ case AV_CODEC_ID_ADPCM_IMA_EA_SEAD:
pkt->duration = ret * 2 / ea->num_channels;
break;
- case CODEC_ID_PCM_S16LE_PLANAR:
- case CODEC_ID_MP3:
+ case AV_CODEC_ID_PCM_S16LE_PLANAR:
+ case AV_CODEC_ID_MP3:
pkt->duration = num_samples;
break;
default:
diff --git a/libavformat/ffmenc.c b/libavformat/ffmenc.c
index a8d038ac68..ca252dee08 100644
--- a/libavformat/ffmenc.c
+++ b/libavformat/ffmenc.c
@@ -243,8 +243,8 @@ AVOutputFormat ff_ffm_muxer = {
.long_name = NULL_IF_CONFIG_SMALL("FFM (FFserver live feed)"),
.extensions = "ffm",
.priv_data_size = sizeof(FFMContext),
- .audio_codec = CODEC_ID_MP2,
- .video_codec = CODEC_ID_MPEG1VIDEO,
+ .audio_codec = AV_CODEC_ID_MP2,
+ .video_codec = AV_CODEC_ID_MPEG1VIDEO,
.write_header = ffm_write_header,
.write_packet = ffm_write_packet,
.write_trailer = ffm_write_trailer,
diff --git a/libavformat/ffmetadec.c b/libavformat/ffmetadec.c
index 5a4bc82c99..4bdc98a3d4 100644
--- a/libavformat/ffmetadec.c
+++ b/libavformat/ffmetadec.c
@@ -138,7 +138,7 @@ static int read_header(AVFormatContext *s)
return -1;
st->codec->codec_type = AVMEDIA_TYPE_DATA;
- st->codec->codec_id = CODEC_ID_FFMETADATA;
+ st->codec->codec_id = AV_CODEC_ID_FFMETADATA;
m = &st->metadata;
} else if (!memcmp(line, ID_CHAPTER, strlen(ID_CHAPTER))) {
diff --git a/libavformat/filmstripdec.c b/libavformat/filmstripdec.c
index 20ab4a70fb..2f3aa6c6d1 100644
--- a/libavformat/filmstripdec.c
+++ b/libavformat/filmstripdec.c
@@ -61,7 +61,7 @@ static int read_header(AVFormatContext *s)
avio_skip(pb, 2);
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- st->codec->codec_id = CODEC_ID_RAWVIDEO;
+ st->codec->codec_id = AV_CODEC_ID_RAWVIDEO;
st->codec->pix_fmt = PIX_FMT_RGBA;
st->codec->codec_tag = 0; /* no fourcc */
st->codec->width = avio_rb16(pb);
diff --git a/libavformat/filmstripenc.c b/libavformat/filmstripenc.c
index 3862cb1dba..3e35ef64f5 100644
--- a/libavformat/filmstripenc.c
+++ b/libavformat/filmstripenc.c
@@ -76,8 +76,8 @@ AVOutputFormat ff_filmstrip_muxer = {
.long_name = NULL_IF_CONFIG_SMALL("Adobe Filmstrip"),
.extensions = "flm",
.priv_data_size = sizeof(FilmstripMuxContext),
- .audio_codec = CODEC_ID_NONE,
- .video_codec = CODEC_ID_RAWVIDEO,
+ .audio_codec = AV_CODEC_ID_NONE,
+ .video_codec = AV_CODEC_ID_RAWVIDEO,
.write_header = write_header,
.write_packet = write_packet,
.write_trailer = write_trailer,
diff --git a/libavformat/flacdec.c b/libavformat/flacdec.c
index 475acd934a..bbb28f435a 100644
--- a/libavformat/flacdec.c
+++ b/libavformat/flacdec.c
@@ -33,7 +33,7 @@
static int parse_picture(AVFormatContext *s, uint8_t *buf, int buf_size)
{
const CodecMime *mime = ff_id3v2_mime_tags;
- enum CodecID id = CODEC_ID_NONE;
+ enum AVCodecID id = AV_CODEC_ID_NONE;
uint8_t mimetype[64], *desc = NULL, *data = NULL;
AVIOContext *pb = NULL;
AVStream *st;
@@ -66,14 +66,14 @@ static int parse_picture(AVFormatContext *s, uint8_t *buf, int buf_size)
}
mimetype[len] = 0;
- while (mime->id != CODEC_ID_NONE) {
+ while (mime->id != AV_CODEC_ID_NONE) {
if (!strncmp(mime->str, mimetype, sizeof(mimetype))) {
id = mime->id;
break;
}
mime++;
}
- if (id == CODEC_ID_NONE) {
+ if (id == AV_CODEC_ID_NONE) {
av_log(s, AV_LOG_ERROR, "Unknown attached picture mimetype: %s.\n",
mimetype);
if (s->error_recognition & AV_EF_EXPLODE)
@@ -162,7 +162,7 @@ static int flac_read_header(AVFormatContext *s)
if (!st)
return AVERROR(ENOMEM);
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- st->codec->codec_id = CODEC_ID_FLAC;
+ st->codec->codec_id = AV_CODEC_ID_FLAC;
st->need_parsing = AVSTREAM_PARSE_FULL_RAW;
/* the parameters will be extracted from the compressed bitstream */
@@ -292,5 +292,5 @@ AVInputFormat ff_flac_demuxer = {
.read_packet = ff_raw_read_partial_packet,
.flags = AVFMT_GENERIC_INDEX,
.extensions = "flac",
- .raw_codec_id = CODEC_ID_FLAC,
+ .raw_codec_id = AV_CODEC_ID_FLAC,
};
diff --git a/libavformat/flacenc.c b/libavformat/flacenc.c
index ee66e98f3a..8c270eeb14 100644
--- a/libavformat/flacenc.c
+++ b/libavformat/flacenc.c
@@ -122,8 +122,8 @@ AVOutputFormat ff_flac_muxer = {
.long_name = NULL_IF_CONFIG_SMALL("raw FLAC"),
.mime_type = "audio/x-flac",
.extensions = "flac",
- .audio_codec = CODEC_ID_FLAC,
- .video_codec = CODEC_ID_NONE,
+ .audio_codec = AV_CODEC_ID_FLAC,
+ .video_codec = AV_CODEC_ID_NONE,
.write_header = flac_write_header,
.write_packet = flac_write_packet,
.write_trailer = flac_write_trailer,
diff --git a/libavformat/flic.c b/libavformat/flic.c
index 85c5564f5e..f6aa3b0e2e 100644
--- a/libavformat/flic.c
+++ b/libavformat/flic.c
@@ -110,7 +110,7 @@ static int flic_read_header(AVFormatContext *s)
return AVERROR(ENOMEM);
flic->video_stream_index = st->index;
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- st->codec->codec_id = CODEC_ID_FLIC;
+ st->codec->codec_id = AV_CODEC_ID_FLIC;
st->codec->codec_tag = 0; /* no fourcc */
st->codec->width = AV_RL16(&header[0x08]);
st->codec->height = AV_RL16(&header[0x0A]);
@@ -154,7 +154,7 @@ static int flic_read_header(AVFormatContext *s)
/* all audio frames are the same size, so use the size of the first chunk for block_align */
ast->codec->block_align = AV_RL32(&preamble[0]);
ast->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- ast->codec->codec_id = CODEC_ID_PCM_U8;
+ ast->codec->codec_id = AV_CODEC_ID_PCM_U8;
ast->codec->codec_tag = 0;
ast->codec->sample_rate = FLIC_TFTD_SAMPLE_RATE;
ast->codec->channels = 1;
diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index 2c342bbddb..bf1ff98fde 100644
--- a/libavformat/flvdec.c
+++ b/libavformat/flvdec.c
@@ -95,34 +95,34 @@ static int flv_same_audio_codec(AVCodecContext *acodec, int flags)
switch(flv_codecid) {
//no distinction between S16 and S8 PCM codec flags
case FLV_CODECID_PCM:
- codec_id = bits_per_coded_sample == 8 ? CODEC_ID_PCM_U8 :
+ codec_id = bits_per_coded_sample == 8 ? AV_CODEC_ID_PCM_U8 :
#if HAVE_BIGENDIAN
- CODEC_ID_PCM_S16BE;
+ AV_CODEC_ID_PCM_S16BE;
#else
- CODEC_ID_PCM_S16LE;
+ AV_CODEC_ID_PCM_S16LE;
#endif
return codec_id == acodec->codec_id;
case FLV_CODECID_PCM_LE:
- codec_id = bits_per_coded_sample == 8 ? CODEC_ID_PCM_U8 : CODEC_ID_PCM_S16LE;
+ codec_id = bits_per_coded_sample == 8 ? AV_CODEC_ID_PCM_U8 : AV_CODEC_ID_PCM_S16LE;
return codec_id == acodec->codec_id;
case FLV_CODECID_AAC:
- return acodec->codec_id == CODEC_ID_AAC;
+ return acodec->codec_id == AV_CODEC_ID_AAC;
case FLV_CODECID_ADPCM:
- return acodec->codec_id == CODEC_ID_ADPCM_SWF;
+ return acodec->codec_id == AV_CODEC_ID_ADPCM_SWF;
case FLV_CODECID_SPEEX:
- return acodec->codec_id == CODEC_ID_SPEEX;
+ return acodec->codec_id == AV_CODEC_ID_SPEEX;
case FLV_CODECID_MP3:
- return acodec->codec_id == CODEC_ID_MP3;
+ return acodec->codec_id == AV_CODEC_ID_MP3;
case FLV_CODECID_NELLYMOSER_8KHZ_MONO:
case FLV_CODECID_NELLYMOSER_16KHZ_MONO:
case FLV_CODECID_NELLYMOSER:
- return acodec->codec_id == CODEC_ID_NELLYMOSER;
+ return acodec->codec_id == AV_CODEC_ID_NELLYMOSER;
case FLV_CODECID_PCM_MULAW:
return acodec->sample_rate == 8000 &&
- acodec->codec_id == CODEC_ID_PCM_MULAW;
+ acodec->codec_id == AV_CODEC_ID_PCM_MULAW;
case FLV_CODECID_PCM_ALAW:
return acodec->sample_rate = 8000 &&
- acodec->codec_id == CODEC_ID_PCM_ALAW;
+ acodec->codec_id == AV_CODEC_ID_PCM_ALAW;
default:
return acodec->codec_tag == (flv_codecid >> FLV_AUDIO_CODECID_OFFSET);
}
@@ -134,40 +134,40 @@ static void flv_set_audio_codec(AVFormatContext *s, AVStream *astream, AVCodecCo
switch(flv_codecid) {
//no distinction between S16 and S8 PCM codec flags
case FLV_CODECID_PCM:
- acodec->codec_id = acodec->bits_per_coded_sample == 8 ? CODEC_ID_PCM_U8 :
+ acodec->codec_id = acodec->bits_per_coded_sample == 8 ? AV_CODEC_ID_PCM_U8 :
#if HAVE_BIGENDIAN
- CODEC_ID_PCM_S16BE;
+ AV_CODEC_ID_PCM_S16BE;
#else
- CODEC_ID_PCM_S16LE;
+ AV_CODEC_ID_PCM_S16LE;
#endif
break;
case FLV_CODECID_PCM_LE:
- acodec->codec_id = acodec->bits_per_coded_sample == 8 ? CODEC_ID_PCM_U8 : CODEC_ID_PCM_S16LE; break;
- case FLV_CODECID_AAC : acodec->codec_id = CODEC_ID_AAC; break;
- case FLV_CODECID_ADPCM: acodec->codec_id = CODEC_ID_ADPCM_SWF; break;
+ acodec->codec_id = acodec->bits_per_coded_sample == 8 ? AV_CODEC_ID_PCM_U8 : AV_CODEC_ID_PCM_S16LE; break;
+ case FLV_CODECID_AAC : acodec->codec_id = AV_CODEC_ID_AAC; break;
+ case FLV_CODECID_ADPCM: acodec->codec_id = AV_CODEC_ID_ADPCM_SWF; break;
case FLV_CODECID_SPEEX:
- acodec->codec_id = CODEC_ID_SPEEX;
+ acodec->codec_id = AV_CODEC_ID_SPEEX;
acodec->sample_rate = 16000;
break;
- case FLV_CODECID_MP3 : acodec->codec_id = CODEC_ID_MP3 ; astream->need_parsing = AVSTREAM_PARSE_FULL; break;
+ case FLV_CODECID_MP3 : acodec->codec_id = AV_CODEC_ID_MP3 ; astream->need_parsing = AVSTREAM_PARSE_FULL; break;
case FLV_CODECID_NELLYMOSER_8KHZ_MONO:
acodec->sample_rate = 8000; //in case metadata does not otherwise declare samplerate
- acodec->codec_id = CODEC_ID_NELLYMOSER;
+ acodec->codec_id = AV_CODEC_ID_NELLYMOSER;
break;
case FLV_CODECID_NELLYMOSER_16KHZ_MONO:
acodec->sample_rate = 16000;
- acodec->codec_id = CODEC_ID_NELLYMOSER;
+ acodec->codec_id = AV_CODEC_ID_NELLYMOSER;
break;
case FLV_CODECID_NELLYMOSER:
- acodec->codec_id = CODEC_ID_NELLYMOSER;
+ acodec->codec_id = AV_CODEC_ID_NELLYMOSER;
break;
case FLV_CODECID_PCM_MULAW:
acodec->sample_rate = 8000;
- acodec->codec_id = CODEC_ID_PCM_MULAW;
+ acodec->codec_id = AV_CODEC_ID_PCM_MULAW;
break;
case FLV_CODECID_PCM_ALAW:
acodec->sample_rate = 8000;
- acodec->codec_id = CODEC_ID_PCM_ALAW;
+ acodec->codec_id = AV_CODEC_ID_PCM_ALAW;
break;
default:
av_log(s, AV_LOG_INFO, "Unsupported audio codec (%x)\n", flv_codecid >> FLV_AUDIO_CODECID_OFFSET);
@@ -184,17 +184,17 @@ static int flv_same_video_codec(AVCodecContext *vcodec, int flags)
switch (flv_codecid) {
case FLV_CODECID_H263:
- return vcodec->codec_id == CODEC_ID_FLV1;
+ return vcodec->codec_id == AV_CODEC_ID_FLV1;
case FLV_CODECID_SCREEN:
- return vcodec->codec_id == CODEC_ID_FLASHSV;
+ return vcodec->codec_id == AV_CODEC_ID_FLASHSV;
case FLV_CODECID_SCREEN2:
- return vcodec->codec_id == CODEC_ID_FLASHSV2;
+ return vcodec->codec_id == AV_CODEC_ID_FLASHSV2;
case FLV_CODECID_VP6:
- return vcodec->codec_id == CODEC_ID_VP6F;
+ return vcodec->codec_id == AV_CODEC_ID_VP6F;
case FLV_CODECID_VP6A:
- return vcodec->codec_id == CODEC_ID_VP6A;
+ return vcodec->codec_id == AV_CODEC_ID_VP6A;
case FLV_CODECID_H264:
- return vcodec->codec_id == CODEC_ID_H264;
+ return vcodec->codec_id == AV_CODEC_ID_H264;
default:
return vcodec->codec_tag == flv_codecid;
}
@@ -205,14 +205,14 @@ static int flv_same_video_codec(AVCodecContext *vcodec, int flags)
static int flv_set_video_codec(AVFormatContext *s, AVStream *vstream, int flv_codecid) {
AVCodecContext *vcodec = vstream->codec;
switch(flv_codecid) {
- case FLV_CODECID_H263 : vcodec->codec_id = CODEC_ID_FLV1 ; break;
- case FLV_CODECID_REALH263: vcodec->codec_id = CODEC_ID_H263 ; break; // Really mean it this time
- case FLV_CODECID_SCREEN: vcodec->codec_id = CODEC_ID_FLASHSV; break;
- case FLV_CODECID_SCREEN2: vcodec->codec_id = CODEC_ID_FLASHSV2; break;
- case FLV_CODECID_VP6 : vcodec->codec_id = CODEC_ID_VP6F ;
+ case FLV_CODECID_H263 : vcodec->codec_id = AV_CODEC_ID_FLV1 ; break;
+ case FLV_CODECID_REALH263: vcodec->codec_id = AV_CODEC_ID_H263 ; break; // Really mean it this time
+ case FLV_CODECID_SCREEN: vcodec->codec_id = AV_CODEC_ID_FLASHSV; break;
+ case FLV_CODECID_SCREEN2: vcodec->codec_id = AV_CODEC_ID_FLASHSV2; break;
+ case FLV_CODECID_VP6 : vcodec->codec_id = AV_CODEC_ID_VP6F ;
case FLV_CODECID_VP6A :
if(flv_codecid == FLV_CODECID_VP6A)
- vcodec->codec_id = CODEC_ID_VP6A;
+ vcodec->codec_id = AV_CODEC_ID_VP6A;
if(vcodec->extradata_size != 1) {
vcodec->extradata_size = 1;
vcodec->extradata = av_malloc(1 + FF_INPUT_BUFFER_PADDING_SIZE);
@@ -220,10 +220,10 @@ static int flv_set_video_codec(AVFormatContext *s, AVStream *vstream, int flv_co
vcodec->extradata[0] = avio_r8(s->pb);
return 1; // 1 byte body size adjustment for flv_read_packet()
case FLV_CODECID_H264:
- vcodec->codec_id = CODEC_ID_H264;
+ vcodec->codec_id = AV_CODEC_ID_H264;
return 3; // not 4, reading packet type will consume one byte
case FLV_CODECID_MPEG4:
- vcodec->codec_id = CODEC_ID_MPEG4;
+ vcodec->codec_id = AV_CODEC_ID_MPEG4;
return 3;
default:
av_log(s, AV_LOG_INFO, "Unsupported video codec (%x)\n", flv_codecid);
@@ -406,7 +406,7 @@ static int amf_parse_object(AVFormatContext *s, AVStream *astream, AVStream *vst
AVStream *st = create_stream(s, AVMEDIA_TYPE_DATA);
if (!st)
return AVERROR(ENOMEM);
- st->codec->codec_id = CODEC_ID_TEXT;
+ st->codec->codec_id = AV_CODEC_ID_TEXT;
} else if (flv->trust_metadata) {
if (!strcmp(key, "videocodecid") && vcodec) {
flv_set_video_codec(s, vstream, num_val);
@@ -621,7 +621,7 @@ static int flv_data_packet(AVFormatContext *s, AVPacket *pkt,
st = create_stream(s, AVMEDIA_TYPE_DATA);
if (!st)
goto out;
- st->codec->codec_id = CODEC_ID_TEXT;
+ st->codec->codec_id = AV_CODEC_ID_TEXT;
}
pkt->dts = dts;
@@ -792,12 +792,12 @@ retry_duration:
size -= flv_set_video_codec(s, st, flags & FLV_VIDEO_CODECID_MASK);
}
- if (st->codec->codec_id == CODEC_ID_AAC ||
- st->codec->codec_id == CODEC_ID_H264 ||
- st->codec->codec_id == CODEC_ID_MPEG4) {
+ if (st->codec->codec_id == AV_CODEC_ID_AAC ||
+ st->codec->codec_id == AV_CODEC_ID_H264 ||
+ st->codec->codec_id == AV_CODEC_ID_MPEG4) {
int type = avio_r8(s->pb);
size--;
- if (st->codec->codec_id == CODEC_ID_H264 || st->codec->codec_id == CODEC_ID_MPEG4) {
+ if (st->codec->codec_id == AV_CODEC_ID_H264 || st->codec->codec_id == AV_CODEC_ID_MPEG4) {
int32_t cts = (avio_rb24(s->pb)+0xff800000)^0xff800000; // sign extension
pts = dts + cts;
if (cts < 0) { // dts are wrong
@@ -807,7 +807,7 @@ retry_duration:
if (flv->wrong_dts)
dts = AV_NOPTS_VALUE;
}
- if (type == 0 && (!st->codec->extradata || st->codec->codec_id == CODEC_ID_AAC)) {
+ if (type == 0 && (!st->codec->extradata || st->codec->codec_id == AV_CODEC_ID_AAC)) {
if (st->codec->extradata) {
if ((ret = flv_queue_extradata(flv, s->pb, stream_type, size)) < 0)
return ret;
@@ -816,7 +816,7 @@ retry_duration:
}
if ((ret = flv_get_extradata(s, st, size)) < 0)
return ret;
- if (st->codec->codec_id == CODEC_ID_AAC) {
+ if (st->codec->codec_id == AV_CODEC_ID_AAC) {
MPEG4AudioConfig cfg;
if (avpriv_mpeg4audio_get_config(&cfg, st->codec->extradata,
st->codec->extradata_size * 8, 1) >= 0) {
diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c
index a4911b8265..3d331317ad 100644
--- a/libavformat/flvenc.c
+++ b/libavformat/flvenc.c
@@ -31,30 +31,30 @@
static const AVCodecTag flv_video_codec_ids[] = {
- { CODEC_ID_FLV1, FLV_CODECID_H263 },
- { CODEC_ID_H263, FLV_CODECID_REALH263 },
- { CODEC_ID_MPEG4, FLV_CODECID_MPEG4 },
- { CODEC_ID_FLASHSV, FLV_CODECID_SCREEN },
- { CODEC_ID_FLASHSV2, FLV_CODECID_SCREEN2 },
- { CODEC_ID_VP6F, FLV_CODECID_VP6 },
- { CODEC_ID_VP6, FLV_CODECID_VP6 },
- { CODEC_ID_VP6A, FLV_CODECID_VP6A },
- { CODEC_ID_H264, FLV_CODECID_H264 },
- { CODEC_ID_NONE, 0 }
+ { AV_CODEC_ID_FLV1, FLV_CODECID_H263 },
+ { AV_CODEC_ID_H263, FLV_CODECID_REALH263 },
+ { AV_CODEC_ID_MPEG4, FLV_CODECID_MPEG4 },
+ { AV_CODEC_ID_FLASHSV, FLV_CODECID_SCREEN },
+ { AV_CODEC_ID_FLASHSV2, FLV_CODECID_SCREEN2 },
+ { AV_CODEC_ID_VP6F, FLV_CODECID_VP6 },
+ { AV_CODEC_ID_VP6, FLV_CODECID_VP6 },
+ { AV_CODEC_ID_VP6A, FLV_CODECID_VP6A },
+ { AV_CODEC_ID_H264, FLV_CODECID_H264 },
+ { AV_CODEC_ID_NONE, 0 }
};
static const AVCodecTag flv_audio_codec_ids[] = {
- { CODEC_ID_MP3, FLV_CODECID_MP3 >> FLV_AUDIO_CODECID_OFFSET },
- { CODEC_ID_PCM_U8, FLV_CODECID_PCM >> FLV_AUDIO_CODECID_OFFSET },
- { CODEC_ID_PCM_S16BE, FLV_CODECID_PCM >> FLV_AUDIO_CODECID_OFFSET },
- { CODEC_ID_PCM_S16LE, FLV_CODECID_PCM_LE >> FLV_AUDIO_CODECID_OFFSET },
- { CODEC_ID_ADPCM_SWF, FLV_CODECID_ADPCM >> FLV_AUDIO_CODECID_OFFSET },
- { CODEC_ID_AAC, FLV_CODECID_AAC >> FLV_AUDIO_CODECID_OFFSET },
- { CODEC_ID_NELLYMOSER, FLV_CODECID_NELLYMOSER >> FLV_AUDIO_CODECID_OFFSET },
- { CODEC_ID_PCM_MULAW, FLV_CODECID_PCM_MULAW >> FLV_AUDIO_CODECID_OFFSET },
- { CODEC_ID_PCM_ALAW, FLV_CODECID_PCM_ALAW >> FLV_AUDIO_CODECID_OFFSET },
- { CODEC_ID_SPEEX, FLV_CODECID_SPEEX >> FLV_AUDIO_CODECID_OFFSET },
- { CODEC_ID_NONE, 0 }
+ { AV_CODEC_ID_MP3, FLV_CODECID_MP3 >> FLV_AUDIO_CODECID_OFFSET },
+ { AV_CODEC_ID_PCM_U8, FLV_CODECID_PCM >> FLV_AUDIO_CODECID_OFFSET },
+ { AV_CODEC_ID_PCM_S16BE, FLV_CODECID_PCM >> FLV_AUDIO_CODECID_OFFSET },
+ { AV_CODEC_ID_PCM_S16LE, FLV_CODECID_PCM_LE >> FLV_AUDIO_CODECID_OFFSET },
+ { AV_CODEC_ID_ADPCM_SWF, FLV_CODECID_ADPCM >> FLV_AUDIO_CODECID_OFFSET },
+ { AV_CODEC_ID_AAC, FLV_CODECID_AAC >> FLV_AUDIO_CODECID_OFFSET },
+ { AV_CODEC_ID_NELLYMOSER, FLV_CODECID_NELLYMOSER >> FLV_AUDIO_CODECID_OFFSET },
+ { AV_CODEC_ID_PCM_MULAW, FLV_CODECID_PCM_MULAW >> FLV_AUDIO_CODECID_OFFSET },
+ { AV_CODEC_ID_PCM_ALAW, FLV_CODECID_PCM_ALAW >> FLV_AUDIO_CODECID_OFFSET },
+ { AV_CODEC_ID_SPEEX, FLV_CODECID_SPEEX >> FLV_AUDIO_CODECID_OFFSET },
+ { AV_CODEC_ID_NONE, 0 }
};
typedef struct FLVContext {
@@ -74,10 +74,10 @@ static int get_audio_flags(AVFormatContext *s, AVCodecContext *enc)
int flags = (enc->bits_per_coded_sample == 16) ? FLV_SAMPLESSIZE_16BIT
: FLV_SAMPLESSIZE_8BIT;
- if (enc->codec_id == CODEC_ID_AAC) // specs force these parameters
+ if (enc->codec_id == AV_CODEC_ID_AAC) // specs force these parameters
return FLV_CODECID_AAC | FLV_SAMPLERATE_44100HZ |
FLV_SAMPLESSIZE_16BIT | FLV_STEREO;
- else if (enc->codec_id == CODEC_ID_SPEEX) {
+ else if (enc->codec_id == AV_CODEC_ID_SPEEX) {
if (enc->sample_rate != 16000) {
av_log(s, AV_LOG_ERROR,
"flv only supports wideband (16kHz) Speex audio\n");
@@ -102,7 +102,7 @@ static int get_audio_flags(AVFormatContext *s, AVCodecContext *enc)
case 16000: // nellymoser only
case 8000: // nellymoser only
case 5512: // not MP3
- if (enc->codec_id != CODEC_ID_MP3) {
+ if (enc->codec_id != AV_CODEC_ID_MP3) {
flags |= FLV_SAMPLERATE_SPECIAL;
break;
}
@@ -118,22 +118,22 @@ static int get_audio_flags(AVFormatContext *s, AVCodecContext *enc)
flags |= FLV_STEREO;
switch (enc->codec_id) {
- case CODEC_ID_MP3:
+ case AV_CODEC_ID_MP3:
flags |= FLV_CODECID_MP3 | FLV_SAMPLESSIZE_16BIT;
break;
- case CODEC_ID_PCM_U8:
+ case AV_CODEC_ID_PCM_U8:
flags |= FLV_CODECID_PCM | FLV_SAMPLESSIZE_8BIT;
break;
- case CODEC_ID_PCM_S16BE:
+ case AV_CODEC_ID_PCM_S16BE:
flags |= FLV_CODECID_PCM | FLV_SAMPLESSIZE_16BIT;
break;
- case CODEC_ID_PCM_S16LE:
+ case AV_CODEC_ID_PCM_S16LE:
flags |= FLV_CODECID_PCM_LE | FLV_SAMPLESSIZE_16BIT;
break;
- case CODEC_ID_ADPCM_SWF:
+ case AV_CODEC_ID_ADPCM_SWF:
flags |= FLV_CODECID_ADPCM | FLV_SAMPLESSIZE_16BIT;
break;
- case CODEC_ID_NELLYMOSER:
+ case AV_CODEC_ID_NELLYMOSER:
if (enc->sample_rate == 8000)
flags |= FLV_CODECID_NELLYMOSER_8KHZ_MONO | FLV_SAMPLESSIZE_16BIT;
else if (enc->sample_rate == 16000)
@@ -141,10 +141,10 @@ static int get_audio_flags(AVFormatContext *s, AVCodecContext *enc)
else
flags |= FLV_CODECID_NELLYMOSER | FLV_SAMPLESSIZE_16BIT;
break;
- case CODEC_ID_PCM_MULAW:
+ case AV_CODEC_ID_PCM_MULAW:
flags = FLV_CODECID_PCM_MULAW | FLV_SAMPLERATE_SPECIAL | FLV_SAMPLESSIZE_16BIT;
break;
- case CODEC_ID_PCM_ALAW:
+ case AV_CODEC_ID_PCM_ALAW:
flags = FLV_CODECID_PCM_ALAW | FLV_SAMPLERATE_SPECIAL | FLV_SAMPLESSIZE_16BIT;
break;
case 0:
@@ -223,7 +223,7 @@ static int flv_write_header(AVFormatContext *s)
return AVERROR_INVALIDDATA;
break;
case AVMEDIA_TYPE_DATA:
- if (enc->codec_id != CODEC_ID_TEXT) {
+ if (enc->codec_id != AV_CODEC_ID_TEXT) {
av_log(s, AV_LOG_ERROR, "codec not compatible with flv\n");
return AVERROR_INVALIDDATA;
}
@@ -315,7 +315,7 @@ static int flv_write_header(AVFormatContext *s)
put_amf_double(pb, audio_enc->sample_rate);
put_amf_string(pb, "audiosamplesize");
- put_amf_double(pb, audio_enc->codec_id == CODEC_ID_PCM_U8 ? 8 : 16);
+ put_amf_double(pb, audio_enc->codec_id == AV_CODEC_ID_PCM_U8 ? 8 : 16);
put_amf_string(pb, "stereo");
put_amf_bool(pb, audio_enc->channels == 2);
@@ -372,7 +372,7 @@ static int flv_write_header(AVFormatContext *s)
for (i = 0; i < s->nb_streams; i++) {
AVCodecContext *enc = s->streams[i]->codec;
- if (enc->codec_id == CODEC_ID_AAC || enc->codec_id == CODEC_ID_H264 || enc->codec_id == CODEC_ID_MPEG4) {
+ if (enc->codec_id == AV_CODEC_ID_AAC || enc->codec_id == AV_CODEC_ID_H264 || enc->codec_id == AV_CODEC_ID_MPEG4) {
int64_t pos;
avio_w8(pb, enc->codec_type == AVMEDIA_TYPE_VIDEO ?
FLV_TAG_TYPE_VIDEO : FLV_TAG_TYPE_AUDIO);
@@ -381,7 +381,7 @@ static int flv_write_header(AVFormatContext *s)
avio_w8(pb, 0); // ts ext
avio_wb24(pb, 0); // streamid
pos = avio_tell(pb);
- if (enc->codec_id == CODEC_ID_AAC) {
+ if (enc->codec_id == AV_CODEC_ID_AAC) {
avio_w8(pb, get_audio_flags(s, enc));
avio_w8(pb, 0); // AAC sequence header
avio_write(pb, enc->extradata, enc->extradata_size);
@@ -415,7 +415,7 @@ static int flv_write_trailer(AVFormatContext *s)
AVCodecContext *enc = s->streams[i]->codec;
FLVStreamContext *sc = s->streams[i]->priv_data;
if (enc->codec_type == AVMEDIA_TYPE_VIDEO &&
- (enc->codec_id == CODEC_ID_H264 || enc->codec_id == CODEC_ID_MPEG4))
+ (enc->codec_id == AV_CODEC_ID_H264 || enc->codec_id == AV_CODEC_ID_MPEG4))
put_avc_eos_tag(pb, sc->last_ts);
}
@@ -445,10 +445,10 @@ static int flv_write_packet(AVFormatContext *s, AVPacket *pkt)
// av_log(s, AV_LOG_DEBUG, "type:%d pts: %"PRId64" size:%d\n",
// enc->codec_type, timestamp, size);
- if (enc->codec_id == CODEC_ID_VP6 || enc->codec_id == CODEC_ID_VP6F ||
- enc->codec_id == CODEC_ID_VP6A || enc->codec_id == CODEC_ID_AAC)
+ if (enc->codec_id == AV_CODEC_ID_VP6 || enc->codec_id == AV_CODEC_ID_VP6F ||
+ enc->codec_id == AV_CODEC_ID_VP6A || enc->codec_id == AV_CODEC_ID_AAC)
flags_size = 2;
- else if (enc->codec_id == CODEC_ID_H264 || enc->codec_id == CODEC_ID_MPEG4)
+ else if (enc->codec_id == AV_CODEC_ID_H264 || enc->codec_id == AV_CODEC_ID_MPEG4)
flags_size = 5;
else
flags_size = 1;
@@ -481,12 +481,12 @@ static int flv_write_packet(AVFormatContext *s, AVPacket *pkt)
return AVERROR(EINVAL);
}
- if (enc->codec_id == CODEC_ID_H264 || enc->codec_id == CODEC_ID_MPEG4) {
+ if (enc->codec_id == AV_CODEC_ID_H264 || enc->codec_id == AV_CODEC_ID_MPEG4) {
/* check if extradata looks like mp4 formated */
if (enc->extradata_size > 0 && *(uint8_t*)enc->extradata != 1)
if (ff_avc_parse_nal_units_buf(pkt->data, &data, &size) < 0)
return -1;
- } else if (enc->codec_id == CODEC_ID_AAC && pkt->size > 2 &&
+ } else if (enc->codec_id == AV_CODEC_ID_AAC && pkt->size > 2 &&
(AV_RB16(pkt->data) & 0xfff0) == 0xfff0) {
av_log(s, AV_LOG_ERROR, "malformated aac bitstream, use -absf aac_adtstoasc\n");
return -1;
@@ -504,7 +504,7 @@ static int flv_write_packet(AVFormatContext *s, AVPacket *pkt)
ts = pkt->dts + flv->delay; // add delay to force positive dts
/* check Speex packet duration */
- if (enc->codec_id == CODEC_ID_SPEEX && ts - sc->last_ts > 160)
+ if (enc->codec_id == AV_CODEC_ID_SPEEX && ts - sc->last_ts > 160)
av_log(s, AV_LOG_WARNING, "Warning: Speex stream has more than "
"8 frames per packet. Adobe Flash "
"Player cannot handle this!\n");
@@ -540,13 +540,13 @@ static int flv_write_packet(AVFormatContext *s, AVPacket *pkt)
avio_wb32(pb, data_size + 11);
} else {
avio_w8(pb,flags);
- if (enc->codec_id == CODEC_ID_VP6)
+ if (enc->codec_id == AV_CODEC_ID_VP6)
avio_w8(pb,0);
- if (enc->codec_id == CODEC_ID_VP6F || enc->codec_id == CODEC_ID_VP6A)
+ if (enc->codec_id == AV_CODEC_ID_VP6F || enc->codec_id == AV_CODEC_ID_VP6A)
avio_w8(pb, enc->extradata_size ? enc->extradata[0] : 0);
- else if (enc->codec_id == CODEC_ID_AAC)
+ else if (enc->codec_id == AV_CODEC_ID_AAC)
avio_w8(pb,1); // AAC raw
- else if (enc->codec_id == CODEC_ID_H264 || enc->codec_id == CODEC_ID_MPEG4) {
+ else if (enc->codec_id == AV_CODEC_ID_H264 || enc->codec_id == AV_CODEC_ID_MPEG4) {
avio_w8(pb,1); // AVC NALU
avio_wb24(pb,pkt->pts - pkt->dts);
}
@@ -570,8 +570,8 @@ AVOutputFormat ff_flv_muxer = {
.mime_type = "video/x-flv",
.extensions = "flv",
.priv_data_size = sizeof(FLVContext),
- .audio_codec = CONFIG_LIBMP3LAME ? CODEC_ID_MP3 : CODEC_ID_ADPCM_SWF,
- .video_codec = CODEC_ID_FLV1,
+ .audio_codec = CONFIG_LIBMP3LAME ? AV_CODEC_ID_MP3 : AV_CODEC_ID_ADPCM_SWF,
+ .video_codec = AV_CODEC_ID_FLV1,
.write_header = flv_write_header,
.write_packet = flv_write_packet,
.write_trailer = flv_write_trailer,
diff --git a/libavformat/framecrcenc.c b/libavformat/framecrcenc.c
index 78f7131a5d..b17c92284a 100644
--- a/libavformat/framecrcenc.c
+++ b/libavformat/framecrcenc.c
@@ -38,8 +38,8 @@ static int framecrc_write_packet(struct AVFormatContext *s, AVPacket *pkt)
AVOutputFormat ff_framecrc_muxer = {
.name = "framecrc",
.long_name = NULL_IF_CONFIG_SMALL("framecrc testing"),
- .audio_codec = CODEC_ID_PCM_S16LE,
- .video_codec = CODEC_ID_RAWVIDEO,
+ .audio_codec = AV_CODEC_ID_PCM_S16LE,
+ .video_codec = AV_CODEC_ID_RAWVIDEO,
.write_header = ff_framehash_write_header,
.write_packet = framecrc_write_packet,
.flags = AVFMT_VARIABLE_FPS | AVFMT_TS_NONSTRICT,
diff --git a/libavformat/g723_1.c b/libavformat/g723_1.c
index fa8011cd28..7d97a4ba8d 100644
--- a/libavformat/g723_1.c
+++ b/libavformat/g723_1.c
@@ -39,7 +39,7 @@ static int g723_1_init(AVFormatContext *s)
return AVERROR(ENOMEM);
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- st->codec->codec_id = CODEC_ID_G723_1;
+ st->codec->codec_id = AV_CODEC_ID_G723_1;
st->codec->channel_layout = AV_CH_LAYOUT_MONO;
st->codec->channels = 1;
st->codec->sample_rate = 8000;
diff --git a/libavformat/g729dec.c b/libavformat/g729dec.c
index d56da5cd7b..1a8e07d0ac 100644
--- a/libavformat/g729dec.c
+++ b/libavformat/g729dec.c
@@ -39,7 +39,7 @@ static int g729_read_header(AVFormatContext *s)
return AVERROR(ENOMEM);
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- st->codec->codec_id = CODEC_ID_G729;
+ st->codec->codec_id = AV_CODEC_ID_G729;
st->codec->sample_rate = 8000;
st->codec->channels = 1;
diff --git a/libavformat/gif.c b/libavformat/gif.c
index 9cc4c9a2f6..e2118fe175 100644
--- a/libavformat/gif.c
+++ b/libavformat/gif.c
@@ -372,8 +372,8 @@ AVOutputFormat ff_gif_muxer = {
.mime_type = "image/gif",
.extensions = "gif",
.priv_data_size = sizeof(GIFContext),
- .audio_codec = CODEC_ID_NONE,
- .video_codec = CODEC_ID_RAWVIDEO,
+ .audio_codec = AV_CODEC_ID_NONE,
+ .video_codec = AV_CODEC_ID_RAWVIDEO,
.write_header = gif_write_header,
.write_packet = gif_write_packet,
.write_trailer = gif_write_trailer,
diff --git a/libavformat/gsmdec.c b/libavformat/gsmdec.c
index f3be47f61a..3ba6d6920d 100644
--- a/libavformat/gsmdec.c
+++ b/libavformat/gsmdec.c
@@ -93,6 +93,6 @@ AVInputFormat ff_gsm_demuxer = {
.read_packet = gsm_read_packet,
.flags = AVFMT_GENERIC_INDEX,
.extensions = "gsm",
- .raw_codec_id = CODEC_ID_GSM,
+ .raw_codec_id = AV_CODEC_ID_GSM,
.priv_class = &class,
};
diff --git a/libavformat/gxf.c b/libavformat/gxf.c
index ec82a7b209..9f000d0d16 100644
--- a/libavformat/gxf.c
+++ b/libavformat/gxf.c
@@ -111,34 +111,34 @@ static int get_sindex(AVFormatContext *s, int id, int format) {
case 3:
case 4:
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- st->codec->codec_id = CODEC_ID_MJPEG;
+ st->codec->codec_id = AV_CODEC_ID_MJPEG;
break;
case 13:
case 15:
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- st->codec->codec_id = CODEC_ID_DVVIDEO;
+ st->codec->codec_id = AV_CODEC_ID_DVVIDEO;
break;
case 14:
case 16:
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- st->codec->codec_id = CODEC_ID_DVVIDEO;
+ st->codec->codec_id = AV_CODEC_ID_DVVIDEO;
break;
case 11:
case 12:
case 20:
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- st->codec->codec_id = CODEC_ID_MPEG2VIDEO;
+ st->codec->codec_id = AV_CODEC_ID_MPEG2VIDEO;
st->need_parsing = AVSTREAM_PARSE_HEADERS; //get keyframe flag etc.
break;
case 22:
case 23:
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- st->codec->codec_id = CODEC_ID_MPEG1VIDEO;
+ st->codec->codec_id = AV_CODEC_ID_MPEG1VIDEO;
st->need_parsing = AVSTREAM_PARSE_HEADERS; //get keyframe flag etc.
break;
case 9:
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- st->codec->codec_id = CODEC_ID_PCM_S24LE;
+ st->codec->codec_id = AV_CODEC_ID_PCM_S24LE;
st->codec->channels = 1;
st->codec->sample_rate = 48000;
st->codec->bit_rate = 3 * 1 * 48000 * 8;
@@ -147,7 +147,7 @@ static int get_sindex(AVFormatContext *s, int id, int format) {
break;
case 10:
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- st->codec->codec_id = CODEC_ID_PCM_S16LE;
+ st->codec->codec_id = AV_CODEC_ID_PCM_S16LE;
st->codec->channels = 1;
st->codec->sample_rate = 48000;
st->codec->bit_rate = 2 * 1 * 48000 * 8;
@@ -156,7 +156,7 @@ static int get_sindex(AVFormatContext *s, int id, int format) {
break;
case 17:
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- st->codec->codec_id = CODEC_ID_AC3;
+ st->codec->codec_id = AV_CODEC_ID_AC3;
st->codec->channels = 2;
st->codec->sample_rate = 48000;
break;
@@ -165,11 +165,11 @@ static int get_sindex(AVFormatContext *s, int id, int format) {
case 8:
case 24:
st->codec->codec_type = AVMEDIA_TYPE_DATA;
- st->codec->codec_id = CODEC_ID_NONE;
+ st->codec->codec_id = AV_CODEC_ID_NONE;
break;
default:
st->codec->codec_type = AVMEDIA_TYPE_UNKNOWN;
- st->codec->codec_id = CODEC_ID_NONE;
+ st->codec->codec_id = AV_CODEC_ID_NONE;
break;
}
return s->nb_streams - 1;
@@ -503,8 +503,8 @@ static int gxf_packet(AVFormatContext *s, AVPacket *pkt) {
avio_rb32(pb); // "timeline" field number
avio_r8(pb); // flags
avio_r8(pb); // reserved
- if (st->codec->codec_id == CODEC_ID_PCM_S24LE ||
- st->codec->codec_id == CODEC_ID_PCM_S16LE) {
+ if (st->codec->codec_id == AV_CODEC_ID_PCM_S24LE ||
+ st->codec->codec_id == AV_CODEC_ID_PCM_S16LE) {
int first = field_info >> 16;
int last = field_info & 0xffff; // last is exclusive
int bps = av_get_bits_per_sample(st->codec->codec_id)>>3;
@@ -522,7 +522,7 @@ static int gxf_packet(AVFormatContext *s, AVPacket *pkt) {
pkt->dts = field_nr;
//set duration manually for DV or else lavf misdetects the frame rate
- if (st->codec->codec_id == CODEC_ID_DVVIDEO)
+ if (st->codec->codec_id == AV_CODEC_ID_DVVIDEO)
pkt->duration = si->fields_per_frame;
return ret;
diff --git a/libavformat/gxfenc.c b/libavformat/gxfenc.c
index c1a2bb599c..7c6b4cc6e7 100644
--- a/libavformat/gxfenc.c
+++ b/libavformat/gxfenc.c
@@ -97,22 +97,22 @@ static const struct {
};
static const AVCodecTag gxf_media_types[] = {
- { CODEC_ID_MJPEG , 3 }, /* NTSC */
- { CODEC_ID_MJPEG , 4 }, /* PAL */
- { CODEC_ID_PCM_S24LE , 9 },
- { CODEC_ID_PCM_S16LE , 10 },
- { CODEC_ID_MPEG2VIDEO, 11 }, /* NTSC */
- { CODEC_ID_MPEG2VIDEO, 12 }, /* PAL */
- { CODEC_ID_DVVIDEO , 13 }, /* NTSC */
- { CODEC_ID_DVVIDEO , 14 }, /* PAL */
- { CODEC_ID_DVVIDEO , 15 }, /* 50M NTSC */
- { CODEC_ID_DVVIDEO , 16 }, /* 50M PAL */
- { CODEC_ID_AC3 , 17 },
- //{ CODEC_ID_NONE, , 18 }, /* Non compressed 24 bit audio */
- { CODEC_ID_MPEG2VIDEO, 20 }, /* MPEG HD */
- { CODEC_ID_MPEG1VIDEO, 22 }, /* NTSC */
- { CODEC_ID_MPEG1VIDEO, 23 }, /* PAL */
- { CODEC_ID_NONE, 0 },
+ { AV_CODEC_ID_MJPEG , 3 }, /* NTSC */
+ { AV_CODEC_ID_MJPEG , 4 }, /* PAL */
+ { AV_CODEC_ID_PCM_S24LE , 9 },
+ { AV_CODEC_ID_PCM_S16LE , 10 },
+ { AV_CODEC_ID_MPEG2VIDEO, 11 }, /* NTSC */
+ { AV_CODEC_ID_MPEG2VIDEO, 12 }, /* PAL */
+ { AV_CODEC_ID_DVVIDEO , 13 }, /* NTSC */
+ { AV_CODEC_ID_DVVIDEO , 14 }, /* PAL */
+ { AV_CODEC_ID_DVVIDEO , 15 }, /* 50M NTSC */
+ { AV_CODEC_ID_DVVIDEO , 16 }, /* 50M PAL */
+ { AV_CODEC_ID_AC3 , 17 },
+ //{ AV_CODEC_ID_NONE, , 18 }, /* Non compressed 24 bit audio */
+ { AV_CODEC_ID_MPEG2VIDEO, 20 }, /* MPEG HD */
+ { AV_CODEC_ID_MPEG1VIDEO, 22 }, /* NTSC */
+ { AV_CODEC_ID_MPEG1VIDEO, 23 }, /* PAL */
+ { AV_CODEC_ID_NONE, 0 },
};
#define SERVER_PATH "EXT:/PDR/default/"
@@ -510,9 +510,9 @@ static int gxf_write_umf_media_mpeg(AVIOContext *pb, AVStream *st)
avio_wl32(pb, 1); /* I picture per GOP */
avio_wl32(pb, sc->p_per_gop);
avio_wl32(pb, sc->b_per_i_or_p);
- if (st->codec->codec_id == CODEC_ID_MPEG2VIDEO)
+ if (st->codec->codec_id == AV_CODEC_ID_MPEG2VIDEO)
avio_wl32(pb, 2);
- else if (st->codec->codec_id == CODEC_ID_MPEG1VIDEO)
+ else if (st->codec->codec_id == AV_CODEC_ID_MPEG1VIDEO)
avio_wl32(pb, 1);
else
avio_wl32(pb, 0);
@@ -595,14 +595,14 @@ static int gxf_write_umf_media_description(AVFormatContext *s)
else {
AVStream *st = s->streams[i];
switch (st->codec->codec_id) {
- case CODEC_ID_MPEG1VIDEO:
- case CODEC_ID_MPEG2VIDEO:
+ case AV_CODEC_ID_MPEG1VIDEO:
+ case AV_CODEC_ID_MPEG2VIDEO:
gxf_write_umf_media_mpeg(pb, st);
break;
- case CODEC_ID_PCM_S16LE:
+ case AV_CODEC_ID_PCM_S16LE:
gxf_write_umf_media_audio(pb, sc);
break;
- case CODEC_ID_DVVIDEO:
+ case AV_CODEC_ID_DVVIDEO:
gxf_write_umf_media_dv(pb, sc);
break;
}
@@ -697,7 +697,7 @@ static int gxf_write_header(AVFormatContext *s)
sc->media_type = ff_codec_get_tag(gxf_media_types, st->codec->codec_id);
if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
- if (st->codec->codec_id != CODEC_ID_PCM_S16LE) {
+ if (st->codec->codec_id != AV_CODEC_ID_PCM_S16LE) {
av_log(s, AV_LOG_ERROR, "only 16 BIT PCM LE allowed for now\n");
return -1;
}
@@ -752,24 +752,24 @@ static int gxf_write_header(AVFormatContext *s)
vsc = sc;
switch (st->codec->codec_id) {
- case CODEC_ID_MJPEG:
+ case AV_CODEC_ID_MJPEG:
sc->track_type = 1;
gxf->flags |= 0x00004000;
media_info = 'J';
break;
- case CODEC_ID_MPEG1VIDEO:
+ case AV_CODEC_ID_MPEG1VIDEO:
sc->track_type = 9;
gxf->mpeg_tracks++;
media_info = 'L';
break;
- case CODEC_ID_MPEG2VIDEO:
+ case AV_CODEC_ID_MPEG2VIDEO:
sc->first_gop_closed = -1;
sc->track_type = 4;
gxf->mpeg_tracks++;
gxf->flags |= 0x00008000;
media_info = 'M';
break;
- case CODEC_ID_DVVIDEO:
+ case AV_CODEC_ID_DVVIDEO:
if (st->codec->pix_fmt == PIX_FMT_YUV422P) {
sc->media_type += 2;
sc->track_type = 6;
@@ -885,7 +885,7 @@ static int gxf_write_media_preamble(AVFormatContext *s, AVPacket *pkt, int size)
if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
avio_wb16(pb, 0);
avio_wb16(pb, size / 2);
- } else if (st->codec->codec_id == CODEC_ID_MPEG2VIDEO) {
+ } else if (st->codec->codec_id == AV_CODEC_ID_MPEG2VIDEO) {
int frame_type = gxf_parse_mpeg_frame(sc, pkt->data, pkt->size);
if (frame_type == AV_PICTURE_TYPE_I) {
avio_w8(pb, 0x0d);
@@ -898,7 +898,7 @@ static int gxf_write_media_preamble(AVFormatContext *s, AVPacket *pkt, int size)
sc->pframes++;
}
avio_wb24(pb, size);
- } else if (st->codec->codec_id == CODEC_ID_DVVIDEO) {
+ } else if (st->codec->codec_id == AV_CODEC_ID_DVVIDEO) {
avio_w8(pb, size / 4096);
avio_wb24(pb, 0);
} else
@@ -919,7 +919,7 @@ static int gxf_write_packet(AVFormatContext *s, AVPacket *pkt)
int packet_start_offset = avio_tell(pb) / 1024;
gxf_write_packet_header(pb, PKT_MEDIA);
- if (st->codec->codec_id == CODEC_ID_MPEG2VIDEO && pkt->size % 4) /* MPEG-2 frames must be padded */
+ if (st->codec->codec_id == AV_CODEC_ID_MPEG2VIDEO && pkt->size % 4) /* MPEG-2 frames must be padded */
padding = 4 - pkt->size % 4;
else if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO)
padding = GXF_AUDIO_PACKET_SIZE - pkt->size;
@@ -989,8 +989,8 @@ AVOutputFormat ff_gxf_muxer = {
.long_name = NULL_IF_CONFIG_SMALL("GXF (General eXchange Format)"),
.extensions = "gxf",
.priv_data_size = sizeof(GXFContext),
- .audio_codec = CODEC_ID_PCM_S16LE,
- .video_codec = CODEC_ID_MPEG2VIDEO,
+ .audio_codec = AV_CODEC_ID_PCM_S16LE,
+ .video_codec = AV_CODEC_ID_MPEG2VIDEO,
.write_header = gxf_write_header,
.write_packet = gxf_write_packet,
.write_trailer = gxf_write_trailer,
diff --git a/libavformat/h261dec.c b/libavformat/h261dec.c
index 354a7c78c1..1b254d613a 100644
--- a/libavformat/h261dec.c
+++ b/libavformat/h261dec.c
@@ -62,4 +62,4 @@ static int h261_probe(AVProbeData *p)
return 0;
}
-FF_DEF_RAWVIDEO_DEMUXER(h261, "raw H.261", h261_probe, "h261", CODEC_ID_H261)
+FF_DEF_RAWVIDEO_DEMUXER(h261, "raw H.261", h261_probe, "h261", AV_CODEC_ID_H261)
diff --git a/libavformat/h263dec.c b/libavformat/h263dec.c
index b07e9782b8..8afacad8b7 100644
--- a/libavformat/h263dec.c
+++ b/libavformat/h263dec.c
@@ -64,4 +64,4 @@ static int h263_probe(AVProbeData *p)
return 0;
}
-FF_DEF_RAWVIDEO_DEMUXER(h263, "raw H.263", h263_probe, NULL, CODEC_ID_H263)
+FF_DEF_RAWVIDEO_DEMUXER(h263, "raw H.263", h263_probe, NULL, AV_CODEC_ID_H263)
diff --git a/libavformat/h264dec.c b/libavformat/h264dec.c
index 96f93e258e..7e525e0bc9 100644
--- a/libavformat/h264dec.c
+++ b/libavformat/h264dec.c
@@ -67,4 +67,4 @@ static int h264_probe(AVProbeData *p)
return 0;
}
-FF_DEF_RAWVIDEO_DEMUXER(h264 , "raw H.264 video", h264_probe, "h26l,h264,264", CODEC_ID_H264)
+FF_DEF_RAWVIDEO_DEMUXER(h264 , "raw H.264 video", h264_probe, "h26l,h264,264", AV_CODEC_ID_H264)
diff --git a/libavformat/icodec.c b/libavformat/icodec.c
index 81ad0b0824..37909aab72 100644
--- a/libavformat/icodec.c
+++ b/libavformat/icodec.c
@@ -90,14 +90,14 @@ static int read_header(AVFormatContext *s)
switch(avio_rl32(pb)) {
case MKTAG(0x89, 'P', 'N', 'G'):
- st->codec->codec_id = CODEC_ID_PNG;
+ st->codec->codec_id = AV_CODEC_ID_PNG;
st->codec->width = 0;
st->codec->height = 0;
break;
case 40:
if (ico->images[i].size < 40)
return AVERROR_INVALIDDATA;
- st->codec->codec_id = CODEC_ID_BMP;
+ st->codec->codec_id = AV_CODEC_ID_BMP;
tmp = avio_rl32(pb);
if (tmp)
st->codec->width = tmp;
@@ -130,7 +130,7 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt)
if ((ret = avio_seek(pb, image->offset, SEEK_SET)) < 0)
return ret;
- if (s->streams[ico->current_image]->codec->codec_id == CODEC_ID_PNG) {
+ if (s->streams[ico->current_image]->codec->codec_id == AV_CODEC_ID_PNG) {
if ((ret = av_get_packet(pb, pkt, image->size)) < 0)
return ret;
} else {
diff --git a/libavformat/id3v2.c b/libavformat/id3v2.c
index 9ccd8f2d07..97de41efad 100644
--- a/libavformat/id3v2.c
+++ b/libavformat/id3v2.c
@@ -125,13 +125,13 @@ const char *ff_id3v2_picture_types[21] = {
};
const CodecMime ff_id3v2_mime_tags[] = {
- {"image/gif" , CODEC_ID_GIF},
- {"image/jpeg", CODEC_ID_MJPEG},
- {"image/jpg", CODEC_ID_MJPEG},
- {"image/png" , CODEC_ID_PNG},
- {"image/tiff", CODEC_ID_TIFF},
- {"image/bmp", CODEC_ID_BMP},
- {"", CODEC_ID_NONE},
+ {"image/gif" , AV_CODEC_ID_GIF},
+ {"image/jpeg", AV_CODEC_ID_MJPEG},
+ {"image/jpg", AV_CODEC_ID_MJPEG},
+ {"image/png" , AV_CODEC_ID_PNG},
+ {"image/tiff", AV_CODEC_ID_TIFF},
+ {"image/bmp", AV_CODEC_ID_BMP},
+ {"", AV_CODEC_ID_NONE},
};
int ff_id3v2_match(const uint8_t *buf, const char * magic)
@@ -441,7 +441,7 @@ static void read_apic(AVFormatContext *s, AVIOContext *pb, int taglen, char *tag
int enc, pic_type;
char mimetype[64];
const CodecMime *mime = ff_id3v2_mime_tags;
- enum CodecID id = CODEC_ID_NONE;
+ enum AVCodecID id = AV_CODEC_ID_NONE;
ID3v2ExtraMetaAPIC *apic = NULL;
ID3v2ExtraMeta *new_extra = NULL;
int64_t end = avio_tell(pb) + taglen;
@@ -459,14 +459,14 @@ static void read_apic(AVFormatContext *s, AVIOContext *pb, int taglen, char *tag
/* mimetype */
taglen -= avio_get_str(pb, taglen, mimetype, sizeof(mimetype));
- while (mime->id != CODEC_ID_NONE) {
+ while (mime->id != AV_CODEC_ID_NONE) {
if (!strncmp(mime->str, mimetype, sizeof(mimetype))) {
id = mime->id;
break;
}
mime++;
}
- if (id == CODEC_ID_NONE) {
+ if (id == AV_CODEC_ID_NONE) {
av_log(s, AV_LOG_WARNING, "Unknown attached picture mimetype: %s, skipping.\n", mimetype);
goto fail;
}
diff --git a/libavformat/id3v2.h b/libavformat/id3v2.h
index 5c12a47b32..f7270106a1 100644
--- a/libavformat/id3v2.h
+++ b/libavformat/id3v2.h
@@ -71,7 +71,7 @@ typedef struct ID3v2ExtraMetaAPIC {
int len;
const char *type;
uint8_t *description;
- enum CodecID id;
+ enum AVCodecID id;
} ID3v2ExtraMetaAPIC;
/**
diff --git a/libavformat/id3v2enc.c b/libavformat/id3v2enc.c
index 1caadd6335..a10d679946 100644
--- a/libavformat/id3v2enc.c
+++ b/libavformat/id3v2enc.c
@@ -210,7 +210,7 @@ int ff_id3v2_write_apic(AVFormatContext *s, ID3v2EncContext *id3, AVPacket *pkt)
int i, len, type = 0;
/* get the mimetype*/
- while (mime->id != CODEC_ID_NONE) {
+ while (mime->id != AV_CODEC_ID_NONE) {
if (mime->id == st->codec->codec_id) {
mimetype = mime->str;
break;
diff --git a/libavformat/idcin.c b/libavformat/idcin.c
index 81432c187f..f1df00244f 100644
--- a/libavformat/idcin.c
+++ b/libavformat/idcin.c
@@ -159,7 +159,7 @@ static int idcin_read_header(AVFormatContext *s)
avpriv_set_pts_info(st, 33, 1, IDCIN_FPS);
idcin->video_stream_index = st->index;
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- st->codec->codec_id = CODEC_ID_IDCIN;
+ st->codec->codec_id = AV_CODEC_ID_IDCIN;
st->codec->codec_tag = 0; /* no fourcc */
st->codec->width = width;
st->codec->height = height;
@@ -187,9 +187,9 @@ static int idcin_read_header(AVFormatContext *s)
st->codec->bit_rate = sample_rate * bytes_per_sample * 8 * channels;
st->codec->block_align = bytes_per_sample * channels;
if (bytes_per_sample == 1)
- st->codec->codec_id = CODEC_ID_PCM_U8;
+ st->codec->codec_id = AV_CODEC_ID_PCM_U8;
else
- st->codec->codec_id = CODEC_ID_PCM_S16LE;
+ st->codec->codec_id = AV_CODEC_ID_PCM_S16LE;
if (sample_rate % 14 != 0) {
idcin->audio_chunk_size1 = (sample_rate / 14) *
diff --git a/libavformat/idroqdec.c b/libavformat/idroqdec.c
index d832e354a3..3b17ff420c 100644
--- a/libavformat/idroqdec.c
+++ b/libavformat/idroqdec.c
@@ -130,7 +130,7 @@ static int roq_read_packet(AVFormatContext *s,
avpriv_set_pts_info(st, 63, 1, roq->frame_rate);
roq->video_stream_index = st->index;
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- st->codec->codec_id = CODEC_ID_ROQ;
+ st->codec->codec_id = AV_CODEC_ID_ROQ;
st->codec->codec_tag = 0; /* no fourcc */
if (avio_read(pb, preamble, RoQ_CHUNK_PREAMBLE_SIZE) != RoQ_CHUNK_PREAMBLE_SIZE)
@@ -176,7 +176,7 @@ static int roq_read_packet(AVFormatContext *s,
avpriv_set_pts_info(st, 32, 1, RoQ_AUDIO_SAMPLE_RATE);
roq->audio_stream_index = st->index;
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- st->codec->codec_id = CODEC_ID_ROQ_DPCM;
+ st->codec->codec_id = AV_CODEC_ID_ROQ_DPCM;
st->codec->codec_tag = 0; /* no tag */
st->codec->channels = roq->audio_channels = chunk_type == RoQ_SOUND_STEREO ? 2 : 1;
st->codec->sample_rate = RoQ_AUDIO_SAMPLE_RATE;
diff --git a/libavformat/idroqenc.c b/libavformat/idroqenc.c
index 58bf7e98ad..50c428046b 100644
--- a/libavformat/idroqenc.c
+++ b/libavformat/idroqenc.c
@@ -39,8 +39,8 @@ AVOutputFormat ff_roq_muxer = {
.name = "roq",
.long_name = NULL_IF_CONFIG_SMALL("raw id RoQ"),
.extensions = "roq",
- .audio_codec = CODEC_ID_ROQ_DPCM,
- .video_codec = CODEC_ID_ROQ,
+ .audio_codec = AV_CODEC_ID_ROQ_DPCM,
+ .video_codec = AV_CODEC_ID_ROQ,
.write_header = roq_write_header,
.write_packet = ff_raw_write_packet,
};
diff --git a/libavformat/iff.c b/libavformat/iff.c
index 546836a3fd..49303bf3db 100644
--- a/libavformat/iff.c
+++ b/libavformat/iff.c
@@ -287,13 +287,13 @@ static int iff_read_header(AVFormatContext *s)
switch (iff->svx8_compression) {
case COMP_NONE:
- st->codec->codec_id = CODEC_ID_PCM_S8_PLANAR;
+ st->codec->codec_id = AV_CODEC_ID_PCM_S8_PLANAR;
break;
case COMP_FIB:
- st->codec->codec_id = CODEC_ID_8SVX_FIB;
+ st->codec->codec_id = AV_CODEC_ID_8SVX_FIB;
break;
case COMP_EXP:
- st->codec->codec_id = CODEC_ID_8SVX_EXP;
+ st->codec->codec_id = AV_CODEC_ID_8SVX_EXP;
break;
default:
av_log(s, AV_LOG_ERROR,
@@ -333,10 +333,10 @@ static int iff_read_header(AVFormatContext *s)
switch (iff->bitmap_compression) {
case BITMAP_RAW:
- st->codec->codec_id = CODEC_ID_IFF_ILBM;
+ st->codec->codec_id = AV_CODEC_ID_IFF_ILBM;
break;
case BITMAP_BYTERUN1:
- st->codec->codec_id = CODEC_ID_IFF_BYTERUN1;
+ st->codec->codec_id = AV_CODEC_ID_IFF_BYTERUN1;
break;
default:
av_log(s, AV_LOG_ERROR,
diff --git a/libavformat/ilbc.c b/libavformat/ilbc.c
index 11959f4028..7a23b2f442 100644
--- a/libavformat/ilbc.c
+++ b/libavformat/ilbc.c
@@ -36,7 +36,7 @@ static int ilbc_write_header(AVFormatContext *s)
}
enc = s->streams[0]->codec;
- if (enc->codec_id != CODEC_ID_ILBC) {
+ if (enc->codec_id != AV_CODEC_ID_ILBC) {
av_log(s, AV_LOG_ERROR, "Unsupported codec\n");
return AVERROR(EINVAL);
}
@@ -80,7 +80,7 @@ static int ilbc_read_header(AVFormatContext *s)
st = avformat_new_stream(s, NULL);
if (!st)
return AVERROR(ENOMEM);
- st->codec->codec_id = CODEC_ID_ILBC;
+ st->codec->codec_id = AV_CODEC_ID_ILBC;
st->codec->sample_rate = 8000;
st->codec->channels = 1;
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
@@ -134,7 +134,7 @@ AVOutputFormat ff_ilbc_muxer = {
.long_name = NULL_IF_CONFIG_SMALL("iLBC storage"),
.mime_type = "audio/iLBC",
.extensions = "lbc",
- .audio_codec = CODEC_ID_ILBC,
+ .audio_codec = AV_CODEC_ID_ILBC,
.write_header = ilbc_write_header,
.write_packet = ilbc_write_packet,
.flags = AVFMT_NOTIMESTAMPS,
diff --git a/libavformat/img2.c b/libavformat/img2.c
index 1fb9c3bcb8..ed4b39afe0 100644
--- a/libavformat/img2.c
+++ b/libavformat/img2.c
@@ -24,64 +24,64 @@
#include "internal.h"
typedef struct {
- enum CodecID id;
+ enum AVCodecID id;
const char *str;
} IdStrMap;
static const IdStrMap img_tags[] = {
- { CODEC_ID_MJPEG , "jpeg"},
- { CODEC_ID_MJPEG , "jpg"},
- { CODEC_ID_MJPEG , "jps"},
- { CODEC_ID_LJPEG , "ljpg"},
- { CODEC_ID_JPEGLS , "jls"},
- { CODEC_ID_PNG , "png"},
- { CODEC_ID_PNG , "pns"},
- { CODEC_ID_PNG , "mng"},
- { CODEC_ID_PPM , "ppm"},
- { CODEC_ID_PPM , "pnm"},
- { CODEC_ID_PGM , "pgm"},
- { CODEC_ID_PGMYUV , "pgmyuv"},
- { CODEC_ID_PBM , "pbm"},
- { CODEC_ID_PAM , "pam"},
- { CODEC_ID_MPEG1VIDEO, "mpg1-img"},
- { CODEC_ID_MPEG2VIDEO, "mpg2-img"},
- { CODEC_ID_MPEG4 , "mpg4-img"},
- { CODEC_ID_FFV1 , "ffv1-img"},
- { CODEC_ID_RAWVIDEO , "y"},
- { CODEC_ID_RAWVIDEO , "raw"},
- { CODEC_ID_BMP , "bmp"},
- { CODEC_ID_GIF , "gif"},
- { CODEC_ID_TARGA , "tga"},
- { CODEC_ID_TIFF , "tiff"},
- { CODEC_ID_TIFF , "tif"},
- { CODEC_ID_SGI , "sgi"},
- { CODEC_ID_PTX , "ptx"},
- { CODEC_ID_PCX , "pcx"},
- { CODEC_ID_SUNRAST , "sun"},
- { CODEC_ID_SUNRAST , "ras"},
- { CODEC_ID_SUNRAST , "rs"},
- { CODEC_ID_SUNRAST , "im1"},
- { CODEC_ID_SUNRAST , "im8"},
- { CODEC_ID_SUNRAST , "im24"},
- { CODEC_ID_SUNRAST , "im32"},
- { CODEC_ID_SUNRAST , "sunras"},
- { CODEC_ID_JPEG2000 , "j2c"},
- { CODEC_ID_JPEG2000 , "j2k"},
- { CODEC_ID_JPEG2000 , "jp2"},
- { CODEC_ID_JPEG2000 , "jpc"},
- { CODEC_ID_DPX , "dpx"},
- { CODEC_ID_EXR , "exr"},
- { CODEC_ID_PICTOR , "pic"},
- { CODEC_ID_V210X , "yuv10"},
- { CODEC_ID_XBM , "xbm"},
- { CODEC_ID_XWD , "xwd"},
- { CODEC_ID_NONE , NULL}
+ { AV_CODEC_ID_MJPEG , "jpeg"},
+ { AV_CODEC_ID_MJPEG , "jpg"},
+ { AV_CODEC_ID_MJPEG , "jps"},
+ { AV_CODEC_ID_LJPEG , "ljpg"},
+ { AV_CODEC_ID_JPEGLS , "jls"},
+ { AV_CODEC_ID_PNG , "png"},
+ { AV_CODEC_ID_PNG , "pns"},
+ { AV_CODEC_ID_PNG , "mng"},
+ { AV_CODEC_ID_PPM , "ppm"},
+ { AV_CODEC_ID_PPM , "pnm"},
+ { AV_CODEC_ID_PGM , "pgm"},
+ { AV_CODEC_ID_PGMYUV , "pgmyuv"},
+ { AV_CODEC_ID_PBM , "pbm"},
+ { AV_CODEC_ID_PAM , "pam"},
+ { AV_CODEC_ID_MPEG1VIDEO, "mpg1-img"},
+ { AV_CODEC_ID_MPEG2VIDEO, "mpg2-img"},
+ { AV_CODEC_ID_MPEG4 , "mpg4-img"},
+ { AV_CODEC_ID_FFV1 , "ffv1-img"},
+ { AV_CODEC_ID_RAWVIDEO , "y"},
+ { AV_CODEC_ID_RAWVIDEO , "raw"},
+ { AV_CODEC_ID_BMP , "bmp"},
+ { AV_CODEC_ID_GIF , "gif"},
+ { AV_CODEC_ID_TARGA , "tga"},
+ { AV_CODEC_ID_TIFF , "tiff"},
+ { AV_CODEC_ID_TIFF , "tif"},
+ { AV_CODEC_ID_SGI , "sgi"},
+ { AV_CODEC_ID_PTX , "ptx"},
+ { AV_CODEC_ID_PCX , "pcx"},
+ { AV_CODEC_ID_SUNRAST , "sun"},
+ { AV_CODEC_ID_SUNRAST , "ras"},
+ { AV_CODEC_ID_SUNRAST , "rs"},
+ { AV_CODEC_ID_SUNRAST , "im1"},
+ { AV_CODEC_ID_SUNRAST , "im8"},
+ { AV_CODEC_ID_SUNRAST , "im24"},
+ { AV_CODEC_ID_SUNRAST , "im32"},
+ { AV_CODEC_ID_SUNRAST , "sunras"},
+ { AV_CODEC_ID_JPEG2000 , "j2c"},
+ { AV_CODEC_ID_JPEG2000 , "j2k"},
+ { AV_CODEC_ID_JPEG2000 , "jp2"},
+ { AV_CODEC_ID_JPEG2000 , "jpc"},
+ { AV_CODEC_ID_DPX , "dpx"},
+ { AV_CODEC_ID_EXR , "exr"},
+ { AV_CODEC_ID_PICTOR , "pic"},
+ { AV_CODEC_ID_V210X , "yuv10"},
+ { AV_CODEC_ID_XBM , "xbm"},
+ { AV_CODEC_ID_XWD , "xwd"},
+ { AV_CODEC_ID_NONE , NULL}
};
-static enum CodecID av_str2id(const IdStrMap *tags, const char *str)
+static enum AVCodecID av_str2id(const IdStrMap *tags, const char *str)
{
str= strrchr(str, '.');
- if(!str) return CODEC_ID_NONE;
+ if(!str) return AV_CODEC_ID_NONE;
str++;
while (tags->id) {
@@ -90,10 +90,10 @@ static enum CodecID av_str2id(const IdStrMap *tags, const char *str)
tags++;
}
- return CODEC_ID_NONE;
+ return AV_CODEC_ID_NONE;
}
-enum CodecID ff_guess_image2_codec(const char *filename)
+enum AVCodecID ff_guess_image2_codec(const char *filename)
{
return av_str2id(img_tags, filename);
}
diff --git a/libavformat/img2dec.c b/libavformat/img2dec.c
index 0443b1a745..b87b5d5b1a 100644
--- a/libavformat/img2dec.c
+++ b/libavformat/img2dec.c
@@ -288,8 +288,8 @@ static int read_header(AVFormatContext *s1)
s->split_planes = str && !av_strcasecmp(str + 1, "y");
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
st->codec->codec_id = ff_guess_image2_codec(s->path);
- if (st->codec->codec_id == CODEC_ID_LJPEG)
- st->codec->codec_id = CODEC_ID_MJPEG;
+ if (st->codec->codec_id == AV_CODEC_ID_LJPEG)
+ st->codec->codec_id = AV_CODEC_ID_MJPEG;
}
if(st->codec->codec_type == AVMEDIA_TYPE_VIDEO && pix_fmt != PIX_FMT_NONE)
st->codec->pix_fmt = pix_fmt;
@@ -338,7 +338,7 @@ static int read_packet(AVFormatContext *s1, AVPacket *pkt)
filename[ strlen(filename) - 1 ]= 'U' + i;
}
- if(codec->codec_id == CODEC_ID_RAWVIDEO && !codec->width)
+ if(codec->codec_id == AV_CODEC_ID_RAWVIDEO && !codec->width)
infer_size(&codec->width, &codec->height, size[0]);
} else {
f[0] = s1->pb;
diff --git a/libavformat/img2enc.c b/libavformat/img2enc.c
index 58b4655139..d162cef196 100644
--- a/libavformat/img2enc.c
+++ b/libavformat/img2enc.c
@@ -97,7 +97,7 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt)
avio_close(pb[1]);
avio_close(pb[2]);
}else{
- if(ff_guess_image2_codec(s->filename) == CODEC_ID_JPEG2000){
+ if(ff_guess_image2_codec(s->filename) == AV_CODEC_ID_JPEG2000){
AVStream *st = s->streams[0];
if(st->codec->extradata_size > 8 &&
AV_RL32(st->codec->extradata+4) == MKTAG('j','p','2','h')){
@@ -156,7 +156,7 @@ AVOutputFormat ff_image2_muxer = {
"ppm,sgi,tga,tif,tiff,jp2,j2c,xwd,sun,ras,rs,im1,im8,im24,"
"sunras,xbm",
.priv_data_size = sizeof(VideoMuxData),
- .video_codec = CODEC_ID_MJPEG,
+ .video_codec = AV_CODEC_ID_MJPEG,
.write_header = write_header,
.write_packet = write_packet,
.flags = AVFMT_NOTIMESTAMPS | AVFMT_NODIMENSIONS | AVFMT_NOFILE,
@@ -168,7 +168,7 @@ AVOutputFormat ff_image2pipe_muxer = {
.name = "image2pipe",
.long_name = NULL_IF_CONFIG_SMALL("piped image2 sequence"),
.priv_data_size = sizeof(VideoMuxData),
- .video_codec = CODEC_ID_MJPEG,
+ .video_codec = AV_CODEC_ID_MJPEG,
.write_header = write_header,
.write_packet = write_packet,
.flags = AVFMT_NOTIMESTAMPS | AVFMT_NODIMENSIONS
diff --git a/libavformat/ingenientdec.c b/libavformat/ingenientdec.c
index f595a7e87f..94c549c711 100644
--- a/libavformat/ingenientdec.c
+++ b/libavformat/ingenientdec.c
@@ -61,6 +61,6 @@ AVInputFormat ff_ingenient_demuxer = {
.read_packet = ingenient_read_packet,
.flags = AVFMT_GENERIC_INDEX,
.extensions = "cgi", // FIXME
- .raw_codec_id = CODEC_ID_MJPEG,
+ .raw_codec_id = AV_CODEC_ID_MJPEG,
.priv_class = &ingenient_demuxer_class,
};
diff --git a/libavformat/internal.h b/libavformat/internal.h
index 6007ecfead..56bf2b00bc 100644
--- a/libavformat/internal.h
+++ b/libavformat/internal.h
@@ -33,13 +33,13 @@
#endif
typedef struct AVCodecTag {
- enum CodecID id;
+ enum AVCodecID id;
unsigned int tag;
} AVCodecTag;
typedef struct CodecMime{
char str[32];
- enum CodecID id;
+ enum AVCodecID id;
} CodecMime;
#ifdef __GNUC__
@@ -250,7 +250,7 @@ void ff_reduce_index(AVFormatContext *s, int stream_index);
void ff_make_absolute_url(char *buf, int size, const char *base,
const char *rel);
-enum CodecID ff_guess_image2_codec(const char *filename);
+enum AVCodecID ff_guess_image2_codec(const char *filename);
/**
* Convert a date string in ISO8601 format to Unix timestamp.
diff --git a/libavformat/ipmovie.c b/libavformat/ipmovie.c
index 4886b8260b..748f4a4467 100644
--- a/libavformat/ipmovie.c
+++ b/libavformat/ipmovie.c
@@ -94,7 +94,7 @@ typedef struct IPMVEContext {
unsigned int audio_bits;
unsigned int audio_channels;
unsigned int audio_sample_rate;
- enum CodecID audio_type;
+ enum AVCodecID audio_type;
unsigned int audio_frame_count;
int video_stream_index;
@@ -117,14 +117,14 @@ static int load_ipmovie_packet(IPMVEContext *s, AVIOContext *pb,
int chunk_type;
if (s->audio_chunk_offset && s->audio_channels && s->audio_bits) {
- if (s->audio_type == CODEC_ID_NONE) {
+ if (s->audio_type == AV_CODEC_ID_NONE) {
av_log(NULL, AV_LOG_ERROR, "Can not read audio packet before"
"audio codec is known\n");
return CHUNK_BAD;
}
/* adjust for PCM audio by skipping chunk header */
- if (s->audio_type != CODEC_ID_INTERPLAY_DPCM) {
+ if (s->audio_type != AV_CODEC_ID_INTERPLAY_DPCM) {
s->audio_chunk_offset += 6;
s->audio_chunk_size -= 6;
}
@@ -139,7 +139,7 @@ static int load_ipmovie_packet(IPMVEContext *s, AVIOContext *pb,
pkt->pts = s->audio_frame_count;
/* audio frame maintenance */
- if (s->audio_type != CODEC_ID_INTERPLAY_DPCM)
+ if (s->audio_type != AV_CODEC_ID_INTERPLAY_DPCM)
s->audio_frame_count +=
(s->audio_chunk_size / s->audio_channels / (s->audio_bits / 8));
else
@@ -356,15 +356,15 @@ static int process_ipmovie_chunk(IPMVEContext *s, AVIOContext *pb,
s->audio_bits = (((audio_flags >> 1) & 1) + 1) * 8;
/* bit 2 indicates compressed audio in version 1 opcode */
if ((opcode_version == 1) && (audio_flags & 0x4))
- s->audio_type = CODEC_ID_INTERPLAY_DPCM;
+ s->audio_type = AV_CODEC_ID_INTERPLAY_DPCM;
else if (s->audio_bits == 16)
- s->audio_type = CODEC_ID_PCM_S16LE;
+ s->audio_type = AV_CODEC_ID_PCM_S16LE;
else
- s->audio_type = CODEC_ID_PCM_U8;
+ s->audio_type = AV_CODEC_ID_PCM_U8;
av_dlog(NULL, "audio: %d bits, %d Hz, %s, %s format\n",
s->audio_bits, s->audio_sample_rate,
(s->audio_channels == 2) ? "stereo" : "mono",
- (s->audio_type == CODEC_ID_INTERPLAY_DPCM) ?
+ (s->audio_type == AV_CODEC_ID_INTERPLAY_DPCM) ?
"Interplay audio" : "PCM");
break;
@@ -578,7 +578,7 @@ static int ipmovie_read_header(AVFormatContext *s)
avio_seek(pb, -CHUNK_PREAMBLE_SIZE, SEEK_CUR);
if (chunk_type == CHUNK_VIDEO)
- ipmovie->audio_type = CODEC_ID_NONE; /* no audio */
+ ipmovie->audio_type = AV_CODEC_ID_NONE; /* no audio */
else if (process_ipmovie_chunk(ipmovie, pb, &pkt) != CHUNK_INIT_AUDIO)
return AVERROR_INVALIDDATA;
@@ -589,7 +589,7 @@ static int ipmovie_read_header(AVFormatContext *s)
avpriv_set_pts_info(st, 63, 1, 1000000);
ipmovie->video_stream_index = st->index;
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- st->codec->codec_id = CODEC_ID_INTERPLAY_VIDEO;
+ st->codec->codec_id = AV_CODEC_ID_INTERPLAY_VIDEO;
st->codec->codec_tag = 0; /* no fourcc */
st->codec->width = ipmovie->video_width;
st->codec->height = ipmovie->video_height;
@@ -609,7 +609,7 @@ static int ipmovie_read_header(AVFormatContext *s)
st->codec->bits_per_coded_sample = ipmovie->audio_bits;
st->codec->bit_rate = st->codec->channels * st->codec->sample_rate *
st->codec->bits_per_coded_sample;
- if (st->codec->codec_id == CODEC_ID_INTERPLAY_DPCM)
+ if (st->codec->codec_id == AV_CODEC_ID_INTERPLAY_DPCM)
st->codec->bit_rate /= 2;
st->codec->block_align = st->codec->channels * st->codec->bits_per_coded_sample;
}
diff --git a/libavformat/isom.c b/libavformat/isom.c
index c110b7f6fa..caa4d17a58 100644
--- a/libavformat/isom.c
+++ b/libavformat/isom.c
@@ -33,273 +33,273 @@
/* http://www.mp4ra.org */
/* ordered by muxing preference */
const AVCodecTag ff_mp4_obj_type[] = {
- { CODEC_ID_MOV_TEXT , 0x08 },
- { CODEC_ID_MPEG4 , 0x20 },
- { CODEC_ID_H264 , 0x21 },
- { CODEC_ID_AAC , 0x40 },
- { CODEC_ID_MP4ALS , 0x40 }, /* 14496-3 ALS */
- { CODEC_ID_MPEG2VIDEO, 0x61 }, /* MPEG2 Main */
- { CODEC_ID_MPEG2VIDEO, 0x60 }, /* MPEG2 Simple */
- { CODEC_ID_MPEG2VIDEO, 0x62 }, /* MPEG2 SNR */
- { CODEC_ID_MPEG2VIDEO, 0x63 }, /* MPEG2 Spatial */
- { CODEC_ID_MPEG2VIDEO, 0x64 }, /* MPEG2 High */
- { CODEC_ID_MPEG2VIDEO, 0x65 }, /* MPEG2 422 */
- { CODEC_ID_AAC , 0x66 }, /* MPEG2 AAC Main */
- { CODEC_ID_AAC , 0x67 }, /* MPEG2 AAC Low */
- { CODEC_ID_AAC , 0x68 }, /* MPEG2 AAC SSR */
- { CODEC_ID_MP3 , 0x69 }, /* 13818-3 */
- { CODEC_ID_MP2 , 0x69 }, /* 11172-3 */
- { CODEC_ID_MPEG1VIDEO, 0x6A }, /* 11172-2 */
- { CODEC_ID_MP3 , 0x6B }, /* 11172-3 */
- { CODEC_ID_MJPEG , 0x6C }, /* 10918-1 */
- { CODEC_ID_PNG , 0x6D },
- { CODEC_ID_JPEG2000 , 0x6E }, /* 15444-1 */
- { CODEC_ID_VC1 , 0xA3 },
- { CODEC_ID_DIRAC , 0xA4 },
- { CODEC_ID_AC3 , 0xA5 },
- { CODEC_ID_DTS , 0xA9 }, /* mp4ra.org */
- { CODEC_ID_VORBIS , 0xDD }, /* non standard, gpac uses it */
- { CODEC_ID_DVD_SUBTITLE, 0xE0 }, /* non standard, see unsupported-embedded-subs-2.mp4 */
- { CODEC_ID_QCELP , 0xE1 },
- { CODEC_ID_MPEG4SYSTEMS, 0x01 },
- { CODEC_ID_MPEG4SYSTEMS, 0x02 },
- { CODEC_ID_NONE , 0 },
+ { AV_CODEC_ID_MOV_TEXT , 0x08 },
+ { AV_CODEC_ID_MPEG4 , 0x20 },
+ { AV_CODEC_ID_H264 , 0x21 },
+ { AV_CODEC_ID_AAC , 0x40 },
+ { AV_CODEC_ID_MP4ALS , 0x40 }, /* 14496-3 ALS */
+ { AV_CODEC_ID_MPEG2VIDEO , 0x61 }, /* MPEG2 Main */
+ { AV_CODEC_ID_MPEG2VIDEO , 0x60 }, /* MPEG2 Simple */
+ { AV_CODEC_ID_MPEG2VIDEO , 0x62 }, /* MPEG2 SNR */
+ { AV_CODEC_ID_MPEG2VIDEO , 0x63 }, /* MPEG2 Spatial */
+ { AV_CODEC_ID_MPEG2VIDEO , 0x64 }, /* MPEG2 High */
+ { AV_CODEC_ID_MPEG2VIDEO , 0x65 }, /* MPEG2 422 */
+ { AV_CODEC_ID_AAC , 0x66 }, /* MPEG2 AAC Main */
+ { AV_CODEC_ID_AAC , 0x67 }, /* MPEG2 AAC Low */
+ { AV_CODEC_ID_AAC , 0x68 }, /* MPEG2 AAC SSR */
+ { AV_CODEC_ID_MP3 , 0x69 }, /* 13818-3 */
+ { AV_CODEC_ID_MP2 , 0x69 }, /* 11172-3 */
+ { AV_CODEC_ID_MPEG1VIDEO , 0x6A }, /* 11172-2 */
+ { AV_CODEC_ID_MP3 , 0x6B }, /* 11172-3 */
+ { AV_CODEC_ID_MJPEG , 0x6C }, /* 10918-1 */
+ { AV_CODEC_ID_PNG , 0x6D },
+ { AV_CODEC_ID_JPEG2000 , 0x6E }, /* 15444-1 */
+ { AV_CODEC_ID_VC1 , 0xA3 },
+ { AV_CODEC_ID_DIRAC , 0xA4 },
+ { AV_CODEC_ID_AC3 , 0xA5 },
+ { AV_CODEC_ID_DTS , 0xA9 }, /* mp4ra.org */
+ { AV_CODEC_ID_VORBIS , 0xDD }, /* non standard, gpac uses it */
+ { AV_CODEC_ID_DVD_SUBTITLE, 0xE0 }, /* non standard, see unsupported-embedded-subs-2.mp4 */
+ { AV_CODEC_ID_QCELP , 0xE1 },
+ { AV_CODEC_ID_MPEG4SYSTEMS, 0x01 },
+ { AV_CODEC_ID_MPEG4SYSTEMS, 0x02 },
+ { AV_CODEC_ID_NONE , 0 },
};
const AVCodecTag ff_codec_movvideo_tags[] = {
-/* { CODEC_ID_, MKTAG('I', 'V', '5', '0') }, *//* Indeo 5.0 */
-
- { CODEC_ID_RAWVIDEO, MKTAG('r', 'a', 'w', ' ') }, /* Uncompressed RGB */
- { CODEC_ID_RAWVIDEO, MKTAG('y', 'u', 'v', '2') }, /* Uncompressed YUV422 */
- { CODEC_ID_RAWVIDEO, MKTAG('2', 'v', 'u', 'y') }, /* UNCOMPRESSED 8BIT 4:2:2 */
- { CODEC_ID_RAWVIDEO, MKTAG('y', 'u', 'v', 's') }, /* same as 2vuy but byte swapped */
-
- { CODEC_ID_RAWVIDEO, MKTAG('L', '5', '5', '5') },
- { CODEC_ID_RAWVIDEO, MKTAG('L', '5', '6', '5') },
- { CODEC_ID_RAWVIDEO, MKTAG('B', '5', '6', '5') },
- { CODEC_ID_RAWVIDEO, MKTAG('2', '4', 'B', 'G') },
- { CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 'A') },
- { CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 'A') },
- { CODEC_ID_RAWVIDEO, MKTAG('A', 'B', 'G', 'R') },
- { CODEC_ID_RAWVIDEO, MKTAG('b', '1', '6', 'g') },
- { CODEC_ID_RAWVIDEO, MKTAG('b', '4', '8', 'r') },
- { CODEC_ID_RAWVIDEO, MKTAG('b', 'x', 'b', 'g') },
- { CODEC_ID_RAWVIDEO, MKTAG('b', 'x', 'r', 'g') },
- { CODEC_ID_RAWVIDEO, MKTAG('b', 'x', 'y', 'v') },
- { CODEC_ID_RAWVIDEO, MKTAG('N', 'O', '1', '6') },
- { CODEC_ID_RAWVIDEO, MKTAG('D', 'V', 'O', 'O') }, /* Digital Voodoo SD 8 Bit */
- { CODEC_ID_RAWVIDEO, MKTAG('R', '4', '2', '0') }, /* Radius DV YUV PAL */
- { CODEC_ID_RAWVIDEO, MKTAG('R', '4', '1', '1') }, /* Radius DV YUV NTSC */
-
- { CODEC_ID_R10K, MKTAG('R', '1', '0', 'k') }, /* UNCOMPRESSED 10BIT RGB */
- { CODEC_ID_R10K, MKTAG('R', '1', '0', 'g') }, /* UNCOMPRESSED 10BIT RGB */
- { CODEC_ID_R210, MKTAG('r', '2', '1', '0') }, /* UNCOMPRESSED 10BIT RGB */
- { CODEC_ID_AVUI, MKTAG('A', 'V', 'U', 'I') }, /* AVID Uncompressed deinterleaved UYVY422 */
- { CODEC_ID_AVRP, MKTAG('A', 'V', 'r', 'p') }, /* Avid 1:1 10-bit RGB Packer */
- { CODEC_ID_AVRP, MKTAG('S', 'U', 'D', 'S') }, /* Avid DS Uncompressed */
- { CODEC_ID_V210, MKTAG('v', '2', '1', '0') }, /* UNCOMPRESSED 10BIT 4:2:2 */
- { CODEC_ID_V210, MKTAG('b', 'x', 'y', '2') }, /* BOXX 10BIT 4:2:2 */
- { CODEC_ID_V308, MKTAG('v', '3', '0', '8') }, /* UNCOMPRESSED 8BIT 4:4:4 */
- { CODEC_ID_V408, MKTAG('v', '4', '0', '8') }, /* UNCOMPRESSED 8BIT 4:4:4:4 */
- { CODEC_ID_V410, MKTAG('v', '4', '1', '0') }, /* UNCOMPRESSED 10BIT 4:4:4 */
- { CODEC_ID_Y41P, MKTAG('Y', '4', '1', 'P') }, /* UNCOMPRESSED 12BIT 4:1:1 */
- { CODEC_ID_YUV4, MKTAG('y', 'u', 'v', '4') }, /* libquicktime packed yuv420p */
-
- { CODEC_ID_MJPEG, MKTAG('j', 'p', 'e', 'g') }, /* PhotoJPEG */
- { CODEC_ID_MJPEG, MKTAG('m', 'j', 'p', 'a') }, /* Motion-JPEG (format A) */
- { CODEC_ID_MJPEG, MKTAG('A', 'V', 'D', 'J') }, /* MJPEG with alpha-channel (AVID JFIF meridien compressed) */
-/* { CODEC_ID_MJPEG, MKTAG('A', 'V', 'R', 'n') }, *//* MJPEG with alpha-channel (AVID ABVB/Truevision NuVista) */
- { CODEC_ID_MJPEG, MKTAG('d', 'm', 'b', '1') }, /* Motion JPEG OpenDML */
- { CODEC_ID_MJPEGB, MKTAG('m', 'j', 'p', 'b') }, /* Motion-JPEG (format B) */
-
- { CODEC_ID_SVQ1, MKTAG('S', 'V', 'Q', '1') }, /* Sorenson Video v1 */
- { CODEC_ID_SVQ1, MKTAG('s', 'v', 'q', '1') }, /* Sorenson Video v1 */
- { CODEC_ID_SVQ1, MKTAG('s', 'v', 'q', 'i') }, /* Sorenson Video v1 (from QT specs)*/
- { CODEC_ID_SVQ3, MKTAG('S', 'V', 'Q', '3') }, /* Sorenson Video v3 */
-
- { CODEC_ID_MPEG4, MKTAG('m', 'p', '4', 'v') },
- { CODEC_ID_MPEG4, MKTAG('D', 'I', 'V', 'X') }, /* OpenDiVX *//* sample files at http://heroinewarrior.com/xmovie.php3 use this tag */
- { CODEC_ID_MPEG4, MKTAG('X', 'V', 'I', 'D') },
- { CODEC_ID_MPEG4, MKTAG('3', 'I', 'V', '2') }, /* experimental: 3IVX files before ivx D4 4.5.1 */
-
- { CODEC_ID_H263, MKTAG('h', '2', '6', '3') }, /* H263 */
- { CODEC_ID_H263, MKTAG('s', '2', '6', '3') }, /* H263 ?? works */
-
- { CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'c', 'p') }, /* DV PAL */
- { CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'c', ' ') }, /* DV NTSC */
- { CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'p', 'p') }, /* DVCPRO PAL produced by FCP */
- { CODEC_ID_DVVIDEO, MKTAG('d', 'v', '5', 'p') }, /* DVCPRO50 PAL produced by FCP */
- { CODEC_ID_DVVIDEO, MKTAG('d', 'v', '5', 'n') }, /* DVCPRO50 NTSC produced by FCP */
- { CODEC_ID_DVVIDEO, MKTAG('A', 'V', 'd', 'v') }, /* AVID DV */
- { CODEC_ID_DVVIDEO, MKTAG('A', 'V', 'd', '1') }, /* AVID DV100 */
- { CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'h', 'q') }, /* DVCPRO HD 720p50 */
- { CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'h', 'p') }, /* DVCPRO HD 720p60 */
- { CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'h', '1') },
- { CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'h', '2') },
- { CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'h', '4') },
- { CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'h', '5') }, /* DVCPRO HD 50i produced by FCP */
- { CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'h', '6') }, /* DVCPRO HD 60i produced by FCP */
- { CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'h', '3') }, /* DVCPRO HD 30p produced by FCP */
-
- { CODEC_ID_VP3, MKTAG('V', 'P', '3', '1') }, /* On2 VP3 */
- { CODEC_ID_RPZA, MKTAG('r', 'p', 'z', 'a') }, /* Apple Video (RPZA) */
- { CODEC_ID_CINEPAK, MKTAG('c', 'v', 'i', 'd') }, /* Cinepak */
- { CODEC_ID_8BPS, MKTAG('8', 'B', 'P', 'S') }, /* Planar RGB (8BPS) */
- { CODEC_ID_SMC, MKTAG('s', 'm', 'c', ' ') }, /* Apple Graphics (SMC) */
- { CODEC_ID_QTRLE, MKTAG('r', 'l', 'e', ' ') }, /* Apple Animation (RLE) */
- { CODEC_ID_MSRLE, MKTAG('W', 'R', 'L', 'E') },
- { CODEC_ID_QDRAW, MKTAG('q', 'd', 'r', 'w') }, /* QuickDraw */
-
- { CODEC_ID_RAWVIDEO, MKTAG('W', 'R', 'A', 'W') },
-
- { CODEC_ID_H264, MKTAG('a', 'v', 'c', '1') }, /* AVC-1/H.264 */
- { CODEC_ID_H264, MKTAG('a', 'i', '5', 'p') }, /* AVC-Intra 50M 720p24/30/60 */
- { CODEC_ID_H264, MKTAG('a', 'i', '5', 'q') }, /* AVC-Intra 50M 720p25/50 */
- { CODEC_ID_H264, MKTAG('a', 'i', '5', '2') }, /* AVC-Intra 50M 1080p25/50 */
- { CODEC_ID_H264, MKTAG('a', 'i', '5', '3') }, /* AVC-Intra 50M 1080p24/30/60 */
- { CODEC_ID_H264, MKTAG('a', 'i', '5', '5') }, /* AVC-Intra 50M 1080i50 */
- { CODEC_ID_H264, MKTAG('a', 'i', '5', '6') }, /* AVC-Intra 50M 1080i60 */
- { CODEC_ID_H264, MKTAG('a', 'i', '1', 'p') }, /* AVC-Intra 100M 720p24/30/60 */
- { CODEC_ID_H264, MKTAG('a', 'i', '1', 'q') }, /* AVC-Intra 100M 720p25/50 */
- { CODEC_ID_H264, MKTAG('a', 'i', '1', '2') }, /* AVC-Intra 100M 1080p25/50 */
- { CODEC_ID_H264, MKTAG('a', 'i', '1', '3') }, /* AVC-Intra 100M 1080p24/30/60 */
- { CODEC_ID_H264, MKTAG('a', 'i', '1', '5') }, /* AVC-Intra 100M 1080i50 */
- { CODEC_ID_H264, MKTAG('a', 'i', '1', '6') }, /* AVC-Intra 100M 1080i60 */
-
- { CODEC_ID_MPEG1VIDEO, MKTAG('m', '1', 'v', '1') }, /* Apple MPEG-1 Camcorder */
- { CODEC_ID_MPEG1VIDEO, MKTAG('m', 'p', 'e', 'g') }, /* MPEG */
- { CODEC_ID_MPEG1VIDEO, MKTAG('m', '1', 'v', ' ') },
- { CODEC_ID_MPEG2VIDEO, MKTAG('m', '2', 'v', '1') }, /* Apple MPEG-2 Camcorder */
- { CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '1') }, /* MPEG2 HDV 720p30 */
- { CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '2') }, /* MPEG2 HDV 1080i60 */
- { CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '3') }, /* MPEG2 HDV 1080i50 */
- { CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '4') }, /* MPEG2 HDV 720p24 */
- { CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '5') }, /* MPEG2 HDV 720p25 */
- { CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '6') }, /* MPEG2 HDV 1080p24 */
- { CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '7') }, /* MPEG2 HDV 1080p25 */
- { CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '8') }, /* MPEG2 HDV 1080p30 */
- { CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '9') }, /* MPEG2 HDV 720p60 JVC */
- { CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', 'a') }, /* MPEG2 HDV 720p50 */
- { CODEC_ID_MPEG2VIDEO, MKTAG('m', 'x', '5', 'n') }, /* MPEG2 IMX NTSC 525/60 50mb/s produced by FCP */
- { CODEC_ID_MPEG2VIDEO, MKTAG('m', 'x', '5', 'p') }, /* MPEG2 IMX PAL 625/50 50mb/s produced by FCP */
- { CODEC_ID_MPEG2VIDEO, MKTAG('m', 'x', '4', 'n') }, /* MPEG2 IMX NTSC 525/60 40mb/s produced by FCP */
- { CODEC_ID_MPEG2VIDEO, MKTAG('m', 'x', '4', 'p') }, /* MPEG2 IMX PAL 625/50 40mb/s produced by FCP */
- { CODEC_ID_MPEG2VIDEO, MKTAG('m', 'x', '3', 'n') }, /* MPEG2 IMX NTSC 525/60 30mb/s produced by FCP */
- { CODEC_ID_MPEG2VIDEO, MKTAG('m', 'x', '3', 'p') }, /* MPEG2 IMX PAL 625/50 30mb/s produced by FCP */
- { CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', '5', '4') }, /* XDCAM HD422 720p24 CBR */
- { CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', '5', '5') }, /* XDCAM HD422 720p25 CBR */
- { CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', '5', '9') }, /* XDCAM HD422 720p60 CBR */
- { CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', '5', 'a') }, /* XDCAM HD422 720p50 CBR */
- { CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', '5', 'b') }, /* XDCAM HD422 1080i60 CBR */
- { CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', '5', 'c') }, /* XDCAM HD422 1080i50 CBR */
- { CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', '5', 'd') }, /* XDCAM HD422 1080p24 CBR */
- { CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', '5', 'e') }, /* XDCAM HD422 1080p25 CBR */
- { CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', '5', 'f') }, /* XDCAM HD422 1080p30 CBR */
- { CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'v', '1') }, /* XDCAM EX 720p30 VBR */
- { CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'v', '2') }, /* XDCAM HD 1080i60 */
- { CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'v', '3') }, /* XDCAM HD 1080i50 VBR */
- { CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'v', '4') }, /* XDCAM EX 720p24 VBR */
- { CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'v', '5') }, /* XDCAM EX 720p25 VBR */
- { CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'v', '6') }, /* XDCAM HD 1080p24 VBR */
- { CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'v', '7') }, /* XDCAM HD 1080p25 VBR */
- { CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'v', '8') }, /* XDCAM HD 1080p30 VBR */
- { CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'v', '9') }, /* XDCAM EX 720p60 VBR */
- { CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'v', 'a') }, /* XDCAM EX 720p50 VBR */
- { CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'v', 'b') }, /* XDCAM EX 1080i60 VBR */
- { CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'v', 'c') }, /* XDCAM EX 1080i50 VBR */
- { CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'v', 'd') }, /* XDCAM EX 1080p24 VBR */
- { CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'v', 'e') }, /* XDCAM EX 1080p25 VBR */
- { CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'v', 'f') }, /* XDCAM EX 1080p30 VBR */
- { CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'h', 'd') }, /* XDCAM HD 540p */
- { CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'h', '2') }, /* XDCAM HD422 540p */
- { CODEC_ID_MPEG2VIDEO, MKTAG('A', 'V', 'm', 'p') }, /* AVID IMX PAL */
-
- { CODEC_ID_JPEG2000, MKTAG('m', 'j', 'p', '2') }, /* JPEG 2000 produced by FCP */
-
- { CODEC_ID_TARGA, MKTAG('t', 'g', 'a', ' ') }, /* Truevision Targa */
- { CODEC_ID_TIFF, MKTAG('t', 'i', 'f', 'f') }, /* TIFF embedded in MOV */
- { CODEC_ID_GIF, MKTAG('g', 'i', 'f', ' ') }, /* embedded gif files as frames (usually one "click to play movie" frame) */
- { CODEC_ID_PNG, MKTAG('p', 'n', 'g', ' ') },
- { CODEC_ID_PNG, MKTAG('M', 'N', 'G', ' ') },
-
- { CODEC_ID_VC1, MKTAG('v', 'c', '-', '1') }, /* SMPTE RP 2025 */
- { CODEC_ID_CAVS, MKTAG('a', 'v', 's', '2') },
-
- { CODEC_ID_DIRAC, MKTAG('d', 'r', 'a', 'c') },
- { CODEC_ID_DNXHD, MKTAG('A', 'V', 'd', 'n') }, /* AVID DNxHD */
-// { CODEC_ID_FLV1, MKTAG('H', '2', '6', '3') }, /* Flash Media Server */
- { CODEC_ID_MSMPEG4V3, MKTAG('3', 'I', 'V', 'D') }, /* 3ivx DivX Doctor */
- { CODEC_ID_RAWVIDEO, MKTAG('A', 'V', '1', 'x') }, /* AVID 1:1x */
- { CODEC_ID_RAWVIDEO, MKTAG('A', 'V', 'u', 'p') },
- { CODEC_ID_SGI, MKTAG('s', 'g', 'i', ' ') }, /* SGI */
- { CODEC_ID_DPX, MKTAG('d', 'p', 'x', ' ') }, /* DPX */
- { CODEC_ID_EXR, MKTAG('e', 'x', 'r', ' ') }, /* OpenEXR */
-
- { CODEC_ID_PRORES, MKTAG('a', 'p', 'c', 'h') }, /* Apple ProRes 422 High Quality */
- { CODEC_ID_PRORES, MKTAG('a', 'p', 'c', 'n') }, /* Apple ProRes 422 Standard Definition */
- { CODEC_ID_PRORES, MKTAG('a', 'p', 'c', 's') }, /* Apple ProRes 422 LT */
- { CODEC_ID_PRORES, MKTAG('a', 'p', 'c', 'o') }, /* Apple ProRes 422 Proxy */
- { CODEC_ID_PRORES, MKTAG('a', 'p', '4', 'h') }, /* Apple ProRes 4444 */
- { CODEC_ID_FLIC, MKTAG('f', 'l', 'i', 'c') },
-
- { CODEC_ID_NONE, 0 },
+/* { AV_CODEC_ID_, MKTAG('I', 'V', '5', '0') }, *//* Indeo 5.0 */
+
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('r', 'a', 'w', ' ') }, /* Uncompressed RGB */
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('y', 'u', 'v', '2') }, /* Uncompressed YUV422 */
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('2', 'v', 'u', 'y') }, /* UNCOMPRESSED 8BIT 4:2:2 */
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('y', 'u', 'v', 's') }, /* same as 2vuy but byte swapped */
+
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('L', '5', '5', '5') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('L', '5', '6', '5') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('B', '5', '6', '5') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('2', '4', 'B', 'G') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 'A') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 'A') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('A', 'B', 'G', 'R') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('b', '1', '6', 'g') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('b', '4', '8', 'r') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('b', 'x', 'b', 'g') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('b', 'x', 'r', 'g') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('b', 'x', 'y', 'v') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('N', 'O', '1', '6') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('D', 'V', 'O', 'O') }, /* Digital Voodoo SD 8 Bit */
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('R', '4', '2', '0') }, /* Radius DV YUV PAL */
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('R', '4', '1', '1') }, /* Radius DV YUV NTSC */
+
+ { AV_CODEC_ID_R10K, MKTAG('R', '1', '0', 'k') }, /* UNCOMPRESSED 10BIT RGB */
+ { AV_CODEC_ID_R10K, MKTAG('R', '1', '0', 'g') }, /* UNCOMPRESSED 10BIT RGB */
+ { AV_CODEC_ID_R210, MKTAG('r', '2', '1', '0') }, /* UNCOMPRESSED 10BIT RGB */
+ { AV_CODEC_ID_AVUI, MKTAG('A', 'V', 'U', 'I') }, /* AVID Uncompressed deinterleaved UYVY422 */
+ { AV_CODEC_ID_AVRP, MKTAG('A', 'V', 'r', 'p') }, /* Avid 1:1 10-bit RGB Packer */
+ { AV_CODEC_ID_AVRP, MKTAG('S', 'U', 'D', 'S') }, /* Avid DS Uncompressed */
+ { AV_CODEC_ID_V210, MKTAG('v', '2', '1', '0') }, /* UNCOMPRESSED 10BIT 4:2:2 */
+ { AV_CODEC_ID_V210, MKTAG('b', 'x', 'y', '2') }, /* BOXX 10BIT 4:2:2 */
+ { AV_CODEC_ID_V308, MKTAG('v', '3', '0', '8') }, /* UNCOMPRESSED 8BIT 4:4:4 */
+ { AV_CODEC_ID_V408, MKTAG('v', '4', '0', '8') }, /* UNCOMPRESSED 8BIT 4:4:4:4 */
+ { AV_CODEC_ID_V410, MKTAG('v', '4', '1', '0') }, /* UNCOMPRESSED 10BIT 4:4:4 */
+ { AV_CODEC_ID_Y41P, MKTAG('Y', '4', '1', 'P') }, /* UNCOMPRESSED 12BIT 4:1:1 */
+ { AV_CODEC_ID_YUV4, MKTAG('y', 'u', 'v', '4') }, /* libquicktime packed yuv420p */
+
+ { AV_CODEC_ID_MJPEG, MKTAG('j', 'p', 'e', 'g') }, /* PhotoJPEG */
+ { AV_CODEC_ID_MJPEG, MKTAG('m', 'j', 'p', 'a') }, /* Motion-JPEG (format A) */
+ { AV_CODEC_ID_MJPEG, MKTAG('A', 'V', 'D', 'J') }, /* MJPEG with alpha-channel (AVID JFIF meridien compressed) */
+/* { AV_CODEC_ID_MJPEG, MKTAG('A', 'V', 'R', 'n') }, *//* MJPEG with alpha-channel (AVID ABVB/Truevision NuVista) */
+ { AV_CODEC_ID_MJPEG, MKTAG('d', 'm', 'b', '1') }, /* Motion JPEG OpenDML */
+ { AV_CODEC_ID_MJPEGB, MKTAG('m', 'j', 'p', 'b') }, /* Motion-JPEG (format B) */
+
+ { AV_CODEC_ID_SVQ1, MKTAG('S', 'V', 'Q', '1') }, /* Sorenson Video v1 */
+ { AV_CODEC_ID_SVQ1, MKTAG('s', 'v', 'q', '1') }, /* Sorenson Video v1 */
+ { AV_CODEC_ID_SVQ1, MKTAG('s', 'v', 'q', 'i') }, /* Sorenson Video v1 (from QT specs)*/
+ { AV_CODEC_ID_SVQ3, MKTAG('S', 'V', 'Q', '3') }, /* Sorenson Video v3 */
+
+ { AV_CODEC_ID_MPEG4, MKTAG('m', 'p', '4', 'v') },
+ { AV_CODEC_ID_MPEG4, MKTAG('D', 'I', 'V', 'X') }, /* OpenDiVX *//* sample files at http://heroinewarrior.com/xmovie.php3 use this tag */
+ { AV_CODEC_ID_MPEG4, MKTAG('X', 'V', 'I', 'D') },
+ { AV_CODEC_ID_MPEG4, MKTAG('3', 'I', 'V', '2') }, /* experimental: 3IVX files before ivx D4 4.5.1 */
+
+ { AV_CODEC_ID_H263, MKTAG('h', '2', '6', '3') }, /* H263 */
+ { AV_CODEC_ID_H263, MKTAG('s', '2', '6', '3') }, /* H263 ?? works */
+
+ { AV_CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'c', 'p') }, /* DV PAL */
+ { AV_CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'c', ' ') }, /* DV NTSC */
+ { AV_CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'p', 'p') }, /* DVCPRO PAL produced by FCP */
+ { AV_CODEC_ID_DVVIDEO, MKTAG('d', 'v', '5', 'p') }, /* DVCPRO50 PAL produced by FCP */
+ { AV_CODEC_ID_DVVIDEO, MKTAG('d', 'v', '5', 'n') }, /* DVCPRO50 NTSC produced by FCP */
+ { AV_CODEC_ID_DVVIDEO, MKTAG('A', 'V', 'd', 'v') }, /* AVID DV */
+ { AV_CODEC_ID_DVVIDEO, MKTAG('A', 'V', 'd', '1') }, /* AVID DV100 */
+ { AV_CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'h', 'q') }, /* DVCPRO HD 720p50 */
+ { AV_CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'h', 'p') }, /* DVCPRO HD 720p60 */
+ { AV_CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'h', '1') },
+ { AV_CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'h', '2') },
+ { AV_CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'h', '4') },
+ { AV_CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'h', '5') }, /* DVCPRO HD 50i produced by FCP */
+ { AV_CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'h', '6') }, /* DVCPRO HD 60i produced by FCP */
+ { AV_CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'h', '3') }, /* DVCPRO HD 30p produced by FCP */
+
+ { AV_CODEC_ID_VP3, MKTAG('V', 'P', '3', '1') }, /* On2 VP3 */
+ { AV_CODEC_ID_RPZA, MKTAG('r', 'p', 'z', 'a') }, /* Apple Video (RPZA) */
+ { AV_CODEC_ID_CINEPAK, MKTAG('c', 'v', 'i', 'd') }, /* Cinepak */
+ { AV_CODEC_ID_8BPS, MKTAG('8', 'B', 'P', 'S') }, /* Planar RGB (8BPS) */
+ { AV_CODEC_ID_SMC, MKTAG('s', 'm', 'c', ' ') }, /* Apple Graphics (SMC) */
+ { AV_CODEC_ID_QTRLE, MKTAG('r', 'l', 'e', ' ') }, /* Apple Animation (RLE) */
+ { AV_CODEC_ID_MSRLE, MKTAG('W', 'R', 'L', 'E') },
+ { AV_CODEC_ID_QDRAW, MKTAG('q', 'd', 'r', 'w') }, /* QuickDraw */
+
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('W', 'R', 'A', 'W') },
+
+ { AV_CODEC_ID_H264, MKTAG('a', 'v', 'c', '1') }, /* AVC-1/H.264 */
+ { AV_CODEC_ID_H264, MKTAG('a', 'i', '5', 'p') }, /* AVC-Intra 50M 720p24/30/60 */
+ { AV_CODEC_ID_H264, MKTAG('a', 'i', '5', 'q') }, /* AVC-Intra 50M 720p25/50 */
+ { AV_CODEC_ID_H264, MKTAG('a', 'i', '5', '2') }, /* AVC-Intra 50M 1080p25/50 */
+ { AV_CODEC_ID_H264, MKTAG('a', 'i', '5', '3') }, /* AVC-Intra 50M 1080p24/30/60 */
+ { AV_CODEC_ID_H264, MKTAG('a', 'i', '5', '5') }, /* AVC-Intra 50M 1080i50 */
+ { AV_CODEC_ID_H264, MKTAG('a', 'i', '5', '6') }, /* AVC-Intra 50M 1080i60 */
+ { AV_CODEC_ID_H264, MKTAG('a', 'i', '1', 'p') }, /* AVC-Intra 100M 720p24/30/60 */
+ { AV_CODEC_ID_H264, MKTAG('a', 'i', '1', 'q') }, /* AVC-Intra 100M 720p25/50 */
+ { AV_CODEC_ID_H264, MKTAG('a', 'i', '1', '2') }, /* AVC-Intra 100M 1080p25/50 */
+ { AV_CODEC_ID_H264, MKTAG('a', 'i', '1', '3') }, /* AVC-Intra 100M 1080p24/30/60 */
+ { AV_CODEC_ID_H264, MKTAG('a', 'i', '1', '5') }, /* AVC-Intra 100M 1080i50 */
+ { AV_CODEC_ID_H264, MKTAG('a', 'i', '1', '6') }, /* AVC-Intra 100M 1080i60 */
+
+ { AV_CODEC_ID_MPEG1VIDEO, MKTAG('m', '1', 'v', '1') }, /* Apple MPEG-1 Camcorder */
+ { AV_CODEC_ID_MPEG1VIDEO, MKTAG('m', 'p', 'e', 'g') }, /* MPEG */
+ { AV_CODEC_ID_MPEG1VIDEO, MKTAG('m', '1', 'v', ' ') },
+ { AV_CODEC_ID_MPEG2VIDEO, MKTAG('m', '2', 'v', '1') }, /* Apple MPEG-2 Camcorder */
+ { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '1') }, /* MPEG2 HDV 720p30 */
+ { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '2') }, /* MPEG2 HDV 1080i60 */
+ { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '3') }, /* MPEG2 HDV 1080i50 */
+ { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '4') }, /* MPEG2 HDV 720p24 */
+ { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '5') }, /* MPEG2 HDV 720p25 */
+ { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '6') }, /* MPEG2 HDV 1080p24 */
+ { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '7') }, /* MPEG2 HDV 1080p25 */
+ { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '8') }, /* MPEG2 HDV 1080p30 */
+ { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '9') }, /* MPEG2 HDV 720p60 JVC */
+ { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', 'a') }, /* MPEG2 HDV 720p50 */
+ { AV_CODEC_ID_MPEG2VIDEO, MKTAG('m', 'x', '5', 'n') }, /* MPEG2 IMX NTSC 525/60 50mb/s produced by FCP */
+ { AV_CODEC_ID_MPEG2VIDEO, MKTAG('m', 'x', '5', 'p') }, /* MPEG2 IMX PAL 625/50 50mb/s produced by FCP */
+ { AV_CODEC_ID_MPEG2VIDEO, MKTAG('m', 'x', '4', 'n') }, /* MPEG2 IMX NTSC 525/60 40mb/s produced by FCP */
+ { AV_CODEC_ID_MPEG2VIDEO, MKTAG('m', 'x', '4', 'p') }, /* MPEG2 IMX PAL 625/50 40mb/s produced by FCP */
+ { AV_CODEC_ID_MPEG2VIDEO, MKTAG('m', 'x', '3', 'n') }, /* MPEG2 IMX NTSC 525/60 30mb/s produced by FCP */
+ { AV_CODEC_ID_MPEG2VIDEO, MKTAG('m', 'x', '3', 'p') }, /* MPEG2 IMX PAL 625/50 30mb/s produced by FCP */
+ { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', '5', '4') }, /* XDCAM HD422 720p24 CBR */
+ { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', '5', '5') }, /* XDCAM HD422 720p25 CBR */
+ { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', '5', '9') }, /* XDCAM HD422 720p60 CBR */
+ { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', '5', 'a') }, /* XDCAM HD422 720p50 CBR */
+ { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', '5', 'b') }, /* XDCAM HD422 1080i60 CBR */
+ { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', '5', 'c') }, /* XDCAM HD422 1080i50 CBR */
+ { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', '5', 'd') }, /* XDCAM HD422 1080p24 CBR */
+ { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', '5', 'e') }, /* XDCAM HD422 1080p25 CBR */
+ { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', '5', 'f') }, /* XDCAM HD422 1080p30 CBR */
+ { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'v', '1') }, /* XDCAM EX 720p30 VBR */
+ { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'v', '2') }, /* XDCAM HD 1080i60 */
+ { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'v', '3') }, /* XDCAM HD 1080i50 VBR */
+ { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'v', '4') }, /* XDCAM EX 720p24 VBR */
+ { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'v', '5') }, /* XDCAM EX 720p25 VBR */
+ { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'v', '6') }, /* XDCAM HD 1080p24 VBR */
+ { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'v', '7') }, /* XDCAM HD 1080p25 VBR */
+ { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'v', '8') }, /* XDCAM HD 1080p30 VBR */
+ { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'v', '9') }, /* XDCAM EX 720p60 VBR */
+ { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'v', 'a') }, /* XDCAM EX 720p50 VBR */
+ { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'v', 'b') }, /* XDCAM EX 1080i60 VBR */
+ { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'v', 'c') }, /* XDCAM EX 1080i50 VBR */
+ { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'v', 'd') }, /* XDCAM EX 1080p24 VBR */
+ { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'v', 'e') }, /* XDCAM EX 1080p25 VBR */
+ { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'v', 'f') }, /* XDCAM EX 1080p30 VBR */
+ { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'h', 'd') }, /* XDCAM HD 540p */
+ { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', 'h', '2') }, /* XDCAM HD422 540p */
+ { AV_CODEC_ID_MPEG2VIDEO, MKTAG('A', 'V', 'm', 'p') }, /* AVID IMX PAL */
+
+ { AV_CODEC_ID_JPEG2000, MKTAG('m', 'j', 'p', '2') }, /* JPEG 2000 produced by FCP */
+
+ { AV_CODEC_ID_TARGA, MKTAG('t', 'g', 'a', ' ') }, /* Truevision Targa */
+ { AV_CODEC_ID_TIFF, MKTAG('t', 'i', 'f', 'f') }, /* TIFF embedded in MOV */
+ { AV_CODEC_ID_GIF, MKTAG('g', 'i', 'f', ' ') }, /* embedded gif files as frames (usually one "click to play movie" frame) */
+ { AV_CODEC_ID_PNG, MKTAG('p', 'n', 'g', ' ') },
+ { AV_CODEC_ID_PNG, MKTAG('M', 'N', 'G', ' ') },
+
+ { AV_CODEC_ID_VC1, MKTAG('v', 'c', '-', '1') }, /* SMPTE RP 2025 */
+ { AV_CODEC_ID_CAVS, MKTAG('a', 'v', 's', '2') },
+
+ { AV_CODEC_ID_DIRAC, MKTAG('d', 'r', 'a', 'c') },
+ { AV_CODEC_ID_DNXHD, MKTAG('A', 'V', 'd', 'n') }, /* AVID DNxHD */
+// { AV_CODEC_ID_FLV1, MKTAG('H', '2', '6', '3') }, /* Flash Media Server */
+ { AV_CODEC_ID_MSMPEG4V3, MKTAG('3', 'I', 'V', 'D') }, /* 3ivx DivX Doctor */
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('A', 'V', '1', 'x') }, /* AVID 1:1x */
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('A', 'V', 'u', 'p') },
+ { AV_CODEC_ID_SGI, MKTAG('s', 'g', 'i', ' ') }, /* SGI */
+ { AV_CODEC_ID_DPX, MKTAG('d', 'p', 'x', ' ') }, /* DPX */
+ { AV_CODEC_ID_EXR, MKTAG('e', 'x', 'r', ' ') }, /* OpenEXR */
+
+ { AV_CODEC_ID_PRORES, MKTAG('a', 'p', 'c', 'h') }, /* Apple ProRes 422 High Quality */
+ { AV_CODEC_ID_PRORES, MKTAG('a', 'p', 'c', 'n') }, /* Apple ProRes 422 Standard Definition */
+ { AV_CODEC_ID_PRORES, MKTAG('a', 'p', 'c', 's') }, /* Apple ProRes 422 LT */
+ { AV_CODEC_ID_PRORES, MKTAG('a', 'p', 'c', 'o') }, /* Apple ProRes 422 Proxy */
+ { AV_CODEC_ID_PRORES, MKTAG('a', 'p', '4', 'h') }, /* Apple ProRes 4444 */
+ { AV_CODEC_ID_FLIC, MKTAG('f', 'l', 'i', 'c') },
+
+ { AV_CODEC_ID_NONE, 0 },
};
const AVCodecTag ff_codec_movaudio_tags[] = {
- { CODEC_ID_AAC, MKTAG('m', 'p', '4', 'a') },
- { CODEC_ID_AC3, MKTAG('a', 'c', '-', '3') }, /* ETSI TS 102 366 Annex F */
- { CODEC_ID_AC3, MKTAG('s', 'a', 'c', '3') }, /* Nero Recode */
- { CODEC_ID_ADPCM_IMA_QT, MKTAG('i', 'm', 'a', '4') },
- { CODEC_ID_ALAC, MKTAG('a', 'l', 'a', 'c') },
- { CODEC_ID_AMR_NB, MKTAG('s', 'a', 'm', 'r') }, /* AMR-NB 3gp */
- { CODEC_ID_AMR_WB, MKTAG('s', 'a', 'w', 'b') }, /* AMR-WB 3gp */
- { CODEC_ID_DTS, MKTAG('d', 't', 's', 'c') }, /* DTS formats prior to DTS-HD */
- { CODEC_ID_DTS, MKTAG('d', 't', 's', 'h') }, /* DTS-HD audio formats */
- { CODEC_ID_DTS, MKTAG('d', 't', 's', 'l') }, /* DTS-HD Lossless formats */
- { CODEC_ID_DTS, MKTAG('D', 'T', 'S', ' ') }, /* non-standard */
- { CODEC_ID_EAC3, MKTAG('e', 'c', '-', '3') }, /* ETSI TS 102 366 Annex F (only valid in ISOBMFF) */
- { CODEC_ID_DVAUDIO, MKTAG('v', 'd', 'v', 'a') },
- { CODEC_ID_DVAUDIO, MKTAG('d', 'v', 'c', 'a') },
- { CODEC_ID_GSM, MKTAG('a', 'g', 's', 'm') },
- { CODEC_ID_ILBC, MKTAG('i', 'l', 'b', 'c') },
- { CODEC_ID_MACE3, MKTAG('M', 'A', 'C', '3') },
- { CODEC_ID_MACE6, MKTAG('M', 'A', 'C', '6') },
- { CODEC_ID_MP1, MKTAG('.', 'm', 'p', '1') },
- { CODEC_ID_MP2, MKTAG('.', 'm', 'p', '2') },
- { CODEC_ID_MP3, MKTAG('.', 'm', 'p', '3') },
- { CODEC_ID_MP3, 0x6D730055 },
- { CODEC_ID_NELLYMOSER, MKTAG('n', 'm', 'o', 's') }, /* Flash Media Server */
- { CODEC_ID_PCM_ALAW, MKTAG('a', 'l', 'a', 'w') },
- { CODEC_ID_PCM_F32BE, MKTAG('f', 'l', '3', '2') },
- { CODEC_ID_PCM_F32LE, MKTAG('f', 'l', '3', '2') },
- { CODEC_ID_PCM_F64BE, MKTAG('f', 'l', '6', '4') },
- { CODEC_ID_PCM_F64LE, MKTAG('f', 'l', '6', '4') },
- { CODEC_ID_PCM_MULAW, MKTAG('u', 'l', 'a', 'w') },
- { CODEC_ID_PCM_S16BE, MKTAG('t', 'w', 'o', 's') },
- { CODEC_ID_PCM_S16LE, MKTAG('s', 'o', 'w', 't') },
- { CODEC_ID_PCM_S16LE, MKTAG('l', 'p', 'c', 'm') },
- { CODEC_ID_PCM_S24BE, MKTAG('i', 'n', '2', '4') },
- { CODEC_ID_PCM_S24LE, MKTAG('i', 'n', '2', '4') },
- { CODEC_ID_PCM_S32BE, MKTAG('i', 'n', '3', '2') },
- { CODEC_ID_PCM_S32LE, MKTAG('i', 'n', '3', '2') },
- { CODEC_ID_PCM_S8, MKTAG('s', 'o', 'w', 't') },
- { CODEC_ID_PCM_U8, MKTAG('r', 'a', 'w', ' ') },
- { CODEC_ID_PCM_U8, MKTAG('N', 'O', 'N', 'E') },
- { CODEC_ID_QCELP, MKTAG('Q', 'c', 'l', 'p') },
- { CODEC_ID_QCELP, MKTAG('Q', 'c', 'l', 'q') },
- { CODEC_ID_QCELP, MKTAG('s', 'q', 'c', 'p') }, /* ISO Media fourcc */
- { CODEC_ID_QDM2, MKTAG('Q', 'D', 'M', '2') },
- { CODEC_ID_QDMC, MKTAG('Q', 'D', 'M', 'C') },
- { CODEC_ID_SPEEX, MKTAG('s', 'p', 'e', 'x') }, /* Flash Media Server */
- { CODEC_ID_WMAV2, MKTAG('W', 'M', 'A', '2') },
- { CODEC_ID_NONE, 0 },
+ { AV_CODEC_ID_AAC, MKTAG('m', 'p', '4', 'a') },
+ { AV_CODEC_ID_AC3, MKTAG('a', 'c', '-', '3') }, /* ETSI TS 102 366 Annex F */
+ { AV_CODEC_ID_AC3, MKTAG('s', 'a', 'c', '3') }, /* Nero Recode */
+ { AV_CODEC_ID_ADPCM_IMA_QT, MKTAG('i', 'm', 'a', '4') },
+ { AV_CODEC_ID_ALAC, MKTAG('a', 'l', 'a', 'c') },
+ { AV_CODEC_ID_AMR_NB, MKTAG('s', 'a', 'm', 'r') }, /* AMR-NB 3gp */
+ { AV_CODEC_ID_AMR_WB, MKTAG('s', 'a', 'w', 'b') }, /* AMR-WB 3gp */
+ { AV_CODEC_ID_DTS, MKTAG('d', 't', 's', 'c') }, /* DTS formats prior to DTS-HD */
+ { AV_CODEC_ID_DTS, MKTAG('d', 't', 's', 'h') }, /* DTS-HD audio formats */
+ { AV_CODEC_ID_DTS, MKTAG('d', 't', 's', 'l') }, /* DTS-HD Lossless formats */
+ { AV_CODEC_ID_DTS, MKTAG('D', 'T', 'S', ' ') }, /* non-standard */
+ { AV_CODEC_ID_EAC3, MKTAG('e', 'c', '-', '3') }, /* ETSI TS 102 366 Annex F (only valid in ISOBMFF) */
+ { AV_CODEC_ID_DVAUDIO, MKTAG('v', 'd', 'v', 'a') },
+ { AV_CODEC_ID_DVAUDIO, MKTAG('d', 'v', 'c', 'a') },
+ { AV_CODEC_ID_GSM, MKTAG('a', 'g', 's', 'm') },
+ { AV_CODEC_ID_ILBC, MKTAG('i', 'l', 'b', 'c') },
+ { AV_CODEC_ID_MACE3, MKTAG('M', 'A', 'C', '3') },
+ { AV_CODEC_ID_MACE6, MKTAG('M', 'A', 'C', '6') },
+ { AV_CODEC_ID_MP1, MKTAG('.', 'm', 'p', '1') },
+ { AV_CODEC_ID_MP2, MKTAG('.', 'm', 'p', '2') },
+ { AV_CODEC_ID_MP3, MKTAG('.', 'm', 'p', '3') },
+ { AV_CODEC_ID_MP3, 0x6D730055 },
+ { AV_CODEC_ID_NELLYMOSER, MKTAG('n', 'm', 'o', 's') }, /* Flash Media Server */
+ { AV_CODEC_ID_PCM_ALAW, MKTAG('a', 'l', 'a', 'w') },
+ { AV_CODEC_ID_PCM_F32BE, MKTAG('f', 'l', '3', '2') },
+ { AV_CODEC_ID_PCM_F32LE, MKTAG('f', 'l', '3', '2') },
+ { AV_CODEC_ID_PCM_F64BE, MKTAG('f', 'l', '6', '4') },
+ { AV_CODEC_ID_PCM_F64LE, MKTAG('f', 'l', '6', '4') },
+ { AV_CODEC_ID_PCM_MULAW, MKTAG('u', 'l', 'a', 'w') },
+ { AV_CODEC_ID_PCM_S16BE, MKTAG('t', 'w', 'o', 's') },
+ { AV_CODEC_ID_PCM_S16LE, MKTAG('s', 'o', 'w', 't') },
+ { AV_CODEC_ID_PCM_S16LE, MKTAG('l', 'p', 'c', 'm') },
+ { AV_CODEC_ID_PCM_S24BE, MKTAG('i', 'n', '2', '4') },
+ { AV_CODEC_ID_PCM_S24LE, MKTAG('i', 'n', '2', '4') },
+ { AV_CODEC_ID_PCM_S32BE, MKTAG('i', 'n', '3', '2') },
+ { AV_CODEC_ID_PCM_S32LE, MKTAG('i', 'n', '3', '2') },
+ { AV_CODEC_ID_PCM_S8, MKTAG('s', 'o', 'w', 't') },
+ { AV_CODEC_ID_PCM_U8, MKTAG('r', 'a', 'w', ' ') },
+ { AV_CODEC_ID_PCM_U8, MKTAG('N', 'O', 'N', 'E') },
+ { AV_CODEC_ID_QCELP, MKTAG('Q', 'c', 'l', 'p') },
+ { AV_CODEC_ID_QCELP, MKTAG('Q', 'c', 'l', 'q') },
+ { AV_CODEC_ID_QCELP, MKTAG('s', 'q', 'c', 'p') }, /* ISO Media fourcc */
+ { AV_CODEC_ID_QDM2, MKTAG('Q', 'D', 'M', '2') },
+ { AV_CODEC_ID_QDMC, MKTAG('Q', 'D', 'M', 'C') },
+ { AV_CODEC_ID_SPEEX, MKTAG('s', 'p', 'e', 'x') }, /* Flash Media Server */
+ { AV_CODEC_ID_WMAV2, MKTAG('W', 'M', 'A', '2') },
+ { AV_CODEC_ID_NONE, 0 },
};
const AVCodecTag ff_codec_movsubtitle_tags[] = {
- { CODEC_ID_MOV_TEXT, MKTAG('t', 'e', 'x', 't') },
- { CODEC_ID_MOV_TEXT, MKTAG('t', 'x', '3', 'g') },
- { CODEC_ID_EIA_608, MKTAG('c', '6', '0', '8') },
- { CODEC_ID_NONE, 0 },
+ { AV_CODEC_ID_MOV_TEXT, MKTAG('t', 'e', 'x', 't') },
+ { AV_CODEC_ID_MOV_TEXT, MKTAG('t', 'x', '3', 'g') },
+ { AV_CODEC_ID_EIA_608, MKTAG('c', '6', '0', '8') },
+ { AV_CODEC_ID_NONE, 0 },
};
/* map numeric codes from mdhd atom to ISO 639 */
@@ -416,12 +416,12 @@ void ff_mp4_parse_es_descr(AVIOContext *pb, int *es_id)
}
static const AVCodecTag mp4_audio_types[] = {
- { CODEC_ID_MP3ON4, AOT_PS }, /* old mp3on4 draft */
- { CODEC_ID_MP3ON4, AOT_L1 }, /* layer 1 */
- { CODEC_ID_MP3ON4, AOT_L2 }, /* layer 2 */
- { CODEC_ID_MP3ON4, AOT_L3 }, /* layer 3 */
- { CODEC_ID_MP4ALS, AOT_ALS }, /* MPEG-4 ALS */
- { CODEC_ID_NONE, AOT_NULL },
+ { AV_CODEC_ID_MP3ON4, AOT_PS }, /* old mp3on4 draft */
+ { AV_CODEC_ID_MP3ON4, AOT_L1 }, /* layer 1 */
+ { AV_CODEC_ID_MP3ON4, AOT_L2 }, /* layer 2 */
+ { AV_CODEC_ID_MP3ON4, AOT_L3 }, /* layer 3 */
+ { AV_CODEC_ID_MP4ALS, AOT_ALS }, /* MPEG-4 ALS */
+ { AV_CODEC_ID_NONE, AOT_NULL },
};
int ff_mp4_read_dec_config_descr(AVFormatContext *fc, AVStream *st, AVIOContext *pb)
@@ -446,7 +446,7 @@ int ff_mp4_read_dec_config_descr(AVFormatContext *fc, AVStream *st, AVIOContext
return AVERROR(ENOMEM);
avio_read(pb, st->codec->extradata, len);
st->codec->extradata_size = len;
- if (st->codec->codec_id == CODEC_ID_AAC) {
+ if (st->codec->codec_id == AV_CODEC_ID_AAC) {
MPEG4AudioConfig cfg;
avpriv_mpeg4audio_get_config(&cfg, st->codec->extradata,
st->codec->extradata_size * 8, 1);
@@ -463,7 +463,7 @@ int ff_mp4_read_dec_config_descr(AVFormatContext *fc, AVStream *st, AVIOContext
cfg.sample_rate, cfg.ext_sample_rate);
if (!(st->codec->codec_id = ff_codec_get_id(mp4_audio_types,
cfg.object_type)))
- st->codec->codec_id = CODEC_ID_AAC;
+ st->codec->codec_id = AV_CODEC_ID_AAC;
}
}
return 0;
diff --git a/libavformat/isom.h b/libavformat/isom.h
index f1cbe8c621..f7d25375a1 100644
--- a/libavformat/isom.h
+++ b/libavformat/isom.h
@@ -194,7 +194,7 @@ void ff_mp4_parse_es_descr(AVIOContext *pb, int *es_id);
#define MOV_FRAG_SAMPLE_FLAG_DEPENDS_YES 0x01000000
int ff_mov_read_esds(AVFormatContext *fc, AVIOContext *pb, MOVAtom atom);
-enum CodecID ff_mov_get_lpcm_codec_id(int bps, int flags);
+enum AVCodecID ff_mov_get_lpcm_codec_id(int bps, int flags);
int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries);
int ff_mov_read_chan(AVFormatContext *s, AVStream *st, int64_t size);
diff --git a/libavformat/iss.c b/libavformat/iss.c
index c9b7dc2d3e..4268900840 100644
--- a/libavformat/iss.c
+++ b/libavformat/iss.c
@@ -98,7 +98,7 @@ static av_cold int iss_read_header(AVFormatContext *s)
if (!st)
return AVERROR(ENOMEM);
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- st->codec->codec_id = CODEC_ID_ADPCM_IMA_ISS;
+ st->codec->codec_id = AV_CODEC_ID_ADPCM_IMA_ISS;
st->codec->channels = stereo ? 2 : 1;
st->codec->sample_rate = 44100;
if(rate_divisor > 0)
diff --git a/libavformat/iv8.c b/libavformat/iv8.c
index 6d482b9a05..38b79609f6 100644
--- a/libavformat/iv8.c
+++ b/libavformat/iv8.c
@@ -46,7 +46,7 @@ static int read_header(AVFormatContext *s)
return AVERROR(ENOMEM);
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- st->codec->codec_id = CODEC_ID_MPEG4;
+ st->codec->codec_id = AV_CODEC_ID_MPEG4;
st->need_parsing = AVSTREAM_PARSE_FULL;
avpriv_set_pts_info(st, 64, 1, 90000);
diff --git a/libavformat/ivfenc.c b/libavformat/ivfenc.c
index 8b3f3a5421..ddb205b8fa 100644
--- a/libavformat/ivfenc.c
+++ b/libavformat/ivfenc.c
@@ -30,7 +30,7 @@ static int ivf_write_header(AVFormatContext *s)
return AVERROR(EINVAL);
}
ctx = s->streams[0]->codec;
- if (ctx->codec_type != AVMEDIA_TYPE_VIDEO || ctx->codec_id != CODEC_ID_VP8) {
+ if (ctx->codec_type != AVMEDIA_TYPE_VIDEO || ctx->codec_id != AV_CODEC_ID_VP8) {
av_log(s, AV_LOG_ERROR, "Currently only VP8 is supported!\n");
return AVERROR(EINVAL);
}
@@ -62,8 +62,8 @@ AVOutputFormat ff_ivf_muxer = {
.name = "ivf",
.long_name = NULL_IF_CONFIG_SMALL("On2 IVF"),
.extensions = "ivf",
- .audio_codec = CODEC_ID_NONE,
- .video_codec = CODEC_ID_VP8,
+ .audio_codec = AV_CODEC_ID_NONE,
+ .video_codec = AV_CODEC_ID_VP8,
.write_header = ivf_write_header,
.write_packet = ivf_write_packet,
};
diff --git a/libavformat/jacosubdec.c b/libavformat/jacosubdec.c
index cc4b978dae..f9defd292d 100644
--- a/libavformat/jacosubdec.c
+++ b/libavformat/jacosubdec.c
@@ -166,7 +166,7 @@ static int jacosub_read_header(AVFormatContext *s)
return AVERROR(ENOMEM);
avpriv_set_pts_info(st, 64, 1, 100);
st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;
- st->codec->codec_id = CODEC_ID_JACOSUB;
+ st->codec->codec_id = AV_CODEC_ID_JACOSUB;
jacosub->timeres = 30;
diff --git a/libavformat/jacosubenc.c b/libavformat/jacosubenc.c
index 57866b3995..a11e45a4aa 100644
--- a/libavformat/jacosubenc.c
+++ b/libavformat/jacosubenc.c
@@ -38,5 +38,5 @@ AVOutputFormat ff_jacosub_muxer = {
.write_header = jacosub_write_header,
.write_packet = ff_raw_write_packet,
.flags = AVFMT_TS_NONSTRICT,
- .subtitle_codec = CODEC_ID_JACOSUB,
+ .subtitle_codec = AV_CODEC_ID_JACOSUB,
};
diff --git a/libavformat/jvdec.c b/libavformat/jvdec.c
index e7594b9260..2eac265de7 100644
--- a/libavformat/jvdec.c
+++ b/libavformat/jvdec.c
@@ -75,7 +75,7 @@ static int read_header(AVFormatContext *s)
return AVERROR(ENOMEM);
vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- vst->codec->codec_id = CODEC_ID_JV;
+ vst->codec->codec_id = AV_CODEC_ID_JV;
vst->codec->codec_tag = 0; /* no fourcc */
vst->codec->width = avio_rl16(pb);
vst->codec->height = avio_rl16(pb);
@@ -87,7 +87,7 @@ static int read_header(AVFormatContext *s)
avio_skip(pb, 4);
ast->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- ast->codec->codec_id = CODEC_ID_PCM_U8;
+ ast->codec->codec_id = AV_CODEC_ID_PCM_U8;
ast->codec->codec_tag = 0; /* no fourcc */
ast->codec->sample_rate = avio_rl16(pb);
ast->codec->channels = 1;
diff --git a/libavformat/latmenc.c b/libavformat/latmenc.c
index ebd60c0191..2ea801c69e 100644
--- a/libavformat/latmenc.c
+++ b/libavformat/latmenc.c
@@ -86,7 +86,7 @@ static int latm_write_header(AVFormatContext *s)
LATMContext *ctx = s->priv_data;
AVCodecContext *avctx = s->streams[0]->codec;
- if (avctx->codec_id == CODEC_ID_AAC_LATM)
+ if (avctx->codec_id == AV_CODEC_ID_AAC_LATM)
return 0;
if (avctx->extradata_size > 0 &&
@@ -149,7 +149,7 @@ static int latm_write_packet(AVFormatContext *s, AVPacket *pkt)
int i, len;
uint8_t loas_header[] = "\x56\xe0\x00";
- if (s->streams[0]->codec->codec_id == CODEC_ID_AAC_LATM)
+ if (s->streams[0]->codec->codec_id == AV_CODEC_ID_AAC_LATM)
return ff_raw_write_packet(s, pkt);
if (pkt->size > 2 && pkt->data[0] == 0xff && (pkt->data[1] >> 4) == 0xf) {
@@ -213,8 +213,8 @@ AVOutputFormat ff_latm_muxer = {
.mime_type = "audio/MP4A-LATM",
.extensions = "latm,loas",
.priv_data_size = sizeof(LATMContext),
- .audio_codec = CODEC_ID_AAC,
- .video_codec = CODEC_ID_NONE,
+ .audio_codec = AV_CODEC_ID_AAC,
+ .video_codec = AV_CODEC_ID_NONE,
.write_header = latm_write_header,
.write_packet = latm_write_packet,
.priv_class = &latm_muxer_class,
diff --git a/libavformat/libmodplug.c b/libavformat/libmodplug.c
index a662dbafbc..8065318bc1 100644
--- a/libavformat/libmodplug.c
+++ b/libavformat/libmodplug.c
@@ -224,7 +224,7 @@ static int modplug_read_header(AVFormatContext *s)
avpriv_set_pts_info(st, 64, 1, 1000);
st->duration = ModPlug_GetLength(modplug->f);
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- st->codec->codec_id = CODEC_ID_PCM_S16LE;
+ st->codec->codec_id = AV_CODEC_ID_PCM_S16LE;
st->codec->channels = settings.mChannels;
st->codec->sample_rate = settings.mFrequency;
@@ -238,7 +238,7 @@ static int modplug_read_header(AVFormatContext *s)
avpriv_set_pts_info(vst, 64, 1, 1000);
vst->duration = st->duration;
vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- vst->codec->codec_id = CODEC_ID_XBIN;
+ vst->codec->codec_id = AV_CODEC_ID_XBIN;
vst->codec->width = modplug->w << 3;
vst->codec->height = modplug->h << 3;
modplug->linesize = modplug->w * 3;
diff --git a/libavformat/libnut.c b/libavformat/libnut.c
index 7800d4a69c..838c55a403 100644
--- a/libavformat/libnut.c
+++ b/libavformat/libnut.c
@@ -39,9 +39,9 @@ typedef struct {
} NUTContext;
static const AVCodecTag nut_tags[] = {
- { CODEC_ID_MPEG4, MKTAG('m', 'p', '4', 'v') },
- { CODEC_ID_MP3, MKTAG('m', 'p', '3', ' ') },
- { CODEC_ID_VORBIS, MKTAG('v', 'r', 'b', 's') },
+ { AV_CODEC_ID_MPEG4, MKTAG('m', 'p', '4', 'v') },
+ { AV_CODEC_ID_MP3, MKTAG('m', 'p', '3', ' ') },
+ { AV_CODEC_ID_VORBIS, MKTAG('v', 'r', 'b', 's') },
{ 0, 0 },
};
@@ -159,8 +159,8 @@ AVOutputFormat ff_libnut_muxer = {
.mime_type = "video/x-nut",
.extensions = "nut",
.priv_data_size = sizeof(NUTContext),
- .audio_codec = CODEC_ID_VORBIS,
- .video_codec = CODEC_ID_MPEG4,
+ .audio_codec = AV_CODEC_ID_VORBIS,
+ .video_codec = AV_CODEC_ID_MPEG4,
.write_header = nut_write_header,
.write_packet = nut_write_packet,
.write_trailer = nut_write_trailer,
@@ -247,14 +247,14 @@ static int nut_read_header(AVFormatContext * avf) {
switch(s[i].type) {
case NUT_AUDIO_CLASS:
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- if (st->codec->codec_id == CODEC_ID_NONE) st->codec->codec_id = ff_codec_get_id(ff_codec_wav_tags, st->codec->codec_tag);
+ if (st->codec->codec_id == AV_CODEC_ID_NONE) st->codec->codec_id = ff_codec_get_id(ff_codec_wav_tags, st->codec->codec_tag);
st->codec->channels = s[i].channel_count;
st->codec->sample_rate = s[i].samplerate_num / s[i].samplerate_denom;
break;
case NUT_VIDEO_CLASS:
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- if (st->codec->codec_id == CODEC_ID_NONE) st->codec->codec_id = ff_codec_get_id(ff_codec_bmp_tags, st->codec->codec_tag);
+ if (st->codec->codec_id == AV_CODEC_ID_NONE) st->codec->codec_id = ff_codec_get_id(ff_codec_bmp_tags, st->codec->codec_tag);
st->codec->width = s[i].width;
st->codec->height = s[i].height;
@@ -262,7 +262,7 @@ static int nut_read_header(AVFormatContext * avf) {
st->sample_aspect_ratio.den = s[i].sample_height;
break;
}
- if (st->codec->codec_id == CODEC_ID_NONE) av_log(avf, AV_LOG_ERROR, "Unknown codec?!\n");
+ if (st->codec->codec_id == AV_CODEC_ID_NONE) av_log(avf, AV_LOG_ERROR, "Unknown codec?!\n");
}
return 0;
diff --git a/libavformat/lmlm4.c b/libavformat/lmlm4.c
index 4d68eea2b8..c3eec02e8f 100644
--- a/libavformat/lmlm4.c
+++ b/libavformat/lmlm4.c
@@ -64,14 +64,14 @@ static int lmlm4_read_header(AVFormatContext *s) {
if (!(st = avformat_new_stream(s, NULL)))
return AVERROR(ENOMEM);
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- st->codec->codec_id = CODEC_ID_MPEG4;
+ st->codec->codec_id = AV_CODEC_ID_MPEG4;
st->need_parsing = AVSTREAM_PARSE_HEADERS;
avpriv_set_pts_info(st, 64, 1001, 30000);
if (!(st = avformat_new_stream(s, NULL)))
return AVERROR(ENOMEM);
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- st->codec->codec_id = CODEC_ID_MP2;
+ st->codec->codec_id = AV_CODEC_ID_MP2;
st->need_parsing = AVSTREAM_PARSE_HEADERS;
/* the parameters will be extracted from the compressed bitstream */
diff --git a/libavformat/loasdec.c b/libavformat/loasdec.c
index e8711ceb32..ccb9464c33 100644
--- a/libavformat/loasdec.c
+++ b/libavformat/loasdec.c
@@ -84,5 +84,5 @@ AVInputFormat ff_loas_demuxer = {
.read_header = loas_read_header,
.read_packet = ff_raw_read_partial_packet,
.flags= AVFMT_GENERIC_INDEX,
- .raw_codec_id = CODEC_ID_AAC_LATM,
+ .raw_codec_id = AV_CODEC_ID_AAC_LATM,
};
diff --git a/libavformat/lxfdec.c b/libavformat/lxfdec.c
index e3b7bea625..2722463ec4 100644
--- a/libavformat/lxfdec.c
+++ b/libavformat/lxfdec.c
@@ -33,17 +33,17 @@
#define LXF_MAX_AUDIO_PACKET (8008*15*4) ///< 15-channel 32-bit NTSC audio frame
static const AVCodecTag lxf_tags[] = {
- { CODEC_ID_MJPEG, 0 },
- { CODEC_ID_MPEG1VIDEO, 1 },
- { CODEC_ID_MPEG2VIDEO, 2 }, //MpMl, 4:2:0
- { CODEC_ID_MPEG2VIDEO, 3 }, //MpPl, 4:2:2
- { CODEC_ID_DVVIDEO, 4 }, //DV25
- { CODEC_ID_DVVIDEO, 5 }, //DVCPRO
- { CODEC_ID_DVVIDEO, 6 }, //DVCPRO50
- { CODEC_ID_RAWVIDEO, 7 }, //PIX_FMT_ARGB, where alpha is used for chroma keying
- { CODEC_ID_RAWVIDEO, 8 }, //16-bit chroma key
- { CODEC_ID_MPEG2VIDEO, 9 }, //4:2:2 CBP ("Constrained Bytes per Gop")
- { CODEC_ID_NONE, 0 },
+ { AV_CODEC_ID_MJPEG, 0 },
+ { AV_CODEC_ID_MPEG1VIDEO, 1 },
+ { AV_CODEC_ID_MPEG2VIDEO, 2 }, //MpMl, 4:2:0
+ { AV_CODEC_ID_MPEG2VIDEO, 3 }, //MpPl, 4:2:2
+ { AV_CODEC_ID_DVVIDEO, 4 }, //DV25
+ { AV_CODEC_ID_DVVIDEO, 5 }, //DVCPRO
+ { AV_CODEC_ID_DVVIDEO, 6 }, //DVCPRO50
+ { AV_CODEC_ID_RAWVIDEO, 7 }, //PIX_FMT_ARGB, where alpha is used for chroma keying
+ { AV_CODEC_ID_RAWVIDEO, 8 }, //16-bit chroma key
+ { AV_CODEC_ID_MPEG2VIDEO, 9 }, //4:2:2 CBP ("Constrained Bytes per Gop")
+ { AV_CODEC_ID_NONE, 0 },
};
typedef struct {
@@ -185,10 +185,10 @@ static int get_packet_header(AVFormatContext *s)
}
switch (st->codec->bits_per_coded_sample) {
- case 16: st->codec->codec_id = CODEC_ID_PCM_S16LE; break;
- case 20: st->codec->codec_id = CODEC_ID_PCM_LXF; break;
- case 24: st->codec->codec_id = CODEC_ID_PCM_S24LE; break;
- case 32: st->codec->codec_id = CODEC_ID_PCM_S32LE; break;
+ case 16: st->codec->codec_id = AV_CODEC_ID_PCM_S16LE; break;
+ case 20: st->codec->codec_id = AV_CODEC_ID_PCM_LXF; break;
+ case 24: st->codec->codec_id = AV_CODEC_ID_PCM_S24LE; break;
+ case 32: st->codec->codec_id = AV_CODEC_ID_PCM_S32LE; break;
default:
av_log(s, AV_LOG_WARNING,
"only 16-, 20-, 24- and 32-bit PCM currently supported\n");
@@ -340,7 +340,7 @@ static int lxf_read_packet(AVFormatContext *s, AVPacket *pkt)
return ret2;
//read non-20-bit audio data into lxf->temp so we can deplanarize it
- buf = ast && ast->codec->codec_id != CODEC_ID_PCM_LXF ? lxf->temp : pkt->data;
+ buf = ast && ast->codec->codec_id != AV_CODEC_ID_PCM_LXF ? lxf->temp : pkt->data;
if ((ret2 = avio_read(pb, buf, ret)) != ret) {
av_free_packet(pkt);
@@ -350,7 +350,7 @@ static int lxf_read_packet(AVFormatContext *s, AVPacket *pkt)
pkt->stream_index = stream;
if (ast) {
- if(ast->codec->codec_id != CODEC_ID_PCM_LXF)
+ if(ast->codec->codec_id != AV_CODEC_ID_PCM_LXF)
deplanarize(lxf, ast, pkt->data, ret);
} else {
//picture type (0 = closed I, 1 = open I, 2 = P, 3 = B)
diff --git a/libavformat/m4vdec.c b/libavformat/m4vdec.c
index cc8c11b9b0..e72fb42f1d 100644
--- a/libavformat/m4vdec.c
+++ b/libavformat/m4vdec.c
@@ -49,4 +49,4 @@ static int mpeg4video_probe(AVProbeData *probe_packet)
return 0;
}
-FF_DEF_RAWVIDEO_DEMUXER(m4v, "raw MPEG-4 video", mpeg4video_probe, "m4v", CODEC_ID_MPEG4)
+FF_DEF_RAWVIDEO_DEMUXER(m4v, "raw MPEG-4 video", mpeg4video_probe, "m4v", AV_CODEC_ID_MPEG4)
diff --git a/libavformat/matroska.c b/libavformat/matroska.c
index ea91ed7494..b386d7421b 100644
--- a/libavformat/matroska.c
+++ b/libavformat/matroska.c
@@ -22,78 +22,78 @@
#include "matroska.h"
const CodecTags ff_mkv_codec_tags[]={
- {"A_AAC" , CODEC_ID_AAC},
- {"A_AC3" , CODEC_ID_AC3},
- {"A_ALAC" , CODEC_ID_ALAC},
- {"A_DTS" , CODEC_ID_DTS},
- {"A_EAC3" , CODEC_ID_EAC3},
- {"A_FLAC" , CODEC_ID_FLAC},
- {"A_MLP" , CODEC_ID_MLP},
- {"A_MPEG/L2" , CODEC_ID_MP2},
- {"A_MPEG/L1" , CODEC_ID_MP2},
- {"A_MPEG/L3" , CODEC_ID_MP3},
- {"A_OPUS", CODEC_ID_OPUS},
- {"A_PCM/FLOAT/IEEE" , CODEC_ID_PCM_F32LE},
- {"A_PCM/FLOAT/IEEE" , CODEC_ID_PCM_F64LE},
- {"A_PCM/INT/BIG" , CODEC_ID_PCM_S16BE},
- {"A_PCM/INT/BIG" , CODEC_ID_PCM_S24BE},
- {"A_PCM/INT/BIG" , CODEC_ID_PCM_S32BE},
- {"A_PCM/INT/LIT" , CODEC_ID_PCM_S16LE},
- {"A_PCM/INT/LIT" , CODEC_ID_PCM_S24LE},
- {"A_PCM/INT/LIT" , CODEC_ID_PCM_S32LE},
- {"A_PCM/INT/LIT" , CODEC_ID_PCM_U8},
- {"A_QUICKTIME/QDM2" , CODEC_ID_QDM2},
- {"A_REAL/14_4" , CODEC_ID_RA_144},
- {"A_REAL/28_8" , CODEC_ID_RA_288},
- {"A_REAL/ATRC" , CODEC_ID_ATRAC3},
- {"A_REAL/COOK" , CODEC_ID_COOK},
- {"A_REAL/SIPR" , CODEC_ID_SIPR},
- {"A_TRUEHD" , CODEC_ID_TRUEHD},
- {"A_TTA1" , CODEC_ID_TTA},
- {"A_VORBIS" , CODEC_ID_VORBIS},
- {"A_WAVPACK4" , CODEC_ID_WAVPACK},
+ {"A_AAC" , AV_CODEC_ID_AAC},
+ {"A_AC3" , AV_CODEC_ID_AC3},
+ {"A_ALAC" , AV_CODEC_ID_ALAC},
+ {"A_DTS" , AV_CODEC_ID_DTS},
+ {"A_EAC3" , AV_CODEC_ID_EAC3},
+ {"A_FLAC" , AV_CODEC_ID_FLAC},
+ {"A_MLP" , AV_CODEC_ID_MLP},
+ {"A_MPEG/L2" , AV_CODEC_ID_MP2},
+ {"A_MPEG/L1" , AV_CODEC_ID_MP2},
+ {"A_MPEG/L3" , AV_CODEC_ID_MP3},
+ {"A_OPUS", AV_CODEC_ID_OPUS},
+ {"A_PCM/FLOAT/IEEE" , AV_CODEC_ID_PCM_F32LE},
+ {"A_PCM/FLOAT/IEEE" , AV_CODEC_ID_PCM_F64LE},
+ {"A_PCM/INT/BIG" , AV_CODEC_ID_PCM_S16BE},
+ {"A_PCM/INT/BIG" , AV_CODEC_ID_PCM_S24BE},
+ {"A_PCM/INT/BIG" , AV_CODEC_ID_PCM_S32BE},
+ {"A_PCM/INT/LIT" , AV_CODEC_ID_PCM_S16LE},
+ {"A_PCM/INT/LIT" , AV_CODEC_ID_PCM_S24LE},
+ {"A_PCM/INT/LIT" , AV_CODEC_ID_PCM_S32LE},
+ {"A_PCM/INT/LIT" , AV_CODEC_ID_PCM_U8},
+ {"A_QUICKTIME/QDM2" , AV_CODEC_ID_QDM2},
+ {"A_REAL/14_4" , AV_CODEC_ID_RA_144},
+ {"A_REAL/28_8" , AV_CODEC_ID_RA_288},
+ {"A_REAL/ATRC" , AV_CODEC_ID_ATRAC3},
+ {"A_REAL/COOK" , AV_CODEC_ID_COOK},
+ {"A_REAL/SIPR" , AV_CODEC_ID_SIPR},
+ {"A_TRUEHD" , AV_CODEC_ID_TRUEHD},
+ {"A_TTA1" , AV_CODEC_ID_TTA},
+ {"A_VORBIS" , AV_CODEC_ID_VORBIS},
+ {"A_WAVPACK4" , AV_CODEC_ID_WAVPACK},
- {"S_TEXT/UTF8" , CODEC_ID_TEXT},
- {"S_TEXT/UTF8" , CODEC_ID_SRT},
- {"S_TEXT/ASCII" , CODEC_ID_TEXT},
- {"S_TEXT/ASS" , CODEC_ID_SSA},
- {"S_TEXT/SSA" , CODEC_ID_SSA},
- {"S_ASS" , CODEC_ID_SSA},
- {"S_SSA" , CODEC_ID_SSA},
- {"S_VOBSUB" , CODEC_ID_DVD_SUBTITLE},
- {"S_HDMV/PGS" , CODEC_ID_HDMV_PGS_SUBTITLE},
+ {"S_TEXT/UTF8" , AV_CODEC_ID_TEXT},
+ {"S_TEXT/UTF8" , AV_CODEC_ID_SRT},
+ {"S_TEXT/ASCII" , AV_CODEC_ID_TEXT},
+ {"S_TEXT/ASS" , AV_CODEC_ID_SSA},
+ {"S_TEXT/SSA" , AV_CODEC_ID_SSA},
+ {"S_ASS" , AV_CODEC_ID_SSA},
+ {"S_SSA" , AV_CODEC_ID_SSA},
+ {"S_VOBSUB" , AV_CODEC_ID_DVD_SUBTITLE},
+ {"S_HDMV/PGS" , AV_CODEC_ID_HDMV_PGS_SUBTITLE},
- {"V_DIRAC" , CODEC_ID_DIRAC},
- {"V_MJPEG" , CODEC_ID_MJPEG},
- {"V_MPEG1" , CODEC_ID_MPEG1VIDEO},
- {"V_MPEG2" , CODEC_ID_MPEG2VIDEO},
- {"V_MPEG4/ISO/ASP" , CODEC_ID_MPEG4},
- {"V_MPEG4/ISO/AP" , CODEC_ID_MPEG4},
- {"V_MPEG4/ISO/SP" , CODEC_ID_MPEG4},
- {"V_MPEG4/ISO/AVC" , CODEC_ID_H264},
- {"V_MPEG4/MS/V3" , CODEC_ID_MSMPEG4V3},
- {"V_REAL/RV10" , CODEC_ID_RV10},
- {"V_REAL/RV20" , CODEC_ID_RV20},
- {"V_REAL/RV30" , CODEC_ID_RV30},
- {"V_REAL/RV40" , CODEC_ID_RV40},
- {"V_SNOW" , CODEC_ID_SNOW},
- {"V_THEORA" , CODEC_ID_THEORA},
- {"V_UNCOMPRESSED" , CODEC_ID_RAWVIDEO},
- {"V_VP8" , CODEC_ID_VP8},
+ {"V_DIRAC" , AV_CODEC_ID_DIRAC},
+ {"V_MJPEG" , AV_CODEC_ID_MJPEG},
+ {"V_MPEG1" , AV_CODEC_ID_MPEG1VIDEO},
+ {"V_MPEG2" , AV_CODEC_ID_MPEG2VIDEO},
+ {"V_MPEG4/ISO/ASP" , AV_CODEC_ID_MPEG4},
+ {"V_MPEG4/ISO/AP" , AV_CODEC_ID_MPEG4},
+ {"V_MPEG4/ISO/SP" , AV_CODEC_ID_MPEG4},
+ {"V_MPEG4/ISO/AVC" , AV_CODEC_ID_H264},
+ {"V_MPEG4/MS/V3" , AV_CODEC_ID_MSMPEG4V3},
+ {"V_REAL/RV10" , AV_CODEC_ID_RV10},
+ {"V_REAL/RV20" , AV_CODEC_ID_RV20},
+ {"V_REAL/RV30" , AV_CODEC_ID_RV30},
+ {"V_REAL/RV40" , AV_CODEC_ID_RV40},
+ {"V_SNOW" , AV_CODEC_ID_SNOW},
+ {"V_THEORA" , AV_CODEC_ID_THEORA},
+ {"V_UNCOMPRESSED" , AV_CODEC_ID_RAWVIDEO},
+ {"V_VP8" , AV_CODEC_ID_VP8},
- {"" , CODEC_ID_NONE}
+ {"" , AV_CODEC_ID_NONE}
};
const CodecMime ff_mkv_mime_tags[] = {
- {"text/plain" , CODEC_ID_TEXT},
- {"image/gif" , CODEC_ID_GIF},
- {"image/jpeg" , CODEC_ID_MJPEG},
- {"image/png" , CODEC_ID_PNG},
- {"image/tiff" , CODEC_ID_TIFF},
- {"application/x-truetype-font", CODEC_ID_TTF},
- {"application/x-font" , CODEC_ID_TTF},
+ {"text/plain" , AV_CODEC_ID_TEXT},
+ {"image/gif" , AV_CODEC_ID_GIF},
+ {"image/jpeg" , AV_CODEC_ID_MJPEG},
+ {"image/png" , AV_CODEC_ID_PNG},
+ {"image/tiff" , AV_CODEC_ID_TIFF},
+ {"application/x-truetype-font", AV_CODEC_ID_TTF},
+ {"application/x-font" , AV_CODEC_ID_TTF},
- {"" , CODEC_ID_NONE}
+ {"" , AV_CODEC_ID_NONE}
};
const AVMetadataConv ff_mkv_metadata_conv[] = {
diff --git a/libavformat/matroska.h b/libavformat/matroska.h
index 6f6ab1e929..9af709f215 100644
--- a/libavformat/matroska.h
+++ b/libavformat/matroska.h
@@ -248,7 +248,7 @@ typedef enum {
typedef struct CodecTags{
char str[20];
- enum CodecID id;
+ enum AVCodecID id;
}CodecTags;
/* max. depth in the EBML tree structure */
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c
index 500048f761..44e9b7df93 100644
--- a/libavformat/matroskadec.c
+++ b/libavformat/matroskadec.c
@@ -1472,7 +1472,7 @@ static int matroska_read_header(AVFormatContext *s)
tracks = matroska->tracks.elem;
for (i=0; i < matroska->tracks.nb_elem; i++) {
MatroskaTrack *track = &tracks[i];
- enum CodecID codec_id = CODEC_ID_NONE;
+ enum AVCodecID codec_id = AV_CODEC_ID_NONE;
EbmlList *encodings_list = &track->encodings;
MatroskaTrackEncoding *encodings = encodings_list->elem;
uint8_t *extradata = NULL;
@@ -1545,7 +1545,7 @@ static int matroska_read_header(AVFormatContext *s)
}
}
- for(j=0; ff_mkv_codec_tags[j].id != CODEC_ID_NONE; j++){
+ for(j=0; ff_mkv_codec_tags[j].id != AV_CODEC_ID_NONE; j++){
if(!strncmp(ff_mkv_codec_tags[j].str, track->codec_id,
strlen(ff_mkv_codec_tags[j].str))){
codec_id= ff_mkv_codec_tags[j].id;
@@ -1580,7 +1580,7 @@ static int matroska_read_header(AVFormatContext *s)
&& (track->codec_priv.data != NULL)) {
fourcc = AV_RL32(track->codec_priv.data);
codec_id = ff_codec_get_id(ff_codec_movvideo_tags, fourcc);
- } else if (codec_id == CODEC_ID_ALAC && track->codec_priv.size && track->codec_priv.size < INT_MAX-12) {
+ } else if (codec_id == AV_CODEC_ID_ALAC && track->codec_priv.size && track->codec_priv.size < INT_MAX-12) {
/* Only ALAC's magic cookie is stored in Matroska's track headers.
Create the "atom size", "tag", and "tag version" fields the
decoder expects manually. */
@@ -1592,21 +1592,21 @@ static int matroska_read_header(AVFormatContext *s)
memcpy(&extradata[4], "alac", 4);
AV_WB32(&extradata[8], 0);
memcpy(&extradata[12], track->codec_priv.data, track->codec_priv.size);
- } else if (codec_id == CODEC_ID_PCM_S16BE) {
+ } else if (codec_id == AV_CODEC_ID_PCM_S16BE) {
switch (track->audio.bitdepth) {
- case 8: codec_id = CODEC_ID_PCM_U8; break;
- case 24: codec_id = CODEC_ID_PCM_S24BE; break;
- case 32: codec_id = CODEC_ID_PCM_S32BE; break;
+ case 8: codec_id = AV_CODEC_ID_PCM_U8; break;
+ case 24: codec_id = AV_CODEC_ID_PCM_S24BE; break;
+ case 32: codec_id = AV_CODEC_ID_PCM_S32BE; break;
}
- } else if (codec_id == CODEC_ID_PCM_S16LE) {
+ } else if (codec_id == AV_CODEC_ID_PCM_S16LE) {
switch (track->audio.bitdepth) {
- case 8: codec_id = CODEC_ID_PCM_U8; break;
- case 24: codec_id = CODEC_ID_PCM_S24LE; break;
- case 32: codec_id = CODEC_ID_PCM_S32LE; break;
+ case 8: codec_id = AV_CODEC_ID_PCM_U8; break;
+ case 24: codec_id = AV_CODEC_ID_PCM_S24LE; break;
+ case 32: codec_id = AV_CODEC_ID_PCM_S32LE; break;
}
- } else if (codec_id==CODEC_ID_PCM_F32LE && track->audio.bitdepth==64) {
- codec_id = CODEC_ID_PCM_F64LE;
- } else if (codec_id == CODEC_ID_AAC && !track->codec_priv.size) {
+ } else if (codec_id==AV_CODEC_ID_PCM_F32LE && track->audio.bitdepth==64) {
+ codec_id = AV_CODEC_ID_PCM_F64LE;
+ } else if (codec_id == AV_CODEC_ID_AAC && !track->codec_priv.size) {
int profile = matroska_aac_profile(track->codec_id);
int sri = matroska_aac_sri(track->audio.samplerate);
extradata = av_mallocz(5 + FF_INPUT_BUFFER_PADDING_SIZE);
@@ -1622,7 +1622,7 @@ static int matroska_read_header(AVFormatContext *s)
extradata_size = 5;
} else
extradata_size = 2;
- } else if (codec_id == CODEC_ID_TTA) {
+ } else if (codec_id == AV_CODEC_ID_TTA) {
extradata_size = 30;
extradata = av_mallocz(extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
if (extradata == NULL)
@@ -1635,14 +1635,14 @@ static int matroska_read_header(AVFormatContext *s)
avio_wl16(&b, track->audio.bitdepth);
avio_wl32(&b, track->audio.out_samplerate);
avio_wl32(&b, matroska->ctx->duration * track->audio.out_samplerate);
- } else if (codec_id == CODEC_ID_RV10 || codec_id == CODEC_ID_RV20 ||
- codec_id == CODEC_ID_RV30 || codec_id == CODEC_ID_RV40) {
+ } else if (codec_id == AV_CODEC_ID_RV10 || codec_id == AV_CODEC_ID_RV20 ||
+ codec_id == AV_CODEC_ID_RV30 || codec_id == AV_CODEC_ID_RV40) {
extradata_offset = 26;
- } else if (codec_id == CODEC_ID_RA_144) {
+ } else if (codec_id == AV_CODEC_ID_RA_144) {
track->audio.out_samplerate = 8000;
track->audio.channels = 1;
- } else if ((codec_id == CODEC_ID_RA_288 || codec_id == CODEC_ID_COOK ||
- codec_id == CODEC_ID_ATRAC3 || codec_id == CODEC_ID_SIPR)
+ } else if ((codec_id == AV_CODEC_ID_RA_288 || codec_id == AV_CODEC_ID_COOK ||
+ codec_id == AV_CODEC_ID_ATRAC3 || codec_id == AV_CODEC_ID_SIPR)
&& track->codec_priv.data) {
int flavor;
@@ -1656,11 +1656,11 @@ static int matroska_read_header(AVFormatContext *s)
track->audio.frame_size = avio_rb16(&b);
track->audio.sub_packet_size = avio_rb16(&b);
track->audio.buf = av_malloc(track->audio.frame_size * track->audio.sub_packet_h);
- if (codec_id == CODEC_ID_RA_288) {
+ if (codec_id == AV_CODEC_ID_RA_288) {
st->codec->block_align = track->audio.coded_framesize;
track->codec_priv.size = 0;
} else {
- if (codec_id == CODEC_ID_SIPR && flavor < 4) {
+ if (codec_id == AV_CODEC_ID_SIPR && flavor < 4) {
const int sipr_bit_rate[4] = { 6504, 8496, 5000, 16000 };
track->audio.sub_packet_size = ff_sipr_subpk_size[flavor];
st->codec->bit_rate = sipr_bit_rate[flavor];
@@ -1671,9 +1671,9 @@ static int matroska_read_header(AVFormatContext *s)
}
track->codec_priv.size -= extradata_offset;
- if (codec_id == CODEC_ID_NONE)
+ if (codec_id == AV_CODEC_ID_NONE)
av_log(matroska->ctx, AV_LOG_INFO,
- "Unknown/unsupported CodecID %s.\n", track->codec_id);
+ "Unknown/unsupported AVCodecID %s.\n", track->codec_id);
if (track->time_scale < 0.01)
track->time_scale = 1.0;
@@ -1749,11 +1749,11 @@ static int matroska_read_header(AVFormatContext *s)
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
st->codec->sample_rate = track->audio.out_samplerate;
st->codec->channels = track->audio.channels;
- if (st->codec->codec_id != CODEC_ID_AAC)
+ if (st->codec->codec_id != AV_CODEC_ID_AAC)
st->need_parsing = AVSTREAM_PARSE_HEADERS;
} else if (track->type == MATROSKA_TRACK_TYPE_SUBTITLE) {
st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;
- if (st->codec->codec_id == CODEC_ID_SSA)
+ if (st->codec->codec_id == AV_CODEC_ID_SSA)
matroska->contains_ssa = 1;
}
}
@@ -1769,7 +1769,7 @@ static int matroska_read_header(AVFormatContext *s)
break;
av_dict_set(&st->metadata, "filename",attachements[j].filename, 0);
av_dict_set(&st->metadata, "mimetype", attachements[j].mime, 0);
- st->codec->codec_id = CODEC_ID_NONE;
+ st->codec->codec_id = AV_CODEC_ID_NONE;
st->codec->codec_type = AVMEDIA_TYPE_ATTACHMENT;
st->codec->extradata = av_malloc(attachements[j].bin.size + FF_INPUT_BUFFER_PADDING_SIZE);
if(st->codec->extradata == NULL)
@@ -1777,7 +1777,7 @@ static int matroska_read_header(AVFormatContext *s)
st->codec->extradata_size = attachements[j].bin.size;
memcpy(st->codec->extradata, attachements[j].bin.data, attachements[j].bin.size);
- for (i=0; ff_mkv_mime_tags[i].id != CODEC_ID_NONE; i++) {
+ for (i=0; ff_mkv_mime_tags[i].id != AV_CODEC_ID_NONE; i++) {
if (!strncmp(ff_mkv_mime_tags[i].str, attachements[j].mime,
strlen(ff_mkv_mime_tags[i].str))) {
st->codec->codec_id = ff_mkv_mime_tags[i].id;
@@ -2001,10 +2001,10 @@ static int matroska_parse_block(MatroskaDemuxContext *matroska, uint8_t *data,
break;
}
- if ((st->codec->codec_id == CODEC_ID_RA_288 ||
- st->codec->codec_id == CODEC_ID_COOK ||
- st->codec->codec_id == CODEC_ID_SIPR ||
- st->codec->codec_id == CODEC_ID_ATRAC3) &&
+ if ((st->codec->codec_id == AV_CODEC_ID_RA_288 ||
+ st->codec->codec_id == AV_CODEC_ID_COOK ||
+ st->codec->codec_id == AV_CODEC_ID_SIPR ||
+ st->codec->codec_id == AV_CODEC_ID_ATRAC3) &&
st->codec->block_align && track->audio.sub_packet_size) {
int a = st->codec->block_align;
int sps = track->audio.sub_packet_size;
@@ -2017,7 +2017,7 @@ static int matroska_parse_block(MatroskaDemuxContext *matroska, uint8_t *data,
if (!track->audio.pkt_cnt) {
if (track->audio.sub_packet_cnt == 0)
track->audio.buf_timecode = timecode;
- if (st->codec->codec_id == CODEC_ID_RA_288) {
+ if (st->codec->codec_id == AV_CODEC_ID_RA_288) {
if (size < cfs * h / 2) {
av_log(matroska->ctx, AV_LOG_ERROR,
"Corrupt int4 RM-style audio packet size\n");
@@ -2027,7 +2027,7 @@ static int matroska_parse_block(MatroskaDemuxContext *matroska, uint8_t *data,
for (x=0; x<h/2; x++)
memcpy(track->audio.buf+x*2*w+y*cfs,
data+x*cfs, cfs);
- } else if (st->codec->codec_id == CODEC_ID_SIPR) {
+ } else if (st->codec->codec_id == AV_CODEC_ID_SIPR) {
if (size < w) {
av_log(matroska->ctx, AV_LOG_ERROR,
"Corrupt sipr RM-style audio packet size\n");
@@ -2047,7 +2047,7 @@ static int matroska_parse_block(MatroskaDemuxContext *matroska, uint8_t *data,
}
if (++track->audio.sub_packet_cnt >= h) {
- if (st->codec->codec_id == CODEC_ID_SIPR)
+ if (st->codec->codec_id == AV_CODEC_ID_SIPR)
ff_rm_reorder_sipr_data(track->audio.buf, h, w);
track->audio.sub_packet_cnt = 0;
track->audio.pkt_cnt = h*w / a;
@@ -2100,19 +2100,19 @@ static int matroska_parse_block(MatroskaDemuxContext *matroska, uint8_t *data,
else
pkt->pts = timecode;
pkt->pos = pos;
- if (st->codec->codec_id == CODEC_ID_TEXT)
+ if (st->codec->codec_id == AV_CODEC_ID_TEXT)
pkt->convergence_duration = duration;
else if (track->type != MATROSKA_TRACK_TYPE_SUBTITLE)
pkt->duration = duration;
- if (st->codec->codec_id == CODEC_ID_SSA)
+ if (st->codec->codec_id == AV_CODEC_ID_SSA)
matroska_fix_ass_packet(matroska, pkt, duration);
if (matroska->prev_pkt &&
timecode != AV_NOPTS_VALUE &&
matroska->prev_pkt->pts == timecode &&
matroska->prev_pkt->stream_index == st->index &&
- st->codec->codec_id == CODEC_ID_SSA)
+ st->codec->codec_id == AV_CODEC_ID_SSA)
matroska_merge_packets(matroska->prev_pkt, pkt);
else {
dynarray_add(&matroska->packets,&matroska->num_packets,pkt);
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index 30885a1cf6..397793119e 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -423,7 +423,7 @@ static int put_xiph_codecpriv(AVFormatContext *s, AVIOContext *pb, AVCodecContex
int first_header_size;
int j;
- if (codec->codec_id == CODEC_ID_VORBIS)
+ if (codec->codec_id == AV_CODEC_ID_VORBIS)
first_header_size = 30;
else
first_header_size = 42;
@@ -469,13 +469,13 @@ static int mkv_write_codecprivate(AVFormatContext *s, AVIOContext *pb, AVCodecCo
return ret;
if (native_id) {
- if (codec->codec_id == CODEC_ID_VORBIS || codec->codec_id == CODEC_ID_THEORA)
+ if (codec->codec_id == AV_CODEC_ID_VORBIS || codec->codec_id == AV_CODEC_ID_THEORA)
ret = put_xiph_codecpriv(s, dyn_cp, codec);
- else if (codec->codec_id == CODEC_ID_FLAC)
+ else if (codec->codec_id == AV_CODEC_ID_FLAC)
ret = ff_flac_write_header(dyn_cp, codec, 1);
- else if (codec->codec_id == CODEC_ID_H264)
+ else if (codec->codec_id == AV_CODEC_ID_H264)
ret = ff_isom_write_avcc(dyn_cp, codec->extradata, codec->extradata_size);
- else if (codec->codec_id == CODEC_ID_ALAC && (12 < codec->extradata_size))
+ else if (codec->codec_id == AV_CODEC_ID_ALAC && (12 < codec->extradata_size))
ret = ff_isom_write_avcc(dyn_cp, codec->extradata + 12, codec->extradata_size - 12);
else if (codec->extradata_size)
avio_write(dyn_cp, codec->extradata, codec->extradata_size);
@@ -546,7 +546,7 @@ static int mkv_write_tracks(AVFormatContext *s)
if (!bit_depth)
bit_depth = av_get_bytes_per_sample(codec->sample_fmt) << 3;
- if (codec->codec_id == CODEC_ID_AAC)
+ if (codec->codec_id == AV_CODEC_ID_AAC)
get_aac_sample_rates(s, codec, &sample_rate, &output_sample_rate);
track = start_ebml_master(pb, MATROSKA_ID_TRACKENTRY, 0);
@@ -564,7 +564,7 @@ static int mkv_write_tracks(AVFormatContext *s)
// look for a codec ID string specific to mkv to use,
// if none are found, use AVI codes
- for (j = 0; ff_mkv_codec_tags[j].id != CODEC_ID_NONE; j++) {
+ for (j = 0; ff_mkv_codec_tags[j].id != AV_CODEC_ID_NONE; j++) {
if (ff_mkv_codec_tags[j].id == codec->codec_id) {
put_ebml_string(pb, MATROSKA_ID_CODECID, ff_mkv_codec_tags[j].str);
native_id = 1;
@@ -572,8 +572,8 @@ static int mkv_write_tracks(AVFormatContext *s)
}
}
- if (mkv->mode == MODE_WEBM && !(codec->codec_id == CODEC_ID_VP8 ||
- codec->codec_id == CODEC_ID_VORBIS)) {
+ if (mkv->mode == MODE_WEBM && !(codec->codec_id == AV_CODEC_ID_VP8 ||
+ codec->codec_id == AV_CODEC_ID_VORBIS)) {
av_log(s, AV_LOG_ERROR,
"Only VP8 video and Vorbis audio are supported for WebM.\n");
return AVERROR(EINVAL);
@@ -590,9 +590,9 @@ static int mkv_write_tracks(AVFormatContext *s)
if (!native_id &&
ff_codec_get_tag(ff_codec_movvideo_tags, codec->codec_id) &&
(!ff_codec_get_tag(ff_codec_bmp_tags, codec->codec_id)
- || codec->codec_id == CODEC_ID_SVQ1
- || codec->codec_id == CODEC_ID_SVQ3
- || codec->codec_id == CODEC_ID_CINEPAK))
+ || codec->codec_id == AV_CODEC_ID_SVQ1
+ || codec->codec_id == AV_CODEC_ID_SVQ3
+ || codec->codec_id == AV_CODEC_ID_CINEPAK))
qt_id = 1;
if (qt_id)
@@ -635,7 +635,7 @@ static int mkv_write_tracks(AVFormatContext *s)
put_ebml_uint(pb, MATROSKA_ID_VIDEODISPLAYUNIT, 3);
}
- if (codec->codec_id == CODEC_ID_RAWVIDEO) {
+ if (codec->codec_id == AV_CODEC_ID_RAWVIDEO) {
uint32_t color_space = av_le2ne32(codec->codec_tag);
put_ebml_binary(pb, MATROSKA_ID_VIDEOCOLORSPACE, &color_space, sizeof(color_space));
}
@@ -860,9 +860,9 @@ static int mkv_write_attachments(AVFormatContext *s)
put_ebml_string(pb, MATROSKA_ID_FILENAME, t->value);
if (t = av_dict_get(st->metadata, "mimetype", NULL, 0))
mimetype = t->value;
- else if (st->codec->codec_id != CODEC_ID_NONE ) {
+ else if (st->codec->codec_id != AV_CODEC_ID_NONE ) {
int i;
- for (i = 0; ff_mkv_mime_tags[i].id != CODEC_ID_NONE; i++)
+ for (i = 0; ff_mkv_mime_tags[i].id != AV_CODEC_ID_NONE; i++)
if (ff_mkv_mime_tags[i].id == st->codec->codec_id) {
mimetype = ff_mkv_mime_tags[i].str;
break;
@@ -1067,7 +1067,7 @@ static void mkv_write_block(AVFormatContext *s, AVIOContext *pb,
av_log(s, AV_LOG_DEBUG, "Writing block at offset %" PRIu64 ", size %d, "
"pts %" PRId64 ", dts %" PRId64 ", duration %d, flags %d\n",
avio_tell(pb), pkt->size, pkt->pts, pkt->dts, pkt->duration, flags);
- if (codec->codec_id == CODEC_ID_H264 && codec->extradata_size > 0 &&
+ if (codec->codec_id == AV_CODEC_ID_H264 && codec->extradata_size > 0 &&
(AV_RB24(codec->extradata) == 1 || AV_RB32(codec->extradata) == 1))
ff_avc_parse_nal_units_buf(pkt->data, &data, &size);
else
@@ -1162,9 +1162,9 @@ static int mkv_write_packet_internal(AVFormatContext *s, AVPacket *pkt)
if (codec->codec_type != AVMEDIA_TYPE_SUBTITLE) {
mkv_write_block(s, pb, MATROSKA_ID_SIMPLEBLOCK, pkt, keyframe << 7);
- } else if (codec->codec_id == CODEC_ID_SSA) {
+ } else if (codec->codec_id == AV_CODEC_ID_SSA) {
duration = mkv_write_ass_blocks(s, pb, pkt);
- } else if (codec->codec_id == CODEC_ID_SRT) {
+ } else if (codec->codec_id == AV_CODEC_ID_SRT) {
duration = mkv_write_srt_blocks(s, pb, pkt);
} else {
ebml_master blockgroup = start_ebml_master(pb, MATROSKA_ID_BLOCKGROUP, mkv_blockgroup_size(pkt->size));
@@ -1290,10 +1290,10 @@ static int mkv_write_trailer(AVFormatContext *s)
return 0;
}
-static int mkv_query_codec(enum CodecID codec_id, int std_compliance)
+static int mkv_query_codec(enum AVCodecID codec_id, int std_compliance)
{
int i;
- for (i = 0; ff_mkv_codec_tags[i].id != CODEC_ID_NONE; i++)
+ for (i = 0; ff_mkv_codec_tags[i].id != AV_CODEC_ID_NONE; i++)
if (ff_mkv_codec_tags[i].id == codec_id)
return 1;
@@ -1314,15 +1314,15 @@ AVOutputFormat ff_matroska_muxer = {
.extensions = "mkv",
.priv_data_size = sizeof(MatroskaMuxContext),
.audio_codec = CONFIG_LIBVORBIS_ENCODER ?
- CODEC_ID_VORBIS : CODEC_ID_AC3,
+ AV_CODEC_ID_VORBIS : AV_CODEC_ID_AC3,
.video_codec = CONFIG_LIBX264_ENCODER ?
- CODEC_ID_H264 : CODEC_ID_MPEG4,
+ AV_CODEC_ID_H264 : AV_CODEC_ID_MPEG4,
.write_header = mkv_write_header,
.write_packet = mkv_write_packet,
.write_trailer = mkv_write_trailer,
.flags = AVFMT_GLOBALHEADER | AVFMT_VARIABLE_FPS |
AVFMT_TS_NONSTRICT,
- .subtitle_codec = CODEC_ID_SSA,
+ .subtitle_codec = AV_CODEC_ID_SSA,
.query_codec = mkv_query_codec,
};
#endif
@@ -1334,8 +1334,8 @@ AVOutputFormat ff_webm_muxer = {
.mime_type = "video/webm",
.extensions = "webm",
.priv_data_size = sizeof(MatroskaMuxContext),
- .audio_codec = CODEC_ID_VORBIS,
- .video_codec = CODEC_ID_VP8,
+ .audio_codec = AV_CODEC_ID_VORBIS,
+ .video_codec = AV_CODEC_ID_VP8,
.write_header = mkv_write_header,
.write_packet = mkv_write_packet,
.write_trailer = mkv_write_trailer,
@@ -1352,8 +1352,8 @@ AVOutputFormat ff_matroska_audio_muxer = {
.extensions = "mka",
.priv_data_size = sizeof(MatroskaMuxContext),
.audio_codec = CONFIG_LIBVORBIS_ENCODER ?
- CODEC_ID_VORBIS : CODEC_ID_AC3,
- .video_codec = CODEC_ID_NONE,
+ AV_CODEC_ID_VORBIS : AV_CODEC_ID_AC3,
+ .video_codec = AV_CODEC_ID_NONE,
.write_header = mkv_write_header,
.write_packet = mkv_write_packet,
.write_trailer = mkv_write_trailer,
diff --git a/libavformat/md5enc.c b/libavformat/md5enc.c
index 9c51cf1d43..f3653084e7 100644
--- a/libavformat/md5enc.c
+++ b/libavformat/md5enc.c
@@ -70,8 +70,8 @@ AVOutputFormat ff_md5_muxer = {
.name = "md5",
.long_name = NULL_IF_CONFIG_SMALL("MD5 testing"),
.priv_data_size = PRIVSIZE,
- .audio_codec = CODEC_ID_PCM_S16LE,
- .video_codec = CODEC_ID_RAWVIDEO,
+ .audio_codec = AV_CODEC_ID_PCM_S16LE,
+ .video_codec = AV_CODEC_ID_RAWVIDEO,
.write_header = write_header,
.write_packet = write_packet,
.write_trailer = write_trailer,
@@ -100,8 +100,8 @@ AVOutputFormat ff_framemd5_muxer = {
.name = "framemd5",
.long_name = NULL_IF_CONFIG_SMALL("Per-frame MD5 testing"),
.priv_data_size = PRIVSIZE,
- .audio_codec = CODEC_ID_PCM_S16LE,
- .video_codec = CODEC_ID_RAWVIDEO,
+ .audio_codec = AV_CODEC_ID_PCM_S16LE,
+ .video_codec = AV_CODEC_ID_RAWVIDEO,
.write_header = ff_framehash_write_header,
.write_packet = framemd5_write_packet,
.flags = AVFMT_VARIABLE_FPS | AVFMT_TS_NONSTRICT,
diff --git a/libavformat/microdvddec.c b/libavformat/microdvddec.c
index b47457454d..ecc2819943 100644
--- a/libavformat/microdvddec.c
+++ b/libavformat/microdvddec.c
@@ -116,7 +116,7 @@ static int microdvd_read_header(AVFormatContext *s)
ff_subtitles_queue_finalize(&microdvd->q);
avpriv_set_pts_info(st, 64, pts_info.den, pts_info.num);
st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;
- st->codec->codec_id = CODEC_ID_MICRODVD;
+ st->codec->codec_id = AV_CODEC_ID_MICRODVD;
return 0;
}
diff --git a/libavformat/microdvdenc.c b/libavformat/microdvdenc.c
index b2abc547e6..ba97444044 100644
--- a/libavformat/microdvdenc.c
+++ b/libavformat/microdvdenc.c
@@ -26,7 +26,7 @@ static int microdvd_write_header(struct AVFormatContext *s)
{
AVCodecContext *avctx = s->streams[0]->codec;
- if (s->nb_streams != 1 || avctx->codec_id != CODEC_ID_MICRODVD) {
+ if (s->nb_streams != 1 || avctx->codec_id != AV_CODEC_ID_MICRODVD) {
av_log(s, AV_LOG_ERROR, "Exactly one MicroDVD stream is needed.\n");
return -1;
}
@@ -47,5 +47,5 @@ AVOutputFormat ff_microdvd_muxer = {
.write_header = microdvd_write_header,
.write_packet = ff_raw_write_packet,
.flags = AVFMT_NOTIMESTAMPS,
- .subtitle_codec = CODEC_ID_MICRODVD,
+ .subtitle_codec = AV_CODEC_ID_MICRODVD,
};
diff --git a/libavformat/mkvtimestamp_v2.c b/libavformat/mkvtimestamp_v2.c
index b04c655f7f..3ed195ac5c 100644
--- a/libavformat/mkvtimestamp_v2.c
+++ b/libavformat/mkvtimestamp_v2.c
@@ -44,8 +44,8 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt)
AVOutputFormat ff_mkvtimestamp_v2_muxer = {
.name = "mkvtimestamp_v2",
.long_name = NULL_IF_CONFIG_SMALL("extract pts as timecode v2 format, as defined by mkvtoolnix"),
- .audio_codec = CODEC_ID_NONE,
- .video_codec = CODEC_ID_RAWVIDEO,
+ .audio_codec = AV_CODEC_ID_NONE,
+ .video_codec = AV_CODEC_ID_RAWVIDEO,
.write_header = write_header,
.write_packet = write_packet,
};
diff --git a/libavformat/mm.c b/libavformat/mm.c
index 889aa12e86..125a6773c4 100644
--- a/libavformat/mm.c
+++ b/libavformat/mm.c
@@ -109,7 +109,7 @@ static int read_header(AVFormatContext *s)
if (!st)
return AVERROR(ENOMEM);
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- st->codec->codec_id = CODEC_ID_MMVIDEO;
+ st->codec->codec_id = AV_CODEC_ID_MMVIDEO;
st->codec->codec_tag = 0; /* no fourcc */
st->codec->width = width;
st->codec->height = height;
@@ -122,7 +122,7 @@ static int read_header(AVFormatContext *s)
return AVERROR(ENOMEM);
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
st->codec->codec_tag = 0; /* no fourcc */
- st->codec->codec_id = CODEC_ID_PCM_U8;
+ st->codec->codec_id = AV_CODEC_ID_PCM_U8;
st->codec->channels = 1;
st->codec->sample_rate = 8000;
avpriv_set_pts_info(st, 64, 1, 8000); /* 8000 hz */
diff --git a/libavformat/mmf.c b/libavformat/mmf.c
index 25882ee859..18b69d471f 100644
--- a/libavformat/mmf.c
+++ b/libavformat/mmf.c
@@ -246,7 +246,7 @@ static int mmf_read_header(AVFormatContext *s)
return AVERROR(ENOMEM);
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- st->codec->codec_id = CODEC_ID_ADPCM_YAMAHA;
+ st->codec->codec_id = AV_CODEC_ID_ADPCM_YAMAHA;
st->codec->sample_rate = rate;
st->codec->channels = 1;
st->codec->bits_per_coded_sample = 4;
@@ -303,8 +303,8 @@ AVOutputFormat ff_mmf_muxer = {
.mime_type = "application/vnd.smaf",
.extensions = "mmf",
.priv_data_size = sizeof(MMFContext),
- .audio_codec = CODEC_ID_ADPCM_YAMAHA,
- .video_codec = CODEC_ID_NONE,
+ .audio_codec = AV_CODEC_ID_ADPCM_YAMAHA,
+ .video_codec = AV_CODEC_ID_NONE,
.write_header = mmf_write_header,
.write_packet = mmf_write_packet,
.write_trailer = mmf_write_trailer,
diff --git a/libavformat/mov.c b/libavformat/mov.c
index f0aa85c5e3..786bfcf0fb 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -173,13 +173,13 @@ static int mov_read_covr(MOVContext *c, AVIOContext *pb, int type, int len)
AVPacket pkt;
AVStream *st;
MOVStreamContext *sc;
- enum CodecID id;
+ enum AVCodecID id;
int ret;
switch (type) {
- case 0xd: id = CODEC_ID_MJPEG; break;
- case 0xe: id = CODEC_ID_PNG; break;
- case 0x1b: id = CODEC_ID_BMP; break;
+ case 0xd: id = AV_CODEC_ID_MJPEG; break;
+ case 0xe: id = AV_CODEC_ID_PNG; break;
+ case 0x1b: id = AV_CODEC_ID_BMP; break;
default:
av_log(c->fc, AV_LOG_WARNING, "Unknown cover type: 0x%x.\n", type);
avio_skip(pb, len);
@@ -491,7 +491,7 @@ static int mov_read_hdlr(MOVContext *c, AVIOContext *pb, MOVAtom atom)
else if (type == MKTAG('s','o','u','n'))
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
else if (type == MKTAG('m','1','a',' '))
- st->codec->codec_id = CODEC_ID_MP2;
+ st->codec->codec_id = AV_CODEC_ID_MP2;
else if ((type == MKTAG('s','u','b','p')) || (type == MKTAG('c','l','c','p')))
st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;
@@ -815,17 +815,17 @@ static int mov_read_enda(MOVContext *c, AVIOContext *pb, MOVAtom atom)
av_dlog(c->fc, "enda %d\n", little_endian);
if (little_endian == 1) {
switch (st->codec->codec_id) {
- case CODEC_ID_PCM_S24BE:
- st->codec->codec_id = CODEC_ID_PCM_S24LE;
+ case AV_CODEC_ID_PCM_S24BE:
+ st->codec->codec_id = AV_CODEC_ID_PCM_S24LE;
break;
- case CODEC_ID_PCM_S32BE:
- st->codec->codec_id = CODEC_ID_PCM_S32LE;
+ case AV_CODEC_ID_PCM_S32BE:
+ st->codec->codec_id = AV_CODEC_ID_PCM_S32LE;
break;
- case CODEC_ID_PCM_F32BE:
- st->codec->codec_id = CODEC_ID_PCM_F32LE;
+ case AV_CODEC_ID_PCM_F32BE:
+ st->codec->codec_id = AV_CODEC_ID_PCM_F32LE;
break;
- case CODEC_ID_PCM_F64BE:
- st->codec->codec_id = CODEC_ID_PCM_F64LE;
+ case AV_CODEC_ID_PCM_F64BE:
+ st->codec->codec_id = AV_CODEC_ID_PCM_F64LE;
break;
default:
break;
@@ -901,27 +901,27 @@ static int mov_read_extradata(MOVContext *c, AVIOContext *pb, MOVAtom atom,
/* wrapper functions for reading ALAC/AVS/MJPEG/MJPEG2000 extradata atoms only for those codecs */
static int mov_read_alac(MOVContext *c, AVIOContext *pb, MOVAtom atom)
{
- return mov_read_extradata(c, pb, atom, CODEC_ID_ALAC);
+ return mov_read_extradata(c, pb, atom, AV_CODEC_ID_ALAC);
}
static int mov_read_avss(MOVContext *c, AVIOContext *pb, MOVAtom atom)
{
- return mov_read_extradata(c, pb, atom, CODEC_ID_AVS);
+ return mov_read_extradata(c, pb, atom, AV_CODEC_ID_AVS);
}
static int mov_read_jp2h(MOVContext *c, AVIOContext *pb, MOVAtom atom)
{
- return mov_read_extradata(c, pb, atom, CODEC_ID_JPEG2000);
+ return mov_read_extradata(c, pb, atom, AV_CODEC_ID_JPEG2000);
}
static int mov_read_avid(MOVContext *c, AVIOContext *pb, MOVAtom atom)
{
- return mov_read_extradata(c, pb, atom, CODEC_ID_AVUI);
+ return mov_read_extradata(c, pb, atom, AV_CODEC_ID_AVUI);
}
static int mov_read_svq3(MOVContext *c, AVIOContext *pb, MOVAtom atom)
{
- return mov_read_extradata(c, pb, atom, CODEC_ID_SVQ3);
+ return mov_read_extradata(c, pb, atom, AV_CODEC_ID_SVQ3);
}
static int mov_read_wave(MOVContext *c, AVIOContext *pb, MOVAtom atom)
@@ -935,7 +935,7 @@ static int mov_read_wave(MOVContext *c, AVIOContext *pb, MOVAtom atom)
if ((uint64_t)atom.size > (1<<30))
return AVERROR_INVALIDDATA;
- if (st->codec->codec_id == CODEC_ID_QDM2 || st->codec->codec_id == CODEC_ID_QDMC) {
+ if (st->codec->codec_id == AV_CODEC_ID_QDM2 || st->codec->codec_id == AV_CODEC_ID_QDMC) {
// pass all frma atom to codec, needed at least for QDMC and QDM2
av_free(st->codec->extradata);
st->codec->extradata_size = 0;
@@ -1085,35 +1085,35 @@ static int mov_read_stco(MOVContext *c, AVIOContext *pb, MOVAtom atom)
* Compute codec id for 'lpcm' tag.
* See CoreAudioTypes and AudioStreamBasicDescription at Apple.
*/
-enum CodecID ff_mov_get_lpcm_codec_id(int bps, int flags)
+enum AVCodecID ff_mov_get_lpcm_codec_id(int bps, int flags)
{
if (flags & 1) { // floating point
if (flags & 2) { // big endian
- if (bps == 32) return CODEC_ID_PCM_F32BE;
- else if (bps == 64) return CODEC_ID_PCM_F64BE;
+ if (bps == 32) return AV_CODEC_ID_PCM_F32BE;
+ else if (bps == 64) return AV_CODEC_ID_PCM_F64BE;
} else {
- if (bps == 32) return CODEC_ID_PCM_F32LE;
- else if (bps == 64) return CODEC_ID_PCM_F64LE;
+ if (bps == 32) return AV_CODEC_ID_PCM_F32LE;
+ else if (bps == 64) return AV_CODEC_ID_PCM_F64LE;
}
} else {
if (flags & 2) {
if (bps == 8)
// signed integer
- if (flags & 4) return CODEC_ID_PCM_S8;
- else return CODEC_ID_PCM_U8;
- else if (bps == 16) return CODEC_ID_PCM_S16BE;
- else if (bps == 24) return CODEC_ID_PCM_S24BE;
- else if (bps == 32) return CODEC_ID_PCM_S32BE;
+ if (flags & 4) return AV_CODEC_ID_PCM_S8;
+ else return AV_CODEC_ID_PCM_U8;
+ else if (bps == 16) return AV_CODEC_ID_PCM_S16BE;
+ else if (bps == 24) return AV_CODEC_ID_PCM_S24BE;
+ else if (bps == 32) return AV_CODEC_ID_PCM_S32BE;
} else {
if (bps == 8)
- if (flags & 4) return CODEC_ID_PCM_S8;
- else return CODEC_ID_PCM_U8;
- else if (bps == 16) return CODEC_ID_PCM_S16LE;
- else if (bps == 24) return CODEC_ID_PCM_S24LE;
- else if (bps == 32) return CODEC_ID_PCM_S32LE;
+ if (flags & 4) return AV_CODEC_ID_PCM_S8;
+ else return AV_CODEC_ID_PCM_U8;
+ else if (bps == 16) return AV_CODEC_ID_PCM_S16LE;
+ else if (bps == 24) return AV_CODEC_ID_PCM_S24LE;
+ else if (bps == 32) return AV_CODEC_ID_PCM_S32LE;
}
}
- return CODEC_ID_NONE;
+ return AV_CODEC_ID_NONE;
}
int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries)
@@ -1129,7 +1129,7 @@ int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries)
for (pseudo_stream_id=0; pseudo_stream_id<entries; pseudo_stream_id++) {
//Parsing Sample description table
- enum CodecID id;
+ enum AVCodecID id;
int dref_id = 1;
MOVAtom a = { AV_RL32("stsd") };
int64_t start_pos = avio_tell(pb);
@@ -1179,7 +1179,7 @@ int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries)
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
else if (st->codec->codec_type == AVMEDIA_TYPE_DATA ||
(st->codec->codec_type == AVMEDIA_TYPE_SUBTITLE &&
- st->codec->codec_id == CODEC_ID_NONE)){
+ st->codec->codec_id == AV_CODEC_ID_NONE)){
id = ff_codec_get_id(ff_codec_movsubtitle_tags, format);
if (id > 0)
st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;
@@ -1243,7 +1243,7 @@ int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries)
color_index = 255;
color_dec = 256 / (color_count - 1);
for (j = 0; j < color_count; j++) {
- if (id == CODEC_ID_CINEPAK){
+ if (id == AV_CODEC_ID_CINEPAK){
r = g = b = color_count - 1 - color_index;
}else
r = g = b = color_index;
@@ -1336,34 +1336,34 @@ int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries)
}
switch (st->codec->codec_id) {
- case CODEC_ID_PCM_S8:
- case CODEC_ID_PCM_U8:
+ case AV_CODEC_ID_PCM_S8:
+ case AV_CODEC_ID_PCM_U8:
if (st->codec->bits_per_coded_sample == 16)
- st->codec->codec_id = CODEC_ID_PCM_S16BE;
+ st->codec->codec_id = AV_CODEC_ID_PCM_S16BE;
break;
- case CODEC_ID_PCM_S16LE:
- case CODEC_ID_PCM_S16BE:
+ case AV_CODEC_ID_PCM_S16LE:
+ case AV_CODEC_ID_PCM_S16BE:
if (st->codec->bits_per_coded_sample == 8)
- st->codec->codec_id = CODEC_ID_PCM_S8;
+ st->codec->codec_id = AV_CODEC_ID_PCM_S8;
else if (st->codec->bits_per_coded_sample == 24)
st->codec->codec_id =
- st->codec->codec_id == CODEC_ID_PCM_S16BE ?
- CODEC_ID_PCM_S24BE : CODEC_ID_PCM_S24LE;
+ st->codec->codec_id == AV_CODEC_ID_PCM_S16BE ?
+ AV_CODEC_ID_PCM_S24BE : AV_CODEC_ID_PCM_S24LE;
break;
/* set values for old format before stsd version 1 appeared */
- case CODEC_ID_MACE3:
+ case AV_CODEC_ID_MACE3:
sc->samples_per_frame = 6;
sc->bytes_per_frame = 2*st->codec->channels;
break;
- case CODEC_ID_MACE6:
+ case AV_CODEC_ID_MACE6:
sc->samples_per_frame = 6;
sc->bytes_per_frame = 1*st->codec->channels;
break;
- case CODEC_ID_ADPCM_IMA_QT:
+ case AV_CODEC_ID_ADPCM_IMA_QT:
sc->samples_per_frame = 64;
sc->bytes_per_frame = 34*st->codec->channels;
break;
- case CODEC_ID_GSM:
+ case AV_CODEC_ID_GSM:
sc->samples_per_frame = 160;
sc->bytes_per_frame = 33;
break;
@@ -1418,7 +1418,7 @@ int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries)
/* special codec parameters handling */
switch (st->codec->codec_id) {
#if CONFIG_DV_DEMUXER
- case CODEC_ID_DVAUDIO:
+ case AV_CODEC_ID_DVAUDIO:
c->dv_fctx = avformat_alloc_context();
c->dv_demux = avpriv_dv_init_demux(c->dv_fctx);
if (!c->dv_demux) {
@@ -1426,49 +1426,49 @@ int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries)
return AVERROR(ENOMEM);
}
sc->dv_audio_container = 1;
- st->codec->codec_id = CODEC_ID_PCM_S16LE;
+ st->codec->codec_id = AV_CODEC_ID_PCM_S16LE;
break;
#endif
/* no ifdef since parameters are always those */
- case CODEC_ID_QCELP:
+ case AV_CODEC_ID_QCELP:
// force sample rate for qcelp when not stored in mov
if (st->codec->codec_tag != MKTAG('Q','c','l','p'))
st->codec->sample_rate = 8000;
st->codec->channels= 1; /* really needed */
break;
- case CODEC_ID_AMR_NB:
+ case AV_CODEC_ID_AMR_NB:
st->codec->channels= 1; /* really needed */
/* force sample rate for amr, stsd in 3gp does not store sample rate */
st->codec->sample_rate = 8000;
break;
- case CODEC_ID_AMR_WB:
+ case AV_CODEC_ID_AMR_WB:
st->codec->channels = 1;
st->codec->sample_rate = 16000;
break;
- case CODEC_ID_MP2:
- case CODEC_ID_MP3:
+ case AV_CODEC_ID_MP2:
+ case AV_CODEC_ID_MP3:
st->codec->codec_type = AVMEDIA_TYPE_AUDIO; /* force type after stsd for m1a hdlr */
st->need_parsing = AVSTREAM_PARSE_FULL;
break;
- case CODEC_ID_GSM:
- case CODEC_ID_ADPCM_MS:
- case CODEC_ID_ADPCM_IMA_WAV:
- case CODEC_ID_ILBC:
+ case AV_CODEC_ID_GSM:
+ case AV_CODEC_ID_ADPCM_MS:
+ case AV_CODEC_ID_ADPCM_IMA_WAV:
+ case AV_CODEC_ID_ILBC:
st->codec->block_align = sc->bytes_per_frame;
break;
- case CODEC_ID_ALAC:
+ case AV_CODEC_ID_ALAC:
if (st->codec->extradata_size == 36) {
st->codec->channels = AV_RB8 (st->codec->extradata+21);
st->codec->sample_rate = AV_RB32(st->codec->extradata+32);
}
break;
- case CODEC_ID_AC3:
+ case AV_CODEC_ID_AC3:
st->need_parsing = AVSTREAM_PARSE_FULL;
break;
- case CODEC_ID_MPEG1VIDEO:
+ case AV_CODEC_ID_MPEG1VIDEO:
st->need_parsing = AVSTREAM_PARSE_FULL;
break;
- case CODEC_ID_VC1:
+ case AV_CODEC_ID_VC1:
st->need_parsing = AVSTREAM_PARSE_FULL;
break;
default:
@@ -2074,13 +2074,13 @@ static int mov_read_trak(MOVContext *c, AVIOContext *pb, MOVAtom atom)
switch (st->codec->codec_id) {
#if CONFIG_H261_DECODER
- case CODEC_ID_H261:
+ case AV_CODEC_ID_H261:
#endif
#if CONFIG_H263_DECODER
- case CODEC_ID_H263:
+ case AV_CODEC_ID_H263:
#endif
#if CONFIG_MPEG4_DECODER
- case CODEC_ID_MPEG4:
+ case AV_CODEC_ID_MPEG4:
#endif
st->codec->width = 0; /* let decoder init width/height */
st->codec->height= 0;
@@ -2962,7 +2962,7 @@ static int mov_read_header(AVFormatContext *s)
for (i = 0; i < s->nb_streams; i++) {
AVStream *st = s->streams[i];
MOVStreamContext *sc = st->priv_data;
- if(st->codec->codec_type == AVMEDIA_TYPE_AUDIO && st->codec->codec_id == CODEC_ID_AAC) {
+ if(st->codec->codec_type == AVMEDIA_TYPE_AUDIO && st->codec->codec_id == AV_CODEC_ID_AAC) {
sc->start_pad = 2112;
st->skip_samples = sc->start_pad;
}
diff --git a/libavformat/mov_chan.c b/libavformat/mov_chan.c
index 3d02aff036..475a66ba82 100644
--- a/libavformat/mov_chan.c
+++ b/libavformat/mov_chan.c
@@ -429,25 +429,25 @@ static const enum MovChannelLayoutTag mov_ch_layouts_wav[] = {
};
static const struct {
- enum CodecID codec_id;
+ enum AVCodecID codec_id;
const enum MovChannelLayoutTag *layouts;
} mov_codec_ch_layouts[] = {
- { CODEC_ID_AAC, mov_ch_layouts_aac },
- { CODEC_ID_AC3, mov_ch_layouts_ac3 },
- { CODEC_ID_ALAC, mov_ch_layouts_alac },
- { CODEC_ID_PCM_U8, mov_ch_layouts_wav },
- { CODEC_ID_PCM_S8, mov_ch_layouts_wav },
- { CODEC_ID_PCM_S16LE, mov_ch_layouts_wav },
- { CODEC_ID_PCM_S16BE, mov_ch_layouts_wav },
- { CODEC_ID_PCM_S24LE, mov_ch_layouts_wav },
- { CODEC_ID_PCM_S24BE, mov_ch_layouts_wav },
- { CODEC_ID_PCM_S32LE, mov_ch_layouts_wav },
- { CODEC_ID_PCM_S32BE, mov_ch_layouts_wav },
- { CODEC_ID_PCM_F32LE, mov_ch_layouts_wav },
- { CODEC_ID_PCM_F32BE, mov_ch_layouts_wav },
- { CODEC_ID_PCM_F64LE, mov_ch_layouts_wav },
- { CODEC_ID_PCM_F64BE, mov_ch_layouts_wav },
- { CODEC_ID_NONE, NULL },
+ { AV_CODEC_ID_AAC, mov_ch_layouts_aac },
+ { AV_CODEC_ID_AC3, mov_ch_layouts_ac3 },
+ { AV_CODEC_ID_ALAC, mov_ch_layouts_alac },
+ { AV_CODEC_ID_PCM_U8, mov_ch_layouts_wav },
+ { AV_CODEC_ID_PCM_S8, mov_ch_layouts_wav },
+ { AV_CODEC_ID_PCM_S16LE, mov_ch_layouts_wav },
+ { AV_CODEC_ID_PCM_S16BE, mov_ch_layouts_wav },
+ { AV_CODEC_ID_PCM_S24LE, mov_ch_layouts_wav },
+ { AV_CODEC_ID_PCM_S24BE, mov_ch_layouts_wav },
+ { AV_CODEC_ID_PCM_S32LE, mov_ch_layouts_wav },
+ { AV_CODEC_ID_PCM_S32BE, mov_ch_layouts_wav },
+ { AV_CODEC_ID_PCM_F32LE, mov_ch_layouts_wav },
+ { AV_CODEC_ID_PCM_F32BE, mov_ch_layouts_wav },
+ { AV_CODEC_ID_PCM_F64LE, mov_ch_layouts_wav },
+ { AV_CODEC_ID_PCM_F64BE, mov_ch_layouts_wav },
+ { AV_CODEC_ID_NONE, NULL },
};
uint64_t ff_mov_get_channel_layout(uint32_t tag, uint32_t bitmap)
@@ -490,7 +490,7 @@ static uint32_t mov_get_channel_label(uint32_t label)
return 0;
}
-uint32_t ff_mov_get_channel_layout_tag(enum CodecID codec_id,
+uint32_t ff_mov_get_channel_layout_tag(enum AVCodecID codec_id,
uint64_t channel_layout,
uint32_t *bitmap)
{
@@ -499,11 +499,11 @@ uint32_t ff_mov_get_channel_layout_tag(enum CodecID codec_id,
const enum MovChannelLayoutTag *layouts = NULL;
/* find the layout list for the specified codec */
- for (i = 0; mov_codec_ch_layouts[i].codec_id != CODEC_ID_NONE; i++) {
+ for (i = 0; mov_codec_ch_layouts[i].codec_id != AV_CODEC_ID_NONE; i++) {
if (mov_codec_ch_layouts[i].codec_id == codec_id)
break;
}
- if (mov_codec_ch_layouts[i].codec_id != CODEC_ID_NONE)
+ if (mov_codec_ch_layouts[i].codec_id != AV_CODEC_ID_NONE)
layouts = mov_codec_ch_layouts[i].layouts;
if (layouts) {
diff --git a/libavformat/mov_chan.h b/libavformat/mov_chan.h
index 0897cd92dd..3972aa6178 100644
--- a/libavformat/mov_chan.h
+++ b/libavformat/mov_chan.h
@@ -49,7 +49,7 @@ uint64_t ff_mov_get_channel_layout(uint32_t tag, uint32_t bitmap);
* @param[out] bitmap channel bitmap
* @return channel layout tag
*/
-uint32_t ff_mov_get_channel_layout_tag(enum CodecID codec_id,
+uint32_t ff_mov_get_channel_layout_tag(enum AVCodecID codec_id,
uint64_t channel_layout,
uint32_t *bitmap);
diff --git a/libavformat/movenc.c b/libavformat/movenc.c
index 659436b5ab..c6a433a230 100644
--- a/libavformat/movenc.c
+++ b/libavformat/movenc.c
@@ -314,8 +314,8 @@ static int mov_write_esds_tag(AVIOContext *pb, MOVTrack *track) // Basic
put_descr(pb, 0x04, 13 + decoder_specific_info_len);
// Object type indication
- if ((track->enc->codec_id == CODEC_ID_MP2 ||
- track->enc->codec_id == CODEC_ID_MP3) &&
+ if ((track->enc->codec_id == AV_CODEC_ID_MP2 ||
+ track->enc->codec_id == AV_CODEC_ID_MP3) &&
track->enc->sample_rate > 24000)
avio_w8(pb, 0x6B); // 11172-3
else
@@ -350,10 +350,10 @@ static int mov_write_esds_tag(AVIOContext *pb, MOVTrack *track) // Basic
static int mov_pcm_le_gt16(enum CodecID codec_id)
{
- return codec_id == CODEC_ID_PCM_S24LE ||
- codec_id == CODEC_ID_PCM_S32LE ||
- codec_id == CODEC_ID_PCM_F32LE ||
- codec_id == CODEC_ID_PCM_F64LE;
+ return codec_id == AV_CODEC_ID_PCM_S24LE ||
+ codec_id == AV_CODEC_ID_PCM_S32LE ||
+ codec_id == AV_CODEC_ID_PCM_F32LE ||
+ codec_id == AV_CODEC_ID_PCM_F64LE;
}
static int mov_write_ms_tag(AVIOContext *pb, MOVTrack *track)
@@ -407,13 +407,13 @@ static int mov_write_wave_tag(AVIOContext *pb, MOVTrack *track)
avio_wb32(pb, 0); /* size */
ffio_wfourcc(pb, "wave");
- if (track->enc->codec_id != CODEC_ID_QDM2) {
+ if (track->enc->codec_id != AV_CODEC_ID_QDM2) {
avio_wb32(pb, 12); /* size */
ffio_wfourcc(pb, "frma");
avio_wl32(pb, track->tag);
}
- if (track->enc->codec_id == CODEC_ID_AAC) {
+ if (track->enc->codec_id == AV_CODEC_ID_AAC) {
/* useless atom needed by mplayer, ipod, not needed by quicktime */
avio_wb32(pb, 12); /* size */
ffio_wfourcc(pb, "mp4a");
@@ -421,15 +421,15 @@ static int mov_write_wave_tag(AVIOContext *pb, MOVTrack *track)
mov_write_esds_tag(pb, track);
} else if (mov_pcm_le_gt16(track->enc->codec_id)) {
mov_write_enda_tag(pb);
- } else if (track->enc->codec_id == CODEC_ID_AMR_NB) {
+ } else if (track->enc->codec_id == AV_CODEC_ID_AMR_NB) {
mov_write_amr_tag(pb, track);
- } else if (track->enc->codec_id == CODEC_ID_AC3) {
+ } else if (track->enc->codec_id == AV_CODEC_ID_AC3) {
mov_write_ac3_tag(pb, track);
- } else if (track->enc->codec_id == CODEC_ID_ALAC ||
- track->enc->codec_id == CODEC_ID_QDM2) {
+ } else if (track->enc->codec_id == AV_CODEC_ID_ALAC ||
+ track->enc->codec_id == AV_CODEC_ID_QDM2) {
mov_write_extradata_tag(pb, track);
- } else if (track->enc->codec_id == CODEC_ID_ADPCM_MS ||
- track->enc->codec_id == CODEC_ID_ADPCM_IMA_WAV) {
+ } else if (track->enc->codec_id == AV_CODEC_ID_ADPCM_MS ||
+ track->enc->codec_id == AV_CODEC_ID_ADPCM_IMA_WAV) {
mov_write_ms_tag(pb, track);
}
@@ -543,25 +543,25 @@ static int mov_write_glbl_tag(AVIOContext *pb, MOVTrack *track)
* Compute flags for 'lpcm' tag.
* See CoreAudioTypes and AudioStreamBasicDescription at Apple.
*/
-static int mov_get_lpcm_flags(enum CodecID codec_id)
+static int mov_get_lpcm_flags(enum AVCodecID codec_id)
{
switch (codec_id) {
- case CODEC_ID_PCM_F32BE:
- case CODEC_ID_PCM_F64BE:
+ case AV_CODEC_ID_PCM_F32BE:
+ case AV_CODEC_ID_PCM_F64BE:
return 11;
- case CODEC_ID_PCM_F32LE:
- case CODEC_ID_PCM_F64LE:
+ case AV_CODEC_ID_PCM_F32LE:
+ case AV_CODEC_ID_PCM_F64LE:
return 9;
- case CODEC_ID_PCM_U8:
+ case AV_CODEC_ID_PCM_U8:
return 10;
- case CODEC_ID_PCM_S16BE:
- case CODEC_ID_PCM_S24BE:
- case CODEC_ID_PCM_S32BE:
+ case AV_CODEC_ID_PCM_S16BE:
+ case AV_CODEC_ID_PCM_S24BE:
+ case AV_CODEC_ID_PCM_S32BE:
return 14;
- case CODEC_ID_PCM_S8:
- case CODEC_ID_PCM_S16LE:
- case CODEC_ID_PCM_S24LE:
- case CODEC_ID_PCM_S32LE:
+ case AV_CODEC_ID_PCM_S8:
+ case AV_CODEC_ID_PCM_S16LE:
+ case AV_CODEC_ID_PCM_S24LE:
+ case AV_CODEC_ID_PCM_S32LE:
return 12;
default:
return 0;
@@ -616,9 +616,9 @@ static int mov_write_audio_tag(AVIOContext *pb, MOVTrack *track)
tag = AV_RL32("lpcm");
version = 2;
} else if (track->audio_vbr || mov_pcm_le_gt16(track->enc->codec_id) ||
- track->enc->codec_id == CODEC_ID_ADPCM_MS ||
- track->enc->codec_id == CODEC_ID_ADPCM_IMA_WAV ||
- track->enc->codec_id == CODEC_ID_QDM2) {
+ track->enc->codec_id == AV_CODEC_ID_ADPCM_MS ||
+ track->enc->codec_id == AV_CODEC_ID_ADPCM_IMA_WAV ||
+ track->enc->codec_id == AV_CODEC_ID_QDM2) {
version = 1;
}
}
@@ -651,8 +651,8 @@ static int mov_write_audio_tag(AVIOContext *pb, MOVTrack *track)
} else {
if (track->mode == MODE_MOV) {
avio_wb16(pb, track->enc->channels);
- if (track->enc->codec_id == CODEC_ID_PCM_U8 ||
- track->enc->codec_id == CODEC_ID_PCM_S8)
+ if (track->enc->codec_id == AV_CODEC_ID_PCM_U8 ||
+ track->enc->codec_id == AV_CODEC_ID_PCM_S8)
avio_wb16(pb, 8); /* bits per sample */
else
avio_wb16(pb, 16);
@@ -677,24 +677,24 @@ static int mov_write_audio_tag(AVIOContext *pb, MOVTrack *track)
}
if(track->mode == MODE_MOV &&
- (track->enc->codec_id == CODEC_ID_AAC ||
- track->enc->codec_id == CODEC_ID_AC3 ||
- track->enc->codec_id == CODEC_ID_AMR_NB ||
- track->enc->codec_id == CODEC_ID_ALAC ||
- track->enc->codec_id == CODEC_ID_ADPCM_MS ||
- track->enc->codec_id == CODEC_ID_ADPCM_IMA_WAV ||
- track->enc->codec_id == CODEC_ID_QDM2 ||
+ (track->enc->codec_id == AV_CODEC_ID_AAC ||
+ track->enc->codec_id == AV_CODEC_ID_AC3 ||
+ track->enc->codec_id == AV_CODEC_ID_AMR_NB ||
+ track->enc->codec_id == AV_CODEC_ID_ALAC ||
+ track->enc->codec_id == AV_CODEC_ID_ADPCM_MS ||
+ track->enc->codec_id == AV_CODEC_ID_ADPCM_IMA_WAV ||
+ track->enc->codec_id == AV_CODEC_ID_QDM2 ||
(mov_pcm_le_gt16(track->enc->codec_id) && version==1)))
mov_write_wave_tag(pb, track);
else if(track->tag == MKTAG('m','p','4','a'))
mov_write_esds_tag(pb, track);
- else if(track->enc->codec_id == CODEC_ID_AMR_NB)
+ else if(track->enc->codec_id == AV_CODEC_ID_AMR_NB)
mov_write_amr_tag(pb, track);
- else if(track->enc->codec_id == CODEC_ID_AC3)
+ else if(track->enc->codec_id == AV_CODEC_ID_AC3)
mov_write_ac3_tag(pb, track);
- else if(track->enc->codec_id == CODEC_ID_ALAC)
+ else if(track->enc->codec_id == AV_CODEC_ID_ALAC)
mov_write_extradata_tag(pb, track);
- else if (track->enc->codec_id == CODEC_ID_WMAPRO)
+ else if (track->enc->codec_id == AV_CODEC_ID_WMAPRO)
mov_write_wfex_tag(pb, track);
else if (track->vos_len > 0)
mov_write_glbl_tag(pb, track);
@@ -782,11 +782,11 @@ static int mp4_get_codec_tag(AVFormatContext *s, MOVTrack *track)
if (!ff_codec_get_tag(ff_mp4_obj_type, track->enc->codec_id))
return 0;
- if (track->enc->codec_id == CODEC_ID_H264) tag = MKTAG('a','v','c','1');
- else if (track->enc->codec_id == CODEC_ID_AC3) tag = MKTAG('a','c','-','3');
- else if (track->enc->codec_id == CODEC_ID_DIRAC) tag = MKTAG('d','r','a','c');
- else if (track->enc->codec_id == CODEC_ID_MOV_TEXT) tag = MKTAG('t','x','3','g');
- else if (track->enc->codec_id == CODEC_ID_VC1) tag = MKTAG('v','c','-','1');
+ if (track->enc->codec_id == AV_CODEC_ID_H264) tag = MKTAG('a','v','c','1');
+ else if (track->enc->codec_id == AV_CODEC_ID_AC3) tag = MKTAG('a','c','-','3');
+ else if (track->enc->codec_id == AV_CODEC_ID_DIRAC) tag = MKTAG('d','r','a','c');
+ else if (track->enc->codec_id == AV_CODEC_ID_MOV_TEXT) tag = MKTAG('t','x','3','g');
+ else if (track->enc->codec_id == AV_CODEC_ID_VC1) tag = MKTAG('v','c','-','1');
else if (track->enc->codec_type == AVMEDIA_TYPE_VIDEO) tag = MKTAG('m','p','4','v');
else if (track->enc->codec_type == AVMEDIA_TYPE_AUDIO) tag = MKTAG('m','p','4','a');
@@ -794,14 +794,14 @@ static int mp4_get_codec_tag(AVFormatContext *s, MOVTrack *track)
}
static const AVCodecTag codec_ipod_tags[] = {
- { CODEC_ID_H264, MKTAG('a','v','c','1') },
- { CODEC_ID_MPEG4, MKTAG('m','p','4','v') },
- { CODEC_ID_AAC, MKTAG('m','p','4','a') },
- { CODEC_ID_ALAC, MKTAG('a','l','a','c') },
- { CODEC_ID_AC3, MKTAG('a','c','-','3') },
- { CODEC_ID_MOV_TEXT, MKTAG('t','x','3','g') },
- { CODEC_ID_MOV_TEXT, MKTAG('t','e','x','t') },
- { CODEC_ID_NONE, 0 },
+ { AV_CODEC_ID_H264, MKTAG('a','v','c','1') },
+ { AV_CODEC_ID_MPEG4, MKTAG('m','p','4','v') },
+ { AV_CODEC_ID_AAC, MKTAG('m','p','4','a') },
+ { AV_CODEC_ID_ALAC, MKTAG('a','l','a','c') },
+ { AV_CODEC_ID_AC3, MKTAG('a','c','-','3') },
+ { AV_CODEC_ID_MOV_TEXT, MKTAG('t','x','3','g') },
+ { AV_CODEC_ID_MOV_TEXT, MKTAG('t','e','x','t') },
+ { AV_CODEC_ID_NONE, 0 },
};
static int ipod_get_codec_tag(AVFormatContext *s, MOVTrack *track)
@@ -889,13 +889,13 @@ static int mov_get_codec_tag(AVFormatContext *s, MOVTrack *track)
int tag = track->enc->codec_tag;
if (!tag || (track->enc->strict_std_compliance >= FF_COMPLIANCE_NORMAL &&
- (track->enc->codec_id == CODEC_ID_DVVIDEO ||
- track->enc->codec_id == CODEC_ID_RAWVIDEO ||
- track->enc->codec_id == CODEC_ID_H263 ||
+ (track->enc->codec_id == AV_CODEC_ID_DVVIDEO ||
+ track->enc->codec_id == AV_CODEC_ID_RAWVIDEO ||
+ track->enc->codec_id == AV_CODEC_ID_H263 ||
av_get_bits_per_sample(track->enc->codec_id)))) { // pcm audio
- if (track->enc->codec_id == CODEC_ID_DVVIDEO)
+ if (track->enc->codec_id == AV_CODEC_ID_DVVIDEO)
tag = mov_get_dv_codec_tag(s, track);
- else if (track->enc->codec_id == CODEC_ID_RAWVIDEO)
+ else if (track->enc->codec_id == AV_CODEC_ID_RAWVIDEO)
tag = mov_get_rawvideo_codec_tag(s, track);
else if (track->enc->codec_type == AVMEDIA_TYPE_VIDEO) {
tag = ff_codec_get_tag(ff_codec_movvideo_tags, track->enc->codec_id);
@@ -923,14 +923,14 @@ static int mov_get_codec_tag(AVFormatContext *s, MOVTrack *track)
}
static const AVCodecTag codec_3gp_tags[] = {
- { CODEC_ID_H263, MKTAG('s','2','6','3') },
- { CODEC_ID_H264, MKTAG('a','v','c','1') },
- { CODEC_ID_MPEG4, MKTAG('m','p','4','v') },
- { CODEC_ID_AAC, MKTAG('m','p','4','a') },
- { CODEC_ID_AMR_NB, MKTAG('s','a','m','r') },
- { CODEC_ID_AMR_WB, MKTAG('s','a','w','b') },
- { CODEC_ID_MOV_TEXT, MKTAG('t','x','3','g') },
- { CODEC_ID_NONE, 0 },
+ { AV_CODEC_ID_H263, MKTAG('s','2','6','3') },
+ { AV_CODEC_ID_H264, MKTAG('a','v','c','1') },
+ { AV_CODEC_ID_MPEG4, MKTAG('m','p','4','v') },
+ { AV_CODEC_ID_AAC, MKTAG('m','p','4','a') },
+ { AV_CODEC_ID_AMR_NB, MKTAG('s','a','m','r') },
+ { AV_CODEC_ID_AMR_WB, MKTAG('s','a','w','b') },
+ { AV_CODEC_ID_MOV_TEXT, MKTAG('t','x','3','g') },
+ { AV_CODEC_ID_NONE, 0 },
};
static int mov_find_codec_tag(AVFormatContext *s, MOVTrack *track)
@@ -941,7 +941,7 @@ static int mov_find_codec_tag(AVFormatContext *s, MOVTrack *track)
tag = mp4_get_codec_tag(s, track);
else if (track->mode == MODE_ISM) {
tag = mp4_get_codec_tag(s, track);
- if (!tag && track->enc->codec_id == CODEC_ID_WMAPRO)
+ if (!tag && track->enc->codec_id == AV_CODEC_ID_WMAPRO)
tag = MKTAG('w', 'm', 'a', ' ');
} else if (track->mode == MODE_IPOD)
tag = ipod_get_codec_tag(s, track);
@@ -1029,7 +1029,7 @@ static int mov_write_video_tag(AVIOContext *pb, MOVTrack *track)
avio_wb16(pb, 0); /* Codec stream revision (=0) */
if (track->mode == MODE_MOV) {
ffio_wfourcc(pb, "FFMP"); /* Vendor */
- if(track->enc->codec_id == CODEC_ID_RAWVIDEO) {
+ if(track->enc->codec_id == AV_CODEC_ID_RAWVIDEO) {
avio_wb32(pb, 0); /* Temporal Quality */
avio_wb32(pb, 0x400); /* Spatial Quality = lossless*/
} else {
@@ -1061,21 +1061,21 @@ static int mov_write_video_tag(AVIOContext *pb, MOVTrack *track)
avio_wb16(pb, 0xffff); /* Reserved */
if(track->tag == MKTAG('m','p','4','v'))
mov_write_esds_tag(pb, track);
- else if(track->enc->codec_id == CODEC_ID_H263)
+ else if(track->enc->codec_id == AV_CODEC_ID_H263)
mov_write_d263_tag(pb);
- else if(track->enc->codec_id == CODEC_ID_AVUI ||
- track->enc->codec_id == CODEC_ID_SVQ3) {
+ else if(track->enc->codec_id == AV_CODEC_ID_AVUI ||
+ track->enc->codec_id == AV_CODEC_ID_SVQ3) {
mov_write_extradata_tag(pb, track);
avio_wb32(pb, 0);
- } else if(track->enc->codec_id == CODEC_ID_DNXHD)
+ } else if(track->enc->codec_id == AV_CODEC_ID_DNXHD)
mov_write_avid_tag(pb, track);
- else if(track->enc->codec_id == CODEC_ID_H264) {
+ else if(track->enc->codec_id == AV_CODEC_ID_H264) {
mov_write_avcc_tag(pb, track);
if(track->mode == MODE_IPOD)
mov_write_uuid_tag_ipod(pb);
} else if (track->enc->field_order != AV_FIELD_UNKNOWN)
mov_write_fiel_tag(pb, track);
- else if (track->enc->codec_id == CODEC_ID_VC1 && track->vos_len > 0)
+ else if (track->enc->codec_id == AV_CODEC_ID_VC1 && track->vos_len > 0)
mov_write_dvc1_tag(pb, track);
else if (track->vos_len > 0)
mov_write_glbl_tag(pb, track);
@@ -2302,7 +2302,7 @@ static int mov_write_isml_manifest(AVIOContext *pb, MOVMuxContext *mov)
param_write_int(pb, "systemBitrate", track->enc->bit_rate);
param_write_int(pb, "trackID", track_id);
if (track->enc->codec_type == AVMEDIA_TYPE_VIDEO) {
- if (track->enc->codec_id == CODEC_ID_H264) {
+ if (track->enc->codec_id == AV_CODEC_ID_H264) {
uint8_t *ptr;
int size = track->enc->extradata_size;
if (!ff_avc_write_annexb_extradata(track->enc->extradata, &ptr,
@@ -2313,7 +2313,7 @@ static int mov_write_isml_manifest(AVIOContext *pb, MOVMuxContext *mov)
av_free(ptr);
}
param_write_string(pb, "FourCC", "H264");
- } else if (track->enc->codec_id == CODEC_ID_VC1) {
+ } else if (track->enc->codec_id == AV_CODEC_ID_VC1) {
param_write_string(pb, "FourCC", "WVC1");
param_write_hex(pb, "CodecPrivateData", track->enc->extradata,
track->enc->extradata_size);
@@ -2323,9 +2323,9 @@ static int mov_write_isml_manifest(AVIOContext *pb, MOVMuxContext *mov)
param_write_int(pb, "DisplayWidth", track->enc->width);
param_write_int(pb, "DisplayHeight", track->enc->height);
} else {
- if (track->enc->codec_id == CODEC_ID_AAC) {
+ if (track->enc->codec_id == AV_CODEC_ID_AAC) {
param_write_string(pb, "FourCC", "AACL");
- } else if (track->enc->codec_id == CODEC_ID_WMAPRO) {
+ } else if (track->enc->codec_id == AV_CODEC_ID_WMAPRO) {
param_write_string(pb, "FourCC", "WMAP");
}
param_write_hex(pb, "CodecPrivateData", track->enc->extradata,
@@ -2657,7 +2657,7 @@ static int mov_write_ftyp_tag(AVIOContext *pb, AVFormatContext *s)
AVStream *st = s->streams[i];
if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO)
has_video = 1;
- if (st->codec->codec_id == CODEC_ID_H264)
+ if (st->codec->codec_id == AV_CODEC_ID_H264)
has_h264 = 1;
}
@@ -2748,7 +2748,7 @@ static void mov_write_uuidprof_tag(AVIOContext *pb, AVFormatContext *s)
ffio_wfourcc(pb, "VPRF"); /* video */
avio_wb32(pb, 0x0);
avio_wb32(pb, 0x1); /* TrackID */
- if (video_codec->codec_id == CODEC_ID_H264) {
+ if (video_codec->codec_id == AV_CODEC_ID_H264) {
ffio_wfourcc(pb, "avc1");
avio_wb16(pb, 0x014D);
avio_wb16(pb, 0x0015);
@@ -2998,7 +2998,7 @@ int ff_mov_write_packet(AVFormatContext *s, AVPacket *pkt)
}
}
- if (enc->codec_id == CODEC_ID_AMR_NB) {
+ if (enc->codec_id == AV_CODEC_ID_AMR_NB) {
/* We must find out how many AMR blocks there are in one packet */
static uint16_t packed_size[16] =
{13, 14, 16, 18, 20, 21, 27, 32, 6, 0, 0, 0, 0, 0, 0, 1};
@@ -3012,8 +3012,8 @@ int ff_mov_write_packet(AVFormatContext *s, AVPacket *pkt)
av_log(s, AV_LOG_ERROR, "fatal error, input is not a single packet, implement a AVParser for it\n");
return -1;
}
- } else if (enc->codec_id == CODEC_ID_ADPCM_MS ||
- enc->codec_id == CODEC_ID_ADPCM_IMA_WAV) {
+ } else if (enc->codec_id == AV_CODEC_ID_ADPCM_MS ||
+ enc->codec_id == AV_CODEC_ID_ADPCM_IMA_WAV) {
samples_in_chunk = enc->frame_size;
} else if (trk->sample_size)
samples_in_chunk = size / trk->sample_size;
@@ -3027,7 +3027,7 @@ int ff_mov_write_packet(AVFormatContext *s, AVPacket *pkt)
memcpy(trk->vos_data, enc->extradata, trk->vos_len);
}
- if (enc->codec_id == CODEC_ID_H264 && trk->vos_len > 0 && *(uint8_t *)trk->vos_data != 1) {
+ if (enc->codec_id == AV_CODEC_ID_H264 && trk->vos_len > 0 && *(uint8_t *)trk->vos_data != 1) {
/* from x264 or from bytestream h264 */
/* nal reformating needed */
if (trk->hint_track >= 0 && trk->hint_track < mov->nb_streams) {
@@ -3037,7 +3037,7 @@ int ff_mov_write_packet(AVFormatContext *s, AVPacket *pkt)
} else {
size = ff_avc_parse_nal_units(pb, pkt->data, pkt->size);
}
- } else if (enc->codec_id == CODEC_ID_AAC && pkt->size > 2 &&
+ } else if (enc->codec_id == AV_CODEC_ID_AAC && pkt->size > 2 &&
(AV_RB16(pkt->data) & 0xfff0) == 0xfff0) {
av_log(s, AV_LOG_ERROR, "malformated aac bitstream, use -absf aac_adtstoasc\n");
return -1;
@@ -3045,8 +3045,8 @@ int ff_mov_write_packet(AVFormatContext *s, AVPacket *pkt)
avio_write(pb, pkt->data, size);
}
- if ((enc->codec_id == CODEC_ID_DNXHD ||
- enc->codec_id == CODEC_ID_AC3) && !trk->vos_len) {
+ if ((enc->codec_id == AV_CODEC_ID_DNXHD ||
+ enc->codec_id == AV_CODEC_ID_AC3) && !trk->vos_len) {
/* copy frame to create needed atoms */
trk->vos_len = size;
trk->vos_data = av_malloc(size);
@@ -3087,10 +3087,10 @@ int ff_mov_write_packet(AVFormatContext *s, AVPacket *pkt)
trk->flags |= MOV_TRACK_CTTS;
trk->cluster[trk->entry].cts = pkt->pts - pkt->dts;
trk->cluster[trk->entry].flags = 0;
- if (enc->codec_id == CODEC_ID_VC1) {
+ if (enc->codec_id == AV_CODEC_ID_VC1) {
mov_parse_vc1_frame(pkt, trk, mov->fragments);
} else if (pkt->flags & AV_PKT_FLAG_KEY) {
- if (mov->mode == MODE_MOV && enc->codec_id == CODEC_ID_MPEG2VIDEO &&
+ if (mov->mode == MODE_MOV && enc->codec_id == AV_CODEC_ID_MPEG2VIDEO &&
trk->entry > 0) { // force sync sample for the first key frame
mov_parse_mpeg2_frame(pkt, &trk->cluster[trk->entry].flags);
if (trk->cluster[trk->entry].flags & MOV_PARTIAL_SYNC_SAMPLE)
@@ -3196,7 +3196,7 @@ static int mov_write_packet(AVFormatContext *s, AVPacket *pkt)
MOVTrack *trk = &mov->tracks[i];
int ret;
- if (trk->enc->codec_id == CODEC_ID_MOV_TEXT &&
+ if (trk->enc->codec_id == AV_CODEC_ID_MOV_TEXT &&
trk->track_duration < pkt->dts &&
(trk->entry == 0 || !trk->last_sample_is_subtitle_end)) {
ret = mov_write_subtitle_end_packet(s, i, trk->track_duration);
@@ -3459,9 +3459,9 @@ static int mov_write_header(AVFormatContext *s)
if(!st->codec->frame_size && !av_get_bits_per_sample(st->codec->codec_id)) {
av_log(s, AV_LOG_WARNING, "track %d: codec frame size is not set\n", i);
track->audio_vbr = 1;
- }else if(st->codec->codec_id == CODEC_ID_ADPCM_MS ||
- st->codec->codec_id == CODEC_ID_ADPCM_IMA_WAV ||
- st->codec->codec_id == CODEC_ID_ILBC){
+ }else if(st->codec->codec_id == AV_CODEC_ID_ADPCM_MS ||
+ st->codec->codec_id == AV_CODEC_ID_ADPCM_IMA_WAV ||
+ st->codec->codec_id == AV_CODEC_ID_ILBC){
if (!st->codec->block_align) {
av_log(s, AV_LOG_ERROR, "track %d: codec block align is not set for adpcm\n", i);
goto error;
@@ -3473,7 +3473,7 @@ static int mov_write_header(AVFormatContext *s)
track->sample_size = (av_get_bits_per_sample(st->codec->codec_id) >> 3) * st->codec->channels;
}
if (track->mode != MODE_MOV &&
- track->enc->codec_id == CODEC_ID_MP3 && track->timescale < 16000) {
+ track->enc->codec_id == AV_CODEC_ID_MP3 && track->timescale < 16000) {
av_log(s, AV_LOG_ERROR, "track %d: muxing mp3 at %dhz is not supported\n",
i, track->enc->sample_rate);
goto error;
@@ -3586,7 +3586,7 @@ static int mov_write_trailer(AVFormatContext *s)
*/
for (i = 0; i < mov->nb_streams; i++) {
MOVTrack *trk = &mov->tracks[i];
- if (trk->enc->codec_id == CODEC_ID_MOV_TEXT &&
+ if (trk->enc->codec_id == AV_CODEC_ID_MOV_TEXT &&
!trk->last_sample_is_subtitle_end) {
mov_write_subtitle_end_packet(s, i, trk->track_duration);
trk->last_sample_is_subtitle_end = 1;
@@ -3669,9 +3669,9 @@ AVOutputFormat ff_mov_muxer = {
.long_name = NULL_IF_CONFIG_SMALL("QuickTime / MOV"),
.extensions = "mov",
.priv_data_size = sizeof(MOVMuxContext),
- .audio_codec = CODEC_ID_AAC,
+ .audio_codec = AV_CODEC_ID_AAC,
.video_codec = CONFIG_LIBX264_ENCODER ?
- CODEC_ID_H264 : CODEC_ID_MPEG4,
+ AV_CODEC_ID_H264 : AV_CODEC_ID_MPEG4,
.write_header = mov_write_header,
.write_packet = mov_write_packet,
.write_trailer = mov_write_trailer,
@@ -3689,8 +3689,8 @@ AVOutputFormat ff_tgp_muxer = {
.long_name = NULL_IF_CONFIG_SMALL("3GP (3GPP file format)"),
.extensions = "3gp",
.priv_data_size = sizeof(MOVMuxContext),
- .audio_codec = CODEC_ID_AMR_NB,
- .video_codec = CODEC_ID_H263,
+ .audio_codec = AV_CODEC_ID_AMR_NB,
+ .video_codec = AV_CODEC_ID_H263,
.write_header = mov_write_header,
.write_packet = mov_write_packet,
.write_trailer = mov_write_trailer,
@@ -3707,9 +3707,9 @@ AVOutputFormat ff_mp4_muxer = {
.mime_type = "application/mp4",
.extensions = "mp4",
.priv_data_size = sizeof(MOVMuxContext),
- .audio_codec = CODEC_ID_AAC,
+ .audio_codec = AV_CODEC_ID_AAC,
.video_codec = CONFIG_LIBX264_ENCODER ?
- CODEC_ID_H264 : CODEC_ID_MPEG4,
+ AV_CODEC_ID_H264 : AV_CODEC_ID_MPEG4,
.write_header = mov_write_header,
.write_packet = mov_write_packet,
.write_trailer = mov_write_trailer,
@@ -3725,9 +3725,9 @@ AVOutputFormat ff_psp_muxer = {
.long_name = NULL_IF_CONFIG_SMALL("PSP MP4 (MPEG-4 Part 14)"),
.extensions = "mp4,psp",
.priv_data_size = sizeof(MOVMuxContext),
- .audio_codec = CODEC_ID_AAC,
+ .audio_codec = AV_CODEC_ID_AAC,
.video_codec = CONFIG_LIBX264_ENCODER ?
- CODEC_ID_H264 : CODEC_ID_MPEG4,
+ AV_CODEC_ID_H264 : AV_CODEC_ID_MPEG4,
.write_header = mov_write_header,
.write_packet = mov_write_packet,
.write_trailer = mov_write_trailer,
@@ -3743,8 +3743,8 @@ AVOutputFormat ff_tg2_muxer = {
.long_name = NULL_IF_CONFIG_SMALL("3GP2 (3GPP2 file format)"),
.extensions = "3g2",
.priv_data_size = sizeof(MOVMuxContext),
- .audio_codec = CODEC_ID_AMR_NB,
- .video_codec = CODEC_ID_H263,
+ .audio_codec = AV_CODEC_ID_AMR_NB,
+ .video_codec = AV_CODEC_ID_H263,
.write_header = mov_write_header,
.write_packet = mov_write_packet,
.write_trailer = mov_write_trailer,
@@ -3761,8 +3761,8 @@ AVOutputFormat ff_ipod_muxer = {
.mime_type = "application/mp4",
.extensions = "m4v,m4a",
.priv_data_size = sizeof(MOVMuxContext),
- .audio_codec = CODEC_ID_AAC,
- .video_codec = CODEC_ID_H264,
+ .audio_codec = AV_CODEC_ID_AAC,
+ .video_codec = AV_CODEC_ID_H264,
.write_header = mov_write_header,
.write_packet = mov_write_packet,
.write_trailer = mov_write_trailer,
@@ -3779,8 +3779,8 @@ AVOutputFormat ff_ismv_muxer = {
.mime_type = "application/mp4",
.extensions = "ismv,isma",
.priv_data_size = sizeof(MOVMuxContext),
- .audio_codec = CODEC_ID_AAC,
- .video_codec = CODEC_ID_H264,
+ .audio_codec = AV_CODEC_ID_AAC,
+ .video_codec = AV_CODEC_ID_H264,
.write_header = mov_write_header,
.write_packet = mov_write_packet,
.write_trailer = mov_write_trailer,
diff --git a/libavformat/mp3dec.c b/libavformat/mp3dec.c
index aa936c0e98..5bd0e9648b 100644
--- a/libavformat/mp3dec.c
+++ b/libavformat/mp3dec.c
@@ -166,7 +166,7 @@ static int mp3_read_header(AVFormatContext *s)
return AVERROR(ENOMEM);
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- st->codec->codec_id = CODEC_ID_MP3;
+ st->codec->codec_id = AV_CODEC_ID_MP3;
st->need_parsing = AVSTREAM_PARSE_FULL_RAW;
st->start_time = 0;
diff --git a/libavformat/mp3enc.c b/libavformat/mp3enc.c
index 80d4675d86..0ce1ddc750 100644
--- a/libavformat/mp3enc.c
+++ b/libavformat/mp3enc.c
@@ -376,8 +376,8 @@ AVOutputFormat ff_mp2_muxer = {
.long_name = NULL_IF_CONFIG_SMALL("MP2 (MPEG audio layer 2)"),
.mime_type = "audio/x-mpeg",
.extensions = "mp2,m2a",
- .audio_codec = CODEC_ID_MP2,
- .video_codec = CODEC_ID_NONE,
+ .audio_codec = AV_CODEC_ID_MP2,
+ .video_codec = AV_CODEC_ID_NONE,
.write_packet = ff_raw_write_packet,
.write_trailer = mp2_write_trailer,
.flags = AVFMT_NOTIMESTAMPS,
@@ -461,7 +461,7 @@ static int mp3_write_header(struct AVFormatContext *s)
for (i = 0; i < s->nb_streams; i++) {
AVStream *st = s->streams[i];
if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
- if (mp3->audio_stream_idx >= 0 || st->codec->codec_id != CODEC_ID_MP3) {
+ if (mp3->audio_stream_idx >= 0 || st->codec->codec_id != AV_CODEC_ID_MP3) {
av_log(s, AV_LOG_ERROR, "Invalid audio stream. Exactly one MP3 "
"audio stream is required.\n");
return AVERROR(EINVAL);
@@ -511,8 +511,8 @@ AVOutputFormat ff_mp3_muxer = {
.mime_type = "audio/x-mpeg",
.extensions = "mp3",
.priv_data_size = sizeof(MP3Context),
- .audio_codec = CODEC_ID_MP3,
- .video_codec = CODEC_ID_PNG,
+ .audio_codec = AV_CODEC_ID_MP3,
+ .video_codec = AV_CODEC_ID_PNG,
.write_header = mp3_write_header,
.write_packet = mp3_write_packet,
.write_trailer = mp3_write_trailer,
diff --git a/libavformat/mpc.c b/libavformat/mpc.c
index 03e09e94c5..4ebc6ae184 100644
--- a/libavformat/mpc.c
+++ b/libavformat/mpc.c
@@ -89,7 +89,7 @@ static int mpc_read_header(AVFormatContext *s)
if (!st)
return AVERROR(ENOMEM);
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- st->codec->codec_id = CODEC_ID_MUSEPACK7;
+ st->codec->codec_id = AV_CODEC_ID_MUSEPACK7;
st->codec->channels = 2;
st->codec->bits_per_coded_sample = 16;
diff --git a/libavformat/mpc8.c b/libavformat/mpc8.c
index 28b64325e7..56ed7ade13 100644
--- a/libavformat/mpc8.c
+++ b/libavformat/mpc8.c
@@ -229,7 +229,7 @@ static int mpc8_read_header(AVFormatContext *s)
if (!st)
return AVERROR(ENOMEM);
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- st->codec->codec_id = CODEC_ID_MUSEPACK8;
+ st->codec->codec_id = AV_CODEC_ID_MUSEPACK8;
st->codec->bits_per_coded_sample = 16;
st->codec->extradata_size = 2;
diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c
index f01e905982..54125ae9a2 100644
--- a/libavformat/mpeg.c
+++ b/libavformat/mpeg.c
@@ -377,7 +377,7 @@ static int mpegps_read_packet(AVFormatContext *s,
int len, startcode, i, es_type, ret;
int lpcm_header_len;
int request_probe= 0;
- enum CodecID codec_id = CODEC_ID_NONE;
+ enum AVCodecID codec_id = AV_CODEC_ID_NONE;
enum AVMediaType type;
int64_t pts, dts, dummy_pos; //dummy_pos is needed for the index building to work
@@ -411,26 +411,26 @@ static int mpegps_read_packet(AVFormatContext *s,
es_type = m->psm_es_type[startcode & 0xff];
if(es_type > 0 && es_type != STREAM_TYPE_PRIVATE_DATA){
if(es_type == STREAM_TYPE_VIDEO_MPEG1){
- codec_id = CODEC_ID_MPEG2VIDEO;
+ codec_id = AV_CODEC_ID_MPEG2VIDEO;
type = AVMEDIA_TYPE_VIDEO;
} else if(es_type == STREAM_TYPE_VIDEO_MPEG2){
- codec_id = CODEC_ID_MPEG2VIDEO;
+ codec_id = AV_CODEC_ID_MPEG2VIDEO;
type = AVMEDIA_TYPE_VIDEO;
} else if(es_type == STREAM_TYPE_AUDIO_MPEG1 ||
es_type == STREAM_TYPE_AUDIO_MPEG2){
- codec_id = CODEC_ID_MP3;
+ codec_id = AV_CODEC_ID_MP3;
type = AVMEDIA_TYPE_AUDIO;
} else if(es_type == STREAM_TYPE_AUDIO_AAC){
- codec_id = CODEC_ID_AAC;
+ codec_id = AV_CODEC_ID_AAC;
type = AVMEDIA_TYPE_AUDIO;
} else if(es_type == STREAM_TYPE_VIDEO_MPEG4){
- codec_id = CODEC_ID_MPEG4;
+ codec_id = AV_CODEC_ID_MPEG4;
type = AVMEDIA_TYPE_VIDEO;
} else if(es_type == STREAM_TYPE_VIDEO_H264){
- codec_id = CODEC_ID_H264;
+ codec_id = AV_CODEC_ID_H264;
type = AVMEDIA_TYPE_VIDEO;
} else if(es_type == STREAM_TYPE_AUDIO_AC3){
- codec_id = CODEC_ID_AC3;
+ codec_id = AV_CODEC_ID_AC3;
type = AVMEDIA_TYPE_AUDIO;
} else {
goto skip;
@@ -441,42 +441,42 @@ static int mpegps_read_packet(AVFormatContext *s,
avio_read(s->pb, buf, 8);
avio_seek(s->pb, -8, SEEK_CUR);
if(!memcmp(buf, avs_seqh, 4) && (buf[6] != 0 || buf[7] != 1))
- codec_id = CODEC_ID_CAVS;
+ codec_id = AV_CODEC_ID_CAVS;
else
request_probe= 1;
type = AVMEDIA_TYPE_VIDEO;
} else if (startcode >= 0x1c0 && startcode <= 0x1df) {
type = AVMEDIA_TYPE_AUDIO;
- codec_id = m->sofdec > 0 ? CODEC_ID_ADPCM_ADX : CODEC_ID_MP2;
+ codec_id = m->sofdec > 0 ? AV_CODEC_ID_ADPCM_ADX : AV_CODEC_ID_MP2;
} else if (startcode >= 0x80 && startcode <= 0x87) {
type = AVMEDIA_TYPE_AUDIO;
- codec_id = CODEC_ID_AC3;
+ codec_id = AV_CODEC_ID_AC3;
} else if ( ( startcode >= 0x88 && startcode <= 0x8f)
||( startcode >= 0x98 && startcode <= 0x9f)) {
/* 0x90 - 0x97 is reserved for SDDS in DVD specs */
type = AVMEDIA_TYPE_AUDIO;
- codec_id = CODEC_ID_DTS;
+ codec_id = AV_CODEC_ID_DTS;
} else if (startcode >= 0xa0 && startcode <= 0xaf) {
type = AVMEDIA_TYPE_AUDIO;
if(lpcm_header_len == 6) {
- codec_id = CODEC_ID_MLP;
+ codec_id = AV_CODEC_ID_MLP;
} else {
- /* 16 bit form will be handled as CODEC_ID_PCM_S16BE */
- codec_id = CODEC_ID_PCM_DVD;
+ /* 16 bit form will be handled as AV_CODEC_ID_PCM_S16BE */
+ codec_id = AV_CODEC_ID_PCM_DVD;
}
} else if (startcode >= 0xb0 && startcode <= 0xbf) {
type = AVMEDIA_TYPE_AUDIO;
- codec_id = CODEC_ID_TRUEHD;
+ codec_id = AV_CODEC_ID_TRUEHD;
} else if (startcode >= 0xc0 && startcode <= 0xcf) {
/* Used for both AC-3 and E-AC-3 in EVOB files */
type = AVMEDIA_TYPE_AUDIO;
- codec_id = CODEC_ID_AC3;
+ codec_id = AV_CODEC_ID_AC3;
} else if (startcode >= 0x20 && startcode <= 0x3f) {
type = AVMEDIA_TYPE_SUBTITLE;
- codec_id = CODEC_ID_DVD_SUBTITLE;
+ codec_id = AV_CODEC_ID_DVD_SUBTITLE;
} else if (startcode >= 0xfd55 && startcode <= 0xfd5f) {
type = AVMEDIA_TYPE_VIDEO;
- codec_id = CODEC_ID_VC1;
+ codec_id = AV_CODEC_ID_VC1;
} else {
skip:
/* skip packet */
@@ -491,7 +491,7 @@ static int mpegps_read_packet(AVFormatContext *s,
st->codec->codec_type = type;
st->codec->codec_id = codec_id;
st->request_probe = request_probe;
- if (codec_id != CODEC_ID_PCM_S16BE)
+ if (codec_id != AV_CODEC_ID_PCM_S16BE)
st->need_parsing = AVSTREAM_PARSE_FULL;
found:
if(st->discard >= AVDISCARD_ALL)
@@ -521,7 +521,7 @@ static int mpegps_read_packet(AVFormatContext *s,
st->codec->sample_rate *
st->codec->bits_per_coded_sample;
if (st->codec->bits_per_coded_sample == 16)
- st->codec->codec_id = CODEC_ID_PCM_S16BE;
+ st->codec->codec_id = AV_CODEC_ID_PCM_S16BE;
else if (st->codec->bits_per_coded_sample == 28)
return AVERROR(EINVAL);
}
diff --git a/libavformat/mpegenc.c b/libavformat/mpegenc.c
index c9f1e8e03e..f04bf52860 100644
--- a/libavformat/mpegenc.c
+++ b/libavformat/mpegenc.c
@@ -344,11 +344,11 @@ static int mpeg_mux_init(AVFormatContext *ctx)
switch(st->codec->codec_type) {
case AVMEDIA_TYPE_AUDIO:
- if (st->codec->codec_id == CODEC_ID_AC3) {
+ if (st->codec->codec_id == AV_CODEC_ID_AC3) {
stream->id = ac3_id++;
- } else if (st->codec->codec_id == CODEC_ID_DTS) {
+ } else if (st->codec->codec_id == AV_CODEC_ID_DTS) {
stream->id = dts_id++;
- } else if (st->codec->codec_id == CODEC_ID_PCM_S16BE) {
+ } else if (st->codec->codec_id == AV_CODEC_ID_PCM_S16BE) {
stream->id = lpcm_id++;
for(j = 0; j < 4; j++) {
if (lpcm_freq_tab[j] == st->codec->sample_rate)
@@ -1151,8 +1151,8 @@ AVOutputFormat ff_mpeg1system_muxer = {
.mime_type = "video/mpeg",
.extensions = "mpg,mpeg",
.priv_data_size = sizeof(MpegMuxContext),
- .audio_codec = CODEC_ID_MP2,
- .video_codec = CODEC_ID_MPEG1VIDEO,
+ .audio_codec = AV_CODEC_ID_MP2,
+ .video_codec = AV_CODEC_ID_MPEG1VIDEO,
.write_header = mpeg_mux_init,
.write_packet = mpeg_mux_write_packet,
.write_trailer = mpeg_mux_end,
@@ -1166,8 +1166,8 @@ AVOutputFormat ff_mpeg1vcd_muxer = {
.long_name = NULL_IF_CONFIG_SMALL("MPEG-1 Systems / MPEG program stream (VCD)"),
.mime_type = "video/mpeg",
.priv_data_size = sizeof(MpegMuxContext),
- .audio_codec = CODEC_ID_MP2,
- .video_codec = CODEC_ID_MPEG1VIDEO,
+ .audio_codec = AV_CODEC_ID_MP2,
+ .video_codec = AV_CODEC_ID_MPEG1VIDEO,
.write_header = mpeg_mux_init,
.write_packet = mpeg_mux_write_packet,
.write_trailer = mpeg_mux_end,
@@ -1182,8 +1182,8 @@ AVOutputFormat ff_mpeg2vob_muxer = {
.mime_type = "video/mpeg",
.extensions = "vob",
.priv_data_size = sizeof(MpegMuxContext),
- .audio_codec = CODEC_ID_MP2,
- .video_codec = CODEC_ID_MPEG2VIDEO,
+ .audio_codec = AV_CODEC_ID_MP2,
+ .video_codec = AV_CODEC_ID_MPEG2VIDEO,
.write_header = mpeg_mux_init,
.write_packet = mpeg_mux_write_packet,
.write_trailer = mpeg_mux_end,
@@ -1200,8 +1200,8 @@ AVOutputFormat ff_mpeg2svcd_muxer = {
.mime_type = "video/mpeg",
.extensions = "vob",
.priv_data_size = sizeof(MpegMuxContext),
- .audio_codec = CODEC_ID_MP2,
- .video_codec = CODEC_ID_MPEG2VIDEO,
+ .audio_codec = AV_CODEC_ID_MP2,
+ .video_codec = AV_CODEC_ID_MPEG2VIDEO,
.write_header = mpeg_mux_init,
.write_packet = mpeg_mux_write_packet,
.write_trailer = mpeg_mux_end,
@@ -1218,8 +1218,8 @@ AVOutputFormat ff_mpeg2dvd_muxer = {
.mime_type = "video/mpeg",
.extensions = "dvd",
.priv_data_size = sizeof(MpegMuxContext),
- .audio_codec = CODEC_ID_MP2,
- .video_codec = CODEC_ID_MPEG2VIDEO,
+ .audio_codec = AV_CODEC_ID_MP2,
+ .video_codec = AV_CODEC_ID_MPEG2VIDEO,
.write_header = mpeg_mux_init,
.write_packet = mpeg_mux_write_packet,
.write_trailer = mpeg_mux_end,
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index 17329b9017..c2e3c8ccaa 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -521,64 +521,64 @@ static int parse_section_header(SectionHeader *h,
typedef struct {
uint32_t stream_type;
enum AVMediaType codec_type;
- enum CodecID codec_id;
+ enum AVCodecID codec_id;
} StreamType;
static const StreamType ISO_types[] = {
- { 0x01, AVMEDIA_TYPE_VIDEO, CODEC_ID_MPEG2VIDEO },
- { 0x02, AVMEDIA_TYPE_VIDEO, CODEC_ID_MPEG2VIDEO },
- { 0x03, AVMEDIA_TYPE_AUDIO, CODEC_ID_MP3 },
- { 0x04, AVMEDIA_TYPE_AUDIO, CODEC_ID_MP3 },
- { 0x0f, AVMEDIA_TYPE_AUDIO, CODEC_ID_AAC },
- { 0x10, AVMEDIA_TYPE_VIDEO, CODEC_ID_MPEG4 },
+ { 0x01, AVMEDIA_TYPE_VIDEO, AV_CODEC_ID_MPEG2VIDEO },
+ { 0x02, AVMEDIA_TYPE_VIDEO, AV_CODEC_ID_MPEG2VIDEO },
+ { 0x03, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_MP3 },
+ { 0x04, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_MP3 },
+ { 0x0f, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_AAC },
+ { 0x10, AVMEDIA_TYPE_VIDEO, AV_CODEC_ID_MPEG4 },
/* Makito encoder sets stream type 0x11 for AAC,
* so auto-detect LOAS/LATM instead of hardcoding it. */
-// { 0x11, AVMEDIA_TYPE_AUDIO, CODEC_ID_AAC_LATM }, /* LATM syntax */
- { 0x1b, AVMEDIA_TYPE_VIDEO, CODEC_ID_H264 },
- { 0xd1, AVMEDIA_TYPE_VIDEO, CODEC_ID_DIRAC },
- { 0xea, AVMEDIA_TYPE_VIDEO, CODEC_ID_VC1 },
+// { 0x11, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_AAC_LATM }, /* LATM syntax */
+ { 0x1b, AVMEDIA_TYPE_VIDEO, AV_CODEC_ID_H264 },
+ { 0xd1, AVMEDIA_TYPE_VIDEO, AV_CODEC_ID_DIRAC },
+ { 0xea, AVMEDIA_TYPE_VIDEO, AV_CODEC_ID_VC1 },
{ 0 },
};
static const StreamType HDMV_types[] = {
- { 0x80, AVMEDIA_TYPE_AUDIO, CODEC_ID_PCM_BLURAY },
- { 0x81, AVMEDIA_TYPE_AUDIO, CODEC_ID_AC3 },
- { 0x82, AVMEDIA_TYPE_AUDIO, CODEC_ID_DTS },
- { 0x83, AVMEDIA_TYPE_AUDIO, CODEC_ID_TRUEHD },
- { 0x84, AVMEDIA_TYPE_AUDIO, CODEC_ID_EAC3 },
- { 0x85, AVMEDIA_TYPE_AUDIO, CODEC_ID_DTS }, /* DTS HD */
- { 0x86, AVMEDIA_TYPE_AUDIO, CODEC_ID_DTS }, /* DTS HD MASTER*/
- { 0xa1, AVMEDIA_TYPE_AUDIO, CODEC_ID_EAC3 }, /* E-AC3 Secondary Audio */
- { 0xa2, AVMEDIA_TYPE_AUDIO, CODEC_ID_DTS }, /* DTS Express Secondary Audio */
- { 0x90, AVMEDIA_TYPE_SUBTITLE, CODEC_ID_HDMV_PGS_SUBTITLE },
+ { 0x80, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_PCM_BLURAY },
+ { 0x81, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_AC3 },
+ { 0x82, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_DTS },
+ { 0x83, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_TRUEHD },
+ { 0x84, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_EAC3 },
+ { 0x85, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_DTS }, /* DTS HD */
+ { 0x86, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_DTS }, /* DTS HD MASTER*/
+ { 0xa1, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_EAC3 }, /* E-AC3 Secondary Audio */
+ { 0xa2, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_DTS }, /* DTS Express Secondary Audio */
+ { 0x90, AVMEDIA_TYPE_SUBTITLE, AV_CODEC_ID_HDMV_PGS_SUBTITLE },
{ 0 },
};
/* ATSC ? */
static const StreamType MISC_types[] = {
- { 0x81, AVMEDIA_TYPE_AUDIO, CODEC_ID_AC3 },
- { 0x8a, AVMEDIA_TYPE_AUDIO, CODEC_ID_DTS },
+ { 0x81, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_AC3 },
+ { 0x8a, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_DTS },
{ 0 },
};
static const StreamType REGD_types[] = {
- { MKTAG('d','r','a','c'), AVMEDIA_TYPE_VIDEO, CODEC_ID_DIRAC },
- { MKTAG('A','C','-','3'), AVMEDIA_TYPE_AUDIO, CODEC_ID_AC3 },
- { MKTAG('B','S','S','D'), AVMEDIA_TYPE_AUDIO, CODEC_ID_S302M },
- { MKTAG('D','T','S','1'), AVMEDIA_TYPE_AUDIO, CODEC_ID_DTS },
- { MKTAG('D','T','S','2'), AVMEDIA_TYPE_AUDIO, CODEC_ID_DTS },
- { MKTAG('D','T','S','3'), AVMEDIA_TYPE_AUDIO, CODEC_ID_DTS },
- { MKTAG('V','C','-','1'), AVMEDIA_TYPE_VIDEO, CODEC_ID_VC1 },
+ { MKTAG('d','r','a','c'), AVMEDIA_TYPE_VIDEO, AV_CODEC_ID_DIRAC },
+ { MKTAG('A','C','-','3'), AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_AC3 },
+ { MKTAG('B','S','S','D'), AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_S302M },
+ { MKTAG('D','T','S','1'), AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_DTS },
+ { MKTAG('D','T','S','2'), AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_DTS },
+ { MKTAG('D','T','S','3'), AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_DTS },
+ { MKTAG('V','C','-','1'), AVMEDIA_TYPE_VIDEO, AV_CODEC_ID_VC1 },
{ 0 },
};
/* descriptor present */
static const StreamType DESC_types[] = {
- { 0x6a, AVMEDIA_TYPE_AUDIO, CODEC_ID_AC3 }, /* AC-3 descriptor */
- { 0x7a, AVMEDIA_TYPE_AUDIO, CODEC_ID_EAC3 }, /* E-AC-3 descriptor */
- { 0x7b, AVMEDIA_TYPE_AUDIO, CODEC_ID_DTS },
- { 0x56, AVMEDIA_TYPE_SUBTITLE, CODEC_ID_DVB_TELETEXT },
- { 0x59, AVMEDIA_TYPE_SUBTITLE, CODEC_ID_DVB_SUBTITLE }, /* subtitling descriptor */
+ { 0x6a, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_AC3 }, /* AC-3 descriptor */
+ { 0x7a, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_EAC3 }, /* E-AC-3 descriptor */
+ { 0x7b, AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_DTS },
+ { 0x56, AVMEDIA_TYPE_SUBTITLE, AV_CODEC_ID_DVB_TELETEXT },
+ { 0x59, AVMEDIA_TYPE_SUBTITLE, AV_CODEC_ID_DVB_SUBTITLE }, /* subtitling descriptor */
{ 0 },
};
@@ -603,7 +603,7 @@ static int mpegts_set_stream_info(AVStream *st, PESContext *pes,
avpriv_set_pts_info(st, 33, 1, 90000);
st->priv_data = pes;
st->codec->codec_type = AVMEDIA_TYPE_DATA;
- st->codec->codec_id = CODEC_ID_NONE;
+ st->codec->codec_id = AV_CODEC_ID_NONE;
st->need_parsing = AVSTREAM_PARSE_FULL;
pes->st = st;
pes->stream_type = stream_type;
@@ -617,7 +617,7 @@ static int mpegts_set_stream_info(AVStream *st, PESContext *pes,
mpegts_find_stream_type(st, pes->stream_type, ISO_types);
if ((prog_reg_desc == AV_RL32("HDMV") ||
prog_reg_desc == AV_RL32("HDPR")) &&
- st->codec->codec_id == CODEC_ID_NONE) {
+ st->codec->codec_id == AV_CODEC_ID_NONE) {
mpegts_find_stream_type(st, pes->stream_type, HDMV_types);
if (pes->stream_type == 0x83) {
// HDMV TrueHD streams also contain an AC3 coded version of the
@@ -639,14 +639,14 @@ static int mpegts_set_stream_info(AVStream *st, PESContext *pes,
avpriv_set_pts_info(sub_st, 33, 1, 90000);
sub_st->priv_data = sub_pes;
sub_st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- sub_st->codec->codec_id = CODEC_ID_AC3;
+ sub_st->codec->codec_id = AV_CODEC_ID_AC3;
sub_st->need_parsing = AVSTREAM_PARSE_FULL;
sub_pes->sub_st = pes->sub_st = sub_st;
}
}
- if (st->codec->codec_id == CODEC_ID_NONE)
+ if (st->codec->codec_id == AV_CODEC_ID_NONE)
mpegts_find_stream_type(st, pes->stream_type, MISC_types);
- if (st->codec->codec_id == CODEC_ID_NONE){
+ if (st->codec->codec_id == AV_CODEC_ID_NONE){
st->codec->codec_id = old_codec_id;
st->codec->codec_type= old_codec_type;
}
@@ -841,7 +841,7 @@ static int mpegts_push_data(MpegTSFilter *filter,
code != 0x1ff && code != 0x1f2 && /* program_stream_directory, DSMCC_stream */
code != 0x1f8) { /* ITU-T Rec. H.222.1 type E stream */
pes->state = MPEGTS_PESHEADER;
- if (pes->st->codec->codec_id == CODEC_ID_NONE && !pes->st->request_probe) {
+ if (pes->st->codec->codec_id == AV_CODEC_ID_NONE && !pes->st->request_probe) {
av_dlog(pes->stream, "pid=%x stream_type=%x probing\n",
pes->pid, pes->stream_type);
pes->st->request_probe= 1;
@@ -1246,19 +1246,19 @@ static void m4sl_cb(MpegTSFilter *filter, const uint8_t *section, int section_le
ffio_init_context(&pb, mp4_descr[i].dec_config_descr,
mp4_descr[i].dec_config_descr_len, 0, NULL, NULL, NULL, NULL);
ff_mp4_read_dec_config_descr(s, st, &pb);
- if (st->codec->codec_id == CODEC_ID_AAC &&
+ if (st->codec->codec_id == AV_CODEC_ID_AAC &&
st->codec->extradata_size > 0)
st->need_parsing = 0;
- if (st->codec->codec_id == CODEC_ID_H264 &&
+ if (st->codec->codec_id == AV_CODEC_ID_H264 &&
st->codec->extradata_size > 0)
st->need_parsing = 0;
- if (st->codec->codec_id <= CODEC_ID_NONE) {
- } else if (st->codec->codec_id < CODEC_ID_FIRST_AUDIO) {
+ if (st->codec->codec_id <= AV_CODEC_ID_NONE) {
+ } else if (st->codec->codec_id < AV_CODEC_ID_FIRST_AUDIO) {
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- } else if (st->codec->codec_id < CODEC_ID_FIRST_SUBTITLE) {
+ } else if (st->codec->codec_id < AV_CODEC_ID_FIRST_SUBTITLE) {
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- } else if (st->codec->codec_id < CODEC_ID_FIRST_UNKNOWN) {
+ } else if (st->codec->codec_id < AV_CODEC_ID_FIRST_UNKNOWN) {
st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;
}
}
@@ -1289,7 +1289,7 @@ int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type
av_dlog(fc, "tag: 0x%02x len=%d\n", desc_tag, desc_len);
- if (st->codec->codec_id == CODEC_ID_NONE &&
+ if (st->codec->codec_id == AV_CODEC_ID_NONE &&
stream_type == STREAM_TYPE_PRIVATE_DATA)
mpegts_find_stream_type(st, desc_tag, DESC_types);
@@ -1305,22 +1305,22 @@ int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type
ffio_init_context(&pb, mp4_descr[i].dec_config_descr,
mp4_descr[i].dec_config_descr_len, 0, NULL, NULL, NULL, NULL);
ff_mp4_read_dec_config_descr(fc, st, &pb);
- if (st->codec->codec_id == CODEC_ID_AAC &&
+ if (st->codec->codec_id == AV_CODEC_ID_AAC &&
st->codec->extradata_size > 0)
st->need_parsing = 0;
- if (st->codec->codec_id == CODEC_ID_MPEG4SYSTEMS)
+ if (st->codec->codec_id == AV_CODEC_ID_MPEG4SYSTEMS)
mpegts_open_section_filter(ts, pid, m4sl_cb, ts, 1);
}
break;
case 0x1F: /* FMC descriptor */
get16(pp, desc_end);
- if (mp4_descr_count > 0 && (st->codec->codec_id == CODEC_ID_AAC_LATM || st->request_probe>0) &&
+ if (mp4_descr_count > 0 && (st->codec->codec_id == AV_CODEC_ID_AAC_LATM || st->request_probe>0) &&
mp4_descr->dec_config_descr_len && mp4_descr->es_id == pid) {
AVIOContext pb;
ffio_init_context(&pb, mp4_descr->dec_config_descr,
mp4_descr->dec_config_descr_len, 0, NULL, NULL, NULL, NULL);
ff_mp4_read_dec_config_descr(fc, st, &pb);
- if (st->codec->codec_id == CODEC_ID_AAC &&
+ if (st->codec->codec_id == AV_CODEC_ID_AAC &&
st->codec->extradata_size > 0){
st->request_probe= st->need_parsing = 0;
st->codec->codec_type= AVMEDIA_TYPE_AUDIO;
@@ -1383,7 +1383,7 @@ int ff_parse_mpeg2_descriptor(AVFormatContext *fc, AVStream *st, int stream_type
case 0x05: /* registration descriptor */
st->codec->codec_tag = bytestream_get_le32(pp);
av_dlog(fc, "reg_desc=%.4s\n", (char*)&st->codec->codec_tag);
- if (st->codec->codec_id == CODEC_ID_NONE)
+ if (st->codec->codec_id == AV_CODEC_ID_NONE)
mpegts_find_stream_type(st, st->codec->codec_tag, REGD_types);
break;
case 0x52: /* stream identifier descriptor */
@@ -1970,7 +1970,7 @@ static int mpegts_read_header(AVFormatContext *s)
goto fail;
avpriv_set_pts_info(st, 60, 1, 27000000);
st->codec->codec_type = AVMEDIA_TYPE_DATA;
- st->codec->codec_id = CODEC_ID_MPEG2TS;
+ st->codec->codec_id = AV_CODEC_ID_MPEG2TS;
/* we iterate until we find two PCRs to estimate the bitrate */
pcr_pid = -1;
diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index 2ed6f031a9..d8e67c7d35 100644
--- a/libavformat/mpegtsenc.c
+++ b/libavformat/mpegtsenc.c
@@ -278,30 +278,30 @@ static void mpegts_write_pmt(AVFormatContext *s, MpegTSService *service)
MpegTSWriteStream *ts_st = st->priv_data;
AVDictionaryEntry *lang = av_dict_get(st->metadata, "language", NULL,0);
switch(st->codec->codec_id) {
- case CODEC_ID_MPEG1VIDEO:
- case CODEC_ID_MPEG2VIDEO:
+ case AV_CODEC_ID_MPEG1VIDEO:
+ case AV_CODEC_ID_MPEG2VIDEO:
stream_type = STREAM_TYPE_VIDEO_MPEG2;
break;
- case CODEC_ID_MPEG4:
+ case AV_CODEC_ID_MPEG4:
stream_type = STREAM_TYPE_VIDEO_MPEG4;
break;
- case CODEC_ID_H264:
+ case AV_CODEC_ID_H264:
stream_type = STREAM_TYPE_VIDEO_H264;
break;
- case CODEC_ID_DIRAC:
+ case AV_CODEC_ID_DIRAC:
stream_type = STREAM_TYPE_VIDEO_DIRAC;
break;
- case CODEC_ID_MP2:
- case CODEC_ID_MP3:
+ case AV_CODEC_ID_MP2:
+ case AV_CODEC_ID_MP3:
stream_type = STREAM_TYPE_AUDIO_MPEG1;
break;
- case CODEC_ID_AAC:
+ case AV_CODEC_ID_AAC:
stream_type = (ts->flags & MPEGTS_FLAG_AAC_LATM) ? STREAM_TYPE_AUDIO_AAC_LATM : STREAM_TYPE_AUDIO_AAC;
break;
- case CODEC_ID_AAC_LATM:
+ case AV_CODEC_ID_AAC_LATM:
stream_type = STREAM_TYPE_AUDIO_AAC_LATM;
break;
- case CODEC_ID_AC3:
+ case AV_CODEC_ID_AC3:
stream_type = STREAM_TYPE_AUDIO_AC3;
break;
default:
@@ -316,12 +316,12 @@ static void mpegts_write_pmt(AVFormatContext *s, MpegTSService *service)
/* write optional descriptors here */
switch(st->codec->codec_type) {
case AVMEDIA_TYPE_AUDIO:
- if(st->codec->codec_id==CODEC_ID_EAC3){
+ if(st->codec->codec_id==AV_CODEC_ID_EAC3){
*q++=0x7a; // EAC3 descriptor see A038 DVB SI
*q++=1; // 1 byte, all flags sets to 0
*q++=0; // omit all fields...
}
- if(st->codec->codec_id==CODEC_ID_S302M){
+ if(st->codec->codec_id==AV_CODEC_ID_S302M){
*q++ = 0x05; /* MPEG-2 registration descriptor*/
*q++ = 4;
*q++ = 'B';
@@ -598,7 +598,7 @@ static int mpegts_write_header(AVFormatContext *s)
service->pcr_pid = ts_st->pid;
pcr_st = st;
}
- if (st->codec->codec_id == CODEC_ID_AAC &&
+ if (st->codec->codec_id == AV_CODEC_ID_AAC &&
st->codec->extradata_size > 0)
{
AVStream *ast;
@@ -912,17 +912,17 @@ static void mpegts_write_pes(AVFormatContext *s, AVStream *st,
*q++ = 0x01;
private_code = 0;
if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
- if (st->codec->codec_id == CODEC_ID_DIRAC) {
+ if (st->codec->codec_id == AV_CODEC_ID_DIRAC) {
*q++ = 0xfd;
} else
*q++ = 0xe0;
} else if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO &&
- (st->codec->codec_id == CODEC_ID_MP2 ||
- st->codec->codec_id == CODEC_ID_MP3 ||
- st->codec->codec_id == CODEC_ID_AAC)) {
+ (st->codec->codec_id == AV_CODEC_ID_MP2 ||
+ st->codec->codec_id == AV_CODEC_ID_MP3 ||
+ st->codec->codec_id == AV_CODEC_ID_AAC)) {
*q++ = 0xc0;
} else if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO &&
- st->codec->codec_id == CODEC_ID_AC3 &&
+ st->codec->codec_id == AV_CODEC_ID_AC3 &&
ts->m2ts_mode) {
*q++ = 0xfd;
} else {
@@ -942,7 +942,7 @@ static void mpegts_write_pes(AVFormatContext *s, AVStream *st,
flags |= 0x40;
}
if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO &&
- st->codec->codec_id == CODEC_ID_DIRAC) {
+ st->codec->codec_id == AV_CODEC_ID_DIRAC) {
/* set PES_extension_flag */
pes_extension = 1;
flags |= 0x01;
@@ -959,7 +959,7 @@ static void mpegts_write_pes(AVFormatContext *s, AVStream *st,
*/
if (ts->m2ts_mode &&
st->codec->codec_type == AVMEDIA_TYPE_AUDIO &&
- st->codec->codec_id == CODEC_ID_AC3) {
+ st->codec->codec_id == AV_CODEC_ID_AC3) {
/* set PES_extension_flag */
pes_extension = 1;
flags |= 0x01;
@@ -987,7 +987,7 @@ static void mpegts_write_pes(AVFormatContext *s, AVStream *st,
write_pts(q, 1, dts);
q += 5;
}
- if (pes_extension && st->codec->codec_id == CODEC_ID_DIRAC) {
+ if (pes_extension && st->codec->codec_id == AV_CODEC_ID_DIRAC) {
flags = 0x01; /* set PES_extension_flag_2 */
*q++ = flags;
*q++ = 0x80 | 0x01; /* marker bit + extension length */
@@ -1000,7 +1000,7 @@ static void mpegts_write_pes(AVFormatContext *s, AVStream *st,
/* For Blu-ray AC3 Audio Setting extended flags */
if (ts->m2ts_mode &&
pes_extension &&
- st->codec->codec_id == CODEC_ID_AC3) {
+ st->codec->codec_id == AV_CODEC_ID_AC3) {
flags = 0x01; /* set PES_extension_flag_2 */
*q++ = flags;
*q++ = 0x80 | 0x01; /* marker bit + extension length */
@@ -1086,7 +1086,7 @@ static int mpegts_write_packet_internal(AVFormatContext *s, AVPacket *pkt)
}
ts_st->first_pts_check = 0;
- if (st->codec->codec_id == CODEC_ID_H264) {
+ if (st->codec->codec_id == AV_CODEC_ID_H264) {
const uint8_t *p = buf, *buf_end = p+size;
uint32_t state = -1;
@@ -1113,7 +1113,7 @@ static int mpegts_write_packet_internal(AVFormatContext *s, AVPacket *pkt)
buf = data;
size = pkt->size+6;
}
- } else if (st->codec->codec_id == CODEC_ID_AAC) {
+ } else if (st->codec->codec_id == AV_CODEC_ID_AAC) {
if (pkt->size < 2) {
av_log(s, AV_LOG_ERROR, "AAC packet too short\n");
return AVERROR_INVALIDDATA;
@@ -1255,8 +1255,8 @@ AVOutputFormat ff_mpegts_muxer = {
.mime_type = "video/x-mpegts",
.extensions = "ts,m2t,m2ts,mts",
.priv_data_size = sizeof(MpegTSWrite),
- .audio_codec = CODEC_ID_MP2,
- .video_codec = CODEC_ID_MPEG2VIDEO,
+ .audio_codec = AV_CODEC_ID_MP2,
+ .video_codec = AV_CODEC_ID_MPEG2VIDEO,
.write_header = mpegts_write_header,
.write_packet = mpegts_write_packet,
.write_trailer = mpegts_write_end,
diff --git a/libavformat/mpegvideodec.c b/libavformat/mpegvideodec.c
index 100b9585de..f9c4062e58 100644
--- a/libavformat/mpegvideodec.c
+++ b/libavformat/mpegvideodec.c
@@ -58,4 +58,4 @@ static int mpegvideo_probe(AVProbeData *p)
return 0;
}
-FF_DEF_RAWVIDEO_DEMUXER(mpegvideo, "raw MPEG video", mpegvideo_probe, NULL, CODEC_ID_MPEG1VIDEO)
+FF_DEF_RAWVIDEO_DEMUXER(mpegvideo, "raw MPEG video", mpegvideo_probe, NULL, AV_CODEC_ID_MPEG1VIDEO)
diff --git a/libavformat/mpjpeg.c b/libavformat/mpjpeg.c
index 3e5a18fada..916938f3e9 100644
--- a/libavformat/mpjpeg.c
+++ b/libavformat/mpjpeg.c
@@ -61,8 +61,8 @@ AVOutputFormat ff_mpjpeg_muxer = {
.long_name = NULL_IF_CONFIG_SMALL("MIME multipart JPEG"),
.mime_type = "multipart/x-mixed-replace;boundary=" BOUNDARY_TAG,
.extensions = "mjpg",
- .audio_codec = CODEC_ID_NONE,
- .video_codec = CODEC_ID_MJPEG,
+ .audio_codec = AV_CODEC_ID_NONE,
+ .video_codec = AV_CODEC_ID_MJPEG,
.write_header = mpjpeg_write_header,
.write_packet = mpjpeg_write_packet,
.write_trailer = mpjpeg_write_trailer,
diff --git a/libavformat/msnwc_tcp.c b/libavformat/msnwc_tcp.c
index f8a631e311..be0245560d 100644
--- a/libavformat/msnwc_tcp.c
+++ b/libavformat/msnwc_tcp.c
@@ -82,7 +82,7 @@ static int msnwc_tcp_read_header(AVFormatContext *ctx)
codec = st->codec;
codec->codec_type = AVMEDIA_TYPE_VIDEO;
- codec->codec_id = CODEC_ID_MIMIC;
+ codec->codec_id = AV_CODEC_ID_MIMIC;
codec->codec_tag = MKTAG('M', 'L', '2', '0');
avpriv_set_pts_info(st, 32, 1, 1000);
diff --git a/libavformat/mtv.c b/libavformat/mtv.c
index 37719caacf..cb50033a57 100644
--- a/libavformat/mtv.c
+++ b/libavformat/mtv.c
@@ -135,7 +135,7 @@ static int mtv_read_header(AVFormatContext *s)
avpriv_set_pts_info(st, 64, 1, mtv->video_fps);
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- st->codec->codec_id = CODEC_ID_RAWVIDEO;
+ st->codec->codec_id = AV_CODEC_ID_RAWVIDEO;
st->codec->pix_fmt = PIX_FMT_RGB565BE;
st->codec->width = mtv->img_width;
st->codec->height = mtv->img_height;
@@ -151,7 +151,7 @@ static int mtv_read_header(AVFormatContext *s)
avpriv_set_pts_info(st, 64, 1, AUDIO_SAMPLING_RATE);
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- st->codec->codec_id = CODEC_ID_MP3;
+ st->codec->codec_id = AV_CODEC_ID_MP3;
st->codec->bit_rate = mtv->audio_br;
st->need_parsing = AVSTREAM_PARSE_FULL;
diff --git a/libavformat/mvi.c b/libavformat/mvi.c
index 9a6e9d7632..0833e11b5e 100644
--- a/libavformat/mvi.c
+++ b/libavformat/mvi.c
@@ -79,14 +79,14 @@ static int read_header(AVFormatContext *s)
avpriv_set_pts_info(ast, 64, 1, ast->codec->sample_rate);
ast->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- ast->codec->codec_id = CODEC_ID_PCM_U8;
+ ast->codec->codec_id = AV_CODEC_ID_PCM_U8;
ast->codec->channels = 1;
ast->codec->bits_per_coded_sample = 8;
ast->codec->bit_rate = ast->codec->sample_rate * 8;
avpriv_set_pts_info(vst, 64, msecs_per_frame, 1000000);
vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- vst->codec->codec_id = CODEC_ID_MOTIONPIXELS;
+ vst->codec->codec_id = AV_CODEC_ID_MOTIONPIXELS;
mvi->get_int = (vst->codec->width * vst->codec->height < (1 << 16)) ? avio_rl16 : avio_rl24;
diff --git a/libavformat/mxf.c b/libavformat/mxf.c
index c5ac7531d5..224ade5d23 100644
--- a/libavformat/mxf.c
+++ b/libavformat/mxf.c
@@ -33,28 +33,28 @@ const MXFCodecUL ff_mxf_data_definition_uls[] = {
const MXFCodecUL ff_mxf_codec_uls[] = {
/* PictureEssenceCoding */
- { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x03,0x04,0x01,0x02,0x02,0x01,0x01,0x11,0x00 }, 14, CODEC_ID_MPEG2VIDEO }, /* MP@ML Long GoP */
- { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x01,0x02,0x02,0x01,0x02,0x01,0x01 }, 14, CODEC_ID_MPEG2VIDEO }, /* D-10 50Mbps PAL */
- { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x03,0x04,0x01,0x02,0x02,0x01,0x03,0x03,0x00 }, 14, CODEC_ID_MPEG2VIDEO }, /* MP@HL Long GoP */
- { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x03,0x04,0x01,0x02,0x02,0x01,0x04,0x02,0x00 }, 14, CODEC_ID_MPEG2VIDEO }, /* 422P@HL I-Frame */
- { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x03,0x04,0x01,0x02,0x02,0x01,0x20,0x02,0x03 }, 14, CODEC_ID_MPEG4 }, /* XDCAM proxy_pal030926.mxf */
- { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x01,0x02,0x02,0x02,0x01,0x02,0x00 }, 13, CODEC_ID_DVVIDEO }, /* DV25 IEC PAL */
- { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x07,0x04,0x01,0x02,0x02,0x03,0x01,0x01,0x00 }, 14, CODEC_ID_JPEG2000 }, /* JPEG2000 Codestream */
- { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x01,0x02,0x01,0x7F,0x00,0x00,0x00 }, 13, CODEC_ID_RAWVIDEO }, /* Uncompressed */
- { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x0A,0x04,0x01,0x02,0x01,0x01,0x02,0x01,0x00 }, 15, CODEC_ID_RAWVIDEO }, /* Uncompressed 422 8-bit */
- { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x01,0x02,0x02,0x71,0x00,0x00,0x00 }, 13, CODEC_ID_DNXHD }, /* SMPTE VC-3/DNxHD */
- { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x01,0x02,0x02,0x03,0x02,0x00,0x00 }, 14, CODEC_ID_DNXHD }, /* SMPTE VC-3/DNxHD */
- { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x0A,0x04,0x01,0x02,0x02,0x01,0x32,0x00,0x00 }, 14, CODEC_ID_H264 }, /* H.264/MPEG-4 AVC Intra */
- { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x0A,0x04,0x01,0x02,0x01,0x01,0x02,0x02,0x01 }, 16, CODEC_ID_V210 }, /* V210 */
+ { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x03,0x04,0x01,0x02,0x02,0x01,0x01,0x11,0x00 }, 14, AV_CODEC_ID_MPEG2VIDEO }, /* MP@ML Long GoP */
+ { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x01,0x02,0x02,0x01,0x02,0x01,0x01 }, 14, AV_CODEC_ID_MPEG2VIDEO }, /* D-10 50Mbps PAL */
+ { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x03,0x04,0x01,0x02,0x02,0x01,0x03,0x03,0x00 }, 14, AV_CODEC_ID_MPEG2VIDEO }, /* MP@HL Long GoP */
+ { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x03,0x04,0x01,0x02,0x02,0x01,0x04,0x02,0x00 }, 14, AV_CODEC_ID_MPEG2VIDEO }, /* 422P@HL I-Frame */
+ { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x03,0x04,0x01,0x02,0x02,0x01,0x20,0x02,0x03 }, 14, AV_CODEC_ID_MPEG4 }, /* XDCAM proxy_pal030926.mxf */
+ { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x01,0x02,0x02,0x02,0x01,0x02,0x00 }, 13, AV_CODEC_ID_DVVIDEO }, /* DV25 IEC PAL */
+ { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x07,0x04,0x01,0x02,0x02,0x03,0x01,0x01,0x00 }, 14, AV_CODEC_ID_JPEG2000 }, /* JPEG2000 Codestream */
+ { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x01,0x02,0x01,0x7F,0x00,0x00,0x00 }, 13, AV_CODEC_ID_RAWVIDEO }, /* Uncompressed */
+ { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x0A,0x04,0x01,0x02,0x01,0x01,0x02,0x01,0x00 }, 15, AV_CODEC_ID_RAWVIDEO }, /* Uncompressed 422 8-bit */
+ { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x01,0x02,0x02,0x71,0x00,0x00,0x00 }, 13, AV_CODEC_ID_DNXHD }, /* SMPTE VC-3/DNxHD */
+ { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x01,0x02,0x02,0x03,0x02,0x00,0x00 }, 14, AV_CODEC_ID_DNXHD }, /* SMPTE VC-3/DNxHD */
+ { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x0A,0x04,0x01,0x02,0x02,0x01,0x32,0x00,0x00 }, 14, AV_CODEC_ID_H264 }, /* H.264/MPEG-4 AVC Intra */
+ { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x0A,0x04,0x01,0x02,0x01,0x01,0x02,0x02,0x01 }, 16, AV_CODEC_ID_V210 }, /* V210 */
/* SoundEssenceCompression */
- { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x02,0x02,0x01,0x00,0x00,0x00,0x00 }, 13, CODEC_ID_PCM_S16LE }, /* Uncompressed */
- { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x02,0x02,0x01,0x7F,0x00,0x00,0x00 }, 13, CODEC_ID_PCM_S16LE },
- { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x07,0x04,0x02,0x02,0x01,0x7E,0x00,0x00,0x00 }, 13, CODEC_ID_PCM_S16BE }, /* From Omneon MXF file */
- { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x04,0x04,0x02,0x02,0x02,0x03,0x01,0x01,0x00 }, 15, CODEC_ID_PCM_ALAW }, /* XDCAM Proxy C0023S01.mxf */
- { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x02,0x02,0x02,0x03,0x02,0x01,0x00 }, 15, CODEC_ID_AC3 },
- { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x02,0x02,0x02,0x03,0x02,0x05,0x00 }, 15, CODEC_ID_MP2 }, /* MP2 or MP3 */
- //{ { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x02,0x02,0x02,0x03,0x02,0x1C,0x00 }, 15, CODEC_ID_DOLBY_E }, /* Dolby-E */
- { { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, 0, CODEC_ID_NONE },
+ { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x02,0x02,0x01,0x00,0x00,0x00,0x00 }, 13, AV_CODEC_ID_PCM_S16LE }, /* Uncompressed */
+ { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x02,0x02,0x01,0x7F,0x00,0x00,0x00 }, 13, AV_CODEC_ID_PCM_S16LE },
+ { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x07,0x04,0x02,0x02,0x01,0x7E,0x00,0x00,0x00 }, 13, AV_CODEC_ID_PCM_S16BE }, /* From Omneon MXF file */
+ { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x04,0x04,0x02,0x02,0x02,0x03,0x01,0x01,0x00 }, 15, AV_CODEC_ID_PCM_ALAW }, /* XDCAM Proxy C0023S01.mxf */
+ { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x02,0x02,0x02,0x03,0x02,0x01,0x00 }, 15, AV_CODEC_ID_AC3 },
+ { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x02,0x02,0x02,0x03,0x02,0x05,0x00 }, 15, AV_CODEC_ID_MP2 }, /* MP2 or MP3 */
+ //{ { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x02,0x02,0x02,0x03,0x02,0x1C,0x00 }, 15, AV_CODEC_ID_DOLBY_E }, /* Dolby-E */
+ { { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, 0, AV_CODEC_ID_NONE },
};
const MXFCodecUL ff_mxf_pixel_format_uls[] = {
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index b544d71f3f..3ddeb996e3 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -913,31 +913,31 @@ static void *mxf_resolve_strong_ref(MXFContext *mxf, UID *strong_ref, enum MXFMe
static const MXFCodecUL mxf_picture_essence_container_uls[] = {
// video essence container uls
- { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x02,0x0D,0x01,0x03,0x01,0x02,0x04,0x60,0x01 }, 14, CODEC_ID_MPEG2VIDEO }, /* MPEG-ES Frame wrapped */
- { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x0D,0x01,0x03,0x01,0x02,0x02,0x41,0x01 }, 14, CODEC_ID_DVVIDEO }, /* DV 625 25mbps */
- { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x0D,0x01,0x03,0x01,0x02,0x05,0x00,0x00 }, 14, CODEC_ID_RAWVIDEO }, /* Uncompressed Picture */
- { { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, 0, CODEC_ID_NONE },
+ { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x02,0x0D,0x01,0x03,0x01,0x02,0x04,0x60,0x01 }, 14, AV_CODEC_ID_MPEG2VIDEO }, /* MPEG-ES Frame wrapped */
+ { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x0D,0x01,0x03,0x01,0x02,0x02,0x41,0x01 }, 14, AV_CODEC_ID_DVVIDEO }, /* DV 625 25mbps */
+ { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x0D,0x01,0x03,0x01,0x02,0x05,0x00,0x00 }, 14, AV_CODEC_ID_RAWVIDEO }, /* Uncompressed Picture */
+ { { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, 0, AV_CODEC_ID_NONE },
};
/* EC ULs for intra-only formats */
static const MXFCodecUL mxf_intra_only_essence_container_uls[] = {
- { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x0D,0x01,0x03,0x01,0x02,0x01,0x00,0x00 }, 14, CODEC_ID_MPEG2VIDEO }, /* MXF-GC SMPTE D-10 Mappings */
- { { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, 0, CODEC_ID_NONE },
+ { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x0D,0x01,0x03,0x01,0x02,0x01,0x00,0x00 }, 14, AV_CODEC_ID_MPEG2VIDEO }, /* MXF-GC SMPTE D-10 Mappings */
+ { { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, 0, AV_CODEC_ID_NONE },
};
/* intra-only PictureEssenceCoding ULs, where no corresponding EC UL exists */
static const MXFCodecUL mxf_intra_only_picture_essence_coding_uls[] = {
- { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x0A,0x04,0x01,0x02,0x02,0x01,0x32,0x00,0x00 }, 14, CODEC_ID_H264 }, /* H.264/MPEG-4 AVC Intra Profiles */
- { { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, 0, CODEC_ID_NONE },
+ { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x0A,0x04,0x01,0x02,0x02,0x01,0x32,0x00,0x00 }, 14, AV_CODEC_ID_H264 }, /* H.264/MPEG-4 AVC Intra Profiles */
+ { { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, 0, AV_CODEC_ID_NONE },
};
static const MXFCodecUL mxf_sound_essence_container_uls[] = {
// sound essence container uls
- { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x0D,0x01,0x03,0x01,0x02,0x06,0x01,0x00 }, 14, CODEC_ID_PCM_S16LE }, /* BWF Frame wrapped */
- { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x02,0x0D,0x01,0x03,0x01,0x02,0x04,0x40,0x01 }, 14, CODEC_ID_MP2 }, /* MPEG-ES Frame wrapped, 0x40 ??? stream id */
- { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x0D,0x01,0x03,0x01,0x02,0x01,0x01,0x01 }, 14, CODEC_ID_PCM_S16LE }, /* D-10 Mapping 50Mbps PAL Extended Template */
- { { 0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0xFF,0x4B,0x46,0x41,0x41,0x00,0x0D,0x4D,0x4F }, 14, CODEC_ID_PCM_S16LE }, /* 0001GL00.MXF.A1.mxf_opatom.mxf */
- { { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, 0, CODEC_ID_NONE },
+ { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x0D,0x01,0x03,0x01,0x02,0x06,0x01,0x00 }, 14, AV_CODEC_ID_PCM_S16LE }, /* BWF Frame wrapped */
+ { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x02,0x0D,0x01,0x03,0x01,0x02,0x04,0x40,0x01 }, 14, AV_CODEC_ID_MP2 }, /* MPEG-ES Frame wrapped, 0x40 ??? stream id */
+ { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x0D,0x01,0x03,0x01,0x02,0x01,0x01,0x01 }, 14, AV_CODEC_ID_PCM_S16LE }, /* D-10 Mapping 50Mbps PAL Extended Template */
+ { { 0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0xFF,0x4B,0x46,0x41,0x41,0x00,0x0D,0x4D,0x4F }, 14, AV_CODEC_ID_PCM_S16LE }, /* 0001GL00.MXF.A1.mxf_opatom.mxf */
+ { { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, 0, AV_CODEC_ID_NONE },
};
static int mxf_get_sorted_table_segments(MXFContext *mxf, int *nb_sorted_segments, MXFIndexTableSegment ***sorted_segments)
@@ -1297,9 +1297,9 @@ finish_decoding_index:
static int mxf_is_intra_only(MXFDescriptor *descriptor)
{
return mxf_get_codec_ul(mxf_intra_only_essence_container_uls,
- &descriptor->essence_container_ul)->id != CODEC_ID_NONE ||
+ &descriptor->essence_container_ul)->id != AV_CODEC_ID_NONE ||
mxf_get_codec_ul(mxf_intra_only_picture_essence_coding_uls,
- &descriptor->essence_codec_ul)->id != CODEC_ID_NONE;
+ &descriptor->essence_codec_ul)->id != AV_CODEC_ID_NONE;
}
static int mxf_add_timecode_metadata(AVDictionary **pm, const char *key, AVTimecode *tc)
@@ -1491,7 +1491,7 @@ static int mxf_parse_structural_metadata(MXFContext *mxf)
if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
source_track->intra_only = mxf_is_intra_only(descriptor);
container_ul = mxf_get_codec_ul(mxf_picture_essence_container_uls, essence_container_ul);
- if (st->codec->codec_id == CODEC_ID_NONE)
+ if (st->codec->codec_id == AV_CODEC_ID_NONE)
st->codec->codec_id = container_ul->id;
st->codec->width = descriptor->width;
st->codec->height = descriptor->height; /* Field height, not frame height */
@@ -1516,7 +1516,7 @@ static int mxf_parse_structural_metadata(MXFContext *mxf)
default:
av_log(mxf->fc, AV_LOG_INFO, "Unknown frame layout type: %d\n", descriptor->frame_layout);
}
- if (st->codec->codec_id == CODEC_ID_RAWVIDEO) {
+ if (st->codec->codec_id == AV_CODEC_ID_RAWVIDEO) {
st->codec->pix_fmt = descriptor->pix_fmt;
if (st->codec->pix_fmt == PIX_FMT_NONE) {
pix_fmt_ul = mxf_get_codec_ul(ff_mxf_pixel_format_uls,
@@ -1536,7 +1536,7 @@ static int mxf_parse_structural_metadata(MXFContext *mxf)
st->need_parsing = AVSTREAM_PARSE_HEADERS;
} else if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO) {
container_ul = mxf_get_codec_ul(mxf_sound_essence_container_uls, essence_container_ul);
- if (st->codec->codec_id == CODEC_ID_NONE)
+ if (st->codec->codec_id == AV_CODEC_ID_NONE)
st->codec->codec_id = container_ul->id;
st->codec->channels = descriptor->channels;
st->codec->bits_per_coded_sample = descriptor->bits_per_sample;
@@ -1544,18 +1544,18 @@ static int mxf_parse_structural_metadata(MXFContext *mxf)
if (descriptor->sample_rate.den > 0)
st->codec->sample_rate = descriptor->sample_rate.num / descriptor->sample_rate.den;
- /* TODO: implement CODEC_ID_RAWAUDIO */
- if (st->codec->codec_id == CODEC_ID_PCM_S16LE) {
+ /* TODO: implement AV_CODEC_ID_RAWAUDIO */
+ if (st->codec->codec_id == AV_CODEC_ID_PCM_S16LE) {
if (descriptor->bits_per_sample > 16 && descriptor->bits_per_sample <= 24)
- st->codec->codec_id = CODEC_ID_PCM_S24LE;
+ st->codec->codec_id = AV_CODEC_ID_PCM_S24LE;
else if (descriptor->bits_per_sample == 32)
- st->codec->codec_id = CODEC_ID_PCM_S32LE;
- } else if (st->codec->codec_id == CODEC_ID_PCM_S16BE) {
+ st->codec->codec_id = AV_CODEC_ID_PCM_S32LE;
+ } else if (st->codec->codec_id == AV_CODEC_ID_PCM_S16BE) {
if (descriptor->bits_per_sample > 16 && descriptor->bits_per_sample <= 24)
- st->codec->codec_id = CODEC_ID_PCM_S24BE;
+ st->codec->codec_id = AV_CODEC_ID_PCM_S24BE;
else if (descriptor->bits_per_sample == 32)
- st->codec->codec_id = CODEC_ID_PCM_S32BE;
- } else if (st->codec->codec_id == CODEC_ID_MP2) {
+ st->codec->codec_id = AV_CODEC_ID_PCM_S32BE;
+ } else if (st->codec->codec_id == AV_CODEC_ID_MP2) {
st->need_parsing = AVSTREAM_PARSE_FULL;
}
}
@@ -1764,10 +1764,10 @@ static int64_t round_to_kag(int64_t position, int kag_size)
return ret == position ? ret : ret + kag_size;
}
-static int is_pcm(enum CodecID codec_id)
+static int is_pcm(enum AVCodecID codec_id)
{
/* we only care about "normal" PCM codecs until we get samples */
- return codec_id >= CODEC_ID_PCM_S16LE && codec_id < CODEC_ID_PCM_S24DAUD;
+ return codec_id >= AV_CODEC_ID_PCM_S16LE && codec_id < AV_CODEC_ID_PCM_S24DAUD;
}
/**
diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c
index 11283b098e..6717d778f4 100644
--- a/libavformat/mxfenc.c
+++ b/libavformat/mxfenc.c
@@ -91,15 +91,15 @@ typedef struct {
} MXFContainerEssenceEntry;
static const struct {
- enum CodecID id;
+ enum AVCodecID id;
int index;
} mxf_essence_mappings[] = {
- { CODEC_ID_MPEG2VIDEO, 0 },
- { CODEC_ID_PCM_S24LE, 1 },
- { CODEC_ID_PCM_S16LE, 1 },
- { CODEC_ID_DVVIDEO, 15 },
- { CODEC_ID_DNXHD, 24 },
- { CODEC_ID_NONE }
+ { AV_CODEC_ID_MPEG2VIDEO, 0 },
+ { AV_CODEC_ID_PCM_S24LE, 1 },
+ { AV_CODEC_ID_PCM_S16LE, 1 },
+ { AV_CODEC_ID_DVVIDEO, 15 },
+ { AV_CODEC_ID_DNXHD, 24 },
+ { AV_CODEC_ID_NONE }
};
static void mxf_write_wav_desc(AVFormatContext *s, AVStream *st);
@@ -473,7 +473,7 @@ static void klv_encode_ber4_length(AVIOContext *pb, int len)
/*
* Get essence container ul index
*/
-static int mxf_get_essence_container_ul_index(enum CodecID id)
+static int mxf_get_essence_container_ul_index(enum AVCodecID id)
{
int i;
for (i = 0; mxf_essence_mappings[i].id; i++)
@@ -931,9 +931,9 @@ static void mxf_write_cdci_common(AVFormatContext *s, AVStream *st, const UID ke
// video line map
switch (st->codec->height) {
- case 576: f1 = 23; f2 = st->codec->codec_id == CODEC_ID_DVVIDEO ? 335 : 336; break;
+ case 576: f1 = 23; f2 = st->codec->codec_id == AV_CODEC_ID_DVVIDEO ? 335 : 336; break;
case 608: f1 = 7; f2 = 320; break;
- case 480: f1 = 20; f2 = st->codec->codec_id == CODEC_ID_DVVIDEO ? 285 : 283; break;
+ case 480: f1 = 20; f2 = st->codec->codec_id == AV_CODEC_ID_DVVIDEO ? 285 : 283; break;
case 512: f1 = 7; f2 = 270; break;
case 720: f1 = 26; f2 = 0; break; // progressive
case 1080: f1 = 21; f2 = 584; break;
@@ -1749,8 +1749,8 @@ static int mxf_write_header(AVFormatContext *s)
av_log(s, AV_LOG_ERROR, "MXF D-10 only support one audio track\n");
return -1;
}
- if (st->codec->codec_id != CODEC_ID_PCM_S16LE &&
- st->codec->codec_id != CODEC_ID_PCM_S24LE) {
+ if (st->codec->codec_id != AV_CODEC_ID_PCM_S16LE &&
+ st->codec->codec_id != AV_CODEC_ID_PCM_S24LE) {
av_log(s, AV_LOG_ERROR, "MXF D-10 only support 16 or 24 bits le audio\n");
}
sc->index = ((MXFStreamContext*)s->streams[0]->priv_data)->index + 1;
@@ -1910,7 +1910,7 @@ static void mxf_write_d10_audio_packet(AVFormatContext *s, AVStream *st, AVPacke
while (samples < end) {
for (i = 0; i < st->codec->channels; i++) {
uint32_t sample;
- if (st->codec->codec_id == CODEC_ID_PCM_S24LE) {
+ if (st->codec->codec_id == AV_CODEC_ID_PCM_S24LE) {
sample = AV_RL24(samples)<< 4;
samples += 3;
} else {
@@ -1941,17 +1941,17 @@ static int mxf_write_packet(AVFormatContext *s, AVPacket *pkt)
}
}
- if (st->codec->codec_id == CODEC_ID_MPEG2VIDEO) {
+ if (st->codec->codec_id == AV_CODEC_ID_MPEG2VIDEO) {
if (!mxf_parse_mpeg2_frame(s, st, pkt, &ie)) {
av_log(s, AV_LOG_ERROR, "could not get mpeg2 profile and level\n");
return -1;
}
- } else if (st->codec->codec_id == CODEC_ID_DNXHD) {
+ } else if (st->codec->codec_id == AV_CODEC_ID_DNXHD) {
if (!mxf_parse_dnxhd_frame(s, st, pkt)) {
av_log(s, AV_LOG_ERROR, "could not get dnxhd profile\n");
return -1;
}
- } else if (st->codec->codec_id == CODEC_ID_DVVIDEO) {
+ } else if (st->codec->codec_id == AV_CODEC_ID_DVVIDEO) {
if (!mxf_parse_dv_frame(s, st, pkt)) {
av_log(s, AV_LOG_ERROR, "could not get dv profile\n");
return -1;
@@ -2162,8 +2162,8 @@ AVOutputFormat ff_mxf_muxer = {
.mime_type = "application/mxf",
.extensions = "mxf",
.priv_data_size = sizeof(MXFContext),
- .audio_codec = CODEC_ID_PCM_S16LE,
- .video_codec = CODEC_ID_MPEG2VIDEO,
+ .audio_codec = AV_CODEC_ID_PCM_S16LE,
+ .video_codec = AV_CODEC_ID_MPEG2VIDEO,
.write_header = mxf_write_header,
.write_packet = mxf_write_packet,
.write_trailer = mxf_write_footer,
@@ -2176,8 +2176,8 @@ AVOutputFormat ff_mxf_d10_muxer = {
.long_name = NULL_IF_CONFIG_SMALL("MXF (Material eXchange Format) D-10 Mapping"),
.mime_type = "application/mxf",
.priv_data_size = sizeof(MXFContext),
- .audio_codec = CODEC_ID_PCM_S16LE,
- .video_codec = CODEC_ID_MPEG2VIDEO,
+ .audio_codec = AV_CODEC_ID_PCM_S16LE,
+ .video_codec = AV_CODEC_ID_MPEG2VIDEO,
.write_header = mxf_write_header,
.write_packet = mxf_write_packet,
.write_trailer = mxf_write_footer,
diff --git a/libavformat/mxg.c b/libavformat/mxg.c
index 6ecde121c6..be7e6db1c4 100644
--- a/libavformat/mxg.c
+++ b/libavformat/mxg.c
@@ -47,14 +47,14 @@ static int mxg_read_header(AVFormatContext *s)
if (!video_st)
return AVERROR(ENOMEM);
video_st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- video_st->codec->codec_id = CODEC_ID_MXPEG;
+ video_st->codec->codec_id = AV_CODEC_ID_MXPEG;
avpriv_set_pts_info(video_st, 64, 1, 1000000);
audio_st = avformat_new_stream(s, NULL);
if (!audio_st)
return AVERROR(ENOMEM);
audio_st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- audio_st->codec->codec_id = CODEC_ID_PCM_ALAW;
+ audio_st->codec->codec_id = AV_CODEC_ID_PCM_ALAW;
audio_st->codec->channels = 1;
audio_st->codec->sample_rate = 8000;
audio_st->codec->bits_per_coded_sample = 8;
diff --git a/libavformat/ncdec.c b/libavformat/ncdec.c
index 7d7b390373..8cb7ed4bd4 100644
--- a/libavformat/ncdec.c
+++ b/libavformat/ncdec.c
@@ -52,7 +52,7 @@ static int nc_read_header(AVFormatContext *s)
return AVERROR(ENOMEM);
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- st->codec->codec_id = CODEC_ID_MPEG4;
+ st->codec->codec_id = AV_CODEC_ID_MPEG4;
st->need_parsing = AVSTREAM_PARSE_FULL;
avpriv_set_pts_info(st, 64, 1, 100);
diff --git a/libavformat/nsvdec.c b/libavformat/nsvdec.c
index b660804be1..00f796ae3f 100644
--- a/libavformat/nsvdec.c
+++ b/libavformat/nsvdec.c
@@ -184,33 +184,33 @@ typedef struct {
} NSVContext;
static const AVCodecTag nsv_codec_video_tags[] = {
- { CODEC_ID_VP3, MKTAG('V', 'P', '3', ' ') },
- { CODEC_ID_VP3, MKTAG('V', 'P', '3', '0') },
- { CODEC_ID_VP3, MKTAG('V', 'P', '3', '1') },
- { CODEC_ID_VP5, MKTAG('V', 'P', '5', ' ') },
- { CODEC_ID_VP5, MKTAG('V', 'P', '5', '0') },
- { CODEC_ID_VP6, MKTAG('V', 'P', '6', ' ') },
- { CODEC_ID_VP6, MKTAG('V', 'P', '6', '0') },
- { CODEC_ID_VP6, MKTAG('V', 'P', '6', '1') },
- { CODEC_ID_VP6, MKTAG('V', 'P', '6', '2') },
- { CODEC_ID_VP8, MKTAG('V', 'P', '8', '0') },
+ { AV_CODEC_ID_VP3, MKTAG('V', 'P', '3', ' ') },
+ { AV_CODEC_ID_VP3, MKTAG('V', 'P', '3', '0') },
+ { AV_CODEC_ID_VP3, MKTAG('V', 'P', '3', '1') },
+ { AV_CODEC_ID_VP5, MKTAG('V', 'P', '5', ' ') },
+ { AV_CODEC_ID_VP5, MKTAG('V', 'P', '5', '0') },
+ { AV_CODEC_ID_VP6, MKTAG('V', 'P', '6', ' ') },
+ { AV_CODEC_ID_VP6, MKTAG('V', 'P', '6', '0') },
+ { AV_CODEC_ID_VP6, MKTAG('V', 'P', '6', '1') },
+ { AV_CODEC_ID_VP6, MKTAG('V', 'P', '6', '2') },
+ { AV_CODEC_ID_VP8, MKTAG('V', 'P', '8', '0') },
/*
- { CODEC_ID_VP4, MKTAG('V', 'P', '4', ' ') },
- { CODEC_ID_VP4, MKTAG('V', 'P', '4', '0') },
+ { AV_CODEC_ID_VP4, MKTAG('V', 'P', '4', ' ') },
+ { AV_CODEC_ID_VP4, MKTAG('V', 'P', '4', '0') },
*/
- { CODEC_ID_MPEG4, MKTAG('X', 'V', 'I', 'D') }, /* cf sample xvid decoder from nsv_codec_sdk.zip */
- { CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', '3') },
- { CODEC_ID_NONE, 0 },
+ { AV_CODEC_ID_MPEG4, MKTAG('X', 'V', 'I', 'D') }, /* cf sample xvid decoder from nsv_codec_sdk.zip */
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', '3') },
+ { AV_CODEC_ID_NONE, 0 },
};
static const AVCodecTag nsv_codec_audio_tags[] = {
- { CODEC_ID_MP3, MKTAG('M', 'P', '3', ' ') },
- { CODEC_ID_AAC, MKTAG('A', 'A', 'C', ' ') },
- { CODEC_ID_AAC, MKTAG('A', 'A', 'C', 'P') },
- { CODEC_ID_AAC, MKTAG('V', 'L', 'B', ' ') },
- { CODEC_ID_SPEEX, MKTAG('S', 'P', 'X', ' ') },
- { CODEC_ID_PCM_U16LE, MKTAG('P', 'C', 'M', ' ') },
- { CODEC_ID_NONE, 0 },
+ { AV_CODEC_ID_MP3, MKTAG('M', 'P', '3', ' ') },
+ { AV_CODEC_ID_AAC, MKTAG('A', 'A', 'C', ' ') },
+ { AV_CODEC_ID_AAC, MKTAG('A', 'A', 'C', 'P') },
+ { AV_CODEC_ID_AAC, MKTAG('V', 'L', 'B', ' ') },
+ { AV_CODEC_ID_SPEEX, MKTAG('S', 'P', 'X', ' ') },
+ { AV_CODEC_ID_PCM_U16LE, MKTAG('P', 'C', 'M', ' ') },
+ { AV_CODEC_ID_NONE, 0 },
};
//static int nsv_load_index(AVFormatContext *s);
@@ -655,7 +655,7 @@ null_chunk_retry:
}
bps /= channels; // ???
if (bps == 8)
- st[NSV_ST_AUDIO]->codec->codec_id = CODEC_ID_PCM_U8;
+ st[NSV_ST_AUDIO]->codec->codec_id = AV_CODEC_ID_PCM_U8;
samplerate /= 4;/* UGH ??? XXX */
channels = 1;
st[NSV_ST_AUDIO]->codec->channels = channels;
diff --git a/libavformat/nullenc.c b/libavformat/nullenc.c
index 99899923e2..7da297b63e 100644
--- a/libavformat/nullenc.c
+++ b/libavformat/nullenc.c
@@ -29,8 +29,8 @@ static int null_write_packet(struct AVFormatContext *s, AVPacket *pkt)
AVOutputFormat ff_null_muxer = {
.name = "null",
.long_name = NULL_IF_CONFIG_SMALL("raw null video"),
- .audio_codec = AV_NE(CODEC_ID_PCM_S16BE, CODEC_ID_PCM_S16LE),
- .video_codec = CODEC_ID_RAWVIDEO,
+ .audio_codec = AV_NE(AV_CODEC_ID_PCM_S16BE, AV_CODEC_ID_PCM_S16LE),
+ .video_codec = AV_CODEC_ID_RAWVIDEO,
.write_packet = null_write_packet,
.flags = AVFMT_NOFILE | AVFMT_NOTIMESTAMPS | AVFMT_RAWPICTURE,
};
diff --git a/libavformat/nut.c b/libavformat/nut.c
index 4684cbe20b..7e3c83a291 100644
--- a/libavformat/nut.c
+++ b/libavformat/nut.c
@@ -25,90 +25,90 @@
#include "internal.h"
const AVCodecTag ff_nut_subtitle_tags[] = {
- { CODEC_ID_TEXT , MKTAG('U', 'T', 'F', '8') },
- { CODEC_ID_SSA , MKTAG('S', 'S', 'A', 0 ) },
- { CODEC_ID_DVD_SUBTITLE, MKTAG('D', 'V', 'D', 'S') },
- { CODEC_ID_DVB_SUBTITLE, MKTAG('D', 'V', 'B', 'S') },
- { CODEC_ID_NONE , 0 }
+ { AV_CODEC_ID_TEXT , MKTAG('U', 'T', 'F', '8') },
+ { AV_CODEC_ID_SSA , MKTAG('S', 'S', 'A', 0 ) },
+ { AV_CODEC_ID_DVD_SUBTITLE, MKTAG('D', 'V', 'D', 'S') },
+ { AV_CODEC_ID_DVB_SUBTITLE, MKTAG('D', 'V', 'B', 'S') },
+ { AV_CODEC_ID_NONE , 0 }
};
const AVCodecTag ff_nut_video_tags[] = {
- { CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 15 ) },
- { CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 15 ) },
- { CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 16 ) },
- { CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 16 ) },
- { CODEC_ID_RAWVIDEO, MKTAG(15 , 'B', 'G', 'R') },
- { CODEC_ID_RAWVIDEO, MKTAG(15 , 'R', 'G', 'B') },
- { CODEC_ID_RAWVIDEO, MKTAG(16 , 'B', 'G', 'R') },
- { CODEC_ID_RAWVIDEO, MKTAG(16 , 'R', 'G', 'B') },
- { CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 12 ) },
- { CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 12 ) },
- { CODEC_ID_RAWVIDEO, MKTAG(12 , 'B', 'G', 'R') },
- { CODEC_ID_RAWVIDEO, MKTAG(12 , 'R', 'G', 'B') },
- { CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 'A') },
- { CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 0 ) },
- { CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 'A') },
- { CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 0 ) },
- { CODEC_ID_RAWVIDEO, MKTAG('A', 'B', 'G', 'R') },
- { CODEC_ID_RAWVIDEO, MKTAG( 0 , 'B', 'G', 'R') },
- { CODEC_ID_RAWVIDEO, MKTAG('A', 'R', 'G', 'B') },
- { CODEC_ID_RAWVIDEO, MKTAG( 0 , 'R', 'G', 'B') },
- { CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 24 ) },
- { CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 24 ) },
- { CODEC_ID_RAWVIDEO, MKTAG('4', '1', '1', 'P') },
- { CODEC_ID_RAWVIDEO, MKTAG('4', '2', '2', 'P') },
- { CODEC_ID_RAWVIDEO, MKTAG('4', '2', '2', 'P') },
- { CODEC_ID_RAWVIDEO, MKTAG('4', '4', '0', 'P') },
- { CODEC_ID_RAWVIDEO, MKTAG('4', '4', '0', 'P') },
- { CODEC_ID_RAWVIDEO, MKTAG('4', '4', '4', 'P') },
- { CODEC_ID_RAWVIDEO, MKTAG('4', '4', '4', 'P') },
- { CODEC_ID_RAWVIDEO, MKTAG('B', '1', 'W', '0') },
- { CODEC_ID_RAWVIDEO, MKTAG('B', '0', 'W', '1') },
- { CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 8 ) },
- { CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 8 ) },
- { CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 4 ) },
- { CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 4 ) },
- { CODEC_ID_RAWVIDEO, MKTAG('B', '4', 'B', 'Y') },
- { CODEC_ID_RAWVIDEO, MKTAG('R', '4', 'B', 'Y') },
- { CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 48 ) },
- { CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 48 ) },
- { CODEC_ID_RAWVIDEO, MKTAG(48 , 'B', 'G', 'R') },
- { CODEC_ID_RAWVIDEO, MKTAG(48 , 'R', 'G', 'B') },
- { CODEC_ID_RAWVIDEO, MKTAG('B', 'R', 'A', 64 ) },
- { CODEC_ID_RAWVIDEO, MKTAG('R', 'B', 'A', 64 ) },
- { CODEC_ID_RAWVIDEO, MKTAG(64 , 'B', 'R', 'A') },
- { CODEC_ID_RAWVIDEO, MKTAG(64 , 'R', 'B', 'A') },
- { CODEC_ID_RAWVIDEO, MKTAG('Y', '3', 11 , 10 ) },
- { CODEC_ID_RAWVIDEO, MKTAG(10 , 11 , '3', 'Y') },
- { CODEC_ID_RAWVIDEO, MKTAG('Y', '3', 10 , 10 ) },
- { CODEC_ID_RAWVIDEO, MKTAG(10 , 10 , '3', 'Y') },
- { CODEC_ID_RAWVIDEO, MKTAG('Y', '3', 0 , 10 ) },
- { CODEC_ID_RAWVIDEO, MKTAG(10 , 0 , '3', 'Y') },
- { CODEC_ID_RAWVIDEO, MKTAG('Y', '3', 11 , 12 ) },
- { CODEC_ID_RAWVIDEO, MKTAG(12 , 11 , '3', 'Y') },
- { CODEC_ID_RAWVIDEO, MKTAG('Y', '3', 10 , 12 ) },
- { CODEC_ID_RAWVIDEO, MKTAG(12 , 10 , '3', 'Y') },
- { CODEC_ID_RAWVIDEO, MKTAG('Y', '3', 0 , 12 ) },
- { CODEC_ID_RAWVIDEO, MKTAG(12 , 0 , '3', 'Y') },
- { CODEC_ID_RAWVIDEO, MKTAG('Y', '3', 11 , 14 ) },
- { CODEC_ID_RAWVIDEO, MKTAG(14 , 11 , '3', 'Y') },
- { CODEC_ID_RAWVIDEO, MKTAG('Y', '3', 10 , 14 ) },
- { CODEC_ID_RAWVIDEO, MKTAG(14 , 10 , '3', 'Y') },
- { CODEC_ID_RAWVIDEO, MKTAG('Y', '3', 0 , 14 ) },
- { CODEC_ID_RAWVIDEO, MKTAG(14 , 0 , '3', 'Y') },
- { CODEC_ID_RAWVIDEO, MKTAG('Y', '1', 0 , 16 ) },
- { CODEC_ID_RAWVIDEO, MKTAG(16 , 0 , '1', 'Y') },
- { CODEC_ID_RAWVIDEO, MKTAG('Y', '3', 11 , 16 ) },
- { CODEC_ID_RAWVIDEO, MKTAG(16 , 11 , '3', 'Y') },
- { CODEC_ID_RAWVIDEO, MKTAG('Y', '3', 10 , 16 ) },
- { CODEC_ID_RAWVIDEO, MKTAG(16 , 10 , '3', 'Y') },
- { CODEC_ID_RAWVIDEO, MKTAG('Y', '3', 0 , 16 ) },
- { CODEC_ID_RAWVIDEO, MKTAG(16 , 0 , '3', 'Y') },
- { CODEC_ID_RAWVIDEO, MKTAG('Y', '4', 11 , 8 ) },
- { CODEC_ID_RAWVIDEO, MKTAG('Y', '4', 10 , 8 ) },
- { CODEC_ID_RAWVIDEO, MKTAG('Y', '4', 0 , 8 ) },
- { CODEC_ID_RAWVIDEO, MKTAG('Y', '2', 0 , 8 ) },
- { CODEC_ID_NONE , 0 }
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 15 ) },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 15 ) },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 16 ) },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 16 ) },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG(15 , 'B', 'G', 'R') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG(15 , 'R', 'G', 'B') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG(16 , 'B', 'G', 'R') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG(16 , 'R', 'G', 'B') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 12 ) },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 12 ) },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG(12 , 'B', 'G', 'R') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG(12 , 'R', 'G', 'B') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 'A') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 0 ) },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 'A') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 0 ) },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('A', 'B', 'G', 'R') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG( 0 , 'B', 'G', 'R') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('A', 'R', 'G', 'B') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG( 0 , 'R', 'G', 'B') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 24 ) },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 24 ) },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('4', '1', '1', 'P') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('4', '2', '2', 'P') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('4', '2', '2', 'P') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('4', '4', '0', 'P') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('4', '4', '0', 'P') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('4', '4', '4', 'P') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('4', '4', '4', 'P') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('B', '1', 'W', '0') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('B', '0', 'W', '1') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 8 ) },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 8 ) },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 4 ) },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 4 ) },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('B', '4', 'B', 'Y') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('R', '4', 'B', 'Y') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('B', 'G', 'R', 48 ) },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('R', 'G', 'B', 48 ) },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG(48 , 'B', 'G', 'R') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG(48 , 'R', 'G', 'B') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('B', 'R', 'A', 64 ) },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('R', 'B', 'A', 64 ) },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG(64 , 'B', 'R', 'A') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG(64 , 'R', 'B', 'A') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '3', 11 , 10 ) },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG(10 , 11 , '3', 'Y') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '3', 10 , 10 ) },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG(10 , 10 , '3', 'Y') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '3', 0 , 10 ) },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG(10 , 0 , '3', 'Y') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '3', 11 , 12 ) },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG(12 , 11 , '3', 'Y') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '3', 10 , 12 ) },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG(12 , 10 , '3', 'Y') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '3', 0 , 12 ) },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG(12 , 0 , '3', 'Y') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '3', 11 , 14 ) },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG(14 , 11 , '3', 'Y') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '3', 10 , 14 ) },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG(14 , 10 , '3', 'Y') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '3', 0 , 14 ) },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG(14 , 0 , '3', 'Y') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '1', 0 , 16 ) },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG(16 , 0 , '1', 'Y') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '3', 11 , 16 ) },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG(16 , 11 , '3', 'Y') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '3', 10 , 16 ) },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG(16 , 10 , '3', 'Y') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '3', 0 , 16 ) },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG(16 , 0 , '3', 'Y') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '4', 11 , 8 ) },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '4', 10 , 8 ) },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '4', 0 , 8 ) },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '2', 0 , 8 ) },
+ { AV_CODEC_ID_NONE , 0 }
};
void ff_nut_reset_ts(NUTContext *nut, AVRational time_base, int64_t val){
diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c
index c025451221..f4813fe5ec 100644
--- a/libavformat/nutdec.c
+++ b/libavformat/nutdec.c
@@ -380,7 +380,7 @@ static int decode_stream_header(NUTContext *nut)
av_log(s, AV_LOG_ERROR, "unknown stream class (%d)\n", class);
return -1;
}
- if (class < 3 && st->codec->codec_id == CODEC_ID_NONE)
+ if (class < 3 && st->codec->codec_id == AV_CODEC_ID_NONE)
av_log(s, AV_LOG_ERROR,
"Unknown codec tag '0x%04x' for stream number %d\n",
(unsigned int) tmp, stream_id);
diff --git a/libavformat/nutenc.c b/libavformat/nutenc.c
index 6ace0d0bc2..05d2b08b96 100644
--- a/libavformat/nutenc.c
+++ b/libavformat/nutenc.c
@@ -37,20 +37,20 @@ static int find_expected_header(AVCodecContext *c, int size, int key_frame, uint
AV_WB24(out, 1);
- if(c->codec_id == CODEC_ID_MPEG4){
+ if(c->codec_id == AV_CODEC_ID_MPEG4){
if(key_frame){
return 3;
}else{
out[3]= 0xB6;
return 4;
}
- }else if(c->codec_id == CODEC_ID_MPEG1VIDEO || c->codec_id == CODEC_ID_MPEG2VIDEO){
+ }else if(c->codec_id == AV_CODEC_ID_MPEG1VIDEO || c->codec_id == AV_CODEC_ID_MPEG2VIDEO){
return 3;
- }else if(c->codec_id == CODEC_ID_H264){
+ }else if(c->codec_id == AV_CODEC_ID_H264){
return 3;
- }else if(c->codec_id == CODEC_ID_MP3 || c->codec_id == CODEC_ID_MP2){
+ }else if(c->codec_id == AV_CODEC_ID_MP3 || c->codec_id == AV_CODEC_ID_MP2){
int lsf, mpeg25, sample_rate_index, bitrate_index, frame_size;
- int layer= c->codec_id == CODEC_ID_MP3 ? 3 : 2;
+ int layer= c->codec_id == AV_CODEC_ID_MP3 ? 3 : 2;
unsigned int header= 0xFFF00000;
lsf = sample_rate < (24000+32000)/2;
@@ -211,7 +211,7 @@ static void build_frame_code(AVFormatContext *s){
pred_table[2]=1;
pred_table[3]=3;
pred_table[4]=4;
- }else if(codec->codec_id == CODEC_ID_VORBIS){
+ }else if(codec->codec_id == AV_CODEC_ID_VORBIS){
pred_count=3;
pred_table[0]=2;
pred_table[1]=9;
@@ -870,9 +870,9 @@ AVOutputFormat ff_nut_muxer = {
.mime_type = "video/x-nut",
.extensions = "nut",
.priv_data_size = sizeof(NUTContext),
- .audio_codec = CONFIG_LIBVORBIS ? CODEC_ID_VORBIS :
- CONFIG_LIBMP3LAME ? CODEC_ID_MP3 : CODEC_ID_MP2,
- .video_codec = CODEC_ID_MPEG4,
+ .audio_codec = CONFIG_LIBVORBIS ? AV_CODEC_ID_VORBIS :
+ CONFIG_LIBMP3LAME ? AV_CODEC_ID_MP3 : AV_CODEC_ID_MP2,
+ .video_codec = AV_CODEC_ID_MPEG4,
.write_header = nut_write_header,
.write_packet = nut_write_packet,
.write_trailer = nut_write_trailer,
diff --git a/libavformat/nuv.c b/libavformat/nuv.c
index 21df6d2856..c192faad98 100644
--- a/libavformat/nuv.c
+++ b/libavformat/nuv.c
@@ -90,7 +90,7 @@ static int get_codec_data(AVIOContext *pb, AVStream *vst,
vst->codec->codec_id =
ff_codec_get_id(ff_codec_bmp_tags, vst->codec->codec_tag);
if (vst->codec->codec_tag == MKTAG('R', 'J', 'P', 'G'))
- vst->codec->codec_id = CODEC_ID_NUV;
+ vst->codec->codec_id = AV_CODEC_ID_NUV;
} else
avio_skip(pb, 4);
@@ -158,7 +158,7 @@ static int nuv_header(AVFormatContext *s) {
if (!vst)
return AVERROR(ENOMEM);
vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- vst->codec->codec_id = CODEC_ID_NUV;
+ vst->codec->codec_id = AV_CODEC_ID_NUV;
vst->codec->width = width;
vst->codec->height = height;
vst->codec->bits_per_coded_sample = 10;
@@ -177,7 +177,7 @@ static int nuv_header(AVFormatContext *s) {
if (!ast)
return AVERROR(ENOMEM);
ast->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- ast->codec->codec_id = CODEC_ID_PCM_S16LE;
+ ast->codec->codec_id = AV_CODEC_ID_PCM_S16LE;
ast->codec->channels = 2;
ast->codec->sample_rate = 44100;
ast->codec->bit_rate = 2 * 2 * 44100 * 8;
@@ -188,7 +188,7 @@ static int nuv_header(AVFormatContext *s) {
ctx->a_id = -1;
get_codec_data(pb, vst, ast, is_mythtv);
- ctx->rtjpg_video = vst && vst->codec->codec_id == CODEC_ID_NUV;
+ ctx->rtjpg_video = vst && vst->codec->codec_id == AV_CODEC_ID_NUV;
return 0;
}
diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c
index e2b48c1a32..26aeb28d7e 100644
--- a/libavformat/oggdec.c
+++ b/libavformat/oggdec.c
@@ -607,7 +607,7 @@ static void ogg_validate_keyframe(AVFormatContext *s, int idx, int pstart, int p
{
struct ogg *ogg = s->priv_data;
struct ogg_stream *os = ogg->streams + idx;
- if (psize && s->streams[idx]->codec->codec_id == CODEC_ID_THEORA) {
+ if (psize && s->streams[idx]->codec->codec_id == AV_CODEC_ID_THEORA) {
if (!!(os->pflags & AV_PKT_FLAG_KEY) != !(os->buf[pstart] & 0x40)) {
os->pflags ^= AV_PKT_FLAG_KEY;
av_log(s, AV_LOG_WARNING, "Broken file, %skeyframe not correctly marked.\n",
diff --git a/libavformat/oggenc.c b/libavformat/oggenc.c
index b787d1b26c..97eda75c2a 100644
--- a/libavformat/oggenc.c
+++ b/libavformat/oggenc.c
@@ -214,7 +214,7 @@ static int ogg_buffer_data(AVFormatContext *s, AVStream *st,
// them as such, otherwise seeking will not work correctly at the very
// least with old libogg versions.
// Do not try to flush header packets though, that will create broken files.
- if (st->codec->codec_id == CODEC_ID_THEORA && !header &&
+ if (st->codec->codec_id == AV_CODEC_ID_THEORA && !header &&
(ogg_granule_to_timestamp(oggstream, granule) >
ogg_granule_to_timestamp(oggstream, oggstream->last_granule) + 1 ||
ogg_key_granule(oggstream, granule))) {
@@ -362,10 +362,10 @@ static int ogg_write_header(AVFormatContext *s)
avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate);
else if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO)
avpriv_set_pts_info(st, 64, st->codec->time_base.num, st->codec->time_base.den);
- if (st->codec->codec_id != CODEC_ID_VORBIS &&
- st->codec->codec_id != CODEC_ID_THEORA &&
- st->codec->codec_id != CODEC_ID_SPEEX &&
- st->codec->codec_id != CODEC_ID_FLAC) {
+ if (st->codec->codec_id != AV_CODEC_ID_VORBIS &&
+ st->codec->codec_id != AV_CODEC_ID_THEORA &&
+ st->codec->codec_id != AV_CODEC_ID_SPEEX &&
+ st->codec->codec_id != AV_CODEC_ID_FLAC) {
av_log(s, AV_LOG_ERROR, "Unsupported codec id in stream %d\n", i);
return -1;
}
@@ -389,7 +389,7 @@ static int ogg_write_header(AVFormatContext *s)
oggstream->serial_num = serial_num;
st->priv_data = oggstream;
- if (st->codec->codec_id == CODEC_ID_FLAC) {
+ if (st->codec->codec_id == AV_CODEC_ID_FLAC) {
int err = ogg_build_flac_headers(st->codec, oggstream,
st->codec->flags & CODEC_FLAG_BITEXACT,
&s->metadata);
@@ -398,7 +398,7 @@ static int ogg_write_header(AVFormatContext *s)
av_freep(&st->priv_data);
return err;
}
- } else if (st->codec->codec_id == CODEC_ID_SPEEX) {
+ } else if (st->codec->codec_id == AV_CODEC_ID_SPEEX) {
int err = ogg_build_speex_headers(st->codec, oggstream,
st->codec->flags & CODEC_FLAG_BITEXACT,
&s->metadata);
@@ -409,12 +409,12 @@ static int ogg_write_header(AVFormatContext *s)
}
} else {
uint8_t *p;
- const char *cstr = st->codec->codec_id == CODEC_ID_VORBIS ? "vorbis" : "theora";
- int header_type = st->codec->codec_id == CODEC_ID_VORBIS ? 3 : 0x81;
- int framing_bit = st->codec->codec_id == CODEC_ID_VORBIS ? 1 : 0;
+ const char *cstr = st->codec->codec_id == AV_CODEC_ID_VORBIS ? "vorbis" : "theora";
+ int header_type = st->codec->codec_id == AV_CODEC_ID_VORBIS ? 3 : 0x81;
+ int framing_bit = st->codec->codec_id == AV_CODEC_ID_VORBIS ? 1 : 0;
if (avpriv_split_xiph_headers(st->codec->extradata, st->codec->extradata_size,
- st->codec->codec_id == CODEC_ID_VORBIS ? 30 : 42,
+ st->codec->codec_id == AV_CODEC_ID_VORBIS ? 30 : 42,
oggstream->header, oggstream->header_len) < 0) {
av_log(s, AV_LOG_ERROR, "Extradata corrupted\n");
av_freep(&st->priv_data);
@@ -431,7 +431,7 @@ static int ogg_write_header(AVFormatContext *s)
bytestream_put_byte(&p, header_type);
bytestream_put_buffer(&p, cstr, 6);
- if (st->codec->codec_id == CODEC_ID_THEORA) {
+ if (st->codec->codec_id == AV_CODEC_ID_THEORA) {
/** KFGSHIFT is the width of the less significant section of the granule position
The less significant section is the frame count since the last keyframe */
oggstream->kfgshift = ((oggstream->header[0][40]&3)<<3)|(oggstream->header[0][41]>>5);
@@ -491,7 +491,7 @@ static int ogg_write_packet(AVFormatContext *s, AVPacket *pkt)
int ret;
int64_t granule;
- if (st->codec->codec_id == CODEC_ID_THEORA) {
+ if (st->codec->codec_id == AV_CODEC_ID_THEORA) {
int64_t pts = oggstream->vrev < 1 ? pkt->pts : pkt->pts + pkt->duration;
int pframe_count;
if (pkt->flags & AV_PKT_FLAG_KEY)
@@ -530,8 +530,8 @@ static int ogg_write_trailer(AVFormatContext *s)
for (i = 0; i < s->nb_streams; i++) {
AVStream *st = s->streams[i];
OGGStreamContext *oggstream = st->priv_data;
- if (st->codec->codec_id == CODEC_ID_FLAC ||
- st->codec->codec_id == CODEC_ID_SPEEX) {
+ if (st->codec->codec_id == AV_CODEC_ID_FLAC ||
+ st->codec->codec_id == AV_CODEC_ID_SPEEX) {
av_freep(&oggstream->header[0]);
}
av_freep(&oggstream->header[1]);
@@ -546,8 +546,8 @@ AVOutputFormat ff_ogg_muxer = {
.mime_type = "application/ogg",
.extensions = "ogg,ogv,spx",
.priv_data_size = sizeof(OGGContext),
- .audio_codec = CODEC_ID_FLAC,
- .video_codec = CODEC_ID_THEORA,
+ .audio_codec = AV_CODEC_ID_FLAC,
+ .video_codec = AV_CODEC_ID_THEORA,
.write_header = ogg_write_header,
.write_packet = ogg_write_packet,
.write_trailer = ogg_write_trailer,
diff --git a/libavformat/oggparsecelt.c b/libavformat/oggparsecelt.c
index fc5891b091..053b74b74f 100644
--- a/libavformat/oggparsecelt.c
+++ b/libavformat/oggparsecelt.c
@@ -63,7 +63,7 @@ static int celt_header(AVFormatContext *s, int idx)
/* unused bytes per packet field skipped */
extra_headers = AV_RL32(p + 56);
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- st->codec->codec_id = CODEC_ID_CELT;
+ st->codec->codec_id = AV_CODEC_ID_CELT;
st->codec->sample_rate = sample_rate;
st->codec->channels = nb_channels;
st->codec->frame_size = frame_size;
diff --git a/libavformat/oggparsedirac.c b/libavformat/oggparsedirac.c
index abcf4fb15c..2a9d9006e3 100644
--- a/libavformat/oggparsedirac.c
+++ b/libavformat/oggparsedirac.c
@@ -33,7 +33,7 @@ static int dirac_header(AVFormatContext *s, int idx)
GetBitContext gb;
// already parsed the header
- if (st->codec->codec_id == CODEC_ID_DIRAC)
+ if (st->codec->codec_id == AV_CODEC_ID_DIRAC)
return 0;
init_get_bits(&gb, os->buf + os->pstart + 13, (os->psize - 13) * 8);
@@ -41,7 +41,7 @@ static int dirac_header(AVFormatContext *s, int idx)
return -1;
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- st->codec->codec_id = CODEC_ID_DIRAC;
+ st->codec->codec_id = AV_CODEC_ID_DIRAC;
// dirac in ogg always stores timestamps as though the video were interlaced
avpriv_set_pts_info(st, 64, st->codec->time_base.num, 2*st->codec->time_base.den);
return 1;
@@ -79,7 +79,7 @@ static int old_dirac_header(AVFormatContext *s, int idx)
return 0;
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- st->codec->codec_id = CODEC_ID_DIRAC;
+ st->codec->codec_id = AV_CODEC_ID_DIRAC;
avpriv_set_pts_info(st, 64, AV_RB32(buf+12), AV_RB32(buf+8));
return 1;
}
diff --git a/libavformat/oggparseflac.c b/libavformat/oggparseflac.c
index d852c26152..6edbd85653 100644
--- a/libavformat/oggparseflac.c
+++ b/libavformat/oggparseflac.c
@@ -59,7 +59,7 @@ flac_header (AVFormatContext * s, int idx)
avpriv_flac_parse_streaminfo(st->codec, &si, streaminfo_start);
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- st->codec->codec_id = CODEC_ID_FLAC;
+ st->codec->codec_id = AV_CODEC_ID_FLAC;
st->need_parsing = AVSTREAM_PARSE_HEADERS;
st->codec->extradata =
@@ -80,7 +80,7 @@ old_flac_header (AVFormatContext * s, int idx)
{
AVStream *st = s->streams[idx];
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- st->codec->codec_id = CODEC_ID_FLAC;
+ st->codec->codec_id = AV_CODEC_ID_FLAC;
return 0;
}
diff --git a/libavformat/oggparseogm.c b/libavformat/oggparseogm.c
index 43243f042f..e60769efea 100644
--- a/libavformat/oggparseogm.c
+++ b/libavformat/oggparseogm.c
@@ -58,7 +58,7 @@ ogm_header(AVFormatContext *s, int idx)
st->codec->codec_tag = tag;
} else if (*p == 't') {
st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;
- st->codec->codec_id = CODEC_ID_TEXT;
+ st->codec->codec_id = AV_CODEC_ID_TEXT;
p += 12;
} else {
uint8_t acid[5];
@@ -70,7 +70,7 @@ ogm_header(AVFormatContext *s, int idx)
cid = strtol(acid, NULL, 16);
st->codec->codec_id = ff_codec_get_id(ff_codec_wav_tags, cid);
// our parser completely breaks AAC in Ogg
- if (st->codec->codec_id != CODEC_ID_AAC)
+ if (st->codec->codec_id != AV_CODEC_ID_AAC)
st->need_parsing = AVSTREAM_PARSE_FULL;
}
@@ -91,7 +91,7 @@ ogm_header(AVFormatContext *s, int idx)
st->codec->bit_rate = bytestream_get_le32(&p) * 8;
st->codec->sample_rate = time_unit ? spu * 10000000 / time_unit : 0;
avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate);
- if (size >= 56 && st->codec->codec_id == CODEC_ID_AAC) {
+ if (size >= 56 && st->codec->codec_id == AV_CODEC_ID_AAC) {
p += 4;
size -= 4;
}
diff --git a/libavformat/oggparseopus.c b/libavformat/oggparseopus.c
index b6357570ea..0e8f1ca5bb 100644
--- a/libavformat/oggparseopus.c
+++ b/libavformat/oggparseopus.c
@@ -52,7 +52,7 @@ static int opus_header(AVFormatContext *avf, int idx)
if (os->psize < OPUS_HEAD_SIZE || (AV_RL8(packet + 8) & 0xF0) != 0)
return AVERROR_INVALIDDATA;
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- st->codec->codec_id = CODEC_ID_OPUS;
+ st->codec->codec_id = AV_CODEC_ID_OPUS;
st->codec->channels = AV_RL8 (packet + 9);
priv->pre_skip = AV_RL16(packet + 10);
/*orig_sample_rate = AV_RL32(packet + 12);*/
diff --git a/libavformat/oggparsespeex.c b/libavformat/oggparsespeex.c
index 435ed0cedf..e4dfec5218 100644
--- a/libavformat/oggparsespeex.c
+++ b/libavformat/oggparsespeex.c
@@ -55,7 +55,7 @@ static int speex_header(AVFormatContext *s, int idx) {
if (spxp->seq == 0) {
int frames_per_packet;
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- st->codec->codec_id = CODEC_ID_SPEEX;
+ st->codec->codec_id = AV_CODEC_ID_SPEEX;
st->codec->sample_rate = AV_RL32(p + 36);
st->codec->channels = AV_RL32(p + 48);
diff --git a/libavformat/oggparsetheora.c b/libavformat/oggparsetheora.c
index d646efcbfc..ff68fe4734 100644
--- a/libavformat/oggparsetheora.c
+++ b/libavformat/oggparsetheora.c
@@ -107,7 +107,7 @@ theora_header (AVFormatContext * s, int idx)
thp->gpmask = (1 << thp->gpshift) - 1;
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- st->codec->codec_id = CODEC_ID_THEORA;
+ st->codec->codec_id = AV_CODEC_ID_THEORA;
st->need_parsing = AVSTREAM_PARSE_HEADERS;
} else if (os->buf[os->pstart] == 0x83) {
diff --git a/libavformat/oggparsevorbis.c b/libavformat/oggparsevorbis.c
index 74f44995b8..38eb4b0b1c 100644
--- a/libavformat/oggparsevorbis.c
+++ b/libavformat/oggparsevorbis.c
@@ -256,7 +256,7 @@ vorbis_header (AVFormatContext * s, int idx)
return -1;
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- st->codec->codec_id = CODEC_ID_VORBIS;
+ st->codec->codec_id = AV_CODEC_ID_VORBIS;
if (srate > 0) {
st->codec->sample_rate = srate;
diff --git a/libavformat/oma.c b/libavformat/oma.c
index d4dfb1a265..9e4bfbdd77 100644
--- a/libavformat/oma.c
+++ b/libavformat/oma.c
@@ -25,10 +25,10 @@
const uint16_t ff_oma_srate_tab[8] = { 320, 441, 480, 882, 960, 0, 0, 0};
const AVCodecTag ff_oma_codec_tags[] = {
- { CODEC_ID_ATRAC3, OMA_CODECID_ATRAC3 },
- { CODEC_ID_ATRAC3P, OMA_CODECID_ATRAC3P },
- { CODEC_ID_MP3, OMA_CODECID_MP3 },
- { CODEC_ID_PCM_S16BE, OMA_CODECID_LPCM },
+ { AV_CODEC_ID_ATRAC3, OMA_CODECID_ATRAC3 },
+ { AV_CODEC_ID_ATRAC3P, OMA_CODECID_ATRAC3P },
+ { AV_CODEC_ID_MP3, OMA_CODECID_MP3 },
+ { AV_CODEC_ID_PCM_S16BE, OMA_CODECID_LPCM },
{ 0 },
};
diff --git a/libavformat/omaenc.c b/libavformat/omaenc.c
index c3ee0e8de1..ea28e109c4 100644
--- a/libavformat/omaenc.c
+++ b/libavformat/omaenc.c
@@ -98,7 +98,7 @@ AVOutputFormat ff_oma_muxer = {
.long_name = NULL_IF_CONFIG_SMALL("Sony OpenMG audio"),
.mime_type = "audio/x-oma",
.extensions = "oma",
- .audio_codec = CODEC_ID_ATRAC3,
+ .audio_codec = AV_CODEC_ID_ATRAC3,
.write_header = oma_write_header,
.write_packet = ff_raw_write_packet,
.codec_tag = (const AVCodecTag* const []){ff_oma_codec_tags, 0},
diff --git a/libavformat/paf.c b/libavformat/paf.c
index 41d9140326..8fe2ac5638 100644
--- a/libavformat/paf.c
+++ b/libavformat/paf.c
@@ -107,7 +107,7 @@ static int read_header(AVFormatContext *s)
avio_skip(pb, 4);
vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
vst->codec->codec_tag = 0;
- vst->codec->codec_id = CODEC_ID_PAF_VIDEO;
+ vst->codec->codec_id = AV_CODEC_ID_PAF_VIDEO;
avpriv_set_pts_info(vst, 64, 1, 10);
ast = avformat_new_stream(s, 0);
@@ -117,7 +117,7 @@ static int read_header(AVFormatContext *s)
ast->start_time = 0;
ast->codec->codec_type = AVMEDIA_TYPE_AUDIO;
ast->codec->codec_tag = 0;
- ast->codec->codec_id = CODEC_ID_PAF_AUDIO;
+ ast->codec->codec_id = AV_CODEC_ID_PAF_AUDIO;
ast->codec->channels = 2;
ast->codec->sample_rate = 22050;
avpriv_set_pts_info(ast, 64, 1, 22050);
diff --git a/libavformat/pcmdec.c b/libavformat/pcmdec.c
index 7a1eb41624..4ac3c6d89e 100644
--- a/libavformat/pcmdec.c
+++ b/libavformat/pcmdec.c
@@ -77,61 +77,61 @@ AVInputFormat ff_pcm_ ## name_ ## _demuxer = { \
};
PCMDEF(f64be, "PCM 64-bit floating-point big-endian",
- NULL, CODEC_ID_PCM_F64BE)
+ NULL, AV_CODEC_ID_PCM_F64BE)
PCMDEF(f64le, "PCM 64-bit floating-point little-endian",
- NULL, CODEC_ID_PCM_F64LE)
+ NULL, AV_CODEC_ID_PCM_F64LE)
PCMDEF(f32be, "PCM 32-bit floating-point big-endian",
- NULL, CODEC_ID_PCM_F32BE)
+ NULL, AV_CODEC_ID_PCM_F32BE)
PCMDEF(f32le, "PCM 32-bit floating-point little-endian",
- NULL, CODEC_ID_PCM_F32LE)
+ NULL, AV_CODEC_ID_PCM_F32LE)
PCMDEF(s32be, "PCM signed 32-bit big-endian",
- NULL, CODEC_ID_PCM_S32BE)
+ NULL, AV_CODEC_ID_PCM_S32BE)
PCMDEF(s32le, "PCM signed 32-bit little-endian",
- NULL, CODEC_ID_PCM_S32LE)
+ NULL, AV_CODEC_ID_PCM_S32LE)
PCMDEF(s24be, "PCM signed 24-bit big-endian",
- NULL, CODEC_ID_PCM_S24BE)
+ NULL, AV_CODEC_ID_PCM_S24BE)
PCMDEF(s24le, "PCM signed 24-bit little-endian",
- NULL, CODEC_ID_PCM_S24LE)
+ NULL, AV_CODEC_ID_PCM_S24LE)
PCMDEF(s16be, "PCM signed 16-bit big-endian",
- AV_NE("sw", NULL), CODEC_ID_PCM_S16BE)
+ AV_NE("sw", NULL), AV_CODEC_ID_PCM_S16BE)
PCMDEF(s16le, "PCM signed 16-bit little-endian",
- AV_NE(NULL, "sw"), CODEC_ID_PCM_S16LE)
+ AV_NE(NULL, "sw"), AV_CODEC_ID_PCM_S16LE)
PCMDEF(s8, "PCM signed 8-bit",
- "sb", CODEC_ID_PCM_S8)
+ "sb", AV_CODEC_ID_PCM_S8)
PCMDEF(u32be, "PCM unsigned 32-bit big-endian",
- NULL, CODEC_ID_PCM_U32BE)
+ NULL, AV_CODEC_ID_PCM_U32BE)
PCMDEF(u32le, "PCM unsigned 32-bit little-endian",
- NULL, CODEC_ID_PCM_U32LE)
+ NULL, AV_CODEC_ID_PCM_U32LE)
PCMDEF(u24be, "PCM unsigned 24-bit big-endian",
- NULL, CODEC_ID_PCM_U24BE)
+ NULL, AV_CODEC_ID_PCM_U24BE)
PCMDEF(u24le, "PCM unsigned 24-bit little-endian",
- NULL, CODEC_ID_PCM_U24LE)
+ NULL, AV_CODEC_ID_PCM_U24LE)
PCMDEF(u16be, "PCM unsigned 16-bit big-endian",
- AV_NE("uw", NULL), CODEC_ID_PCM_U16BE)
+ AV_NE("uw", NULL), AV_CODEC_ID_PCM_U16BE)
PCMDEF(u16le, "PCM unsigned 16-bit little-endian",
- AV_NE(NULL, "uw"), CODEC_ID_PCM_U16LE)
+ AV_NE(NULL, "uw"), AV_CODEC_ID_PCM_U16LE)
PCMDEF(u8, "PCM unsigned 8-bit",
- "ub", CODEC_ID_PCM_U8)
+ "ub", AV_CODEC_ID_PCM_U8)
PCMDEF(alaw, "PCM A-law",
- "al", CODEC_ID_PCM_ALAW)
+ "al", AV_CODEC_ID_PCM_ALAW)
PCMDEF(mulaw, "PCM mu-law",
- "ul", CODEC_ID_PCM_MULAW)
+ "ul", AV_CODEC_ID_PCM_MULAW)
diff --git a/libavformat/pcmenc.c b/libavformat/pcmenc.c
index b7877ddd32..3e4f308057 100644
--- a/libavformat/pcmenc.c
+++ b/libavformat/pcmenc.c
@@ -28,67 +28,67 @@ AVOutputFormat ff_pcm_ ## name_ ## _muxer = { \
.long_name = NULL_IF_CONFIG_SMALL(long_name_), \
.extensions = ext, \
.audio_codec = codec, \
- .video_codec = CODEC_ID_NONE, \
+ .video_codec = AV_CODEC_ID_NONE, \
.write_packet = ff_raw_write_packet, \
.flags = AVFMT_NOTIMESTAMPS, \
};
PCMDEF(f64be, "PCM 64-bit floating-point big-endian",
- NULL, CODEC_ID_PCM_F64BE)
+ NULL, AV_CODEC_ID_PCM_F64BE)
PCMDEF(f64le, "PCM 64-bit floating-point little-endian",
- NULL, CODEC_ID_PCM_F64LE)
+ NULL, AV_CODEC_ID_PCM_F64LE)
PCMDEF(f32be, "PCM 32-bit floating-point big-endian",
- NULL, CODEC_ID_PCM_F32BE)
+ NULL, AV_CODEC_ID_PCM_F32BE)
PCMDEF(f32le, "PCM 32-bit floating-point little-endian",
- NULL, CODEC_ID_PCM_F32LE)
+ NULL, AV_CODEC_ID_PCM_F32LE)
PCMDEF(s32be, "PCM signed 32-bit big-endian",
- NULL, CODEC_ID_PCM_S32BE)
+ NULL, AV_CODEC_ID_PCM_S32BE)
PCMDEF(s32le, "PCM signed 32-bit little-endian",
- NULL, CODEC_ID_PCM_S32LE)
+ NULL, AV_CODEC_ID_PCM_S32LE)
PCMDEF(s24be, "PCM signed 24-bit big-endian",
- NULL, CODEC_ID_PCM_S24BE)
+ NULL, AV_CODEC_ID_PCM_S24BE)
PCMDEF(s24le, "PCM signed 24-bit little-endian",
- NULL, CODEC_ID_PCM_S24LE)
+ NULL, AV_CODEC_ID_PCM_S24LE)
PCMDEF(s16be, "PCM signed 16-bit big-endian",
- AV_NE("sw", NULL), CODEC_ID_PCM_S16BE)
+ AV_NE("sw", NULL), AV_CODEC_ID_PCM_S16BE)
PCMDEF(s16le, "PCM signed 16-bit little-endian",
- AV_NE(NULL, "sw"), CODEC_ID_PCM_S16LE)
+ AV_NE(NULL, "sw"), AV_CODEC_ID_PCM_S16LE)
PCMDEF(s8, "PCM signed 8-bit",
- "sb", CODEC_ID_PCM_S8)
+ "sb", AV_CODEC_ID_PCM_S8)
PCMDEF(u32be, "PCM unsigned 32-bit big-endian",
- NULL, CODEC_ID_PCM_U32BE)
+ NULL, AV_CODEC_ID_PCM_U32BE)
PCMDEF(u32le, "PCM unsigned 32-bit little-endian",
- NULL, CODEC_ID_PCM_U32LE)
+ NULL, AV_CODEC_ID_PCM_U32LE)
PCMDEF(u24be, "PCM unsigned 24-bit big-endian",
- NULL, CODEC_ID_PCM_U24BE)
+ NULL, AV_CODEC_ID_PCM_U24BE)
PCMDEF(u24le, "PCM unsigned 24-bit little-endian",
- NULL, CODEC_ID_PCM_U24LE)
+ NULL, AV_CODEC_ID_PCM_U24LE)
PCMDEF(u16be, "PCM unsigned 16-bit big-endian",
- AV_NE("uw", NULL), CODEC_ID_PCM_U16BE)
+ AV_NE("uw", NULL), AV_CODEC_ID_PCM_U16BE)
PCMDEF(u16le, "PCM unsigned 16-bit little-endian",
- AV_NE(NULL, "uw"), CODEC_ID_PCM_U16LE)
+ AV_NE(NULL, "uw"), AV_CODEC_ID_PCM_U16LE)
PCMDEF(u8, "PCM unsigned 8-bit",
- "ub", CODEC_ID_PCM_U8)
+ "ub", AV_CODEC_ID_PCM_U8)
PCMDEF(alaw, "PCM A-law",
- "al", CODEC_ID_PCM_ALAW)
+ "al", AV_CODEC_ID_PCM_ALAW)
PCMDEF(mulaw, "PCM mu-law",
- "ul", CODEC_ID_PCM_MULAW)
+ "ul", AV_CODEC_ID_PCM_MULAW)
diff --git a/libavformat/pmpdec.c b/libavformat/pmpdec.c
index 593a355b6b..2ea37ef030 100644
--- a/libavformat/pmpdec.c
+++ b/libavformat/pmpdec.c
@@ -45,7 +45,7 @@ static int pmp_header(AVFormatContext *s)
AVIOContext *pb = s->pb;
int tb_num, tb_den;
int index_cnt;
- int audio_codec_id = CODEC_ID_NONE;
+ int audio_codec_id = AV_CODEC_ID_NONE;
int srate, channels;
int i;
uint64_t pos;
@@ -56,10 +56,10 @@ static int pmp_header(AVFormatContext *s)
avio_skip(pb, 8);
switch (avio_rl32(pb)) {
case 0:
- vst->codec->codec_id = CODEC_ID_MPEG4;
+ vst->codec->codec_id = AV_CODEC_ID_MPEG4;
break;
case 1:
- vst->codec->codec_id = CODEC_ID_H264;
+ vst->codec->codec_id = AV_CODEC_ID_H264;
break;
default:
av_log(s, AV_LOG_ERROR, "Unsupported video format\n");
@@ -77,11 +77,11 @@ static int pmp_header(AVFormatContext *s)
switch (avio_rl32(pb)) {
case 0:
- audio_codec_id = CODEC_ID_MP3;
+ audio_codec_id = AV_CODEC_ID_MP3;
break;
case 1:
av_log(s, AV_LOG_ERROR, "AAC not yet correctly supported\n");
- audio_codec_id = CODEC_ID_AAC;
+ audio_codec_id = AV_CODEC_ID_AAC;
break;
default:
av_log(s, AV_LOG_ERROR, "Unsupported audio format\n");
diff --git a/libavformat/psxstr.c b/libavformat/psxstr.c
index b978e01f41..49b34413a6 100644
--- a/libavformat/psxstr.c
+++ b/libavformat/psxstr.c
@@ -204,7 +204,7 @@ static int str_read_packet(AVFormatContext *s,
str->channels[channel].video_stream_index = st->index;
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- st->codec->codec_id = CODEC_ID_MDEC;
+ st->codec->codec_id = AV_CODEC_ID_MDEC;
st->codec->codec_tag = 0; /* no fourcc */
st->codec->width = AV_RL16(&sector[0x28]);
st->codec->height = AV_RL16(&sector[0x2A]);
@@ -251,7 +251,7 @@ static int str_read_packet(AVFormatContext *s,
str->channels[channel].audio_stream_index = st->index;
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- st->codec->codec_id = CODEC_ID_ADPCM_XA;
+ st->codec->codec_id = AV_CODEC_ID_ADPCM_XA;
st->codec->codec_tag = 0; /* no fourcc */
st->codec->channels = (fmt&1)?2:1;
st->codec->sample_rate = (fmt&4)?18900:37800;
diff --git a/libavformat/pva.c b/libavformat/pva.c
index 0e1605d326..ff8ccee852 100644
--- a/libavformat/pva.c
+++ b/libavformat/pva.c
@@ -60,7 +60,7 @@ static int pva_read_header(AVFormatContext *s) {
if (!(st = avformat_new_stream(s, NULL)))
return AVERROR(ENOMEM);
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- st->codec->codec_id = CODEC_ID_MPEG2VIDEO;
+ st->codec->codec_id = AV_CODEC_ID_MPEG2VIDEO;
st->need_parsing = AVSTREAM_PARSE_FULL;
avpriv_set_pts_info(st, 32, 1, 90000);
av_add_index_entry(st, 0, 0, 0, 0, AVINDEX_KEYFRAME);
@@ -68,7 +68,7 @@ static int pva_read_header(AVFormatContext *s) {
if (!(st = avformat_new_stream(s, NULL)))
return AVERROR(ENOMEM);
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- st->codec->codec_id = CODEC_ID_MP2;
+ st->codec->codec_id = AV_CODEC_ID_MP2;
st->need_parsing = AVSTREAM_PARSE_FULL;
avpriv_set_pts_info(st, 33, 1, 90000);
av_add_index_entry(st, 0, 0, 0, 0, AVINDEX_KEYFRAME);
diff --git a/libavformat/qcp.c b/libavformat/qcp.c
index 4d91c05e6e..11fc71a466 100644
--- a/libavformat/qcp.c
+++ b/libavformat/qcp.c
@@ -98,7 +98,7 @@ static int qcp_read_header(AVFormatContext *s)
st->codec->channels = 1;
avio_read(pb, buf, 16);
if (is_qcelp_13k_guid(buf)) {
- st->codec->codec_id = CODEC_ID_QCELP;
+ st->codec->codec_id = AV_CODEC_ID_QCELP;
} else if (!memcmp(buf, guid_evrc, 16)) {
av_log(s, AV_LOG_ERROR, "EVRC codec is not supported.\n");
return AVERROR_PATCHWELCOME;
diff --git a/libavformat/r3d.c b/libavformat/r3d.c
index f95f940dd7..35da81eff1 100644
--- a/libavformat/r3d.c
+++ b/libavformat/r3d.c
@@ -62,7 +62,7 @@ static int r3d_read_red1(AVFormatContext *s)
if (!st)
return AVERROR(ENOMEM);
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- st->codec->codec_id = CODEC_ID_JPEG2000;
+ st->codec->codec_id = AV_CODEC_ID_JPEG2000;
tmp = avio_r8(s->pb); // major version
tmp2 = avio_r8(s->pb); // minor version
@@ -101,7 +101,7 @@ static int r3d_read_red1(AVFormatContext *s)
if (!ast)
return AVERROR(ENOMEM);
ast->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- ast->codec->codec_id = CODEC_ID_PCM_S32BE;
+ ast->codec->codec_id = AV_CODEC_ID_PCM_S32BE;
ast->codec->channels = tmp;
avpriv_set_pts_info(ast, 32, 1, st->time_base.den);
}
diff --git a/libavformat/rawdec.c b/libavformat/rawdec.c
index 25d17b6c1e..974e58ca31 100644
--- a/libavformat/rawdec.c
+++ b/libavformat/rawdec.c
@@ -33,14 +33,14 @@
int ff_raw_read_header(AVFormatContext *s)
{
AVStream *st;
- enum CodecID id;
+ enum AVCodecID id;
st = avformat_new_stream(s, NULL);
if (!st)
return AVERROR(ENOMEM);
id = s->iformat->raw_codec_id;
- if (id == CODEC_ID_RAWVIDEO) {
+ if (id == AV_CODEC_ID_RAWVIDEO) {
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
} else {
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
@@ -53,7 +53,7 @@ int ff_raw_read_header(AVFormatContext *s)
st->codec->channels = 1;
- if (id == CODEC_ID_ADPCM_G722)
+ if (id == AV_CODEC_ID_ADPCM_G722)
st->codec->sample_rate = 16000;
if (s1 && s1->sample_rate)
@@ -189,7 +189,7 @@ AVInputFormat ff_g722_demuxer = {
.read_packet = ff_raw_read_partial_packet,
.flags = AVFMT_GENERIC_INDEX,
.extensions = "g722,722",
- .raw_codec_id = CODEC_ID_ADPCM_G722,
+ .raw_codec_id = AV_CODEC_ID_ADPCM_G722,
};
#endif
@@ -201,12 +201,12 @@ AVInputFormat ff_latm_demuxer = {
.read_packet = ff_raw_read_partial_packet,
.flags = AVFMT_GENERIC_INDEX,
.extensions = "latm",
- .raw_codec_id = CODEC_ID_AAC_LATM,
+ .raw_codec_id = AV_CODEC_ID_AAC_LATM,
};
#endif
#if CONFIG_MJPEG_DEMUXER
-FF_DEF_RAWVIDEO_DEMUXER(mjpeg, "raw MJPEG video", NULL, "mjpg,mjpeg,mpo", CODEC_ID_MJPEG)
+FF_DEF_RAWVIDEO_DEMUXER(mjpeg, "raw MJPEG video", NULL, "mjpg,mjpeg,mpo", AV_CODEC_ID_MJPEG)
#endif
#if CONFIG_MLP_DEMUXER
@@ -217,7 +217,7 @@ AVInputFormat ff_mlp_demuxer = {
.read_packet = ff_raw_read_partial_packet,
.flags = AVFMT_GENERIC_INDEX,
.extensions = "mlp",
- .raw_codec_id = CODEC_ID_MLP,
+ .raw_codec_id = AV_CODEC_ID_MLP,
};
#endif
@@ -229,7 +229,7 @@ AVInputFormat ff_truehd_demuxer = {
.read_packet = ff_raw_read_partial_packet,
.flags = AVFMT_GENERIC_INDEX,
.extensions = "thd",
- .raw_codec_id = CODEC_ID_TRUEHD,
+ .raw_codec_id = AV_CODEC_ID_TRUEHD,
};
#endif
@@ -241,10 +241,10 @@ AVInputFormat ff_shorten_demuxer = {
.read_packet = ff_raw_read_partial_packet,
.flags = AVFMT_NOBINSEARCH | AVFMT_NOGENSEARCH | AVFMT_NO_BYTE_SEEK,
.extensions = "shn",
- .raw_codec_id = CODEC_ID_SHORTEN,
+ .raw_codec_id = AV_CODEC_ID_SHORTEN,
};
#endif
#if CONFIG_VC1_DEMUXER
-FF_DEF_RAWVIDEO_DEMUXER(vc1, "raw VC-1", NULL, "vc1", CODEC_ID_VC1)
+FF_DEF_RAWVIDEO_DEMUXER(vc1, "raw VC-1", NULL, "vc1", AV_CODEC_ID_VC1)
#endif
diff --git a/libavformat/rawenc.c b/libavformat/rawenc.c
index f9b92f5b43..94e68c5ee4 100644
--- a/libavformat/rawenc.c
+++ b/libavformat/rawenc.c
@@ -38,8 +38,8 @@ AVOutputFormat ff_ac3_muxer = {
.long_name = NULL_IF_CONFIG_SMALL("raw AC-3"),
.mime_type = "audio/x-ac3",
.extensions = "ac3",
- .audio_codec = CODEC_ID_AC3,
- .video_codec = CODEC_ID_NONE,
+ .audio_codec = AV_CODEC_ID_AC3,
+ .video_codec = AV_CODEC_ID_NONE,
.write_packet = ff_raw_write_packet,
.flags = AVFMT_NOTIMESTAMPS,
};
@@ -50,8 +50,8 @@ AVOutputFormat ff_adx_muxer = {
.name = "adx",
.long_name = NULL_IF_CONFIG_SMALL("CRI ADX"),
.extensions = "adx",
- .audio_codec = CODEC_ID_ADPCM_ADX,
- .video_codec = CODEC_ID_NONE,
+ .audio_codec = AV_CODEC_ID_ADPCM_ADX,
+ .video_codec = AV_CODEC_ID_NONE,
.write_packet = ff_raw_write_packet,
.flags = AVFMT_NOTIMESTAMPS,
};
@@ -62,8 +62,8 @@ AVOutputFormat ff_cavsvideo_muxer = {
.name = "cavsvideo",
.long_name = NULL_IF_CONFIG_SMALL("raw Chinese AVS (Audio Video Standard) video"),
.extensions = "cavs",
- .audio_codec = CODEC_ID_NONE,
- .video_codec = CODEC_ID_CAVS,
+ .audio_codec = AV_CODEC_ID_NONE,
+ .video_codec = AV_CODEC_ID_CAVS,
.write_packet = ff_raw_write_packet,
.flags = AVFMT_NOTIMESTAMPS,
};
@@ -74,8 +74,8 @@ AVOutputFormat ff_dirac_muxer = {
.name = "dirac",
.long_name = NULL_IF_CONFIG_SMALL("raw Dirac"),
.extensions = "drc",
- .audio_codec = CODEC_ID_NONE,
- .video_codec = CODEC_ID_DIRAC,
+ .audio_codec = AV_CODEC_ID_NONE,
+ .video_codec = AV_CODEC_ID_DIRAC,
.write_packet = ff_raw_write_packet,
.flags = AVFMT_NOTIMESTAMPS,
};
@@ -86,8 +86,8 @@ AVOutputFormat ff_dnxhd_muxer = {
.name = "dnxhd",
.long_name = NULL_IF_CONFIG_SMALL("raw DNxHD (SMPTE VC-3)"),
.extensions = "dnxhd",
- .audio_codec = CODEC_ID_NONE,
- .video_codec = CODEC_ID_DNXHD,
+ .audio_codec = AV_CODEC_ID_NONE,
+ .video_codec = AV_CODEC_ID_DNXHD,
.write_packet = ff_raw_write_packet,
.flags = AVFMT_NOTIMESTAMPS,
};
@@ -99,8 +99,8 @@ AVOutputFormat ff_dts_muxer = {
.long_name = NULL_IF_CONFIG_SMALL("raw DTS"),
.mime_type = "audio/x-dca",
.extensions = "dts",
- .audio_codec = CODEC_ID_DTS,
- .video_codec = CODEC_ID_NONE,
+ .audio_codec = AV_CODEC_ID_DTS,
+ .video_codec = AV_CODEC_ID_NONE,
.write_packet = ff_raw_write_packet,
.flags = AVFMT_NOTIMESTAMPS,
};
@@ -112,8 +112,8 @@ AVOutputFormat ff_eac3_muxer = {
.long_name = NULL_IF_CONFIG_SMALL("raw E-AC-3"),
.mime_type = "audio/x-eac3",
.extensions = "eac3",
- .audio_codec = CODEC_ID_EAC3,
- .video_codec = CODEC_ID_NONE,
+ .audio_codec = AV_CODEC_ID_EAC3,
+ .video_codec = AV_CODEC_ID_NONE,
.write_packet = ff_raw_write_packet,
.flags = AVFMT_NOTIMESTAMPS,
};
@@ -125,8 +125,8 @@ AVOutputFormat ff_g722_muxer = {
.long_name = NULL_IF_CONFIG_SMALL("raw G.722"),
.mime_type = "audio/G722",
.extensions = "g722",
- .audio_codec = CODEC_ID_ADPCM_G722,
- .video_codec = CODEC_ID_NONE,
+ .audio_codec = AV_CODEC_ID_ADPCM_G722,
+ .video_codec = AV_CODEC_ID_NONE,
.write_packet = ff_raw_write_packet,
.flags = AVFMT_NOTIMESTAMPS,
};
@@ -138,8 +138,8 @@ AVOutputFormat ff_g723_1_muxer = {
.long_name = NULL_IF_CONFIG_SMALL("raw G.723.1"),
.mime_type = "audio/g723",
.extensions = "tco,rco",
- .audio_codec = CODEC_ID_G723_1,
- .video_codec = CODEC_ID_NONE,
+ .audio_codec = AV_CODEC_ID_G723_1,
+ .video_codec = AV_CODEC_ID_NONE,
.write_packet = ff_raw_write_packet,
.flags= AVFMT_NOTIMESTAMPS,
};
@@ -151,8 +151,8 @@ AVOutputFormat ff_h261_muxer = {
.long_name = NULL_IF_CONFIG_SMALL("raw H.261"),
.mime_type = "video/x-h261",
.extensions = "h261",
- .audio_codec = CODEC_ID_NONE,
- .video_codec = CODEC_ID_H261,
+ .audio_codec = AV_CODEC_ID_NONE,
+ .video_codec = AV_CODEC_ID_H261,
.write_packet = ff_raw_write_packet,
.flags = AVFMT_NOTIMESTAMPS,
};
@@ -164,8 +164,8 @@ AVOutputFormat ff_h263_muxer = {
.long_name = NULL_IF_CONFIG_SMALL("raw H.263"),
.mime_type = "video/x-h263",
.extensions = "h263",
- .audio_codec = CODEC_ID_NONE,
- .video_codec = CODEC_ID_H263,
+ .audio_codec = AV_CODEC_ID_NONE,
+ .video_codec = AV_CODEC_ID_H263,
.write_packet = ff_raw_write_packet,
.flags = AVFMT_NOTIMESTAMPS,
};
@@ -176,8 +176,8 @@ AVOutputFormat ff_h264_muxer = {
.name = "h264",
.long_name = NULL_IF_CONFIG_SMALL("raw H.264 video"),
.extensions = "h264",
- .audio_codec = CODEC_ID_NONE,
- .video_codec = CODEC_ID_H264,
+ .audio_codec = AV_CODEC_ID_NONE,
+ .video_codec = AV_CODEC_ID_H264,
.write_packet = ff_raw_write_packet,
.flags = AVFMT_NOTIMESTAMPS,
};
@@ -188,8 +188,8 @@ AVOutputFormat ff_m4v_muxer = {
.name = "m4v",
.long_name = NULL_IF_CONFIG_SMALL("raw MPEG-4 video"),
.extensions = "m4v",
- .audio_codec = CODEC_ID_NONE,
- .video_codec = CODEC_ID_MPEG4,
+ .audio_codec = AV_CODEC_ID_NONE,
+ .video_codec = AV_CODEC_ID_MPEG4,
.write_packet = ff_raw_write_packet,
.flags = AVFMT_NOTIMESTAMPS,
};
@@ -201,8 +201,8 @@ AVOutputFormat ff_mjpeg_muxer = {
.long_name = NULL_IF_CONFIG_SMALL("raw MJPEG video"),
.mime_type = "video/x-mjpeg",
.extensions = "mjpg,mjpeg",
- .audio_codec = CODEC_ID_NONE,
- .video_codec = CODEC_ID_MJPEG,
+ .audio_codec = AV_CODEC_ID_NONE,
+ .video_codec = AV_CODEC_ID_MJPEG,
.write_packet = ff_raw_write_packet,
.flags = AVFMT_NOTIMESTAMPS,
};
@@ -213,8 +213,8 @@ AVOutputFormat ff_mlp_muxer = {
.name = "mlp",
.long_name = NULL_IF_CONFIG_SMALL("raw MLP"),
.extensions = "mlp",
- .audio_codec = CODEC_ID_MLP,
- .video_codec = CODEC_ID_NONE,
+ .audio_codec = AV_CODEC_ID_MLP,
+ .video_codec = AV_CODEC_ID_NONE,
.write_packet = ff_raw_write_packet,
.flags = AVFMT_NOTIMESTAMPS,
};
@@ -226,8 +226,8 @@ AVOutputFormat ff_mpeg1video_muxer = {
.long_name = NULL_IF_CONFIG_SMALL("raw MPEG-1 video"),
.mime_type = "video/x-mpeg",
.extensions = "mpg,mpeg,m1v",
- .audio_codec = CODEC_ID_NONE,
- .video_codec = CODEC_ID_MPEG1VIDEO,
+ .audio_codec = AV_CODEC_ID_NONE,
+ .video_codec = AV_CODEC_ID_MPEG1VIDEO,
.write_packet = ff_raw_write_packet,
.flags = AVFMT_NOTIMESTAMPS,
};
@@ -238,8 +238,8 @@ AVOutputFormat ff_mpeg2video_muxer = {
.name = "mpeg2video",
.long_name = NULL_IF_CONFIG_SMALL("raw MPEG-2 video"),
.extensions = "m2v",
- .audio_codec = CODEC_ID_NONE,
- .video_codec = CODEC_ID_MPEG2VIDEO,
+ .audio_codec = AV_CODEC_ID_NONE,
+ .video_codec = AV_CODEC_ID_MPEG2VIDEO,
.write_packet = ff_raw_write_packet,
.flags = AVFMT_NOTIMESTAMPS,
};
@@ -250,8 +250,8 @@ AVOutputFormat ff_rawvideo_muxer = {
.name = "rawvideo",
.long_name = NULL_IF_CONFIG_SMALL("raw video"),
.extensions = "yuv,rgb",
- .audio_codec = CODEC_ID_NONE,
- .video_codec = CODEC_ID_RAWVIDEO,
+ .audio_codec = AV_CODEC_ID_NONE,
+ .video_codec = AV_CODEC_ID_RAWVIDEO,
.write_packet = ff_raw_write_packet,
.flags = AVFMT_NOTIMESTAMPS,
};
@@ -262,8 +262,8 @@ AVOutputFormat ff_truehd_muxer = {
.name = "truehd",
.long_name = NULL_IF_CONFIG_SMALL("raw TrueHD"),
.extensions = "thd",
- .audio_codec = CODEC_ID_TRUEHD,
- .video_codec = CODEC_ID_NONE,
+ .audio_codec = AV_CODEC_ID_TRUEHD,
+ .video_codec = AV_CODEC_ID_NONE,
.write_packet = ff_raw_write_packet,
.flags = AVFMT_NOTIMESTAMPS,
};
diff --git a/libavformat/rawvideodec.c b/libavformat/rawvideodec.c
index c349a5338f..2828c8d472 100644
--- a/libavformat/rawvideodec.c
+++ b/libavformat/rawvideodec.c
@@ -68,6 +68,6 @@ AVInputFormat ff_rawvideo_demuxer = {
.read_packet = rawvideo_read_packet,
.flags = AVFMT_GENERIC_INDEX,
.extensions = "yuv,cif,qcif,rgb",
- .raw_codec_id = CODEC_ID_RAWVIDEO,
+ .raw_codec_id = AV_CODEC_ID_RAWVIDEO,
.priv_class = &rawvideo_demuxer_class,
};
diff --git a/libavformat/rdt.c b/libavformat/rdt.c
index d2437ee73f..24d901cc9b 100644
--- a/libavformat/rdt.c
+++ b/libavformat/rdt.c
@@ -309,7 +309,7 @@ rdt_parse_packet (AVFormatContext *ctx, PayloadContext *rdt, AVStream *st,
if (res < 0)
return res;
if (res > 0) {
- if (st->codec->codec_id == CODEC_ID_AAC) {
+ if (st->codec->codec_id == AV_CODEC_ID_AAC) {
memcpy (rdt->buffer, buf + pos, len - pos);
rdt->rmctx->pb = avio_alloc_context (rdt->buffer, len - pos, 0,
NULL, NULL, NULL, NULL);
@@ -322,7 +322,7 @@ get_cache:
ff_rm_retrieve_cache (rdt->rmctx, rdt->rmctx->pb,
st, rdt->rmst[st->index], pkt);
if (rdt->audio_pkt_cnt == 0 &&
- st->codec->codec_id == CODEC_ID_AAC)
+ st->codec->codec_id == AV_CODEC_ID_AAC)
av_freep(&rdt->rmctx->pb);
}
pkt->stream_index = st->index;
@@ -551,7 +551,7 @@ rdt_free_context (PayloadContext *rdt)
static RTPDynamicProtocolHandler ff_rdt_ ## n ## _handler = { \
.enc_name = s, \
.codec_type = t, \
- .codec_id = CODEC_ID_NONE, \
+ .codec_id = AV_CODEC_ID_NONE, \
.parse_sdp_a_line = rdt_parse_sdp_line, \
.alloc = rdt_new_context, \
.free = rdt_free_context, \
diff --git a/libavformat/realtextdec.c b/libavformat/realtextdec.c
index 88a7fdd0db..cc7c1841b5 100644
--- a/libavformat/realtextdec.c
+++ b/libavformat/realtextdec.c
@@ -68,7 +68,7 @@ static int realtext_read_header(AVFormatContext *s)
return AVERROR(ENOMEM);
avpriv_set_pts_info(st, 64, 1, 100);
st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;
- st->codec->codec_id = CODEC_ID_REALTEXT;
+ st->codec->codec_id = AV_CODEC_ID_REALTEXT;
av_bprint_init(&buf, 0, AV_BPRINT_SIZE_UNLIMITED);
diff --git a/libavformat/riff.c b/libavformat/riff.c
index bf14c45d5c..73e6aa59be 100644
--- a/libavformat/riff.c
+++ b/libavformat/riff.c
@@ -30,363 +30,363 @@
/* Note: when encoding, the first matching tag is used, so order is
important if multiple tags possible for a given codec. */
const AVCodecTag ff_codec_bmp_tags[] = {
- { CODEC_ID_H264, MKTAG('H', '2', '6', '4') },
- { CODEC_ID_H264, MKTAG('h', '2', '6', '4') },
- { CODEC_ID_H264, MKTAG('X', '2', '6', '4') },
- { CODEC_ID_H264, MKTAG('x', '2', '6', '4') },
- { CODEC_ID_H264, MKTAG('a', 'v', 'c', '1') },
- { CODEC_ID_H264, MKTAG('D', 'A', 'V', 'C') },
- { CODEC_ID_H264, MKTAG('V', 'S', 'S', 'H') },
- { CODEC_ID_H264, MKTAG('Q', '2', '6', '4') }, /* QNAP surveillance system */
- { CODEC_ID_H263, MKTAG('H', '2', '6', '3') },
- { CODEC_ID_H263, MKTAG('X', '2', '6', '3') },
- { CODEC_ID_H263, MKTAG('T', '2', '6', '3') },
- { CODEC_ID_H263, MKTAG('L', '2', '6', '3') },
- { CODEC_ID_H263, MKTAG('V', 'X', '1', 'K') },
- { CODEC_ID_H263, MKTAG('Z', 'y', 'G', 'o') },
- { CODEC_ID_H263, MKTAG('M', '2', '6', '3') },
- { CODEC_ID_H263P, MKTAG('H', '2', '6', '3') },
- { CODEC_ID_H263I, MKTAG('I', '2', '6', '3') }, /* intel h263 */
- { CODEC_ID_H261, MKTAG('H', '2', '6', '1') },
- { CODEC_ID_H263, MKTAG('U', '2', '6', '3') },
- { CODEC_ID_MPEG4, MKTAG('F', 'M', 'P', '4') },
- { CODEC_ID_MPEG4, MKTAG('D', 'I', 'V', 'X') },
- { CODEC_ID_MPEG4, MKTAG('D', 'X', '5', '0') },
- { CODEC_ID_MPEG4, MKTAG('X', 'V', 'I', 'D') },
- { CODEC_ID_MPEG4, MKTAG('M', 'P', '4', 'S') },
- { CODEC_ID_MPEG4, MKTAG('M', '4', 'S', '2') },
- { CODEC_ID_MPEG4, MKTAG( 4 , 0 , 0 , 0 ) }, /* some broken avi use this */
- { CODEC_ID_MPEG4, MKTAG('D', 'I', 'V', '1') },
- { CODEC_ID_MPEG4, MKTAG('B', 'L', 'Z', '0') },
- { CODEC_ID_MPEG4, MKTAG('m', 'p', '4', 'v') },
- { CODEC_ID_MPEG4, MKTAG('U', 'M', 'P', '4') },
- { CODEC_ID_MPEG4, MKTAG('W', 'V', '1', 'F') },
- { CODEC_ID_MPEG4, MKTAG('S', 'E', 'D', 'G') },
- { CODEC_ID_MPEG4, MKTAG('R', 'M', 'P', '4') },
- { CODEC_ID_MPEG4, MKTAG('3', 'I', 'V', '2') },
- { CODEC_ID_MPEG4, MKTAG('W', 'A', 'W', 'V') }, /* WaWv MPEG-4 Video Codec */
- { CODEC_ID_MPEG4, MKTAG('F', 'F', 'D', 'S') },
- { CODEC_ID_MPEG4, MKTAG('F', 'V', 'F', 'W') },
- { CODEC_ID_MPEG4, MKTAG('D', 'C', 'O', 'D') },
- { CODEC_ID_MPEG4, MKTAG('M', 'V', 'X', 'M') },
- { CODEC_ID_MPEG4, MKTAG('P', 'M', '4', 'V') },
- { CODEC_ID_MPEG4, MKTAG('S', 'M', 'P', '4') },
- { CODEC_ID_MPEG4, MKTAG('D', 'X', 'G', 'M') },
- { CODEC_ID_MPEG4, MKTAG('V', 'I', 'D', 'M') },
- { CODEC_ID_MPEG4, MKTAG('M', '4', 'T', '3') },
- { CODEC_ID_MPEG4, MKTAG('G', 'E', 'O', 'X') },
- { CODEC_ID_MPEG4, MKTAG('H', 'D', 'X', '4') }, /* flipped video */
- { CODEC_ID_MPEG4, MKTAG('D', 'M', 'K', '2') },
- { CODEC_ID_MPEG4, MKTAG('D', 'I', 'G', 'I') },
- { CODEC_ID_MPEG4, MKTAG('I', 'N', 'M', 'C') },
- { CODEC_ID_MPEG4, MKTAG('E', 'P', 'H', 'V') }, /* Ephv MPEG-4 */
- { CODEC_ID_MPEG4, MKTAG('E', 'M', '4', 'A') },
- { CODEC_ID_MPEG4, MKTAG('M', '4', 'C', 'C') }, /* Divio MPEG-4 */
- { CODEC_ID_MPEG4, MKTAG('S', 'N', '4', '0') },
- { CODEC_ID_MPEG4, MKTAG('V', 'S', 'P', 'X') },
- { CODEC_ID_MPEG4, MKTAG('U', 'L', 'D', 'X') },
- { CODEC_ID_MPEG4, MKTAG('G', 'E', 'O', 'V') },
- { CODEC_ID_MPEG4, MKTAG('S', 'I', 'P', 'P') }, /* Samsung SHR-6040 */
- { CODEC_ID_MPEG4, MKTAG('S', 'M', '4', 'V') },
- { CODEC_ID_MPEG4, MKTAG('X', 'V', 'I', 'X') },
- { CODEC_ID_MPEG4, MKTAG('D', 'r', 'e', 'X') },
- { CODEC_ID_MPEG4, MKTAG('Q', 'M', 'P', '4') }, /* QNAP Systems */
- { CODEC_ID_MPEG4, MKTAG('P', 'L', 'V', '1') }, /* Pelco DVR MPEG-4 */
- { CODEC_ID_MSMPEG4V3, MKTAG('M', 'P', '4', '3') },
- { CODEC_ID_MSMPEG4V3, MKTAG('D', 'I', 'V', '3') },
- { CODEC_ID_MSMPEG4V3, MKTAG('M', 'P', 'G', '3') },
- { CODEC_ID_MSMPEG4V3, MKTAG('D', 'I', 'V', '5') },
- { CODEC_ID_MSMPEG4V3, MKTAG('D', 'I', 'V', '6') },
- { CODEC_ID_MSMPEG4V3, MKTAG('D', 'I', 'V', '4') },
- { CODEC_ID_MSMPEG4V3, MKTAG('D', 'V', 'X', '3') },
- { CODEC_ID_MSMPEG4V3, MKTAG('A', 'P', '4', '1') },
- { CODEC_ID_MSMPEG4V3, MKTAG('C', 'O', 'L', '1') },
- { CODEC_ID_MSMPEG4V3, MKTAG('C', 'O', 'L', '0') },
- { CODEC_ID_MSMPEG4V2, MKTAG('M', 'P', '4', '2') },
- { CODEC_ID_MSMPEG4V2, MKTAG('D', 'I', 'V', '2') },
- { CODEC_ID_MSMPEG4V1, MKTAG('M', 'P', 'G', '4') },
- { CODEC_ID_MSMPEG4V1, MKTAG('M', 'P', '4', '1') },
- { CODEC_ID_WMV1, MKTAG('W', 'M', 'V', '1') },
- { CODEC_ID_WMV2, MKTAG('W', 'M', 'V', '2') },
- { CODEC_ID_DVVIDEO, MKTAG('d', 'v', 's', 'd') },
- { CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'h', 'd') },
- { CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'h', '1') },
- { CODEC_ID_DVVIDEO, MKTAG('d', 'v', 's', 'l') },
- { CODEC_ID_DVVIDEO, MKTAG('d', 'v', '2', '5') },
- { CODEC_ID_DVVIDEO, MKTAG('d', 'v', '5', '0') },
- { CODEC_ID_DVVIDEO, MKTAG('c', 'd', 'v', 'c') }, /* Canopus DV */
- { CODEC_ID_DVVIDEO, MKTAG('C', 'D', 'V', 'H') }, /* Canopus DV */
- { CODEC_ID_DVVIDEO, MKTAG('C', 'D', 'V', '5') }, /* Canopus DV */
- { CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'c', ' ') },
- { CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'c', 's') },
- { CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'h', '1') },
- { CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'i', 's') },
- { CODEC_ID_DVVIDEO, MKTAG('p', 'd', 'v', 'c') },
- { CODEC_ID_DVVIDEO, MKTAG('S', 'L', '2', '5') },
- { CODEC_ID_DVVIDEO, MKTAG('S', 'L', 'D', 'V') },
- { CODEC_ID_MPEG1VIDEO, MKTAG('m', 'p', 'g', '1') },
- { CODEC_ID_MPEG1VIDEO, MKTAG('m', 'p', 'g', '2') },
- { CODEC_ID_MPEG2VIDEO, MKTAG('m', 'p', 'g', '2') },
- { CODEC_ID_MPEG2VIDEO, MKTAG('M', 'P', 'E', 'G') },
- { CODEC_ID_MPEG1VIDEO, MKTAG('P', 'I', 'M', '1') },
- { CODEC_ID_MPEG2VIDEO, MKTAG('P', 'I', 'M', '2') },
- { CODEC_ID_MPEG1VIDEO, MKTAG('V', 'C', 'R', '2') },
- { CODEC_ID_MPEG1VIDEO, MKTAG( 1 , 0 , 0 , 16) },
- { CODEC_ID_MPEG2VIDEO, MKTAG( 2 , 0 , 0 , 16) },
- { CODEC_ID_MPEG4, MKTAG( 4 , 0 , 0 , 16) },
- { CODEC_ID_MPEG2VIDEO, MKTAG('D', 'V', 'R', ' ') },
- { CODEC_ID_MPEG2VIDEO, MKTAG('M', 'M', 'E', 'S') },
- { CODEC_ID_MPEG2VIDEO, MKTAG('L', 'M', 'P', '2') }, /* Lead MPEG2 in avi */
- { CODEC_ID_MPEG2VIDEO, MKTAG('s', 'l', 'i', 'f') },
- { CODEC_ID_MPEG2VIDEO, MKTAG('E', 'M', '2', 'V') },
- { CODEC_ID_MPEG2VIDEO, MKTAG('M', '7', '0', '1') }, /* Matrox MPEG2 intra-only */
- { CODEC_ID_MPEG2VIDEO, MKTAG('m', 'p', 'g', 'v') },
- { CODEC_ID_MPEG1VIDEO, MKTAG('B', 'W', '1', '0') },
- { CODEC_ID_MPEG1VIDEO, MKTAG('X', 'M', 'P', 'G') }, /* Xing MPEG intra only */
- { CODEC_ID_MJPEG, MKTAG('M', 'J', 'P', 'G') },
- { CODEC_ID_MJPEG, MKTAG('L', 'J', 'P', 'G') },
- { CODEC_ID_MJPEG, MKTAG('d', 'm', 'b', '1') },
- { CODEC_ID_MJPEG, MKTAG('m', 'j', 'p', 'a') },
- { CODEC_ID_LJPEG, MKTAG('L', 'J', 'P', 'G') },
- { CODEC_ID_MJPEG, MKTAG('J', 'P', 'G', 'L') }, /* Pegasus lossless JPEG */
- { CODEC_ID_JPEGLS, MKTAG('M', 'J', 'L', 'S') }, /* JPEG-LS custom FOURCC for avi - encoder */
- { CODEC_ID_JPEGLS, MKTAG('M', 'J', 'P', 'G') },
- { CODEC_ID_MJPEG, MKTAG('M', 'J', 'L', 'S') }, /* JPEG-LS custom FOURCC for avi - decoder */
- { CODEC_ID_MJPEG, MKTAG('j', 'p', 'e', 'g') },
- { CODEC_ID_MJPEG, MKTAG('I', 'J', 'P', 'G') },
- { CODEC_ID_MJPEG, MKTAG('A', 'V', 'R', 'n') },
- { CODEC_ID_MJPEG, MKTAG('A', 'C', 'D', 'V') },
- { CODEC_ID_MJPEG, MKTAG('Q', 'I', 'V', 'G') },
- { CODEC_ID_MJPEG, MKTAG('S', 'L', 'M', 'J') }, /* SL M-JPEG */
- { CODEC_ID_MJPEG, MKTAG('C', 'J', 'P', 'G') }, /* Creative Webcam JPEG */
- { CODEC_ID_MJPEG, MKTAG('I', 'J', 'L', 'V') }, /* Intel JPEG Library Video Codec */
- { CODEC_ID_MJPEG, MKTAG('M', 'V', 'J', 'P') }, /* Midvid JPEG Video Codec */
- { CODEC_ID_MJPEG, MKTAG('A', 'V', 'I', '1') },
- { CODEC_ID_MJPEG, MKTAG('A', 'V', 'I', '2') },
- { CODEC_ID_MJPEG, MKTAG('M', 'T', 'S', 'J') },
- { CODEC_ID_MJPEG, MKTAG('Z', 'J', 'P', 'G') }, /* Paradigm Matrix M-JPEG Codec */
- { CODEC_ID_MJPEG, MKTAG('M', 'M', 'J', 'P') },
- { CODEC_ID_HUFFYUV, MKTAG('H', 'F', 'Y', 'U') },
- { CODEC_ID_FFVHUFF, MKTAG('F', 'F', 'V', 'H') },
- { CODEC_ID_CYUV, MKTAG('C', 'Y', 'U', 'V') },
- { CODEC_ID_RAWVIDEO, MKTAG( 0 , 0 , 0 , 0 ) },
- { CODEC_ID_RAWVIDEO, MKTAG( 3 , 0 , 0 , 0 ) },
- { CODEC_ID_RAWVIDEO, MKTAG('I', '4', '2', '0') },
- { CODEC_ID_RAWVIDEO, MKTAG('Y', 'U', 'Y', '2') },
- { CODEC_ID_RAWVIDEO, MKTAG('Y', '4', '2', '2') },
- { CODEC_ID_RAWVIDEO, MKTAG('V', '4', '2', '2') },
- { CODEC_ID_RAWVIDEO, MKTAG('Y', 'U', 'N', 'V') },
- { CODEC_ID_RAWVIDEO, MKTAG('U', 'Y', 'N', 'V') },
- { CODEC_ID_RAWVIDEO, MKTAG('U', 'Y', 'N', 'Y') },
- { CODEC_ID_RAWVIDEO, MKTAG('u', 'y', 'v', '1') },
- { CODEC_ID_RAWVIDEO, MKTAG('2', 'V', 'u', '1') },
- { CODEC_ID_RAWVIDEO, MKTAG('2', 'v', 'u', 'y') },
- { CODEC_ID_RAWVIDEO, MKTAG('y', 'u', 'v', 's') },
- { CODEC_ID_RAWVIDEO, MKTAG('y', 'u', 'v', '2') },
- { CODEC_ID_RAWVIDEO, MKTAG('P', '4', '2', '2') },
- { CODEC_ID_RAWVIDEO, MKTAG('Y', 'V', '1', '2') },
- { CODEC_ID_RAWVIDEO, MKTAG('Y', 'V', '1', '6') },
- { CODEC_ID_RAWVIDEO, MKTAG('Y', 'V', '2', '4') },
- { CODEC_ID_RAWVIDEO, MKTAG('U', 'Y', 'V', 'Y') },
- { CODEC_ID_RAWVIDEO, MKTAG('V', 'Y', 'U', 'Y') },
- { CODEC_ID_RAWVIDEO, MKTAG('I', 'Y', 'U', 'V') },
- { CODEC_ID_RAWVIDEO, MKTAG('Y', '8', '0', '0') },
- { CODEC_ID_RAWVIDEO, MKTAG('Y', '8', ' ', ' ') },
- { CODEC_ID_RAWVIDEO, MKTAG('H', 'D', 'Y', 'C') },
- { CODEC_ID_RAWVIDEO, MKTAG('Y', 'V', 'U', '9') },
- { CODEC_ID_RAWVIDEO, MKTAG('V', 'D', 'T', 'Z') }, /* SoftLab-NSK VideoTizer */
- { CODEC_ID_RAWVIDEO, MKTAG('Y', '4', '1', '1') },
- { CODEC_ID_RAWVIDEO, MKTAG('N', 'V', '1', '2') },
- { CODEC_ID_RAWVIDEO, MKTAG('N', 'V', '2', '1') },
- { CODEC_ID_RAWVIDEO, MKTAG('Y', '4', '1', 'B') },
- { CODEC_ID_RAWVIDEO, MKTAG('Y', '4', '2', 'B') },
- { CODEC_ID_RAWVIDEO, MKTAG('Y', 'U', 'V', '9') },
- { CODEC_ID_RAWVIDEO, MKTAG('Y', 'V', 'U', '9') },
- { CODEC_ID_RAWVIDEO, MKTAG('a', 'u', 'v', '2') },
- { CODEC_ID_RAWVIDEO, MKTAG('Y', 'V', 'Y', 'U') },
- { CODEC_ID_FRWU, MKTAG('F', 'R', 'W', 'U') },
- { CODEC_ID_R10K, MKTAG('R', '1', '0', 'k') },
- { CODEC_ID_R210, MKTAG('r', '2', '1', '0') },
- { CODEC_ID_V210, MKTAG('v', '2', '1', '0') },
- { CODEC_ID_V308, MKTAG('v', '3', '0', '8') },
- { CODEC_ID_V408, MKTAG('v', '4', '0', '8') },
- { CODEC_ID_AYUV, MKTAG('A', 'Y', 'U', 'V') },
- { CODEC_ID_V410, MKTAG('v', '4', '1', '0') },
- { CODEC_ID_YUV4, MKTAG('y', 'u', 'v', '4') },
- { CODEC_ID_INDEO3, MKTAG('I', 'V', '3', '1') },
- { CODEC_ID_INDEO3, MKTAG('I', 'V', '3', '2') },
- { CODEC_ID_INDEO4, MKTAG('I', 'V', '4', '1') },
- { CODEC_ID_INDEO5, MKTAG('I', 'V', '5', '0') },
- { CODEC_ID_VP3, MKTAG('V', 'P', '3', '1') },
- { CODEC_ID_VP3, MKTAG('V', 'P', '3', '0') },
- { CODEC_ID_VP5, MKTAG('V', 'P', '5', '0') },
- { CODEC_ID_VP6, MKTAG('V', 'P', '6', '0') },
- { CODEC_ID_VP6, MKTAG('V', 'P', '6', '1') },
- { CODEC_ID_VP6, MKTAG('V', 'P', '6', '2') },
- { CODEC_ID_VP6F, MKTAG('V', 'P', '6', 'F') },
- { CODEC_ID_VP6F, MKTAG('F', 'L', 'V', '4') },
- { CODEC_ID_VP8, MKTAG('V', 'P', '8', '0') },
- { CODEC_ID_ASV1, MKTAG('A', 'S', 'V', '1') },
- { CODEC_ID_ASV2, MKTAG('A', 'S', 'V', '2') },
- { CODEC_ID_VCR1, MKTAG('V', 'C', 'R', '1') },
- { CODEC_ID_FFV1, MKTAG('F', 'F', 'V', '1') },
- { CODEC_ID_XAN_WC4, MKTAG('X', 'x', 'a', 'n') },
- { CODEC_ID_MIMIC, MKTAG('L', 'M', '2', '0') },
- { CODEC_ID_MSRLE, MKTAG('m', 'r', 'l', 'e') },
- { CODEC_ID_MSRLE, MKTAG( 1 , 0 , 0 , 0 ) },
- { CODEC_ID_MSRLE, MKTAG( 2 , 0 , 0 , 0 ) },
- { CODEC_ID_MSVIDEO1, MKTAG('M', 'S', 'V', 'C') },
- { CODEC_ID_MSVIDEO1, MKTAG('m', 's', 'v', 'c') },
- { CODEC_ID_MSVIDEO1, MKTAG('C', 'R', 'A', 'M') },
- { CODEC_ID_MSVIDEO1, MKTAG('c', 'r', 'a', 'm') },
- { CODEC_ID_MSVIDEO1, MKTAG('W', 'H', 'A', 'M') },
- { CODEC_ID_MSVIDEO1, MKTAG('w', 'h', 'a', 'm') },
- { CODEC_ID_CINEPAK, MKTAG('c', 'v', 'i', 'd') },
- { CODEC_ID_TRUEMOTION1, MKTAG('D', 'U', 'C', 'K') },
- { CODEC_ID_TRUEMOTION1, MKTAG('P', 'V', 'E', 'Z') },
- { CODEC_ID_MSZH, MKTAG('M', 'S', 'Z', 'H') },
- { CODEC_ID_ZLIB, MKTAG('Z', 'L', 'I', 'B') },
- { CODEC_ID_SNOW, MKTAG('S', 'N', 'O', 'W') },
- { CODEC_ID_4XM, MKTAG('4', 'X', 'M', 'V') },
- { CODEC_ID_FLV1, MKTAG('F', 'L', 'V', '1') },
- { CODEC_ID_FLV1, MKTAG('S', '2', '6', '3') },
- { CODEC_ID_FLASHSV, MKTAG('F', 'S', 'V', '1') },
- { CODEC_ID_SVQ1, MKTAG('s', 'v', 'q', '1') },
- { CODEC_ID_TSCC, MKTAG('t', 's', 'c', 'c') },
- { CODEC_ID_ULTI, MKTAG('U', 'L', 'T', 'I') },
- { CODEC_ID_VIXL, MKTAG('V', 'I', 'X', 'L') },
- { CODEC_ID_QPEG, MKTAG('Q', 'P', 'E', 'G') },
- { CODEC_ID_QPEG, MKTAG('Q', '1', '.', '0') },
- { CODEC_ID_QPEG, MKTAG('Q', '1', '.', '1') },
- { CODEC_ID_WMV3, MKTAG('W', 'M', 'V', '3') },
- { CODEC_ID_WMV3IMAGE, MKTAG('W', 'M', 'V', 'P') },
- { CODEC_ID_VC1, MKTAG('W', 'V', 'C', '1') },
- { CODEC_ID_VC1, MKTAG('W', 'M', 'V', 'A') },
- { CODEC_ID_VC1IMAGE, MKTAG('W', 'V', 'P', '2') },
- { CODEC_ID_LOCO, MKTAG('L', 'O', 'C', 'O') },
- { CODEC_ID_WNV1, MKTAG('W', 'N', 'V', '1') },
- { CODEC_ID_WNV1, MKTAG('Y', 'U', 'V', '8') },
- { CODEC_ID_AASC, MKTAG('A', 'A', 'S', '4') },
- { CODEC_ID_AASC, MKTAG('A', 'A', 'S', 'C') },
- { CODEC_ID_INDEO2, MKTAG('R', 'T', '2', '1') },
- { CODEC_ID_FRAPS, MKTAG('F', 'P', 'S', '1') },
- { CODEC_ID_THEORA, MKTAG('t', 'h', 'e', 'o') },
- { CODEC_ID_TRUEMOTION2, MKTAG('T', 'M', '2', '0') },
- { CODEC_ID_CSCD, MKTAG('C', 'S', 'C', 'D') },
- { CODEC_ID_ZMBV, MKTAG('Z', 'M', 'B', 'V') },
- { CODEC_ID_KMVC, MKTAG('K', 'M', 'V', 'C') },
- { CODEC_ID_CAVS, MKTAG('C', 'A', 'V', 'S') },
- { CODEC_ID_JPEG2000, MKTAG('m', 'j', 'p', '2') },
- { CODEC_ID_JPEG2000, MKTAG('M', 'J', '2', 'C') },
- { CODEC_ID_JPEG2000, MKTAG('L', 'J', '2', 'C') },
- { CODEC_ID_JPEG2000, MKTAG('L', 'J', '2', 'K') },
- { CODEC_ID_JPEG2000, MKTAG('I', 'P', 'J', '2') },
- { CODEC_ID_VMNC, MKTAG('V', 'M', 'n', 'c') },
- { CODEC_ID_TARGA, MKTAG('t', 'g', 'a', ' ') },
- { CODEC_ID_PNG, MKTAG('M', 'P', 'N', 'G') },
- { CODEC_ID_PNG, MKTAG('P', 'N', 'G', '1') },
- { CODEC_ID_CLJR, MKTAG('C', 'L', 'J', 'R') },
- { CODEC_ID_DIRAC, MKTAG('d', 'r', 'a', 'c') },
- { CODEC_ID_RPZA, MKTAG('a', 'z', 'p', 'r') },
- { CODEC_ID_RPZA, MKTAG('R', 'P', 'Z', 'A') },
- { CODEC_ID_RPZA, MKTAG('r', 'p', 'z', 'a') },
- { CODEC_ID_SP5X, MKTAG('S', 'P', '5', '4') },
- { CODEC_ID_AURA, MKTAG('A', 'U', 'R', 'A') },
- { CODEC_ID_AURA2, MKTAG('A', 'U', 'R', '2') },
- { CODEC_ID_DPX, MKTAG('d', 'p', 'x', ' ') },
- { CODEC_ID_KGV1, MKTAG('K', 'G', 'V', '1') },
- { CODEC_ID_LAGARITH, MKTAG('L', 'A', 'G', 'S') },
- { CODEC_ID_G2M, MKTAG('G', '2', 'M', '2') },
- { CODEC_ID_G2M, MKTAG('G', '2', 'M', '3') },
- { CODEC_ID_G2M, MKTAG('G', '2', 'M', '4') },
- { CODEC_ID_AMV, MKTAG('A', 'M', 'V', 'F') },
- { CODEC_ID_UTVIDEO, MKTAG('U', 'L', 'R', 'A') },
- { CODEC_ID_UTVIDEO, MKTAG('U', 'L', 'R', 'G') },
- { CODEC_ID_UTVIDEO, MKTAG('U', 'L', 'Y', '0') },
- { CODEC_ID_UTVIDEO, MKTAG('U', 'L', 'Y', '2') },
- { CODEC_ID_VBLE, MKTAG('V', 'B', 'L', 'E') },
- { CODEC_ID_ESCAPE130, MKTAG('E', '1', '3', '0') },
- { CODEC_ID_DXTORY, MKTAG('x', 't', 'o', 'r') },
- { CODEC_ID_ZEROCODEC, MKTAG('Z', 'E', 'C', 'O') },
- { CODEC_ID_Y41P, MKTAG('Y', '4', '1', 'P') },
- { CODEC_ID_FLIC, MKTAG('A', 'F', 'L', 'C') },
- { CODEC_ID_EXR, MKTAG('e', 'x', 'r', ' ') },
- { CODEC_ID_MSS1, MKTAG('M', 'S', 'S', '1') },
- { CODEC_ID_MSA1, MKTAG('M', 'S', 'A', '1') },
- { CODEC_ID_TSCC2, MKTAG('T', 'S', 'C', '2') },
- { CODEC_ID_MTS2, MKTAG('M', 'T', 'S', '2') },
- { CODEC_ID_CLLC, MKTAG('C', 'L', 'L', 'C') },
- { CODEC_ID_NONE, 0 }
+ { AV_CODEC_ID_H264, MKTAG('H', '2', '6', '4') },
+ { AV_CODEC_ID_H264, MKTAG('h', '2', '6', '4') },
+ { AV_CODEC_ID_H264, MKTAG('X', '2', '6', '4') },
+ { AV_CODEC_ID_H264, MKTAG('x', '2', '6', '4') },
+ { AV_CODEC_ID_H264, MKTAG('a', 'v', 'c', '1') },
+ { AV_CODEC_ID_H264, MKTAG('D', 'A', 'V', 'C') },
+ { AV_CODEC_ID_H264, MKTAG('V', 'S', 'S', 'H') },
+ { AV_CODEC_ID_H264, MKTAG('Q', '2', '6', '4') }, /* QNAP surveillance system */
+ { AV_CODEC_ID_H263, MKTAG('H', '2', '6', '3') },
+ { AV_CODEC_ID_H263, MKTAG('X', '2', '6', '3') },
+ { AV_CODEC_ID_H263, MKTAG('T', '2', '6', '3') },
+ { AV_CODEC_ID_H263, MKTAG('L', '2', '6', '3') },
+ { AV_CODEC_ID_H263, MKTAG('V', 'X', '1', 'K') },
+ { AV_CODEC_ID_H263, MKTAG('Z', 'y', 'G', 'o') },
+ { AV_CODEC_ID_H263, MKTAG('M', '2', '6', '3') },
+ { AV_CODEC_ID_H263P, MKTAG('H', '2', '6', '3') },
+ { AV_CODEC_ID_H263I, MKTAG('I', '2', '6', '3') }, /* intel h263 */
+ { AV_CODEC_ID_H261, MKTAG('H', '2', '6', '1') },
+ { AV_CODEC_ID_H263, MKTAG('U', '2', '6', '3') },
+ { AV_CODEC_ID_MPEG4, MKTAG('F', 'M', 'P', '4') },
+ { AV_CODEC_ID_MPEG4, MKTAG('D', 'I', 'V', 'X') },
+ { AV_CODEC_ID_MPEG4, MKTAG('D', 'X', '5', '0') },
+ { AV_CODEC_ID_MPEG4, MKTAG('X', 'V', 'I', 'D') },
+ { AV_CODEC_ID_MPEG4, MKTAG('M', 'P', '4', 'S') },
+ { AV_CODEC_ID_MPEG4, MKTAG('M', '4', 'S', '2') },
+ { AV_CODEC_ID_MPEG4, MKTAG( 4 , 0 , 0 , 0 ) }, /* some broken avi use this */
+ { AV_CODEC_ID_MPEG4, MKTAG('D', 'I', 'V', '1') },
+ { AV_CODEC_ID_MPEG4, MKTAG('B', 'L', 'Z', '0') },
+ { AV_CODEC_ID_MPEG4, MKTAG('m', 'p', '4', 'v') },
+ { AV_CODEC_ID_MPEG4, MKTAG('U', 'M', 'P', '4') },
+ { AV_CODEC_ID_MPEG4, MKTAG('W', 'V', '1', 'F') },
+ { AV_CODEC_ID_MPEG4, MKTAG('S', 'E', 'D', 'G') },
+ { AV_CODEC_ID_MPEG4, MKTAG('R', 'M', 'P', '4') },
+ { AV_CODEC_ID_MPEG4, MKTAG('3', 'I', 'V', '2') },
+ { AV_CODEC_ID_MPEG4, MKTAG('W', 'A', 'W', 'V') }, /* WaWv MPEG-4 Video Codec */
+ { AV_CODEC_ID_MPEG4, MKTAG('F', 'F', 'D', 'S') },
+ { AV_CODEC_ID_MPEG4, MKTAG('F', 'V', 'F', 'W') },
+ { AV_CODEC_ID_MPEG4, MKTAG('D', 'C', 'O', 'D') },
+ { AV_CODEC_ID_MPEG4, MKTAG('M', 'V', 'X', 'M') },
+ { AV_CODEC_ID_MPEG4, MKTAG('P', 'M', '4', 'V') },
+ { AV_CODEC_ID_MPEG4, MKTAG('S', 'M', 'P', '4') },
+ { AV_CODEC_ID_MPEG4, MKTAG('D', 'X', 'G', 'M') },
+ { AV_CODEC_ID_MPEG4, MKTAG('V', 'I', 'D', 'M') },
+ { AV_CODEC_ID_MPEG4, MKTAG('M', '4', 'T', '3') },
+ { AV_CODEC_ID_MPEG4, MKTAG('G', 'E', 'O', 'X') },
+ { AV_CODEC_ID_MPEG4, MKTAG('H', 'D', 'X', '4') }, /* flipped video */
+ { AV_CODEC_ID_MPEG4, MKTAG('D', 'M', 'K', '2') },
+ { AV_CODEC_ID_MPEG4, MKTAG('D', 'I', 'G', 'I') },
+ { AV_CODEC_ID_MPEG4, MKTAG('I', 'N', 'M', 'C') },
+ { AV_CODEC_ID_MPEG4, MKTAG('E', 'P', 'H', 'V') }, /* Ephv MPEG-4 */
+ { AV_CODEC_ID_MPEG4, MKTAG('E', 'M', '4', 'A') },
+ { AV_CODEC_ID_MPEG4, MKTAG('M', '4', 'C', 'C') }, /* Divio MPEG-4 */
+ { AV_CODEC_ID_MPEG4, MKTAG('S', 'N', '4', '0') },
+ { AV_CODEC_ID_MPEG4, MKTAG('V', 'S', 'P', 'X') },
+ { AV_CODEC_ID_MPEG4, MKTAG('U', 'L', 'D', 'X') },
+ { AV_CODEC_ID_MPEG4, MKTAG('G', 'E', 'O', 'V') },
+ { AV_CODEC_ID_MPEG4, MKTAG('S', 'I', 'P', 'P') }, /* Samsung SHR-6040 */
+ { AV_CODEC_ID_MPEG4, MKTAG('S', 'M', '4', 'V') },
+ { AV_CODEC_ID_MPEG4, MKTAG('X', 'V', 'I', 'X') },
+ { AV_CODEC_ID_MPEG4, MKTAG('D', 'r', 'e', 'X') },
+ { AV_CODEC_ID_MPEG4, MKTAG('Q', 'M', 'P', '4') }, /* QNAP Systems */
+ { AV_CODEC_ID_MPEG4, MKTAG('P', 'L', 'V', '1') }, /* Pelco DVR MPEG-4 */
+ { AV_CODEC_ID_MSMPEG4V3, MKTAG('M', 'P', '4', '3') },
+ { AV_CODEC_ID_MSMPEG4V3, MKTAG('D', 'I', 'V', '3') },
+ { AV_CODEC_ID_MSMPEG4V3, MKTAG('M', 'P', 'G', '3') },
+ { AV_CODEC_ID_MSMPEG4V3, MKTAG('D', 'I', 'V', '5') },
+ { AV_CODEC_ID_MSMPEG4V3, MKTAG('D', 'I', 'V', '6') },
+ { AV_CODEC_ID_MSMPEG4V3, MKTAG('D', 'I', 'V', '4') },
+ { AV_CODEC_ID_MSMPEG4V3, MKTAG('D', 'V', 'X', '3') },
+ { AV_CODEC_ID_MSMPEG4V3, MKTAG('A', 'P', '4', '1') },
+ { AV_CODEC_ID_MSMPEG4V3, MKTAG('C', 'O', 'L', '1') },
+ { AV_CODEC_ID_MSMPEG4V3, MKTAG('C', 'O', 'L', '0') },
+ { AV_CODEC_ID_MSMPEG4V2, MKTAG('M', 'P', '4', '2') },
+ { AV_CODEC_ID_MSMPEG4V2, MKTAG('D', 'I', 'V', '2') },
+ { AV_CODEC_ID_MSMPEG4V1, MKTAG('M', 'P', 'G', '4') },
+ { AV_CODEC_ID_MSMPEG4V1, MKTAG('M', 'P', '4', '1') },
+ { AV_CODEC_ID_WMV1, MKTAG('W', 'M', 'V', '1') },
+ { AV_CODEC_ID_WMV2, MKTAG('W', 'M', 'V', '2') },
+ { AV_CODEC_ID_DVVIDEO, MKTAG('d', 'v', 's', 'd') },
+ { AV_CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'h', 'd') },
+ { AV_CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'h', '1') },
+ { AV_CODEC_ID_DVVIDEO, MKTAG('d', 'v', 's', 'l') },
+ { AV_CODEC_ID_DVVIDEO, MKTAG('d', 'v', '2', '5') },
+ { AV_CODEC_ID_DVVIDEO, MKTAG('d', 'v', '5', '0') },
+ { AV_CODEC_ID_DVVIDEO, MKTAG('c', 'd', 'v', 'c') }, /* Canopus DV */
+ { AV_CODEC_ID_DVVIDEO, MKTAG('C', 'D', 'V', 'H') }, /* Canopus DV */
+ { AV_CODEC_ID_DVVIDEO, MKTAG('C', 'D', 'V', '5') }, /* Canopus DV */
+ { AV_CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'c', ' ') },
+ { AV_CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'c', 's') },
+ { AV_CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'h', '1') },
+ { AV_CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'i', 's') },
+ { AV_CODEC_ID_DVVIDEO, MKTAG('p', 'd', 'v', 'c') },
+ { AV_CODEC_ID_DVVIDEO, MKTAG('S', 'L', '2', '5') },
+ { AV_CODEC_ID_DVVIDEO, MKTAG('S', 'L', 'D', 'V') },
+ { AV_CODEC_ID_MPEG1VIDEO, MKTAG('m', 'p', 'g', '1') },
+ { AV_CODEC_ID_MPEG1VIDEO, MKTAG('m', 'p', 'g', '2') },
+ { AV_CODEC_ID_MPEG2VIDEO, MKTAG('m', 'p', 'g', '2') },
+ { AV_CODEC_ID_MPEG2VIDEO, MKTAG('M', 'P', 'E', 'G') },
+ { AV_CODEC_ID_MPEG1VIDEO, MKTAG('P', 'I', 'M', '1') },
+ { AV_CODEC_ID_MPEG2VIDEO, MKTAG('P', 'I', 'M', '2') },
+ { AV_CODEC_ID_MPEG1VIDEO, MKTAG('V', 'C', 'R', '2') },
+ { AV_CODEC_ID_MPEG1VIDEO, MKTAG( 1 , 0 , 0 , 16) },
+ { AV_CODEC_ID_MPEG2VIDEO, MKTAG( 2 , 0 , 0 , 16) },
+ { AV_CODEC_ID_MPEG4, MKTAG( 4 , 0 , 0 , 16) },
+ { AV_CODEC_ID_MPEG2VIDEO, MKTAG('D', 'V', 'R', ' ') },
+ { AV_CODEC_ID_MPEG2VIDEO, MKTAG('M', 'M', 'E', 'S') },
+ { AV_CODEC_ID_MPEG2VIDEO, MKTAG('L', 'M', 'P', '2') }, /* Lead MPEG2 in avi */
+ { AV_CODEC_ID_MPEG2VIDEO, MKTAG('s', 'l', 'i', 'f') },
+ { AV_CODEC_ID_MPEG2VIDEO, MKTAG('E', 'M', '2', 'V') },
+ { AV_CODEC_ID_MPEG2VIDEO, MKTAG('M', '7', '0', '1') }, /* Matrox MPEG2 intra-only */
+ { AV_CODEC_ID_MPEG2VIDEO, MKTAG('m', 'p', 'g', 'v') },
+ { AV_CODEC_ID_MPEG1VIDEO, MKTAG('B', 'W', '1', '0') },
+ { AV_CODEC_ID_MPEG1VIDEO, MKTAG('X', 'M', 'P', 'G') }, /* Xing MPEG intra only */
+ { AV_CODEC_ID_MJPEG, MKTAG('M', 'J', 'P', 'G') },
+ { AV_CODEC_ID_MJPEG, MKTAG('L', 'J', 'P', 'G') },
+ { AV_CODEC_ID_MJPEG, MKTAG('d', 'm', 'b', '1') },
+ { AV_CODEC_ID_MJPEG, MKTAG('m', 'j', 'p', 'a') },
+ { AV_CODEC_ID_LJPEG, MKTAG('L', 'J', 'P', 'G') },
+ { AV_CODEC_ID_MJPEG, MKTAG('J', 'P', 'G', 'L') }, /* Pegasus lossless JPEG */
+ { AV_CODEC_ID_JPEGLS, MKTAG('M', 'J', 'L', 'S') }, /* JPEG-LS custom FOURCC for avi - encoder */
+ { AV_CODEC_ID_JPEGLS, MKTAG('M', 'J', 'P', 'G') },
+ { AV_CODEC_ID_MJPEG, MKTAG('M', 'J', 'L', 'S') }, /* JPEG-LS custom FOURCC for avi - decoder */
+ { AV_CODEC_ID_MJPEG, MKTAG('j', 'p', 'e', 'g') },
+ { AV_CODEC_ID_MJPEG, MKTAG('I', 'J', 'P', 'G') },
+ { AV_CODEC_ID_MJPEG, MKTAG('A', 'V', 'R', 'n') },
+ { AV_CODEC_ID_MJPEG, MKTAG('A', 'C', 'D', 'V') },
+ { AV_CODEC_ID_MJPEG, MKTAG('Q', 'I', 'V', 'G') },
+ { AV_CODEC_ID_MJPEG, MKTAG('S', 'L', 'M', 'J') }, /* SL M-JPEG */
+ { AV_CODEC_ID_MJPEG, MKTAG('C', 'J', 'P', 'G') }, /* Creative Webcam JPEG */
+ { AV_CODEC_ID_MJPEG, MKTAG('I', 'J', 'L', 'V') }, /* Intel JPEG Library Video Codec */
+ { AV_CODEC_ID_MJPEG, MKTAG('M', 'V', 'J', 'P') }, /* Midvid JPEG Video Codec */
+ { AV_CODEC_ID_MJPEG, MKTAG('A', 'V', 'I', '1') },
+ { AV_CODEC_ID_MJPEG, MKTAG('A', 'V', 'I', '2') },
+ { AV_CODEC_ID_MJPEG, MKTAG('M', 'T', 'S', 'J') },
+ { AV_CODEC_ID_MJPEG, MKTAG('Z', 'J', 'P', 'G') }, /* Paradigm Matrix M-JPEG Codec */
+ { AV_CODEC_ID_MJPEG, MKTAG('M', 'M', 'J', 'P') },
+ { AV_CODEC_ID_HUFFYUV, MKTAG('H', 'F', 'Y', 'U') },
+ { AV_CODEC_ID_FFVHUFF, MKTAG('F', 'F', 'V', 'H') },
+ { AV_CODEC_ID_CYUV, MKTAG('C', 'Y', 'U', 'V') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG( 0 , 0 , 0 , 0 ) },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG( 3 , 0 , 0 , 0 ) },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('I', '4', '2', '0') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', 'U', 'Y', '2') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '4', '2', '2') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('V', '4', '2', '2') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', 'U', 'N', 'V') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('U', 'Y', 'N', 'V') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('U', 'Y', 'N', 'Y') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('u', 'y', 'v', '1') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('2', 'V', 'u', '1') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('2', 'v', 'u', 'y') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('y', 'u', 'v', 's') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('y', 'u', 'v', '2') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('P', '4', '2', '2') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', 'V', '1', '2') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', 'V', '1', '6') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', 'V', '2', '4') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('U', 'Y', 'V', 'Y') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('V', 'Y', 'U', 'Y') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('I', 'Y', 'U', 'V') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '8', '0', '0') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '8', ' ', ' ') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('H', 'D', 'Y', 'C') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', 'V', 'U', '9') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('V', 'D', 'T', 'Z') }, /* SoftLab-NSK VideoTizer */
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '4', '1', '1') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('N', 'V', '1', '2') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('N', 'V', '2', '1') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '4', '1', 'B') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', '4', '2', 'B') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', 'U', 'V', '9') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', 'V', 'U', '9') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('a', 'u', 'v', '2') },
+ { AV_CODEC_ID_RAWVIDEO, MKTAG('Y', 'V', 'Y', 'U') },
+ { AV_CODEC_ID_FRWU, MKTAG('F', 'R', 'W', 'U') },
+ { AV_CODEC_ID_R10K, MKTAG('R', '1', '0', 'k') },
+ { AV_CODEC_ID_R210, MKTAG('r', '2', '1', '0') },
+ { AV_CODEC_ID_V210, MKTAG('v', '2', '1', '0') },
+ { AV_CODEC_ID_V308, MKTAG('v', '3', '0', '8') },
+ { AV_CODEC_ID_V408, MKTAG('v', '4', '0', '8') },
+ { AV_CODEC_ID_AYUV, MKTAG('A', 'Y', 'U', 'V') },
+ { AV_CODEC_ID_V410, MKTAG('v', '4', '1', '0') },
+ { AV_CODEC_ID_YUV4, MKTAG('y', 'u', 'v', '4') },
+ { AV_CODEC_ID_INDEO3, MKTAG('I', 'V', '3', '1') },
+ { AV_CODEC_ID_INDEO3, MKTAG('I', 'V', '3', '2') },
+ { AV_CODEC_ID_INDEO4, MKTAG('I', 'V', '4', '1') },
+ { AV_CODEC_ID_INDEO5, MKTAG('I', 'V', '5', '0') },
+ { AV_CODEC_ID_VP3, MKTAG('V', 'P', '3', '1') },
+ { AV_CODEC_ID_VP3, MKTAG('V', 'P', '3', '0') },
+ { AV_CODEC_ID_VP5, MKTAG('V', 'P', '5', '0') },
+ { AV_CODEC_ID_VP6, MKTAG('V', 'P', '6', '0') },
+ { AV_CODEC_ID_VP6, MKTAG('V', 'P', '6', '1') },
+ { AV_CODEC_ID_VP6, MKTAG('V', 'P', '6', '2') },
+ { AV_CODEC_ID_VP6F, MKTAG('V', 'P', '6', 'F') },
+ { AV_CODEC_ID_VP6F, MKTAG('F', 'L', 'V', '4') },
+ { AV_CODEC_ID_VP8, MKTAG('V', 'P', '8', '0') },
+ { AV_CODEC_ID_ASV1, MKTAG('A', 'S', 'V', '1') },
+ { AV_CODEC_ID_ASV2, MKTAG('A', 'S', 'V', '2') },
+ { AV_CODEC_ID_VCR1, MKTAG('V', 'C', 'R', '1') },
+ { AV_CODEC_ID_FFV1, MKTAG('F', 'F', 'V', '1') },
+ { AV_CODEC_ID_XAN_WC4, MKTAG('X', 'x', 'a', 'n') },
+ { AV_CODEC_ID_MIMIC, MKTAG('L', 'M', '2', '0') },
+ { AV_CODEC_ID_MSRLE, MKTAG('m', 'r', 'l', 'e') },
+ { AV_CODEC_ID_MSRLE, MKTAG( 1 , 0 , 0 , 0 ) },
+ { AV_CODEC_ID_MSRLE, MKTAG( 2 , 0 , 0 , 0 ) },
+ { AV_CODEC_ID_MSVIDEO1, MKTAG('M', 'S', 'V', 'C') },
+ { AV_CODEC_ID_MSVIDEO1, MKTAG('m', 's', 'v', 'c') },
+ { AV_CODEC_ID_MSVIDEO1, MKTAG('C', 'R', 'A', 'M') },
+ { AV_CODEC_ID_MSVIDEO1, MKTAG('c', 'r', 'a', 'm') },
+ { AV_CODEC_ID_MSVIDEO1, MKTAG('W', 'H', 'A', 'M') },
+ { AV_CODEC_ID_MSVIDEO1, MKTAG('w', 'h', 'a', 'm') },
+ { AV_CODEC_ID_CINEPAK, MKTAG('c', 'v', 'i', 'd') },
+ { AV_CODEC_ID_TRUEMOTION1, MKTAG('D', 'U', 'C', 'K') },
+ { AV_CODEC_ID_TRUEMOTION1, MKTAG('P', 'V', 'E', 'Z') },
+ { AV_CODEC_ID_MSZH, MKTAG('M', 'S', 'Z', 'H') },
+ { AV_CODEC_ID_ZLIB, MKTAG('Z', 'L', 'I', 'B') },
+ { AV_CODEC_ID_SNOW, MKTAG('S', 'N', 'O', 'W') },
+ { AV_CODEC_ID_4XM, MKTAG('4', 'X', 'M', 'V') },
+ { AV_CODEC_ID_FLV1, MKTAG('F', 'L', 'V', '1') },
+ { AV_CODEC_ID_FLV1, MKTAG('S', '2', '6', '3') },
+ { AV_CODEC_ID_FLASHSV, MKTAG('F', 'S', 'V', '1') },
+ { AV_CODEC_ID_SVQ1, MKTAG('s', 'v', 'q', '1') },
+ { AV_CODEC_ID_TSCC, MKTAG('t', 's', 'c', 'c') },
+ { AV_CODEC_ID_ULTI, MKTAG('U', 'L', 'T', 'I') },
+ { AV_CODEC_ID_VIXL, MKTAG('V', 'I', 'X', 'L') },
+ { AV_CODEC_ID_QPEG, MKTAG('Q', 'P', 'E', 'G') },
+ { AV_CODEC_ID_QPEG, MKTAG('Q', '1', '.', '0') },
+ { AV_CODEC_ID_QPEG, MKTAG('Q', '1', '.', '1') },
+ { AV_CODEC_ID_WMV3, MKTAG('W', 'M', 'V', '3') },
+ { AV_CODEC_ID_WMV3IMAGE, MKTAG('W', 'M', 'V', 'P') },
+ { AV_CODEC_ID_VC1, MKTAG('W', 'V', 'C', '1') },
+ { AV_CODEC_ID_VC1, MKTAG('W', 'M', 'V', 'A') },
+ { AV_CODEC_ID_VC1IMAGE, MKTAG('W', 'V', 'P', '2') },
+ { AV_CODEC_ID_LOCO, MKTAG('L', 'O', 'C', 'O') },
+ { AV_CODEC_ID_WNV1, MKTAG('W', 'N', 'V', '1') },
+ { AV_CODEC_ID_WNV1, MKTAG('Y', 'U', 'V', '8') },
+ { AV_CODEC_ID_AASC, MKTAG('A', 'A', 'S', '4') },
+ { AV_CODEC_ID_AASC, MKTAG('A', 'A', 'S', 'C') },
+ { AV_CODEC_ID_INDEO2, MKTAG('R', 'T', '2', '1') },
+ { AV_CODEC_ID_FRAPS, MKTAG('F', 'P', 'S', '1') },
+ { AV_CODEC_ID_THEORA, MKTAG('t', 'h', 'e', 'o') },
+ { AV_CODEC_ID_TRUEMOTION2, MKTAG('T', 'M', '2', '0') },
+ { AV_CODEC_ID_CSCD, MKTAG('C', 'S', 'C', 'D') },
+ { AV_CODEC_ID_ZMBV, MKTAG('Z', 'M', 'B', 'V') },
+ { AV_CODEC_ID_KMVC, MKTAG('K', 'M', 'V', 'C') },
+ { AV_CODEC_ID_CAVS, MKTAG('C', 'A', 'V', 'S') },
+ { AV_CODEC_ID_JPEG2000, MKTAG('m', 'j', 'p', '2') },
+ { AV_CODEC_ID_JPEG2000, MKTAG('M', 'J', '2', 'C') },
+ { AV_CODEC_ID_JPEG2000, MKTAG('L', 'J', '2', 'C') },
+ { AV_CODEC_ID_JPEG2000, MKTAG('L', 'J', '2', 'K') },
+ { AV_CODEC_ID_JPEG2000, MKTAG('I', 'P', 'J', '2') },
+ { AV_CODEC_ID_VMNC, MKTAG('V', 'M', 'n', 'c') },
+ { AV_CODEC_ID_TARGA, MKTAG('t', 'g', 'a', ' ') },
+ { AV_CODEC_ID_PNG, MKTAG('M', 'P', 'N', 'G') },
+ { AV_CODEC_ID_PNG, MKTAG('P', 'N', 'G', '1') },
+ { AV_CODEC_ID_CLJR, MKTAG('C', 'L', 'J', 'R') },
+ { AV_CODEC_ID_DIRAC, MKTAG('d', 'r', 'a', 'c') },
+ { AV_CODEC_ID_RPZA, MKTAG('a', 'z', 'p', 'r') },
+ { AV_CODEC_ID_RPZA, MKTAG('R', 'P', 'Z', 'A') },
+ { AV_CODEC_ID_RPZA, MKTAG('r', 'p', 'z', 'a') },
+ { AV_CODEC_ID_SP5X, MKTAG('S', 'P', '5', '4') },
+ { AV_CODEC_ID_AURA, MKTAG('A', 'U', 'R', 'A') },
+ { AV_CODEC_ID_AURA2, MKTAG('A', 'U', 'R', '2') },
+ { AV_CODEC_ID_DPX, MKTAG('d', 'p', 'x', ' ') },
+ { AV_CODEC_ID_KGV1, MKTAG('K', 'G', 'V', '1') },
+ { AV_CODEC_ID_LAGARITH, MKTAG('L', 'A', 'G', 'S') },
+ { AV_CODEC_ID_G2M, MKTAG('G', '2', 'M', '2') },
+ { AV_CODEC_ID_G2M, MKTAG('G', '2', 'M', '3') },
+ { AV_CODEC_ID_G2M, MKTAG('G', '2', 'M', '4') },
+ { AV_CODEC_ID_AMV, MKTAG('A', 'M', 'V', 'F') },
+ { AV_CODEC_ID_UTVIDEO, MKTAG('U', 'L', 'R', 'A') },
+ { AV_CODEC_ID_UTVIDEO, MKTAG('U', 'L', 'R', 'G') },
+ { AV_CODEC_ID_UTVIDEO, MKTAG('U', 'L', 'Y', '0') },
+ { AV_CODEC_ID_UTVIDEO, MKTAG('U', 'L', 'Y', '2') },
+ { AV_CODEC_ID_VBLE, MKTAG('V', 'B', 'L', 'E') },
+ { AV_CODEC_ID_ESCAPE130, MKTAG('E', '1', '3', '0') },
+ { AV_CODEC_ID_DXTORY, MKTAG('x', 't', 'o', 'r') },
+ { AV_CODEC_ID_ZEROCODEC, MKTAG('Z', 'E', 'C', 'O') },
+ { AV_CODEC_ID_Y41P, MKTAG('Y', '4', '1', 'P') },
+ { AV_CODEC_ID_FLIC, MKTAG('A', 'F', 'L', 'C') },
+ { AV_CODEC_ID_EXR, MKTAG('e', 'x', 'r', ' ') },
+ { AV_CODEC_ID_MSS1, MKTAG('M', 'S', 'S', '1') },
+ { AV_CODEC_ID_MSA1, MKTAG('M', 'S', 'A', '1') },
+ { AV_CODEC_ID_TSCC2, MKTAG('T', 'S', 'C', '2') },
+ { AV_CODEC_ID_MTS2, MKTAG('M', 'T', 'S', '2') },
+ { AV_CODEC_ID_CLLC, MKTAG('C', 'L', 'L', 'C') },
+ { AV_CODEC_ID_NONE, 0 }
};
const AVCodecTag ff_codec_wav_tags[] = {
- { CODEC_ID_PCM_S16LE, 0x0001 },
- { CODEC_ID_PCM_U8, 0x0001 }, /* must come after s16le in this list */
- { CODEC_ID_PCM_S24LE, 0x0001 },
- { CODEC_ID_PCM_S32LE, 0x0001 },
- { CODEC_ID_ADPCM_MS, 0x0002 },
- { CODEC_ID_PCM_F32LE, 0x0003 },
- { CODEC_ID_PCM_F64LE, 0x0003 }, /* must come after f32le in this list */
- { CODEC_ID_PCM_ALAW, 0x0006 },
- { CODEC_ID_PCM_MULAW, 0x0007 },
- { CODEC_ID_WMAVOICE, 0x000A },
- { CODEC_ID_ADPCM_IMA_WAV, 0x0011 },
- { CODEC_ID_PCM_ZORK, 0x0011 }, /* must come after adpcm_ima_wav in this list */
- { CODEC_ID_ADPCM_YAMAHA, 0x0020 },
- { CODEC_ID_TRUESPEECH, 0x0022 },
- { CODEC_ID_GSM_MS, 0x0031 },
- { CODEC_ID_AMR_NB, 0x0038 }, /* rogue format number */
- { CODEC_ID_G723_1, 0x0042 },
- { CODEC_ID_ADPCM_G726, 0x0045 },
- { CODEC_ID_MP2, 0x0050 },
- { CODEC_ID_MP3, 0x0055 },
- { CODEC_ID_AMR_NB, 0x0057 },
- { CODEC_ID_AMR_WB, 0x0058 },
- { CODEC_ID_ADPCM_IMA_DK4, 0x0061 }, /* rogue format number */
- { CODEC_ID_ADPCM_IMA_DK3, 0x0062 }, /* rogue format number */
- { CODEC_ID_ADPCM_IMA_WAV, 0x0069 },
- { CODEC_ID_VOXWARE, 0x0075 },
- { CODEC_ID_AAC, 0x00ff },
- { CODEC_ID_SIPR, 0x0130 },
- { CODEC_ID_WMAV1, 0x0160 },
- { CODEC_ID_WMAV2, 0x0161 },
- { CODEC_ID_WMAPRO, 0x0162 },
- { CODEC_ID_WMALOSSLESS, 0x0163 },
- { CODEC_ID_ADPCM_CT, 0x0200 },
- { CODEC_ID_ATRAC3, 0x0270 },
- { CODEC_ID_ADPCM_G722, 0x028F },
- { CODEC_ID_IMC, 0x0401 },
- { CODEC_ID_IAC, 0x0402 },
- { CODEC_ID_GSM_MS, 0x1500 },
- { CODEC_ID_TRUESPEECH, 0x1501 },
- { CODEC_ID_AAC, 0x1600 }, /* ADTS AAC */
- { CODEC_ID_AAC_LATM, 0x1602 },
- { CODEC_ID_AC3, 0x2000 },
- { CODEC_ID_DTS, 0x2001 },
- { CODEC_ID_SONIC, 0x2048 },
- { CODEC_ID_SONIC_LS, 0x2048 },
- { CODEC_ID_PCM_MULAW, 0x6c75 },
- { CODEC_ID_AAC, 0x706d },
- { CODEC_ID_AAC, 0x4143 },
- { CODEC_ID_SPEEX, 0xA109 },
- { CODEC_ID_FLAC, 0xF1AC },
- { CODEC_ID_ADPCM_SWF, ('S'<<8)+'F' },
- { CODEC_ID_VORBIS, ('V'<<8)+'o' }, //HACK/FIXME, does vorbis in WAV/AVI have an (in)official id?
+ { AV_CODEC_ID_PCM_S16LE, 0x0001 },
+ { AV_CODEC_ID_PCM_U8, 0x0001 }, /* must come after s16le in this list */
+ { AV_CODEC_ID_PCM_S24LE, 0x0001 },
+ { AV_CODEC_ID_PCM_S32LE, 0x0001 },
+ { AV_CODEC_ID_ADPCM_MS, 0x0002 },
+ { AV_CODEC_ID_PCM_F32LE, 0x0003 },
+ { AV_CODEC_ID_PCM_F64LE, 0x0003 }, /* must come after f32le in this list */
+ { AV_CODEC_ID_PCM_ALAW, 0x0006 },
+ { AV_CODEC_ID_PCM_MULAW, 0x0007 },
+ { AV_CODEC_ID_WMAVOICE, 0x000A },
+ { AV_CODEC_ID_ADPCM_IMA_WAV, 0x0011 },
+ { AV_CODEC_ID_PCM_ZORK, 0x0011 }, /* must come after adpcm_ima_wav in this list */
+ { AV_CODEC_ID_ADPCM_YAMAHA, 0x0020 },
+ { AV_CODEC_ID_TRUESPEECH, 0x0022 },
+ { AV_CODEC_ID_GSM_MS, 0x0031 },
+ { AV_CODEC_ID_AMR_NB, 0x0038 }, /* rogue format number */
+ { AV_CODEC_ID_G723_1, 0x0042 },
+ { AV_CODEC_ID_ADPCM_G726, 0x0045 },
+ { AV_CODEC_ID_MP2, 0x0050 },
+ { AV_CODEC_ID_MP3, 0x0055 },
+ { AV_CODEC_ID_AMR_NB, 0x0057 },
+ { AV_CODEC_ID_AMR_WB, 0x0058 },
+ { AV_CODEC_ID_ADPCM_IMA_DK4, 0x0061 }, /* rogue format number */
+ { AV_CODEC_ID_ADPCM_IMA_DK3, 0x0062 }, /* rogue format number */
+ { AV_CODEC_ID_ADPCM_IMA_WAV, 0x0069 },
+ { AV_CODEC_ID_VOXWARE, 0x0075 },
+ { AV_CODEC_ID_AAC, 0x00ff },
+ { AV_CODEC_ID_SIPR, 0x0130 },
+ { AV_CODEC_ID_WMAV1, 0x0160 },
+ { AV_CODEC_ID_WMAV2, 0x0161 },
+ { AV_CODEC_ID_WMAPRO, 0x0162 },
+ { AV_CODEC_ID_WMALOSSLESS, 0x0163 },
+ { AV_CODEC_ID_ADPCM_CT, 0x0200 },
+ { AV_CODEC_ID_ATRAC3, 0x0270 },
+ { AV_CODEC_ID_ADPCM_G722, 0x028F },
+ { AV_CODEC_ID_IMC, 0x0401 },
+ { AV_CODEC_ID_IAC, 0x0402 },
+ { AV_CODEC_ID_GSM_MS, 0x1500 },
+ { AV_CODEC_ID_TRUESPEECH, 0x1501 },
+ { AV_CODEC_ID_AAC, 0x1600 }, /* ADTS AAC */
+ { AV_CODEC_ID_AAC_LATM, 0x1602 },
+ { AV_CODEC_ID_AC3, 0x2000 },
+ { AV_CODEC_ID_DTS, 0x2001 },
+ { AV_CODEC_ID_SONIC, 0x2048 },
+ { AV_CODEC_ID_SONIC_LS, 0x2048 },
+ { AV_CODEC_ID_PCM_MULAW, 0x6c75 },
+ { AV_CODEC_ID_AAC, 0x706d },
+ { AV_CODEC_ID_AAC, 0x4143 },
+ { AV_CODEC_ID_SPEEX, 0xA109 },
+ { AV_CODEC_ID_FLAC, 0xF1AC },
+ { AV_CODEC_ID_ADPCM_SWF, ('S'<<8)+'F' },
+ { AV_CODEC_ID_VORBIS, ('V'<<8)+'o' }, //HACK/FIXME, does vorbis in WAV/AVI have an (in)official id?
/* FIXME: All of the IDs below are not 16 bit and thus illegal. */
// for NuppelVideo (nuv.c)
- { CODEC_ID_PCM_S16LE, MKTAG('R', 'A', 'W', 'A') },
- { CODEC_ID_MP3, MKTAG('L', 'A', 'M', 'E') },
- { CODEC_ID_MP3, MKTAG('M', 'P', '3', ' ') },
- { CODEC_ID_NONE, 0 },
+ { AV_CODEC_ID_PCM_S16LE, MKTAG('R', 'A', 'W', 'A') },
+ { AV_CODEC_ID_MP3, MKTAG('L', 'A', 'M', 'E') },
+ { AV_CODEC_ID_MP3, MKTAG('M', 'P', '3', ' ') },
+ { AV_CODEC_ID_NONE, 0 },
};
const AVCodecGuid ff_codec_wav_guids[] = {
- {CODEC_ID_AC3, {0x2C,0x80,0x6D,0xE0,0x46,0xDB,0xCF,0x11,0xB4,0xD1,0x00,0x80,0x5F,0x6C,0xBB,0xEA}},
- {CODEC_ID_ATRAC3P, {0xBF,0xAA,0x23,0xE9,0x58,0xCB,0x71,0x44,0xA1,0x19,0xFF,0xFA,0x01,0xE4,0xCE,0x62}},
- {CODEC_ID_EAC3, {0xAF,0x87,0xFB,0xA7,0x02,0x2D,0xFB,0x42,0xA4,0xD4,0x05,0xCD,0x93,0x84,0x3B,0xDD}},
- {CODEC_ID_MP2, {0x2B,0x80,0x6D,0xE0,0x46,0xDB,0xCF,0x11,0xB4,0xD1,0x00,0x80,0x5F,0x6C,0xBB,0xEA}},
- {CODEC_ID_NONE}
+ {AV_CODEC_ID_AC3, {0x2C,0x80,0x6D,0xE0,0x46,0xDB,0xCF,0x11,0xB4,0xD1,0x00,0x80,0x5F,0x6C,0xBB,0xEA}},
+ {AV_CODEC_ID_ATRAC3P, {0xBF,0xAA,0x23,0xE9,0x58,0xCB,0x71,0x44,0xA1,0x19,0xFF,0xFA,0x01,0xE4,0xCE,0x62}},
+ {AV_CODEC_ID_EAC3, {0xAF,0x87,0xFB,0xA7,0x02,0x2D,0xFB,0x42,0xA4,0xD4,0x05,0xCD,0x93,0x84,0x3B,0xDD}},
+ {AV_CODEC_ID_MP2, {0x2B,0x80,0x6D,0xE0,0x46,0xDB,0xCF,0x11,0xB4,0xD1,0x00,0x80,0x5F,0x6C,0xBB,0xEA}},
+ {AV_CODEC_ID_NONE}
};
const AVMetadataConv ff_riff_info_conv[] = {
@@ -462,7 +462,7 @@ int ff_put_wav_header(AVIOContext *pb, AVCodecContext *enc)
}
avio_wl16(pb, enc->channels);
avio_wl32(pb, enc->sample_rate);
- if (enc->codec_id == CODEC_ID_MP2 || enc->codec_id == CODEC_ID_MP3 || enc->codec_id == CODEC_ID_GSM_MS || enc->codec_id == CODEC_ID_G723_1) {
+ if (enc->codec_id == AV_CODEC_ID_MP2 || enc->codec_id == AV_CODEC_ID_MP3 || enc->codec_id == AV_CODEC_ID_GSM_MS || enc->codec_id == AV_CODEC_ID_G723_1) {
bps = 0;
} else {
if (!(bps = av_get_bits_per_sample(enc->codec_id))) {
@@ -476,27 +476,27 @@ int ff_put_wav_header(AVIOContext *pb, AVCodecContext *enc)
av_log(enc, AV_LOG_WARNING, "requested bits_per_coded_sample (%d) and actually stored (%d) differ\n", enc->bits_per_coded_sample, bps);
}
- if (enc->codec_id == CODEC_ID_MP2 || enc->codec_id == CODEC_ID_MP3) {
+ if (enc->codec_id == AV_CODEC_ID_MP2 || enc->codec_id == AV_CODEC_ID_MP3) {
/* this is wrong, but it seems many demuxers do not work if this is set
correctly */
blkalign = frame_size;
//blkalign = 144 * enc->bit_rate/enc->sample_rate;
- } else if (enc->codec_id == CODEC_ID_AC3) {
+ } else if (enc->codec_id == AV_CODEC_ID_AC3) {
blkalign = 3840; //maximum bytes per frame
- } else if (enc->codec_id == CODEC_ID_G723_1) {
+ } else if (enc->codec_id == AV_CODEC_ID_G723_1) {
blkalign = 24;
} else if (enc->block_align != 0) { /* specified by the codec */
blkalign = enc->block_align;
} else
blkalign = bps * enc->channels / av_gcd(8, bps);
- if (enc->codec_id == CODEC_ID_PCM_U8 ||
- enc->codec_id == CODEC_ID_PCM_S24LE ||
- enc->codec_id == CODEC_ID_PCM_S32LE ||
- enc->codec_id == CODEC_ID_PCM_F32LE ||
- enc->codec_id == CODEC_ID_PCM_F64LE ||
- enc->codec_id == CODEC_ID_PCM_S16LE) {
+ if (enc->codec_id == AV_CODEC_ID_PCM_U8 ||
+ enc->codec_id == AV_CODEC_ID_PCM_S24LE ||
+ enc->codec_id == AV_CODEC_ID_PCM_S32LE ||
+ enc->codec_id == AV_CODEC_ID_PCM_F32LE ||
+ enc->codec_id == AV_CODEC_ID_PCM_F64LE ||
+ enc->codec_id == AV_CODEC_ID_PCM_S16LE) {
bytespersec = enc->sample_rate * blkalign;
- } else if (enc->codec_id == CODEC_ID_G723_1) {
+ } else if (enc->codec_id == AV_CODEC_ID_G723_1) {
bytespersec = 800;
} else {
bytespersec = enc->bit_rate / 8;
@@ -504,14 +504,14 @@ int ff_put_wav_header(AVIOContext *pb, AVCodecContext *enc)
avio_wl32(pb, bytespersec); /* bytes per second */
avio_wl16(pb, blkalign); /* block align */
avio_wl16(pb, bps); /* bits per sample */
- if (enc->codec_id == CODEC_ID_MP3) {
+ if (enc->codec_id == AV_CODEC_ID_MP3) {
hdrsize += 12;
bytestream_put_le16(&riff_extradata, 1); /* wID */
bytestream_put_le32(&riff_extradata, 2); /* fdwFlags */
bytestream_put_le16(&riff_extradata, 1152); /* nBlockSize */
bytestream_put_le16(&riff_extradata, 1); /* nFramesPerBlock */
bytestream_put_le16(&riff_extradata, 1393); /* nCodecDelay */
- } else if (enc->codec_id == CODEC_ID_MP2) {
+ } else if (enc->codec_id == AV_CODEC_ID_MP2) {
hdrsize += 22;
bytestream_put_le16(&riff_extradata, 2); /* fwHeadLayer */
bytestream_put_le32(&riff_extradata, enc->bit_rate); /* dwHeadBitrate */
@@ -521,12 +521,12 @@ int ff_put_wav_header(AVIOContext *pb, AVCodecContext *enc)
bytestream_put_le16(&riff_extradata, 16); /* fwHeadFlags */
bytestream_put_le32(&riff_extradata, 0); /* dwPTSLow */
bytestream_put_le32(&riff_extradata, 0); /* dwPTSHigh */
- } else if (enc->codec_id == CODEC_ID_G723_1) {
+ } else if (enc->codec_id == AV_CODEC_ID_G723_1) {
hdrsize += 20;
bytestream_put_le32(&riff_extradata, 0x9ace0002); /* extradata needed for msacm g723.1 codec */
bytestream_put_le32(&riff_extradata, 0xaea2f732);
bytestream_put_le16(&riff_extradata, 0xacde);
- } else if (enc->codec_id == CODEC_ID_GSM_MS || enc->codec_id == CODEC_ID_ADPCM_IMA_WAV) {
+ } else if (enc->codec_id == AV_CODEC_ID_GSM_MS || enc->codec_id == AV_CODEC_ID_ADPCM_IMA_WAV) {
hdrsize += 2;
bytestream_put_le16(&riff_extradata, frame_size); /* wSamplesPerBlock */
} else if(enc->extradata_size){
@@ -644,36 +644,36 @@ int ff_get_wav_header(AVIOContext *pb, AVCodecContext *codec, int size)
if (size > 0)
avio_skip(pb, size);
}
- if (codec->codec_id == CODEC_ID_AAC_LATM) {
+ if (codec->codec_id == AV_CODEC_ID_AAC_LATM) {
/* channels and sample_rate values are those prior to applying SBR and/or PS */
codec->channels = 0;
codec->sample_rate = 0;
}
/* override bits_per_coded_sample for G.726 */
- if (codec->codec_id == CODEC_ID_ADPCM_G726)
+ if (codec->codec_id == AV_CODEC_ID_ADPCM_G726)
codec->bits_per_coded_sample = codec->bit_rate / codec->sample_rate;
return 0;
}
-enum CodecID ff_wav_codec_get_id(unsigned int tag, int bps)
+enum AVCodecID ff_wav_codec_get_id(unsigned int tag, int bps)
{
- enum CodecID id;
+ enum AVCodecID id;
id = ff_codec_get_id(ff_codec_wav_tags, tag);
if (id <= 0)
return id;
/* handle specific u8 codec */
- if (id == CODEC_ID_PCM_S16LE && bps == 8)
- id = CODEC_ID_PCM_U8;
- if (id == CODEC_ID_PCM_S16LE && bps == 24)
- id = CODEC_ID_PCM_S24LE;
- if (id == CODEC_ID_PCM_S16LE && bps == 32)
- id = CODEC_ID_PCM_S32LE;
- if (id == CODEC_ID_PCM_F32LE && bps == 64)
- id = CODEC_ID_PCM_F64LE;
- if (id == CODEC_ID_ADPCM_IMA_WAV && bps == 8)
- id = CODEC_ID_PCM_ZORK;
+ if (id == AV_CODEC_ID_PCM_S16LE && bps == 8)
+ id = AV_CODEC_ID_PCM_U8;
+ if (id == AV_CODEC_ID_PCM_S16LE && bps == 24)
+ id = AV_CODEC_ID_PCM_S24LE;
+ if (id == AV_CODEC_ID_PCM_S16LE && bps == 32)
+ id = AV_CODEC_ID_PCM_S32LE;
+ if (id == AV_CODEC_ID_PCM_F32LE && bps == 64)
+ id = AV_CODEC_ID_PCM_F64LE;
+ if (id == AV_CODEC_ID_ADPCM_IMA_WAV && bps == 8)
+ id = AV_CODEC_ID_PCM_ZORK;
return id;
}
@@ -736,11 +736,11 @@ void ff_get_guid(AVIOContext *s, ff_asf_guid *g)
enum CodecID ff_codec_guid_get_id(const AVCodecGuid *guids, ff_asf_guid guid)
{
int i;
- for (i = 0; guids[i].id != CODEC_ID_NONE; i++) {
+ for (i = 0; guids[i].id != AV_CODEC_ID_NONE; i++) {
if (!ff_guidcmp(guids[i].guid, guid))
return guids[i].id;
}
- return CODEC_ID_NONE;
+ return AV_CODEC_ID_NONE;
}
int ff_read_riff_info(AVFormatContext *s, int64_t size)
diff --git a/libavformat/riff.h b/libavformat/riff.h
index 78516df273..df94c225c6 100644
--- a/libavformat/riff.h
+++ b/libavformat/riff.h
@@ -48,14 +48,14 @@ int ff_get_bmp_header(AVIOContext *pb, AVStream *st, unsigned *esize);
void ff_put_bmp_header(AVIOContext *pb, AVCodecContext *enc, const AVCodecTag *tags, int for_asf);
int ff_put_wav_header(AVIOContext *pb, AVCodecContext *enc);
-enum CodecID ff_wav_codec_get_id(unsigned int tag, int bps);
+enum AVCodecID ff_wav_codec_get_id(unsigned int tag, int bps);
int ff_get_wav_header(AVIOContext *pb, AVCodecContext *codec, int size);
extern const AVCodecTag ff_codec_bmp_tags[];
extern const AVCodecTag ff_codec_wav_tags[];
-unsigned int ff_codec_get_tag(const AVCodecTag *tags, enum CodecID id);
-enum CodecID ff_codec_get_id(const AVCodecTag *tags, unsigned int tag);
+unsigned int ff_codec_get_tag(const AVCodecTag *tags, enum AVCodecID id);
+enum AVCodecID ff_codec_get_id(const AVCodecTag *tags, unsigned int tag);
void ff_parse_specific_params(AVCodecContext *stream, int *au_rate, int *au_ssize, int *au_scale);
typedef uint8_t ff_asf_guid[16];
diff --git a/libavformat/rl2.c b/libavformat/rl2.c
index e9c961b3f1..73d6b2767a 100644
--- a/libavformat/rl2.c
+++ b/libavformat/rl2.c
@@ -114,7 +114,7 @@ static av_cold int rl2_read_header(AVFormatContext *s)
return AVERROR(ENOMEM);
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- st->codec->codec_id = CODEC_ID_RL2;
+ st->codec->codec_id = AV_CODEC_ID_RL2;
st->codec->codec_tag = 0; /* no fourcc */
st->codec->width = 320;
st->codec->height = 200;
@@ -146,7 +146,7 @@ static av_cold int rl2_read_header(AVFormatContext *s)
if (!st)
return AVERROR(ENOMEM);
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- st->codec->codec_id = CODEC_ID_PCM_U8;
+ st->codec->codec_id = AV_CODEC_ID_PCM_U8;
st->codec->codec_tag = 1;
st->codec->channels = channels;
st->codec->bits_per_coded_sample = 8;
diff --git a/libavformat/rm.c b/libavformat/rm.c
index 769a83f134..0591a1735a 100644
--- a/libavformat/rm.c
+++ b/libavformat/rm.c
@@ -29,19 +29,19 @@ const char * const ff_rm_metadata[4] = {
};
const AVCodecTag ff_rm_codec_tags[] = {
- { CODEC_ID_RV10, MKTAG('R','V','1','0') },
- { CODEC_ID_RV20, MKTAG('R','V','2','0') },
- { CODEC_ID_RV20, MKTAG('R','V','T','R') },
- { CODEC_ID_RV30, MKTAG('R','V','3','0') },
- { CODEC_ID_RV40, MKTAG('R','V','4','0') },
- { CODEC_ID_AC3, MKTAG('d','n','e','t') },
- { CODEC_ID_RA_144, MKTAG('l','p','c','J') },
- { CODEC_ID_RA_288, MKTAG('2','8','_','8') },
- { CODEC_ID_COOK, MKTAG('c','o','o','k') },
- { CODEC_ID_ATRAC3, MKTAG('a','t','r','c') },
- { CODEC_ID_SIPR, MKTAG('s','i','p','r') },
- { CODEC_ID_AAC, MKTAG('r','a','a','c') },
- { CODEC_ID_AAC, MKTAG('r','a','c','p') },
- { CODEC_ID_RALF, MKTAG('L','S','D',':') },
- { CODEC_ID_NONE },
+ { AV_CODEC_ID_RV10, MKTAG('R','V','1','0') },
+ { AV_CODEC_ID_RV20, MKTAG('R','V','2','0') },
+ { AV_CODEC_ID_RV20, MKTAG('R','V','T','R') },
+ { AV_CODEC_ID_RV30, MKTAG('R','V','3','0') },
+ { AV_CODEC_ID_RV40, MKTAG('R','V','4','0') },
+ { AV_CODEC_ID_AC3, MKTAG('d','n','e','t') },
+ { AV_CODEC_ID_RA_144, MKTAG('l','p','c','J') },
+ { AV_CODEC_ID_RA_288, MKTAG('2','8','_','8') },
+ { AV_CODEC_ID_COOK, MKTAG('c','o','o','k') },
+ { AV_CODEC_ID_ATRAC3, MKTAG('a','t','r','c') },
+ { AV_CODEC_ID_SIPR, MKTAG('s','i','p','r') },
+ { AV_CODEC_ID_AAC, MKTAG('r','a','a','c') },
+ { AV_CODEC_ID_AAC, MKTAG('r','a','c','p') },
+ { AV_CODEC_ID_RALF, MKTAG('L','S','D',':') },
+ { AV_CODEC_ID_NONE },
};
diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c
index cce43319c1..03379a4f10 100644
--- a/libavformat/rmdec.c
+++ b/libavformat/rmdec.c
@@ -155,7 +155,7 @@ static int rm_read_audio_stream_info(AVFormatContext *s, AVIOContext *pb,
st->codec->sample_rate = 8000;
st->codec->channels = 1;
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- st->codec->codec_id = CODEC_ID_RA_144;
+ st->codec->codec_id = AV_CODEC_ID_RA_144;
ast->deint_id = DEINT_ID_INT0;
} else {
int flavor, sub_packet_h, coded_framesize, sub_packet_size;
@@ -196,18 +196,18 @@ static int rm_read_audio_stream_info(AVFormatContext *s, AVIOContext *pb,
st->codec->codec_tag);
switch (st->codec->codec_id) {
- case CODEC_ID_AC3:
+ case AV_CODEC_ID_AC3:
st->need_parsing = AVSTREAM_PARSE_FULL;
break;
- case CODEC_ID_RA_288:
+ case AV_CODEC_ID_RA_288:
st->codec->extradata_size= 0;
ast->audio_framesize = st->codec->block_align;
st->codec->block_align = coded_framesize;
break;
- case CODEC_ID_COOK:
+ case AV_CODEC_ID_COOK:
st->need_parsing = AVSTREAM_PARSE_HEADERS;
- case CODEC_ID_ATRAC3:
- case CODEC_ID_SIPR:
+ case AV_CODEC_ID_ATRAC3:
+ case AV_CODEC_ID_SIPR:
avio_rb16(pb); avio_r8(pb);
if (version == 5)
avio_r8(pb);
@@ -218,7 +218,7 @@ static int rm_read_audio_stream_info(AVFormatContext *s, AVIOContext *pb,
}
ast->audio_framesize = st->codec->block_align;
- if (st->codec->codec_id == CODEC_ID_SIPR) {
+ if (st->codec->codec_id == AV_CODEC_ID_SIPR) {
if (flavor > 3) {
av_log(s, AV_LOG_ERROR, "bad SIPR file flavor %d\n",
flavor);
@@ -236,7 +236,7 @@ static int rm_read_audio_stream_info(AVFormatContext *s, AVIOContext *pb,
return ret;
break;
- case CODEC_ID_AAC:
+ case AV_CODEC_ID_AAC:
avio_rb16(pb); avio_r8(pb);
if (version == 5)
avio_r8(pb);
@@ -332,7 +332,7 @@ ff_rm_read_mdpr_codecdata (AVFormatContext *s, AVIOContext *pb,
st->codec->codec_id = ff_codec_get_id(ff_rm_codec_tags,
st->codec->codec_tag);
// av_log(s, AV_LOG_DEBUG, "%X %X\n", st->codec->codec_tag, MKTAG('R', 'V', '2', '0'));
- if (st->codec->codec_id == CODEC_ID_NONE)
+ if (st->codec->codec_id == AV_CODEC_ID_NONE)
goto fail1;
st->codec->width = avio_rb16(pb);
st->codec->height = avio_rb16(pb);
@@ -714,7 +714,7 @@ rm_ac3_swap_bytes (AVStream *st, AVPacket *pkt)
uint8_t *ptr;
int j;
- if (st->codec->codec_id == CODEC_ID_AC3) {
+ if (st->codec->codec_id == AV_CODEC_ID_AC3) {
ptr = pkt->data;
for (j=0;j<pkt->size;j+=2) {
FFSWAP(int, ptr[0], ptr[1]);
@@ -821,7 +821,7 @@ ff_rm_parse_packet (AVFormatContext *s, AVIOContext *pb,
#if 0
if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
- if(st->codec->codec_id == CODEC_ID_RV20){
+ if(st->codec->codec_id == AV_CODEC_ID_RV20){
int seq= 128*(pkt->data[2]&0x7F) + (pkt->data[3]>>1);
av_log(s, AV_LOG_DEBUG, "%d %"PRId64" %d\n", *timestamp, *timestamp*512LL/25, seq);
diff --git a/libavformat/rmenc.c b/libavformat/rmenc.c
index 390b7f6215..6376322d5c 100644
--- a/libavformat/rmenc.c
+++ b/libavformat/rmenc.c
@@ -242,7 +242,7 @@ static int rv10_write_header(AVFormatContext *ctx,
/* video codec info */
avio_wb32(s,34); /* size */
ffio_wfourcc(s, "VIDO");
- if(stream->enc->codec_id == CODEC_ID_RV10)
+ if(stream->enc->codec_id == AV_CODEC_ID_RV10)
ffio_wfourcc(s,"RV10");
else
ffio_wfourcc(s,"RV20");
@@ -256,7 +256,7 @@ static int rv10_write_header(AVFormatContext *ctx,
/* Seems to be the codec version: only use basic H263. The next
versions seems to add a diffential DC coding as in
MPEG... nothing new under the sun */
- if(stream->enc->codec_id == CODEC_ID_RV10)
+ if(stream->enc->codec_id == AV_CODEC_ID_RV10)
avio_wb32(s,0x10000000);
else
avio_wb32(s,0x20103001);
@@ -364,7 +364,7 @@ static int rm_write_audio(AVFormatContext *s, const uint8_t *buf, int size, int
write_packet_header(s, stream, size, !!(flags & AV_PKT_FLAG_KEY));
- if (stream->enc->codec_id == CODEC_ID_AC3) {
+ if (stream->enc->codec_id == AV_CODEC_ID_AC3) {
/* for AC-3, the words seem to be reversed */
for(i=0;i<size;i+=2) {
buf1[i] = buf[i+1];
@@ -471,8 +471,8 @@ AVOutputFormat ff_rm_muxer = {
.mime_type = "application/vnd.rn-realmedia",
.extensions = "rm,ra",
.priv_data_size = sizeof(RMMuxContext),
- .audio_codec = CODEC_ID_AC3,
- .video_codec = CODEC_ID_RV10,
+ .audio_codec = AV_CODEC_ID_AC3,
+ .video_codec = AV_CODEC_ID_RV10,
.write_header = rm_write_header,
.write_packet = rm_write_packet,
.write_trailer = rm_write_trailer,
diff --git a/libavformat/rpl.c b/libavformat/rpl.c
index 96af67d521..b790597e33 100644
--- a/libavformat/rpl.c
+++ b/libavformat/rpl.c
@@ -156,22 +156,22 @@ static int rpl_read_header(AVFormatContext *s)
switch (vst->codec->codec_tag) {
#if 0
case 122:
- vst->codec->codec_id = CODEC_ID_ESCAPE122;
+ vst->codec->codec_id = AV_CODEC_ID_ESCAPE122;
break;
#endif
case 124:
- vst->codec->codec_id = CODEC_ID_ESCAPE124;
+ vst->codec->codec_id = AV_CODEC_ID_ESCAPE124;
// The header is wrong here, at least sometimes
vst->codec->bits_per_coded_sample = 16;
break;
case 130:
- vst->codec->codec_id = CODEC_ID_ESCAPE130;
+ vst->codec->codec_id = AV_CODEC_ID_ESCAPE130;
break;
default:
av_log(s, AV_LOG_WARNING,
"RPL video format %i not supported yet!\n",
vst->codec->codec_tag);
- vst->codec->codec_id = CODEC_ID_NONE;
+ vst->codec->codec_id = AV_CODEC_ID_NONE;
}
// Audio headers
@@ -197,12 +197,12 @@ static int rpl_read_header(AVFormatContext *s)
ast->codec->bits_per_coded_sample *
ast->codec->channels;
- ast->codec->codec_id = CODEC_ID_NONE;
+ ast->codec->codec_id = AV_CODEC_ID_NONE;
switch (audio_format) {
case 1:
if (ast->codec->bits_per_coded_sample == 16) {
// 16-bit audio is always signed
- ast->codec->codec_id = CODEC_ID_PCM_S16LE;
+ ast->codec->codec_id = AV_CODEC_ID_PCM_S16LE;
break;
}
// There are some other formats listed as legal per the spec;
@@ -212,15 +212,15 @@ static int rpl_read_header(AVFormatContext *s)
if (ast->codec->bits_per_coded_sample == 8) {
// The samples with this kind of audio that I have
// are all unsigned.
- ast->codec->codec_id = CODEC_ID_PCM_U8;
+ ast->codec->codec_id = AV_CODEC_ID_PCM_U8;
break;
} else if (ast->codec->bits_per_coded_sample == 4) {
- ast->codec->codec_id = CODEC_ID_ADPCM_IMA_EA_SEAD;
+ ast->codec->codec_id = AV_CODEC_ID_ADPCM_IMA_EA_SEAD;
break;
}
break;
}
- if (ast->codec->codec_id == CODEC_ID_NONE) {
+ if (ast->codec->codec_id == AV_CODEC_ID_NONE) {
av_log(s, AV_LOG_WARNING,
"RPL audio format %i not supported yet!\n",
audio_format);
diff --git a/libavformat/rso.c b/libavformat/rso.c
index 178fd3f224..7d88f0f5bc 100644
--- a/libavformat/rso.c
+++ b/libavformat/rso.c
@@ -24,7 +24,7 @@
#include "rso.h"
const AVCodecTag ff_codec_rso_tags[] = {
- { CODEC_ID_PCM_U8, 0x0100 },
- { CODEC_ID_ADPCM_IMA_WAV, 0x0101 },
- { CODEC_ID_NONE, 0 },
+ { AV_CODEC_ID_PCM_U8, 0x0100 },
+ { AV_CODEC_ID_ADPCM_IMA_WAV, 0x0101 },
+ { AV_CODEC_ID_NONE, 0 },
};
diff --git a/libavformat/rsodec.c b/libavformat/rsodec.c
index e07d5f5179..7a22217a63 100644
--- a/libavformat/rsodec.c
+++ b/libavformat/rsodec.c
@@ -32,7 +32,7 @@ static int rso_read_header(AVFormatContext *s)
AVIOContext *pb = s->pb;
int id, rate, bps;
unsigned int size;
- enum CodecID codec;
+ enum AVCodecID codec;
AVStream *st;
id = avio_rb16(pb);
@@ -42,7 +42,7 @@ static int rso_read_header(AVFormatContext *s)
codec = ff_codec_get_id(ff_codec_rso_tags, id);
- if (codec == CODEC_ID_ADPCM_IMA_WAV) {
+ if (codec == AV_CODEC_ID_ADPCM_IMA_WAV) {
av_log(s, AV_LOG_ERROR, "ADPCM in RSO not implemented\n");
return AVERROR_PATCHWELCOME;
}
diff --git a/libavformat/rsoenc.c b/libavformat/rsoenc.c
index 3d18c6022f..9f10fd72e9 100644
--- a/libavformat/rsoenc.c
+++ b/libavformat/rsoenc.c
@@ -49,7 +49,7 @@ static int rso_write_header(AVFormatContext *s)
return AVERROR_INVALIDDATA;
}
- if (enc->codec_id == CODEC_ID_ADPCM_IMA_WAV) {
+ if (enc->codec_id == AV_CODEC_ID_ADPCM_IMA_WAV) {
av_log(s, AV_LOG_ERROR, "ADPCM in RSO not implemented\n");
return AVERROR_PATCHWELCOME;
}
@@ -104,8 +104,8 @@ AVOutputFormat ff_rso_muxer = {
.name = "rso",
.long_name = NULL_IF_CONFIG_SMALL("Lego Mindstorms RSO"),
.extensions = "rso",
- .audio_codec = CODEC_ID_PCM_U8,
- .video_codec = CODEC_ID_NONE,
+ .audio_codec = AV_CODEC_ID_PCM_U8,
+ .video_codec = AV_CODEC_ID_NONE,
.write_header = rso_write_header,
.write_packet = rso_write_packet,
.write_trailer = rso_write_trailer,
diff --git a/libavformat/rtp.c b/libavformat/rtp.c
index 2a801625e9..f9e444746a 100644
--- a/libavformat/rtp.c
+++ b/libavformat/rtp.c
@@ -37,38 +37,38 @@ static const struct
int pt;
const char enc_name[6];
enum AVMediaType codec_type;
- enum CodecID codec_id;
+ enum AVCodecID codec_id;
int clock_rate;
int audio_channels;
} AVRtpPayloadTypes[]=
{
- {0, "PCMU", AVMEDIA_TYPE_AUDIO, CODEC_ID_PCM_MULAW, 8000, 1},
- {3, "GSM", AVMEDIA_TYPE_AUDIO, CODEC_ID_NONE, 8000, 1},
- {4, "G723", AVMEDIA_TYPE_AUDIO, CODEC_ID_G723_1, 8000, 1},
- {5, "DVI4", AVMEDIA_TYPE_AUDIO, CODEC_ID_NONE, 8000, 1},
- {6, "DVI4", AVMEDIA_TYPE_AUDIO, CODEC_ID_NONE, 16000, 1},
- {7, "LPC", AVMEDIA_TYPE_AUDIO, CODEC_ID_NONE, 8000, 1},
- {8, "PCMA", AVMEDIA_TYPE_AUDIO, CODEC_ID_PCM_ALAW, 8000, 1},
- {9, "G722", AVMEDIA_TYPE_AUDIO, CODEC_ID_ADPCM_G722, 8000, 1},
- {10, "L16", AVMEDIA_TYPE_AUDIO, CODEC_ID_PCM_S16BE, 44100, 2},
- {11, "L16", AVMEDIA_TYPE_AUDIO, CODEC_ID_PCM_S16BE, 44100, 1},
- {12, "QCELP", AVMEDIA_TYPE_AUDIO, CODEC_ID_QCELP, 8000, 1},
- {13, "CN", AVMEDIA_TYPE_AUDIO, CODEC_ID_NONE, 8000, 1},
- {14, "MPA", AVMEDIA_TYPE_AUDIO, CODEC_ID_MP2, -1, -1},
- {14, "MPA", AVMEDIA_TYPE_AUDIO, CODEC_ID_MP3, -1, -1},
- {15, "G728", AVMEDIA_TYPE_AUDIO, CODEC_ID_NONE, 8000, 1},
- {16, "DVI4", AVMEDIA_TYPE_AUDIO, CODEC_ID_NONE, 11025, 1},
- {17, "DVI4", AVMEDIA_TYPE_AUDIO, CODEC_ID_NONE, 22050, 1},
- {18, "G729", AVMEDIA_TYPE_AUDIO, CODEC_ID_NONE, 8000, 1},
- {25, "CelB", AVMEDIA_TYPE_VIDEO, CODEC_ID_NONE, 90000, -1},
- {26, "JPEG", AVMEDIA_TYPE_VIDEO, CODEC_ID_MJPEG, 90000, -1},
- {28, "nv", AVMEDIA_TYPE_VIDEO, CODEC_ID_NONE, 90000, -1},
- {31, "H261", AVMEDIA_TYPE_VIDEO, CODEC_ID_H261, 90000, -1},
- {32, "MPV", AVMEDIA_TYPE_VIDEO, CODEC_ID_MPEG1VIDEO, 90000, -1},
- {32, "MPV", AVMEDIA_TYPE_VIDEO, CODEC_ID_MPEG2VIDEO, 90000, -1},
- {33, "MP2T", AVMEDIA_TYPE_DATA, CODEC_ID_MPEG2TS, 90000, -1},
- {34, "H263", AVMEDIA_TYPE_VIDEO, CODEC_ID_H263, 90000, -1},
- {-1, "", AVMEDIA_TYPE_UNKNOWN, CODEC_ID_NONE, -1, -1}
+ {0, "PCMU", AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_PCM_MULAW, 8000, 1},
+ {3, "GSM", AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_NONE, 8000, 1},
+ {4, "G723", AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_G723_1, 8000, 1},
+ {5, "DVI4", AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_NONE, 8000, 1},
+ {6, "DVI4", AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_NONE, 16000, 1},
+ {7, "LPC", AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_NONE, 8000, 1},
+ {8, "PCMA", AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_PCM_ALAW, 8000, 1},
+ {9, "G722", AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_ADPCM_G722, 8000, 1},
+ {10, "L16", AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_PCM_S16BE, 44100, 2},
+ {11, "L16", AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_PCM_S16BE, 44100, 1},
+ {12, "QCELP", AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_QCELP, 8000, 1},
+ {13, "CN", AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_NONE, 8000, 1},
+ {14, "MPA", AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_MP2, -1, -1},
+ {14, "MPA", AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_MP3, -1, -1},
+ {15, "G728", AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_NONE, 8000, 1},
+ {16, "DVI4", AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_NONE, 11025, 1},
+ {17, "DVI4", AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_NONE, 22050, 1},
+ {18, "G729", AVMEDIA_TYPE_AUDIO, AV_CODEC_ID_NONE, 8000, 1},
+ {25, "CelB", AVMEDIA_TYPE_VIDEO, AV_CODEC_ID_NONE, 90000, -1},
+ {26, "JPEG", AVMEDIA_TYPE_VIDEO, AV_CODEC_ID_MJPEG, 90000, -1},
+ {28, "nv", AVMEDIA_TYPE_VIDEO, AV_CODEC_ID_NONE, 90000, -1},
+ {31, "H261", AVMEDIA_TYPE_VIDEO, AV_CODEC_ID_H261, 90000, -1},
+ {32, "MPV", AVMEDIA_TYPE_VIDEO, AV_CODEC_ID_MPEG1VIDEO, 90000, -1},
+ {32, "MPV", AVMEDIA_TYPE_VIDEO, AV_CODEC_ID_MPEG2VIDEO, 90000, -1},
+ {33, "MP2T", AVMEDIA_TYPE_DATA, AV_CODEC_ID_MPEG2TS, 90000, -1},
+ {34, "H263", AVMEDIA_TYPE_VIDEO, AV_CODEC_ID_H263, 90000, -1},
+ {-1, "", AVMEDIA_TYPE_UNKNOWN, AV_CODEC_ID_NONE, -1, -1}
};
int ff_rtp_get_codec_info(AVCodecContext *codec, int payload_type)
@@ -77,7 +77,7 @@ int ff_rtp_get_codec_info(AVCodecContext *codec, int payload_type)
for (i = 0; AVRtpPayloadTypes[i].pt >= 0; i++)
if (AVRtpPayloadTypes[i].pt == payload_type) {
- if (AVRtpPayloadTypes[i].codec_id != CODEC_ID_NONE) {
+ if (AVRtpPayloadTypes[i].codec_id != AV_CODEC_ID_NONE) {
codec->codec_type = AVRtpPayloadTypes[i].codec_type;
codec->codec_id = AVRtpPayloadTypes[i].codec_id;
if (AVRtpPayloadTypes[i].audio_channels > 0)
@@ -106,13 +106,13 @@ int ff_rtp_get_payload_type(AVFormatContext *fmt, AVCodecContext *codec)
/* static payload type */
for (i = 0; AVRtpPayloadTypes[i].pt >= 0; ++i)
if (AVRtpPayloadTypes[i].codec_id == codec->codec_id) {
- if (codec->codec_id == CODEC_ID_H263 && (!fmt ||
+ if (codec->codec_id == AV_CODEC_ID_H263 && (!fmt ||
!fmt->oformat->priv_class ||
!av_opt_flag_is_set(fmt->priv_data, "rtpflags", "rfc2190")))
continue;
/* G722 has 8000 as nominal rate even if the sample rate is 16000,
* see section 4.5.2 in RFC 3551. */
- if (codec->codec_id == CODEC_ID_ADPCM_G722 &&
+ if (codec->codec_id == AV_CODEC_ID_ADPCM_G722 &&
codec->sample_rate == 16000 && codec->channels == 1)
return AVRtpPayloadTypes[i].pt;
if (codec->codec_type == AVMEDIA_TYPE_AUDIO &&
@@ -140,7 +140,7 @@ const char *ff_rtp_enc_name(int payload_type)
return "";
}
-enum CodecID ff_rtp_codec_id(const char *buf, enum AVMediaType codec_type)
+enum AVCodecID ff_rtp_codec_id(const char *buf, enum AVMediaType codec_type)
{
int i;
@@ -149,5 +149,5 @@ enum CodecID ff_rtp_codec_id(const char *buf, enum AVMediaType codec_type)
return AVRtpPayloadTypes[i].codec_id;
}
- return CODEC_ID_NONE;
+ return AV_CODEC_ID_NONE;
}
diff --git a/libavformat/rtp.h b/libavformat/rtp.h
index 03fdb606ca..fa3e1fa1bd 100644
--- a/libavformat/rtp.h
+++ b/libavformat/rtp.h
@@ -63,10 +63,10 @@ const char *ff_rtp_enc_name(int payload_type);
*
* @param buf A pointer to the string containing the encoding name
* @param codec_type The codec type
- * @return In case of unknown encoding name, CODEC_ID_NONE is returned;
+ * @return In case of unknown encoding name, AV_CODEC_ID_NONE is returned;
* otherwise, the codec id is returned
*/
-enum CodecID ff_rtp_codec_id(const char *buf, enum AVMediaType codec_type);
+enum AVCodecID ff_rtp_codec_id(const char *buf, enum AVMediaType codec_type);
#define RTP_PT_PRIVATE 96
#define RTP_VERSION 2
diff --git a/libavformat/rtpdec.c b/libavformat/rtpdec.c
index 989695ee78..0be047cd49 100644
--- a/libavformat/rtpdec.c
+++ b/libavformat/rtpdec.c
@@ -47,7 +47,7 @@
static RTPDynamicProtocolHandler ff_realmedia_mp3_dynamic_handler = {
.enc_name = "X-MP3-draft-00",
.codec_type = AVMEDIA_TYPE_AUDIO,
- .codec_id = CODEC_ID_MP3ADU,
+ .codec_id = AV_CODEC_ID_MP3ADU,
};
/* statistics functions */
@@ -365,7 +365,7 @@ void ff_rtp_send_punch_packets(URLContext* rtp_handle)
/**
* open a new RTP parse context for stream 'st'. 'st' can be NULL for
* MPEG2TS streams to indicate that they should be demuxed inside the
- * rtp demux (otherwise CODEC_ID_MPEG2TS packets are returned)
+ * rtp demux (otherwise AV_CODEC_ID_MPEG2TS packets are returned)
*/
RTPDemuxContext *ff_rtp_parse_open(AVFormatContext *s1, AVStream *st, URLContext *rtpc, int payload_type, int queue_size)
{
@@ -389,19 +389,19 @@ RTPDemuxContext *ff_rtp_parse_open(AVFormatContext *s1, AVStream *st, URLContext
}
} else if (st) {
switch(st->codec->codec_id) {
- case CODEC_ID_MPEG1VIDEO:
- case CODEC_ID_MPEG2VIDEO:
- case CODEC_ID_MP2:
- case CODEC_ID_MP3:
- case CODEC_ID_MPEG4:
- case CODEC_ID_H263:
- case CODEC_ID_H264:
+ case AV_CODEC_ID_MPEG1VIDEO:
+ case AV_CODEC_ID_MPEG2VIDEO:
+ case AV_CODEC_ID_MP2:
+ case AV_CODEC_ID_MP3:
+ case AV_CODEC_ID_MPEG4:
+ case AV_CODEC_ID_H263:
+ case AV_CODEC_ID_H264:
st->need_parsing = AVSTREAM_PARSE_FULL;
break;
- case CODEC_ID_VORBIS:
+ case AV_CODEC_ID_VORBIS:
st->need_parsing = AVSTREAM_PARSE_HEADERS;
break;
- case CODEC_ID_ADPCM_G722:
+ case AV_CODEC_ID_ADPCM_G722:
/* According to RFC 3551, the stream clock rate is 8000
* even if the sample rate is 16000. */
if (st->codec->sample_rate == 8000)
@@ -538,8 +538,8 @@ static int rtp_parse_packet_internal(RTPDemuxContext *s, AVPacket *pkt,
} else {
// at this point, the RTP header has been stripped; This is ASSUMING that there is only 1 CSRC, which in't wise.
switch(st->codec->codec_id) {
- case CODEC_ID_MP2:
- case CODEC_ID_MP3:
+ case AV_CODEC_ID_MP2:
+ case AV_CODEC_ID_MP3:
/* better than nothing: skip mpeg audio RTP header */
if (len <= 4)
return -1;
@@ -549,8 +549,8 @@ static int rtp_parse_packet_internal(RTPDemuxContext *s, AVPacket *pkt,
av_new_packet(pkt, len);
memcpy(pkt->data, buf, len);
break;
- case CODEC_ID_MPEG1VIDEO:
- case CODEC_ID_MPEG2VIDEO:
+ case AV_CODEC_ID_MPEG1VIDEO:
+ case AV_CODEC_ID_MPEG2VIDEO:
/* better than nothing: skip mpeg video RTP header */
if (len <= 4)
return -1;
diff --git a/libavformat/rtpdec.h b/libavformat/rtpdec.h
index db44443479..907403286f 100644
--- a/libavformat/rtpdec.h
+++ b/libavformat/rtpdec.h
@@ -116,7 +116,7 @@ struct RTPDynamicProtocolHandler_s {
// fields from AVRtpDynamicPayloadType_s
const char enc_name[50]; /* XXX: still why 50 ? ;-) */
enum AVMediaType codec_type;
- enum CodecID codec_id;
+ enum AVCodecID codec_id;
int static_payload_id; /* 0 means no payload id is set. 0 is a valid
* payload ID (PCMU), too, but that format doesn't
* require any custom depacketization code. */
diff --git a/libavformat/rtpdec_amr.c b/libavformat/rtpdec_amr.c
index 86033cf8d2..6051dce716 100644
--- a/libavformat/rtpdec_amr.c
+++ b/libavformat/rtpdec_amr.c
@@ -64,9 +64,9 @@ static int amr_handle_packet(AVFormatContext *ctx,
const uint8_t *speech_data;
uint8_t *ptr;
- if (st->codec->codec_id == CODEC_ID_AMR_NB) {
+ if (st->codec->codec_id == AV_CODEC_ID_AMR_NB) {
frame_sizes = frame_sizes_nb;
- } else if (st->codec->codec_id == CODEC_ID_AMR_WB) {
+ } else if (st->codec->codec_id == AV_CODEC_ID_AMR_WB) {
frame_sizes = frame_sizes_wb;
} else {
av_log(ctx, AV_LOG_ERROR, "Bad codec ID\n");
@@ -192,7 +192,7 @@ static int amr_parse_sdp_line(AVFormatContext *s, int st_index,
RTPDynamicProtocolHandler ff_amr_nb_dynamic_handler = {
.enc_name = "AMR",
.codec_type = AVMEDIA_TYPE_AUDIO,
- .codec_id = CODEC_ID_AMR_NB,
+ .codec_id = AV_CODEC_ID_AMR_NB,
.parse_sdp_a_line = amr_parse_sdp_line,
.alloc = amr_new_context,
.free = amr_free_context,
@@ -202,7 +202,7 @@ RTPDynamicProtocolHandler ff_amr_nb_dynamic_handler = {
RTPDynamicProtocolHandler ff_amr_wb_dynamic_handler = {
.enc_name = "AMR-WB",
.codec_type = AVMEDIA_TYPE_AUDIO,
- .codec_id = CODEC_ID_AMR_WB,
+ .codec_id = AV_CODEC_ID_AMR_WB,
.parse_sdp_a_line = amr_parse_sdp_line,
.alloc = amr_new_context,
.free = amr_free_context,
diff --git a/libavformat/rtpdec_asf.c b/libavformat/rtpdec_asf.c
index 84503f1749..e37fde7906 100644
--- a/libavformat/rtpdec_asf.c
+++ b/libavformat/rtpdec_asf.c
@@ -298,7 +298,7 @@ static void asfrtp_free_context(PayloadContext *asf)
RTPDynamicProtocolHandler ff_ms_rtp_ ## n ## _handler = { \
.enc_name = s, \
.codec_type = t, \
- .codec_id = CODEC_ID_NONE, \
+ .codec_id = AV_CODEC_ID_NONE, \
.parse_sdp_a_line = asfrtp_parse_sdp_line, \
.alloc = asfrtp_new_context, \
.free = asfrtp_free_context, \
diff --git a/libavformat/rtpdec_g726.c b/libavformat/rtpdec_g726.c
index 20450d8dfb..ec37f09155 100644
--- a/libavformat/rtpdec_g726.c
+++ b/libavformat/rtpdec_g726.c
@@ -36,7 +36,7 @@ static int g726_ ## bitrate ##_init(AVFormatContext *s, int st_index, PayloadCon
RTPDynamicProtocolHandler ff_g726_ ## bitrate ## _dynamic_handler = { \
.enc_name = "G726-" #bitrate, \
.codec_type = AVMEDIA_TYPE_AUDIO, \
- .codec_id = CODEC_ID_ADPCM_G726, \
+ .codec_id = AV_CODEC_ID_ADPCM_G726, \
.init = g726_ ## bitrate ## _init, \
}
diff --git a/libavformat/rtpdec_h263.c b/libavformat/rtpdec_h263.c
index 6c22a24715..e604dc1c42 100644
--- a/libavformat/rtpdec_h263.c
+++ b/libavformat/rtpdec_h263.c
@@ -91,13 +91,13 @@ int ff_h263_handle_packet(AVFormatContext *ctx, PayloadContext *data,
RTPDynamicProtocolHandler ff_h263_1998_dynamic_handler = {
.enc_name = "H263-1998",
.codec_type = AVMEDIA_TYPE_VIDEO,
- .codec_id = CODEC_ID_H263,
+ .codec_id = AV_CODEC_ID_H263,
.parse_packet = ff_h263_handle_packet,
};
RTPDynamicProtocolHandler ff_h263_2000_dynamic_handler = {
.enc_name = "H263-2000",
.codec_type = AVMEDIA_TYPE_VIDEO,
- .codec_id = CODEC_ID_H263,
+ .codec_id = AV_CODEC_ID_H263,
.parse_packet = ff_h263_handle_packet,
};
diff --git a/libavformat/rtpdec_h263_rfc2190.c b/libavformat/rtpdec_h263_rfc2190.c
index 92102f3f51..163d4eaba7 100644
--- a/libavformat/rtpdec_h263_rfc2190.c
+++ b/libavformat/rtpdec_h263_rfc2190.c
@@ -198,7 +198,7 @@ static int h263_handle_packet(AVFormatContext *ctx, PayloadContext *data,
RTPDynamicProtocolHandler ff_h263_rfc2190_dynamic_handler = {
.codec_type = AVMEDIA_TYPE_VIDEO,
- .codec_id = CODEC_ID_H263,
+ .codec_id = AV_CODEC_ID_H263,
.parse_packet = h263_handle_packet,
.alloc = h263_new_context,
.free = h263_free_context,
diff --git a/libavformat/rtpdec_h264.c b/libavformat/rtpdec_h264.c
index 063836af3f..f8a2272203 100644
--- a/libavformat/rtpdec_h264.c
+++ b/libavformat/rtpdec_h264.c
@@ -69,7 +69,7 @@ static int sdp_parse_fmtp_config_h264(AVStream *stream,
char *attr, char *value)
{
AVCodecContext *codec = stream->codec;
- assert(codec->codec_id == CODEC_ID_H264);
+ assert(codec->codec_id == AV_CODEC_ID_H264);
assert(h264_data != NULL);
if (!strcmp(attr, "packetization-mode")) {
@@ -383,7 +383,7 @@ static int parse_h264_sdp_line(AVFormatContext *s, int st_index,
RTPDynamicProtocolHandler ff_h264_dynamic_handler = {
.enc_name = "H264",
.codec_type = AVMEDIA_TYPE_VIDEO,
- .codec_id = CODEC_ID_H264,
+ .codec_id = AV_CODEC_ID_H264,
.parse_sdp_a_line = parse_h264_sdp_line,
.alloc = h264_new_context,
.free = h264_free_context,
diff --git a/libavformat/rtpdec_ilbc.c b/libavformat/rtpdec_ilbc.c
index 247c779bfc..2bd86147de 100644
--- a/libavformat/rtpdec_ilbc.c
+++ b/libavformat/rtpdec_ilbc.c
@@ -68,6 +68,6 @@ static int ilbc_parse_sdp_line(AVFormatContext *s, int st_index,
RTPDynamicProtocolHandler ff_ilbc_dynamic_handler = {
.enc_name = "iLBC",
.codec_type = AVMEDIA_TYPE_AUDIO,
- .codec_id = CODEC_ID_ILBC,
+ .codec_id = AV_CODEC_ID_ILBC,
.parse_sdp_a_line = ilbc_parse_sdp_line,
};
diff --git a/libavformat/rtpdec_latm.c b/libavformat/rtpdec_latm.c
index cc24c82c50..2ea141b88e 100644
--- a/libavformat/rtpdec_latm.c
+++ b/libavformat/rtpdec_latm.c
@@ -180,7 +180,7 @@ static int latm_parse_sdp_line(AVFormatContext *s, int st_index,
RTPDynamicProtocolHandler ff_mp4a_latm_dynamic_handler = {
.enc_name = "MP4A-LATM",
.codec_type = AVMEDIA_TYPE_AUDIO,
- .codec_id = CODEC_ID_AAC,
+ .codec_id = AV_CODEC_ID_AAC,
.parse_sdp_a_line = latm_parse_sdp_line,
.alloc = latm_new_context,
.free = latm_free_context,
diff --git a/libavformat/rtpdec_mpeg4.c b/libavformat/rtpdec_mpeg4.c
index ab405c0bf6..7b16d12dfa 100644
--- a/libavformat/rtpdec_mpeg4.c
+++ b/libavformat/rtpdec_mpeg4.c
@@ -202,7 +202,7 @@ static int parse_fmtp(AVStream *stream, PayloadContext *data,
return res;
}
- if (codec->codec_id == CODEC_ID_AAC) {
+ if (codec->codec_id == AV_CODEC_ID_AAC) {
/* Looking for a known attribute */
for (i = 0; attr_names[i].str; ++i) {
if (!av_strcasecmp(attr, attr_names[i].str)) {
@@ -235,14 +235,14 @@ static int parse_sdp_line(AVFormatContext *s, int st_index,
RTPDynamicProtocolHandler ff_mp4v_es_dynamic_handler = {
.enc_name = "MP4V-ES",
.codec_type = AVMEDIA_TYPE_VIDEO,
- .codec_id = CODEC_ID_MPEG4,
+ .codec_id = AV_CODEC_ID_MPEG4,
.parse_sdp_a_line = parse_sdp_line,
};
RTPDynamicProtocolHandler ff_mpeg4_generic_dynamic_handler = {
.enc_name = "mpeg4-generic",
.codec_type = AVMEDIA_TYPE_AUDIO,
- .codec_id = CODEC_ID_AAC,
+ .codec_id = AV_CODEC_ID_AAC,
.parse_sdp_a_line = parse_sdp_line,
.alloc = new_context,
.free = free_context,
diff --git a/libavformat/rtpdec_qcelp.c b/libavformat/rtpdec_qcelp.c
index d6ef4fce02..7e1d0b7972 100644
--- a/libavformat/rtpdec_qcelp.c
+++ b/libavformat/rtpdec_qcelp.c
@@ -221,7 +221,7 @@ static int qcelp_parse_packet(AVFormatContext *ctx, PayloadContext *data,
RTPDynamicProtocolHandler ff_qcelp_dynamic_handler = {
.enc_name = "x-Purevoice",
.codec_type = AVMEDIA_TYPE_AUDIO,
- .codec_id = CODEC_ID_QCELP,
+ .codec_id = AV_CODEC_ID_QCELP,
.static_payload_id = 12,
.alloc = qcelp_new_context,
.free = qcelp_free_context,
diff --git a/libavformat/rtpdec_qdm2.c b/libavformat/rtpdec_qdm2.c
index 0802b80dc3..f203fcfb74 100644
--- a/libavformat/rtpdec_qdm2.c
+++ b/libavformat/rtpdec_qdm2.c
@@ -259,14 +259,14 @@ static int qdm2_parse_packet(AVFormatContext *s, PayloadContext *qdm,
return res;
p += res;
- /* We set codec_id to CODEC_ID_NONE initially to
+ /* We set codec_id to AV_CODEC_ID_NONE initially to
* delay decoder initialization since extradata is
* carried within the RTP stream, not SDP. Here,
- * by setting codec_id to CODEC_ID_QDM2, we are signalling
+ * by setting codec_id to AV_CODEC_ID_QDM2, we are signalling
* to the decoder that it is OK to initialize. */
- st->codec->codec_id = CODEC_ID_QDM2;
+ st->codec->codec_id = AV_CODEC_ID_QDM2;
}
- if (st->codec->codec_id == CODEC_ID_NONE)
+ if (st->codec->codec_id == AV_CODEC_ID_NONE)
return AVERROR(EAGAIN);
/* subpackets */
@@ -310,7 +310,7 @@ static void qdm2_extradata_free(PayloadContext *qdm)
RTPDynamicProtocolHandler ff_qdm2_dynamic_handler = {
.enc_name = "X-QDM",
.codec_type = AVMEDIA_TYPE_AUDIO,
- .codec_id = CODEC_ID_NONE,
+ .codec_id = AV_CODEC_ID_NONE,
.alloc = qdm2_extradata_new,
.free = qdm2_extradata_free,
.parse_packet = qdm2_parse_packet,
diff --git a/libavformat/rtpdec_qt.c b/libavformat/rtpdec_qt.c
index 33cb3dab4e..4decdca19c 100644
--- a/libavformat/rtpdec_qt.c
+++ b/libavformat/rtpdec_qt.c
@@ -244,7 +244,7 @@ static void qt_rtp_free(PayloadContext *qt)
RTPDynamicProtocolHandler ff_ ## m ## _rtp_ ## n ## _handler = { \
.enc_name = s, \
.codec_type = t, \
- .codec_id = CODEC_ID_NONE, \
+ .codec_id = AV_CODEC_ID_NONE, \
.alloc = qt_rtp_new, \
.free = qt_rtp_free, \
.parse_packet = qt_rtp_parse_packet, \
diff --git a/libavformat/rtpdec_svq3.c b/libavformat/rtpdec_svq3.c
index 7800766ecf..99c4c52dee 100644
--- a/libavformat/rtpdec_svq3.c
+++ b/libavformat/rtpdec_svq3.c
@@ -68,12 +68,12 @@ static int svq3_parse_packet (AVFormatContext *s, PayloadContext *sv,
AV_WB32(st->codec->extradata + 4, len);
memcpy(st->codec->extradata + 8, buf, len);
- /* We set codec_id to CODEC_ID_NONE initially to
+ /* We set codec_id to AV_CODEC_ID_NONE initially to
* delay decoder initialization since extradata is
* carried within the RTP stream, not SDP. Here,
- * by setting codec_id to CODEC_ID_SVQ3, we are signalling
+ * by setting codec_id to AV_CODEC_ID_SVQ3, we are signalling
* to the decoder that it is OK to initialize. */
- st->codec->codec_id = CODEC_ID_SVQ3;
+ st->codec->codec_id = AV_CODEC_ID_SVQ3;
return AVERROR(EAGAIN);
}
@@ -127,7 +127,7 @@ static void svq3_extradata_free(PayloadContext *sv)
RTPDynamicProtocolHandler ff_svq3_dynamic_handler = {
.enc_name = "X-SV3V-ES",
.codec_type = AVMEDIA_TYPE_VIDEO,
- .codec_id = CODEC_ID_NONE, // see if (config_packet) above
+ .codec_id = AV_CODEC_ID_NONE, // see if (config_packet) above
.alloc = svq3_extradata_new,
.free = svq3_extradata_free,
.parse_packet = svq3_parse_packet,
diff --git a/libavformat/rtpdec_vp8.c b/libavformat/rtpdec_vp8.c
index bfc96570d1..e24bbb6a6f 100644
--- a/libavformat/rtpdec_vp8.c
+++ b/libavformat/rtpdec_vp8.c
@@ -147,7 +147,7 @@ static void vp8_free_context(PayloadContext *vp8)
RTPDynamicProtocolHandler ff_vp8_dynamic_handler = {
.enc_name = "VP8",
.codec_type = AVMEDIA_TYPE_VIDEO,
- .codec_id = CODEC_ID_VP8,
+ .codec_id = AV_CODEC_ID_VP8,
.alloc = vp8_new_context,
.free = vp8_free_context,
.parse_packet = vp8_handle_packet,
diff --git a/libavformat/rtpdec_xiph.c b/libavformat/rtpdec_xiph.c
index 771a13d9d2..2457f660b8 100644
--- a/libavformat/rtpdec_xiph.c
+++ b/libavformat/rtpdec_xiph.c
@@ -390,7 +390,7 @@ static int xiph_parse_sdp_line(AVFormatContext *s, int st_index,
RTPDynamicProtocolHandler ff_theora_dynamic_handler = {
.enc_name = "theora",
.codec_type = AVMEDIA_TYPE_VIDEO,
- .codec_id = CODEC_ID_THEORA,
+ .codec_id = AV_CODEC_ID_THEORA,
.parse_sdp_a_line = xiph_parse_sdp_line,
.alloc = xiph_new_context,
.free = xiph_free_context,
@@ -400,7 +400,7 @@ RTPDynamicProtocolHandler ff_theora_dynamic_handler = {
RTPDynamicProtocolHandler ff_vorbis_dynamic_handler = {
.enc_name = "vorbis",
.codec_type = AVMEDIA_TYPE_AUDIO,
- .codec_id = CODEC_ID_VORBIS,
+ .codec_id = AV_CODEC_ID_VORBIS,
.parse_sdp_a_line = xiph_parse_sdp_line,
.alloc = xiph_new_context,
.free = xiph_free_context,
diff --git a/libavformat/rtpenc.c b/libavformat/rtpenc.c
index bda43a095c..6af23f760a 100644
--- a/libavformat/rtpenc.c
+++ b/libavformat/rtpenc.c
@@ -46,35 +46,35 @@ static const AVClass rtp_muxer_class = {
#define RTCP_SR_SIZE 28
-static int is_supported(enum CodecID id)
+static int is_supported(enum AVCodecID id)
{
switch(id) {
- case CODEC_ID_H263:
- case CODEC_ID_H263P:
- case CODEC_ID_H264:
- case CODEC_ID_MPEG1VIDEO:
- case CODEC_ID_MPEG2VIDEO:
- case CODEC_ID_MPEG4:
- case CODEC_ID_AAC:
- case CODEC_ID_MP2:
- case CODEC_ID_MP3:
- case CODEC_ID_PCM_ALAW:
- case CODEC_ID_PCM_MULAW:
- case CODEC_ID_PCM_S8:
- case CODEC_ID_PCM_S16BE:
- case CODEC_ID_PCM_S16LE:
- case CODEC_ID_PCM_U16BE:
- case CODEC_ID_PCM_U16LE:
- case CODEC_ID_PCM_U8:
- case CODEC_ID_MPEG2TS:
- case CODEC_ID_AMR_NB:
- case CODEC_ID_AMR_WB:
- case CODEC_ID_VORBIS:
- case CODEC_ID_THEORA:
- case CODEC_ID_VP8:
- case CODEC_ID_ADPCM_G722:
- case CODEC_ID_ADPCM_G726:
- case CODEC_ID_ILBC:
+ case AV_CODEC_ID_H263:
+ case AV_CODEC_ID_H263P:
+ case AV_CODEC_ID_H264:
+ case AV_CODEC_ID_MPEG1VIDEO:
+ case AV_CODEC_ID_MPEG2VIDEO:
+ case AV_CODEC_ID_MPEG4:
+ case AV_CODEC_ID_AAC:
+ case AV_CODEC_ID_MP2:
+ case AV_CODEC_ID_MP3:
+ case AV_CODEC_ID_PCM_ALAW:
+ case AV_CODEC_ID_PCM_MULAW:
+ case AV_CODEC_ID_PCM_S8:
+ case AV_CODEC_ID_PCM_S16BE:
+ case AV_CODEC_ID_PCM_S16LE:
+ case AV_CODEC_ID_PCM_U16BE:
+ case AV_CODEC_ID_PCM_U16LE:
+ case AV_CODEC_ID_PCM_U8:
+ case AV_CODEC_ID_MPEG2TS:
+ case AV_CODEC_ID_AMR_NB:
+ case AV_CODEC_ID_AMR_WB:
+ case AV_CODEC_ID_VORBIS:
+ case AV_CODEC_ID_THEORA:
+ case AV_CODEC_ID_VP8:
+ case AV_CODEC_ID_ADPCM_G722:
+ case AV_CODEC_ID_ADPCM_G726:
+ case AV_CODEC_ID_ILBC:
return 1;
default:
return 0;
@@ -152,43 +152,43 @@ static int rtp_write_header(AVFormatContext *s1)
avpriv_set_pts_info(st, 32, 1, 90000);
switch(st->codec->codec_id) {
- case CODEC_ID_MP2:
- case CODEC_ID_MP3:
+ case AV_CODEC_ID_MP2:
+ case AV_CODEC_ID_MP3:
s->buf_ptr = s->buf + 4;
break;
- case CODEC_ID_MPEG1VIDEO:
- case CODEC_ID_MPEG2VIDEO:
+ case AV_CODEC_ID_MPEG1VIDEO:
+ case AV_CODEC_ID_MPEG2VIDEO:
break;
- case CODEC_ID_MPEG2TS:
+ case AV_CODEC_ID_MPEG2TS:
n = s->max_payload_size / TS_PACKET_SIZE;
if (n < 1)
n = 1;
s->max_payload_size = n * TS_PACKET_SIZE;
s->buf_ptr = s->buf;
break;
- case CODEC_ID_H264:
+ case AV_CODEC_ID_H264:
/* check for H.264 MP4 syntax */
if (st->codec->extradata_size > 4 && st->codec->extradata[0] == 1) {
s->nal_length_size = (st->codec->extradata[4] & 0x03) + 1;
}
break;
- case CODEC_ID_VORBIS:
- case CODEC_ID_THEORA:
+ case AV_CODEC_ID_VORBIS:
+ case AV_CODEC_ID_THEORA:
if (!s->max_frames_per_packet) s->max_frames_per_packet = 15;
s->max_frames_per_packet = av_clip(s->max_frames_per_packet, 1, 15);
s->max_payload_size -= 6; // ident+frag+tdt/vdt+pkt_num+pkt_length
s->num_frames = 0;
goto defaultcase;
- case CODEC_ID_VP8:
+ case AV_CODEC_ID_VP8:
av_log(s1, AV_LOG_ERROR, "RTP VP8 payload implementation is "
"incompatible with the latest spec drafts.\n");
break;
- case CODEC_ID_ADPCM_G722:
+ case AV_CODEC_ID_ADPCM_G722:
/* Due to a historical error, the clock rate for G722 in RTP is
* 8000, even if the sample rate is 16000. See RFC 3551. */
avpriv_set_pts_info(st, 32, 1, 8000);
break;
- case CODEC_ID_ILBC:
+ case AV_CODEC_ID_ILBC:
if (st->codec->block_align != 38 && st->codec->block_align != 50) {
av_log(s1, AV_LOG_ERROR, "Incorrect iLBC block size specified\n");
goto fail;
@@ -198,11 +198,11 @@ static int rtp_write_header(AVFormatContext *s1)
s->max_frames_per_packet = FFMIN(s->max_frames_per_packet,
s->max_payload_size / st->codec->block_align);
goto defaultcase;
- case CODEC_ID_AMR_NB:
- case CODEC_ID_AMR_WB:
+ case AV_CODEC_ID_AMR_NB:
+ case AV_CODEC_ID_AMR_WB:
if (!s->max_frames_per_packet)
s->max_frames_per_packet = 12;
- if (st->codec->codec_id == CODEC_ID_AMR_NB)
+ if (st->codec->codec_id == AV_CODEC_ID_AMR_NB)
n = 31;
else
n = 61;
@@ -215,7 +215,7 @@ static int rtp_write_header(AVFormatContext *s1)
av_log(s1, AV_LOG_ERROR, "Only mono is supported\n");
goto fail;
}
- case CODEC_ID_AAC:
+ case AV_CODEC_ID_AAC:
s->num_frames = 0;
default:
defaultcase:
@@ -457,54 +457,54 @@ static int rtp_write_packet(AVFormatContext *s1, AVPacket *pkt)
s->cur_timestamp = s->base_timestamp + pkt->pts;
switch(st->codec->codec_id) {
- case CODEC_ID_PCM_MULAW:
- case CODEC_ID_PCM_ALAW:
- case CODEC_ID_PCM_U8:
- case CODEC_ID_PCM_S8:
+ case AV_CODEC_ID_PCM_MULAW:
+ case AV_CODEC_ID_PCM_ALAW:
+ case AV_CODEC_ID_PCM_U8:
+ case AV_CODEC_ID_PCM_S8:
rtp_send_samples(s1, pkt->data, size, 8 * st->codec->channels);
break;
- case CODEC_ID_PCM_U16BE:
- case CODEC_ID_PCM_U16LE:
- case CODEC_ID_PCM_S16BE:
- case CODEC_ID_PCM_S16LE:
+ case AV_CODEC_ID_PCM_U16BE:
+ case AV_CODEC_ID_PCM_U16LE:
+ case AV_CODEC_ID_PCM_S16BE:
+ case AV_CODEC_ID_PCM_S16LE:
rtp_send_samples(s1, pkt->data, size, 16 * st->codec->channels);
break;
- case CODEC_ID_ADPCM_G722:
+ case AV_CODEC_ID_ADPCM_G722:
/* The actual sample size is half a byte per sample, but since the
* stream clock rate is 8000 Hz while the sample rate is 16000 Hz,
* the correct parameter for send_samples_bits is 8 bits per stream
* clock. */
rtp_send_samples(s1, pkt->data, size, 8 * st->codec->channels);
break;
- case CODEC_ID_ADPCM_G726:
+ case AV_CODEC_ID_ADPCM_G726:
rtp_send_samples(s1, pkt->data, size,
st->codec->bits_per_coded_sample * st->codec->channels);
break;
- case CODEC_ID_MP2:
- case CODEC_ID_MP3:
+ case AV_CODEC_ID_MP2:
+ case AV_CODEC_ID_MP3:
rtp_send_mpegaudio(s1, pkt->data, size);
break;
- case CODEC_ID_MPEG1VIDEO:
- case CODEC_ID_MPEG2VIDEO:
+ case AV_CODEC_ID_MPEG1VIDEO:
+ case AV_CODEC_ID_MPEG2VIDEO:
ff_rtp_send_mpegvideo(s1, pkt->data, size);
break;
- case CODEC_ID_AAC:
+ case AV_CODEC_ID_AAC:
if (s->flags & FF_RTP_FLAG_MP4A_LATM)
ff_rtp_send_latm(s1, pkt->data, size);
else
ff_rtp_send_aac(s1, pkt->data, size);
break;
- case CODEC_ID_AMR_NB:
- case CODEC_ID_AMR_WB:
+ case AV_CODEC_ID_AMR_NB:
+ case AV_CODEC_ID_AMR_WB:
ff_rtp_send_amr(s1, pkt->data, size);
break;
- case CODEC_ID_MPEG2TS:
+ case AV_CODEC_ID_MPEG2TS:
rtp_send_mpegts_raw(s1, pkt->data, size);
break;
- case CODEC_ID_H264:
+ case AV_CODEC_ID_H264:
ff_rtp_send_h264(s1, pkt->data, size);
break;
- case CODEC_ID_H263:
+ case AV_CODEC_ID_H263:
if (s->flags & FF_RTP_FLAG_RFC2190) {
int mb_info_size = 0;
const uint8_t *mb_info =
@@ -514,17 +514,17 @@ static int rtp_write_packet(AVFormatContext *s1, AVPacket *pkt)
break;
}
/* Fallthrough */
- case CODEC_ID_H263P:
+ case AV_CODEC_ID_H263P:
ff_rtp_send_h263(s1, pkt->data, size);
break;
- case CODEC_ID_VORBIS:
- case CODEC_ID_THEORA:
+ case AV_CODEC_ID_VORBIS:
+ case AV_CODEC_ID_THEORA:
ff_rtp_send_xiph(s1, pkt->data, size);
break;
- case CODEC_ID_VP8:
+ case AV_CODEC_ID_VP8:
ff_rtp_send_vp8(s1, pkt->data, size);
break;
- case CODEC_ID_ILBC:
+ case AV_CODEC_ID_ILBC:
rtp_send_ilbc(s1, pkt->data, size);
break;
default:
@@ -548,8 +548,8 @@ AVOutputFormat ff_rtp_muxer = {
.name = "rtp",
.long_name = NULL_IF_CONFIG_SMALL("RTP output"),
.priv_data_size = sizeof(RTPMuxContext),
- .audio_codec = CODEC_ID_PCM_MULAW,
- .video_codec = CODEC_ID_MPEG4,
+ .audio_codec = AV_CODEC_ID_PCM_MULAW,
+ .video_codec = AV_CODEC_ID_MPEG4,
.write_header = rtp_write_header,
.write_packet = rtp_write_packet,
.write_trailer = rtp_write_trailer,
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 7c6e24e107..633ec39ecb 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -207,7 +207,7 @@ static int sdp_parse_rtpmap(AVFormatContext *s,
codec->codec_id = ff_rtp_codec_id(buf, codec->codec_type);
}
- if (codec->codec_id == CODEC_ID_NONE) {
+ if (codec->codec_id == AV_CODEC_ID_NONE) {
RTPDynamicProtocolHandler *handler =
ff_rtp_handler_find_by_name(buf, codec->codec_type);
init_rtp_handler(handler, rtsp_st, codec);
diff --git a/libavformat/rtspenc.c b/libavformat/rtspenc.c
index b89eb02956..bad6fbd3a2 100644
--- a/libavformat/rtspenc.c
+++ b/libavformat/rtspenc.c
@@ -237,8 +237,8 @@ AVOutputFormat ff_rtsp_muxer = {
.name = "rtsp",
.long_name = NULL_IF_CONFIG_SMALL("RTSP output"),
.priv_data_size = sizeof(RTSPState),
- .audio_codec = CODEC_ID_AAC,
- .video_codec = CODEC_ID_MPEG4,
+ .audio_codec = AV_CODEC_ID_AAC,
+ .video_codec = AV_CODEC_ID_MPEG4,
.write_header = rtsp_write_header,
.write_packet = rtsp_write_packet,
.write_trailer = rtsp_write_close,
diff --git a/libavformat/samidec.c b/libavformat/samidec.c
index 5995d86fcf..5f29364028 100644
--- a/libavformat/samidec.c
+++ b/libavformat/samidec.c
@@ -56,7 +56,7 @@ static int sami_read_header(AVFormatContext *s)
return AVERROR(ENOMEM);
avpriv_set_pts_info(st, 64, 1, 1000);
st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;
- st->codec->codec_id = CODEC_ID_SAMI;
+ st->codec->codec_id = AV_CODEC_ID_SAMI;
av_bprint_init(&buf, 0, AV_BPRINT_SIZE_UNLIMITED);
av_bprint_init(&hdr_buf, 0, AV_BPRINT_SIZE_UNLIMITED);
diff --git a/libavformat/sapenc.c b/libavformat/sapenc.c
index ba5ce1baeb..3de615d25d 100644
--- a/libavformat/sapenc.c
+++ b/libavformat/sapenc.c
@@ -256,8 +256,8 @@ AVOutputFormat ff_sap_muxer = {
.name = "sap",
.long_name = NULL_IF_CONFIG_SMALL("SAP output"),
.priv_data_size = sizeof(struct SAPState),
- .audio_codec = CODEC_ID_AAC,
- .video_codec = CODEC_ID_MPEG4,
+ .audio_codec = AV_CODEC_ID_AAC,
+ .video_codec = AV_CODEC_ID_MPEG4,
.write_header = sap_write_header,
.write_packet = sap_write_packet,
.write_trailer = sap_write_close,
diff --git a/libavformat/sbgdec.c b/libavformat/sbgdec.c
index 07319309c1..b0b01abe22 100644
--- a/libavformat/sbgdec.c
+++ b/libavformat/sbgdec.c
@@ -1414,7 +1414,7 @@ static av_cold int sbg_read_header(AVFormatContext *avf)
if (!st)
return AVERROR(ENOMEM);
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- st->codec->codec_id = CODEC_ID_FFWAVESYNTH;
+ st->codec->codec_id = AV_CODEC_ID_FFWAVESYNTH;
st->codec->channels = 2;
st->codec->channel_layout = AV_CH_LAYOUT_STEREO;
st->codec->sample_rate = sbg->sample_rate;
diff --git a/libavformat/sdp.c b/libavformat/sdp.c
index 352dea0335..48dfb86649 100644
--- a/libavformat/sdp.c
+++ b/libavformat/sdp.c
@@ -257,10 +257,10 @@ static char *xiph_extradata2config(AVCodecContext *c)
int first_header_size;
switch (c->codec_id) {
- case CODEC_ID_THEORA:
+ case AV_CODEC_ID_THEORA:
first_header_size = 42;
break;
- case CODEC_ID_VORBIS:
+ case AV_CODEC_ID_VORBIS:
first_header_size = 30;
break;
default:
@@ -388,7 +388,7 @@ static char *sdp_write_media_attributes(char *buff, int size, AVCodecContext *c,
char *config = NULL;
switch (c->codec_id) {
- case CODEC_ID_H264: {
+ case AV_CODEC_ID_H264: {
int mode = 1;
if (fmt && fmt->oformat->priv_class &&
av_opt_flag_is_set(fmt->priv_data, "rtpflags", "h264_mode0"))
@@ -402,21 +402,21 @@ static char *sdp_write_media_attributes(char *buff, int size, AVCodecContext *c,
payload_type, mode, config ? config : "");
break;
}
- case CODEC_ID_H263:
- case CODEC_ID_H263P:
+ case AV_CODEC_ID_H263:
+ case AV_CODEC_ID_H263P:
/* a=framesize is required by 3GPP TS 26.234 (PSS). It
* actually specifies the maximum video size, but we only know
* the current size. This is required for playback on Android
* stagefright and on Samsung bada. */
if (!fmt || !fmt->oformat->priv_class ||
!av_opt_flag_is_set(fmt->priv_data, "rtpflags", "rfc2190") ||
- c->codec_id == CODEC_ID_H263P)
+ c->codec_id == AV_CODEC_ID_H263P)
av_strlcatf(buff, size, "a=rtpmap:%d H263-2000/90000\r\n"
"a=framesize:%d %d-%d\r\n",
payload_type,
payload_type, c->width, c->height);
break;
- case CODEC_ID_MPEG4:
+ case AV_CODEC_ID_MPEG4:
if (c->extradata_size) {
config = extradata2config(c);
}
@@ -425,7 +425,7 @@ static char *sdp_write_media_attributes(char *buff, int size, AVCodecContext *c,
payload_type,
payload_type, config ? config : "");
break;
- case CODEC_ID_AAC:
+ case AV_CODEC_ID_AAC:
if (fmt && fmt->oformat && fmt->oformat->priv_class &&
av_opt_flag_is_set(fmt->priv_data, "rtpflags", "latm")) {
config = latm_context2config(c);
@@ -456,37 +456,37 @@ static char *sdp_write_media_attributes(char *buff, int size, AVCodecContext *c,
payload_type, config);
}
break;
- case CODEC_ID_PCM_S16BE:
+ case AV_CODEC_ID_PCM_S16BE:
if (payload_type >= RTP_PT_PRIVATE)
av_strlcatf(buff, size, "a=rtpmap:%d L16/%d/%d\r\n",
payload_type,
c->sample_rate, c->channels);
break;
- case CODEC_ID_PCM_MULAW:
+ case AV_CODEC_ID_PCM_MULAW:
if (payload_type >= RTP_PT_PRIVATE)
av_strlcatf(buff, size, "a=rtpmap:%d PCMU/%d/%d\r\n",
payload_type,
c->sample_rate, c->channels);
break;
- case CODEC_ID_PCM_ALAW:
+ case AV_CODEC_ID_PCM_ALAW:
if (payload_type >= RTP_PT_PRIVATE)
av_strlcatf(buff, size, "a=rtpmap:%d PCMA/%d/%d\r\n",
payload_type,
c->sample_rate, c->channels);
break;
- case CODEC_ID_AMR_NB:
+ case AV_CODEC_ID_AMR_NB:
av_strlcatf(buff, size, "a=rtpmap:%d AMR/%d/%d\r\n"
"a=fmtp:%d octet-align=1\r\n",
payload_type, c->sample_rate, c->channels,
payload_type);
break;
- case CODEC_ID_AMR_WB:
+ case AV_CODEC_ID_AMR_WB:
av_strlcatf(buff, size, "a=rtpmap:%d AMR-WB/%d/%d\r\n"
"a=fmtp:%d octet-align=1\r\n",
payload_type, c->sample_rate, c->channels,
payload_type);
break;
- case CODEC_ID_VORBIS:
+ case AV_CODEC_ID_VORBIS:
if (c->extradata_size)
config = xiph_extradata2config(c);
else
@@ -499,7 +499,7 @@ static char *sdp_write_media_attributes(char *buff, int size, AVCodecContext *c,
payload_type, c->sample_rate, c->channels,
payload_type, config);
break;
- case CODEC_ID_THEORA: {
+ case AV_CODEC_ID_THEORA: {
const char *pix_fmt;
if (c->extradata_size)
config = xiph_extradata2config(c);
@@ -531,17 +531,17 @@ static char *sdp_write_media_attributes(char *buff, int size, AVCodecContext *c,
c->width, c->height, pix_fmt, config);
break;
}
- case CODEC_ID_VP8:
+ case AV_CODEC_ID_VP8:
av_strlcatf(buff, size, "a=rtpmap:%d VP8/90000\r\n",
payload_type);
break;
- case CODEC_ID_ADPCM_G722:
+ case AV_CODEC_ID_ADPCM_G722:
if (payload_type >= RTP_PT_PRIVATE)
av_strlcatf(buff, size, "a=rtpmap:%d G722/%d/%d\r\n",
payload_type,
8000, c->channels);
break;
- case CODEC_ID_ADPCM_G726: {
+ case AV_CODEC_ID_ADPCM_G726: {
if (payload_type >= RTP_PT_PRIVATE)
av_strlcatf(buff, size, "a=rtpmap:%d G726-%d/%d\r\n",
payload_type,
@@ -549,7 +549,7 @@ static char *sdp_write_media_attributes(char *buff, int size, AVCodecContext *c,
c->sample_rate);
break;
}
- case CODEC_ID_ILBC:
+ case AV_CODEC_ID_ILBC:
av_strlcatf(buff, size, "a=rtpmap:%d iLBC/%d\r\n"
"a=fmtp:%d mode=%d\r\n",
payload_type, c->sample_rate,
diff --git a/libavformat/segafilm.c b/libavformat/segafilm.c
index dea1afa3f0..d497d7b31f 100644
--- a/libavformat/segafilm.c
+++ b/libavformat/segafilm.c
@@ -50,12 +50,12 @@ typedef struct FilmDemuxContext {
int video_stream_index;
int audio_stream_index;
- enum CodecID audio_type;
+ enum AVCodecID audio_type;
unsigned int audio_samplerate;
unsigned int audio_bits;
unsigned int audio_channels;
- enum CodecID video_type;
+ enum AVCodecID video_type;
unsigned int sample_count;
film_sample *sample_table;
unsigned int current_sample;
@@ -102,7 +102,7 @@ static int film_read_header(AVFormatContext *s)
if (avio_read(pb, scratch, 20) != 20)
return AVERROR(EIO);
/* make some assumptions about the audio parameters */
- film->audio_type = CODEC_ID_PCM_S8;
+ film->audio_type = AV_CODEC_ID_PCM_S8;
film->audio_samplerate = 22050;
film->audio_channels = 1;
film->audio_bits = 8;
@@ -114,27 +114,27 @@ static int film_read_header(AVFormatContext *s)
film->audio_channels = scratch[21];
film->audio_bits = scratch[22];
if (scratch[23] == 2)
- film->audio_type = CODEC_ID_ADPCM_ADX;
+ film->audio_type = AV_CODEC_ID_ADPCM_ADX;
else if (film->audio_channels > 0) {
if (film->audio_bits == 8)
- film->audio_type = CODEC_ID_PCM_S8;
+ film->audio_type = AV_CODEC_ID_PCM_S8;
else if (film->audio_bits == 16)
- film->audio_type = CODEC_ID_PCM_S16BE;
+ film->audio_type = AV_CODEC_ID_PCM_S16BE;
else
- film->audio_type = CODEC_ID_NONE;
+ film->audio_type = AV_CODEC_ID_NONE;
} else
- film->audio_type = CODEC_ID_NONE;
+ film->audio_type = AV_CODEC_ID_NONE;
}
if (AV_RB32(&scratch[0]) != FDSC_TAG)
return AVERROR_INVALIDDATA;
if (AV_RB32(&scratch[8]) == CVID_TAG) {
- film->video_type = CODEC_ID_CINEPAK;
+ film->video_type = AV_CODEC_ID_CINEPAK;
} else if (AV_RB32(&scratch[8]) == RAW_TAG) {
- film->video_type = CODEC_ID_RAWVIDEO;
+ film->video_type = AV_CODEC_ID_RAWVIDEO;
} else {
- film->video_type = CODEC_ID_NONE;
+ film->video_type = AV_CODEC_ID_NONE;
}
/* initialize the decoder streams */
@@ -149,7 +149,7 @@ static int film_read_header(AVFormatContext *s)
st->codec->width = AV_RB32(&scratch[16]);
st->codec->height = AV_RB32(&scratch[12]);
- if (film->video_type == CODEC_ID_RAWVIDEO) {
+ if (film->video_type == AV_CODEC_ID_RAWVIDEO) {
if (scratch[20] == 24) {
st->codec->pix_fmt = PIX_FMT_RGB24;
} else {
@@ -170,7 +170,7 @@ static int film_read_header(AVFormatContext *s)
st->codec->channels = film->audio_channels;
st->codec->sample_rate = film->audio_samplerate;
- if (film->audio_type == CODEC_ID_ADPCM_ADX) {
+ if (film->audio_type == AV_CODEC_ID_ADPCM_ADX) {
st->codec->bits_per_coded_sample = 18 * 8 / 32;
st->codec->block_align = st->codec->channels * 18;
st->need_parsing = AVSTREAM_PARSE_FULL;
@@ -219,10 +219,10 @@ static int film_read_header(AVFormatContext *s)
film->sample_table[i].stream = film->audio_stream_index;
film->sample_table[i].pts = audio_frame_counter;
- if (film->audio_type == CODEC_ID_ADPCM_ADX)
+ if (film->audio_type == AV_CODEC_ID_ADPCM_ADX)
audio_frame_counter += (film->sample_table[i].sample_size * 32 /
(18 * film->audio_channels));
- else if (film->audio_type != CODEC_ID_NONE)
+ else if (film->audio_type != AV_CODEC_ID_NONE)
audio_frame_counter += (film->sample_table[i].sample_size /
(film->audio_channels * film->audio_bits / 8));
} else {
@@ -257,14 +257,14 @@ static int film_read_packet(AVFormatContext *s,
/* do a special song and dance when loading FILM Cinepak chunks */
if ((sample->stream == film->video_stream_index) &&
- (film->video_type == CODEC_ID_CINEPAK)) {
+ (film->video_type == AV_CODEC_ID_CINEPAK)) {
pkt->pos= avio_tell(pb);
if (av_new_packet(pkt, sample->sample_size))
return AVERROR(ENOMEM);
avio_read(pb, pkt->data, sample->sample_size);
} else if ((sample->stream == film->audio_stream_index) &&
(film->audio_channels == 2) &&
- (film->audio_type != CODEC_ID_ADPCM_ADX)) {
+ (film->audio_type != AV_CODEC_ID_ADPCM_ADX)) {
/* stereo PCM needs to be interleaved */
if (ffio_limit(pb, sample->sample_size) != sample->sample_size)
diff --git a/libavformat/sierravmd.c b/libavformat/sierravmd.c
index cdeb1740ca..98aa5b8c09 100644
--- a/libavformat/sierravmd.c
+++ b/libavformat/sierravmd.c
@@ -111,7 +111,7 @@ static int vmd_read_header(AVFormatContext *s)
avpriv_set_pts_info(vst, 33, 1, 10);
vmd->video_stream_index = vst->index;
vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- vst->codec->codec_id = vmd->is_indeo3 ? CODEC_ID_INDEO3 : CODEC_ID_VMDVIDEO;
+ vst->codec->codec_id = vmd->is_indeo3 ? AV_CODEC_ID_INDEO3 : AV_CODEC_ID_VMDVIDEO;
vst->codec->codec_tag = 0; /* no fourcc */
vst->codec->width = AV_RL16(&vmd->vmd_header[12]);
vst->codec->height = AV_RL16(&vmd->vmd_header[14]);
@@ -131,7 +131,7 @@ static int vmd_read_header(AVFormatContext *s)
return AVERROR(ENOMEM);
vmd->audio_stream_index = st->index;
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- st->codec->codec_id = CODEC_ID_VMDAUDIO;
+ st->codec->codec_id = AV_CODEC_ID_VMDAUDIO;
st->codec->codec_tag = 0; /* no fourcc */
st->codec->channels = (vmd->vmd_header[811] & 0x80) ? 2 : 1;
st->codec->sample_rate = vmd->sample_rate;
diff --git a/libavformat/siff.c b/libavformat/siff.c
index 23d422edf0..df94dbfdd0 100644
--- a/libavformat/siff.c
+++ b/libavformat/siff.c
@@ -77,7 +77,7 @@ static int create_audio_stream(AVFormatContext *s, SIFFContext *c)
if (!ast)
return -1;
ast->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- ast->codec->codec_id = CODEC_ID_PCM_U8;
+ ast->codec->codec_id = AV_CODEC_ID_PCM_U8;
ast->codec->channels = 1;
ast->codec->bits_per_coded_sample = 8;
ast->codec->sample_rate = c->rate;
@@ -121,7 +121,7 @@ static int siff_parse_vbv1(AVFormatContext *s, SIFFContext *c, AVIOContext *pb)
if (!st)
return -1;
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- st->codec->codec_id = CODEC_ID_VB;
+ st->codec->codec_id = AV_CODEC_ID_VB;
st->codec->codec_tag = MKTAG('V', 'B', 'V', '1');
st->codec->width = width;
st->codec->height = height;
diff --git a/libavformat/smacker.c b/libavformat/smacker.c
index b52ba0c2f2..cf1ab858d8 100644
--- a/libavformat/smacker.c
+++ b/libavformat/smacker.c
@@ -163,7 +163,7 @@ static int smacker_read_header(AVFormatContext *s)
st->codec->height = smk->height;
st->codec->pix_fmt = PIX_FMT_PAL8;
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- st->codec->codec_id = CODEC_ID_SMACKVIDEO;
+ st->codec->codec_id = AV_CODEC_ID_SMACKVIDEO;
st->codec->codec_tag = smk->magic;
/* Smacker uses 100000 as internal timebase */
if(smk->pts_inc < 0)
@@ -182,20 +182,20 @@ static int smacker_read_header(AVFormatContext *s)
smk->indexes[i] = ast[i]->index;
ast[i]->codec->codec_type = AVMEDIA_TYPE_AUDIO;
if (smk->aflags[i] & SMK_AUD_BINKAUD) {
- ast[i]->codec->codec_id = CODEC_ID_BINKAUDIO_RDFT;
+ ast[i]->codec->codec_id = AV_CODEC_ID_BINKAUDIO_RDFT;
} else if (smk->aflags[i] & SMK_AUD_USEDCT) {
- ast[i]->codec->codec_id = CODEC_ID_BINKAUDIO_DCT;
+ ast[i]->codec->codec_id = AV_CODEC_ID_BINKAUDIO_DCT;
} else if (smk->aflags[i] & SMK_AUD_PACKED){
- ast[i]->codec->codec_id = CODEC_ID_SMACKAUDIO;
+ ast[i]->codec->codec_id = AV_CODEC_ID_SMACKAUDIO;
ast[i]->codec->codec_tag = MKTAG('S', 'M', 'K', 'A');
} else {
- ast[i]->codec->codec_id = CODEC_ID_PCM_U8;
+ ast[i]->codec->codec_id = AV_CODEC_ID_PCM_U8;
}
ast[i]->codec->channels = (smk->aflags[i] & SMK_AUD_STEREO) ? 2 : 1;
ast[i]->codec->sample_rate = smk->rates[i];
ast[i]->codec->bits_per_coded_sample = (smk->aflags[i] & SMK_AUD_16BITS) ? 16 : 8;
- if(ast[i]->codec->bits_per_coded_sample == 16 && ast[i]->codec->codec_id == CODEC_ID_PCM_U8)
- ast[i]->codec->codec_id = CODEC_ID_PCM_S16LE;
+ if(ast[i]->codec->bits_per_coded_sample == 16 && ast[i]->codec->codec_id == AV_CODEC_ID_PCM_U8)
+ ast[i]->codec->codec_id = AV_CODEC_ID_PCM_S16LE;
avpriv_set_pts_info(ast[i], 64, 1, ast[i]->codec->sample_rate
* ast[i]->codec->channels * ast[i]->codec->bits_per_coded_sample / 8);
}
diff --git a/libavformat/smjpeg.c b/libavformat/smjpeg.c
index 82316ed448..4edf5e8ac4 100644
--- a/libavformat/smjpeg.c
+++ b/libavformat/smjpeg.c
@@ -29,12 +29,12 @@
#include "smjpeg.h"
const AVCodecTag ff_codec_smjpeg_video_tags[] = {
- { CODEC_ID_MJPEG, MKTAG('J', 'F', 'I', 'F') },
- { CODEC_ID_NONE, 0 },
+ { AV_CODEC_ID_MJPEG, MKTAG('J', 'F', 'I', 'F') },
+ { AV_CODEC_ID_NONE, 0 },
};
const AVCodecTag ff_codec_smjpeg_audio_tags[] = {
- { CODEC_ID_ADPCM_IMA_SMJPEG, MKTAG('A', 'P', 'C', 'M') },
- { CODEC_ID_PCM_S16LE, MKTAG('N', 'O', 'N', 'E') },
- { CODEC_ID_NONE, 0 },
+ { AV_CODEC_ID_ADPCM_IMA_SMJPEG, MKTAG('A', 'P', 'C', 'M') },
+ { AV_CODEC_ID_PCM_S16LE, MKTAG('N', 'O', 'N', 'E') },
+ { AV_CODEC_ID_NONE, 0 },
};
diff --git a/libavformat/smjpegenc.c b/libavformat/smjpegenc.c
index d0451c32b2..6dbaa2358c 100644
--- a/libavformat/smjpegenc.c
+++ b/libavformat/smjpegenc.c
@@ -139,8 +139,8 @@ AVOutputFormat ff_smjpeg_muxer = {
.name = "smjpeg",
.long_name = NULL_IF_CONFIG_SMALL("Loki SDL MJPEG"),
.priv_data_size = sizeof(SMJPEGMuxContext),
- .audio_codec = CODEC_ID_PCM_S16LE,
- .video_codec = CODEC_ID_MJPEG,
+ .audio_codec = AV_CODEC_ID_PCM_S16LE,
+ .video_codec = AV_CODEC_ID_MJPEG,
.write_header = smjpeg_write_header,
.write_packet = smjpeg_write_packet,
.write_trailer = smjpeg_write_trailer,
diff --git a/libavformat/smush.c b/libavformat/smush.c
index 79e23747c2..d9a58c6cb5 100644
--- a/libavformat/smush.c
+++ b/libavformat/smush.c
@@ -135,7 +135,7 @@ static int smush_read_header(AVFormatContext *ctx)
vst->duration =
vst->nb_frames = nframes;
vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- vst->codec->codec_id = CODEC_ID_SANM;
+ vst->codec->codec_id = AV_CODEC_ID_SANM;
vst->codec->codec_tag = 0;
vst->codec->width = width;
vst->codec->height = height;
@@ -162,7 +162,7 @@ static int smush_read_header(AVFormatContext *ctx)
ast->start_time = 0;
ast->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- ast->codec->codec_id = CODEC_ID_VIMA;
+ ast->codec->codec_id = AV_CODEC_ID_VIMA;
ast->codec->codec_tag = 0;
ast->codec->sample_rate = sample_rate;
ast->codec->channels = channels;
diff --git a/libavformat/sol.c b/libavformat/sol.c
index 7df107a946..aca5a860eb 100644
--- a/libavformat/sol.c
+++ b/libavformat/sol.c
@@ -47,21 +47,21 @@ static int sol_probe(AVProbeData *p)
#define SOL_16BIT 4
#define SOL_STEREO 16
-static enum CodecID sol_codec_id(int magic, int type)
+static enum AVCodecID sol_codec_id(int magic, int type)
{
if (magic == 0x0B8D)
{
- if (type & SOL_DPCM) return CODEC_ID_SOL_DPCM;
- else return CODEC_ID_PCM_U8;
+ if (type & SOL_DPCM) return AV_CODEC_ID_SOL_DPCM;
+ else return AV_CODEC_ID_PCM_U8;
}
if (type & SOL_DPCM)
{
- if (type & SOL_16BIT) return CODEC_ID_SOL_DPCM;
- else if (magic == 0x0C8D) return CODEC_ID_SOL_DPCM;
- else return CODEC_ID_SOL_DPCM;
+ if (type & SOL_16BIT) return AV_CODEC_ID_SOL_DPCM;
+ else if (magic == 0x0C8D) return AV_CODEC_ID_SOL_DPCM;
+ else return AV_CODEC_ID_SOL_DPCM;
}
- if (type & SOL_16BIT) return CODEC_ID_PCM_S16LE;
- return CODEC_ID_PCM_U8;
+ if (type & SOL_16BIT) return AV_CODEC_ID_PCM_S16LE;
+ return AV_CODEC_ID_PCM_U8;
}
static int sol_codec_type(int magic, int type)
@@ -87,7 +87,7 @@ static int sol_read_header(AVFormatContext *s)
unsigned int magic,tag;
AVIOContext *pb = s->pb;
unsigned int id, channels, rate, type;
- enum CodecID codec;
+ enum AVCodecID codec;
AVStream *st;
/* check ".snd" header */
@@ -104,7 +104,7 @@ static int sol_read_header(AVFormatContext *s)
codec = sol_codec_id(magic, type);
channels = sol_channels(magic, type);
- if (codec == CODEC_ID_SOL_DPCM)
+ if (codec == AV_CODEC_ID_SOL_DPCM)
id = sol_codec_type(magic, type);
else id = 0;
diff --git a/libavformat/soxdec.c b/libavformat/soxdec.c
index fe59fd47a2..4c951bbd73 100644
--- a/libavformat/soxdec.c
+++ b/libavformat/soxdec.c
@@ -58,14 +58,14 @@ static int sox_read_header(AVFormatContext *s)
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
if (avio_rl32(pb) == SOX_TAG) {
- st->codec->codec_id = CODEC_ID_PCM_S32LE;
+ st->codec->codec_id = AV_CODEC_ID_PCM_S32LE;
header_size = avio_rl32(pb);
avio_skip(pb, 8); /* sample count */
sample_rate = av_int2double(avio_rl64(pb));
st->codec->channels = avio_rl32(pb);
comment_size = avio_rl32(pb);
} else {
- st->codec->codec_id = CODEC_ID_PCM_S32BE;
+ st->codec->codec_id = AV_CODEC_ID_PCM_S32BE;
header_size = avio_rb32(pb);
avio_skip(pb, 8); /* sample count */
sample_rate = av_int2double(avio_rb64(pb));
diff --git a/libavformat/soxenc.c b/libavformat/soxenc.c
index e68b7e568f..6b4412de18 100644
--- a/libavformat/soxenc.c
+++ b/libavformat/soxenc.c
@@ -55,14 +55,14 @@ static int sox_write_header(AVFormatContext *s)
sox->header_size = SOX_FIXED_HDR + comment_size;
- if (enc->codec_id == CODEC_ID_PCM_S32LE) {
+ if (enc->codec_id == AV_CODEC_ID_PCM_S32LE) {
ffio_wfourcc(pb, ".SoX");
avio_wl32(pb, sox->header_size);
avio_wl64(pb, 0); /* number of samples */
avio_wl64(pb, av_double2int(enc->sample_rate));
avio_wl32(pb, enc->channels);
avio_wl32(pb, comment_size);
- } else if (enc->codec_id == CODEC_ID_PCM_S32BE) {
+ } else if (enc->codec_id == AV_CODEC_ID_PCM_S32BE) {
ffio_wfourcc(pb, "XoS.");
avio_wb32(pb, sox->header_size);
avio_wb64(pb, 0); /* number of samples */
@@ -103,7 +103,7 @@ static int sox_write_trailer(AVFormatContext *s)
int64_t file_size = avio_tell(pb);
int64_t num_samples = (file_size - sox->header_size - 4LL) >> 2LL;
avio_seek(pb, 8, SEEK_SET);
- if (enc->codec_id == CODEC_ID_PCM_S32LE) {
+ if (enc->codec_id == AV_CODEC_ID_PCM_S32LE) {
avio_wl64(pb, num_samples);
} else
avio_wb64(pb, num_samples);
@@ -120,8 +120,8 @@ AVOutputFormat ff_sox_muxer = {
.long_name = NULL_IF_CONFIG_SMALL("SoX native"),
.extensions = "sox",
.priv_data_size = sizeof(SoXContext),
- .audio_codec = CODEC_ID_PCM_S32LE,
- .video_codec = CODEC_ID_NONE,
+ .audio_codec = AV_CODEC_ID_PCM_S32LE,
+ .video_codec = AV_CODEC_ID_NONE,
.write_header = sox_write_header,
.write_packet = sox_write_packet,
.write_trailer = sox_write_trailer,
diff --git a/libavformat/spdifdec.c b/libavformat/spdifdec.c
index e8faa92903..dce33461fe 100644
--- a/libavformat/spdifdec.c
+++ b/libavformat/spdifdec.c
@@ -33,7 +33,7 @@
static int spdif_get_offset_and_codec(AVFormatContext *s,
enum IEC61937DataType data_type,
const char *buf, int *offset,
- enum CodecID *codec)
+ enum AVCodecID *codec)
{
AACADTSHeaderInfo aac_hdr;
GetBitContext gbc;
@@ -41,19 +41,19 @@ static int spdif_get_offset_and_codec(AVFormatContext *s,
switch (data_type & 0xff) {
case IEC61937_AC3:
*offset = AC3_FRAME_SIZE << 2;
- *codec = CODEC_ID_AC3;
+ *codec = AV_CODEC_ID_AC3;
break;
case IEC61937_MPEG1_LAYER1:
*offset = spdif_mpeg_pkt_offset[1][0];
- *codec = CODEC_ID_MP1;
+ *codec = AV_CODEC_ID_MP1;
break;
case IEC61937_MPEG1_LAYER23:
*offset = spdif_mpeg_pkt_offset[1][0];
- *codec = CODEC_ID_MP3;
+ *codec = AV_CODEC_ID_MP3;
break;
case IEC61937_MPEG2_EXT:
*offset = 4608;
- *codec = CODEC_ID_MP3;
+ *codec = AV_CODEC_ID_MP3;
break;
case IEC61937_MPEG2_AAC:
init_get_bits(&gbc, buf, AAC_ADTS_HEADER_SIZE * 8);
@@ -63,31 +63,31 @@ static int spdif_get_offset_and_codec(AVFormatContext *s,
return AVERROR_INVALIDDATA;
}
*offset = aac_hdr.samples << 2;
- *codec = CODEC_ID_AAC;
+ *codec = AV_CODEC_ID_AAC;
break;
case IEC61937_MPEG2_LAYER1_LSF:
*offset = spdif_mpeg_pkt_offset[0][0];
- *codec = CODEC_ID_MP1;
+ *codec = AV_CODEC_ID_MP1;
break;
case IEC61937_MPEG2_LAYER2_LSF:
*offset = spdif_mpeg_pkt_offset[0][1];
- *codec = CODEC_ID_MP2;
+ *codec = AV_CODEC_ID_MP2;
break;
case IEC61937_MPEG2_LAYER3_LSF:
*offset = spdif_mpeg_pkt_offset[0][2];
- *codec = CODEC_ID_MP3;
+ *codec = AV_CODEC_ID_MP3;
break;
case IEC61937_DTS1:
*offset = 2048;
- *codec = CODEC_ID_DTS;
+ *codec = AV_CODEC_ID_DTS;
break;
case IEC61937_DTS2:
*offset = 4096;
- *codec = CODEC_ID_DTS;
+ *codec = AV_CODEC_ID_DTS;
break;
case IEC61937_DTS3:
*offset = 8192;
- *codec = CODEC_ID_DTS;
+ *codec = AV_CODEC_ID_DTS;
break;
default:
if (s) { /* be silent during a probe */
@@ -112,7 +112,7 @@ static int spdif_probe(AVProbeData *p)
int sync_codes = 0;
int consecutive_codes = 0;
int offset;
- enum CodecID codec;
+ enum AVCodecID codec;
for (; buf < probe_end; buf++) {
state = (state << 8) | *buf;
@@ -165,7 +165,7 @@ static int spdif_read_packet(AVFormatContext *s, AVPacket *pkt)
{
AVIOContext *pb = s->pb;
enum IEC61937DataType data_type;
- enum CodecID codec_id;
+ enum AVCodecID codec_id;
uint32_t state = 0;
int pkt_size_bits, offset, ret;
diff --git a/libavformat/spdifenc.c b/libavformat/spdifenc.c
index da688aa393..9489939ee6 100644
--- a/libavformat/spdifenc.c
+++ b/libavformat/spdifenc.c
@@ -442,24 +442,24 @@ static int spdif_write_header(AVFormatContext *s)
IEC61937Context *ctx = s->priv_data;
switch (s->streams[0]->codec->codec_id) {
- case CODEC_ID_AC3:
+ case AV_CODEC_ID_AC3:
ctx->header_info = spdif_header_ac3;
break;
- case CODEC_ID_EAC3:
+ case AV_CODEC_ID_EAC3:
ctx->header_info = spdif_header_eac3;
break;
- case CODEC_ID_MP1:
- case CODEC_ID_MP2:
- case CODEC_ID_MP3:
+ case AV_CODEC_ID_MP1:
+ case AV_CODEC_ID_MP2:
+ case AV_CODEC_ID_MP3:
ctx->header_info = spdif_header_mpeg;
break;
- case CODEC_ID_DTS:
+ case AV_CODEC_ID_DTS:
ctx->header_info = spdif_header_dts;
break;
- case CODEC_ID_AAC:
+ case AV_CODEC_ID_AAC:
ctx->header_info = spdif_header_aac;
break;
- case CODEC_ID_TRUEHD:
+ case AV_CODEC_ID_TRUEHD:
ctx->header_info = spdif_header_truehd;
ctx->hd_buf = av_malloc(MAT_FRAME_SIZE);
if (!ctx->hd_buf)
@@ -547,8 +547,8 @@ AVOutputFormat ff_spdif_muxer = {
.long_name = NULL_IF_CONFIG_SMALL("IEC 61937 (used on S/PDIF - IEC958)"),
.extensions = "spdif",
.priv_data_size = sizeof(IEC61937Context),
- .audio_codec = CODEC_ID_AC3,
- .video_codec = CODEC_ID_NONE,
+ .audio_codec = AV_CODEC_ID_AC3,
+ .video_codec = AV_CODEC_ID_NONE,
.write_header = spdif_write_header,
.write_packet = spdif_write_packet,
.write_trailer = spdif_write_trailer,
diff --git a/libavformat/srtdec.c b/libavformat/srtdec.c
index 28b18b4b99..a66ced377e 100644
--- a/libavformat/srtdec.c
+++ b/libavformat/srtdec.c
@@ -47,7 +47,7 @@ static int srt_read_header(AVFormatContext *s)
return AVERROR(ENOMEM);
avpriv_set_pts_info(st, 64, 1, 1000);
st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;
- st->codec->codec_id = CODEC_ID_SRT;
+ st->codec->codec_id = AV_CODEC_ID_SRT;
return 0;
}
diff --git a/libavformat/srtenc.c b/libavformat/srtenc.c
index 171c45b445..7fe559f487 100644
--- a/libavformat/srtenc.c
+++ b/libavformat/srtenc.c
@@ -41,8 +41,8 @@ static int srt_write_header(AVFormatContext *avf)
"SRT supports only a single subtitles stream.\n");
return AVERROR(EINVAL);
}
- if (avf->streams[0]->codec->codec_id != CODEC_ID_TEXT &&
- avf->streams[0]->codec->codec_id != CODEC_ID_SRT) {
+ if (avf->streams[0]->codec->codec_id != AV_CODEC_ID_TEXT &&
+ avf->streams[0]->codec->codec_id != AV_CODEC_ID_SRT) {
av_log(avf, AV_LOG_ERROR,
"Unsupported subtitles codec: %s\n",
avcodec_get_name(avf->streams[0]->codec->codec_id));
@@ -55,7 +55,7 @@ static int srt_write_header(AVFormatContext *avf)
static int srt_write_packet(AVFormatContext *avf, AVPacket *pkt)
{
SRTContext *srt = avf->priv_data;
- int write_ts = avf->streams[0]->codec->codec_id != CODEC_ID_SRT;
+ int write_ts = avf->streams[0]->codec->codec_id != AV_CODEC_ID_SRT;
srt->index++;
if (write_ts) {
@@ -95,5 +95,5 @@ AVOutputFormat ff_srt_muxer = {
.write_header = srt_write_header,
.write_packet = srt_write_packet,
.flags = AVFMT_VARIABLE_FPS,
- .subtitle_codec = CODEC_ID_TEXT,
+ .subtitle_codec = AV_CODEC_ID_TEXT,
};
diff --git a/libavformat/subviewerdec.c b/libavformat/subviewerdec.c
index ac68fc151d..e708a28621 100644
--- a/libavformat/subviewerdec.c
+++ b/libavformat/subviewerdec.c
@@ -76,7 +76,7 @@ static int subviewer_read_header(AVFormatContext *s)
return AVERROR(ENOMEM);
avpriv_set_pts_info(st, 64, 1, 100);
st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;
- st->codec->codec_id = CODEC_ID_SUBVIEWER;
+ st->codec->codec_id = AV_CODEC_ID_SUBVIEWER;
av_bprint_init(&header, 0, AV_BPRINT_SIZE_UNLIMITED);
diff --git a/libavformat/swf.h b/libavformat/swf.h
index 5326192871..2f920f7dd3 100644
--- a/libavformat/swf.h
+++ b/libavformat/swf.h
@@ -92,18 +92,18 @@ typedef struct {
} SWFContext;
static const AVCodecTag swf_codec_tags[] = {
- {CODEC_ID_FLV1, 0x02},
- {CODEC_ID_VP6F, 0x04},
- {CODEC_ID_NONE, 0},
+ { AV_CODEC_ID_FLV1, 0x02},
+ { AV_CODEC_ID_VP6F, 0x04},
+ { AV_CODEC_ID_NONE, 0},
};
static const AVCodecTag swf_audio_codec_tags[] = {
- {CODEC_ID_PCM_S16LE, 0x00},
- {CODEC_ID_ADPCM_SWF, 0x01},
- {CODEC_ID_MP3, 0x02},
- {CODEC_ID_PCM_S16LE, 0x03},
- //{CODEC_ID_NELLYMOSER, 0x06},
- {CODEC_ID_NONE, 0},
+ { AV_CODEC_ID_PCM_S16LE, 0x00},
+ { AV_CODEC_ID_ADPCM_SWF, 0x01},
+ { AV_CODEC_ID_MP3, 0x02},
+ { AV_CODEC_ID_PCM_S16LE, 0x03},
+ //{ AV_CODEC_ID_NELLYMOSER, 0x06},
+ { AV_CODEC_ID_NONE, 0},
};
#endif /* AVFORMAT_SWF_H */
diff --git a/libavformat/swfdec.c b/libavformat/swfdec.c
index f74f453a85..1e974fef69 100644
--- a/libavformat/swfdec.c
+++ b/libavformat/swfdec.c
@@ -211,7 +211,7 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt)
for (i = 0; i < s->nb_streams; i++) {
st = s->streams[i];
if (st->codec->codec_type == AVMEDIA_TYPE_AUDIO && st->id == -1) {
- if (st->codec->codec_id == CODEC_ID_MP3) {
+ if (st->codec->codec_id == AV_CODEC_ID_MP3) {
avio_skip(pb, 4);
if ((res = av_get_packet(pb, pkt, len-4)) < 0)
return res;
@@ -227,7 +227,7 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt)
} else if (tag == TAG_JPEG2) {
for (i=0; i<s->nb_streams; i++) {
st = s->streams[i];
- if (st->codec->codec_id == CODEC_ID_MJPEG && st->id == -2)
+ if (st->codec->codec_id == AV_CODEC_ID_MJPEG && st->id == -2)
break;
}
if (i == s->nb_streams) {
@@ -236,7 +236,7 @@ static int swf_read_packet(AVFormatContext *s, AVPacket *pkt)
return -1;
vst->id = -2; /* -2 to avoid clash with video stream and audio stream */
vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- vst->codec->codec_id = CODEC_ID_MJPEG;
+ vst->codec->codec_id = AV_CODEC_ID_MJPEG;
avpriv_set_pts_info(vst, 64, 256, swf->frame_rate);
st = vst;
}
diff --git a/libavformat/swfenc.c b/libavformat/swfenc.c
index 9eb2540955..3443da0ed2 100644
--- a/libavformat/swfenc.c
+++ b/libavformat/swfenc.c
@@ -187,7 +187,7 @@ static int swf_write_header(AVFormatContext *s)
for(i=0;i<s->nb_streams;i++) {
AVCodecContext *enc = s->streams[i]->codec;
if (enc->codec_type == AVMEDIA_TYPE_AUDIO) {
- if (enc->codec_id == CODEC_ID_MP3) {
+ if (enc->codec_id == AV_CODEC_ID_MP3) {
swf->audio_enc = enc;
swf->audio_fifo= av_fifo_alloc(AUDIO_FIFO_SIZE);
if (!swf->audio_fifo)
@@ -197,9 +197,9 @@ static int swf_write_header(AVFormatContext *s)
return -1;
}
} else {
- if (enc->codec_id == CODEC_ID_VP6F ||
- enc->codec_id == CODEC_ID_FLV1 ||
- enc->codec_id == CODEC_ID_MJPEG) {
+ if (enc->codec_id == AV_CODEC_ID_VP6F ||
+ enc->codec_id == AV_CODEC_ID_FLV1 ||
+ enc->codec_id == AV_CODEC_ID_MJPEG) {
swf->video_enc = enc;
} else {
av_log(s, AV_LOG_ERROR, "SWF muxer only supports VP6, FLV1 and MJPEG\n");
@@ -230,9 +230,9 @@ static int swf_write_header(AVFormatContext *s)
if (!strcmp("avm2", s->oformat->name))
version = 9;
- else if (swf->video_enc && swf->video_enc->codec_id == CODEC_ID_VP6F)
+ else if (swf->video_enc && swf->video_enc->codec_id == AV_CODEC_ID_VP6F)
version = 8; /* version 8 and above support VP6 codec */
- else if (swf->video_enc && swf->video_enc->codec_id == CODEC_ID_FLV1)
+ else if (swf->video_enc && swf->video_enc->codec_id == AV_CODEC_ID_FLV1)
version = 6; /* version 6 and above support FLV1 codec */
else
version = 4; /* version 4 for mpeg audio support */
@@ -254,7 +254,7 @@ static int swf_write_header(AVFormatContext *s)
}
/* define a shape with the jpeg inside */
- if (swf->video_enc && swf->video_enc->codec_id == CODEC_ID_MJPEG) {
+ if (swf->video_enc && swf->video_enc->codec_id == AV_CODEC_ID_MJPEG) {
put_swf_tag(s, TAG_DEFINESHAPE);
avio_wl16(pb, SHAPE_ID); /* ID of shape */
@@ -297,7 +297,7 @@ static int swf_write_header(AVFormatContext *s)
put_swf_end_tag(s);
}
- if (swf->audio_enc && swf->audio_enc->codec_id == CODEC_ID_MP3) {
+ if (swf->audio_enc && swf->audio_enc->codec_id == AV_CODEC_ID_MP3) {
int v = 0;
/* start sound */
@@ -337,8 +337,8 @@ static int swf_write_video(AVFormatContext *s,
if (swf->swf_frame_number == 16000)
av_log(enc, AV_LOG_INFO, "warning: Flash Player limit of 16000 frames reached\n");
- if (enc->codec_id == CODEC_ID_VP6F ||
- enc->codec_id == CODEC_ID_FLV1) {
+ if (enc->codec_id == AV_CODEC_ID_VP6F ||
+ enc->codec_id == AV_CODEC_ID_FLV1) {
if (swf->video_frame_number == 0) {
/* create a new video object */
put_swf_tag(s, TAG_VIDEOSTREAM);
@@ -376,7 +376,7 @@ static int swf_write_video(AVFormatContext *s,
avio_wl16(pb, swf->video_frame_number++);
avio_write(pb, buf, size);
put_swf_end_tag(s);
- } else if (enc->codec_id == CODEC_ID_MJPEG) {
+ } else if (enc->codec_id == AV_CODEC_ID_MJPEG) {
if (swf->swf_frame_number > 0) {
/* remove the shape */
put_swf_tag(s, TAG_REMOVEOBJECT);
@@ -509,8 +509,8 @@ AVOutputFormat ff_swf_muxer = {
.mime_type = "application/x-shockwave-flash",
.extensions = "swf",
.priv_data_size = sizeof(SWFContext),
- .audio_codec = CODEC_ID_MP3,
- .video_codec = CODEC_ID_FLV1,
+ .audio_codec = AV_CODEC_ID_MP3,
+ .video_codec = AV_CODEC_ID_FLV1,
.write_header = swf_write_header,
.write_packet = swf_write_packet,
.write_trailer = swf_write_trailer,
@@ -523,8 +523,8 @@ AVOutputFormat ff_avm2_muxer = {
.long_name = NULL_IF_CONFIG_SMALL("SWF (ShockWave Flash) (AVM2)"),
.mime_type = "application/x-shockwave-flash",
.priv_data_size = sizeof(SWFContext),
- .audio_codec = CODEC_ID_MP3,
- .video_codec = CODEC_ID_FLV1,
+ .audio_codec = AV_CODEC_ID_MP3,
+ .video_codec = AV_CODEC_ID_FLV1,
.write_header = swf_write_header,
.write_packet = swf_write_packet,
.write_trailer = swf_write_trailer,
diff --git a/libavformat/thp.c b/libavformat/thp.c
index e71cbc4bd4..0e96b53a4b 100644
--- a/libavformat/thp.c
+++ b/libavformat/thp.c
@@ -105,7 +105,7 @@ static int thp_read_header(AVFormatContext *s)
is required. */
avpriv_set_pts_info(st, 64, thp->fps.den, thp->fps.num);
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- st->codec->codec_id = CODEC_ID_THP;
+ st->codec->codec_id = AV_CODEC_ID_THP;
st->codec->codec_tag = 0; /* no fourcc */
st->codec->width = avio_rb32(pb);
st->codec->height = avio_rb32(pb);
@@ -125,7 +125,7 @@ static int thp_read_header(AVFormatContext *s)
return AVERROR(ENOMEM);
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- st->codec->codec_id = CODEC_ID_ADPCM_THP;
+ st->codec->codec_id = AV_CODEC_ID_ADPCM_THP;
st->codec->codec_tag = 0; /* no fourcc */
st->codec->channels = avio_rb32(pb); /* numChannels. */
st->codec->sample_rate = avio_rb32(pb); /* Frequency. */
diff --git a/libavformat/tiertexseq.c b/libavformat/tiertexseq.c
index f7a9ff3bb3..88941b7311 100644
--- a/libavformat/tiertexseq.c
+++ b/libavformat/tiertexseq.c
@@ -214,7 +214,7 @@ static int seq_read_header(AVFormatContext *s)
avpriv_set_pts_info(st, 32, 1, SEQ_FRAME_RATE);
seq->video_stream_index = st->index;
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- st->codec->codec_id = CODEC_ID_TIERTEXSEQVIDEO;
+ st->codec->codec_id = AV_CODEC_ID_TIERTEXSEQVIDEO;
st->codec->codec_tag = 0; /* no fourcc */
st->codec->width = SEQ_FRAME_W;
st->codec->height = SEQ_FRAME_H;
@@ -228,7 +228,7 @@ static int seq_read_header(AVFormatContext *s)
avpriv_set_pts_info(st, 32, 1, SEQ_SAMPLE_RATE);
seq->audio_stream_index = st->index;
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- st->codec->codec_id = CODEC_ID_PCM_S16BE;
+ st->codec->codec_id = AV_CODEC_ID_PCM_S16BE;
st->codec->codec_tag = 0; /* no tag */
st->codec->channels = 1;
st->codec->sample_rate = SEQ_SAMPLE_RATE;
diff --git a/libavformat/tmv.c b/libavformat/tmv.c
index c1d6044fa0..513436982c 100644
--- a/libavformat/tmv.c
+++ b/libavformat/tmv.c
@@ -111,7 +111,7 @@ static int tmv_read_header(AVFormatContext *s)
}
ast->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- ast->codec->codec_id = CODEC_ID_PCM_U8;
+ ast->codec->codec_id = AV_CODEC_ID_PCM_U8;
ast->codec->channels = features & TMV_STEREO ? 2 : 1;
ast->codec->bits_per_coded_sample = 8;
ast->codec->bit_rate = ast->codec->sample_rate *
@@ -123,7 +123,7 @@ static int tmv_read_header(AVFormatContext *s)
av_reduce(&fps.num, &fps.den, fps.num, fps.den, 0xFFFFFFFFLL);
vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- vst->codec->codec_id = CODEC_ID_TMV;
+ vst->codec->codec_id = AV_CODEC_ID_TMV;
vst->codec->pix_fmt = PIX_FMT_PAL8;
vst->codec->width = char_cols * 8;
vst->codec->height = char_rows * 8;
diff --git a/libavformat/tta.c b/libavformat/tta.c
index dc58dcda4d..1440c8000a 100644
--- a/libavformat/tta.c
+++ b/libavformat/tta.c
@@ -102,7 +102,7 @@ static int tta_read_header(AVFormatContext *s)
avio_skip(s->pb, 4); // seektable crc
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- st->codec->codec_id = CODEC_ID_TTA;
+ st->codec->codec_id = AV_CODEC_ID_TTA;
st->codec->channels = channels;
st->codec->sample_rate = samplerate;
st->codec->bits_per_coded_sample = bps;
diff --git a/libavformat/tty.c b/libavformat/tty.c
index 6d8a6eb541..b86dd79ca0 100644
--- a/libavformat/tty.c
+++ b/libavformat/tty.c
@@ -85,7 +85,7 @@ static int read_header(AVFormatContext *avctx)
}
st->codec->codec_tag = 0;
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- st->codec->codec_id = CODEC_ID_ANSI;
+ st->codec->codec_id = AV_CODEC_ID_ANSI;
if (s->video_size && (ret = av_parse_video_size(&width, &height, s->video_size)) < 0) {
av_log (avctx, AV_LOG_ERROR, "Couldn't parse video size.\n");
diff --git a/libavformat/txd.c b/libavformat/txd.c
index f6060330ba..9e02d874ad 100644
--- a/libavformat/txd.c
+++ b/libavformat/txd.c
@@ -44,7 +44,7 @@ static int txd_read_header(AVFormatContext *s) {
if (!st)
return AVERROR(ENOMEM);
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- st->codec->codec_id = CODEC_ID_TXD;
+ st->codec->codec_id = AV_CODEC_ID_TXD;
st->codec->time_base.den = 5;
st->codec->time_base.num = 1;
/* the parameters will be extracted from the compressed bitstream */
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 23b72b5b7b..be86a87fc1 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -218,7 +218,7 @@ AVOutputFormat *av_guess_format(const char *short_name, const char *filename,
#if CONFIG_IMAGE2_MUXER
if (!short_name && filename &&
av_filename_number_test(filename) &&
- ff_guess_image2_codec(filename) != CODEC_ID_NONE) {
+ ff_guess_image2_codec(filename) != AV_CODEC_ID_NONE) {
return av_guess_format("image2", NULL, NULL);
}
#endif
@@ -243,17 +243,17 @@ AVOutputFormat *av_guess_format(const char *short_name, const char *filename,
return fmt_found;
}
-enum CodecID av_guess_codec(AVOutputFormat *fmt, const char *short_name,
+enum AVCodecID av_guess_codec(AVOutputFormat *fmt, const char *short_name,
const char *filename, const char *mime_type, enum AVMediaType type){
if(type == AVMEDIA_TYPE_VIDEO){
- enum CodecID codec_id= CODEC_ID_NONE;
+ enum AVCodecID codec_id= AV_CODEC_ID_NONE;
#if CONFIG_IMAGE2_MUXER
if(!strcmp(fmt->name, "image2") || !strcmp(fmt->name, "image2pipe")){
codec_id= ff_guess_image2_codec(filename);
}
#endif
- if(codec_id == CODEC_ID_NONE)
+ if(codec_id == AV_CODEC_ID_NONE)
codec_id= fmt->video_codec;
return codec_id;
}else if(type == AVMEDIA_TYPE_AUDIO)
@@ -261,7 +261,7 @@ enum CodecID av_guess_codec(AVOutputFormat *fmt, const char *short_name,
else if (type == AVMEDIA_TYPE_SUBTITLE)
return fmt->subtitle_codec;
else
- return CODEC_ID_NONE;
+ return AV_CODEC_ID_NONE;
}
AVInputFormat *av_find_input_format(const char *short_name)
@@ -399,17 +399,17 @@ AVInputFormat *av_probe_input_format(AVProbeData *pd, int is_opened){
static int set_codec_from_probe_data(AVFormatContext *s, AVStream *st, AVProbeData *pd)
{
static const struct {
- const char *name; enum CodecID id; enum AVMediaType type;
+ const char *name; enum AVCodecID id; enum AVMediaType type;
} fmt_id_type[] = {
- { "aac" , CODEC_ID_AAC , AVMEDIA_TYPE_AUDIO },
- { "ac3" , CODEC_ID_AC3 , AVMEDIA_TYPE_AUDIO },
- { "dts" , CODEC_ID_DTS , AVMEDIA_TYPE_AUDIO },
- { "eac3" , CODEC_ID_EAC3 , AVMEDIA_TYPE_AUDIO },
- { "h264" , CODEC_ID_H264 , AVMEDIA_TYPE_VIDEO },
- { "loas" , CODEC_ID_AAC_LATM , AVMEDIA_TYPE_AUDIO },
- { "m4v" , CODEC_ID_MPEG4 , AVMEDIA_TYPE_VIDEO },
- { "mp3" , CODEC_ID_MP3 , AVMEDIA_TYPE_AUDIO },
- { "mpegvideo", CODEC_ID_MPEG2VIDEO, AVMEDIA_TYPE_VIDEO },
+ { "aac" , AV_CODEC_ID_AAC , AVMEDIA_TYPE_AUDIO },
+ { "ac3" , AV_CODEC_ID_AC3 , AVMEDIA_TYPE_AUDIO },
+ { "dts" , AV_CODEC_ID_DTS , AVMEDIA_TYPE_AUDIO },
+ { "eac3" , AV_CODEC_ID_EAC3 , AVMEDIA_TYPE_AUDIO },
+ { "h264" , AV_CODEC_ID_H264 , AVMEDIA_TYPE_VIDEO },
+ { "loas" , AV_CODEC_ID_AAC_LATM , AVMEDIA_TYPE_AUDIO },
+ { "m4v" , AV_CODEC_ID_MPEG4 , AVMEDIA_TYPE_VIDEO },
+ { "mp3" , AV_CODEC_ID_MP3 , AVMEDIA_TYPE_AUDIO },
+ { "mpegvideo", AV_CODEC_ID_MPEG2VIDEO, AVMEDIA_TYPE_VIDEO },
{ 0 }
};
int score;
@@ -698,12 +698,12 @@ no_packet:
if(end || av_log2(pd->buf_size) != av_log2(pd->buf_size - pkt->size)){
int score= set_codec_from_probe_data(s, st, pd);
- if( (st->codec->codec_id != CODEC_ID_NONE && score > AVPROBE_SCORE_MAX/4)
+ if( (st->codec->codec_id != AV_CODEC_ID_NONE && score > AVPROBE_SCORE_MAX/4)
|| end){
pd->buf_size=0;
av_freep(&pd->buf);
st->request_probe= -1;
- if(st->codec->codec_id != CODEC_ID_NONE){
+ if(st->codec->codec_id != AV_CODEC_ID_NONE){
av_log(s, AV_LOG_DEBUG, "probed stream %d\n", st->index);
}else
av_log(s, AV_LOG_WARNING, "probed stream %d failed\n", st->index);
@@ -799,11 +799,11 @@ int av_read_packet(AVFormatContext *s, AVPacket *pkt)
static int determinable_frame_size(AVCodecContext *avctx)
{
- if (/*avctx->codec_id == CODEC_ID_AAC ||*/
- avctx->codec_id == CODEC_ID_MP1 ||
- avctx->codec_id == CODEC_ID_MP2 ||
- avctx->codec_id == CODEC_ID_MP3/* ||
- avctx->codec_id == CODEC_ID_CELT*/)
+ if (/*avctx->codec_id == AV_CODEC_ID_AAC ||*/
+ avctx->codec_id == AV_CODEC_ID_MP1 ||
+ avctx->codec_id == AV_CODEC_ID_MP2 ||
+ avctx->codec_id == AV_CODEC_ID_MP3/* ||
+ avctx->codec_id == AV_CODEC_ID_CELT*/)
return 1;
return 0;
}
@@ -878,22 +878,22 @@ static int is_intra_only(AVCodecContext *enc){
return 1;
}else if(enc->codec_type == AVMEDIA_TYPE_VIDEO){
switch(enc->codec_id){
- case CODEC_ID_MJPEG:
- case CODEC_ID_MJPEGB:
- case CODEC_ID_LJPEG:
- case CODEC_ID_PRORES:
- case CODEC_ID_RAWVIDEO:
- case CODEC_ID_V210:
- case CODEC_ID_DVVIDEO:
- case CODEC_ID_HUFFYUV:
- case CODEC_ID_FFVHUFF:
- case CODEC_ID_ASV1:
- case CODEC_ID_ASV2:
- case CODEC_ID_VCR1:
- case CODEC_ID_DNXHD:
- case CODEC_ID_JPEG2000:
- case CODEC_ID_MDEC:
- case CODEC_ID_UTVIDEO:
+ case AV_CODEC_ID_MJPEG:
+ case AV_CODEC_ID_MJPEGB:
+ case AV_CODEC_ID_LJPEG:
+ case AV_CODEC_ID_PRORES:
+ case AV_CODEC_ID_RAWVIDEO:
+ case AV_CODEC_ID_V210:
+ case AV_CODEC_ID_DVVIDEO:
+ case AV_CODEC_ID_HUFFYUV:
+ case AV_CODEC_ID_FFVHUFF:
+ case AV_CODEC_ID_ASV1:
+ case AV_CODEC_ID_ASV2:
+ case AV_CODEC_ID_VCR1:
+ case AV_CODEC_ID_DNXHD:
+ case AV_CODEC_ID_JPEG2000:
+ case AV_CODEC_ID_MDEC:
+ case AV_CODEC_ID_UTVIDEO:
return 1;
default: break;
}
@@ -903,7 +903,7 @@ static int is_intra_only(AVCodecContext *enc){
static int has_decode_delay_been_guessed(AVStream *st)
{
- if(st->codec->codec_id != CODEC_ID_H264) return 1;
+ if(st->codec->codec_id != AV_CODEC_ID_H264) return 1;
#if CONFIG_H264_DECODER
if(st->codec->has_b_frames &&
avpriv_h264_has_num_reorder_frames(st->codec) == st->codec->has_b_frames)
@@ -1015,7 +1015,7 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st,
if((s->flags & AVFMT_FLAG_IGNDTS) && pkt->pts != AV_NOPTS_VALUE)
pkt->dts= AV_NOPTS_VALUE;
- if (st->codec->codec_id != CODEC_ID_H264 && pc && pc->pict_type == AV_PICTURE_TYPE_B)
+ if (st->codec->codec_id != AV_CODEC_ID_H264 && pc && pc->pict_type == AV_PICTURE_TYPE_B)
//FIXME Set low_delay = 0 when has_b_frames = 1
st->codec->has_b_frames = 1;
@@ -1088,7 +1088,7 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st,
// presentation_delayed, av_ts2str(pkt->pts), av_ts2str(pkt->dts), av_ts2str(st->cur_dts), pkt->stream_index, pc, pkt->duration);
/* interpolate PTS and DTS if they are not present */
//We skip H264 currently because delay and has_b_frames are not reliably set
- if((delay==0 || (delay==1 && pc)) && st->codec->codec_id != CODEC_ID_H264){
+ if((delay==0 || (delay==1 && pc)) && st->codec->codec_id != AV_CODEC_ID_H264){
if (presentation_delayed) {
/* DTS = decompression timestamp */
/* PTS = presentation timestamp */
@@ -1146,7 +1146,7 @@ static void compute_pkt_fields(AVFormatContext *s, AVStream *st,
FFSWAP(int64_t, st->pts_buffer[i], st->pts_buffer[i+1]);
if(pkt->dts == AV_NOPTS_VALUE)
pkt->dts= st->pts_buffer[0];
- if(st->codec->codec_id == CODEC_ID_H264){ // we skipped it above so we try here
+ if(st->codec->codec_id == AV_CODEC_ID_H264){ // we skipped it above so we try here
update_initial_timestamps(s, pkt->stream_index, pkt->dts, pkt->pts); // this should happen on the first packet
}
if(pkt->dts > st->cur_dts)
@@ -1919,7 +1919,7 @@ static int seek_frame_generic(AVFormatContext *s,
if(stream_index == pkt.stream_index && pkt.dts > timestamp){
if(pkt.flags & AV_PKT_FLAG_KEY)
break;
- if(nonkey++ > 1000 && st->codec->codec_id != CODEC_ID_CDGRAPHICS){
+ if(nonkey++ > 1000 && st->codec->codec_id != AV_CODEC_ID_CDGRAPHICS){
av_log(s, AV_LOG_ERROR,"seek_frame_generic failed as this stream seems to contain no keyframes after the target timestamp, %d non keyframes found\n", nonkey);
break;
}
@@ -2321,10 +2321,10 @@ static int has_codec_parameters(AVStream *st, const char **errmsg_ptr)
FAIL("unspecified pixel format");
break;
case AVMEDIA_TYPE_DATA:
- if(avctx->codec_id == CODEC_ID_NONE) return 1;
+ if(avctx->codec_id == AV_CODEC_ID_NONE) return 1;
}
- if (avctx->codec_id == CODEC_ID_NONE)
+ if (avctx->codec_id == AV_CODEC_ID_NONE)
FAIL("unknown codec");
return 1;
}
@@ -2396,9 +2396,9 @@ static int try_decode_frame(AVStream *st, AVPacket *avpkt, AVDictionary **option
return ret;
}
-unsigned int ff_codec_get_tag(const AVCodecTag *tags, enum CodecID id)
+unsigned int ff_codec_get_tag(const AVCodecTag *tags, enum AVCodecID id)
{
- while (tags->id != CODEC_ID_NONE) {
+ while (tags->id != AV_CODEC_ID_NONE) {
if (tags->id == id)
return tags->tag;
tags++;
@@ -2406,21 +2406,21 @@ unsigned int ff_codec_get_tag(const AVCodecTag *tags, enum CodecID id)
return 0;
}
-enum CodecID ff_codec_get_id(const AVCodecTag *tags, unsigned int tag)
+enum AVCodecID ff_codec_get_id(const AVCodecTag *tags, unsigned int tag)
{
int i;
- for(i=0; tags[i].id != CODEC_ID_NONE;i++) {
+ for(i=0; tags[i].id != AV_CODEC_ID_NONE;i++) {
if(tag == tags[i].tag)
return tags[i].id;
}
- for(i=0; tags[i].id != CODEC_ID_NONE; i++) {
+ for(i=0; tags[i].id != AV_CODEC_ID_NONE; i++) {
if (avpriv_toupper4(tag) == avpriv_toupper4(tags[i].tag))
return tags[i].id;
}
- return CODEC_ID_NONE;
+ return AV_CODEC_ID_NONE;
}
-unsigned int av_codec_get_tag(const AVCodecTag * const *tags, enum CodecID id)
+unsigned int av_codec_get_tag(const AVCodecTag * const *tags, enum AVCodecID id)
{
int i;
for(i=0; tags && tags[i]; i++){
@@ -2430,14 +2430,14 @@ unsigned int av_codec_get_tag(const AVCodecTag * const *tags, enum CodecID id)
return 0;
}
-enum CodecID av_codec_get_id(const AVCodecTag * const *tags, unsigned int tag)
+enum AVCodecID av_codec_get_id(const AVCodecTag * const *tags, unsigned int tag)
{
int i;
for(i=0; tags && tags[i]; i++){
- enum CodecID id= ff_codec_get_id(tags[i], tag);
- if(id!=CODEC_ID_NONE) return id;
+ enum AVCodecID id= ff_codec_get_id(tags[i], tag);
+ if(id!=AV_CODEC_ID_NONE) return id;
}
- return CODEC_ID_NONE;
+ return AV_CODEC_ID_NONE;
}
static void compute_chapters_end(AVFormatContext *s)
@@ -2479,8 +2479,8 @@ static int tb_unreliable(AVCodecContext *c){
|| c->time_base.den < 5L*c->time_base.num
/* || c->codec_tag == AV_RL32("DIVX")
|| c->codec_tag == AV_RL32("XVID")*/
- || c->codec_id == CODEC_ID_MPEG2VIDEO
- || c->codec_id == CODEC_ID_H264
+ || c->codec_id == AV_CODEC_ID_MPEG2VIDEO
+ || c->codec_id == AV_CODEC_ID_H264
)
return 1;
return 0;
@@ -2780,7 +2780,7 @@ int avformat_find_stream_info(AVFormatContext *ic, AVDictionary **options)
for(i=0;i<ic->nb_streams;i++) {
st = ic->streams[i];
if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
- if(st->codec->codec_id == CODEC_ID_RAWVIDEO && !st->codec->codec_tag && !st->codec->bits_per_coded_sample){
+ if(st->codec->codec_id == AV_CODEC_ID_RAWVIDEO && !st->codec->codec_tag && !st->codec->bits_per_coded_sample){
uint32_t tag= avcodec_pix_fmt_to_codec_tag(st->codec->pix_fmt);
if(ff_find_pix_fmt(ff_raw_pix_fmt_tags, tag) == st->codec->pix_fmt)
st->codec->codec_tag= tag;
@@ -3223,7 +3223,7 @@ static int validate_codec_tag(AVFormatContext *s, AVStream *st)
{
const AVCodecTag *avctag;
int n;
- enum CodecID id = CODEC_ID_NONE;
+ enum AVCodecID id = AV_CODEC_ID_NONE;
unsigned int tag = 0;
/**
@@ -3234,7 +3234,7 @@ static int validate_codec_tag(AVFormatContext *s, AVStream *st)
*/
for (n = 0; s->oformat->codec_tag[n]; n++) {
avctag = s->oformat->codec_tag[n];
- while (avctag->id != CODEC_ID_NONE) {
+ while (avctag->id != AV_CODEC_ID_NONE) {
if (avpriv_toupper4(avctag->tag) == avpriv_toupper4(st->codec->codec_tag)) {
id = avctag->id;
if (id == st->codec->codec_id)
@@ -3245,7 +3245,7 @@ static int validate_codec_tag(AVFormatContext *s, AVStream *st)
avctag++;
}
}
- if (id != CODEC_ID_NONE)
+ if (id != AV_CODEC_ID_NONE)
return 0;
if (tag && (st->codec->strict_std_compliance >= FF_COMPLIANCE_NORMAL))
return 0;
@@ -3314,7 +3314,7 @@ int avformat_write_header(AVFormatContext *s, AVDictionary **options)
if(s->oformat->codec_tag){
if( st->codec->codec_tag
- && st->codec->codec_id == CODEC_ID_RAWVIDEO
+ && st->codec->codec_id == AV_CODEC_ID_RAWVIDEO
&& (av_codec_get_tag(s->oformat->codec_tag, st->codec->codec_id) == 0 || av_codec_get_tag(s->oformat->codec_tag, st->codec->codec_id) ==MKTAG('r', 'a', 'w', ' '))
&& !validate_codec_tag(s, st)){
//the current rawvideo encoding system ends up setting the wrong codec_tag for avi/mov, we override it here
@@ -4464,7 +4464,7 @@ int64_t ff_iso8601_to_unix_time(const char *datestr)
#endif
}
-int avformat_query_codec(AVOutputFormat *ofmt, enum CodecID codec_id, int std_compliance)
+int avformat_query_codec(AVOutputFormat *ofmt, enum AVCodecID codec_id, int std_compliance)
{
if (ofmt) {
if (ofmt->query_codec)
diff --git a/libavformat/vc1test.c b/libavformat/vc1test.c
index 1f1ec222b7..e411a257f1 100644
--- a/libavformat/vc1test.c
+++ b/libavformat/vc1test.c
@@ -59,7 +59,7 @@ static int vc1t_read_header(AVFormatContext *s)
return -1;
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- st->codec->codec_id = CODEC_ID_WMV3;
+ st->codec->codec_id = AV_CODEC_ID_WMV3;
st->codec->extradata = av_malloc(VC1_EXTRADATA_SIZE);
st->codec->extradata_size = VC1_EXTRADATA_SIZE;
diff --git a/libavformat/vc1testenc.c b/libavformat/vc1testenc.c
index 56c723c729..e084516b60 100644
--- a/libavformat/vc1testenc.c
+++ b/libavformat/vc1testenc.c
@@ -30,7 +30,7 @@ static int vc1test_write_header(AVFormatContext *s)
AVCodecContext *avc = s->streams[0]->codec;
AVIOContext *pb = s->pb;
- if (avc->codec_id != CODEC_ID_WMV3) {
+ if (avc->codec_id != AV_CODEC_ID_WMV3) {
av_log(s, AV_LOG_ERROR, "Only WMV3 is accepted!\n");
return -1;
}
@@ -87,8 +87,8 @@ AVOutputFormat ff_vc1t_muxer = {
.long_name = NULL_IF_CONFIG_SMALL("VC-1 test bitstream"),
.extensions = "rcv",
.priv_data_size = sizeof(RCVContext),
- .audio_codec = CODEC_ID_NONE,
- .video_codec = CODEC_ID_WMV3,
+ .audio_codec = AV_CODEC_ID_NONE,
+ .video_codec = AV_CODEC_ID_WMV3,
.write_header = vc1test_write_header,
.write_packet = vc1test_write_packet,
.write_trailer = vc1test_write_trailer,
diff --git a/libavformat/voc.c b/libavformat/voc.c
index 53e02f9464..2a972344d3 100644
--- a/libavformat/voc.c
+++ b/libavformat/voc.c
@@ -25,13 +25,13 @@
const unsigned char ff_voc_magic[21] = "Creative Voice File\x1A";
const AVCodecTag ff_voc_codec_tags[] = {
- {CODEC_ID_PCM_U8, 0x00},
- {CODEC_ID_ADPCM_SBPRO_4, 0x01},
- {CODEC_ID_ADPCM_SBPRO_3, 0x02},
- {CODEC_ID_ADPCM_SBPRO_2, 0x03},
- {CODEC_ID_PCM_S16LE, 0x04},
- {CODEC_ID_PCM_ALAW, 0x06},
- {CODEC_ID_PCM_MULAW, 0x07},
- {CODEC_ID_ADPCM_CT, 0x0200},
- {CODEC_ID_NONE, 0},
+ {AV_CODEC_ID_PCM_U8, 0x00},
+ {AV_CODEC_ID_ADPCM_SBPRO_4, 0x01},
+ {AV_CODEC_ID_ADPCM_SBPRO_3, 0x02},
+ {AV_CODEC_ID_ADPCM_SBPRO_2, 0x03},
+ {AV_CODEC_ID_PCM_S16LE, 0x04},
+ {AV_CODEC_ID_PCM_ALAW, 0x06},
+ {AV_CODEC_ID_PCM_MULAW, 0x07},
+ {AV_CODEC_ID_ADPCM_CT, 0x0200},
+ {AV_CODEC_ID_NONE, 0},
};
diff --git a/libavformat/vocdec.c b/libavformat/vocdec.c
index 91e787ea10..62215fc735 100644
--- a/libavformat/vocdec.c
+++ b/libavformat/vocdec.c
@@ -137,12 +137,12 @@ ff_voc_get_packet(AVFormatContext *s, AVPacket *pkt, AVStream *st, int max_size)
if (tmp_codec >= 0) {
tmp_codec = ff_codec_get_id(ff_voc_codec_tags, tmp_codec);
- if (dec->codec_id == CODEC_ID_NONE)
+ if (dec->codec_id == AV_CODEC_ID_NONE)
dec->codec_id = tmp_codec;
else if (dec->codec_id != tmp_codec)
av_log(s, AV_LOG_WARNING, "Ignoring mid-stream change in audio codec\n");
- if (dec->codec_id == CODEC_ID_NONE) {
- if (s->audio_codec_id == CODEC_ID_NONE) {
+ if (dec->codec_id == AV_CODEC_ID_NONE) {
+ if (s->audio_codec_id == AV_CODEC_ID_NONE) {
av_log(s, AV_LOG_ERROR, "unknown codec tag\n");
return AVERROR(EINVAL);
}
diff --git a/libavformat/vocenc.c b/libavformat/vocenc.c
index 5deda78579..d97cdc4c15 100644
--- a/libavformat/vocenc.c
+++ b/libavformat/vocenc.c
@@ -95,8 +95,8 @@ AVOutputFormat ff_voc_muxer = {
.mime_type = "audio/x-voc",
.extensions = "voc",
.priv_data_size = sizeof(VocEncContext),
- .audio_codec = CODEC_ID_PCM_S16LE,
- .video_codec = CODEC_ID_NONE,
+ .audio_codec = AV_CODEC_ID_PCM_S16LE,
+ .video_codec = AV_CODEC_ID_NONE,
.write_header = voc_write_header,
.write_packet = voc_write_packet,
.write_trailer = voc_write_trailer,
diff --git a/libavformat/vqf.c b/libavformat/vqf.c
index 196cd39994..5fff84e049 100644
--- a/libavformat/vqf.c
+++ b/libavformat/vqf.c
@@ -105,7 +105,7 @@ static int vqf_read_header(AVFormatContext *s)
header_size = avio_rb32(s->pb);
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- st->codec->codec_id = CODEC_ID_TWINVQ;
+ st->codec->codec_id = AV_CODEC_ID_TWINVQ;
st->start_time = 0;
do {
diff --git a/libavformat/wav.c b/libavformat/wav.c
index caf01a2e7d..7b3724c733 100644
--- a/libavformat/wav.c
+++ b/libavformat/wav.c
@@ -219,8 +219,8 @@ AVOutputFormat ff_wav_muxer = {
.mime_type = "audio/x-wav",
.extensions = "wav",
.priv_data_size = sizeof(WAVContext),
- .audio_codec = CODEC_ID_PCM_S16LE,
- .video_codec = CODEC_ID_NONE,
+ .audio_codec = AV_CODEC_ID_PCM_S16LE,
+ .video_codec = AV_CODEC_ID_NONE,
.write_header = wav_write_header,
.write_packet = wav_write_packet,
.write_trailer = wav_write_trailer,
@@ -496,7 +496,7 @@ static int wav_read_header(AVFormatContext *s)
avio_r8(pb);
vst->id = 1;
vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- vst->codec->codec_id = CODEC_ID_MJPEG;
+ vst->codec->codec_id = AV_CODEC_ID_MJPEG;
vst->codec->width = avio_rl24(pb);
vst->codec->height = avio_rl24(pb);
size = avio_rl24(pb);
@@ -672,10 +672,10 @@ static int wav_read_seek(AVFormatContext *s,
st = s->streams[0];
switch (st->codec->codec_id) {
- case CODEC_ID_MP2:
- case CODEC_ID_MP3:
- case CODEC_ID_AC3:
- case CODEC_ID_DTS:
+ case AV_CODEC_ID_MP2:
+ case AV_CODEC_ID_MP3:
+ case AV_CODEC_ID_AC3:
+ case AV_CODEC_ID_DTS:
/* use generic seeking with dynamically generated indexes */
return -1;
default:
diff --git a/libavformat/wc3movie.c b/libavformat/wc3movie.c
index 45bdde0c57..836f567a20 100644
--- a/libavformat/wc3movie.c
+++ b/libavformat/wc3movie.c
@@ -169,7 +169,7 @@ static int wc3_read_header(AVFormatContext *s)
avpriv_set_pts_info(st, 33, 1, WC3_FRAME_FPS);
wc3->video_stream_index = st->index;
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- st->codec->codec_id = CODEC_ID_XAN_WC3;
+ st->codec->codec_id = AV_CODEC_ID_XAN_WC3;
st->codec->codec_tag = 0; /* no fourcc */
st->codec->width = wc3->width;
st->codec->height = wc3->height;
@@ -180,7 +180,7 @@ static int wc3_read_header(AVFormatContext *s)
avpriv_set_pts_info(st, 33, 1, WC3_FRAME_FPS);
wc3->audio_stream_index = st->index;
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- st->codec->codec_id = CODEC_ID_PCM_S16LE;
+ st->codec->codec_id = AV_CODEC_ID_PCM_S16LE;
st->codec->codec_tag = 1;
st->codec->channels = WC3_AUDIO_CHANNELS;
st->codec->bits_per_coded_sample = WC3_AUDIO_BITS;
diff --git a/libavformat/westwood_aud.c b/libavformat/westwood_aud.c
index 6dee8b535f..2762cba405 100644
--- a/libavformat/westwood_aud.c
+++ b/libavformat/westwood_aud.c
@@ -106,10 +106,10 @@ static int wsaud_read_header(AVFormatContext *s)
av_log_ask_for_sample(s, "Stereo WS-SND1 is not supported.\n");
return AVERROR_PATCHWELCOME;
}
- st->codec->codec_id = CODEC_ID_WESTWOOD_SND1;
+ st->codec->codec_id = AV_CODEC_ID_WESTWOOD_SND1;
break;
case 99:
- st->codec->codec_id = CODEC_ID_ADPCM_IMA_WS;
+ st->codec->codec_id = AV_CODEC_ID_ADPCM_IMA_WS;
st->codec->bits_per_coded_sample = 4;
st->codec->bit_rate = channels * sample_rate * 4;
break;
@@ -144,7 +144,7 @@ static int wsaud_read_packet(AVFormatContext *s,
chunk_size = AV_RL16(&preamble[0]);
- if (st->codec->codec_id == CODEC_ID_WESTWOOD_SND1) {
+ if (st->codec->codec_id == AV_CODEC_ID_WESTWOOD_SND1) {
/* For Westwood SND1 audio we need to add the output size and input
size to the start of the packet to match what is in VQA.
Specifically, this is needed to signal when a packet should be
diff --git a/libavformat/westwood_vqa.c b/libavformat/westwood_vqa.c
index 89a985605e..708f3e5fc3 100644
--- a/libavformat/westwood_vqa.c
+++ b/libavformat/westwood_vqa.c
@@ -94,7 +94,7 @@ static int wsvqa_read_header(AVFormatContext *s)
st->start_time = 0;
wsvqa->video_stream_index = st->index;
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- st->codec->codec_id = CODEC_ID_WS_VQA;
+ st->codec->codec_id = AV_CODEC_ID_WS_VQA;
st->codec->codec_tag = 0; /* no fourcc */
/* skip to the start of the VQA header */
@@ -211,15 +211,15 @@ static int wsvqa_read_packet(AVFormatContext *s,
switch (chunk_type) {
case SND0_TAG:
if (wsvqa->bps == 16)
- st->codec->codec_id = CODEC_ID_PCM_S16LE;
+ st->codec->codec_id = AV_CODEC_ID_PCM_S16LE;
else
- st->codec->codec_id = CODEC_ID_PCM_U8;
+ st->codec->codec_id = AV_CODEC_ID_PCM_U8;
break;
case SND1_TAG:
- st->codec->codec_id = CODEC_ID_WESTWOOD_SND1;
+ st->codec->codec_id = AV_CODEC_ID_WESTWOOD_SND1;
break;
case SND2_TAG:
- st->codec->codec_id = CODEC_ID_ADPCM_IMA_WS;
+ st->codec->codec_id = AV_CODEC_ID_ADPCM_IMA_WS;
st->codec->extradata_size = 2;
st->codec->extradata = av_mallocz(2 + FF_INPUT_BUFFER_PADDING_SIZE);
if (!st->codec->extradata)
diff --git a/libavformat/wtv.c b/libavformat/wtv.c
index 7a29309e58..d85c3cfc10 100644
--- a/libavformat/wtv.c
+++ b/libavformat/wtv.c
@@ -71,6 +71,6 @@ const ff_asf_guid ff_format_mpeg2_video =
{0xE3,0x80,0x6D,0xE0,0x46,0xDB,0xCF,0x11,0xB4,0xD1,0x00,0x80,0x5F,0x6C,0xBB,0xEA};
const AVCodecGuid ff_video_guids[] = {
- {CODEC_ID_MPEG2VIDEO, {0x26,0x80,0x6D,0xE0,0x46,0xDB,0xCF,0x11,0xB4,0xD1,0x00,0x80,0x5F,0x6C,0xBB,0xEA}},
- {CODEC_ID_NONE}
+ {AV_CODEC_ID_MPEG2VIDEO, {0x26,0x80,0x6D,0xE0,0x46,0xDB,0xCF,0x11,0xB4,0xD1,0x00,0x80,0x5F,0x6C,0xBB,0xEA}},
+ {AV_CODEC_ID_NONE}
};
diff --git a/libavformat/wtvdec.c b/libavformat/wtvdec.c
index b21b0970f2..2999382ee4 100644
--- a/libavformat/wtvdec.c
+++ b/libavformat/wtvdec.c
@@ -430,7 +430,7 @@ static void get_attachment(AVFormatContext *s, AVIOContext *pb, int length)
if (!st)
goto done;
av_dict_set(&st->metadata, "title", description, 0);
- st->codec->codec_id = CODEC_ID_MJPEG;
+ st->codec->codec_id = AV_CODEC_ID_MJPEG;
st->codec->codec_type = AVMEDIA_TYPE_ATTACHMENT;
st->codec->extradata = av_mallocz(filesize);
if (!st->codec->extradata)
@@ -550,9 +550,9 @@ static void parse_mpeg1waveformatex(AVStream *st)
{
/* fwHeadLayer */
switch (AV_RL16(st->codec->extradata)) {
- case 0x0001 : st->codec->codec_id = CODEC_ID_MP1; break;
- case 0x0002 : st->codec->codec_id = CODEC_ID_MP2; break;
- case 0x0004 : st->codec->codec_id = CODEC_ID_MP3; break;
+ case 0x0001 : st->codec->codec_id = AV_CODEC_ID_MP1; break;
+ case 0x0002 : st->codec->codec_id = AV_CODEC_ID_MP2; break;
+ case 0x0004 : st->codec->codec_id = AV_CODEC_ID_MP3; break;
}
st->codec->bit_rate = AV_RL32(st->codec->extradata + 2); /* dwHeadBitrate */
@@ -649,7 +649,7 @@ static AVStream * parse_media_type(AVFormatContext *s, AVStream *st, int sid,
av_log(s, AV_LOG_WARNING, "MPEG1WAVEFORMATEX underflow\n");
} else {
st->codec->codec_id = ff_codec_guid_get_id(ff_codec_wav_guids, subtype);
- if (st->codec->codec_id == CODEC_ID_NONE)
+ if (st->codec->codec_id == AV_CODEC_ID_NONE)
av_log(s, AV_LOG_WARNING, "unknown subtype:"FF_PRI_GUID"\n", FF_ARG_GUID(subtype));
}
return st;
@@ -674,7 +674,7 @@ static AVStream * parse_media_type(AVFormatContext *s, AVStream *st, int sid,
} else {
st->codec->codec_id = ff_codec_guid_get_id(ff_video_guids, subtype);
}
- if (st->codec->codec_id == CODEC_ID_NONE)
+ if (st->codec->codec_id == AV_CODEC_ID_NONE)
av_log(s, AV_LOG_WARNING, "unknown subtype:"FF_PRI_GUID"\n", FF_ARG_GUID(subtype));
return st;
} else if (!ff_guidcmp(mediatype, mediatype_mpeg2_pes) &&
@@ -685,7 +685,7 @@ static AVStream * parse_media_type(AVFormatContext *s, AVStream *st, int sid,
if (ff_guidcmp(formattype, ff_format_none))
av_log(s, AV_LOG_WARNING, "unknown formattype:"FF_PRI_GUID"\n", FF_ARG_GUID(formattype));
avio_skip(pb, size);
- st->codec->codec_id = CODEC_ID_DVB_SUBTITLE;
+ st->codec->codec_id = AV_CODEC_ID_DVB_SUBTITLE;
return st;
} else if (!ff_guidcmp(mediatype, mediatype_mstvcaption) &&
(!ff_guidcmp(subtype, mediasubtype_teletext) || !ff_guidcmp(subtype, mediasubtype_dtvccdata))) {
@@ -695,7 +695,7 @@ static AVStream * parse_media_type(AVFormatContext *s, AVStream *st, int sid,
if (ff_guidcmp(formattype, ff_format_none))
av_log(s, AV_LOG_WARNING, "unknown formattype:"FF_PRI_GUID"\n", FF_ARG_GUID(formattype));
avio_skip(pb, size);
- st->codec->codec_id = CODEC_ID_DVB_TELETEXT;
+ st->codec->codec_id = AV_CODEC_ID_DVB_TELETEXT;
return st;
} else if (!ff_guidcmp(mediatype, mediatype_mpeg2_sections) &&
!ff_guidcmp(subtype, mediasubtype_mpeg2_sections)) {
diff --git a/libavformat/wtvenc.c b/libavformat/wtvenc.c
index be83c54f71..1f2c7eb180 100644
--- a/libavformat/wtvenc.c
+++ b/libavformat/wtvenc.c
@@ -116,7 +116,7 @@ static int write_pad(AVIOContext *pb, int size)
static const ff_asf_guid *get_codec_guid(enum CodecID id, const AVCodecGuid *av_guid)
{
int i;
- for (i = 0; av_guid[i].id != CODEC_ID_NONE; i++) {
+ for (i = 0; av_guid[i].id != AV_CODEC_ID_NONE; i++) {
if (id == av_guid[i].id)
return &(av_guid[i].guid);
}
@@ -713,8 +713,8 @@ AVOutputFormat ff_wtv_muxer = {
.long_name = NULL_IF_CONFIG_SMALL("Windows Television (WTV)"),
.extensions = "wtv",
.priv_data_size = sizeof(WtvContext),
- .audio_codec = CODEC_ID_AC3,
- .video_codec = CODEC_ID_MPEG2VIDEO,
+ .audio_codec = AV_CODEC_ID_AC3,
+ .video_codec = AV_CODEC_ID_MPEG2VIDEO,
.write_header = write_header,
.write_packet = write_packet,
.write_trailer = write_trailer,
diff --git a/libavformat/wv.c b/libavformat/wv.c
index 95d5044dbd..50e5e5383b 100644
--- a/libavformat/wv.c
+++ b/libavformat/wv.c
@@ -248,7 +248,7 @@ static int wv_read_header(AVFormatContext *s)
if (!st)
return AVERROR(ENOMEM);
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- st->codec->codec_id = CODEC_ID_WAVPACK;
+ st->codec->codec_id = AV_CODEC_ID_WAVPACK;
st->codec->channels = wc->chan;
st->codec->channel_layout = wc->chmask;
st->codec->sample_rate = wc->rate;
diff --git a/libavformat/wvenc.c b/libavformat/wvenc.c
index 0f9bbf222b..d225ed4280 100644
--- a/libavformat/wvenc.c
+++ b/libavformat/wvenc.c
@@ -38,7 +38,7 @@ static int write_header(AVFormatContext *s)
av_log(s, AV_LOG_ERROR, "only one stream is supported\n");
return AVERROR(EINVAL);
}
- if (codec->codec_id != CODEC_ID_WAVPACK) {
+ if (codec->codec_id != AV_CODEC_ID_WAVPACK) {
av_log(s, AV_LOG_ERROR, "unsupported codec\n");
return AVERROR(EINVAL);
}
@@ -92,8 +92,8 @@ AVOutputFormat ff_wv_muxer = {
.long_name = NULL_IF_CONFIG_SMALL("WavPack"),
.priv_data_size = sizeof(WVMuxContext),
.extensions = "wv",
- .audio_codec = CODEC_ID_WAVPACK,
- .video_codec = CODEC_ID_NONE,
+ .audio_codec = AV_CODEC_ID_WAVPACK,
+ .video_codec = AV_CODEC_ID_NONE,
.write_header = write_header,
.write_packet = write_packet,
.write_trailer = write_trailer,
diff --git a/libavformat/xa.c b/libavformat/xa.c
index f9d9f47ba3..e3d36e61b5 100644
--- a/libavformat/xa.c
+++ b/libavformat/xa.c
@@ -74,7 +74,7 @@ static int xa_read_header(AVFormatContext *s)
return AVERROR(ENOMEM);
st->codec->codec_type = AVMEDIA_TYPE_AUDIO;
- st->codec->codec_id = CODEC_ID_ADPCM_EA_MAXIS_XA;
+ st->codec->codec_id = AV_CODEC_ID_ADPCM_EA_MAXIS_XA;
avio_skip(pb, 4); /* Skip the XA ID */
xa->out_size = avio_rl32(pb);
avio_skip(pb, 2); /* Skip the tag */
diff --git a/libavformat/xmv.c b/libavformat/xmv.c
index b4accdf1cd..f250aad0b2 100644
--- a/libavformat/xmv.c
+++ b/libavformat/xmv.c
@@ -80,7 +80,7 @@ typedef struct XMVAudioPacket {
uint16_t block_align; ///< Bytes per compressed block.
uint16_t block_samples; ///< Decompressed samples per compressed block.
- enum CodecID codec_id; ///< The codec ID of the compression scheme.
+ enum AVCodecID codec_id; ///< The codec ID of the compression scheme.
uint32_t data_size; ///< The size of the remaining audio data.
uint64_t data_offset; ///< The offset of the audio data within the file.
@@ -155,7 +155,7 @@ static int xmv_read_header(AVFormatContext *s)
avpriv_set_pts_info(vst, 32, 1, 1000);
vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- vst->codec->codec_id = CODEC_ID_WMV2;
+ vst->codec->codec_id = AV_CODEC_ID_WMV2;
vst->codec->codec_tag = MKBETAG('W', 'M', 'V', '2');
vst->codec->width = avio_rl32(pb);
vst->codec->height = avio_rl32(pb);
diff --git a/libavformat/xwma.c b/libavformat/xwma.c
index f8561d1522..04c36296d1 100644
--- a/libavformat/xwma.c
+++ b/libavformat/xwma.c
@@ -84,7 +84,7 @@ static int xwma_read_header(AVFormatContext *s)
* extradata for that. Thus, ask the user for feedback, but try to go on
* anyway.
*/
- if (st->codec->codec_id != CODEC_ID_WMAV2) {
+ if (st->codec->codec_id != AV_CODEC_ID_WMAV2) {
av_log(s, AV_LOG_WARNING, "unexpected codec (tag 0x04%x; id %d)\n",
st->codec->codec_tag, st->codec->codec_id);
av_log_ask_for_sample(s, NULL);
diff --git a/libavformat/yop.c b/libavformat/yop.c
index 7fd28af0e2..1185a3efc7 100644
--- a/libavformat/yop.c
+++ b/libavformat/yop.c
@@ -77,14 +77,14 @@ static int yop_read_header(AVFormatContext *s)
// Audio
audio_dec = audio_stream->codec;
audio_dec->codec_type = AVMEDIA_TYPE_AUDIO;
- audio_dec->codec_id = CODEC_ID_ADPCM_IMA_APC;
+ audio_dec->codec_id = AV_CODEC_ID_ADPCM_IMA_APC;
audio_dec->channels = 1;
audio_dec->sample_rate = 22050;
// Video
video_dec = video_stream->codec;
video_dec->codec_type = AVMEDIA_TYPE_VIDEO;
- video_dec->codec_id = CODEC_ID_YOP;
+ video_dec->codec_id = AV_CODEC_ID_YOP;
avio_skip(pb, 6);
diff --git a/libavformat/yuv4mpeg.c b/libavformat/yuv4mpeg.c
index 547b0dfcc0..5b6d2df282 100644
--- a/libavformat/yuv4mpeg.c
+++ b/libavformat/yuv4mpeg.c
@@ -214,7 +214,7 @@ static int yuv4_write_header(AVFormatContext *s)
if (s->nb_streams != 1)
return AVERROR(EIO);
- if (s->streams[0]->codec->codec_id != CODEC_ID_RAWVIDEO) {
+ if (s->streams[0]->codec->codec_id != AV_CODEC_ID_RAWVIDEO) {
av_log(s, AV_LOG_ERROR,
"A non-rawvideo stream was selected, but yuv4mpeg only handles rawvideo streams\n");
return AVERROR(EINVAL);
@@ -269,8 +269,8 @@ AVOutputFormat ff_yuv4mpegpipe_muxer = {
.long_name = NULL_IF_CONFIG_SMALL("YUV4MPEG pipe"),
.extensions = "y4m",
.priv_data_size = sizeof(int),
- .audio_codec = CODEC_ID_NONE,
- .video_codec = CODEC_ID_RAWVIDEO,
+ .audio_codec = AV_CODEC_ID_NONE,
+ .video_codec = AV_CODEC_ID_RAWVIDEO,
.write_header = yuv4_write_header,
.write_packet = yuv4_write_packet,
.flags = AVFMT_RAWPICTURE,
@@ -485,7 +485,7 @@ static int yuv4_read_header(AVFormatContext *s)
avpriv_set_pts_info(st, 64, rated, raten);
st->codec->pix_fmt = pix_fmt;
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- st->codec->codec_id = CODEC_ID_RAWVIDEO;
+ st->codec->codec_id = AV_CODEC_ID_RAWVIDEO;
st->sample_aspect_ratio = (AVRational){ aspectn, aspectd };
st->codec->chroma_sample_location = chroma_sample_location;
diff --git a/mt-work/mplayer.diff b/mt-work/mplayer.diff
index ef38063bf0..170b517b3c 100644
--- a/mt-work/mplayer.diff
+++ b/mt-work/mplayer.diff
@@ -10,4 +10,4 @@ index 7c68a20..135e6b1 100644
+ if(vd_use_slices && (lavc_codec->capabilities&CODEC_CAP_DRAW_HORIZ_BAND) && !do_vis_debug && lavc_param_threads <= 1)
ctx->do_slices=1;
- if(lavc_codec->capabilities&CODEC_CAP_DR1 && !do_vis_debug && lavc_codec->id != CODEC_ID_H264 && lavc_codec->id != CODEC_ID_INTERPLAY_VIDEO && lavc_codec->id != CODEC_ID_ROQ && lavc_codec->id != CODEC_ID_VP8 && lavc_codec->id != CODEC_ID_LAGARITH)
+ if(lavc_codec->capabilities&CODEC_CAP_DR1 && !do_vis_debug && lavc_codec->id != AV_CODEC_ID_H264 && lavc_codec->id != AV_CODEC_ID_INTERPLAY_VIDEO && lavc_codec->id != AV_CODEC_ID_ROQ && lavc_codec->id != AV_CODEC_ID_VP8 && lavc_codec->id != AV_CODEC_ID_LAGARITH)
diff --git a/tools/ismindex.c b/tools/ismindex.c
index 1fc7c239da..1b69e289d8 100644
--- a/tools/ismindex.c
+++ b/tools/ismindex.c
@@ -248,7 +248,7 @@ static int get_video_private_data(struct VideoFile *vf, AVCodecContext *codec)
uint16_t sps_size, pps_size;
int err = AVERROR(EINVAL);
- if (codec->codec_id == CODEC_ID_VC1)
+ if (codec->codec_id == AV_CODEC_ID_VC1)
return get_private_data(vf, codec);
avio_open_dyn_buf(&io);
@@ -332,11 +332,11 @@ static int handle_file(struct VideoFiles *files, const char *file, int split)
files->nb_audio_files++;
vf->channels = st->codec->channels;
vf->sample_rate = st->codec->sample_rate;
- if (st->codec->codec_id == CODEC_ID_AAC) {
+ if (st->codec->codec_id == AV_CODEC_ID_AAC) {
vf->fourcc = "AACL";
vf->tag = 255;
vf->blocksize = 4;
- } else if (st->codec->codec_id == CODEC_ID_WMAPRO) {
+ } else if (st->codec->codec_id == AV_CODEC_ID_WMAPRO) {
vf->fourcc = "WMAP";
vf->tag = st->codec->codec_tag;
vf->blocksize = st->codec->block_align;
@@ -349,9 +349,9 @@ static int handle_file(struct VideoFiles *files, const char *file, int split)
files->nb_video_files++;
vf->width = st->codec->width;
vf->height = st->codec->height;
- if (st->codec->codec_id == CODEC_ID_H264)
+ if (st->codec->codec_id == AV_CODEC_ID_H264)
vf->fourcc = "H264";
- else if (st->codec->codec_id == CODEC_ID_VC1)
+ else if (st->codec->codec_id == AV_CODEC_ID_VC1)
vf->fourcc = "WVC1";
get_video_private_data(vf, st->codec);
}